vdr-plugin-softhddevice-drm-gles 1.6.2
OSD

Dummy OSD. More...

Classes

class  cDummyPixmap
 Dummy Pixmap for Skins. More...
 
class  cDummyOsd
 Dummy OSD. More...
 
struct  sOglImage
 
class  cOglShader
 Vertex/Fragment Shader. More...
 
class  cOglGlyph
 Single Glyph of a Font. More...
 
class  cOglAtlasGlyph
 Glyph on a Texture Atlas. More...
 
class  cOglFontAtlas
 Texture Atlas for a Font. More...
 
class  cOglFont
 OpenGL Representation of a VDR Font. More...
 
class  cOglFb
 OpenGL Framebuffer/ Texture Object. More...
 
class  cOglOutputFb
 Main Framebuffer/ Texture Object for OSD. More...
 
class  cOglVb
 Vertex Buffers. More...
 
class  cOglCmd
 OpenGL Hardware Command. More...
 
class  cOglCmdInitOutputFb
 
class  cOglCmdInitFb
 
class  cOglCmdDeleteFb
 
class  cOglCmdRenderFbToBufferFb
 
class  cOglCmdCopyBufferToOutputFb
 
class  cOglCmdFill
 
class  cOglCmdBufferFill
 
class  cOglCmdDrawRectangle
 
class  cOglCmdDrawEllipse
 
class  cOglCmdDrawSlope
 
class  cOglCmdDrawText
 
class  cOglCmdDrawImage
 
class  cOglCmdDrawTexture
 
class  cOglCmdStoreImage
 
class  cOglCmdDropImage
 
class  cOglThread
 OpenGL Commands Processing Thread. More...
 
class  cOglPixmap
 OpenGL Implementation of a cPixmap. More...
 
class  cOglOsd
 Hardware Accelerated OpenGL OSD Implementation. More...
 
class  cSoftOsd
 Software Based OSD. More...
 
class  cSoftOsdProvider
 Plugin OSD provider. More...
 

Macros

#define KERNING_UNKNOWN   (-10000)
 
#define BORDERCOLOR   0x00000000
 This is needed for the GLES2 GL_CLAMP_TO_BORDER workaround.
 
#define MIN_CHARCODE   32
 
#define MAX_CHARCODE   255
 
#define OGL_MAX_OSDIMAGES   512
 
#define OGL_CMDQUEUE_SIZE   200
 

Enumerations

enum  eShaderType {
  stRect , stTexture , stTextureSwapBR , stText ,
  stCount
}
 
enum  eVertexBufferType {
  vbRect , vbEllipse , vbSlope , vbTexture ,
  vbTextureSwapBR , vbText , vbCount
}
 

Functions

static void ConvertColor (const GLint &colARGB, glm::vec4 &col)
 
void cOglShader::Use (void)
 
bool cOglShader::Load (eShaderType)
 
void cOglShader::SetFloat (const GLchar *, GLfloat)
 
void cOglShader::SetInteger (const GLchar *, GLint)
 
void cOglShader::SetVector2f (const GLchar *, GLfloat, GLfloat)
 
void cOglShader::SetVector3f (const GLchar *, GLfloat, GLfloat, GLfloat)
 
void cOglShader::SetVector4f (const GLchar *, GLfloat, GLfloat, GLfloat, GLfloat)
 
void cOglShader::SetMatrix4 (const GLchar *, const glm::mat4 &)
 
bool cOglShader::Compile (const char *, const char *)
 
bool cOglShader::CheckCompileErrors (GLuint, bool program=false)
 
 cOglGlyph::cOglGlyph (FT_ULong, FT_BitmapGlyph)
 
virtual cOglGlyph::~cOglGlyph ()
 
int cOglGlyph::GetKerningCache (FT_ULong)
 
void cOglGlyph::SetKerningCache (FT_ULong, int)
 
void cOglGlyph::BindTexture (void)
 
void cOglGlyph::LoadTexture (void)
 
 cOglFontAtlas::cOglFontAtlas (FT_Face, int)
 
virtual cOglFontAtlas::~cOglFontAtlas (void)
 
cOglAtlasGlyphcOglFontAtlas::GetGlyph (int) const
 
void cOglFontAtlas::BindTexture (void)
 
 cOglFont::cOglFont (const char *, int)
 
virtual cOglFont::~cOglFont (void)
 
static cOglFontcOglFont::Get (const char *, int)
 
static void cOglFont::Init (void)
 
static void cOglFont::Cleanup (void)
 
cOglGlyphcOglFont::Glyph (FT_ULong) const
 
int cOglFont::Kerning (cOglGlyph *glyph, FT_ULong prevSym) const
 
 cOglFb::cOglFb (GLint, GLint, GLint, GLint)
 
virtual cOglFb::~cOglFb (void)
 
virtual bool cOglFb::Init (void)
 
void cOglFb::Bind (void)
 
virtual void cOglFb::Unbind (void)
 
bool cOglFb::BindTexture (void)
 
virtual bool cOglOutputFb::Init (void)
 
virtual void cOglOutputFb::Unbind (void)
 
bool cOglVb::Init (void)
 
void cOglVb::Bind (void)
 
void cOglVb::Unbind (void)
 
void cOglVb::ActivateShader (void)
 
void cOglVb::EnableBlending (void)
 
void cOglVb::DisableBlending (void)
 
void cOglVb::SetShaderColor (GLint)
 
void cOglVb::SetShaderBorderColor (GLint)
 
void cOglVb::SetShaderTexture (GLint)
 
void cOglVb::SetShaderAlpha (GLint)
 
void cOglVb::SetShaderProjectionMatrix (GLint, GLint)
 
void cOglVb::SetVertexSubData (GLfloat *, int count=0)
 
void cOglVb::SetVertexData (GLfloat *, int count=0)
 
void cOglVb::DrawArrays (int count=0)
 
virtual bool cOglCmdInitOutputFb::Execute (void)
 
