Project
Loading...
Searching...
No Matches
o2::gpu::GPUDisplayFrontend Class Referenceabstract

#include <GPUDisplayFrontend.h>

Inherits o2::gpu::GPUDisplayFrontendInterface, and o2::gpu::GPUDisplayFrontendKeyVars.

Inherited by o2::gpu::GPUDisplayFrontendGlfw, o2::gpu::GPUDisplayFrontendGlut, o2::gpu::GPUDisplayFrontendNone, o2::gpu::GPUDisplayFrontendWayland, o2::gpu::GPUDisplayFrontendWindows, and o2::gpu::GPUDisplayFrontendX11.

Classes

struct  configRTTIExt
 
struct  GPUDisplayConfiguration
 

Public Types

enum  frontendTypes {
  TYPE_INVALID = -1 , TYPE_WIN32 = 0 , TYPE_X11 = 1 , TYPE_GLUT = 2 ,
  TYPE_GLFW = 3 , TYPE_WAYLAND = 4 , TYPE_NONE = 5
}
 

Public Member Functions

 GPUDisplayFrontend ()
 
 ~GPUDisplayFrontend () override
 
int32_t StartDisplay ()
 
void StopDisplay () override
 
virtual void SwitchFullscreen (bool set)=0
 
virtual void ToggleMaximized (bool set)=0
 
virtual void SetVSync (bool enable)=0
 
virtual bool canSetVSync ()
 
GPUDisplayBackend * backend ()
 
virtual void getSize (int32_t &width, int32_t &height)
 
virtual float getRefreshRate ()
 
virtual float getDisplayScale () const
 
virtual int32_t getVulkanSurface (void *instance, void *surface)
 
virtual uint32_t getReqVulkanExtensions (const char **&p)
 
int32_t getDisplayControl () const override
 
void setDisplayControl (int32_t v) override
 
void sendExternalGUIKey (int32_t v, uint32_t translationMode=0, uint64_t extendedKey=0) override
 
frontendTypes frontendType () const
 
const char * frontendName () const override
 
int32_t startGUI ()
 
void stopGUI ()
 
bool isGUIRunning ()
 
- Public Member Functions inherited from o2::gpu::GPUDisplayFrontendInterface
virtual ~GPUDisplayFrontendInterface ()
 

Static Public Member Functions

static GPUDisplayFrontend * getFrontend (const char *type)
 
- Static Public Member Functions inherited from o2::gpu::GPUDisplayFrontendInterface
static GPUDisplayFrontendInterface * getFrontend (const char *type)
 

Static Public Attributes

static constexpr int32_t GL_MIN_VERSION_MAJOR = 4
 
static constexpr int32_t GL_MIN_VERSION_MINOR = 6
 

Protected Member Functions

virtual int32_t FrontendMain ()=0
 
virtual void StopDisplayA ()
 
void FrontendThreadWrapper ()
 
void waitForFPSLimit ()
 
void signalConfigUpdate ()
 
int32_t HandleUpdatesAndDrawGLScene (bool suspended=false)
 
void HandleKey (uint8_t key)
 
bool consoleShown () const
 
bool keyMapDown (uint32_t id) const
 
void HandleExternalGUISignals ()
 
bool processKeyLambda (uint32_t key)
 
uint32_t shiftedKey (uint32_t key) const
 
void showConfigInfo (uint32_t index)
 
void ResizeScene (int32_t width, int32_t height)
 
int32_t InitDisplay (bool initFailure=false)
 
void ExitDisplay ()
 
int32_t & drawTextFontSize ()
 
bool vsyncEnabled () const
 
void setWindowState (bool fullScreen, bool maximized)
 
void focusLost ()
 
void applyInitialWindowState ()
 
void requestFullScreen (bool set)
 
void requestMaximized (bool set)
 
- Protected Member Functions inherited from o2::gpu::GPUDisplayFrontendInterface
 GPUDisplayFrontendInterface ()
 

