aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
index 3c8531730..1ff16fff8 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
@@ -624,13 +624,15 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
// ES3 Query
final int[] esProfile = { 3 };
madeCurrentES3 = mapAvailableEGLESConfig(adevice, esProfile, hasPBufferES3ES2, rendererQuirksES3ES2, ctpES3ES2) && 3 == esProfile[0];
- // ES2 Query, may result in ES3
- esProfile[0] = 2;
- if( mapAvailableEGLESConfig(adevice, esProfile, hasPBufferES3ES2, rendererQuirksES3ES2, ctpES3ES2) ) {
- switch( esProfile[0] ) {
- case 2: madeCurrentES2 = true; break;
- case 3: madeCurrentES3 = true; break;
- default: throw new InternalError("XXXX Got "+esProfile[0]);
+ if( !madeCurrentES3 ) {
+ // ES2 Query, may result in ES3
+ esProfile[0] = 2;
+ if( mapAvailableEGLESConfig(adevice, esProfile, hasPBufferES3ES2, rendererQuirksES3ES2, ctpES3ES2) ) {
+ switch( esProfile[0] ) {
+ case 2: madeCurrentES2 = true; break;
+ case 3: madeCurrentES3 = true; break;
+ default: throw new InternalError("XXXX Got "+esProfile[0]);
+ }
}
}
}