GLProgramState holds the 'state' (uniforms and attributes) of the GLProgram.
More...
Inherits Ref.
|
|
unsigned int | _ID |
| | object id, ScriptSupport need public _ID
|
| |
|
int | _luaID |
| | Lua reference id.
|
| |
|
void * | _scriptObject |
| | scriptObject, support for swift
|
| |
GLProgramState holds the 'state' (uniforms and attributes) of the GLProgram.
A GLProgram can be used by thousands of Nodes, but if different uniform values are going to be used, then each node will need its own GLProgramState
| void apply |
( |
const Mat4 & |
modelView | ) |
|
Apply GLProgram, attributes and uniforms.
- Parameters
-
| modelView | The applied modelView matrix to shader. |
| var apply |
( |
var |
modelView | ) |
|
Apply GLProgram, attributes and uniforms.
- Parameters
-
| modelView | The applied modelView matrix to shader. |
| local apply |
( |
local |
modelView | ) |
|
Apply GLProgram, attributes and uniforms.
- Parameters
-
| modelView | The applied modelView matrix to shader. |
| void applyGLProgram |
( |
const Mat4 & |
modelView | ) |
|
Apply GLProgram, and built in uniforms.
- Parameters
-
| modelView | The applied modelView matrix to shader. |
| var applyGLProgram |
( |
var |
modelView | ) |
|
Apply GLProgram, and built in uniforms.
- Parameters
-
| modelView | The applied modelView matrix to shader. |
| local applyGLProgram |
( |
local |
modelView | ) |
|
Apply GLProgram, and built in uniforms.
- Parameters
-
| modelView | The applied modelView matrix to shader. |
| void applyAttributes |
( |
bool |
applyAttribFlags = true | ) |
|
Apply attributes.
- Parameters
-
| applyAttribFlags | Call GL::enableVertexAttribs(_vertexAttribsFlags) or not. |
| var applyAttributes |
( |
var |
applyAttribFlags = true | ) |
|
Apply attributes.
- Parameters
-
| applyAttribFlags | Call GL::enableVertexAttribs(_vertexAttribsFlags) or not. |
| local applyAttributes |
( |
local |
applyAttribFlags = true | ) |
|
Apply attributes.
- Parameters
-
| applyAttribFlags | Call GL::enableVertexAttribs(_vertexAttribsFlags) or not. |
Setter and Getter of the owner GLProgram binded in this program state.
| var setGLProgram |
( |
var |
glprogram | ) |
|
Setter and Getter of the owner GLProgram binded in this program state.
| local setGLProgram |
( |
local |
glprogram | ) |
|
Setter and Getter of the owner GLProgram binded in this program state.
| uint32_t getVertexAttribsFlags |
( |
| ) |
const |
|
inline |
Get the flag of vertex attribs used by OR operation.
| var getVertexAttribsFlags |
( |
| ) |
|
|
inline |
Get the flag of vertex attribs used by OR operation.
| local getVertexAttribsFlags |
( |
| ) |
|
|
inline |
Get the flag of vertex attribs used by OR operation.
| ssize_t getVertexAttribCount |
( |
| ) |
const |
|
inline |
Get the number of vertex attributes.
| var getVertexAttribCount |
( |
| ) |
|
|
inline |
Get the number of vertex attributes.
| local getVertexAttribCount |
( |
| ) |
|
|
inline |
Get the number of vertex attributes.
| void setVertexAttribCallback |
( |
const std::string & |
name, |
|
|
const std::function< void(VertexAttrib *)> & |
callback |
|
) |
| |
Set the vertex attribute value.
| var setVertexAttribCallback |
( |
var |
name, |
|
|
var |
callback |
|
) |
| |
Set the vertex attribute value.
| local setVertexAttribCallback |
( |
local |
name, |
|
|
local |
callback |
|
) |
| |
Set the vertex attribute value.
| ssize_t getUniformCount |
( |
| ) |
const |
|
inline |
Get the number of user defined uniform count.
Get the number of user defined uniform count.
| local getUniformCount |
( |
| ) |
|
|
inline |
Get the number of user defined uniform count.
| void setUniformInt |
( |
const std::string & |
uniformName, |
|
|
int |
value |
|
) |
| |
Setting user defined uniforms by uniform string name in the shader.
| var setUniformInt |
( |
var |
uniformName, |
|
|
var |
value |
|
) |
| |
Setting user defined uniforms by uniform string name in the shader.
| local setUniformInt |
( |
local |
uniformName, |
|
|
local |
value |
|
) |
| |
Setting user defined uniforms by uniform string name in the shader.
| void setUniformInt |
( |
GLint |
uniformLocation, |
|
|
int |
value |
|
) |
| |
Setting user defined uniforms by uniform location in the shader.
| var setUniformInt |
( |
var |
uniformLocation, |
|
|
var |
value |
|
) |
| |
Setting user defined uniforms by uniform location in the shader.
| local setUniformInt |
( |
local |
uniformLocation, |
|
|
local |
value |
|
) |
| |
Setting user defined uniforms by uniform location in the shader.
The documentation for this class was generated from the following file: