Builder

class Builder

Builder for creating VertexBuffer instances.

Configure the vertex count, buffers, and attributes, then call build() to create the VertexBuffer.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Sets advanced skinning mode: bone data, indices and weights are set with RenderableManager.Builder.boneIndicesAndWeights. Works with or without buffer objects.

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

Creates the VertexBuffer 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 VertexBuffer.isCreationComplete. Needs Engine.isAsynchronousModeEnabled.

Link copied to clipboard
fun attribute(attribute: VertexBuffer.VertexAttribute, bufferIndex: Int, attributeType: VertexBuffer.AttributeType, byteOffset: Int = 0, byteStride: Int = 0): VertexBuffer.Builder

Sets up an attribute for this vertex buffer set.

Link copied to clipboard

Defines how many buffers will be created in this vertex buffer set.

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

Creates the VertexBuffer object.

Link copied to clipboard

Allows buffers to be swapped out and shared using BufferObject.

Link copied to clipboard

Associates an optional name with this VertexBuffer for debugging purposes.

Link copied to clipboard

Sets whether a given attribute should be normalized.

Link copied to clipboard

Sets the size of each buffer in the set in vertices.