Valkka
1.6.1
OpenSource Video Management
|
A general purpose shader class. More...
#include <shader.h>
Public Member Functions | |
Shader () | |
Default constructor. More... | |
virtual | ~Shader () |
Default destructor. | |
ban_copy_ctor (Shader) | |
ban_copy_asm (Shader) | |
void | compile () |
Compile shader. | |
virtual void | findVars () |
Link shader program variable references to the shader program. | |
void | scale (GLfloat fx, GLfloat fy) |
Set transformation matrix to simple scaling. | |
void | use () |
Use shader program for bitmap rendering. | |
void | use_obj () |
Use shader program for overlay object drawing. | |
void | validate () |
Validate shader program. | |
Public Attributes | |
GLint | transform |
OpenGL VERTEX SHADER PROGRAM VAR : transformation matrix. | |
GLint | transform_obj |
OpenGL VERTEX SHADER PROGRAM VAR : transformation matrix. For the object overlay shader program. | |
GLint | position |
OpenGL VERTEX SHADER PROGRAM VAR : position vertex array. Typically "hard-coded" into the shader code with (location=0) | |
GLint | texcoord |
OpenGL VERTEX SHADER PROGRAM VAR : texture coordinate array. Typically "hard-coded" into the shader code with (location=1) | |
GLint | object |
Protected Member Functions | |
virtual const char * | vertex_shader ()=0 |
virtual const char * | fragment_shader ()=0 |
const char * | vertex_shader_obj () |
const char * | fragment_shader_obj () |
Protected Attributes | |
GLuint | program |
OpenGL reference to vertex & fragment shader program for rendering bitmap. | |
GLuint | program_obj |
OpenGL reference to vertex & fragment shader program for rendering overlay objects. | |
A general purpose shader class.
Subclass for, say:
Shader::Shader | ( | ) |
Default constructor.
Calls Shader::compile and Shader::findVars