public class LowMemoryVertexBufferObject extends VertexBufferObject
HighPerformanceVertexBufferObject, the LowMemoryVertexBufferObject uses 50% less heap memory,
at the cost of significantly slower data buffering (up to 5x slower!).
Usually a LowMemoryVertexBufferObject is preferred to a HighPerformanceVertexBufferObject when the following conditions are met:
HighPerformanceVertexBufferObject or an extreme number of small HighPerformanceVertexBufferObjects, where a 50% heap memory reduction would actually be significant.LowMemoryVertexBufferObject is changed not often, or even better: never.IDisposable.AlreadyDisposedException| Modifier and Type | Field and Description |
|---|---|
protected java.nio.FloatBuffer |
mFloatBuffer |
mAutoDispose, mByteBuffer, mCapacity, mDirtyOnHardware, mDisposed, mHardwareBufferID, mUsage, mVertexBufferObjectAttributes, mVertexBufferObjectManagerHARDWARE_BUFFER_ID_INVALID| Constructor and Description |
|---|
LowMemoryVertexBufferObject(VertexBufferObjectManager pVertexBufferObjectManager,
int pCapacity,
DrawType pDrawType,
boolean pAutoDispose,
VertexBufferObjectAttributes pVertexBufferObjectAttributes) |
| Modifier and Type | Method and Description |
|---|---|
java.nio.FloatBuffer |
getFloatBuffer() |
int |
getHeapMemoryByteSize() |
int |
getNativeHeapMemoryByteSize() |
protected void |
onBufferData() |
bind, bind, dispose, draw, draw, finalize, getByteCapacity, getCapacity, getGPUMemoryByteSize, getHardwareBufferID, getVertexBufferObjectManager, isAutoDispose, isDirtyOnHardware, isDisposed, isLoadedToHardware, setDirtyOnHardware, setNotLoadedToHardware, unbind, unloadFromHardwarepublic LowMemoryVertexBufferObject(VertexBufferObjectManager pVertexBufferObjectManager, int pCapacity, DrawType pDrawType, boolean pAutoDispose, VertexBufferObjectAttributes pVertexBufferObjectAttributes)
public java.nio.FloatBuffer getFloatBuffer()
public int getHeapMemoryByteSize()
bytes that are allocated on the heap.public int getNativeHeapMemoryByteSize()
bytes that are allocated on the native heap (through direct ByteBuffers).protected void onBufferData()
onBufferData in class VertexBufferObject