virtual bool cOglCmdInitFb::Execute (void)
 
virtual bool cOglCmdDeleteFb::Execute (void)
 
virtual bool cOglCmdRenderFbToBufferFb::Execute (void)
 
virtual bool cOglCmdCopyBufferToOutputFb::Execute (void)
 
virtual bool cOglCmdFill::Execute (void)
 
virtual bool cOglCmdBufferFill::Execute (void)
 
virtual bool cOglCmdDrawRectangle::Execute (void)
 
virtual bool cOglCmdDrawEllipse::Execute (void)
 
GLfloatcOglCmdDrawEllipse::CreateVerticesFull (int &)
 
GLfloatcOglCmdDrawEllipse::CreateVerticesQuadrant (int &)
 
GLfloatcOglCmdDrawEllipse::CreateVerticesHalf (int &)
 
virtual bool cOglCmdDrawSlope::Execute (void)
 
virtual bool cOglCmdDrawText::Execute (void)
 
virtual bool cOglCmdDrawImage::Execute (void)
 
virtual bool cOglCmdDrawTexture::Execute (void)
 
virtual bool cOglCmdStoreImage::Execute (void)
 
virtual bool cOglCmdDropImage::Execute (void)
 
 cOglThread::cOglThread (cCondWait *startWait, int maxCacheSize, cSoftHdDevice *device)
 
void cOglThread::CleanupImageCache (void)
 
void cOglThread::RequestStop (void)
 
void cOglThread::Stop (void)
 
void cOglThread::DoCmd (cOglCmd *)
 
int cOglThread::StoreImage (const cImage &)
 
int cOglThread::GetFreeSlot (void)
 
void cOglThread::ClearSlot (int slot)
 
sOglImagecOglThread::GetImageRef (int)
 
void cOglThread::DropImageData (int)
 
virtual void cOglThread::Action (void)
 
void cOglThread::eglAcquireContext (void)
 
bool cOglThread::InitOpenGL (void)
 
bool cOglThread::InitShaders (void)
 
void cOglThread::DeleteShaders (void)
 
bool cOglThread::InitVertexBuffers (void)
 
void cOglThread::DeleteVertexBuffers (void)
 
void cOglThread::Cleanup (void)
 
 cOglPixmap::cOglPixmap (std::shared_ptr< cOglThread >, int, const cRect &, const cRect &DrawPort=cRect::Null)
 
virtual cOglPixmap::~cOglPixmap (void)
 
virtual void cOglPixmap::MarkViewPortDirty (const cRect &)
 
virtual void cOglPixmap::SetClean (void)
 
virtual void cOglPixmap::SetLayer (int)
 
virtual void cOglPixmap::SetAlpha (int)
 
virtual void cOglPixmap::SetTile (bool)
 
virtual void cOglPixmap::SetViewPort (const cRect &)
 
virtual void cOglPixmap::SetDrawPortPoint (const cPoint &, bool Dirty=true)
 
virtual void cOglPixmap::Clear (void)
 
virtual void cOglPixmap::Fill (tColor)
 
virtual void cOglPixmap::DrawImage (const cPoint &, const cImage &)
 
virtual void cOglPixmap::DrawImage (const cPoint &, int)
 
virtual void cOglPixmap::DrawPixel (const cPoint &, tColor)
 
virtual void cOglPixmap::DrawBitmap (const cPoint &, const cBitmap &, tColor ColorFg=0, tColor ColorBg=0, bool Overlay=false)
 
virtual void cOglPixmap::DrawText (const cPoint &, const char *, tColor, tColor, const cFont *, int Width=0, int Height=0, int Alignment=taDefault)
 
void cOglPixmap::DrawTextInternal (const cPoint &, const char *, tColor, tColor, const cFont *, int Width=0, int Height=0, int Alignment=taDefault, bool isGridText=false)
 
virtual void cOglPixmap::DrawRectangle (const cRect &, tColor)
 
virtual void cOglPixmap::DrawEllipse (const cRect &, tColor, int Quadrants=0)
 
virtual void cOglPixmap::DrawSlope (const cRect &, tColor, int)
 
virtual void cOglPixmap::Render (const cPixmap *, const cRect &, const cPoint &)
 
virtual void cOglPixmap::Copy (const cPixmap *, const cRect &, const cPoint &)
 
virtual void cOglPixmap::Scroll (const cPoint &, const cRect &Source=cRect::Null)
 
virtual void cOglPixmap::Pan (const cPoint &, const cRect &Source=cRect::Null)
 
 cOglOsd::cOglOsd (int, int, uint, std::shared_ptr< cOglThread >, cSoftHdDevice *)
 
virtual cOglOsd::~cOglOsd ()
 
virtual eOsdError cOglOsd::SetAreas (const tArea *, int)
 
virtual cPixmap * cOglOsd::CreatePixmap (int, const cRect &, const cRect &DrawPort=cRect::Null)
 
virtual void cOglOsd::DestroyPixmap (cPixmap *)
 
virtual void cOglOsd::Flush (void)
 
virtual void cOglOsd::DrawScaledBitmap (int, int, const cBitmap &, double, double, bool AntiAlias=false)
 
 cSoftOsd::cSoftOsd (int, int, uint, cSoftHdDevice *)
 Initializes a software based OSD with the given coordinates.
 
virtual cSoftOsd::~cSoftOsd (void)
 Shut down the OSD.
 
virtual void cSoftOsd::SetActive (bool)
 Sets this OSD to be the active one.
 
virtual eOsdError cSoftOsd::SetAreas (const tArea *, int)
 Set the sub-areas to the given areas.
 
virtual void cSoftOsd::Flush (void)
 Actually commit all data to the OSD hardware.
 
 cSoftOsdProvider::cSoftOsdProvider (cSoftHdDevice *)
 Create a new OSD provider.
 
virtual cSoftOsdProvider::~cSoftOsdProvider ()
 Delete the OSD provider and stop the OpenGL thread if running.
 
