Uniform Value, which is used to store to value send to openGL pipe line by glUniformXXX. More...
Public Member Functions | |
| UniformValue () | |
| Constructor. More... | |
| UniformValue (Uniform *uniform, GLProgram *glprogram) | |
| Constructor with uniform and glprogram. More... | |
| ~UniformValue () | |
| Destructor. | |
| void | setFloat (float value) |
| Set Uniform value. More... | |
| var | setFloat ( var value) |
| Set Uniform value. More... | |
| void | setInt (int value) |
| Set Uniform value. More... | |
| void | setFloatv (ssize_t size, const float *pointer) |
| Set Uniform value. More... | |
| void | setVec2 (const Vec2 &value) |
| Set Uniform value. More... | |
| void | setVec2v (ssize_t size, const Vec2 *pointer) |
| Set Uniform value. More... | |
| void | setVec3 (const Vec3 &value) |
| Set Uniform value. More... | |
| void | setVec3v (ssize_t size, const Vec3 *pointer) |
| Set Uniform value. More... | |
| void | setVec4 (const Vec4 &value) |
| Set Uniform value. More... | |
| void | setVec4v (ssize_t size, const Vec4 *pointer) |
| Set Uniform value. More... | |
| void | setMat4 (const Mat4 &value) |
| Set Uniform value. More... | |
| void | setCallback (const std::function< void(GLProgram *, Uniform *)> &callback) |
| Set call back to uniform value, which could be used for array and struct. More... | |
| void | setTexture (GLuint textureId, GLuint textureUnit) |
| Set texture to uniform value. More... | |
| void | apply () |
| Apply the uniform value to openGL pipeline. | |
Uniform Value, which is used to store to value send to openGL pipe line by glUniformXXX.
| UniformValue | ( | ) |
Constructor.
The Uniform and Glprogram will be nullptr.
| var UniformValue | ( | ) |
Constructor.
The Uniform and Glprogram will be nullptr.
| UniformValue | ( | Uniform * | uniform, |
| GLProgram * | glprogram | ||
| ) |
| var UniformValue | ( | var | uniform, |
| var | glprogram | ||
| ) |
| void setFloat | ( | float | value | ) |
Set Uniform value.
The float value
| var setFloat | ( | var | value | ) |
Set Uniform value.
The float value
| void setInt | ( | int | value | ) |
Set Uniform value.
The int value
| var setInt | ( | var | value | ) |
Set Uniform value.
The int value
| void setFloatv | ( | ssize_t | size, |
| const float * | pointer | ||
| ) |
Set Uniform value.
The number of float. The float value pointer
| var setFloatv | ( | var | size, |
| var | pointer | ||
| ) |
Set Uniform value.
The number of float. The float value pointer
| void setVec2v | ( | ssize_t | size, |
| const Vec2 * | pointer | ||
| ) |
| var setVec2v | ( | var | size, |
| var | pointer | ||
| ) |
| void setVec3v | ( | ssize_t | size, |
| const Vec3 * | pointer | ||
| ) |
| var setVec3v | ( | var | size, |
| var | pointer | ||
| ) |
| void setVec4v | ( | ssize_t | size, |
| const Vec4 * | pointer | ||
| ) |
| var setVec4v | ( | var | size, |
| var | pointer | ||
| ) |
Set call back to uniform value, which could be used for array and struct.
Callback function to send data to OpenGL pipeline.
| var setCallback | ( | var | callback | ) |
Set call back to uniform value, which could be used for array and struct.
Callback function to send data to OpenGL pipeline.
| void setTexture | ( | GLuint | textureId, |
| GLuint | textureUnit | ||
| ) |
Set texture to uniform value.
The texture handle. The binding texture unit to be used in shader.
| var setTexture | ( | var | textureId, |
| var | textureUnit | ||
| ) |
Set texture to uniform value.
The texture handle. The binding texture unit to be used in shader.