Project
Loading...
Searching...
No Matches
o2::gpu::GPUDisplayBackendOpenGL Class Reference

#include <GPUDisplayBackendOpenGL.h>

Inherits o2::gpu::GPUDisplayBackend.

Classes

struct  FontSymbolOpenGL
 

Public Member Functions

 GPUDisplayBackendOpenGL ()
 
 ~GPUDisplayBackendOpenGL () override=default
 
int32_t ExtInit () override
 
bool CoreProfile () override
 
uint32_t DepthBits () override
 
- Public Member Functions inherited from o2::gpu::GPUDisplayBackend
 GPUDisplayBackend ()
 
virtual ~GPUDisplayBackend ()
 
virtual void SetVSync (bool enable)
 
virtual bool backendNeedRedraw ()
 
int32_t InitBackend ()
 
void ExitBackend ()
 
backendTypes backendType () const
 
const charbackendName () const
 
std::vector< chargetPixels ()
 
virtual float getYFactor () const
 
virtual int32_t getMaxMSAA () const
 

Protected Member Functions

void createFB (GLfb &fb, bool tex, bool withDepth, bool msaa, uint32_t width, uint32_t height)
 
void deleteFB (GLfb &fb)
 
uint32_t drawVertices (const vboList &v, const drawType t) override
 
uint32_t drawField () override
 
void ActivateColor (std::array< float, 4 > &color) override
 
void setQuality () override
 
void setDepthBuffer () override
 
void setFrameBuffer (uint32_t newID=0)
 
int32_t InitBackendA () override
 
int32_t InitMagFieldVisualization ()
 
void ExitBackendA () override
 
void ExitMagFieldVisualization ()
 
void clearScreen (bool alphaOnly=false)
 
void loadDataToGPU (size_t totalVertizes) override
 
void prepareDraw (const hmm_mat4 &proj, const hmm_mat4 &view, bool requestScreenshot, bool toMixBuffer, float includeMixImage) override
 
void resizeScene (uint32_t width, uint32_t height) override
 
void updateRenderer (bool withScreenshot)
 
void ClearOffscreenBuffers ()
 
void finishDraw (bool doScreenshot, bool toMixBuffer, float includeMixImage) override
 
void finishFrame (bool doScreenshot, bool toMixBuffer, float includeMixImage) override
 
void prepareText () override
 
void finishText () override
 
void mixImages (float mixSlaveImage)
 
void pointSizeFactor (float factor) override
 
void lineWidthFactor (float factor) override
 
size_t needMultiVBO () override
 
void readImageToPixels ()
 
void addFontSymbol (int32_t symbol, int32_t sizex, int32_t sizey, int32_t offsetx, int32_t offsety, int32_t advance, void *data) override
 
void initializeTextDrawing () override
 
void OpenGLPrint (const char *s, float x, float y, float *color, float scale) override
 
- Protected Member Functions inherited from o2::gpu::GPUDisplayBackend
float getDownsampleFactor (bool screenshot=false)
 
void fillIndirectCmdBuffer ()
 
bool smoothFont ()
 

Static Protected Member Functions

static int32_t checkShaderStatus (uint32_t shader)
 
static int32_t checkProgramStatus (uint32_t program)
 

Protected Attributes

uint32_t mVertexShader
 
uint32_t mFragmentShader
 
uint32_t mVertexShaderTexture
 
uint32_t mVertexShaderPassthrough
 
uint32_t mFragmentShaderTexture
 
uint32_t mFragmentShaderText
 
uint32_t mGeometryShader
 
uint32_t mShaderProgram
 
uint32_t mShaderProgramText
 
uint32_t mShaderProgramTexture
 
uint32_t mShaderProgramField
 
uint32_t mVertexArray
 
uint32_t mIndirectId
 
std::vector< uint32_t > mVBOId
 
std::vector< FontSymbolOpenGLmFontSymbols
 
int32_t mModelViewProjId
 
int32_t mColorId
 
int32_t mModelViewProjIdTexture
 
int32_t mAlphaIdTexture
 
int32_t mModelViewProjIdText
 
int32_t mColorIdText
 
uint32_t mSPIRVModelViewBuffer
 
uint32_t mSPIRVColorBuffer
 
