diff options
author | Sven Gothel <[email protected]> | 2013-10-30 18:26:24 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-10-30 18:26:24 +0100 |
commit | 2481774c4a4a5d734dbeb2f7d8963f45d1b2a437 (patch) | |
tree | 29ee5725e03b41677d5170c337bfbd6f782c098c /src/jogl/classes/jogamp/opengl/egl/EGLContext.java | |
parent | 9ce3f5f0d47f21a7dc229f0df03ac0fbda295f35 (diff) |
Fix Bug 875 - Cleanup branch using VersionNumber (fix 'Int' check strictMatch minor) and reuse isES; EGLContext: Use strictMatch for setGLFunctionAvailability() and handle failure; EGLDrawableFactory: Either detect ES3 or ES2.
- Cleanup branch using VersionNumber (fix 'Int' check strictMatch minor) and reuse isES
- EGLContext: Use strictMatch for setGLFunctionAvailability() and handle failure
On ES, we require strictMatch, cleanup if failing.
- EGLDrawableFactory: Either detect ES3 or ES2.
Both only available with proper EGL context creation for ES profiles (TODO)
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 |