public class HighPerformanceVertexBufferObject extends VertexBufferObject
LowMemoryVertexBufferObject, the HighPerformanceVertexBufferObject uses 2x the heap memory,
at the benefit of significantly faster data buffering (up to 5x faster!).LowMemoryVertexBufferObject} when to prefer a {@link LowMemoryVertexBufferObject} instead of a {@link HighPerformanceVertexBufferObject}
(c) Zynga 2011
IDisposable.AlreadyDisposedException| Modifier and Type | Field and Description |
|---|---|
protected float[] |
mBufferData |
protected java.nio.FloatBuffer |
mFloatBuffer |
mAutoDispose, mByteBuffer, mCapacity, mDirtyOnHardware, mDisposed, mHardwareBufferID, mUsage, mVertexBufferObjectAttributes, mVertexBufferObjectManagerHARDWARE_BUFFER_ID_INVALID| Constructor and Description |
|---|
HighPerformanceVertexBufferObject(VertexBufferObjectManager pVertexBufferObjectManager,
float[] pBufferData,
DrawType pDrawType,
boolean pAutoDispose,
VertexBufferObjectAttributes pVertexBufferObjectAttributes) |
HighPerformanceVertexBufferObject(VertexBufferObjectManager pVertexBufferObjectManager,
int pCapacity,
DrawType pDrawType,
boolean pAutoDispose,
VertexBufferObjectAttributes pVertexBufferObjectAttributes) |
| Modifier and Type | Method and Description |
|---|---|
float[] |
getBufferData() |
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, unloadFromHardwareprotected final float[] mBufferData
protected final java.nio.FloatBuffer mFloatBuffer
public HighPerformanceVertexBufferObject(VertexBufferObjectManager pVertexBufferObjectManager, int pCapacity, DrawType pDrawType, boolean pAutoDispose, VertexBufferObjectAttributes pVertexBufferObjectAttributes)
public HighPerformanceVertexBufferObject(VertexBufferObjectManager pVertexBufferObjectManager, float[] pBufferData, DrawType pDrawType, boolean pAutoDispose, VertexBufferObjectAttributes pVertexBufferObjectAttributes)
public float[] getBufferData()
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