vertexFormat

fun vertexFormat(alignment: BufferAlignment = BufferAlignment.NONE, builder: VertexFormat.() -> Unit): VertexFormat(source)

Creates a new instance of VertexFormat using a specified alignment and a builder block to configure its attributes.

Return

A fully constructed VertexFormat object with the specified alignment and attributes.

Parameters

alignment

Specifies how the data should be aligned in the vertex buffer. Defaults to BufferAlignment.NONE.

builder

A lambda block to configure the vertex format by defining its attributes.