public abstract class GLSharedResources extends java.lang.Object implements com.jogamp.opengl.GLEventListener, GLGarbageSource
Constructor and Description |
---|
GLSharedResources(com.jogamp.opengl.GLCapabilities cap) |
Modifier and Type | Method and Description |
---|---|
com.jogamp.opengl.awt.GLCanvas |
createCanvas()
Creates a canvas with the same capabilities and shared context
as other viewers using this set of resources.
|
GLJPanel |
createPanel()
Creates a canvas with the same capabilities and shared context
as other viewers using this set of resources.
|
void |
deregisterViewer(java.lang.Object viewer)
Unregisters a particular viewer with this set of resources.
|
void |
display(com.jogamp.opengl.GLAutoDrawable drawable) |
void |
dispose(com.jogamp.opengl.GL gl)
Clears all resources with the associated with the master
|
void |
dispose(com.jogamp.opengl.GLAutoDrawable drawable) |
void |
disposeResource(GLResource res) |
void |
garbage(com.jogamp.opengl.GL gl) |
long |
getGarbageCollectionInterval() |
com.jogamp.opengl.GLCapabilities |
getGLCapabilities()
Returns the capabilities of the underlying GL context
|
GLTexture |
getOrLoadTexture(com.jogamp.opengl.GL gl,
TextureContent content) |
GLTexture |
getTexture(com.jogamp.opengl.GL gl,
TextureContent content) |
void |
init(com.jogamp.opengl.GLAutoDrawable drawable) |
boolean |
isGarbageTimerEnabled() |
boolean |
maybeRunGarbageCollection(com.jogamp.opengl.GL gl)
Runs garbage collection if sufficient time has
passed since the last collection, as specified
by the garbage collection interval
|
void |
registerViewer(java.lang.Object viewer)
Register a particular viewer with this set of resources.
|
void |
reshape(com.jogamp.opengl.GLAutoDrawable drawable,
int x,
int y,
int width,
int height) |
void |
runGarbageCollection(com.jogamp.opengl.GL gl) |
void |
setGarbageCollectionInterval(long ms)
Time interval for running garbage collection, either with a
separate timed thread, or by manual calls to
maybeRunGarbageCollection(GL) . |
void |
setGarbageTimerEnabled(boolean set)
Enables or disables an automatic garbage timer.
|
void |
track(GLResource res) |
public com.jogamp.opengl.GLCapabilities getGLCapabilities()
public void garbage(com.jogamp.opengl.GL gl)
garbage
in interface GLGarbageSource
public com.jogamp.opengl.awt.GLCanvas createCanvas()
public GLJPanel createPanel()
public void registerViewer(java.lang.Object viewer)
viewer
- the viewer with which to share resources.public void deregisterViewer(java.lang.Object viewer)
public void dispose(com.jogamp.opengl.GL gl)
dispose
in interface GLGarbageSource
public GLTexture getTexture(com.jogamp.opengl.GL gl, TextureContent content)
public GLTexture getOrLoadTexture(com.jogamp.opengl.GL gl, TextureContent content)
public void init(com.jogamp.opengl.GLAutoDrawable drawable)
init
in interface com.jogamp.opengl.GLEventListener
public void dispose(com.jogamp.opengl.GLAutoDrawable drawable)
dispose
in interface com.jogamp.opengl.GLEventListener
public void track(GLResource res)
public void disposeResource(GLResource res)
public void runGarbageCollection(com.jogamp.opengl.GL gl)
public boolean maybeRunGarbageCollection(com.jogamp.opengl.GL gl)
public void setGarbageTimerEnabled(boolean set)
public boolean isGarbageTimerEnabled()
public void setGarbageCollectionInterval(long ms)
maybeRunGarbageCollection(GL)
.ms
- time interval for collection in mspublic long getGarbageCollectionInterval()
public void display(com.jogamp.opengl.GLAutoDrawable drawable)
display
in interface com.jogamp.opengl.GLEventListener
public void reshape(com.jogamp.opengl.GLAutoDrawable drawable, int x, int y, int width, int height)
reshape
in interface com.jogamp.opengl.GLEventListener