VertexBuffer
Holds a set of buffers that define the geometry of a Renderable.
The geometry of the Renderable itself is defined by a set of vertex attributes such as position, color, normals, tangents, etc. There is no need to have a 1-to-1 mapping between attributes and buffer. A buffer can hold the data of several attributes—attributes are then referred to as being "interleaved".
The buffers themselves are GPU resources, therefore mutating their data can be relatively slow. For this reason, it is best to separate the constant data from the dynamic data into multiple buffers. It is possible, and even encouraged, to use a single vertex buffer for several Renderables.
See also
, RenderableManager
Types
Properties
Returns whether the asynchronous creation of this VertexBuffer has completed; always true when it wasn't built with Builder.async().
The native object, for interop with code calling the Fila* C API directly. Read-only: this wrapper owns it.
Gets the number of vertices in each buffer of this set.
Functions
Sets the data for a given buffer in this vertex buffer set.
Sets the data for a given buffer with offset and count.
Sets the data for a given buffer with offset, count, and optional completion callback.
setBufferAt, asynchronously: returns an ID for Engine.cancelAsyncCall, and callback runs once on the main thread with how it ended. Needs Engine.isAsynchronousModeEnabled.
Associates a BufferObject with a buffer in this vertex buffer set.
setBufferObjectAt, asynchronously; see setBufferAtAsync.