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/jogamp/opengl/GLAutoDrawableBase.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl') diff --git a/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java b/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java index d76272723..42e14366c 100644 --- a/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java +++ b/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java @@ -248,10 +248,8 @@ public abstract class GLAutoDrawableBase implements GLAutoDrawable, FPSCounter { public final void defaultSwapBuffers() throws GLException { final RecursiveLock _lock = getLock(); _lock.lock(); - try { - if(drawable!=null && context != null) { - helper.invokeGL(drawable, context, defaultSwapAction, defaultInitAction); - } + try { + drawable.swapBuffers(); } finally { _lock.unlock(); } @@ -299,12 +297,6 @@ public abstract class GLAutoDrawableBase implements GLAutoDrawable, FPSCounter { } } - protected final Runnable defaultSwapAction = new Runnable() { - @Override - public final void run() { - drawable.swapBuffers(); - } } ; - @Override public final GLDrawable getDelegatedDrawable() { return drawable; -- cgit v1.2.3