Represents an openGL uniform value. More...
#include <juce_OpenGLShaderProgram.h>
Public Attributes | |
GLint | uniformID |
The uniform's ID number. | |
Represents an openGL uniform value.
After a program has been linked, you can create Uniform objects to let you set the uniforms that your shaders use.
Be careful not to call the set() functions unless the appropriate program is loaded into the current context.
OpenGLShaderProgram::Uniform::Uniform | ( | const OpenGLShaderProgram & | program, |
const char * | uniformName ) |
Initialises a uniform.
The program must have been successfully linked when this constructor is called.
Sets a vec2 uniform.
Sets a vec3 uniform.
|
noexcept |
Sets a vec4 uniform.
Sets an ivec4 uniform.
Sets a vector float uniform.
|
noexcept |
Sets a 2x2 matrix float uniform.
|
noexcept |
Sets a 3x3 matrix float uniform.
|
noexcept |
Sets a 4x4 matrix float uniform.
GLint OpenGLShaderProgram::Uniform::uniformID |
The uniform's ID number.
If the uniform couldn't be found, this value will be < 0.