From 1a20ef3aa1dc9acedd7da0475ee19d4c40b18498 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Tue, 16 Jul 2013 20:46:42 +0200
Subject: Redefine: isGLES3Compatible() and isGL4ES3(), i.e. allow GL4ES3 usage
 in case proper ES3_compat is given.

isGLES3Compatible() and isGL4ES3() of GLBase _and_ GLContext
includes [ GL >= 4.3, GL >= 3.1 w/ GL_ARB_ES3_compatibility and GLES3 ].

Tested GL 'aliasing' w/ TestGLProfile01NEWT, i.e. isGL*() and getGL*().
---
 src/jogl/classes/jogamp/opengl/GLContextImpl.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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

diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index 5da60597e..6f4f6f271 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -1536,7 +1536,10 @@ public abstract class GLContextImpl extends GLContext {
             ctxProfileBits |= CTX_IMPL_ES2_COMPAT;
             ctxProfileBits |= CTX_IMPL_FBO;
         }
-    } else if( isExtensionAvailable( GLExtensions.ARB_ES3_compatibility ) ) {
+    } else if( ( major > 4 || major == 4 && minor >= 3 ) ||
+               ( ( major > 3 || major == 3 && minor >= 1 ) && isExtensionAvailable( GLExtensions.ARB_ES3_compatibility ) ) ) {
+        // See GLContext.isGLES3CompatibleAvailable(..)/isGLES3Compatible()
+        //   Includes [ GL &ge; 4.3, GL &ge; 3.1 w/ GL_ARB_ES3_compatibility and GLES3 ]
         ctxProfileBits |= CTX_IMPL_ES3_COMPAT | CTX_IMPL_ES2_COMPAT ;
         ctxProfileBits |= CTX_IMPL_FBO;
     } else if( isExtensionAvailable( GLExtensions.ARB_ES2_compatibility ) ) {
-- 
cgit v1.2.3