uint32_t mFieldModelViewBuffer
 
uint32_t mFieldModelConstantsBuffer
 
uint32_t mSolenoidSegmentsBuffer
 
uint32_t mSolenoidParameterizationBuffer
 
uint32_t mDipoleSegmentsBuffer
 
uint32_t mDipoleParameterizationBuffer
 
uint32_t VAO_text
 
uint32_t VBO_text
 
uint32_t VAO_texture
 
uint32_t VBO_texture
 
uint32_t VAO_field
 
uint32_t VBO_field
 
bool mSPIRVShaders = false
 
GLfb mMixBuffer
 
GLfb mOffscreenBufferMSAA
 
GLfb mOffscreenBuffer
 
- Protected Attributes inherited from o2::gpu::GPUDisplayBackend
GPUDisplaymDisplay = nullptr
 
std::vector< int32_t > mIndirectSectorOffset
 
vecpod< DrawArraysIndirectCommandmCmdBuffer
 
bool mFreetypeInitialized = false
 
bool mFrontendCompatTextDraw = false
 
std::vector< charmScreenshotPixels
 
int32_t mDownsampleFactor = 1
 
uint32_t mRenderWidth = 0
 
uint32_t mRenderHeight = 0
 
uint32_t mScreenWidth = 0
 
uint32_t mScreenHeight = 0
 
backendTypes mBackendType = TYPE_INVALID
 
const charmBackendName = nullptr
 
std::unique_ptr< GPUDisplayMagneticFieldmMagneticFieldVisualization
 

Additional Inherited Members

- Public Types inherited from o2::gpu::GPUDisplayBackend
enum  drawType { POINTS = 0 , LINES = 1 , LINE_STRIP = 2 }
 
enum  backendTypes { TYPE_INVALID = -1 , TYPE_OPENGL = 0 , TYPE_VULKAN = 1 }
 
typedef std::tuple< uint32_t, uint32_t, int32_t > vboList
 
- Static Public Member Functions inherited from o2::gpu::GPUDisplayBackend
static GPUDisplayBackendgetBackend (const char *type)
 

Detailed Description

Definition at line 31 of file GPUDisplayBackendOpenGL.h.

Constructor & Destructor Documentation

◆ GPUDisplayBackendOpenGL()

GPUDisplayBackendOpenGL::GPUDisplayBackendOpenGL ( )

Definition at line 821 of file GPUDisplayBackendOpenGL.cxx.

◆ ~GPUDisplayBackendOpenGL()

o2::gpu::GPUDisplayBackendOpenGL::~GPUDisplayBackendOpenGL ( )
overridedefault

Member Function Documentation

◆ ActivateColor()

void GPUDisplayBackendOpenGL::ActivateColor ( std::array< float, 4 > &  color)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 830 of file GPUDisplayBackendOpenGL.cxx.

◆ addFontSymbol()

void GPUDisplayBackendOpenGL::addFontSymbol ( int32_t  symbol,
int32_t  sizex,
int32_t  sizey,
int32_t  offsetx,
int32_t  offsety,
int32_t  advance,
void data 
)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 844 of file GPUDisplayBackendOpenGL.cxx.

◆ checkProgramStatus()

int32_t GPUDisplayBackendOpenGL::checkProgramStatus ( uint32_t  program)
staticprotected

Definition at line 825 of file GPUDisplayBackendOpenGL.cxx.

◆ checkShaderStatus()

int32_t GPUDisplayBackendOpenGL::checkShaderStatus ( uint32_t  shader)
staticprotected

Definition at line 824 of file GPUDisplayBackendOpenGL.cxx.

◆ ClearOffscreenBuffers()

void o2::gpu::GPUDisplayBackendOpenGL::ClearOffscreenBuffers ( )
protected

◆ clearScreen()

void o2::gpu::GPUDisplayBackendOpenGL::clearScreen ( bool  alphaOnly = false)
protected

◆ CoreProfile()

bool GPUDisplayBackendOpenGL::CoreProfile ( )
overridevirtual

Reimplemented from o2::gpu::GPUDisplayBackend.

Definition at line 827 of file GPUDisplayBackendOpenGL.cxx.

◆ createFB()