Protected Attributes

std::mutex mExternalGUIKeyMutex
 
std::vector< int32_t > mExternalGUIKeys
 
std::mutex mConfigUpdateMutex
 
std::condition_variable mConfigUpdateCV
 
bool mConfigUpdatePending = false
 
std::mutex mExitStateMutex
 
std::condition_variable mDisplayStoppedCV
 
std::condition_variable mInitCV
 
std::thread mFrontendThread
 
bool mStartDisplayDone = false
 
bool mStartupScriptDone = false
 
std::array< uint8_t, KEY_MAP_MAX > mKeyDownMap = {}
 
bool mMouseDn = false
 
bool mMouseDnR = false
 
bool mMouseDnM = false
 
float mMouseDnX
 
float mMouseDnY
 
float mMouseMvX
 
float mMouseMvY
 
int32_t mMouseWheel = 0
 
bool mKeys [256] = {false}
 
int32_t mDisplayHeight = INIT_HEIGHT
 
int32_t mDisplayWidth = INIT_WIDTH
 
std::chrono::steady_clock::time_point mNextFrameTime
 
GPUDisplay * mDisplay = nullptr
 
GPUDisplayBackend * mBackend = nullptr
 
frontendTypes mFrontendType = TYPE_INVALID
 
const char * mFrontendName = nullptr
 
std::atomic< bool > mDisplayRunning = false
 
std::unique_ptr< GPUDisplayGUIChannel > mGUIChannel
 
std::unique_ptr< GPUDisplayGUIWrapper > mGUI
 

Static Protected Attributes

static constexpr int32_t INIT_WIDTH = 1024
 
static constexpr int32_t INIT_HEIGHT = 768
 
static constexpr int32_t MIN_WIDTH = 200
 
static constexpr int32_t MIN_HEIGHT = 150
 
static constexpr const char * DISPLAY_WINDOW_NAME = "GPU CA Standalone Event Display"
 
static constexpr uint32_t N_SPECIAL_KEYS = 32
 
static constexpr uint32_t SPECIAL_KEYS_SHIFTED = 255
 
static constexpr uint32_t N_TOTAL_KEYS = 256 + N_SPECIAL_KEYS
 

Friends

class GPUDisplay
 

Detailed Description

Definition at line 42 of file GPUDisplayFrontend.h.

Member Enumeration Documentation

◆ frontendTypes

Enumerator
TYPE_INVALID 
TYPE_WIN32 
TYPE_X11 
TYPE_GLUT 
TYPE_GLFW 
TYPE_WAYLAND 
TYPE_NONE 

Definition at line 50 of file GPUDisplayFrontend.h.

Constructor & Destructor Documentation

◆ GPUDisplayFrontend()

GPUDisplayFrontend::GPUDisplayFrontend ( )

Definition at line 63 of file GPUDisplayFrontend.cxx.

◆ ~GPUDisplayFrontend()

GPUDisplayFrontend::~GPUDisplayFrontend ( )
override

Definition at line 64 of file GPUDisplayFrontend.cxx.

Member Function Documentation

◆ applyInitialWindowState()

void GPUDisplayFrontend::applyInitialWindowState ( )
protected

Definition at line 343 of file GPUDisplayFrontend.cxx.

◆ backend()

GPUDisplayBackend * GPUDisplayFrontend::backend ( )

Definition at line 312 of file GPUDisplayFrontend.cxx.

◆ canSetVSync()

virtual bool o2::gpu::GPUDisplayFrontend::canSetVSync ( )
inlinevirtual

Reimplemented in o2::gpu::GPUDisplayFrontendGlfw, and o2::gpu::GPUDisplayFrontendGlut.

Definition at line 69 of file GPUDisplayFrontend.h.

◆ consoleShown()

bool GPUDisplayFrontend::consoleShown ( ) const
protected

Definition at line 187 of file GPUDisplayFrontend.cxx.

