public class NativeObjectManager
extends java.lang.Object
ReferenceQueue the GLObjectManager can delete
unused objects from GPU when their counterparts on the CPU are no longer used.
On restart, the renderer may request the objects to be reset, thus allowing
the GLObjects to re-initialize with the new display context.| Modifier and Type | Field and Description |
|---|---|
static boolean |
UNSAFE
Set to
true to enable deletion of native buffers together with GL objects
when requested. |
| Constructor and Description |
|---|
NativeObjectManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAllObjects(java.lang.Object rendererObject)
(Internal use only) Deletes all objects.
|
void |
deleteUnused(java.lang.Object rendererObject)
(Internal use only) Deletes unused NativeObjects.
|
void |
registerObject(NativeObject obj)
(Internal use only) Register a
NativeObject with the manager. |
void |
resetObjects()
(Internal use only) Resets all
NativeObjects. |
public static boolean UNSAFE
true to enable deletion of native buffers together with GL objects
when requested. Note that usage of object after deletion could cause undefined results
or native crashes, therefore by default this is set to false.public void registerObject(NativeObject obj)
NativeObject with the manager.public void deleteUnused(java.lang.Object rendererObject)
MAX_REMOVES_PER_FRAME objects.rendererObject - The renderer object.
For graphics objects, Renderer is used, for audio, {#link AudioRenderer} is used.public void deleteAllObjects(java.lang.Object rendererObject)
public void resetObjects()
NativeObjects.
This is typically called when the context is restarted.