openrndr / org.openrndr.draw / VertexFormat

VertexFormat

class VertexFormat

VertexBuffer Layout describes how data is organized in the VertexBuffer

Properties

items

var items: MutableList<VertexElement>

size

val size: Int

The size of the VertexFormat in bytes

Functions

attribute

fun attribute(name: String, type: VertexElementType, arraySize: Int = 1): Unit

Adds a custom attribute to the VertexFormat

color

fun color(dimensions: Int): Unit

Appends a color attribute to the layout

normal

fun normal(dimensions: Int): Unit

Appends a normal component to the layout

position

fun position(dimensions: Int): Unit

Appends a position component to the layout

textureCoordinate

fun textureCoordinate(dimensions: Int = 2, index: Int = 0): Unit

toString

fun toString(): String