From b51cab4a8bcf8d9256e39657369510e39d22f162 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 4 Nov 2012 17:02:44 +0100 Subject: GLDrawableUtil.swapGLContextAndAllGLEventListener(..): Add glFinish() before and after ctx/drawable swap - sync'ing GL state Otherwise a driver crash may occur on Windows/NVidia. --- .../com/jogamp/opengl/util/GLDrawableUtil.java | 53 +++++++++++++++------- 1 file changed, 36 insertions(+), 17 deletions(-) (limited to 'src/jogl/classes') diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLDrawableUtil.java b/src/jogl/classes/com/jogamp/opengl/util/GLDrawableUtil.java index 8197be4f5..08eaf0494 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLDrawableUtil.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLDrawableUtil.java @@ -123,41 +123,53 @@ public class GLDrawableUtil { final boolean aIsPaused = isAnimatorAnimatingOnOtherThread(aAnim) && aAnim.pause(); final boolean bIsPaused = isAnimatorAnimatingOnOtherThread(bAnim) && bAnim.pause(); - // enqueue reset GL-Viewport - a.enqueue(setViewport); - b.enqueue(setViewport); - // - // cache all GLEventListener and their init-state - // enqueue reshape on their destination, if already initialized + // remove and cache all GLEventListener and their init-state // final int aSz = a.getGLEventListenerCount(); final GLEventListener[] aGLE = new GLEventListener[aSz]; final boolean[] aInit = new boolean[aSz]; for(int i=0; i