diff options
author | Sven Gothel <[email protected]> | 2012-10-08 01:55:22 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-10-08 01:55:22 +0200 |
commit | 455fed40391afe10ce5ffb9146ca325af63b0a49 (patch) | |
tree | 925ecae592d59fffe89780100619b455efd9c80e /src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java | |
parent | d10dae464ef9309a92eb9b49323fe1db93c3fc9f (diff) |
Fix GLDrawable.swapBuffer() implementation in AWT/SWT GLCanvas and GLAutoDrawableBase
Simply lock drawable and issue drawable.swapBuffers(), no need to make context current.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java | 12 |
1 files changed, 2 insertions, 10 deletions
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; |