Uniform Value, which is used to store to value send to openGL pipe line by glUniformXXX.
More...
Uniform Value, which is used to store to value send to openGL pipe line by glUniformXXX.
Constructor.
The Uniform and Glprogram will be nullptr.
Constructor.
The Uniform and Glprogram will be nullptr.
Constructor with uniform and glprogram.
- Parameters
-
uniform | Uniform to apply the value. |
glprogram | Specify the owner GLProgram of this uniform and uniform value. |
Constructor with uniform and glprogram.
- Parameters
-
uniform | Uniform to apply the value. |
glprogram | Specify the owner GLProgram of this uniform and uniform value. |
void setFloat |
( |
float |
value | ) |
|
Set data to Uniform value. Generally, there are many type of data could be supported, including float, int, Vec2/3/4, Mat4.
- Parameters
-
value | Value to be sent, support float, int, Vec2/3/4, Mat4. |
var setFloat |
( |
var |
value | ) |
|
Set data to Uniform value. Generally, there are many type of data could be supported, including float, int, Vec2/3/4, Mat4.
- Parameters
-
value | Value to be sent, support float, int, Vec2/3/4, Mat4. |
void setCallback |
( |
const std::function< void(GLProgram *, Uniform *)> & |
callback | ) |
|
Set call back to uniform value, which could be used for array and struct.
- Parameters
-
callback | 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.
- Parameters
-
callback | Callback function to send data to OpenGL pipeline. |
void setTexture |
( |
GLuint |
textureId, |
|
|
GLuint |
textureUnit |
|
) |
| |
Set texture to uniform value.
- Parameters
-
textureId | The texture handle. |
textureUnit | The binding texture unit to be used in shader. |
var setTexture |
( |
var |
textureId, |
|
|
var |
textureUnit |
|
) |
| |
Set texture to uniform value.
- Parameters
-
textureId | The texture handle. |
textureUnit | The binding texture unit to be used in shader. |
void setTexture |
( |
Texture2D * |
texture, |
|
|
GLuint |
textureUnit |
|
) |
| |
Set texture to uniform value.
- Parameters
-
texture | The texture. |
textureUnit | The binding texture unit to be used in shader. |
var setTexture |
( |
var |
texture, |
|
|
var |
textureUnit |
|
) |
| |
Set texture to uniform value.
- Parameters
-
texture | The texture. |
textureUnit | The binding texture unit to be used in shader. |
Apply the uniform value to openGL pipeline.
Apply the uniform value to openGL pipeline.
The documentation for this class was generated from the following file: