class Shader
Implements a GLSL shader handler.
| Shader | Implements a GLSL shader handler. |
| Functions | |
| Shader | Initializes the object by creating the OpenGL shaders and program. |
| ~Shader | Releases all allocated resources. |
| Bind | Binds the shader as the active OpenGL program. |
| GetAttribLocation | Returns the shader attribute location of the given attribute. |
| GetUniformLocation | Returns the shader uniform location of the given uniform. |
| GetVertexLocation | Returns the shader location for the vertex array. |
| GetColorLocation | Returns the shader location for the color array. |
Implements a GLSL shader handler.
class Shader
Initializes the object by creating the OpenGL shaders and program.
Shader( const char * sVertexSource, const char * sFragmentSource )
Releases all allocated resources.
~Shader()
Binds the shader as the active OpenGL program.
void Bind() const
Returns the shader attribute location of the given attribute.
unsigned int GetAttribLocation( const char * sName ) const
Returns the shader uniform location of the given uniform.
unsigned int GetUniformLocation( const char * sName ) const
Returns the shader location for the vertex array.
unsigned int GetVertexLocation()
Returns the shader location for the color array.
unsigned int GetColorLocation()