◆ drawTextFontSize()

int32_t & GPUDisplayFrontend::drawTextFontSize ( )
protected

Definition at line 357 of file GPUDisplayFrontend.cxx.

◆ ExitDisplay()

void GPUDisplayFrontend::ExitDisplay ( )
protected

Definition at line 217 of file GPUDisplayFrontend.cxx.

◆ focusLost()

void GPUDisplayFrontend::focusLost ( )
protected

Definition at line 337 of file GPUDisplayFrontend.cxx.

◆ FrontendMain()

virtual int32_t o2::gpu::GPUDisplayFrontend::FrontendMain ( )
protectedpure virtual

◆ frontendName()

const char * o2::gpu::GPUDisplayFrontend::frontendName ( ) const
inlineoverridevirtual

Implements o2::gpu::GPUDisplayFrontendInterface.

Definition at line 83 of file GPUDisplayFrontend.h.

◆ FrontendThreadWrapper()

void GPUDisplayFrontend::FrontendThreadWrapper ( )
protected

Definition at line 71 of file GPUDisplayFrontend.cxx.

◆ frontendType()

frontendTypes o2::gpu::GPUDisplayFrontend::frontendType ( ) const
inline

Definition at line 82 of file GPUDisplayFrontend.h.

◆ getDisplayControl()

int32_t GPUDisplayFrontend::getDisplayControl ( ) const
overridevirtual

Implements o2::gpu::GPUDisplayFrontendInterface.

Definition at line 190 of file GPUDisplayFrontend.cxx.

◆ getDisplayScale()

virtual float o2::gpu::GPUDisplayFrontend::getDisplayScale ( ) const
inlinevirtual

◆ getFrontend()

GPUDisplayFrontend * GPUDisplayFrontend::getFrontend ( const char *  type)
static

Definition at line 273 of file GPUDisplayFrontend.cxx.

◆ getRefreshRate()

virtual float o2::gpu::GPUDisplayFrontend::getRefreshRate ( )
inlinevirtual

◆ getReqVulkanExtensions()

virtual uint32_t o2::gpu::GPUDisplayFrontend::getReqVulkanExtensions ( const char **&  p)
inlinevirtual

◆ getSize()

virtual void o2::gpu::GPUDisplayFrontend::getSize ( int32_t &  width,
int32_t &  height 
)
inlinevirtual

◆ getVulkanSurface()

virtual int32_t o2::gpu::GPUDisplayFrontend::getVulkanSurface ( void *  instance,
void *  surface 
)
inlinevirtual

◆ HandleExternalGUISignals()

void GPUDisplayFrontend::HandleExternalGUISignals ( )
protected

Definition at line 119 of file GPUDisplayFrontend.cxx.

◆ HandleKey()

void GPUDisplayFrontend::HandleKey ( uint8_t  key)
protected

Definition at line 193 of file GPUDisplayFrontend.cxx.

◆ HandleUpdatesAndDrawGLScene()

int32_t GPUDisplayFrontend::HandleUpdatesAndDrawGLScene ( bool  suspended = false)
protected

Definition at line 194 of file GPUDisplayFrontend.cxx.

◆ InitDisplay()

int32_t GPUDisplayFrontend::InitDisplay ( bool  initFailure = false)
protected

Definition at line 216 of file GPUDisplayFrontend.cxx.

◆ isGUIRunning()

bool GPUDisplayFrontend::isGUIRunning ( )

Definition at line 264 of file GPUDisplayFrontend.cxx.

◆ keyMapDown()

bool GPUDisplayFrontend::keyMapDown ( uint32_t  id) const
protected

Definition at line 188 of file GPUDisplayFrontend.cxx.

◆ processKeyLambda()

bool GPUDisplayFrontend::processKeyLambda ( uint32_t  key)
protected

Definition at line 726 of file GPUDisplayFrontendConfig.cxx.

◆ requestFullScreen()

void GPUDisplayFrontend::requestFullScreen ( bool  set)
protected

