public abstract class GLResourceBase extends ReferenceCountedBase implements GLResource
traceHistorySize, traceReferences| Constructor and Description |
|---|
GLResourceBase() |
| Modifier and Type | Method and Description |
|---|---|
GLResourceBase |
acquire()
Signal the resource that something is holding a reference to it.
|
abstract void |
dispose(com.jogamp.opengl.GL gl)
Discard data, regardless of existing references
|
boolean |
disposeInvalid(com.jogamp.opengl.GL gl)
Dispose an invalid resource
|
boolean |
disposeUnreferenced(com.jogamp.opengl.GL gl)
Dispose if object is unreferenced
|
abstract boolean |
isDisposed()
Returns true if resource has been disposed
|
boolean |
isValid()
Returns true if resource can be used (i.e.
|
boolean |
releaseDispose(com.jogamp.opengl.GL gl)
Decrement reference count and dispose if no longer referenced,
returning true if disposed
|
boolean |
releaseDisposeDeferred(com.jogamp.opengl.GL gl,
GLDeferredDeleteQueue queue)
Like
releaseDispose(GL), but when the reference count reaches zero
the actual GL delete is deferred: instead of disposing inline (on whatever
thread happens to make the final release, possibly the background garbage
collector), the resource is enqueued on queue to be disposed later
on a render thread. |
acquireAndCount, getReferenceCount, release, releaseAndCountequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacquireAndCount, getReferenceCount, release, releaseAndCountpublic abstract void dispose(com.jogamp.opengl.GL gl)
GLResourcedispose in interface GLResourcepublic boolean releaseDispose(com.jogamp.opengl.GL gl)
GLResourcereleaseDispose in interface GLResourcepublic boolean releaseDisposeDeferred(com.jogamp.opengl.GL gl,
GLDeferredDeleteQueue queue)
releaseDispose(GL), but when the reference count reaches zero
the actual GL delete is deferred: instead of disposing inline (on whatever
thread happens to make the final release, possibly the background garbage
collector), the resource is enqueued on queue to be disposed later
on a render thread. Falls back to the inline releaseDispose(GL)
when queue is null or deferred deletion is disabled.public abstract boolean isDisposed()
GLResourceisDisposed in interface GLResourcepublic boolean isValid()
GLResourceisValid in interface GLResourcetrue if the resource can be usedpublic boolean disposeInvalid(com.jogamp.opengl.GL gl)
GLResourcedisposeInvalid in interface GLResourcepublic boolean disposeUnreferenced(com.jogamp.opengl.GL gl)
GLResourcedisposeUnreferenced in interface GLResourcegl - contextpublic GLResourceBase acquire()
ReferenceCountedacquire in interface GLResourceacquire in interface ReferenceCountedacquire in class ReferenceCountedBase