Vertex Attribute Value, which is an abstraction of VertexAttribute and data pointer. More...
Public Member Functions | |
VertexAttribValue (VertexAttrib *vertexAttrib) | |
Constructor. More... | |
VertexAttribValue ( var vertexAttrib) | |
Constructor. More... | |
VertexAttribValue () | |
Constructor. | |
~VertexAttribValue () | |
Destructor. | |
~VertexAttribValue () | |
Destructor. | |
void | setPointer (GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLvoid *pointer) |
Set the data pointer, which is similar as glVertexAttribPointer. More... | |
var | setPointer ( var size, var type, var normalized, var stride, var pointer) |
Set the data pointer, which is similar as glVertexAttribPointer. More... | |
void | setCallback (const std::function< void(VertexAttrib *)> &callback) |
Set a user call back for set VertexAttrib array. More... | |
void | apply () |
Apply the vertex attribute to the openGL pipeline. More... | |
Vertex Attribute Value, which is an abstraction of VertexAttribute and data pointer.
VertexAttribValue | ( | VertexAttrib * | vertexAttrib | ) |
Constructor.
vertexAttrib | VertexAttrib from shader. |
var VertexAttribValue | ( | var | vertexAttrib | ) |
Constructor.
vertexAttrib | VertexAttrib from shader. |
void setPointer | ( | GLint | size, |
GLenum | type, | ||
GLboolean | normalized, | ||
GLsizei | stride, | ||
GLvoid * | pointer | ||
) |
Set the data pointer, which is similar as glVertexAttribPointer.
size | The number of type in the vertex attribute. |
type | The type of data in vertex attribute. |
normalized | If true, 0-255 data will be mapped to 0.0-1.0. |
stride | The number of bytes if an interleaved vertex array is used. 0 means array is not interleaved. |
pointer | The pointer to the vertex data. |
var setPointer | ( | var | size, |
var | type, | ||
var | normalized, | ||
var | stride, | ||
var | pointer | ||
) |
Set the data pointer, which is similar as glVertexAttribPointer.
size | The number of type in the vertex attribute. |
type | The type of data in vertex attribute. |
normalized | If true, 0-255 data will be mapped to 0.0-1.0. |
stride | The number of bytes if an interleaved vertex array is used. 0 means array is not interleaved. |
pointer | The pointer to the vertex data. |
void setCallback | ( | const std::function< void(VertexAttrib *)> & | callback | ) |
Set a user call back for set VertexAttrib array.
var setCallback | ( | var | callback | ) |
Set a user call back for set VertexAttrib array.
void apply | ( | ) |
Apply the vertex attribute to the openGL pipeline.
var apply | ( | ) |
Apply the vertex attribute to the openGL pipeline.