GLSLProgram Class Reference
Detailed Description
GLSL program class.
This class provides basic functionality for building GLSL programs using vertex and fragment shaders, along with optionally geometry and tessellation shaders. The shader sources can be provides as GLSLShader class objects, source strings, or file names. This class also stores a vector of registered uniform parameter IDs.
#include <cyGL.h>
Classes | |
class | Param |
Public Member Functions | |
GLSLProgram () | |
Constructor. | |
virtual | ~GLSLProgram () |
Destructor that deletes the program. | |
Param | operator[] (char const *name) |
GLint | AttribLocation (char const *name) const |
void | SetAttribBuffer (char const *name, GLint arrayBufferID, int dimensions, GLenum type=GL_FLOAT, GLboolean normalized=GL_FALSE, GLsizei stride=0, size_t offset=0) |
void | EnableAttrib (char const *name) |
void | DisableAttrib (char const *name) |
General Methods | |
void | Delete () |
Deletes the program. | |
GLuint | GetID () const |
Returns the program ID. | |
bool | IsNull () const |
Returns true if the OpenGL program object is not generated, i.e. the program id is invalid. | |
void | Bind () const |
Binds the program for rendering. | |
void | CreateProgram () |
Attaches the given shader to the program. This function must be called before calling Link. | |
void | AttachShader (GLSLShader const &shader) |
Attaches the given shader to the program. This function must be called before calling Link. | |
void | AttachShader (GLuint shaderID) |
Attaches the given shader to the program. This function must be called before calling Link. | |
bool | Link (std::ostream *outStream=&std::cout) |
Links the program. The shaders must be attached before calling this function. Returns true if the link operation is successful. Writes any error or warning messages to the given output stream. | |
Build Methods | |
bool | Build (GLSLShader const *vertexShader, GLSLShader const *fragmentShader, GLSLShader const *geometryShader=nullptr, GLSLShader const *tessControlShader=nullptr, GLSLShader const *tessEvaluationShader=nullptr, std::ostream *outStream=&std::cout) |
Creates a program, compiles the given shaders, and links them. Returns true if all compilation and link operations are successful. Writes any error or warning messages to the given output stream. | |
bool | BuildFiles (char const *vertexShaderFile, char const *fragmentShaderFile, char const *geometryShaderFile=nullptr, char const *tessControlShaderFile=nullptr, char const *tessEvaluationShaderFile=nullptr, std::ostream *outStream=&std::cout) |
Creates a program, compiles the given shaders, and links them. Returns true if all compilation and link operations are successful. Writes any error or warning messages to the given output stream. | |
bool | BuildFiles (char const *vertexShaderFile, char const *fragmentShaderFile, char const *geometryShaderFile, char const *tessControlShaderFile, char const *tessEvaluationShaderFile, char const *prependSource, std::ostream *outStream=&std::cout) |
Creates a program, compiles the given shaders, and links them. Returns true if all compilation and link operations are successful. Writes any error or warning messages to the given output stream. The prependSource string is added to the beginning of each shader code, so it must begin with the "#version" statement. | |
bool | BuildFiles (char const *vertexShaderFile, char const *fragmentShaderFile, char const *geometryShaderFile, char const *tessControlShaderFile, char const *tessEvaluationShaderFile, int prependSourceCount, char const **prependSource, std::ostream *outStream=&std::cout) |
Creates a program, compiles the given shaders, and links them. Returns true if all compilation and link operations are successful. Writes any error or warning messages to the given output stream. The prependSources strings are added to the beginning of each shader code, so the first string must begin with "#version" statement. | |
bool | BuildSources (char const *vertexShaderSourceCode, char const *fragmentShaderSourceCode, char const *geometryShaderSourceCode=nullptr, char const *tessControlShaderSourceCode=nullptr, char const *tessEvaluationShaderSourceCode=nullptr, std::ostream *outStream=&std::cout) |
Creates a program, compiles the given shaders, and links them. Returns true if all compilation and link operations are successful. Writes any error or warning messages to the given output stream. | |
bool | BuildSources (char const *vertexShaderSourceCode, char const *fragmentShaderSourceCode, char const *geometryShaderSourceCode, char const *tessControlShaderSourceCode, char const *tessEvaluationShaderSourceCode, char const *prependSource, std::ostream *outStream=&std::cout) |
Creates a program, compiles the given shaders, and links them. Returns true if all compilation and link operations are successful. Writes any error or warning messages to the given output stream. The prependSource string is added to the beginning of each shader code, so it must begin with the "#version" statement. | |
bool | BuildSources (char const *vertexShaderSourceCode, char const *fragmentShaderSourceCode, char const *geometryShaderSourceCode, char const *tessControlShaderSourceCode, char const *tessEvaluationShaderSourceCode, int prependSourceCount, char const **prependSource, std::ostream *outStream=&std::cout) |
Creates a program, compiles the given shaders, and links them. Returns true if all compilation and link operations are successful. Writes any error or warning messages to the given output stream. The prependSources strings are added to the beginning of each shader code, so the first string must begin with "#version" statement. | |
Uniform Parameter Methods | |
void | RegisterUniform (unsigned int index, char const *name, std::ostream *outStream=&std::cout) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | RegisterUniforms (char const *names, unsigned int startingIndex=0, std::ostream *outStream=&std::cout) |
Registers multiple parameters. The names should be separated by a space character. | |
void | SetUniform (int index, float x) |
Sets the value of the uniform parameter with the given index. The uniform parameter must be registered before using RegisterUniform() or RegisterUniforms(). The program must be bind by calling Bind() before calling this method. | |
void | SetUniform (int index, float x, float y) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform (int index, float x, float y, float z) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform (int index, float x, float y, float z, float w) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform1 (int index, float const *data, int count=1) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform2 (int index, float const *data, int count=1) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform3 (int index, float const *data, int count=1) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform4 (int index, float const *data, int count=1) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform (int index, int x) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform (int index, int x, int y) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform (int index, int x, int y, int z) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform (int index, int x, int y, int z, int w) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform1 (int index, int const *data, int count=1) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform2 (int index, int const *data, int count=1) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform3 (int index, int const *data, int count=1) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform4 (int index, int const *data, int count=1) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform (int index, GLuint x) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform (int index, GLuint x, GLuint y) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform (int index, GLuint x, GLuint y, GLuint z) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform (int index, GLuint x, GLuint y, GLuint z, GLuint w) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform1 (int index, GLuint const *data, int count=1) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform2 (int index, GLuint const *data, int count=1) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform3 (int index, GLuint const *data, int count=1) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform4 (int index, GLuint const *data, int count=1) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform (int index, double x) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform (int index, double x, double y) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform (int index, double x, double y, double z) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform (int index, double x, double y, double z, double w) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform1 (int index, double const *data, int count=1) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform2 (int index, double const *data, int count=1) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform3 (int index, double const *data, int count=1) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform4 (int index, double const *data, int count=1) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix2 (int index, float const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix3 (int index, float const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix4 (int index, float const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix2x3 (int index, float const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix2x4 (int index, float const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix3x2 (int index, float const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix3x4 (int index, float const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix4x2 (int index, float const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix4x3 (int index, float const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix2 (int index, double const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix3 (int index, double const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix4 (int index, double const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix2x3 (int index, double const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix2x4 (int index, double const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix3x2 (int index, double const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix3x4 (int index, double const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix4x2 (int index, double const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniformMatrix4x3 (int index, double const *m, int count=1, bool transpose=false) |
Registers a single uniform parameter. The index must be unique and the name should match a uniform parameter name in one of the shaders. The index values for different parameters don't have to be consecutive, but unused index values waste memory. | |
void | SetUniform (char const *name, float x) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform (char const *name, float x, float y) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform (char const *name, float x, float y, float z) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform (char const *name, float x, float y, float z, float w) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform1 (char const *name, float const *data, int count=1) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform2 (char const *name, float const *data, int count=1) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform3 (char const *name, float const *data, int count=1) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform4 (char const *name, float const *data, int count=1) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform (char const *name, int x) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform (char const *name, int x, int y) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform (char const *name, int x, int y, int z) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform (char const *name, int x, int y, int z, int w) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform1 (char const *name, int const *data, int count=1) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform2 (char const *name, int const *data, int count=1) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform3 (char const *name, int const *data, int count=1) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform4 (char const *name, int const *data, int count=1) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform (char const *name, GLuint x) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform (char const *name, GLuint x, GLuint y) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform (char const *name, GLuint x, GLuint y, GLuint z) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform (char const *name, GLuint x, GLuint y, GLuint z, GLuint w) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform1 (char const *name, GLuint const *data, int count=1) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform2 (char const *name, GLuint const *data, int count=1) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform3 (char const *name, GLuint const *data, int count=1) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform4 (char const *name, GLuint const *data, int count=1) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform (char const *name, double x) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform (char const *name, double x, double y) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform (char const *name, double x, double y, double z) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform (char const *name, double x, double y, double z, double w) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform1 (char const *name, double const *data, int count=1) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform2 (char const *name, double const *data, int count=1) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform3 (char const *name, double const *data, int count=1) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniform4 (char const *name, double const *data, int count=1) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix2 (char const *name, float const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix3 (char const *name, float const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix4 (char const *name, float const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix2x3 (char const *name, float const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix2x4 (char const *name, float const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix3x2 (char const *name, float const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix3x4 (char const *name, float const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix4x2 (char const *name, float const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix4x3 (char const *name, float const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix2 (char const *name, double const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix3 (char const *name, double const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix4 (char const *name, double const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix2x3 (char const *name, double const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix2x4 (char const *name, double const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix3x2 (char const *name, double const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix3x4 (char const *name, double const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix4x2 (char const *name, double const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |
void | SetUniformMatrix4x3 (char const *name, double const *m, int count=1, bool transpose=false) |
glUseProgram(programID); int id = glGetUniformLocation( programID, name ); if ( id >= 0 ) Sets the value of the uniform parameter with the given name, if the uniform parameter is found. Since it searches for the uniform parameter first, it is not as efficient as setting the uniform parameter using a previously registered id. There is no need to bind the program before calling this method. | |