From 35ee11ab877097d8a24d82f7a458d1a4f9a0b803 Mon Sep 17 00:00:00 2001 From: Kenneth Russel <kbrussel@alum.mit.edu> Date: Fri, 10 Mar 2006 10:05:34 +0000 Subject: Fixed resizing bug on Mac OS X which was a consequence of leaving the context permanently current on the GLWorkerThread git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@658 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/com/sun/opengl/impl/GLContextImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/classes/com/sun/opengl/impl/GLContextImpl.java') diff --git a/src/classes/com/sun/opengl/impl/GLContextImpl.java b/src/classes/com/sun/opengl/impl/GLContextImpl.java index 8e38ec276..8963b2f5e 100644 --- a/src/classes/com/sun/opengl/impl/GLContextImpl.java +++ b/src/classes/com/sun/opengl/impl/GLContextImpl.java @@ -97,6 +97,8 @@ public abstract class GLContextImpl extends GLContext { if (current != null) { if (current == this) { // Assume we don't need to make this context current again + // For Mac OS X, however, we need to update the context to track resizes + update(); return CONTEXT_CURRENT; } else { current.release(); @@ -184,6 +186,10 @@ public abstract class GLContextImpl extends GLContext { protected abstract void destroyImpl() throws GLException; + // This is only needed for Mac OS X on-screen contexts + protected void update() throws GLException { + } + public boolean isSynchronized() { return !lock.getFailFastMode(); } -- cgit v1.2.3