Uniform Value, which is used to store to value send to openGL pipe line by glUniformXXX.
More...
#include <CCGLProgramState.h>
Uniform Value, which is used to store to value send to openGL pipe line by glUniformXXX.
Construtor. If contruct the UniformValue with no param, the Uniform and Glprogram will be nullptr.
- Parameters
-
uniform | Uniform to apply the value. |
glprogram | Specify the owner GLProgram of this uniform and uniform value. |
Construtor. If contruct the UniformValue with no param, the Uniform and Glprogram will be nullptr.
- Parameters
-
uniform | Uniform to apply the value. |
glprogram | Specify the owner GLProgram of this uniform and uniform value. |
Construtor. If contruct the UniformValue with no param, the Uniform and Glprogram will be nullptr.
- Parameters
-
uniform | Uniform to apply the value. |
glprogram | Specify the owner GLProgram of this uniform and uniform value. |
Apply the uniform value to openGL pipeline.
Apply the uniform value to openGL pipeline.
Apply the uniform value to openGL pipeline.
void setCallback |
( |
const std::function< void(GLProgram *, Uniform *)> & |
callback | ) |
|
var setCallback |
( |
var |
callback | ) |
|
local setCallback |
( |
local |
callback | ) |
|
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 and texture. Besides of this, there are also custom call back functions for sending data when you want to send struct or array data. If we want to send texture to uniform, there are two value to send, first one is texture handle ID, the second one the texture unit.
- Parameters
-
value | Value to be sent, support float, int, Vec2/3/4, Mat4. |
textureID | The texture handle. |
textureUnit | The binding texture unit to be used in shader. |
callback | Callback function to send data to OpenGL pipeline. |
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 and texture. Besides of this, there are also custom call back functions for sending data when you want to send struct or array data. If we want to send texture to uniform, there are two value to send, first one is texture handle ID, the second one the texture unit.
- Parameters
-
value | Value to be sent, support float, int, Vec2/3/4, Mat4. |
textureID | The texture handle. |
textureUnit | The binding texture unit to be used in shader. |
callback | Callback function to send data to OpenGL pipeline. |
local setFloat |
( |
local |
value | ) |
|
Set data to Uniform value. Generally, there are many type of data could be supported, including float, int, Vec2/3/4, Mat4 and texture. Besides of this, there are also custom call back functions for sending data when you want to send struct or array data. If we want to send texture to uniform, there are two value to send, first one is texture handle ID, the second one the texture unit.
- Parameters
-
value | Value to be sent, support float, int, Vec2/3/4, Mat4. |
textureID | The texture handle. |
textureUnit | The binding texture unit to be used in shader. |
callback | Callback function to send data to OpenGL pipeline. |
local setInt |
( |
local |
value | ) |
|
void setMat4 |
( |
const Mat4 & |
value | ) |
|
local setMat4 |
( |
local |
value | ) |
|
void setTexture |
( |
GLuint |
textureId, |
|
|
GLuint |
textureUnit |
|
) |
| |
var setTexture |
( |
var |
textureId, |
|
|
var |
textureUnit |
|
) |
| |
local setTexture |
( |
local |
textureId, |
|
|
local |
textureUnit |
|
) |
| |
void setVec2 |
( |
const Vec2 & |
value | ) |
|
local setVec2 |
( |
local |
value | ) |
|
void setVec3 |
( |
const Vec3 & |
value | ) |
|
local setVec3 |
( |
local |
value | ) |
|
void setVec4 |
( |
const Vec4 & |
value | ) |
|
local setVec4 |
( |
local |
value | ) |
|
Weak reference to GLprogram.
Weak reference to GLprogram.
Weak reference to GLprogram.
Whether or not callback is used.
Whether or not callback is used.
Whether or not callback is used.
The documentation for this class was generated from the following file: