diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLContext.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLContext.java | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java index fe01fbc8c..7b4b55b34 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java @@ -115,16 +115,14 @@ public class EGLContext extends GLContextImpl { @Override protected void makeCurrentImpl() throws GLException { - if (EGL.eglGetCurrentContext() != contextHandle) { - final long dpy = drawable.getNativeSurface().getDisplayHandle(); - if (!EGL.eglMakeCurrent(dpy, drawable.getHandle(), drawableRead.getHandle(), contextHandle)) { - throw new GLException("Error making context " + toHexString(contextHandle) + - " current on Thread " + getThreadName() + - " with display " + toHexString(dpy) + - ", drawableWrite " + toHexString(drawable.getHandle()) + - ", drawableRead "+ toHexString(drawableRead.getHandle()) + - " - Error code " + toHexString(EGL.eglGetError()) + ", " + this); - } + final long dpy = drawable.getNativeSurface().getDisplayHandle(); + if ( !EGL.eglMakeCurrent(dpy, drawable.getHandle(), drawableRead.getHandle(), contextHandle) ) { + throw new GLException("Error making context " + toHexString(contextHandle) + + " current on Thread " + getThreadName() + + " with display " + toHexString(dpy) + + ", drawableWrite " + toHexString(drawable.getHandle()) + + ", drawableRead "+ toHexString(drawableRead.getHandle()) + + " - Error code " + toHexString(EGL.eglGetError()) + ", " + this); } } |