From 4191e406178cdd900030a1ec3919476aab527734 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 8 Sep 2011 05:24:57 +0200 Subject: JOGL: Make GLProfile shutdown()/initSingleton() functional, ie. proper recreation of all resources - Release all GLDrawableFactory instances at shutdown, [re]create them at initialization - Release GLContext resources (availability map) as well --- src/jogl/classes/javax/media/opengl/GLProfile.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/jogl/classes/javax/media/opengl/GLProfile.java') diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java index 1fd699dfd..a7231efc8 100644 --- a/src/jogl/classes/javax/media/opengl/GLProfile.java +++ b/src/jogl/classes/javax/media/opengl/GLProfile.java @@ -137,6 +137,7 @@ public class GLProfile { if(initialized) { initialized = false; GLDrawableFactory.shutdown(); + GLContext.shutdown(); } } @@ -1194,6 +1195,8 @@ public class GLProfile { // - Instantiate GLDrawableFactory incl its shared dummy drawable/context, // which will register at GLContext .. // + GLDrawableFactory.initialize(); + Throwable t=null; // if successfull it has a shared dummy drawable and context created try { @@ -1318,7 +1321,7 @@ public class GLProfile { // System.err.println(msg); } if(isSet) { - return null != GLProfile.getDefault(device); + return GLProfile.isAvailable(device, GL_DEFAULT); } boolean addedDesktopProfile = false; -- cgit v1.2.3