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

#include <GPUDisplayFrontend.h>

Inherits o2::gpu::GPUDisplayFrontendInterface.

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

Public Types

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

Public Member Functions

 GPUDisplayFrontend ()=default
 
 ~GPUDisplayFrontend () override
 
virtual int32_t StartDisplay ()=0
 
void DisplayExit () override=0
 
virtual void SwitchFullscreen (bool set)=0
 
virtual void ToggleMaximized (bool set)=0
 
virtual void SetVSync (bool enable)=0
 
bool EnableSendKey () override
 
virtual void OpenGLPrint (const char *s, float x, float y, float r, float g, float b, float a, bool fromBotton=true)=0
 
GPUDisplayBackendbackend ()
 
virtual void getSize (int32_t &width, int32_t &height)
 
virtual int32_t getVulkanSurface (void *instance, void *surface)
 
virtual uint32_t getReqVulkanExtensions (const char **&p)
 
int32_t getDisplayControl () const override
 
int32_t getSendKey () const override
 
int32_t getNeedUpdate () const override
 
void setDisplayControl (int32_t v) override
 
void setSendKey (int32_t v) override
 
void setNeedUpdate (int32_t v) override
 
frontendTypes frontendType () const
 
const charfrontendName () const override
 
int32_t startGUI ()
 
void stopGUI ()
 
bool isGUIRunning ()
 
- Public Member Functions inherited from o2::gpu::GPUDisplayFrontendInterface
virtual ~GPUDisplayFrontendInterface ()
 

Static Public Member Functions

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

Public Attributes

volatile int32_t mDisplayControl = 0
 
volatile int32_t mSendKey = 0
 
volatile int32_t mNeedUpdate = 0
 

Static Public Attributes

static constexpr int32_t GL_MIN_VERSION_MAJOR = 4
 
static constexpr int32_t GL_MIN_VERSION_MINOR = 5
 

Protected Member Functions

virtual int32_t FrontendMain ()=0
 
void HandleKey (uint8_t key)
 
int32_t DrawGLScene ()
 
void HandleSendKey ()
 
void ResizeScene (int32_t width, int32_t height)
 
int32_t InitDisplay (bool initFailure=false)
 
void ExitDisplay ()
 
int32_t & drawTextFontSize ()
 
- Protected Member Functions inherited from o2::gpu::GPUDisplayFrontendInterface
 GPUDisplayFrontendInterface ()
 

Static Protected Member Functions

static voidFrontendThreadWrapper (void *)
 

Protected Attributes

bool mMouseDn = false
 
bool mMouseDnR = false
 
float mMouseDnX
 
float mMouseDnY
 
float mMouseMvX
 
float mMouseMvY
 
int32_t mMouseWheel = 0
 
bool mKeys [256] = {false}
 
bool mKeysShift [256] = {false}
 
int32_t mDisplayHeight = INIT_HEIGHT
 
int32_t mDisplayWidth = INIT_WIDTH
 
int32_t mCanDrawText = 0
 
int32_t mMaxFPSRate = 0
 
GPUDisplaymDisplay = nullptr
 
GPUDisplayBackendmBackend = nullptr
 
frontendTypes mFrontendType = TYPE_INVALID
 
const charmFrontendName = nullptr
 
std::unique_ptr< GPUDisplayGUIWrappermGUI
 

Static Protected Attributes

static constexpr int32_t INIT_WIDTH = 1024
 
static constexpr int32_t INIT_HEIGHT = 768
 
static constexpr const charDISPLAY_WINDOW_NAME = "GPU CA Standalone Event Display"
 
static constexpr int32_t KEY_UP = 1
 
static constexpr int32_t KEY_DOWN = 2
 
static constexpr int32_t KEY_LEFT = 3
 
static constexpr int32_t KEY_RIGHT = 4
 
static constexpr int32_t KEY_PAGEUP = 5
 
static constexpr int32_t KEY_PAGEDOWN = 6
 
static constexpr int32_t KEY_SHIFT = 8
 
static constexpr int32_t KEY_ALT = 9
 
static constexpr int32_t KEY_RALT = 10
 
static constexpr int32_t KEY_CTRL = 11
 
static constexpr int32_t KEY_RCTRL = 12
 
static constexpr int32_t KEY_ENTER = 13
 
static constexpr int32_t KEY_F1 = 14
 
static constexpr int32_t KEY_F2 = 15
 
static constexpr int32_t KEY_F3 = 26
 
