VertexFormat

class VertexFormat

VertexBuffer Layout describes how data is organized in the VertexBuffer

Functions

attribute
Link copied to clipboard
common
fun attribute(name: String, type: VertexElementType, arraySize: Int = 1)

Adds a custom attribute to the VertexFormat

color
Link copied to clipboard
common
fun color(dimensions: Int)

Appends a color attribute to the layout

equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hasAttribute
Link copied to clipboard
common
fun hasAttribute(name: String): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
normal
Link copied to clipboard
common
fun normal(dimensions: Int)

Appends a normal component to the layout

position
Link copied to clipboard
common
fun position(dimensions: Int)

Appends a position component to the layout

textureCoordinate
Link copied to clipboard
common
fun textureCoordinate(dimensions: Int = 2, index: Int = 0)
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

items
Link copied to clipboard
common
var items: MutableList<VertexElement>
size
Link copied to clipboard
common
val size: Int

The size of the VertexFormat in bytes