class MeshBatch
package h3d.scene
extends MultiMaterial › Mesh › Object
extended by AnimMeshBatch, GPUMeshBatch
h3d.scene.MeshBatch allows to draw multiple meshed in a single draw call. See samples/MeshBatch.hx for an example.
Constructor
Variables
curLod:Int = -1
With EnableCpuLod, set the lod of the next emitInstance. Without EnableCpuLod and not using primitiveSubParts, set the lod of the whole batch.
primitiveSubParts:Array<MeshBatchPart>
Tells the mesh batch to draw only a subpart of the primitive. One primitiveSubPart per material.
shadersChanged:Bool = true
Set if shader list or shader constants has changed, before calling begin()
Methods
enableGpuUpdate():Void
Buffer of per instance params such as position is created with its own format allowing compute shaders to update those parameters.
enableStorageBuffer():Void
Buffer of per instance params such as position is created as a storage buffer allowing for huge amount of instances.
forceGpuUpdate():Void
Force PerInstance to be setup by a compute shader. Don't support without Storage Buffer to simplify implementation.