From ad0ba11b0a1d6cb4a113e467420f2f797f1d26cb Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 30 Nov 2011 13:13:27 +0100 Subject: More Robust GLProfile Initialization ; Add NativeWindowFactory Shutdown More Robust GLProfile Initialization - Catch GLException in GLDrawableFactory getWasSharedContextCreated(device) impl., which may fail (See comment on Firefox/Chorme EGL deployed library for Windows). - If getWasSharedContextCreated(devide) fails, set respective factory availability to false, ie. hasDesktopGLFactory, hasEGLFactory, .. Add NativeWindowFactory Shutdown - Currenly a dummy entry, may evolve. X11Util shutdown is issued by respective GLDrawableFactory --- .../opengl/windows/wgl/WindowsWGLDrawableFactory.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java') diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java index 9838ba156..6b75b6504 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java @@ -370,9 +370,16 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { final static String wglMakeContextCurrent = "wglMakeContextCurrent"; public final boolean getWasSharedContextCreated(AbstractGraphicsDevice device) { - SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device); - if(null!=sr) { - return null != sr.getContext(); + try { + SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device); + if(null!=sr) { + return null != sr.getContext(); + } + } catch (GLException gle) { + if(DEBUG) { + System.err.println("Catched Exception while WindowsWGL Shared Resource initialization"); + gle.printStackTrace(); + } } return false; } -- cgit v1.2.3