Project
Loading...
Searching...
No Matches
GPUDisplayLoader.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14
15#include "GPUDisplay.h"
17#include "GPUDisplayInterface.h"
18
19#include <cstring>
20#include <tuple>
21#include <stdexcept>
22
23using namespace o2::gpu;
24
25namespace o2::gpu
26{
27
28extern "C" void* GPUTrackingDisplayLoader(const char*, void*);
29
30namespace internal
31{
32namespace
33{
34template <class T, typename... Args>
35static inline T* createHelper(Args... args)
36{
37 return new T(args...);
38}
39} // anonymous namespace
40} // namespace internal
41
42void* GPUTrackingDisplayLoader(const char* type, void* args)
43{
44 if (strcmp(type, "display") == 0) {
45 auto x = (std::tuple<GPUDisplayFrontend*, GPUChainTracking*, GPUQA*, const GPUParam*, const GPUCalibObjectsConst*, const GPUSettingsDisplay*, const GPUSettingsProcessing*>*)args;
46 return std::apply([](auto&&... y) { return internal::createHelper<GPUDisplay>(y...); }, *x);
47 } else if (strcmp(type, "frontend") == 0) {
48 auto x = (std::tuple<const char*>*)args;
49 return std::apply([](auto&&... y) { return GPUDisplayFrontend::getFrontend(y...); }, *x);
50 } else {
51 throw std::runtime_error("Invalid display obejct type specified");
52 }
53 return nullptr;
54}
55
56} // namespace o2::gpu
configStandalone Light OpenGL display display_light Apply smoothing to points Enable Z buffer Highlight links Highlight seeds Highlight sector tracks Highlight final tracks Show individual Show related Highlight grid Show only individual collision Color clusters belonging to track objects Set line Enable drawing TPC data Enable drawing TOF data Enable drawing magnetic field Set field line step count Invert colors configStandalone Heavy OpenGL display display_heavy Show tracks with ITS contribution Show tracks with TOF contribution Enable propagation of loopers Show clusters at nominal x of pad row for early transformed data Split CE tracks when they cross the central Mark clusters Mark adjacent clusters Hide rejected tracks Apply filter on tracks to be displayed Separate increase X h configStandalone Camera window renderer OpenGL display display_camera Orient the camera such that the y axis is always upwards Full Screen MultiSample Anti Downsampling Anti Enable Vertical Sync Target frame or if the backend cannot limit to the refresh Use OpenGL indirect draws to reduce number of draw calls Display h configStandalone Vulkan display display_vulkan Have uniform buffers in host accessible device memory h internal
static GPUDisplayFrontend * getFrontend(const char *type)
GLint GLenum GLint x
Definition glcorearb.h:403
GLint y
Definition glcorearb.h:270
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
void * GPUTrackingDisplayLoader(const char *, void *)