aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-01-23 23:34:39 +0100
committerSven Gothel <[email protected]>2015-01-23 23:34:39 +0100
commit26f965bbe7b40968158901c3f4ef2f54e821ac70 (patch)
tree398470d31a63df04451de683572ee31f2e72dae6 /src/jogl/classes/jogamp/opengl/egl/EGLContext.java
parentb4991d6ed202963ea66456b0abbcb1698f2712da (diff)
GLContextImpl.makeCurrentImpl(): Remove redundant test whether context is already current
- GLContextImpl.makeCurrentImpl(): Remove redundant test whether context is already current GLContext.makeCurrent() already verifies whether native makeCurrent can be skipped by comparing against the thread-local current GLContext instance. - Add X11GLXContext.glXReleaseContext(..) to simplify release call
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLContext.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLContext.java18
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);
}
}