From d72745fa32a86a3820e5220643a01153e3f21fe7 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 22 Apr 2011 05:52:06 +0200 Subject: 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. --- src/newt/classes/com/jogamp/newt/opengl/GLWindow.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/newt/classes/com/jogamp') 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(); } } -- cgit v1.2.3