Builder

class Builder

Builder for creating IndexBuffer instances.

Configure the index count and type (16-bit or 32-bit), then call build() to create the IndexBuffer.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun async(callback: (IndexBuffer, AsyncCallStatus) -> Unit = { _, _ -> }): IndexBuffer.Builder

Creates the IndexBuffer asynchronously: callback runs once on the main thread when its memory is allocated (AsyncCallStatus.CANCELED if it never was). Until then, only async calls on it are safe; check IndexBuffer.isCreationComplete. Needs Engine.isAsynchronousModeEnabled.

Link copied to clipboard

Sets the index data type (USHORT for 16-bit or UINT for 32-bit).

Link copied to clipboard
fun build(engine: Engine): IndexBuffer

Creates the IndexBuffer object.

Link copied to clipboard

Sets the number of indices in this buffer.

Link copied to clipboard

Associates an optional name with this IndexBuffer for debugging purposes.