void o2::gpu::GPUDisplayBackendOpenGL::createFB ( GLfb fb,
bool  tex,
bool  withDepth,
bool  msaa,
uint32_t  width,
uint32_t  height 
)
protected

◆ deleteFB()

void o2::gpu::GPUDisplayBackendOpenGL::deleteFB ( GLfb fb)
protected

◆ DepthBits()

uint32_t GPUDisplayBackendOpenGL::DepthBits ( )
overridevirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 828 of file GPUDisplayBackendOpenGL.cxx.

◆ drawField()

uint32_t GPUDisplayBackendOpenGL::drawField ( )
overrideprotectedvirtual

Reimplemented from o2::gpu::GPUDisplayBackend.

Definition at line 203 of file GPUDisplayBackendOpenGLMagneticField.cxx.

◆ drawVertices()

uint32_t GPUDisplayBackendOpenGL::drawVertices ( const vboList v,
const drawType  t 
)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 829 of file GPUDisplayBackendOpenGL.cxx.

◆ ExitBackendA()

void GPUDisplayBackendOpenGL::ExitBackendA ( )
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 834 of file GPUDisplayBackendOpenGL.cxx.

◆ ExitMagFieldVisualization()

void GPUDisplayBackendOpenGL::ExitMagFieldVisualization ( )
protected

Definition at line 204 of file GPUDisplayBackendOpenGLMagneticField.cxx.

◆ ExtInit()

int32_t GPUDisplayBackendOpenGL::ExtInit ( )
overridevirtual

Reimplemented from o2::gpu::GPUDisplayBackend.

Definition at line 826 of file GPUDisplayBackendOpenGL.cxx.

◆ finishDraw()

void GPUDisplayBackendOpenGL::finishDraw ( bool  doScreenshot,
bool  toMixBuffer,
float  includeMixImage 
)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 838 of file GPUDisplayBackendOpenGL.cxx.

◆ finishFrame()

void GPUDisplayBackendOpenGL::finishFrame ( bool  doScreenshot,
bool  toMixBuffer,
float  includeMixImage 
)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 839 of file GPUDisplayBackendOpenGL.cxx.

◆ finishText()

void GPUDisplayBackendOpenGL::finishText ( )
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 841 of file GPUDisplayBackendOpenGL.cxx.

◆ InitBackendA()

int32_t GPUDisplayBackendOpenGL::InitBackendA ( )
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 833 of file GPUDisplayBackendOpenGL.cxx.

◆ initializeTextDrawing()

void GPUDisplayBackendOpenGL::initializeTextDrawing ( )
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 845 of file GPUDisplayBackendOpenGL.cxx.

◆ InitMagFieldVisualization()

int32_t GPUDisplayBackendOpenGL::InitMagFieldVisualization ( )
protected

Definition at line 199 of file GPUDisplayBackendOpenGLMagneticField.cxx.

◆ lineWidthFactor()

void GPUDisplayBackendOpenGL::lineWidthFactor ( float  factor)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 843 of file GPUDisplayBackendOpenGL.cxx.

◆ loadDataToGPU()

void GPUDisplayBackendOpenGL::loadDataToGPU ( size_t  totalVertizes)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 835 of file GPUDisplayBackendOpenGL.cxx.

◆ mixImages()

void o2::gpu::GPUDisplayBackendOpenGL::mixImages ( float  mixSlaveImage)
protected

◆ needMultiVBO()

size_t o2::gpu::GPUDisplayBackendOpenGL::needMultiVBO ( )
inlineoverrideprotectedvirtual

Reimplemented from o2::gpu::GPUDisplayBackend.

Definition at line 69 of file GPUDisplayBackendOpenGL.h.

◆ OpenGLPrint()

void GPUDisplayBackendOpenGL::OpenGLPrint ( const char s,
float  x,
float  y,
float *  color,
float  scale 
)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 846 of file GPUDisplayBackendOpenGL.cxx.

◆ pointSizeFactor()

void GPUDisplayBackendOpenGL::pointSizeFactor ( float  factor)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 842 of file GPUDisplayBackendOpenGL.cxx.

◆ prepareDraw()