virtual cOsd * cSoftOsdProvider::CreateOsd (int, int, uint)
 Create a new OSD.
 
void cSoftOsdProvider::OsdSizeChanged (void)
 Stop the OpenGL thread, if the osd size changed and update the size.
 
bool cSoftOsdProvider::StartOpenGlThread (void)
 Start the OpenGL thread.
 
void cSoftOsdProvider::RequestStopOpenGlThread (void)
 Initiate a stop of the OpenGL thread without waiting.
 
void cSoftOsdProvider::StopOpenGlThread (void)
 Stop the OpenGL thread and cancel it if necessary.
 
bool cSoftOsdProvider::LockOpenGlThread (void)
 Lock the OpenGL thread.
 
void cSoftOsdProvider::UnlockOpenGlThread (void)
 Unlock the OpenGL thread.
 
virtual int cSoftOsdProvider::StoreImageData (const cImage &Image)
 Store image data.
 
const cImagecSoftOsdProvider::GetImageData (int ImageHandle)
 Get stored image data.
 
virtual void cSoftOsdProvider::DropImageData (int ImageHandle)
 Drop stored image data.
 

Variables

static cOglShaderShaders [stCount]
 
static cOglVbVertexBuffers [vbCount]
 
const charrectVertexShader
 Rectangle Vertex Shader.
 
const charrectFragmentShader
 Rectangle Fragment Shader.
 
const chartextureVertexShader
 Texture Vertex Shader.
 
const chartextureFragmentShader
 Texture Fragment Shader.
 
const chartextureFragmentShaderSwapBR
 Texture Fragment Shader (swapped blue/red)
 
const chartextVertexShader
 Text Vertex Shader.
 
const chartextFragmentShader
 Text Fragment Shader.
 
static FT_Library cOglFont::s_ftLib = 0
 
static cList< cOglFont > * cOglFont::s_pFonts = 0
 
static bool cOglFont::s_initiated = false
 
static cOglOutputFbcOglOsd::OutputFramebuffer = NULL
 main OSD output framebuffer - this keeps our finished "OSD" (one per OSD)
 

Detailed Description

Dummy OSD.

OSD Provider.

Software Based OSD (CPU)

Shaders for Hardware Accelerated OpenGL OSD.

OpenGL OSD.

Macro Definition Documentation

◆ BORDERCOLOR

#define BORDERCOLOR   0x00000000

This is needed for the GLES2 GL_CLAMP_TO_BORDER workaround.

Definition at line 52 of file openglosd.h.

◆ KERNING_UNKNOWN

#define KERNING_UNKNOWN   (-10000)

Definition at line 209 of file openglosd.cpp.

◆ MAX_CHARCODE

#define MAX_CHARCODE   255

Definition at line 157 of file openglosd.h.

◆ MIN_CHARCODE

#define MIN_CHARCODE   32

Definition at line 156 of file openglosd.h.

◆ OGL_CMDQUEUE_SIZE

#define OGL_CMDQUEUE_SIZE   200

Definition at line 603 of file openglosd.h.

◆ OGL_MAX_OSDIMAGES

#define OGL_MAX_OSDIMAGES   512

Definition at line 602 of file openglosd.h.

Enumeration Type Documentation

◆ eShaderType

Enumerator
stRect 
stTexture 
stTextureSwapBR 
stText 
stCount 

Definition at line 61 of file openglosd.h.

◆ eVertexBufferType

Enumerator
vbRect 
vbEllipse 
vbSlope 
vbTexture 
vbTextureSwapBR 
vbText 
vbCount 

Definition at line 267 of file openglosd.h.

Function Documentation

◆ Action()

◆ ActivateShader()

void cOglVb::ActivateShader ( void  )

Definition at line 813 of file openglosd.cpp.

References cOglVb::m_shader, and Shaders.

◆ Bind() [1/2]

◆ Bind() [2/2]

◆ BindTexture() [1/3]

void cOglGlyph::BindTexture ( void  )

Definition at line 244 of file openglosd.cpp.

References GL_CHECK, and cOglGlyph::m_texture.

◆ BindTexture() [2/3]

void cOglFontAtlas::BindTexture ( void  )

Definition at line 459 of file openglosd.cpp.

References GL_CHECK, and cOglFontAtlas::m_texture.

◆ BindTexture() [3/3]

bool cOglFb::BindTexture ( void  )

◆ CheckCompileErrors()

bool cOglShader::CheckCompileErrors ( GLuint  object,
bool  program = false 
)
private

Definition at line 188 of file openglosd.cpp.

References GL_CHECK, LOGERROR, and cOglShader::m_type.

Referenced by cOglShader::Compile().

◆ Cleanup() [1/2]

void cOglFont::Cleanup ( void  )
static

Definition at line 533 of file openglosd.cpp.

References LOGERROR, cOglFont::s_ftLib, cOglFont::s_initiated, and cOglFont::s_pFonts.

Referenced by cOglThread::Cleanup().

◆ Cleanup() [2/2]

◆ CleanupImageCache()

void cOglThread::CleanupImageCache ( void  )
private

◆ Clear()

void cOglPixmap::Clear ( void  )
virtual

◆ ClearSlot()

void cOglThread::ClearSlot ( int  slot)
private

◆ cOglFb()

cOglFb::cOglFb ( GLint  width,
GLint  height,
GLint  viewPortWidth,
GLint  viewPortHeight 
)

◆ cOglFont()

cOglFont::cOglFont ( const char fontName,
int  charHeight 
)
private

◆ cOglFontAtlas()

◆ cOglGlyph()

cOglGlyph::cOglGlyph ( FT_ULong  charCode,
FT_BitmapGlyph  ftGlyph 
)

Definition at line 213 of file openglosd.cpp.

◆ cOglOsd()

cOglOsd::cOglOsd ( int  left,
int  top,
uint  level,
std::shared_ptr< cOglThread oglThread,
cSoftHdDevice device 
)

