openrndr / org.openrndr.draw / VertexFormat

VertexFormat

class VertexFormat (source)

VertexBuffer Layout describes how data is organized in the VertexBuffer

Properties

items

var items: MutableList<VertexElement>

size

The size of the VertexFormat in bytes

val size: Int

Functions

attribute

Adds a custom attribute to the VertexFormat

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

color

Appends a color attribute to the layout

fun color(dimensions: Int): Unit

equals

fun equals(other: Any?): Boolean

hasAttribute

fun hasAttribute(name: String): Boolean

hashCode

fun hashCode(): Int

normal

Appends a normal component to the layout

fun normal(dimensions: Int): Unit

position

Appends a position component to the layout

fun position(dimensions: Int): Unit

textureCoordinate

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

toString

fun toString(): String