Class: l3dbatchbuffer

l3dbatchbuffer contains precompiled models. It is meant for efficient rendering of static geometry. Every model affected is transformed using the current hierarchy informatons and its vertices and indices are modified, so that the models are stored in big chunks. Meshes then can be batched to minimize drawcalls.

Hierarchy

o-+ l3dlist
  o-+ l3dbatchbuffer

Methods:

new (l3dset,scenenode root)
returns: (l3dbatchbuffer)
returns a new l3dbatchbuffer for the given l3dset and scenenode. All models, that are part of the given l3dset and either directly or indirectly linked to the given scenenode or its children, will be added to the batchbuffer and get their vertex and index data from it. Animateable models or those marked as nonbatchable will not be added, neither those with unsupported primitive types (triangle fans,line loop,line strip, polygon). Properties such as color and renderscale will be ignored and reset. Note that the matrices are calculated with the latest information for affected l3dnodes and scenenodes, that means make sure the scene is properly set up before. l3dnodes that are linked to bones, will not be added, nor their children, as they are considered animated. You can still modify the resulting worldspace vertexdata via vertexarray/indexarray interface from the affected l3dmodels.
It is important that you do not change the models position/rotation after batchcompiling, as visibility culling is still based on those.
Avoid using matobject interfaces on batchcompiled geometry.
delete (l3dbatchbuffer)
returns: ()
destroys the batchbuffer and all content in it. All linked drawnodes will revert back to their models' meshes and become fully operational again.

Inherited Methods:

From l3dlist