Valkka  1.6.1
OpenSource Video Management
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Shader Class Referenceabstract

A general purpose shader class. More...

#include <shader.h>

Inheritance diagram for Shader:
Inheritance graph
[legend]

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.
 

Detailed Description

A general purpose shader class.

Subclass for, say:

Constructor & Destructor Documentation

◆ Shader()

Shader::Shader ( )

Default constructor.

Calls Shader::compile and Shader::findVars


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