void GPUDisplayBackendOpenGL::prepareDraw ( const hmm_mat4 proj,
const hmm_mat4 view,
bool  requestScreenshot,
bool  toMixBuffer,
float  includeMixImage 
)
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 836 of file GPUDisplayBackendOpenGL.cxx.

◆ prepareText()

void GPUDisplayBackendOpenGL::prepareText ( )
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 840 of file GPUDisplayBackendOpenGL.cxx.

◆ readImageToPixels()

void o2::gpu::GPUDisplayBackendOpenGL::readImageToPixels ( )
protected

◆ resizeScene()

void GPUDisplayBackendOpenGL::resizeScene ( uint32_t  width,
uint32_t  height 
)
overrideprotectedvirtual

Reimplemented from o2::gpu::GPUDisplayBackend.

Definition at line 837 of file GPUDisplayBackendOpenGL.cxx.

◆ setDepthBuffer()

void GPUDisplayBackendOpenGL::setDepthBuffer ( )
overrideprotectedvirtual

Implements o2::gpu::GPUDisplayBackend.

Definition at line 832 of file GPUDisplayBackendOpenGL.cxx.

◆ setFrameBuffer()

void o2::gpu::GPUDisplayBackendOpenGL::setFrameBuffer ( uint32_t  newID = 0)
protected

◆ setQuality()

void GPUDisplayBackendOpenGL::setQuality ( )
overrideprotectedvirtual

Reimplemented from o2::gpu::GPUDisplayBackend.

Definition at line 831 of file GPUDisplayBackendOpenGL.cxx.

◆ updateRenderer()

void o2::gpu::GPUDisplayBackendOpenGL::updateRenderer ( bool  withScreenshot)
protected

Member Data Documentation

◆ mAlphaIdTexture

int32_t o2::gpu::GPUDisplayBackendOpenGL::mAlphaIdTexture
protected

Definition at line 99 of file GPUDisplayBackendOpenGL.h.

◆ mColorId

int32_t o2::gpu::GPUDisplayBackendOpenGL::mColorId
protected

Definition at line 97 of file GPUDisplayBackendOpenGL.h.

◆ mColorIdText

int32_t o2::gpu::GPUDisplayBackendOpenGL::mColorIdText
protected

Definition at line 101 of file GPUDisplayBackendOpenGL.h.

◆ mDipoleParameterizationBuffer

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mDipoleParameterizationBuffer
protected

Definition at line 110 of file GPUDisplayBackendOpenGL.h.

◆ mDipoleSegmentsBuffer

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mDipoleSegmentsBuffer
protected

Definition at line 109 of file GPUDisplayBackendOpenGL.h.

◆ mFieldModelConstantsBuffer

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mFieldModelConstantsBuffer
protected

Definition at line 106 of file GPUDisplayBackendOpenGL.h.

◆ mFieldModelViewBuffer

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mFieldModelViewBuffer
protected

Definition at line 105 of file GPUDisplayBackendOpenGL.h.

◆ mFontSymbols

std::vector<FontSymbolOpenGL> o2::gpu::GPUDisplayBackendOpenGL::mFontSymbols
protected

Definition at line 95 of file GPUDisplayBackendOpenGL.h.

◆ mFragmentShader

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mFragmentShader
protected

Definition at line 81 of file GPUDisplayBackendOpenGL.h.

◆ mFragmentShaderText

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mFragmentShaderText
protected

Definition at line 85 of file GPUDisplayBackendOpenGL.h.

◆ mFragmentShaderTexture

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mFragmentShaderTexture
protected

Definition at line 84 of file GPUDisplayBackendOpenGL.h.

◆ mGeometryShader

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mGeometryShader
protected

Definition at line 86 of file GPUDisplayBackendOpenGL.h.

◆ mIndirectId

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mIndirectId
protected

Definition at line 93 of file GPUDisplayBackendOpenGL.h.

◆ mMixBuffer

GLfb o2::gpu::GPUDisplayBackendOpenGL::mMixBuffer
protected

Definition at line 120 of file GPUDisplayBackendOpenGL.h.

◆ mModelViewProjId

int32_t o2::gpu::GPUDisplayBackendOpenGL::mModelViewProjId
protected

Definition at line 96 of file GPUDisplayBackendOpenGL.h.

◆ mModelViewProjIdText

