summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-08 01:55:22 +0200
committerSven Gothel <[email protected]>2012-10-08 01:55:22 +0200
commit455fed40391afe10ce5ffb9146ca325af63b0a49 (patch)
tree925ecae592d59fffe89780100619b455efd9c80e /src/jogl/classes/javax/media/opengl
parentd10dae464ef9309a92eb9b49323fe1db93c3fc9f (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/javax/media/opengl')
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLCanvas.java11
1 files changed, 2 insertions, 9 deletions
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();
}