diff options
author | Kenneth Russel <[email protected]> | 2006-03-26 18:52:02 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2006-03-26 18:52:02 +0000 |
commit | 2dbbfdd226bf1a9158936531a299adb5bdd2ad4a (patch) | |
tree | 641e8eec677b1a637844fc77399dc87b4e931042 /src/classes/com/sun/opengl/impl/windows | |
parent | 56c6a96fd7d1f7d50507662922d5f92c7db39da6 (diff) |
Fixed bugs in implementation of -Djogl.GLContext.noopt flag
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@685 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/opengl/impl/windows')
-rw-r--r-- | src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLContext.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLContext.java b/src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLContext.java index 4e1dbd1c0..4f41cd8e1 100644 --- a/src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLContext.java +++ b/src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLContext.java @@ -66,7 +66,19 @@ public class WindowsOnscreenGLContext extends WindowsGLContext { int ret = super.makeCurrentImpl(); return ret; } finally { - if (lockRes != WindowsOnscreenGLDrawable.LOCK_SURFACE_NOT_READY) { + if (isOptimizable()) { + if (lockRes != WindowsOnscreenGLDrawable.LOCK_SURFACE_NOT_READY) { + drawable.unlockSurface(); + } + } + } + } + + protected void releaseImpl() throws GLException { + try { + super.releaseImpl(); + } finally { + if (!isOptimizable()) { drawable.unlockSurface(); } } |