◆ cOglPixmap()

cOglPixmap::cOglPixmap ( std::shared_ptr< cOglThread oglThread,
int  layer,
const cRect viewPort,
const cRect DrawPort = cRect::Null 
)

Definition at line 1977 of file openglosd.cpp.

References LOGWARNING, cOglPixmap::m_pFramebuffer, and cOglPixmap::m_pOglThread.

◆ cOglThread()

cOglThread::cOglThread ( cCondWait startWait,
int  maxCacheSize,
cSoftHdDevice device 
)

◆ Compile()

bool cOglShader::Compile ( const char vertexCode,
const char fragmentCode 
)
private

Definition at line 154 of file openglosd.cpp.

References cOglShader::CheckCompileErrors(), GL_CHECK, and cOglShader::m_id.

Referenced by cOglShader::Load().

◆ ConvertColor()

static void ConvertColor ( const GLint colARGB,
glm::vec4 &  col 
)
static

◆ Copy()

void cOglPixmap::Copy ( const cPixmap *  pixmap,
const cRect source,
const cPoint dest 
)
virtual

Definition at line 2298 of file openglosd.cpp.

References LOGWARNING.

◆ CreateOsd()

cOsd * cSoftOsdProvider::CreateOsd ( int  left,
int  top,
uint  level 
)
virtual

Create a new OSD.

Create either a hardware accelerated (cOglOsd), software based (cSoftOsd) or dummy OSD (if detached)

Parameters
leftx-coordinate of OSD
topy-coordinate of OSD
levellayer level of OSD

Definition at line 73 of file softhdosdprovider.cpp.

References cSoftHdDevice::IsDetached(), L_OSD, LOGDEBUG, LOGDEBUG2, cSoftOsdProvider::m_pDevice, cSoftOsdProvider::m_pOglThread, cSoftOsdProvider::m_pOsd, cSoftHdDevice::OglOsdIsDisabled(), cSoftHdDevice::SetDisableOglOsd(), and cSoftOsdProvider::StartOpenGlThread().

◆ CreatePixmap()

cPixmap * cOglOsd::CreatePixmap ( int  layer,
const cRect viewPort,
const cRect DrawPort = cRect::Null 
)
virtual

Definition at line 2407 of file openglosd.cpp.

References cOglOsd::m_pOglPixmaps, and cOglOsd::m_pOglThread.

◆ CreateVerticesFull()

GLfloat * cOglCmdDrawEllipse::CreateVerticesFull ( int numVertices)
private

◆ CreateVerticesHalf()

GLfloat * cOglCmdDrawEllipse::CreateVerticesHalf ( int numVertices)
private

◆ CreateVerticesQuadrant()

GLfloat * cOglCmdDrawEllipse::CreateVerticesQuadrant ( int numVertices)
private

◆ cSoftOsd()

cSoftOsd::cSoftOsd ( int  left,
int  top,
uint  level,
cSoftHdDevice device 
)

Initializes a software based OSD with the given coordinates.

Parameters
leftx-coordinate of osd on display
topy-coordinate of osd on display
levellevel of the osd (smallest is shown)
devicepointer to cSoftHdDevice object

Definition at line 37 of file softhdosd.cpp.

References L_OSD, and LOGDEBUG2.

◆ cSoftOsdProvider()

cSoftOsdProvider::cSoftOsdProvider ( cSoftHdDevice device)

Create a new OSD provider.

Definition at line 41 of file softhdosdprovider.cpp.

References L_OSD, and LOGDEBUG2.

◆ DeleteShaders()

void cOglThread::DeleteShaders ( void  )
private

Definition at line 1937 of file openglosd.cpp.

References Shaders, and stCount.

Referenced by cOglThread::Cleanup().

◆ DeleteVertexBuffers()

void cOglThread::DeleteVertexBuffers ( void  )
private

Definition at line 1956 of file openglosd.cpp.

References vbCount, and VertexBuffers.

Referenced by cOglThread::Cleanup().

◆ DestroyPixmap()

void cOglOsd::DestroyPixmap ( cPixmap *  Pixmap)
virtual

◆ DisableBlending()

void cOglVb::DisableBlending ( void  )

Definition at line 824 of file openglosd.cpp.

References GL_CHECK.

◆ DoCmd()

void cOglThread::DoCmd ( cOglCmd cmd)

◆ DrawArrays()

void cOglVb::DrawArrays ( int  count = 0)

Definition at line 877 of file openglosd.cpp.

References GL_CHECK, cOglVb::m_drawMode, and cOglVb::m_numVertices.

◆ DrawBitmap()

void cOglPixmap::DrawBitmap ( const cPoint point,
const cBitmap bitmap,
tColor  ColorFg = 0,
tColor  ColorBg = 0,
bool  Overlay = false 
)
virtual

◆ DrawEllipse()

void cOglPixmap::DrawEllipse ( const cRect rect,
tColor  color,
int  Quadrants = 0 
)
virtual

◆ DrawImage() [1/2]

void cOglPixmap::DrawImage ( const cPoint point,
const cImage image 
)
virtual

Definition at line 2078 of file openglosd.cpp.

References cOglPixmap::DrawScaledImage().

◆ DrawImage() [2/2]

void cOglPixmap::DrawImage ( const cPoint point,
int  imageHandle 
)
virtual

Definition at line 2083 of file openglosd.cpp.

References cOglPixmap::DrawScaledImage().

◆ DrawPixel()

void cOglPixmap::DrawPixel ( const cPoint point,
tColor  color 
)
virtual

◆ DrawRectangle()

void cOglPixmap::DrawRectangle ( const cRect rect,
tColor  color 
)
virtual

◆ DrawScaledBitmap()

void cOglOsd::DrawScaledBitmap ( int  x,
int  y,
const cBitmap Bitmap,
double  FactorX,
double  FactorY,
bool  AntiAlias = false 
)
virtual

