From 2dce639c479f820d1a1e701f5eddffc4b02f5e0f Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Thu, 7 Nov 2013 08:36:46 +0100
Subject: Bug 890 - Fix GLES3 Profile Mapping, i.e. GL2ES2 queries and
 mappings; Validate isGLES*() usage and definition ; Add and use
 ShaderCode.createExtensionDirective(..)

- Fix GLES3 Profile Mapping, i.e. GL2ES2 queries and mappings
  - GLProfile: Add GL2ES2 -> ES3 mapping
  - EGLContext: Reuqest major '3' for ES3
  - EGLGLCapabilities/EGLGraphicsConfiguration: Consider EGLExt.EGL_OPENGL_ES3_BIT_KHR

- Validate isGLES*() usage and definition
  - Fix BuildComposablePipeline's isGLES() code

  - For GLSL related queries use isGLES() instead of isGLES2(),
    which would exclude ES3

- Add and use ShaderCode.createExtensionDirective(..)
  - Supporting creating GLSL extension directives while reusing strings from GLExtensions

- Minor cleanup of GLContextImpl.setGLFuncAvail(..)
---
 src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

(limited to 'src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java')

diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
index 4202c7454..1438107fe 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
@@ -615,12 +615,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
         }
         if( null != eglES2DynamicLookupHelper ) {
             madeCurrentES3 = mapAvailableEGLESConfig(adevice, 3, hasPBufferES3ES2, rendererQuirksES3ES2, ctpES3ES2);
-            if( madeCurrentES3 ) {
-                // Only support highest - FIXME: Proper ES2/ES3 profile selection
-                madeCurrentES2 = false;
-            } else {
-                madeCurrentES2 = mapAvailableEGLESConfig(adevice, 2, hasPBufferES3ES2, rendererQuirksES3ES2, ctpES3ES2);
-            }
+            madeCurrentES2 = mapAvailableEGLESConfig(adevice, 2, hasPBufferES3ES2, rendererQuirksES3ES2, ctpES3ES2);
         } else {
             madeCurrentES2 = false;
             madeCurrentES3 = false;
@@ -668,7 +663,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
 
     @Override
     public GLDynamicLookupHelper getGLDynamicLookupHelper(int esProfile) {
-        if (2==esProfile) {
+        if ( 2==esProfile || 3==esProfile ) {
             return eglES2DynamicLookupHelper;
         } else if (1==esProfile) {
             return eglES1DynamicLookupHelper;
-- 
cgit v1.2.3