59 const GPUSettingsDisplayRenderer&
cfgR()
const {
return mCfgR; }
60 const GPUSettingsDisplayLight&
cfgL()
const {
return mCfgL; }
61 const GPUSettingsDisplayHeavy&
cfgH()
const {
return mCfgH; }
62 const GPUSettingsDisplay&
cfg()
const {
return mConfig; }
81 static constexpr float GL_SCALE_FACTOR = (1.f / 100.f);
83 static constexpr const int32_t N_POINTS_TYPE = 15;
84 static constexpr const int32_t N_POINTS_TYPE_TPC = 9;
85 static constexpr const int32_t N_POINTS_TYPE_TRD = 2;
86 static constexpr const int32_t N_POINTS_TYPE_TOF = 2;
87 static constexpr const int32_t N_POINTS_TYPE_ITS = 2;
88 static constexpr const int32_t N_LINES_TYPE = 7;
89 static constexpr const int32_t N_FINAL_TYPE = 4;
90 static constexpr int32_t TRACK_TYPE_ID_LIMIT = 100;
91 enum PointTypes { tCLUSTER = 0,
97 tEXTRAPOLATEDTRACK = 6,
106 enum LineTypes { RESERVED = 0 };
110 struct threadVertexBuffer {
115 threadVertexBuffer() :
buffer()
117 for (int32_t
i = 0;
i < N_FINAL_TYPE;
i++) {
124 for (int32_t
i = 0;
i < N_FINAL_TYPE;
i++) {
134 opengl_spline() : ma(), mb(), mc(), md(), mx() {}
136 float evaluate(
float x);
137 void setVerbose() { mVerbose =
true; }
141 bool mVerbose =
false;
144 void DrawGLScene_internal(
float animateTime = -1.f,
bool renderToMixBuffer =
false);
145 void DrawGLScene_updateEventData();
146 void DrawGLScene_cameraAndAnimation(
float animateTime,
float& mixSlaveImage,
hmm_mat4& nextViewMatrix);
147 size_t DrawGLScene_updateVertexList();
148 void DrawGLScene_drawCommands();
149 int32_t InitDisplay_internal();
150 int32_t getNumThreads();
151 void updateOptions();
152 void disableUnsupportedOptions();
153 int32_t buildTrackFilter();
154 const GPUTPCTracker& sectorTracker(int32_t iSector);
155 const GPUTRDGeometry* trdGeometry();
156 const GPUTrackingInOutPointers* mIOPtrs =
nullptr;
158 void insertVertexList(int32_t iSector,
size_t first,
size_t last);
159 template <
typename... Args>
160 void SetInfo(Args... args)
162#pragma GCC diagnostic push
163#pragma GCC diagnostic ignored "-Wformat-security"
164 snprintf(mInfoText2, 1024, args...);
165#pragma GCC diagnostic pop
166 GPUInfo(
"%s", mInfoText2);
169 void PrintGLHelpText(
float colorValue);
170 void calcXYZ(
const float*);
171 void mAnimationCloseAngle(
float& newangle,
float lastAngle);
172 void mAnimateCloseQuaternion(
float*
v,
float lastx,
float lasty,
float lastz,
float lastw);
173 void setAnimationPoint();
174 void resetAnimation();
175 void removeAnimationPoint();
176 void startAnimation();
177 int32_t animateCamera(
float& animateTime,
float& mixSlaveImage,
hmm_mat4& nextViewMatrix);
178 void showInfo(
const char* info);
179 void ActivateColor();
183 void SetColorClusters();
184 void SetColorInitLinks();
185 void SetColorLinks();
186 void SetColorSeeds();
187 void SetColorTracklets();
188 void SetColorTracks();
189 void SetColorExtrapolatedTracks();
190 void SetColorFinal();
192 void SetColorGridTRD();
193 void SetColorMarked();
194 void SetCollisionColor(int32_t
col);
196 void drawPointLinestrip(int32_t iSector, int32_t cid, int32_t
id, int32_t id_limit = TRACK_TYPE_ID_LIMIT);
197 vboList DrawClusters(int32_t iSector, int32_t
select, uint32_t iCol);
198 vboList DrawSpacePointsTRD(int32_t iSector, int32_t
select, int32_t iCol);
199 vboList DrawSpacePointsTOF(int32_t iSector, int32_t
select, int32_t iCol);
200 vboList DrawSpacePointsITS(int32_t iSector, int32_t
select, int32_t iCol);
201 vboList DrawLinks(
const GPUTPCTracker& tracker, int32_t
id,
bool dodown =
false);
202 vboList DrawSeeds(
const GPUTPCTracker& tracker);
203 vboList DrawTracklets(
const GPUTPCTracker& tracker);
204 vboList DrawTracks(
const GPUTPCTracker& tracker, int32_t global);
205 void DrawTrackITS(int32_t trackId, int32_t iSector);
206 GPUDisplay::vboList DrawFinalITS();
208 void DrawFinal(int32_t iSector, int32_t ,
const GPUTPCGMPropagator* prop, std::array<
vecpod<int32_t>, 2>& trackList, threadVertexBuffer& threadBuffer);
209 vboList DrawGrid(
const GPUTPCTracker& tracker);
210 vboList DrawGridTRD(int32_t sector);
211 void DoScreenshot(
const char*
filename, std::vector<char>&
pixels,
float animateTime = -1.f);
213 void createQuaternionFromMatrix(
float*
v,
const float* mat);
215 void OpenGLPrint(
const char* s,
float x,
float y,
float r,
float g,
float b,
float a,
bool fromBotton =
true);
217 GPUDisplayFrontend* mFrontend =
nullptr;
218 std::unique_ptr<GPUDisplayBackend> mBackend;
219 GPUChainTracking* mChain =
nullptr;
220 const GPUParam* mParam =
nullptr;
222 const GPUSettingsDisplay& mConfig;
223 GPUSettingsDisplayLight mCfgL;
224 GPUSettingsDisplayHeavy mCfgH;
225 GPUSettingsDisplayRenderer mCfgR;
227 qSem mSemLockDisplay;
229 bool mDrawTextInCompatMode =
false;
230 int32_t mDrawTextFontSize = 0;
232 int32_t mNDrawCalls = 0;
234 bool mUseMultiVBO =
false;
236 std::array<float, 4> mDrawColor = {1.f, 1.f, 1.f, 1.f};
238 int32_t mTestSetting = 0;
240 float mAngleRollOrigin = -1e9;
241 float mMaxClusterZ = -1;
244 float*
const mViewMatrixP = &mViewMatrix.
Elements[0][0];
251 int32_t mNCollissions = 1;
257 std::unique_ptr<float4[]> mGlobalPosPtr;
258 std::unique_ptr<float4[]> mGlobalPosPtrTRD;
259 std::unique_ptr<float4[]> mGlobalPosPtrTRD2;
260 std::unique_ptr<float4[]> mGlobalPosPtrITS;
261 std::unique_ptr<float4[]> mGlobalPosPtrTOF;
267 int32_t mNMaxClusters = 0;
268 int32_t mNMaxSpacePointsTRD = 0;
269 int32_t mNMaxClustersITS = 0;
270 int32_t mNMaxClustersTOF = 0;
271 int32_t mCurrentClusters = 0;
272 int32_t mCurrentSpacePointsTRD = 0;
273 int32_t mCurrentClustersITS = 0;
274 int32_t mCurrentClustersTOF = 0;
277 std::vector<bool> mTrackFilter;
278 bool mUpdateTrackFilter =
false;
280 int32_t mUpdateVertexLists = 1;
281 int32_t mUpdateEventData = 0;
282 int32_t mUpdateDrawCommands = 1;
283 int32_t mUpdateRenderPipeline = 0;
284 volatile int32_t mResetScene = 0;
286 int32_t mAnimate = 0;
288 int32_t mAnimationFrame = 0;
289 int32_t mAnimationLastBase = 0;
290 int32_t mAnimateScreenshot = 0;
291 int32_t mAnimationExport = 0;
292 bool mAnimationChangeConfig =
true;
293 float mAnimationDelay = 2.f;
296 opengl_spline mAnimationSplines[8];
298 int32_t mPrintInfoText = 1;
299 bool mPrintInfoTextAlways = 0;
300 char mInfoText2[1024];
303 std::vector<threadVertexBuffer> mThreadBuffers;
304 std::vector<std::vector<std::array<std::array<vecpod<int32_t>, 2>, NSECTORS>>> mThreadTracks;
305 volatile int32_t mInitResult = 0;
307 float mFPSScale = 1, mFPSScaleadjust = 0;
308 int32_t mFramesDone = 0, mFramesDoneFPS = 0;
310 vboList mGlDLLines[NSECTORS][N_LINES_TYPE];
312 vboList mGlDLFinalITS;
314 vboList mGlDLGrid[NSECTORS];
315 vboList mGlDLGridTRD[NSECTORS / 2];
317 bool mRequestScreenshot =
false;
318 std::string mScreenshotFile;
320 float mYFactor = 1.0f;