diff options
author | Sven Gothel <[email protected]> | 2012-01-13 11:43:35 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-01-13 11:43:35 +0100 |
commit | d23b08203e32f8f50991a48132eb3c2236b4efc0 (patch) | |
tree | 3d2936474900284fc576000c777099caa4d1bc88 /src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java | |
parent | 835b36d626f75f9e96001a41c2a6fe9f90466ae1 (diff) |
OSX Fix: Catch releaseImpl's glFinish() exception (DebugGL); Make GLContext.release's setCurrent(null) exception prone.
Catch releaseImpl's glFinish() exception (DebugGL)
glGetError() after glFinish() (eg. w/ debug pipeline) produced unknown error 0x0506
on OS X (10.7.2 NV).
Make GLContext.release's setCurrent(null) exception prone
Call setCurrent(null) in finalizer block to ensure it's 'released' out of the TLS
even when an exception is being thrown.
Make MacOSX Shared Resources 'destroy' more error prone (catch exceptions)
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java index e1810fd63..5c6486799 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java @@ -231,11 +231,18 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl { } } catch (GLException gle) { if (DEBUG) { - System.err.println("MacOSXCGLDrawableFactory.createShared: INFO: makeCurrent failed"); + System.err.println("MacOSXCGLDrawableFactory.createShared: INFO: makeCurrent catched exception:"); gle.printStackTrace(); } } finally { - context.destroy(); + try { + context.destroy(); + } catch (GLException gle) { + if (DEBUG) { + System.err.println("MacOSXCGLDrawableFactory.createShared: INFO: destroy catched exception:"); + gle.printStackTrace(); + } + } } } drawable.destroy(); @@ -266,7 +273,7 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl { } } catch (GLException gle) { if(DEBUG) { - System.err.println("Catched Exception while MaxOSXCGL Shared Resource initialization"); + System.err.println("Catched Exception while MaxOSXCGL Shared Resource initialization:"); gle.printStackTrace(); } } |