diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLContext.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLContext.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java index d8bb2e9eb..2eb277f3f 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java @@ -222,9 +222,19 @@ public class EGLContext extends GLContextImpl { throw new GLException("Error making context " + toHexString(contextHandle) + " current: error code " + toHexString(EGL.eglGetError())); } - return setGLFunctionAvailability(true, contextVersionReq, 0, CTX_PROFILE_ES, - contextVersionReq>=3 /* strictMatch */, // strict match for es >= 3 - false /* withinGLVersionsMapping */); + if( !setGLFunctionAvailability(true, contextVersionReq, 0, CTX_PROFILE_ES, + true /* strictMatch */, // always req. strict match + false /* withinGLVersionsMapping */) ) { + if(DEBUG) { + System.err.println(getThreadName() + ": createImpl: setGLFunctionAvailability FAILED delete "+toHexString(contextHandle)); + } + EGL.eglMakeCurrent(drawable.getNativeSurface().getDisplayHandle(), EGL.EGL_NO_SURFACE, EGL.EGL_NO_SURFACE, EGL.EGL_NO_CONTEXT); + EGL.eglDestroyContext(drawable.getNativeSurface().getDisplayHandle(), contextHandle); + contextHandle = 0; + return false; + } else { + return true; + } } @Override |