public abstract class GLResourceBase extends ReferenceCountedBase implements GLResource
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
|
acquireAndCount, getReferenceCount, release, releaseAndCount
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
acquireAndCount, getReferenceCount, release, releaseAndCount
public abstract void dispose(com.jogamp.opengl.GL gl)
GLResource
dispose
in interface GLResource
public boolean releaseDispose(com.jogamp.opengl.GL gl)
GLResource
releaseDispose
in interface GLResource
public abstract boolean isDisposed()
GLResource
isDisposed
in interface GLResource
public boolean isValid()
GLResource
isValid
in interface GLResource
true
if the resource can be usedpublic boolean disposeInvalid(com.jogamp.opengl.GL gl)
GLResource
disposeInvalid
in interface GLResource
public boolean disposeUnreferenced(com.jogamp.opengl.GL gl)
GLResource
disposeUnreferenced
in interface GLResource
gl
- contextpublic GLResourceBase acquire()
ReferenceCounted
acquire
in interface GLResource
acquire
in interface ReferenceCounted
acquire
in class ReferenceCountedBase