From 455fed40391afe10ce5ffb9146ca325af63b0a49 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 8 Oct 2012 01:55:22 +0200 Subject: Fix GLDrawable.swapBuffer() implementation in AWT/SWT GLCanvas and GLAutoDrawableBase Simply lock drawable and issue drawable.swapBuffers(), no need to make context current. --- src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/jogl/classes/javax') diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java index a5c15dbda..ed069bf22 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java @@ -982,13 +982,6 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing } }; - private final Runnable swapBuffersAction = new Runnable() { - @Override - public void run() { - drawable.swapBuffers(); - } - }; - // Workaround for ATI driver bugs related to multithreading issues // like simultaneous rendering via Animators to canvases that are // being resized on the AWT event dispatch thread @@ -1010,8 +1003,8 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing public void run() { final RecursiveLock _lock = lock; _lock.lock(); - try { - helper.invokeGL(drawable, context, swapBuffersAction, initAction); + try { + drawable.swapBuffers(); } finally { _lock.unlock(); } -- cgit v1.2.3