diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/macosx/cgl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java | 18 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java | 13 |
2 files changed, 26 insertions, 5 deletions
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java index 0ba7a99cd..522640294 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java @@ -536,7 +536,14 @@ public abstract class MacOSXCGLContext extends GLContextImpl } public boolean release(long ctx) { - gl.glFinish(); // w/o glFinish() OSX < 10.7 (NVidia driver) may freeze + try { + gl.glFinish(); // w/o glFinish() OSX < 10.7 (NVidia driver) may freeze + } catch (GLException gle) { + if(DEBUG) { + System.err.println("MacOSXCGLContext.NSOpenGLImpl.release: INFO: glFinish() catched exception:"); + gle.printStackTrace(); + } + } final boolean res = CGL.clearCurrentContext(ctx); final long cglCtx = CGL.getCGLContext(ctx); if(0 == cglCtx) { @@ -640,7 +647,14 @@ public abstract class MacOSXCGLContext extends GLContextImpl } public boolean release(long ctx) { - gl.glFinish(); // w/o glFinish() OSX < 10.7 (NVidia driver) may freeze + try { + gl.glFinish(); // w/o glFinish() OSX < 10.7 (NVidia driver) may freeze + } catch (GLException gle) { + if(DEBUG) { + System.err.println("MacOSXCGLContext.CGLImpl.release: INFO: glFinish() catched exception:"); + gle.printStackTrace(); + } + } int err = CGL.CGLSetCurrentContext(0); if(DEBUG && CGL.kCGLNoError != err) { System.err.println("CGL: Could not release current context: err 0x"+Integer.toHexString(err)+": "+this); 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(); } } |