java.lang.Object | |
↳ | org.andengine.opengl.vbo.ZeroMemoryVertexBufferObject |
Known Direct Subclasses |
Compared to a HighPerformanceVertexBufferObject
or a LowMemoryVertexBufferObject
, the ZeroMemoryVertexBufferObject
uses no permanent heap memory,
at the cost of expensive data buffering (up to 5x slower!) whenever the bufferdata needs to be updated and higher GC activity, due to the temporary ByteBuffer allocations.
ZeroMemoryVertexBufferObject
is preferred to a HighPerformanceVertexBufferObject
or a LowMemoryVertexBufferObject
when the following conditions are met:
HighPerformanceVertexBufferObject
/LowMemoryVertexBufferObject
or an extreme number of small HighPerformanceVertexBufferObject
/LowMemoryVertexBufferObject
s, where you can't afford to have any of the bufferdata to be kept in heap memory.ZeroMemoryVertexBufferObject
is changed not often, or even better: never.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
org.andengine.opengl.vbo.IVertexBufferObject
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
mAutoDispose | |||||||||||
mCapacity | |||||||||||
mDirtyOnHardware | |||||||||||
mDisposed | |||||||||||
mHardwareBufferID | |||||||||||
mUsage | |||||||||||
mVertexBufferObjectAttributes | |||||||||||
mVertexBufferObjectManager |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Mark this
VertexBufferObject dirty so it gets updated on the hardware. | |||||||||||
Mark this
VertexBufferObject as not not loaded to hardware. | |||||||||||
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
When a non
null ByteBuffer is returned by this function, it is guaranteed that releaseByteBuffer(ByteBuffer) is called. | |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.andengine.opengl.vbo.IVertexBufferObject
| |||||||||||
From interface
org.andengine.util.IDisposable
|
Mark this VertexBufferObject
dirty so it gets updated on the hardware.
Mark this VertexBufferObject
as not not loaded to hardware.
It will reload itself to hardware when it gets used again.
When a non null
ByteBuffer
is returned by this function, it is guaranteed that releaseByteBuffer(ByteBuffer)
is called.
ByteBuffer
to be passed to onPopulateBufferData(ByteBuffer)
.