#include <shader_primitive.h>
Public Member Functions | |
shader_primitive () | |
Default constructor. | |
shader_primitive (const color &col) | |
Constructor. | |
virtual | ~shader_primitive () |
Destructor. | |
void | printProgramInfoLog (GLuint obj) |
Program linking errors. | |
void | printShaderInfoLog (GLuint obj) |
Shader compiling errors. | |
string | read_file (const char *filename) |
Read in a file. | |
Protected Attributes | |
GLhandleARB | f |
Shader source handles. | |
GLhandleARB | g |
GLhandleARB | v |
This class is the parent of all the primitives that get drawn to the screen but use their own shaders. It helps out by providing a few helpful functions for compiling shader programs and reading files and so forth.
glot::shader_primitive::shader_primitive | ( | ) | [inline] |
Default constructor.
glot::shader_primitive::shader_primitive | ( | const color & | col | ) | [inline] |
virtual glot::shader_primitive::~shader_primitive | ( | ) | [inline, virtual] |
Destructor.
Virtual classes need virtual destructors
void glot::shader_primitive::printProgramInfoLog | ( | GLuint | obj | ) |
Program linking errors.
obj | - the program to talk about |
I found this helpful function at: http://www.lighthouse3d.com/opengl/glsl/index.php?oglinfo
void glot::shader_primitive::printShaderInfoLog | ( | GLuint | obj | ) |
Shader compiling errors.
obj | - the shader to talk about |
I found this helpful function at: http://www.lighthouse3d.com/opengl/glsl/index.php?oglinfo
string glot::shader_primitive::read_file | ( | const char * | filename | ) |
Read in a file.
filename | - the name of the file to read |
GLhandleARB glot::shader_primitive::f [protected] |
Shader source handles.
I'm not entirely sure if it's necessary to store these handles beyond the compiling and then linking the shader program, but these are for that purpose.
GLhandleARB glot::shader_primitive::g [protected] |
GLhandleARB glot::shader_primitive::v [protected] |