static constexpr int32_t KEY_F4 = 17
 
static constexpr int32_t KEY_F5 = 18
 
static constexpr int32_t KEY_F6 = 19
 
static constexpr int32_t KEY_F7 = 20
 
static constexpr int32_t KEY_F8 = 21
 
static constexpr int32_t KEY_F9 = 22
 
static constexpr int32_t KEY_F10 = 23
 
static constexpr int32_t KEY_F11 = 24
 
static constexpr int32_t KEY_F12 = 25
 
static constexpr int32_t KEY_INSERT = 26
 
static constexpr int32_t KEY_ESCAPE = 27
 
static constexpr int32_t KEY_HOME = 28
 
static constexpr int32_t KEY_END = 29
 
static constexpr int32_t KEY_SPACE = 32
 

Friends

class GPUDisplay
 

Detailed Description

Definition at line 29 of file GPUDisplayFrontend.h.

Member Enumeration Documentation

◆ frontendTypes

Enumerator
TYPE_INVALID 
TYPE_WIN32 
TYPE_X11 
TYPE_GLUT 
TYPE_GLFW 
TYPE_WAYLAND 

Definition at line 37 of file GPUDisplayFrontend.h.

Constructor & Destructor Documentation

◆ GPUDisplayFrontend()

o2::gpu::GPUDisplayFrontend::GPUDisplayFrontend ( )
default

◆ ~GPUDisplayFrontend()

GPUDisplayFrontend::~GPUDisplayFrontend ( )
overridedefault

Member Function Documentation

◆ backend()

GPUDisplayBackend * GPUDisplayFrontend::backend ( )

Definition at line 154 of file GPUDisplayFrontend.cxx.

◆ DisplayExit()

◆ DrawGLScene()

int32_t GPUDisplayFrontend::DrawGLScene ( )
protected

Definition at line 67 of file GPUDisplayFrontend.cxx.

◆ drawTextFontSize()

int32_t & GPUDisplayFrontend::drawTextFontSize ( )
protected

Definition at line 159 of file GPUDisplayFrontend.cxx.

◆ EnableSendKey()

bool GPUDisplayFrontend::EnableSendKey ( )
overridevirtual

Implements o2::gpu::GPUDisplayFrontendInterface.

Reimplemented in o2::gpu::GPUDisplayFrontendGlfw.

Definition at line 81 of file GPUDisplayFrontend.cxx.

◆ ExitDisplay()

void GPUDisplayFrontend::ExitDisplay ( )
protected

Definition at line 75 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 71 of file GPUDisplayFrontend.h.

◆ FrontendThreadWrapper()

void * GPUDisplayFrontend::FrontendThreadWrapper ( void ptr)
staticprotected

Definition at line 48 of file GPUDisplayFrontend.cxx.

◆ frontendType()

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

Definition at line 70 of file GPUDisplayFrontend.h.

◆ getDisplayControl()

int32_t o2::gpu::GPUDisplayFrontend::getDisplayControl ( ) const
inlineoverridevirtual

Implements o2::gpu::GPUDisplayFrontendInterface.

Definition at line 63 of file GPUDisplayFrontend.h.

◆ getFrontend()

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

Definition at line 117 of file GPUDisplayFrontend.cxx.

◆ getNeedUpdate()

int32_t o2::gpu::GPUDisplayFrontend::getNeedUpdate ( ) const
inlineoverridevirtual

Implements o2::gpu::GPUDisplayFrontendInterface.

Definition at line 65 of file GPUDisplayFrontend.h.

◆ getReqVulkanExtensions()

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

◆ getSendKey()

int32_t o2::gpu::GPUDisplayFrontend::getSendKey ( ) const
inlineoverridevirtual

Implements o2::gpu::GPUDisplayFrontendInterface.

Definition at line 64 of file GPUDisplayFrontend.h.

◆ 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

◆ HandleKey()

void GPUDisplayFrontend::HandleKey ( uint8_t  key)
protected

Definition at line 66 of file GPUDisplayFrontend.cxx.

◆ HandleSendKey()

void GPUDisplayFrontend::HandleSendKey ( )
protected

Definition at line 58 of file GPUDisplayFrontend.cxx.

◆ InitDisplay()

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

Definition at line 74 of file GPUDisplayFrontend.cxx.

◆ isGUIRunning()

bool GPUDisplayFrontend::isGUIRunning ( )

Definition at line 108 of file GPUDisplayFrontend.cxx.

