drawVertexBufferInstances

fun drawVertexBufferInstances(    drawContext: DrawContext,     drawStyle: DrawStyle,     primitive: DrawPrimitive,     vertexBuffers: List<VertexBuffer>,     instanceAttributes: List<VertexBuffer>,     offset: Int,     vertexCount: Int,     instanceCount: Int)(source)

Renders multiple instances of a vertex buffer with attributes applied per instance.

This method executes instance-based rendering using a collection of vertex buffers and instance-specific attributes. The rendering settings and behavior are defined by the provided draw context and draw style.

Parameters

drawContext

The current drawing context containing transformation matrices and other parameters necessary for rendering.

drawStyle

The style settings including fill, stroke, and other graphical properties used for rendering.

primitive

The type of drawing primitive (e.g., TRIANGLES, LINES) to use during rendering.

vertexBuffers

The list of vertex buffers containing vertex data such as position, color, or texture coordinates.

instanceAttributes

The list of vertex buffers containing attribute data specific to each instance (e.g., transformation matrices or instance-level properties).

offset

The starting offset in the vertex buffer to begin reading vertex data.

vertexCount

The number of vertices to use from the vertex buffers for rendering each instance.

instanceCount

The number of instances of the specified primitive to render.


fun drawVertexBufferInstances(    drawContext: DrawContext,     drawStyle: DrawStyle,     primitive: DrawPrimitive,     indexBuffer: IndexBuffer,     vertexBuffers: List<VertexBuffer>,     instanceAttributes: List<VertexBuffer>,     offset: Int,     indexCount: Int,     instanceCount: Int)(source)

Renders multiple instances of a vertex buffer with attributes applied per instance.

This method uses the specified index buffer, vertex buffers, and instance attributes to draw multiple instances of graphical primitives. The rendering settings and styling are determined by the provided draw context and draw style.

Parameters

drawContext

The current drawing context containing transformation matrices and other parameters necessary for rendering.

drawStyle

The style settings, including fill, stroke, and other graphical properties used for rendering.

primitive

The type of drawing primitive (e.g., TRIANGLES, LINES) to use during rendering.

indexBuffer

The index buffer containing indices that define how vertices should be combined to create the specified primitives.

vertexBuffers

The list of vertex buffers containing vertex data such as position, color, or texture coordinates.

instanceAttributes

The list of vertex buffers containing per-instance attribute data (e.g., transformations or instance-specific properties).

offset

The starting offset in the index buffer for rendering.

indexCount

The number of indices from the index buffer to be used for rendering.

instanceCount

The number of instances of the specified primitive to render.