vdr-plugin-softhddevice-drm-gles 1.5.9-20e15de
cOglShader Class Reference

#include <openglosd.h>

Public Member Functions

 cOglShader (void)
 
bool Load (eShaderType)
 
void Use (void)
 
void SetFloat (const GLchar *, GLfloat)
 
void SetInteger (const GLchar *, GLint)
 
void SetVector2f (const GLchar *, GLfloat, GLfloat)
 
void SetVector3f (const GLchar *, GLfloat, GLfloat, GLfloat)
 
void SetVector4f (const GLchar *, GLfloat, GLfloat, GLfloat, GLfloat)
 
void SetMatrix4 (const GLchar *, const glm::mat4 &)
 

Private Member Functions

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

Private Attributes

eShaderType m_type
 
GLuint m_id
 

Detailed Description

Definition at line 76 of file openglosd.h.

Constructor & Destructor Documentation

◆ cOglShader()

cOglShader::cOglShader ( void  )
inline

Definition at line 79 of file openglosd.h.

Member Function Documentation

◆ CheckCompileErrors()

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

Definition at line 188 of file openglosd.cpp.

References LOGERROR, and m_type.

Referenced by Compile().

◆ Compile()

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

Definition at line 154 of file openglosd.cpp.

References CheckCompileErrors(), and m_id.

Referenced by Load().

◆ Load()

◆ SetFloat()

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

Definition at line 124 of file openglosd.cpp.

References m_id.

◆ SetInteger()

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

Definition at line 129 of file openglosd.cpp.

References m_id.

Referenced by cOglVb::SetShaderTexture().

◆ SetMatrix4()

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

Definition at line 149 of file openglosd.cpp.

References m_id.

Referenced by cOglVb::SetShaderProjectionMatrix().

◆ SetVector2f()

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

Definition at line 134 of file openglosd.cpp.

References m_id.

◆ SetVector3f()

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

Definition at line 139 of file openglosd.cpp.

References 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 m_id.

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

◆ Use()

void cOglShader::Use ( void  )

Definition at line 78 of file openglosd.cpp.

References m_id.

Referenced by cOglVb::ActivateShader().

Member Data Documentation

◆ m_id

GLuint cOglShader::m_id
private

◆ m_type

eShaderType cOglShader::m_type
private

Definition at line 91 of file openglosd.h.

Referenced by CheckCompileErrors(), and Load().


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