Moai SDK
2.0
|
Inherits MOAILuaObject.
Function List | |
declareAttribute | |
declareColor | |
declareCoord | |
declareNormal | |
declareUV | |
getVertexSize | |
|
Declare a custom attribute (for use with programmable pipeline).
function declareAttribute ( MOAIVertexFormat self, number index, number type, number size [, boolean normalized, number use ] )
MOAIVertexFormat | self |
number | index Default value is 1. |
number | type Data type of component elements. See OpenGL ES documentation. |
number | size Number of elements. See OpenGL ES documentation. |
boolean | normalized Optional. See OpenGL ES documentation. |
number | use Optional. One of MOAIVertexFormat.ATTRIBUTE_COLOR, MOAIVertexFormat.ATTRIBUTE_NORMAL, MOAIVertexFormat.ATTRIBUTE_TEX_COORD, MOAIVertexFormat.ATTRIBUTE_COORD, MOAIVertexFormat.VERTEX_USER, |
|
Declare a vertex color.
function declareColor ( MOAIVertexFormat self, number index, number type )
MOAIVertexFormat | self |
number | index |
number | type Data type of component elements. See OpenGL ES documentation. |
|
Declare a vertex coordinate.
function declareCoord ( MOAIVertexFormat self, number index, number type, number size )
MOAIVertexFormat | self |
number | index |
number | type Data type of coordinate elements. See OpenGL ES documentation. |
number | size Number of coordinate elements. See OpenGL ES documentation. |
|
Declare a vertex normal.
function declareNormal ( MOAIVertexFormat self, number index, number type )
MOAIVertexFormat | self |
number | index |
number | type Data type of normal elements. See OpenGL ES documentation. |
|
Declare a vertex texture coordinate.
function declareUV ( MOAIVertexFormat self, number index, number type, number size )
MOAIVertexFormat | self |
number | index |
number | type Data type of texture coordinate elements. See OpenGL ES documentation. |
number | size Number of texture coordinate elements. See OpenGL ES documentation. |
|
Return the size (in bytes) of the vertex described by the vertex format.
function getVertexSize ( MOAIVertexFormat self )
MOAIVertexFormat | self |