aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-04-22 05:52:06 +0200
committerSven Gothel <[email protected]>2011-04-22 05:52:06 +0200
commitd72745fa32a86a3820e5220643a01153e3f21fe7 (patch)
tree26c19aaec3c82501c8db7dc39621cae7c276829a /src/newt/classes/com
parentfa5c609fa107a456930e74b247af819851ed1fe9 (diff)
NEWT GLWindow: Remove context current check for swapBuffer() call
The spec doesn't require a current context for a swap buffer call, however, if required .. as user shall encapsulate it by himself, or use the GLEventListener model. Motivation: Reduce TLS GLContext.getCurrent() calls.
Diffstat (limited to 'src/newt/classes/com')
-rw-r--r--src/newt/classes/com/jogamp/newt/opengl/GLWindow.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
index efbd9594b..48531fcf8 100644
--- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
+++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
@@ -569,13 +569,7 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
public void swapBuffers() {
if(drawable!=null && context != null) {
- // Lock: Locked Surface/Window by MakeCurrent/Release
- if (context != GLContext.getCurrent()) {
- // Assume we should try to make the context current before swapping the buffers
- helper.invokeGL(drawable, context, swapBuffersAction, initAction);
- } else {
- drawable.swapBuffers();
- }
+ drawable.swapBuffers();
}
}