vdr-plugin-softhddevice-drm-gles 1.6.4-d0291bb
OSD

OSD Rendering Interface. More...

Classes

class  cDummyPixmap
 Dummy Pixmap for Skins. More...
 
class  cDummyOsd
 Dummy OSD. More...
 
class  cOglShader
 OpenGL OSD Vertex/Fragment Shader. More...
 
class  cOglGlyph
 OpenGL OSD Glyph of a Font. More...
 
class  cOglAtlasGlyph
 OpenGL OSD Glyph on a Texture Atlas. More...
 
class  cOglFontAtlas
 OpenGL OSD Texture Atlas for a Font. More...
 
class  cOglFont
 OpenGL OSD Representation of a VDR Font. More...
 
class  cOglFb
 OpenGL OSD Framebuffer/ Texture Object. More...
 
class  cOglOutputFb
 Main Framebuffer/ Texture Object for OSD. More...
 
class  cOglVb
 OpenGL OSD Vertex Buffers. More...
 
class  cOglCmd
 OpenGL Hardware Command. More...
 
class  cOglCmdInitOutputFb
 OpenGL command: Init the output framebuffer. More...
 
class  cOglCmdInitFb
 OpenGL command: Init a framebuffer. More...
 
class  cOglCmdDeleteFb
 OpenGL command: Delete a framebuffer. More...
 
class  cOglCmdRenderFbToBufferFb
 OpenGL command: Render a framebuffer to another framebuffer. More...
 
class  cOglCmdCopyBufferToOutputFb
 OpenGL command: Render a framebuffer to the output framebuffer. More...
 
class  cOglCmdFill
 OpenGL command: Fill a polygon. More...
 
class  cOglCmdBufferFill
 OpenGL command: Fill a framebuffer. More...
 
class  cOglCmdDrawRectangle
 OpenGL command: Draw a rectangle. More...
 
class  cOglCmdDrawEllipse
 OpenGL command: Draw an ellipse. More...
 
class  cOglCmdDrawSlope
 OpenGL command: Draw a slope. More...
 
class  cOglCmdDrawText
 OpenGL command: Draw a text. More...
 
class  cOglCmdDrawImage
 OpenGL command: Draw an image. More...
 
class  cOglCmdDrawTexture
 OpenGL command: Draw a texture. More...
 
class  cOglCmdStoreImage
 OpenGL command: Store image in the cache. More...
 
class  cOglCmdDropImage
 OpenGL command: Drop image from cache. More...
 
class  cOglThread
 OpenGL Commands Processing Thread. More...
 
class  cOglPixmap
 OpenGL Implementation of a cPixmap. More...
 
class  cOglOsd
 OpenGL OSD Implementation (GPU accelerated) More...
 
class  cSoftOsd
 Software Based OSD (CPU) More...
 
class  cSoftOsdProvider
 Plugin OSD provider. More...
 

Macros

#define BORDERCOLOR   0x00000000
 OpenGL OSD (GPU)
 

Functions

static void ConvertColor (const GLint &colARGB, glm::vec4 &col)
 OpenGL Color Conversion Helper.
 

Variables

static cOglShaderShaders [stCount]
 OpenGL Shaders Array.
 
static cOglVbVertexBuffers [vbCount]
 OpenGL Vertex Buffers Array.
 
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.
 

Detailed Description

OSD Rendering Interface.

Macro Definition Documentation

◆ BORDERCOLOR

#define BORDERCOLOR   0x00000000

OpenGL OSD (GPU)

This is needed for the GLES2 GL_CLAMP_TO_BORDER workaround

Definition at line 53 of file openglosd.h.

Function Documentation

◆ ConvertColor()

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

OpenGL Color Conversion Helper.

Translates color from ARGB value to glm::vec4

Definition at line 63 of file openglosd.cpp.

Referenced by cOglCmdFill::Execute(), cOglCmdBufferFill::Execute(), cOglVb::SetShaderBorderColor(), and cOglVb::SetShaderColor().

Variable Documentation

◆ 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 48 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 30 of file openglshader.h.

Referenced by cOglShader::Load().

◆ 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 171 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 88 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 119 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 62 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 148 of file openglshader.h.

Referenced by cOglShader::Load().

◆ VertexBuffers