summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/egl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLContext.java16
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java4
2 files changed, 15 insertions, 5 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
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
index a0d896e3a..87a780935 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
@@ -616,8 +616,8 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
if( null != eglES2DynamicLookupHelper ) {
madeCurrentES3 = mapAvailableEGLESConfig(adevice, 3, hasPBufferES3ES2, rendererQuirksES3ES2, ctpES3ES2);
if( madeCurrentES3 ) {
- madeCurrentES2 = true;
- EGLContext.mapStaticGLVersion(adevice, 2, 0, ctpES3ES2[0]);
+ // Only support highest - FIXME: Proper ES2/ES3 profile selection
+ madeCurrentES2 = false;
} else {
madeCurrentES2 = mapAvailableEGLESConfig(adevice, 2, hasPBufferES3ES2, rendererQuirksES3ES2, ctpES3ES2);
}