diff options
author | Sven Gothel <[email protected]> | 2011-11-30 13:16:57 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-11-30 13:16:57 +0100 |
commit | 77e9d16a3ad5131a2197bb3cad2309827c3a796a (patch) | |
tree | 093580837ca39a4ad08f5dc09961d9275c1ddb35 /src/newt/classes/com/jogamp | |
parent | ad0ba11b0a1d6cb4a113e467420f2f797f1d26cb (diff) |
JOGLNewtApplet1Run: Issue GLProfile.shutdown() to adapt to the 'new' plugin lifecycle.
Applet 'restart' (init.start.stop.destroy .. init.start...)
didn't work on Windows browsers (Firefox, Safari, Chrome, ..) w/ JVM 6u26..6u29.
It seems that after destroy we loose the ClassLoader already (plugin2)
hence we need to bind to the native resources again.
Solution is to map the JOGL lifecycle of GLProfile [initSingleton()..shutdown()]
to the Applet's [init..destroy].
Diffstat (limited to 'src/newt/classes/com/jogamp')
-rwxr-xr-x | src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java index 7ba892b37..76abb261d 100755 --- a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java +++ b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java @@ -41,8 +41,6 @@ import javax.media.opengl.GLCapabilities; import javax.media.opengl.GLEventListener; import javax.media.opengl.GLProfile; -import jogamp.newt.Debug; - import com.jogamp.newt.awt.NewtCanvasAWT; import com.jogamp.newt.opengl.GLWindow; @@ -248,7 +246,7 @@ public class JOGLNewtApplet1Run extends Applet { } base.start(); if(DEBUG) { - System.err.println("JOGLNewtApplet1Run.stop() END"); + System.err.println("JOGLNewtApplet1Run.start() END"); } } @@ -274,6 +272,10 @@ public class JOGLNewtApplet1Run extends Applet { base.destroy(); // destroy glWindow unrecoverable base=null; if(DEBUG) { + System.err.println("JOGLNewtApplet1Run.destroy() .. GLProfile.shutdown() .."); + } + GLProfile.shutdown(); + if(DEBUG) { System.err.println("JOGLNewtApplet1Run.destroy() END"); } } |