◆ OpenGLPrint()

virtual void o2::gpu::GPUDisplayFrontend::OpenGLPrint ( const char s,
float  x,
float  y,
float  r,
float  g,
float  b,
float  a,
bool  fromBotton = true 
)
pure virtual

◆ ResizeScene()

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

Definition at line 68 of file GPUDisplayFrontend.cxx.

◆ setDisplayControl()

void o2::gpu::GPUDisplayFrontend::setDisplayControl ( int32_t  v)
inlineoverridevirtual

Implements o2::gpu::GPUDisplayFrontendInterface.

Definition at line 66 of file GPUDisplayFrontend.h.

◆ setNeedUpdate()

void o2::gpu::GPUDisplayFrontend::setNeedUpdate ( int32_t  v)
inlineoverridevirtual

Implements o2::gpu::GPUDisplayFrontendInterface.

Definition at line 68 of file GPUDisplayFrontend.h.

◆ setSendKey()

void o2::gpu::GPUDisplayFrontend::setSendKey ( int32_t  v)
inlineoverridevirtual

Implements o2::gpu::GPUDisplayFrontendInterface.

Definition at line 67 of file GPUDisplayFrontend.h.

◆ SetVSync()

◆ StartDisplay()

◆ startGUI()

int32_t GPUDisplayFrontend::startGUI ( )

Definition at line 92 of file GPUDisplayFrontend.cxx.

◆ stopGUI()

void GPUDisplayFrontend::stopGUI ( )

Definition at line 83 of file GPUDisplayFrontend.cxx.

◆ SwitchFullscreen()

virtual void o2::gpu::GPUDisplayFrontend::SwitchFullscreen ( bool  set)
pure virtual

◆ ToggleMaximized()

virtual void o2::gpu::GPUDisplayFrontend::ToggleMaximized ( bool  set)
pure virtual

Friends And Related Symbol Documentation

◆ GPUDisplay

friend class GPUDisplay
friend

Definition at line 31 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 87 of file GPUDisplayFrontend.h.

◆ GL_MIN_VERSION_MAJOR

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

Definition at line 47 of file GPUDisplayFrontend.h.

◆ GL_MIN_VERSION_MINOR

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

Definition at line 48 of file GPUDisplayFrontend.h.

◆ INIT_HEIGHT

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

Definition at line 86 of file GPUDisplayFrontend.h.

◆ INIT_WIDTH

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

Definition at line 86 of file GPUDisplayFrontend.h.

◆ KEY_ALT

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_ALT = 9
staticconstexprprotected

Definition at line 96 of file GPUDisplayFrontend.h.

◆ KEY_CTRL

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_CTRL = 11
staticconstexprprotected

Definition at line 98 of file GPUDisplayFrontend.h.

◆ KEY_DOWN

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_DOWN = 2
staticconstexprprotected

Definition at line 90 of file GPUDisplayFrontend.h.

◆ KEY_END

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_END = 29
staticconstexprprotected

Definition at line 116 of file GPUDisplayFrontend.h.

◆ KEY_ENTER

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_ENTER = 13
staticconstexprprotected

Definition at line 100 of file GPUDisplayFrontend.h.

◆ KEY_ESCAPE

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_ESCAPE = 27
staticconstexprprotected

Definition at line 114 of file GPUDisplayFrontend.h.

◆ KEY_F1

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_F1 = 14
staticconstexprprotected

Definition at line 101 of file GPUDisplayFrontend.h.

◆ KEY_F10

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_F10 = 23
staticconstexprprotected

Definition at line 110 of file GPUDisplayFrontend.h.

◆ KEY_F11

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_F11 = 24
staticconstexprprotected

Definition at line 111 of file GPUDisplayFrontend.h.

◆ KEY_F12

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_F12 = 25
staticconstexprprotected

Definition at line 112 of file GPUDisplayFrontend.h.

◆ KEY_F2

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_F2 = 15
staticconstexprprotected

Definition at line 102 of file GPUDisplayFrontend.h.

◆ KEY_F3

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_F3 = 26
staticconstexprprotected

Definition at line 103 of file GPUDisplayFrontend.h.

◆ KEY_F4

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_F4 = 17
staticconstexprprotected

Definition at line 104 of file GPUDisplayFrontend.h.

◆ KEY_F5

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_F5 = 18
staticconstexprprotected

Definition at line 105 of file GPUDisplayFrontend.h.

