Skip to content

Commit 586bcc9

Browse files
committed
GPU Display: Move GL animation config to general GPU configuration as leightweight GL config
1 parent 3d2d096 commit 586bcc9

2 files changed

Lines changed: 32 additions & 34 deletions

File tree

GPU/GPUTracking/Base/GPUSettingsList.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,35 @@ AddOption(clustersOnly, bool, false, "", 0, "Visualize clusters only")
145145
AddHelp("help", 'h')
146146
EndConfig()
147147

148+
// Light settings concerning the event display (can be changed without rebuilding vertices)
149+
BeginSubConfig(GPUSettingsDisplayLight, GLlight, configStandalone, "GL", 'g', "OpenGL display settings")
150+
AddOption(animationMode, int, 0, "", 0, "")
151+
AddOption(smoothPoints, bool, true, "", 0, "Apply smoothing to points")
152+
AddOption(smoothLines, bool, false, "", 0, "Apply smoothing to lines")
153+
AddOption(depthBuffer, bool, false, "", 0, "Enable Z-buffer")
154+
AddOption(drawClusters, bool, true, "", 0, "Highlight clusters")
155+
AddOption(drawLinks, bool, false, "", 0, "Highlight links")
156+
AddOption(drawInitLinks, bool, false, "", 0, "Highlight cleaned-up links")
157+
AddOption(drawSeeds, bool, false, "", 0, "Highlight seeds")
158+
AddOption(drawTracklets, bool, false, "", 0, "Highlight tracklets")
159+
AddOption(drawTracks, bool, false, "", 0, "Highlight sector tracks")
160+
AddOption(drawGlobalTracks, bool, false, "", 0, "Highlight global sector tracks prolonged into adjacent sector")
161+
AddOption(drawFinal, bool, false, "", 0, "Highlight final tracks")
162+
AddOption(excludeClusters, int, 0, "", 0, "Exclude clusters from selected draw objects from display")
163+
AddOption(propagateTracks, int, 0, "", 0, "Propagate final tracks further (inward / outward / show MC tracks)")
164+
AddOption(colorClusters, int, 1, "", 0, "Color clusters belonging to track objects")
165+
AddOption(drawSlice, int, -1, "", 0, "Show individual slice")
166+
AddOption(drawRelatedSlices, int, 0, "", 0, "Show related slices (if drawSlice != -1)")
167+
AddOption(drawGrid, int, 0, "", 0, "Highlight grid")
168+
AddOption(colorCollisions, int, 0, "", 0, "Distinguish collisions in timeframe by color")
169+
AddOption(showCollision, int, -1, "", 0, "Show only individual collision")
170+
AddOption(pointSize, float, 2.0f, "", 0, "Set point size")
171+
AddOption(lineWidth, float, 1.4f, "", 0, "Set line width")
172+
AddOption(drawTPC, bool, true, "", 0, "Enable drawing TPC data")
173+
AddOption(drawTRD, bool, true, "", 0, "Enabale drawing TRD data")
174+
AddHelp("help", 'h')
175+
EndConfig()
176+
148177
// Settings concerning the standalone QA
149178
BeginSubConfig(GPUSettingsQA, QA, configStandalone, "QA", 'q', "QA settings")
150179
AddOptionVec(compareInputs, const char*, "QAinput", 0, "Read histogram from these input files and include them in the output plots")
@@ -269,6 +298,7 @@ AddSubConfig(GPUSettingsProcessing, proc)
269298
AddSubConfig(GPUSettingsTF, TF)
270299
AddSubConfig(GPUSettingsQA, QA)
271300
AddSubConfig(GPUSettingsDisplay, GL)
301+
AddSubConfig(GPUSettingsDisplayLight, GLlight)
272302
AddSubConfig(GPUSettingsEG, EG)
273303
EndConfig()
274304
#elif defined(GPUCA_O2_LIB) || defined(GPUCA_O2_INTERFACE) // GPUCA_STANDALONE

GPU/GPUTracking/Standalone/display/GPUDisplay.h

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -138,38 +138,6 @@ class GPUDisplay
138138
GLvertex(GLfloat a, GLfloat b, GLfloat c) : x(a), y(b), z(c) {}
139139
};
140140

141-
struct OpenGLConfig {
142-
int animationMode = 0;
143-
144-
bool smoothPoints = true;
145-
bool smoothLines = false;
146-
bool depthBuffer = false;
147-
148-
bool drawClusters = true;
149-
bool drawLinks = false;
150-
bool drawSeeds = false;
151-
bool drawInitLinks = false;
152-
bool drawTracklets = false;
153-
bool drawTracks = false;
154-
bool drawGlobalTracks = false;
155-
bool drawFinal = false;
156-
int excludeClusters = 0;
157-
int propagateTracks = 0;
158-
159-
int colorClusters = 1;
160-
int drawSlice = -1;
161-
int drawRelatedSlices = 0;
162-
int drawGrid = 0;
163-
int colorCollisions = 0;
164-
int showCollision = -1;
165-
166-
float pointSize = 2.0;
167-
float lineWidth = 1.4;
168-
169-
bool drawTPC = true;
170-
bool drawTRD = true;
171-
};
172-
173141
struct DrawArraysIndirectCommand {
174142
DrawArraysIndirectCommand(unsigned int a = 0, unsigned int b = 0, unsigned int c = 0, unsigned int d = 0) : count(a), instanceCount(b), first(c), baseInstance(d) {}
175143
unsigned int count;
@@ -294,7 +262,7 @@ class GPUDisplay
294262
GPUDisplayBackend* mBackend;
295263
GPUChainTracking* mChain;
296264
const GPUSettingsDisplay& mConfig;
297-
OpenGLConfig mCfg;
265+
GPUSettingsDisplayLight mCfg;
298266
GPUQA* mQA;
299267
const GPUTPCGMMerger& mMerger;
300268
qSem mSemLockDisplay;
@@ -385,7 +353,7 @@ class GPUDisplay
385353
bool mAnimationChangeConfig = true;
386354
float mAnimationDelay = 2.f;
387355
vecpod<float> mAnimateVectors[9];
388-
vecpod<OpenGLConfig> mAnimateConfig;
356+
vecpod<GPUSettingsDisplayLight> mAnimateConfig;
389357
opengl_spline mAnimationSplines[8];
390358

391359
volatile int mResetScene = 0;

0 commit comments

Comments
 (0)