Definition at line 2522 of file openglosd.cpp.

References cOglOsd::m_isSubtitleOsd, and cOglOsd::m_pOglPixmaps.

◆ DrawSlope()

void cOglPixmap::DrawSlope ( const cRect rect,
tColor  color,
int  type 
)
virtual

◆ DrawText()

void cOglPixmap::DrawText ( const cPoint point,
const char s,
tColor  colorFg,
tColor  colorBg,
const cFont font,
int  Width = 0,
int  Height = 0,
int  Alignment = taDefault 
)
virtual

Definition at line 2162 of file openglosd.cpp.

References cOglPixmap::DrawTextInternal().

◆ DrawTextInternal()

void cOglPixmap::DrawTextInternal ( const cPoint point,
const char s,
tColor  colorFg,
tColor  colorBg,
const cFont font,
int  Width = 0,
int  Height = 0,
int  Alignment = taDefault,
bool  isGridText = false 
)
private

◆ DropImageData() [1/2]

void cSoftOsdProvider::DropImageData ( int  ImageHandle)
protectedvirtual

Drop stored image data.

Definition at line 211 of file softhdosdprovider.cpp.

References cSoftOsdProvider::m_pOglThread, and cSoftOsdProvider::StartOpenGlThread().

◆ DropImageData() [2/2]

void cOglThread::DropImageData ( int  imageHandle)

◆ eglAcquireContext()

void cOglThread::eglAcquireContext ( void  )
private

◆ EnableBlending()

void cOglVb::EnableBlending ( void  )

Definition at line 818 of file openglosd.cpp.

References GL_CHECK.

◆ Execute() [1/15]

bool cOglCmdInitOutputFb::Execute ( void  )
virtual

◆ Execute() [2/15]

bool cOglCmdInitFb::Execute ( void  )
virtual

Implements cOglCmd.

Definition at line 897 of file openglosd.cpp.

References cOglFb::Init(), cOglCmd::m_pFramebuffer, cOglCmdInitFb::m_wait, and cOglFb::Unbind().

◆ Execute() [3/15]

bool cOglCmdDeleteFb::Execute ( void  )
virtual

Implements cOglCmd.

Definition at line 907 of file openglosd.cpp.

References GL_CHECK, and cOglCmd::m_pFramebuffer.

◆ Execute() [4/15]

◆ Execute() [5/15]

◆ Execute() [6/15]

bool cOglCmdFill::Execute ( void  )
virtual

◆ Execute() [7/15]

bool cOglCmdBufferFill::Execute ( void  )
virtual

Implements cOglCmd.

Definition at line 1037 of file openglosd.cpp.

References ConvertColor(), GL_CHECK, and cOglCmdBufferFill::m_color.

◆ Execute() [8/15]

◆ Execute() [9/15]

◆ Execute() [10/15]

◆ Execute() [11/15]

◆ Execute() [12/15]

◆ Execute() [13/15]

◆ Execute() [14/15]

bool cOglCmdStoreImage::Execute ( void  )
virtual

◆ Execute() [15/15]

bool cOglCmdDropImage::Execute ( void  )
virtual

◆ Fill()

void cOglPixmap::Fill ( tColor  color)
virtual

◆ Flush() [1/2]

◆ Flush() [2/2]

void cSoftOsd::Flush ( void  )
virtual

Actually commit all data to the OSD hardware.

Definition at line 108 of file softhdosd.cpp.

References cSoftHdDevice::GetOsdSize(), L_OSD, LOGDEBUG2, cSoftOsd::m_dirty, cSoftOsd::m_osdLevel, cSoftOsd::m_pDevice, and cSoftHdDevice::OsdDrawARGB().

Referenced by cSoftOsd::SetActive().

◆ Get()

cOglFont * cOglFont::Get ( const char name,
int  charHeight 
)
static

Definition at line 507 of file openglosd.cpp.

References cOglFont::Init(), and cOglFont::s_pFonts.

Referenced by cOglCmdDrawText::Execute().

◆ GetFreeSlot()

int cOglThread::GetFreeSlot ( void  )
private

Definition at line 1762 of file openglosd.cpp.

References cOglThread::m_imageCache, OGL_MAX_OSDIMAGES, and sOglImage::used.

Referenced by cOglThread::StoreImage().

◆ GetGlyph()

cOglAtlasGlyph * cOglFontAtlas::GetGlyph ( int  sym) const

Definition at line 452 of file openglosd.cpp.

References cOglFontAtlas::m_pGlyph, MAX_CHARCODE, and MIN_CHARCODE.

◆ GetImageData()

const cImage * cSoftOsdProvider::GetImageData ( int  ImageHandle)

Get stored image data.

Definition at line 204 of file softhdosdprovider.cpp.

◆ GetImageRef()

sOglImage * cOglThread::GetImageRef ( int  slot)

◆ GetKerningCache()

int cOglGlyph::GetKerningCache ( FT_ULong  prevSym)

Definition at line 230 of file openglosd.cpp.

References KERNING_UNKNOWN, and cOglGlyph::m_pKerningCache.

◆ Glyph()

cOglGlyph * cOglFont::Glyph ( FT_ULong  charCode) const

◆ Init() [1/4]

void cOglFont::Init ( void  )
staticprivate

Definition at line 523 of file openglosd.cpp.

References LOGERROR, cOglFont::s_ftLib, cOglFont::s_initiated, and cOglFont::s_pFonts.

Referenced by cOglFont::Get().

◆ Init() [2/4]

bool cOglFb::Init ( void  )
virtual

◆ Init() [3/4]

bool cOglOutputFb::Init ( void  )
virtual

◆ Init() [4/4]

◆ InitOpenGL()

bool cOglThread::InitOpenGL ( void  )
private
Todo:
: InitOpenGL has no "return false", but cOglThread::Action() checks against the return value.

Definition at line 1900 of file openglosd.cpp.

