Class InstancedMeshDraw
Many copies of one mesh, one draw. The shader declares
in mat4 instanceTransform. Each matrix is the
DrawModelEx product: scale, then rotation, then translation.
Copies share one material. A different tint is a different draw.
public sealed class InstancedMeshDraw : IDisposable
- Inheritance
-
InstancedMeshDraw
- Implements
- Inherited Members
Constructors
InstancedMeshDraw(Shader)
public InstancedMeshDraw(Shader shader)
Parameters
shaderShader
Properties
Ready
False when the shader has no instanceTransform, or that
attribute landed on locations 0–3 (those are position, uv, normal, color).
public bool Ready { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Draw(Model, ReadOnlySpan<Matrix4x4>)
public void Draw(Model model, ReadOnlySpan<Matrix4x4> transforms)
Parameters
modelModeltransformsReadOnlySpan<Matrix4x4>