diff options
author | Kenneth Russel <[email protected]> | 2006-03-19 02:25:03 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2006-03-19 02:25:03 +0000 |
commit | e3d8f7832c5090463e1041920cc907af323b7ad4 (patch) | |
tree | 6d5b8d30fb2681acb7225392f96cc9f5f441959c /src/classes/com/sun/opengl/impl | |
parent | dc079c1ecab4ec49af51a2adecf93c767dd6f801 (diff) |
Made MacOSXOnscreenGLContext obey disabling of optimized context
handling
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@670 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/opengl/impl')
-rw-r--r-- | src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java b/src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java index e011d271b..977e3315c 100644 --- a/src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java +++ b/src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java @@ -77,12 +77,24 @@ public class MacOSXOnscreenGLContext extends MacOSXGLContext { } return ret; } finally { - if (lockRes != MacOSXOnscreenGLDrawable.LOCK_SURFACE_NOT_READY) { - drawable.unlockSurface(); + if (optimizationEnabled) { + if (lockRes != MacOSXOnscreenGLDrawable.LOCK_SURFACE_NOT_READY) { + drawable.unlockSurface(); + } } } } + protected void releaseImpl() throws GLException { + if (!optimizationEnabled) { + try { + super.releaseImpl(); + } finally { + drawable.unlockSurface(); + } + } + } + public void swapBuffers() throws GLException { if (!CGL.flushBuffer(nsContext)) { throw new GLException("Error swapping buffers"); |