pub type InstancedModel<M> = Gm<InstancedMesh, M>;
Expand description

Similar to Model, except it is possible to render many instances of the same model efficiently.

Implementations

Creates a new instanced 3D model with a triangle mesh as geometry and a default ColorMaterial. The model is rendered in as many instances as there are Instance structs given as input. The transformation and texture transform in Instance are applied to each model instance before they are rendered.

Creates a new instanced 3D model with a triangle mesh as geometry and the given material. The model is rendered in as many instances as there are Instance structs given as input. The transformation and texture transform in Instance are applied to each model instance before they are rendered.