int32_t o2::gpu::GPUDisplayBackendOpenGL::mModelViewProjIdText
protected

Definition at line 100 of file GPUDisplayBackendOpenGL.h.

◆ mModelViewProjIdTexture

int32_t o2::gpu::GPUDisplayBackendOpenGL::mModelViewProjIdTexture
protected

Definition at line 98 of file GPUDisplayBackendOpenGL.h.

◆ mOffscreenBuffer

GLfb o2::gpu::GPUDisplayBackendOpenGL::mOffscreenBuffer
protected

Definition at line 121 of file GPUDisplayBackendOpenGL.h.

◆ mOffscreenBufferMSAA

GLfb o2::gpu::GPUDisplayBackendOpenGL::mOffscreenBufferMSAA
protected

Definition at line 121 of file GPUDisplayBackendOpenGL.h.

◆ mShaderProgram

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mShaderProgram
protected

Definition at line 87 of file GPUDisplayBackendOpenGL.h.

◆ mShaderProgramField

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mShaderProgramField
protected

Definition at line 90 of file GPUDisplayBackendOpenGL.h.

◆ mShaderProgramText

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mShaderProgramText
protected

Definition at line 88 of file GPUDisplayBackendOpenGL.h.

◆ mShaderProgramTexture

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mShaderProgramTexture
protected

Definition at line 89 of file GPUDisplayBackendOpenGL.h.

◆ mSolenoidParameterizationBuffer

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mSolenoidParameterizationBuffer
protected

Definition at line 108 of file GPUDisplayBackendOpenGL.h.

◆ mSolenoidSegmentsBuffer

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mSolenoidSegmentsBuffer
protected

Definition at line 107 of file GPUDisplayBackendOpenGL.h.

◆ mSPIRVColorBuffer

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mSPIRVColorBuffer
protected

Definition at line 103 of file GPUDisplayBackendOpenGL.h.

◆ mSPIRVModelViewBuffer

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mSPIRVModelViewBuffer
protected

Definition at line 102 of file GPUDisplayBackendOpenGL.h.

◆ mSPIRVShaders

bool o2::gpu::GPUDisplayBackendOpenGL::mSPIRVShaders = false
protected

Definition at line 118 of file GPUDisplayBackendOpenGL.h.

◆ mVBOId

std::vector<uint32_t> o2::gpu::GPUDisplayBackendOpenGL::mVBOId
protected

Definition at line 94 of file GPUDisplayBackendOpenGL.h.

◆ mVertexArray

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mVertexArray
protected

Definition at line 91 of file GPUDisplayBackendOpenGL.h.

◆ mVertexShader

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mVertexShader
protected

Definition at line 80 of file GPUDisplayBackendOpenGL.h.

◆ mVertexShaderPassthrough

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mVertexShaderPassthrough
protected

Definition at line 83 of file GPUDisplayBackendOpenGL.h.

◆ mVertexShaderTexture

uint32_t o2::gpu::GPUDisplayBackendOpenGL::mVertexShaderTexture
protected

Definition at line 82 of file GPUDisplayBackendOpenGL.h.

◆ VAO_field

uint32_t o2::gpu::GPUDisplayBackendOpenGL::VAO_field
protected

Definition at line 116 of file GPUDisplayBackendOpenGL.h.

◆ VAO_text

uint32_t o2::gpu::GPUDisplayBackendOpenGL::VAO_text
protected

Definition at line 112 of file GPUDisplayBackendOpenGL.h.

◆ VAO_texture

uint32_t o2::gpu::GPUDisplayBackendOpenGL::VAO_texture
protected

Definition at line 114 of file GPUDisplayBackendOpenGL.h.

◆ VBO_field

uint32_t o2::gpu::GPUDisplayBackendOpenGL::VBO_field
protected

Definition at line 116 of file GPUDisplayBackendOpenGL.h.

◆ VBO_text

uint32_t o2::gpu::GPUDisplayBackendOpenGL::VBO_text
protected

Definition at line 112 of file GPUDisplayBackendOpenGL.h.

◆ VBO_texture

uint32_t o2::gpu::GPUDisplayBackendOpenGL::VBO_texture
protected

Definition at line 114 of file GPUDisplayBackendOpenGL.h.


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