From 67444b99f42e5a6db282e8a7dbc0e633713d0d48 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 29 Jul 2014 20:43:06 +0200 Subject: GLContext.hasNoDefaultVAO(): Remove ES 3.x, fixing issues w/ ES 3.x client side vertex arrays Commit 6136457f10d020c779adc78641d0048f77ab1635 defined hasNoDefaultVAO() as [ GL4, GL3, GLES3 ], however ES 3.x still supports (deprecated): - client side vertex arrays - default vertex array object (VAO) Setting a custom VAO leads to GL_INVALID_OPERATION for client side vertex arrays used w/ glVertexPointer(..). Hence removing GLES3 from hasNoDefaultVAO(). --- src/jogl/classes/javax/media/opengl/GLContext.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/jogl/classes') diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java index 6fb943613..09a60d304 100644 --- a/src/jogl/classes/javax/media/opengl/GLContext.java +++ b/src/jogl/classes/javax/media/opengl/GLContext.java @@ -1051,9 +1051,9 @@ public abstract class GLContext { } /** - * Indicates whether this GLContext's native profile does not implement a default vertex array object (VAO), - * starting w/ OpenGL 3.1 core and GLES3. - *

Includes [ GL4, GL3, GLES3 ].

+ * Indicates whether this GLContext's native profile does not implement a default vertex array object (VAO), + * starting w/ OpenGL 3.1 core. + *

Includes [ GL4, GL3 ].

*
      Due to GL 3.1 core spec: E.1. DEPRECATED AND REMOVED FEATURES (p 296),
             GL 3.2 core spec: E.2. DEPRECATED AND REMOVED FEATURES (p 331)
@@ -1062,8 +1062,17 @@ public abstract class GLContext {
      More clear is GL 4.3 core spec: 10.4 (p 307).
    * 
*
-     GLES3 is included, since upcoming ES releases > 3.0 may behave the same:
+     ES 3.x is not included here.
+     Due to it's ES 2.0 backward compatibility it still supports the following features:
+            client side vertex arrays
+            default vertex array object
+
+     Binding a custom VAO with ES 3.0 would cause client side vertex arrays via {@link GL2ES1#glVertexPointer(int, int, int, java.nio.Buffer) glVertexPointer}
+     to produce GL_INVALID_OPERATION.
+
+     However, they are marked deprecated:
             GL ES 3.0 spec F.1. Legacy Features (p 322).
+            GL ES 3.1 spec F.1. Legacy Features (p 454).
    * 
*

* If no default VAO is implemented in the native OpenGL profile, @@ -1072,7 +1081,7 @@ public abstract class GLContext { * @see #getDefaultVAO() */ public final boolean hasNoDefaultVAO() { - return ( 0 != ( ctxOptions & CTX_PROFILE_ES ) && ctxVersion.getMajor() >= 3 ) || + return // ES 3.x not included, see above. ( 0 != ( ctxOptions & CTX_PROFILE_ES ) && ctxVersion.getMajor() >= 3 ) || ( 0 != ( ctxOptions & CTX_IS_ARB_CREATED ) && 0 != ( ctxOptions & CTX_PROFILE_CORE ) && ctxVersion.compareTo(Version310) >= 0 -- cgit v1.2.3