References cOglThread::eglAcquireContext(), GL_CHECK, cVideoRender::GlInitiated(), L_OPENGL, LOGDEBUG2, cOglThread::m_pRender, vbText, and VertexBuffers.

Referenced by cOglThread::Action().

◆ InitShaders()

bool cOglThread::InitShaders ( void  )
private

Definition at line 1924 of file openglosd.cpp.

References L_OPENGL, LOGDEBUG2, Shaders, and stCount.

Referenced by cOglThread::Action().

◆ InitVertexBuffers()

bool cOglThread::InitVertexBuffers ( void  )
private

Definition at line 1943 of file openglosd.cpp.

References L_OPENGL, LOGDEBUG2, vbCount, and VertexBuffers.

Referenced by cOglThread::Action().

◆ Kerning()

int cOglFont::Kerning ( cOglGlyph glyph,
FT_ULong  prevSym 
) const

Definition at line 605 of file openglosd.cpp.

References KERNING_UNKNOWN, and cOglFont::m_face.

Referenced by cOglCmdDrawText::Execute().

◆ Load()

◆ LoadTexture()

void cOglGlyph::LoadTexture ( void  )

◆ LockOpenGlThread()

bool cSoftOsdProvider::LockOpenGlThread ( void  )

Lock the OpenGL thread.

Definition at line 169 of file softhdosdprovider.cpp.

References L_OPENGL, LOGDEBUG2, and cSoftOsdProvider::m_pOglThread.

Referenced by cSoftHdDevice::OnEventReceived().

◆ MarkViewPortDirty()

void cOglPixmap::MarkViewPortDirty ( const cRect rect)
virtual

Definition at line 2010 of file openglosd.cpp.

References cOglPixmap::SetDirty().

◆ OsdSizeChanged()

void cSoftOsdProvider::OsdSizeChanged ( void  )

Stop the OpenGL thread, if the osd size changed and update the size.

Definition at line 109 of file softhdosdprovider.cpp.

References cSoftOsdProvider::m_pDevice, cSoftHdDevice::OglOsdIsDisabled(), and cSoftOsdProvider::StopOpenGlThread().

◆ Pan()

void cOglPixmap::Pan ( const cPoint dest,
const cRect Source = cRect::Null 
)
virtual

Definition at line 2308 of file openglosd.cpp.

References LOGWARNING.

◆ Render()

void cOglPixmap::Render ( const cPixmap *  pixmap,
const cRect source,
const cPoint dest 
)
virtual

Definition at line 2293 of file openglosd.cpp.

References LOGWARNING.

◆ RequestStop()

void cOglThread::RequestStop ( void  )

Definition at line 1672 of file openglosd.cpp.

References cOglThread::CleanupImageCache().

◆ RequestStopOpenGlThread()

void cSoftOsdProvider::RequestStopOpenGlThread ( void  )

Initiate a stop of the OpenGL thread without waiting.

Definition at line 148 of file softhdosdprovider.cpp.

References L_OPENGL, LOGDEBUG2, and cSoftOsdProvider::m_pOglThread.

Referenced by cSoftHdDevice::OnEnteringState().

◆ Scroll()

void cOglPixmap::Scroll ( const cPoint dest,
const cRect Source = cRect::Null 
)
virtual

Definition at line 2303 of file openglosd.cpp.

References LOGWARNING.

◆ SetActive()

void cSoftOsd::SetActive ( bool  on)
virtual

Sets this OSD to be the active one.

Parameters
ontrue on, false off
Note
only needed as workaround for text2skin plugin with undrawn areas

Definition at line 62 of file softhdosd.cpp.

References cSoftOsd::Flush(), L_OSD, LOGDEBUG2, cSoftOsd::m_dirty, cSoftOsd::m_osdLevel, cSoftOsd::m_pDevice, and cSoftHdDevice::OsdClose().

Referenced by cSoftOsd::~cSoftOsd().

◆ SetAlpha()

void cOglPixmap::SetAlpha ( int  alpha)
virtual

Definition at line 2028 of file openglosd.cpp.

References cOglPixmap::SetDirty().

◆ SetAreas() [1/2]

eOsdError cOglOsd::SetAreas ( const tArea areas,
int  numAreas 
)
virtual

◆ SetAreas() [2/2]

eOsdError cSoftOsd::SetAreas ( const tArea areas,
int  n 
)
virtual

Set the sub-areas to the given areas.

Definition at line 84 of file softhdosd.cpp.

References L_OSD, LOGDEBUG2, cSoftOsd::m_dirty, cSoftOsd::m_pDevice, and cSoftHdDevice::OsdClose().

◆ SetClean()

void cOglPixmap::SetClean ( void  )
virtual

Definition at line 2016 of file openglosd.cpp.

References cOglPixmap::SetDirty().

◆ SetDrawPortPoint()

void cOglPixmap::SetDrawPortPoint ( const cPoint point,
bool  Dirty = true 
)
virtual

Definition at line 2049 of file openglosd.cpp.

References cOglPixmap::SetDirty().

◆ SetFloat()

void cOglShader::SetFloat ( const GLchar name,
GLfloat  value 
)

Definition at line 124 of file openglosd.cpp.

References GL_CHECK, and cOglShader::m_id.

◆ SetInteger()

void cOglShader::SetInteger ( const GLchar name,
GLint  value 
)

Definition at line 129 of file openglosd.cpp.

References GL_CHECK, and cOglShader::m_id.

◆ SetKerningCache()

void cOglGlyph::SetKerningCache ( FT_ULong  prevSym,
int  kerning 
)

Definition at line 239 of file openglosd.cpp.

References cOglGlyph::m_pKerningCache.

◆ SetLayer()

void cOglPixmap::SetLayer ( int  layer)
virtual

Definition at line 2022 of file openglosd.cpp.

References cOglPixmap::SetDirty().

◆ SetMatrix4()

void cOglShader::SetMatrix4 ( const GLchar name,
const glm::mat4 &  matrix 
)

