vertexBufferInstances

fun vertexBufferInstances(    vertexBuffers: List<VertexBuffer>,     instanceAttributes: List<VertexBuffer>,     primitive: DrawPrimitive,     instanceCount: Int,     offset: Int = 0,     vertexCount: Int = vertexBuffers[0].vertexCount)(source)

Issues a draw call for rendering geometry using multiple vertex buffers with instancing.

Parameters

vertexBuffers

A list of vertex buffers containing per-vertex attributes for the geometry.

instanceAttributes

A list of vertex buffers containing per-instance attributes for instanced rendering.

primitive

The type of geometric primitive to be drawn (e.g., triangles, lines).

instanceCount

The number of instances of the geometry to render.

offset

The starting position in the vertex buffer from which to begin drawing.

vertexCount

The number of vertices to be rendered. Defaults to the vertex count of the first vertex buffer.


fun vertexBufferInstances(    indexBuffer: IndexBuffer,     vertexBuffers: List<VertexBuffer>,     instanceAttributes: List<VertexBuffer>,     primitive: DrawPrimitive,     instanceCount: Int,     offset: Int = 0,     indexCount: Int = indexBuffer.indexCount)(source)

Draws instances of a vertex buffer with the specified parameters.

Parameters

indexBuffer

The index buffer containing indices to define the vertices to be drawn.

vertexBuffers

A list of vertex buffers that define the vertex data for rendering.

instanceAttributes

A list of vertex buffers that define attributes for each instance.

primitive

The primitive type used for rendering (e.g., triangles, lines).

instanceCount

The number of instances to render.

offset

The starting index in the index buffer for drawing, defaults to 0.

indexCount

The number of indices to use for drawing, defaults to the total index count in the index buffer.