Moai SDK  1.5 revision 1 (MoaiEdition)
MOAIVertexFormat Class Reference

Inherits MOAILuaObject.

List of all members.

Function List

  declareAttribute
  declareColor
  declareCoord
  declareNormal
  declareUV

Function Documentation

Declare a custom attribute (for use with programmable pipeline).


function declareAttribute ( MOAIVertexFormat self, number index, number type, number size [, boolean normalized ] )
Parameters:
self ( MOAIVertexFormat )
index ( number ) Default value is 1.
type ( number ) Data type of component elements. See OpenGL ES documentation.
size ( number ) Number of elements. See OpenGL ES documentation.
normalized ( boolean ) Optional. See OpenGL ES documentation.
Returns:
nil

Declare a vertex color.


function declareColor ( MOAIVertexFormat self, number index, number type )
Parameters:
self ( MOAIVertexFormat )
index ( number )
type ( number ) Data type of component elements. See OpenGL ES documentation.
Returns:
nil

Declare a vertex coordinate.


function declareCoord ( MOAIVertexFormat self, number index, number type, number size )
Parameters:
self ( MOAIVertexFormat )
index ( number )
type ( number ) Data type of coordinate elements. See OpenGL ES documentation.
size ( number ) Number of coordinate elements. See OpenGL ES documentation.
Returns:
nil

Declare a vertex normal.


function declareNormal ( MOAIVertexFormat self, number index, number type )
Parameters:
self ( MOAIVertexFormat )
index ( number )
type ( number ) Data type of normal elements. See OpenGL ES documentation.
Returns:
nil

Declare a vertex texture coordinate.


function declareUV ( MOAIVertexFormat self, number index, number type, number size )
Parameters:
self ( MOAIVertexFormat )
index ( number )
type ( number ) Data type of texture coordinate elements. See OpenGL ES documentation.
size ( number ) Number of texture coordinate elements. See OpenGL ES documentation.
Returns:
nil