BufferObject

open class BufferObject(target: Int, var byteCount: Int) : RenderResource

Constructors

Link copied to clipboard
constructor(target: Int, byteCount: Int)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open fun bindBufferAs(dc: DrawContext, otherTarget: Int): Boolean

Bind this buffer to a target other than target. Same buffer storage, different binding point — used by callers that pack vertices + indices (+ batchIds) into a single buffer and bind it to both GL_ARRAY_BUFFER and GL_ELEMENT_ARRAY_BUFFER.

Link copied to clipboard

True once the GL buffer object exists and has been uploaded (so bindBuffer will succeed). A non-null but not-yet-loaded buffer means an upload is still queued.

Link copied to clipboard
open fun loadBuffer(dc: DrawContext, array: NumericArray)
Link copied to clipboard
open override fun release(dc: DrawContext)

Frees any resources associated with this instance. After this method returns the rendering resource is invalid, and any associated GL object is deleted.