Moai SDK
2.0
|
Inherits MOAILuaObject.
Function List | |
getIndexBatchSize | |
reserveMaterials | |
setBlendMode | |
setIndexBatchSize | |
|
Get the index batch size.
function getIndexBatchSize ( MOAIMaterialBatch self )
MOAIMaterialBatch | self |
|
Reserve material indices.
function reserveMaterials ( MOAIMaterialBatch self [, number count ] )
MOAIMaterialBatch | self |
number | count Optional. |
|
function Set blend mode using OpenGL source and dest factors. OpenGl blend factor constants are exposed as members of MOAIMaterialBatch. See the OpenGL documentation for an explanation of blending constants. ( MOAIMaterialBatch self, number srcFactor, number dstFactor )
MOAIMaterialBatch | self |
number | srcFactor |
number | dstFactor |
|
Set the index batch size. When a prop or deck is drawing, the index is divided by the material batch's index batch size to get the material index. In this way sets of deck indices may be assigned to material indices. For example, an index batch size of 256 for a set of 4 materials would distribute 1024 deck indices across materials 1 though 4. An index batch size of 1 would create a 1 to 1 mapping between deck indices and materials.
function setIndexBatchSize ( MOAIMaterialBatch self [, number indexBatchSize ] )
MOAIMaterialBatch | self |
number | indexBatchSize Optional. Default value is 1. |