Definition at line 323 of file GPUDisplayFrontend.cxx.

◆ requestMaximized()

void GPUDisplayFrontend::requestMaximized ( bool  set)
protected

Definition at line 330 of file GPUDisplayFrontend.cxx.

◆ ResizeScene()

void GPUDisplayFrontend::ResizeScene ( int32_t  width,
int32_t  height 
)
protected

Definition at line 210 of file GPUDisplayFrontend.cxx.

◆ sendExternalGUIKey()

void GPUDisplayFrontend::sendExternalGUIKey ( int32_t  v,
uint32_t  translationMode = 0,
uint64_t  extendedKey = 0 
)
overridevirtual

Implements o2::gpu::GPUDisplayFrontendInterface.

Definition at line 175 of file GPUDisplayFrontend.cxx.

◆ setDisplayControl()

void GPUDisplayFrontend::setDisplayControl ( int32_t  v)
overridevirtual

Implements o2::gpu::GPUDisplayFrontendInterface.

Definition at line 191 of file GPUDisplayFrontend.cxx.

◆ SetVSync()

◆ setWindowState()

void GPUDisplayFrontend::setWindowState ( bool  fullScreen,
bool  maximized 
)
protected

Definition at line 317 of file GPUDisplayFrontend.cxx.

◆ shiftedKey()

uint32_t GPUDisplayFrontend::shiftedKey ( uint32_t  key) const
protected

Definition at line 724 of file GPUDisplayFrontendConfig.cxx.

◆ showConfigInfo()

void GPUDisplayFrontend::showConfigInfo ( uint32_t  index)
protected

Definition at line 741 of file GPUDisplayFrontendConfig.cxx.

◆ signalConfigUpdate()

void GPUDisplayFrontend::signalConfigUpdate ( )
protected

Definition at line 110 of file GPUDisplayFrontend.cxx.

◆ StartDisplay()

int32_t GPUDisplayFrontend::StartDisplay ( )

Definition at line 362 of file GPUDisplayFrontend.cxx.

◆ startGUI()

int32_t GPUDisplayFrontend::startGUI ( )

Definition at line 233 of file GPUDisplayFrontend.cxx.

◆ StopDisplay()

void GPUDisplayFrontend::StopDisplay ( )
overridevirtual

Implements o2::gpu::GPUDisplayFrontendInterface.

Definition at line 377 of file GPUDisplayFrontend.cxx.

◆ StopDisplayA()

void GPUDisplayFrontend::StopDisplayA ( )
protectedvirtual

◆ stopGUI()

void GPUDisplayFrontend::stopGUI ( )

Definition at line 224 of file GPUDisplayFrontend.cxx.

◆ SwitchFullscreen()

◆ ToggleMaximized()

◆ vsyncEnabled()

bool GPUDisplayFrontend::vsyncEnabled ( ) const
protected

Definition at line 352 of file GPUDisplayFrontend.cxx.

◆ waitForFPSLimit()

void GPUDisplayFrontend::waitForFPSLimit ( )
protected

Definition at line 93 of file GPUDisplayFrontend.cxx.

Friends And Related Symbol Documentation

◆ GPUDisplay

friend class GPUDisplay
friend

Definition at line 44 of file GPUDisplayFrontend.h.

Member Data Documentation

◆ DISPLAY_WINDOW_NAME

constexpr const char* o2::gpu::GPUDisplayFrontend::DISPLAY_WINDOW_NAME = "GPU CA Standalone Event Display"
staticconstexprprotected

Definition at line 98 of file GPUDisplayFrontend.h.

◆ GL_MIN_VERSION_MAJOR

constexpr int32_t o2::gpu::GPUDisplayFrontend::GL_MIN_VERSION_MAJOR = 4
staticconstexpr

Definition at line 61 of file GPUDisplayFrontend.h.

◆ GL_MIN_VERSION_MINOR

