jubilant-funicular
|
represents a program written in GLSL comprised of a vertex shader and a fragment shader More...
#include <GLSLProgram.h>
Public Member Functions | |
GLSLProgram () | |
constructor and destructor | |
GLint | getUniformLocation (crstring uniformName) const |
returns the location of a uniform in the shaders | |
bool | isLinked () const |
returns whether or not the shaders have been linked | |
void | addAttribute (crstring attributeName) |
makes an attribute useful and assigns it the next available location | |
void | linkShaders () |
links the compiled shaders to this program | |
void | use () const |
binds this program | |
void | unuse () const |
unbinds this program | |
void | destroy () |
deletes this program | |
void | reload () |
Reloads the program. | |
Private Member Functions | |
void | compileShaders (crstring shaderProgName) |
compiles both the vertex and fragment shaders given their name | |
void | compileShaders (crstring vert, crstring frag) |
GLuint | compileShader (crstring shaderFileName, GLenum shaderType) const |
compiles a shader from a file and returns its id | |
Private Attributes | |
GLuint | m_programID = 0 |
the id for the program | |
GLuint | m_vertShaderID = 0 |
the ids for the vertex and fragment shaders | |
GLuint | m_fragShaderID = 0 |
utils::Path | m_vert |
The files containing the vertex and fragment shaders. | |
utils::Path | m_frag |
int | m_numAttributes = 0 |
the number of attributes used by the vertex shader | |
bool | m_isLinked = false |
keeps track of whether or not the shaders have been linked | |
Friends | |
class | ContextData |
represents a program written in GLSL comprised of a vertex shader and a fragment shader
Definition at line 14 of file GLSLProgram.h.