openrndr / org.openrndr.draw / VertexBuffer

VertexBuffer

interface VertexBuffer (source)

Properties

session

abstract val session: Session?

shadow

Gives a read/write shadow for the vertex buffer

abstract val shadow: VertexBufferShadow

vertexCount

abstract val vertexCount: Int

vertexFormat

abstract val vertexFormat: VertexFormat

Functions

destroy

Destroy the vertex buffer

abstract fun destroy(): Unit

put

open fun put(elementOffset: Int = 0, putter: BufferWriter.() -> Unit): Int

read

abstract fun read(data: ByteBuffer, offset: Int = 0): Unit

write

abstract fun write(data: ByteBuffer, offset: Int = 0): Unit

Companion Object Functions

createDynamic

fun createDynamic(format: VertexFormat, vertexCount: Int, session: Session? = Session.active): VertexBuffer

createFromFloats

fun createFromFloats(format: VertexFormat, data: FloatArray, session: Session?): VertexBuffer