constexpr int32_t o2::gpu::GPUDisplayFrontend::GL_MIN_VERSION_MINOR = 6
staticconstexpr

Definition at line 62 of file GPUDisplayFrontend.h.

◆ INIT_HEIGHT

constexpr int32_t o2::gpu::GPUDisplayFrontend::INIT_HEIGHT = 768
staticprotected

Definition at line 96 of file GPUDisplayFrontend.h.

◆ INIT_WIDTH

constexpr int32_t o2::gpu::GPUDisplayFrontend::INIT_WIDTH = 1024
staticconstexprprotected

Definition at line 96 of file GPUDisplayFrontend.h.

◆ mBackend

GPUDisplayBackend* o2::gpu::GPUDisplayFrontend::mBackend = nullptr
protected

Definition at line 130 of file GPUDisplayFrontend.h.

◆ mConfigUpdateCV

std::condition_variable o2::gpu::GPUDisplayFrontend::mConfigUpdateCV
protected

Definition at line 106 of file GPUDisplayFrontend.h.

◆ mConfigUpdateMutex

std::mutex o2::gpu::GPUDisplayFrontend::mConfigUpdateMutex
protected

Definition at line 105 of file GPUDisplayFrontend.h.

◆ mConfigUpdatePending

bool o2::gpu::GPUDisplayFrontend::mConfigUpdatePending = false
protected

Definition at line 107 of file GPUDisplayFrontend.h.

◆ mDisplay

GPUDisplay* o2::gpu::GPUDisplayFrontend::mDisplay = nullptr
protected

Definition at line 129 of file GPUDisplayFrontend.h.

◆ mDisplayHeight

int32_t o2::gpu::GPUDisplayFrontend::mDisplayHeight = INIT_HEIGHT
protected

Definition at line 124 of file GPUDisplayFrontend.h.

◆ mDisplayRunning

std::atomic<bool> o2::gpu::GPUDisplayFrontend::mDisplayRunning = false
protected

Definition at line 134 of file GPUDisplayFrontend.h.

◆ mDisplayStoppedCV

std::condition_variable o2::gpu::GPUDisplayFrontend::mDisplayStoppedCV
protected

Definition at line 109 of file GPUDisplayFrontend.h.

◆ mDisplayWidth

int32_t o2::gpu::GPUDisplayFrontend::mDisplayWidth = INIT_WIDTH
protected

Definition at line 125 of file GPUDisplayFrontend.h.

◆ mExitStateMutex

std::mutex o2::gpu::GPUDisplayFrontend::mExitStateMutex
protected

Definition at line 108 of file GPUDisplayFrontend.h.

◆ mExternalGUIKeyMutex

std::mutex o2::gpu::GPUDisplayFrontend::mExternalGUIKeyMutex
protected

Definition at line 103 of file GPUDisplayFrontend.h.

◆ mExternalGUIKeys

std::vector<int32_t> o2::gpu::GPUDisplayFrontend::mExternalGUIKeys
protected

Definition at line 104 of file GPUDisplayFrontend.h.

◆ mFrontendName

const char* o2::gpu::GPUDisplayFrontend::mFrontendName = nullptr
protected

Definition at line 133 of file GPUDisplayFrontend.h.

◆ mFrontendThread

std::thread o2::gpu::GPUDisplayFrontend::mFrontendThread
protected

Definition at line 111 of file GPUDisplayFrontend.h.

◆ mFrontendType

frontendTypes o2::gpu::GPUDisplayFrontend::mFrontendType = TYPE_INVALID
protected

Definition at line 132 of file GPUDisplayFrontend.h.

◆ mGUI

std::unique_ptr<GPUDisplayGUIWrapper> o2::gpu::GPUDisplayFrontend::mGUI
protected

Definition at line 137 of file GPUDisplayFrontend.h.

◆ mGUIChannel

std::unique_ptr<GPUDisplayGUIChannel> o2::gpu::GPUDisplayFrontend::mGUIChannel
protected

