1 #ifndef SHADERS_HEADER_GUARD
2 #define SHADERS_HEADER_GUARD
63 virtual const char* vertex_shader() =0;
64 virtual const char* fragment_shader() =0;
65 const char* vertex_shader_obj();
66 const char* fragment_shader_obj();
83 void scale(GLfloat fx, GLfloat fy);
101 const char* vertex_shader();
102 const char* fragment_shader();
122 const char* vertex_shader();
123 const char* fragment_shader();
A general purpose shader class.
Definition: shader.h:52
GLuint program_obj
OpenGL reference to vertex & fragment shader program for rendering overlay objects.
Definition: shader.h:78
Shader()
Default constructor.
Definition: shader.cpp:184
GLint texcoord
OpenGL VERTEX SHADER PROGRAM VAR : texture coordinate array. Typically "hard-coded" into the shader c...
Definition: shader.h:73
GLint position
OpenGL VERTEX SHADER PROGRAM VAR : position vertex array. Typically "hard-coded" into the shader code...
Definition: shader.h:72
void scale(GLfloat fx, GLfloat fy)
Set transformation matrix to simple scaling.
Definition: shader.cpp:316
void compile()
Compile shader.
Definition: shader.cpp:200
void validate()
Validate shader program.
Definition: shader.cpp:346
virtual void findVars()
Link shader program variable references to the shader program.
Definition: shader.cpp:302
void use()
Use shader program for bitmap rendering.
Definition: shader.cpp:330
void use_obj()
Use shader program for overlay object drawing.
Definition: shader.cpp:338
GLint transform_obj
OpenGL VERTEX SHADER PROGRAM VAR : transformation matrix. For the object overlay shader program.
Definition: shader.h:71
GLuint program
OpenGL reference to vertex & fragment shader program for rendering bitmap.
Definition: shader.h:77
GLint transform
OpenGL VERTEX SHADER PROGRAM VAR : transformation matrix.
Definition: shader.h:70
virtual ~Shader()
Default destructor.
Definition: shader.cpp:192
GLint texy
OpenGL VERTEX SHADER PROGRAM VAR : Y texture.
Definition: shader.h:117
void findVars()
Link shader program variable references to the shader program.
Definition: shader.cpp:398
GLint texu
OpenGL VERTEX SHADER PROGRAM VAR : U texture.
Definition: shader.h:118
GLint texv
OpenGL VERTEX SHADER PROGRAM VAR : V texture.
Definition: shader.h:119
List of common header files.