public class GL3SharedRenderObjectManager extends java.lang.Object implements GLGarbageSource
| Modifier and Type | Field and Description |
|---|---|
static boolean |
useReferenceCountedDisposal
Global switch for reference-count-based disposal of cached shared render
objects.
|
| Constructor and Description |
|---|
GL3SharedRenderObjectManager(GL3VertexAttributeMap attributeMap) |
GL3SharedRenderObjectManager(GL3VertexAttributeMap attributeMap,
GLDeferredDeleteQueue deferredDeletes) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose(com.jogamp.opengl.GL gl) |
void |
garbage(com.jogamp.opengl.GL gl) |
GL3VertexAttributeInfo |
getAttribute(java.lang.String str) |
GL3SharedRenderInstances |
getInstances(com.jogamp.opengl.GL3 gl,
RenderInstances rinst) |
GL3SharedRenderObjectLines |
getLines(com.jogamp.opengl.GL3 gl,
RenderObject robj) |
GL3SharedRenderObjectPoints |
getPoints(com.jogamp.opengl.GL3 gl,
RenderObject robj) |
GL3SharedRenderObjectPrimitives |
getPrimitives(com.jogamp.opengl.GL3 gl,
RenderObject robj) |
public static boolean useReferenceCountedDisposal
true (the default), this manager holds its own
reference to each cached object and releases it via
GL3ResourceBase.releaseDispose(com.jogamp.opengl.GL3) on eviction, so the object's GL
resources are freed only once nothing references it any more (neither this
cache nor any per-viewer wrapper). When false, the original
behaviour is restored: the manager holds no reference and force-disposes
cached objects the moment their backing RenderObject dies, even if
a wrapper still references them.
Captured once per manager at construction (see refCounted):
toggling at runtime is unsafe because it would mismatch the acquire done at
cache-insert time against the release done at eviction time. Set at startup
via the system property maspack.render.refCountedSharedDisposal.
public GL3SharedRenderObjectManager(GL3VertexAttributeMap attributeMap)
public GL3SharedRenderObjectManager(GL3VertexAttributeMap attributeMap, GLDeferredDeleteQueue deferredDeletes)
public GL3SharedRenderObjectPrimitives getPrimitives(com.jogamp.opengl.GL3 gl, RenderObject robj)
public GL3SharedRenderObjectLines getLines(com.jogamp.opengl.GL3 gl, RenderObject robj)
public GL3SharedRenderObjectPoints getPoints(com.jogamp.opengl.GL3 gl, RenderObject robj)
public GL3SharedRenderInstances getInstances(com.jogamp.opengl.GL3 gl, RenderInstances rinst)
public void garbage(com.jogamp.opengl.GL gl)
garbage in interface GLGarbageSourcepublic void dispose(com.jogamp.opengl.GL gl)
dispose in interface GLGarbageSourcepublic GL3VertexAttributeInfo getAttribute(java.lang.String str)