Definition at line 136 of file GPUDisplayFrontend.h.

◆ MIN_HEIGHT

constexpr int32_t o2::gpu::GPUDisplayFrontend::MIN_HEIGHT = 150
staticprotected

Definition at line 97 of file GPUDisplayFrontend.h.

◆ MIN_WIDTH

constexpr int32_t o2::gpu::GPUDisplayFrontend::MIN_WIDTH = 200
staticconstexprprotected

Definition at line 97 of file GPUDisplayFrontend.h.

◆ mInitCV

std::condition_variable o2::gpu::GPUDisplayFrontend::mInitCV
protected

Definition at line 110 of file GPUDisplayFrontend.h.

◆ mKeyDownMap

std::array<uint8_t, KEY_MAP_MAX> o2::gpu::GPUDisplayFrontend::mKeyDownMap = {}
protected

Definition at line 114 of file GPUDisplayFrontend.h.

◆ mKeys

bool o2::gpu::GPUDisplayFrontend::mKeys[256] = {false}
protected

Definition at line 123 of file GPUDisplayFrontend.h.

◆ mMouseDn

bool o2::gpu::GPUDisplayFrontend::mMouseDn = false
protected

Definition at line 117 of file GPUDisplayFrontend.h.

◆ mMouseDnM

bool o2::gpu::GPUDisplayFrontend::mMouseDnM = false
protected

Definition at line 119 of file GPUDisplayFrontend.h.

◆ mMouseDnR

bool o2::gpu::GPUDisplayFrontend::mMouseDnR = false
protected

Definition at line 118 of file GPUDisplayFrontend.h.

◆ mMouseDnX

float o2::gpu::GPUDisplayFrontend::mMouseDnX
protected

Definition at line 120 of file GPUDisplayFrontend.h.

◆ mMouseDnY

float o2::gpu::GPUDisplayFrontend::mMouseDnY
protected

Definition at line 120 of file GPUDisplayFrontend.h.

◆ mMouseMvX

float o2::gpu::GPUDisplayFrontend::mMouseMvX
protected

Definition at line 121 of file GPUDisplayFrontend.h.

◆ mMouseMvY

float o2::gpu::GPUDisplayFrontend::mMouseMvY
protected

Definition at line 121 of file GPUDisplayFrontend.h.

◆ mMouseWheel

int32_t o2::gpu::GPUDisplayFrontend::mMouseWheel = 0
protected

Definition at line 122 of file GPUDisplayFrontend.h.

◆ mNextFrameTime

std::chrono::steady_clock::time_point o2::gpu::GPUDisplayFrontend::mNextFrameTime
protected

Definition at line 127 of file GPUDisplayFrontend.h.

◆ mStartDisplayDone

bool o2::gpu::GPUDisplayFrontend::mStartDisplayDone = false
protected

Definition at line 112 of file GPUDisplayFrontend.h.

◆ mStartupScriptDone

bool o2::gpu::GPUDisplayFrontend::mStartupScriptDone = false
protected

Definition at line 113 of file GPUDisplayFrontend.h.

◆ N_SPECIAL_KEYS

constexpr uint32_t o2::gpu::GPUDisplayFrontend::N_SPECIAL_KEYS = 32
staticconstexprprotected

Definition at line 99 of file GPUDisplayFrontend.h.

◆ N_TOTAL_KEYS

constexpr uint32_t o2::gpu::GPUDisplayFrontend::N_TOTAL_KEYS = 256 + N_SPECIAL_KEYS
staticconstexprprotected

Definition at line 101 of file GPUDisplayFrontend.h.

◆ SPECIAL_KEYS_SHIFTED

constexpr uint32_t o2::gpu::GPUDisplayFrontend::SPECIAL_KEYS_SHIFTED = 255
staticconstexprprotected

Definition at line 100 of file GPUDisplayFrontend.h.


The documentation for this class was generated from the following files: