vdr-plugin-softhddevice-drm-gles 1.4.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
cShader Class Reference

#include <openglosd.h>

Public Member Functions

 cShader (void)
 
virtual ~cShader (void)
 
bool Load (eShaderType type)
 
void Use (void)
 
void SetFloat (const GLchar *name, GLfloat value)
 
void SetInteger (const GLchar *name, GLint value)
 
void SetVector2f (const GLchar *name, GLfloat x, GLfloat y)
 
void SetVector3f (const GLchar *name, GLfloat x, GLfloat y, GLfloat z)
 
void SetVector4f (const GLchar *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 
void SetMatrix4 (const GLchar *name, const glm::mat4 &matrix)
 

Private Member Functions

bool Compile (const char *vertexCode, const char *fragmentCode)
 
bool CheckCompileErrors (GLuint object, bool program=false)
 

Private Attributes

eShaderType type
 
GLuint id
 

Detailed Description

Definition at line 106 of file openglosd.h.

Constructor & Destructor Documentation

◆ cShader()

cShader::cShader ( void  )
inline

Definition at line 113 of file openglosd.h.

◆ ~cShader()

virtual cShader::~cShader ( void  )
inlinevirtual

Definition at line 114 of file openglosd.h.

Member Function Documentation

◆ CheckCompileErrors()

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

Definition at line 405 of file openglosd.cpp.

References GL_CHECK, LOGERROR, and type.

Referenced by Compile().

◆ Compile()

bool cShader::Compile ( const char *  vertexCode,
const char *  fragmentCode 
)
private

Definition at line 376 of file openglosd.cpp.

References CheckCompileErrors(), and GL_CHECK.

Referenced by Load().

◆ Load()

bool cShader::Load ( eShaderType  type)

◆ SetFloat()

void cShader::SetFloat ( const GLchar *  name,
GLfloat  value 
)

Definition at line 352 of file openglosd.cpp.

References GL_CHECK.

◆ SetInteger()

void cShader::SetInteger ( const GLchar *  name,
GLint  value 
)

Definition at line 356 of file openglosd.cpp.

References GL_CHECK.

Referenced by cOglVb::SetShaderTexture().

◆ SetMatrix4()

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

Definition at line 372 of file openglosd.cpp.

References GL_CHECK.

Referenced by cOglVb::SetShaderProjectionMatrix().

◆ SetVector2f()

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

Definition at line 360 of file openglosd.cpp.

References GL_CHECK.

◆ SetVector3f()

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

Definition at line 364 of file openglosd.cpp.

References GL_CHECK.

◆ SetVector4f()

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

Definition at line 368 of file openglosd.cpp.

References GL_CHECK.

Referenced by cOglVb::SetShaderAlpha(), cOglVb::SetShaderBorderColor(), and cOglVb::SetShaderColor().

◆ Use()

void cShader::Use ( void  )

Definition at line 308 of file openglosd.cpp.

References GL_CHECK.

Referenced by cOglVb::ActivateShader().

Member Data Documentation

◆ id

GLuint cShader::id
private

Definition at line 109 of file openglosd.h.

◆ type

eShaderType cShader::type
private

Definition at line 108 of file openglosd.h.

Referenced by CheckCompileErrors(), and Load().


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