◆ KEY_F6

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_F6 = 19
staticconstexprprotected

Definition at line 106 of file GPUDisplayFrontend.h.

◆ KEY_F7

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_F7 = 20
staticconstexprprotected

Definition at line 107 of file GPUDisplayFrontend.h.

◆ KEY_F8

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_F8 = 21
staticconstexprprotected

Definition at line 108 of file GPUDisplayFrontend.h.

◆ KEY_F9

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_F9 = 22
staticconstexprprotected

Definition at line 109 of file GPUDisplayFrontend.h.

◆ KEY_HOME

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_HOME = 28
staticconstexprprotected

Definition at line 115 of file GPUDisplayFrontend.h.

◆ KEY_INSERT

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_INSERT = 26
staticconstexprprotected

Definition at line 113 of file GPUDisplayFrontend.h.

◆ KEY_LEFT

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_LEFT = 3
staticconstexprprotected

Definition at line 91 of file GPUDisplayFrontend.h.

◆ KEY_PAGEDOWN

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_PAGEDOWN = 6
staticconstexprprotected

Definition at line 94 of file GPUDisplayFrontend.h.

◆ KEY_PAGEUP

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_PAGEUP = 5
staticconstexprprotected

Definition at line 93 of file GPUDisplayFrontend.h.

◆ KEY_RALT

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_RALT = 10
staticconstexprprotected

Definition at line 97 of file GPUDisplayFrontend.h.

◆ KEY_RCTRL

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_RCTRL = 12
staticconstexprprotected

Definition at line 99 of file GPUDisplayFrontend.h.

◆ KEY_RIGHT

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_RIGHT = 4
staticconstexprprotected

Definition at line 92 of file GPUDisplayFrontend.h.

◆ KEY_SHIFT

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_SHIFT = 8
staticconstexprprotected

Definition at line 95 of file GPUDisplayFrontend.h.

◆ KEY_SPACE

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_SPACE = 32
staticconstexprprotected

Definition at line 117 of file GPUDisplayFrontend.h.

◆ KEY_UP

constexpr int32_t o2::gpu::GPUDisplayFrontend::KEY_UP = 1
staticconstexprprotected

Definition at line 89 of file GPUDisplayFrontend.h.

◆ mBackend

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

Definition at line 134 of file GPUDisplayFrontend.h.

◆ mCanDrawText

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

Definition at line 129 of file GPUDisplayFrontend.h.

◆ mDisplay

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

Definition at line 133 of file GPUDisplayFrontend.h.

◆ mDisplayControl

volatile int32_t o2::gpu::GPUDisplayFrontend::mDisplayControl = 0

Definition at line 78 of file GPUDisplayFrontend.h.

◆ mDisplayHeight

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

Definition at line 127 of file GPUDisplayFrontend.h.

◆ mDisplayWidth

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

Definition at line 128 of file GPUDisplayFrontend.h.

◆ mFrontendName

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

Definition at line 137 of file GPUDisplayFrontend.h.

◆ mFrontendType

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

Definition at line 136 of file GPUDisplayFrontend.h.

◆ mGUI

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

Definition at line 139 of file GPUDisplayFrontend.h.

◆ mKeys

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

Definition at line 125 of file GPUDisplayFrontend.h.

◆ mKeysShift

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

Definition at line 126 of file GPUDisplayFrontend.h.

◆ mMaxFPSRate

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

Definition at line 131 of file GPUDisplayFrontend.h.

◆ mMouseDn

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

Definition at line 120 of file GPUDisplayFrontend.h.

◆ mMouseDnR

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

Definition at line 121 of file GPUDisplayFrontend.h.

◆ mMouseDnX

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

Definition at line 122 of file GPUDisplayFrontend.h.

◆ mMouseDnY

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

Definition at line 122 of file GPUDisplayFrontend.h.

◆ mMouseMvX

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

Definition at line 123 of file GPUDisplayFrontend.h.

◆ mMouseMvY

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

Definition at line 123 of file GPUDisplayFrontend.h.

◆ mMouseWheel

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

Definition at line 124 of file GPUDisplayFrontend.h.

◆ mNeedUpdate

volatile int32_t o2::gpu::GPUDisplayFrontend::mNeedUpdate = 0

Definition at line 80 of file GPUDisplayFrontend.h.

◆ mSendKey

volatile int32_t o2::gpu::GPUDisplayFrontend::mSendKey = 0

Definition at line 79 of file GPUDisplayFrontend.h.


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