Definition at line 149 of file openglosd.cpp.

References GL_CHECK, and cOglShader::m_id.

◆ SetShaderAlpha()

void cOglVb::SetShaderAlpha ( GLint  alpha)

Definition at line 848 of file openglosd.cpp.

References cOglVb::m_shader, and Shaders.

◆ SetShaderBorderColor()

void cOglVb::SetShaderBorderColor ( GLint  color)

Definition at line 836 of file openglosd.cpp.

References ConvertColor(), cOglVb::m_shader, and Shaders.

◆ SetShaderColor()

void cOglVb::SetShaderColor ( GLint  color)

Definition at line 829 of file openglosd.cpp.

References ConvertColor(), cOglVb::m_shader, and Shaders.

◆ SetShaderProjectionMatrix()

void cOglVb::SetShaderProjectionMatrix ( GLint  width,
GLint  height 
)

Definition at line 853 of file openglosd.cpp.

References cOglVb::m_shader, and Shaders.

◆ SetShaderTexture()

void cOglVb::SetShaderTexture ( GLint  value)

Definition at line 843 of file openglosd.cpp.

References cOglVb::m_shader, and Shaders.

◆ SetTile()

void cOglPixmap::SetTile ( bool  tile)
virtual

Definition at line 2037 of file openglosd.cpp.

References cOglPixmap::SetDirty().

◆ SetVector2f()

void cOglShader::SetVector2f ( const GLchar name,
GLfloat  x,
GLfloat  y 
)

Definition at line 134 of file openglosd.cpp.

References GL_CHECK, and cOglShader::m_id.

◆ SetVector3f()

void cOglShader::SetVector3f ( const GLchar name,
GLfloat  x,
GLfloat  y,
GLfloat  z 
)

Definition at line 139 of file openglosd.cpp.

References GL_CHECK, and cOglShader::m_id.

◆ SetVector4f()

void cOglShader::SetVector4f ( const GLchar name,
GLfloat  x,
GLfloat  y,
GLfloat  z,
GLfloat  w 
)

Definition at line 144 of file openglosd.cpp.

References GL_CHECK, and cOglShader::m_id.

◆ SetVertexData()

void cOglVb::SetVertexData ( GLfloat vertices,
int  count = 0 
)

◆ SetVertexSubData()

void cOglVb::SetVertexSubData ( GLfloat vertices,
int  count = 0 
)

◆ SetViewPort()

void cOglPixmap::SetViewPort ( const cRect rect)
virtual

Definition at line 2043 of file openglosd.cpp.

References cOglPixmap::SetDirty().

◆ StartOpenGlThread()

◆ Stop()

void cOglThread::Stop ( void  )

◆ StopOpenGlThread()

void cSoftOsdProvider::StopOpenGlThread ( void  )

Stop the OpenGL thread and cancel it if necessary.

Definition at line 158 of file softhdosdprovider.cpp.

References L_OPENGL, LOGDEBUG2, and cSoftOsdProvider::m_pOglThread.

Referenced by cSoftHdDevice::OnEnteringState(), cSoftOsdProvider::OsdSizeChanged(), and cSoftOsdProvider::~cSoftOsdProvider().

◆ StoreImage()

◆ StoreImageData()

int cSoftOsdProvider::StoreImageData ( const cImage Image)
protectedvirtual

Store image data.

Definition at line 192 of file softhdosdprovider.cpp.

References cSoftOsdProvider::m_pOglThread, and cSoftOsdProvider::StartOpenGlThread().

◆ Unbind() [1/3]

◆ Unbind() [2/3]

void cOglOutputFb::Unbind ( void  )
virtual

Reimplemented from cOglFb.

Definition at line 719 of file openglosd.cpp.

References GL_CHECK.

Referenced by cOglCmdInitOutputFb::Execute(), and cOglCmdCopyBufferToOutputFb::Execute().

◆ Unbind() [3/3]

void cOglVb::Unbind ( void  )

Definition at line 808 of file openglosd.cpp.

References GL_CHECK.

◆ UnlockOpenGlThread()

void cSoftOsdProvider::UnlockOpenGlThread ( void  )

Unlock the OpenGL thread.

Definition at line 182 of file softhdosdprovider.cpp.

References L_OPENGL, LOGDEBUG2, and cSoftOsdProvider::m_pOglThread.

Referenced by cSoftHdDevice::OnEnteringState(), and cSoftHdDevice::OnEventReceived().

◆ Use()

void cOglShader::Use ( void  )

Definition at line 78 of file openglosd.cpp.

References GL_CHECK, and cOglShader::m_id.

◆ ~cOglFb()

cOglFb::~cOglFb ( void  )
virtual

Definition at line 636 of file openglosd.cpp.

References GL_CHECK, cOglFb::m_framebuffer, and cOglFb::m_texture.

◆ ~cOglFont()

cOglFont::~cOglFont ( void  )
virtual

Definition at line 501 of file openglosd.cpp.

References cOglFont::m_face, and cOglFont::m_pAtlas.

◆ ~cOglFontAtlas()

cOglFontAtlas::~cOglFontAtlas ( void  )
virtual

◆ ~cOglGlyph()

cOglGlyph::~cOglGlyph ( void  )
virtual

Definition at line 224 of file openglosd.cpp.

References GL_CHECK, and cOglGlyph::m_texture.

◆ ~cOglOsd()

cOglOsd::~cOglOsd ( )
virtual

◆ ~cOglPixmap()

cOglPixmap::~cOglPixmap ( void  )
virtual

Definition at line 1999 of file openglosd.cpp.

References cOglPixmap::m_pFramebuffer, and cOglPixmap::m_pOglThread.

◆ ~cSoftOsd()

cSoftOsd::~cSoftOsd ( void  )
virtual

Shut down the OSD.

Definition at line 48 of file softhdosd.cpp.

References L_OSD, LOGDEBUG2, cSoftOsd::m_osdLevel, and cSoftOsd::SetActive().

