Package heronarts.glx
Class DynamicIndexBuffer
java.lang.Object
heronarts.glx.DynamicIndexBuffer
A bgfx index buffer with contents that can be updated dynamically between frames.
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicIndexBuffer
(GLX glx, int numIndices) Constructs a new dynamic index bufferDynamicIndexBuffer
(GLX glx, int numIndices, boolean int32) Constructs a new dynamic index buffer -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Clean up this component, free all memory resourcesshort
Returns the bgfx handle for the vertex bufferReturns the raw data buffer used to populate the bufferint
Returns the number of indices in the buffervoid
update()
Update the underlying BGFX index buffer with the index buffer data
-
Constructor Details
-
DynamicIndexBuffer
Constructs a new dynamic index buffer- Parameters:
glx
- GLX instancenumIndices
- How many indices are in the buffer (number of indices, not bytes)
-
DynamicIndexBuffer
Constructs a new dynamic index buffer- Parameters:
glx
- GLX instancenumIndices
- How many indices are in the buffer (number of indices, not bytes)int32
- Whether to use int32 size rather than int16 for index references (for large buffers > 65K)
-
-
Method Details
-
getHandle
public short getHandle()Returns the bgfx handle for the vertex buffer- Returns:
- BGFX buffer handle
-
getNumIndices
public int getNumIndices()Returns the number of indices in the buffer- Returns:
- Number of indices in the buffer (numeric count, not bytes)
-
getIndexData
Returns the raw data buffer used to populate the buffer- Returns:
- Raw data buffer
-
update
public void update()Update the underlying BGFX index buffer with the index buffer data -
dispose
public void dispose()Clean up this component, free all memory resources
-