summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-12-01 21:40:12 +0100
committerSven Gothel <[email protected]>2011-12-01 21:40:12 +0100
commitb6aa455d21fbcfc256ae8f8f4d66493c17e23f4c (patch)
tree373c8a31d6ce9ac98cd290e8c6872ec6145f0c7e /src/jogl/classes/jogamp/opengl/awt/VersionApplet.java
parent919aabb77250cb0e272dac228388592d08bf98f5 (diff)
New GLProfile.ShutdownType: SHARED_ONLY / COMPLETE - Enhance/Fix Lifecycle Management
- Leave Platform, .. TempJarCache untouched. - GLDrawableFactoryImpl*: Leave DynamicLibraryBundle(lib-binding) untouched, for NativeLibrary, JNILibLoaderBase (JNI libs), .. consistency. - SHARED_ONLY: shutdown shared GLDrawableFactoryImpl* resources and NativeWindowFactory - COMPLETE: additionally shutdown GLContext* Clear all cached GL/GLX proc-address and device/context mappings. - Use new "GLProfile.shutdown(GLProfile.ShutdownType.SHARED_ONLY)" in Applets - X11GLXDrawableFactory Shutdown: Uncomment close/destroy of shared resources. - JAWTWindow.destroy(): Close the delegated device. In case it's X11 this closes the exclusive opened X11 Display.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/awt/VersionApplet.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/awt/VersionApplet.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java b/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java
index 5856bf3a0..b7c90a18b 100644
--- a/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java
+++ b/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java
@@ -67,6 +67,8 @@ public class VersionApplet extends Applet {
private synchronized void my_init() {
if(null != canvas) { return; }
+ setEnabled(true);
+
GLProfile glp = GLProfile.getDefault();
GLCapabilities glcaps = new GLCapabilities(glp);
@@ -120,30 +122,36 @@ public class VersionApplet extends Applet {
remove(canvas);
canvas.destroy();
canvas = null;
- remove(tareaVersion);
- tareaVersion=null;
+ remove(tareaVersion.getParent()); // remove the grid
+ tareaVersion = null;
+ tareaCaps = null;
+ setEnabled(false);
}
}
public void init() {
System.err.println("VersionApplet: init() - begin");
+ GLProfile.initSingleton(false);
my_init();
System.err.println("VersionApplet: init() - end");
}
public void start() {
System.err.println("VersionApplet: start() - begin");
+ canvas.setVisible(true);
System.err.println("VersionApplet: start() - end");
}
public void stop() {
System.err.println("VersionApplet: stop() - begin");
+ canvas.setVisible(false);
System.err.println("VersionApplet: stop() - end");
}
public void destroy() {
System.err.println("VersionApplet: destroy() - start");
my_release();
+ GLProfile.shutdown(GLProfile.ShutdownType.SHARED_ONLY);
System.err.println("VersionApplet: destroy() - end");
}