From 77e9d16a3ad5131a2197bb3cad2309827c3a796a Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 30 Nov 2011 13:16:57 +0100 Subject: 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]. --- .../classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/newt/classes/com') 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"); } } @@ -273,6 +271,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"); } -- cgit v1.2.3