◆ ~cSoftOsdProvider()

cSoftOsdProvider::~cSoftOsdProvider ( )
virtual

Variable Documentation

◆ OutputFramebuffer

cOglOutputFb * cOglOsd::OutputFramebuffer = NULL
static

main OSD output framebuffer - this keeps our finished "OSD" (one per OSD)

Definition at line 721 of file openglosd.h.

Referenced by cOglThread::Cleanup(), cOglOsd::cOglOsd(), cOglOsd::Flush(), and cOglOsd::~cOglOsd().

◆ rectFragmentShader

const char* rectFragmentShader
Initial value:
=
"#version 100 \n\
precision mediump float; \
varying vec4 rectCol; \
\
void main() \
{ \
gl_FragColor = rectCol; \
} \
"

Rectangle Fragment Shader.

Definition at line 46 of file openglshader.h.

Referenced by cOglShader::Load().

◆ rectVertexShader

const char* rectVertexShader
Initial value:
=
"#version 100 \n\
\
attribute vec2 position; \
varying vec4 rectCol; \
uniform vec4 inColor; \
uniform mat4 projection; \
\
void main() \
{ \
gl_Position = projection * vec4(position.x, position.y, 0.0, 1.0); \
rectCol = inColor; \
} \
"

Rectangle Vertex Shader.

Definition at line 28 of file openglshader.h.

Referenced by cOglShader::Load().

◆ s_ftLib

FT_Library cOglFont::s_ftLib = 0
staticprivate

◆ s_initiated

bool cOglFont::s_initiated = false
staticprivate

Definition at line 204 of file openglosd.h.

Referenced by cOglFont::Cleanup(), and cOglFont::Init().

◆ s_pFonts

cList< cOglFont > * cOglFont::s_pFonts = 0
staticprivate

Definition at line 206 of file openglosd.h.

Referenced by cOglFont::Cleanup(), cOglFont::Get(), and cOglFont::Init().

◆ Shaders

◆ textFragmentShader

const char* textFragmentShader
Initial value:
=
"#version 100 \n\
precision mediump float; \
varying vec2 TexCoords; \
varying vec4 textColor; \
\
uniform sampler2D glyphTexture; \
\
void main() \
{ \
vec4 sampled = vec4(1.0, 1.0, 1.0, texture2D(glyphTexture, TexCoords).r); \
gl_FragColor = textColor * sampled; \
} \
"

Text Fragment Shader.

Definition at line 169 of file openglshader.h.

Referenced by cOglShader::Load().

◆ textureFragmentShader

const char* textureFragmentShader
Initial value:
=
"#version 100 \n\
precision mediump float; \
varying vec2 TexCoords; \
varying vec4 alphaValue; \
varying vec4 bColorValue; \
\
uniform sampler2D screenTexture; \
\
float clamp_to_border_factor (vec2 coords) \
{ \
bvec2 out1 = greaterThan (coords, vec2 (1,1)); \
bvec2 out2 = lessThan (coords, vec2 (0,0)); \
bool do_clamp = (any (out1) || any (out2)); \
return float (!do_clamp); \
} \
\
void main() \
{ \
vec4 color = texture2D(screenTexture, TexCoords) * alphaValue; \
float f = clamp_to_border_factor (TexCoords); \
gl_FragColor = mix (bColorValue, color, f); \
} \
"

Texture Fragment Shader.

Definition at line 86 of file openglshader.h.

Referenced by cOglShader::Load().

◆ textureFragmentShaderSwapBR

const char* textureFragmentShaderSwapBR
Initial value:
=
"#version 100 \n\
precision mediump float; \
varying vec2 TexCoords; \
varying vec4 alphaValue; \
varying vec4 bColorValue; \
\
uniform sampler2D screenTexture; \
\
float clamp_to_border_factor (vec2 coords) \
{ \
bvec2 out1 = greaterThan (coords, vec2 (1,1)); \
bvec2 out2 = lessThan (coords, vec2 (0,0)); \
bool do_clamp = (any (out1) || any (out2)); \
return float (!do_clamp); \
} \
\
void main() \
{ \
vec4 color = texture2D(screenTexture, TexCoords) * alphaValue; \
vec4 color_swapped = vec4(color.b, color.g, color.r, color.a); \
float f = clamp_to_border_factor (TexCoords); \
gl_FragColor = mix (bColorValue, color_swapped, f); \
} \
"

Texture Fragment Shader (swapped blue/red)

In difference to the textureFragmentShader this one does a blue/red color component swap

Definition at line 117 of file openglshader.h.

Referenced by cOglShader::Load().

◆ textureVertexShader

const char* textureVertexShader
Initial value:
=
"#version 100 \n\
\
attribute vec2 position; \
attribute vec2 texCoords; \
\
varying vec2 TexCoords; \
varying vec4 alphaValue;\
varying vec4 bColorValue;\
\
uniform vec4 bColor; \
uniform mat4 projection; \
uniform vec4 alpha; \
\
void main() \
{ \
gl_Position = projection * vec4(position.x, position.y, 0.0, 1.0); \
TexCoords = texCoords; \
alphaValue = alpha; \
bColorValue = bColor; \
} \
"

Texture Vertex Shader.

Definition at line 60 of file openglshader.h.

Referenced by cOglShader::Load().

◆ textVertexShader

const char* textVertexShader
Initial value:
=
"#version 100 \n\
\
attribute vec2 position; \
attribute vec2 texCoords; \
\
varying vec2 TexCoords; \
varying vec4 textColor; \
\
uniform mat4 projection; \
uniform vec4 inColor; \
\
void main() \
{ \
gl_Position = projection * vec4(position.x, position.y, 0.0, 1.0); \
TexCoords = texCoords; \
textColor = inColor; \
} \
"

Text Vertex Shader.

Definition at line 146 of file openglshader.h.

Referenced by cOglShader::Load().

◆ VertexBuffers