OSDN Git Service

Add GLES32 class templates
authorPablo Ceballos <pceballos@google.com>
Fri, 30 Oct 2015 17:31:22 +0000 (10:31 -0700)
committerPablo Ceballos <pceballos@google.com>
Fri, 18 Dec 2015 21:11:37 +0000 (13:11 -0800)
- Added a script that takes the #defines in gl2/3.h and formats them
  for use in the Java template.

- Generated GLES32.spec using glgen2.

- Added full support for void* in glgen. It wasn't previously
  necessary since the apis were using GLvoid instead.

- Created the GLES32 header stubs. Added stubs for GLES32 functions
  that couldn't be handled by the code generator. Added checks in the
  checks.spec file where appropriate.

- Generated the GLES32 class and JNI.

Change-Id: Ifc8512ed56af75bbc3e7ec2ea1377895201d5325

32 files changed:
opengl/tools/glgen/convert_to_java.py [new file with mode: 0644]
opengl/tools/glgen/gen
opengl/tools/glgen/specs/gles11/GLES32.spec [new file with mode: 0644]
opengl/tools/glgen/specs/gles11/checks.spec
opengl/tools/glgen/src/CFunc.java
opengl/tools/glgen/src/GenerateGLES.java
opengl/tools/glgen/src/JType.java
opengl/tools/glgen/stubs/gles11/GLES31Header.java-if
opengl/tools/glgen/stubs/gles11/GLES32Header.java-if [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/GLES32cHeader.cpp [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glDebugMessageCallback.cpp [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glDebugMessageCallback.java [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glDebugMessageCallback.nativeReg [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glDrawElementsInstancedBaseVertex.cpp [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glDrawElementsInstancedBaseVertex.java [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glDrawElementsInstancedBaseVertex.nativeReg [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glGetDebugMessageLog.cpp [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glGetDebugMessageLog.java [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glGetDebugMessageLog.nativeReg [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glGetObjectLabel.cpp [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glGetObjectLabel.java [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glGetObjectLabel.nativeReg [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabel.cpp [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabel.java [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabel.nativeReg [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glGetPointerv.cpp [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glGetPointerv.java [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glGetPointerv.nativeReg [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glObjectPtrLabel.cpp [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glObjectPtrLabel.java [new file with mode: 0644]
opengl/tools/glgen/stubs/gles11/glObjectPtrLabel.nativeReg [new file with mode: 0644]
opengl/tools/glgen2/glgen.py

diff --git a/opengl/tools/glgen/convert_to_java.py b/opengl/tools/glgen/convert_to_java.py
new file mode 100644 (file)
index 0000000..5254735
--- /dev/null
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+#
+# Copyright 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This script is for converting the #defines in the gl2/3.h into the Java
+# form used in the GLES2/3Header.java-if stub files that are then used by
+# the code generator. Provide input with stdin and receive output on stdout.
+
+import sys
+
+allDefines = []
+maxLen = 0
+
+for line in sys.stdin:
+    defineValuePair = line.strip().split()[1:]
+    maxLen = max(maxLen, len(defineValuePair[0]))
+    allDefines.append(defineValuePair)
+for define in sorted(allDefines, key=lambda define: define[1]):
+    print('    public static final int {0[0]:<{1}} = {0[1]};'.format(define, maxLen))
index 84a94c8..f9e96ea 100755 (executable)
@@ -107,7 +107,8 @@ javac -d classes    android/opengl/EGL14.java \
                     android/opengl/GLES20.java \
                     android/opengl/GLES30.java \
                     android/opengl/GLES31.java \
-                    android/opengl/GLES31Ext.java
+                    android/opengl/GLES31Ext.java \
+                    android/opengl/GLES32.java
 popd > /dev/null
 JAVA_RESULT=$?
 if [ $JAVA_RESULT -ne 0 ]; then
@@ -154,7 +155,7 @@ do
     compareGenerated ../../../../base/opengl/java/javax/microedition/khronos/opengles generated/javax/microedition/khronos/opengles $x
 done
 
-for x in EGL14 EGLExt GLES10 GLES10Ext GLES11 GLES11Ext GLES20 GLES30 GLES31 GLES31Ext
+for x in EGL14 EGLExt GLES10 GLES10Ext GLES11 GLES11Ext GLES20 GLES30 GLES31 GLES31Ext GLES32
 do
     compareGenerated ../../../../base/opengl/java/android/opengl generated/android/opengl ${x}.java
     compareGenerated ../../../../base/core/jni generated/C android_opengl_${x}.cpp
diff --git a/opengl/tools/glgen/specs/gles11/GLES32.spec b/opengl/tools/glgen/specs/gles11/GLES32.spec
new file mode 100644 (file)
index 0000000..ec60b51
--- /dev/null
@@ -0,0 +1,44 @@
+void glBlendBarrier ( void )
+void glCopyImageSubData ( GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth )
+void glDebugMessageControl ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled )
+void glDebugMessageInsert ( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf )
+void glDebugMessageCallback ( GLDEBUGPROC callback, const void *userParam )
+GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog )
+void glPushDebugGroup ( GLenum source, GLuint id, GLsizei length, const GLchar *message )
+void glPopDebugGroup ( void )
+void glObjectLabel ( GLenum identifier, GLuint name, GLsizei length, const GLchar *label )
+void glGetObjectLabel ( GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label )
+void glObjectPtrLabel ( const void *ptr, GLsizei length, const GLchar *label )
+void glGetObjectPtrLabel ( const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label )
+void glGetPointerv ( GLenum pname, void **params )
+void glEnablei ( GLenum target, GLuint index )
+void glDisablei ( GLenum target, GLuint index )
+void glBlendEquationi ( GLuint buf, GLenum mode )
+void glBlendEquationSeparatei ( GLuint buf, GLenum modeRGB, GLenum modeAlpha )
+void glBlendFunci ( GLuint buf, GLenum src, GLenum dst )
+void glBlendFuncSeparatei ( GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha )
+void glColorMaski ( GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a )
+GLboolean glIsEnabledi ( GLenum target, GLuint index )
+void glDrawElementsBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex )
+void glDrawRangeElementsBaseVertex ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex )
+void glDrawElementsInstancedBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex )
+void glFramebufferTexture ( GLenum target, GLenum attachment, GLuint texture, GLint level )
+void glPrimitiveBoundingBox ( GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW )
+GLenum glGetGraphicsResetStatus ( void )
+void glReadnPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data )
+void glGetnUniformfv ( GLuint program, GLint location, GLsizei bufSize, GLfloat *params )
+void glGetnUniformiv ( GLuint program, GLint location, GLsizei bufSize, GLint *params )
+void glGetnUniformuiv ( GLuint program, GLint location, GLsizei bufSize, GLuint *params )
+void glMinSampleShading ( GLfloat value )
+void glPatchParameteri ( GLenum pname, GLint value )
+void glTexParameterIiv ( GLenum target, GLenum pname, const GLint *params )
+void glTexParameterIuiv ( GLenum target, GLenum pname, const GLuint *params )
+void glGetTexParameterIiv ( GLenum target, GLenum pname, GLint *params )
+void glGetTexParameterIuiv ( GLenum target, GLenum pname, GLuint *params )
+void glSamplerParameterIiv ( GLuint sampler, GLenum pname, const GLint *param )
+void glSamplerParameterIuiv ( GLuint sampler, GLenum pname, const GLuint *param )
+void glGetSamplerParameterIiv ( GLuint sampler, GLenum pname, GLint *params )
+void glGetSamplerParameterIuiv ( GLuint sampler, GLenum pname, GLuint *params )
+void glTexBuffer ( GLenum target, GLenum internalformat, GLuint buffer )
+void glTexBufferRange ( GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size )
+void glTexStorage3DMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations )
index e1f76fd..04413cf 100644 (file)
@@ -25,6 +25,8 @@ glBufferSubData check data size
 # glCompressedTexSubImage2D
 glClipPlanef check eqn 4
 glClipPlanex check eqn 4
+glDebugMessageControl check ids count
+glDebugMessageInsert check message length
 glDeleteBuffers check buffers n
 glDeleteFramebuffers check framebuffers n
 glDeleteFramebuffersOES check framebuffers n
@@ -32,6 +34,8 @@ glDeleteRenderbuffers check renderbuffers n
 glDeleteRenderbuffersOES check renderbuffers n
 glDeleteTextures check textures n
 glDrawElements check_AIOOBE indices count
+glDrawElementsBaseVertex check_AIOOBE indices count-basevertex
+glDrawRangeElementsBaseVertex check_AIOOBE indices count-basevertex
 glDrawTexfvOES check coords 5
 glDrawTexivOES check coords 5
 glDrawTexsvOES check coords 5
@@ -72,6 +76,9 @@ glGetSynciv nullAllowed length
 glGetTexEnv ifcheck params 4 pname GL_TEXTURE_ENV_COLOR
 glGetTexGen ifcheck params 4 pname GL_OBJECT_PLANE,GL_EYE_PLANE
 glGetTexParameter check params 1
+glGetnUniformfv check params bufSize
+glGetnUniformiv check params bufSize
+glGetnUniformuiv check params bufSize
 glGetUniform check params 1
 glGetVertexAttrib ifcheck params 4 pname GL_CURRENT_VERTEX_ATTRIB
 glLight ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION
@@ -80,9 +87,12 @@ glLoadMatrix check m 16
 glMaterial ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE
 glMultMatrix check m 16
 glObjectLabelKHR nullAllowed label
+glObjectLabel nullAllowed label check label length
 glPointParameter check params 1
+glPushDebugGroup check message length
 glQueryMatrixxOES check mantissa 16 check exponent 16 return -1
 # glReadPixels
+glReadnPixels check data bufSize
 glShaderBinary check binary length
 // glShaderSource
 glTexEnv ifcheck params 4 pname GL_TEXTURE_ENV_COLOR
index a192c00..99c62b5 100644 (file)
@@ -141,7 +141,10 @@ public class CFunc {
             String tok = tokens[i++];
 
             if (tok.equals("(")) {
-                continue;
+                tok = tokens[i++];
+                if (tok.equals("void")) {
+                    break;
+                }
             }
             if (tok.equals(")")) {
                 break;
@@ -158,10 +161,6 @@ public class CFunc {
             }
             argType.setBaseType(argTypeName);
 
-            if (argTypeName.equals("void")) {
-                break;
-            }
-
             argName = tokens[i++];
             if (argName.startsWith("*")) {
                 argType.setIsPointer(true);
index 5693ef3..cbca682 100644 (file)
@@ -85,7 +85,7 @@ public class GenerateGLES {
         // Generate files
         for(String suffix: new String[] {"GLES10", "GLES10Ext",
                 "GLES11", "GLES11Ext", "GLES20",
-                "GLES30", "GLES31", "GLES31Ext"})
+                "GLES30", "GLES31", "GLES31Ext", "GLES32"})
         {
             BufferedReader spec11Reader =
                 new BufferedReader(new FileReader("specs/gles11/"
index 5803a44..7f08503 100644 (file)
@@ -44,7 +44,7 @@ public class JType {
     typeMapping.put(new CType("GLuint"), new JType("int"));
     typeMapping.put(new CType("void"), new JType("void"));
     typeMapping.put(new CType("GLubyte", true, true), new JType("String", false, false));
-    typeMapping.put(new CType("char", false, true), new JType("byte"));
+    typeMapping.put(new CType("char"), new JType("byte"));
     typeMapping.put(new CType("char", true, true), new JType("String", false, false));
     typeMapping.put(new CType("GLchar", true, true), new JType("String", false, false));
     typeMapping.put(new CType("int"), new JType("int"));
@@ -75,6 +75,8 @@ public class JType {
             new JType("java.nio.Buffer", true, false));
     typeMapping.put(new CType("void", false, true),
             new JType("java.nio.Buffer", true, false));
+    typeMapping.put(new CType("void", true, true),
+            new JType("java.nio.Buffer", true, false));
     typeMapping.put(new CType("GLeglImageOES", false, false),
             new JType("java.nio.Buffer", true, false));
 
@@ -111,6 +113,8 @@ public class JType {
     // Typed pointers map to arrays + offsets
     arrayTypeMapping.put(new CType("char", false, true),
             new JType("byte", false, true));
+    arrayTypeMapping.put(new CType("GLchar", false, true),
+            new JType("byte", false, true));
     arrayTypeMapping.put(new CType("GLboolean", false, true),
             new JType("boolean", false, true));
     arrayTypeMapping.put(new CType("GLenum", false, true), new JType("int", false, true));
index c9ed04c..9d67521 100644 (file)
@@ -204,4 +204,5 @@ public class GLES31 extends GLES30 {
         _nativeClassInit();
     }
 
-    private GLES31() {}
+    /** @hide */
+    GLES31() {}
diff --git a/opengl/tools/glgen/stubs/gles11/GLES32Header.java-if b/opengl/tools/glgen/stubs/gles11/GLES32Header.java-if
new file mode 100644 (file)
index 0000000..b526cb7
--- /dev/null
@@ -0,0 +1,241 @@
+/*
+ * Copyright 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// This source file is automatically generated
+
+package android.opengl;
+
+/** OpenGL ES 3.2
+ */
+public class GLES32 extends GLES31 {
+
+    public static final int GL_CONTEXT_FLAG_DEBUG_BIT                          = 0x00000002;
+
+    public static final int GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT                  = 0x00000004;
+
+    public static final int GL_GEOMETRY_SHADER_BIT                             = 0x00000004;
+    public static final int GL_TESS_CONTROL_SHADER_BIT                         = 0x00000008;
+    public static final int GL_TESS_EVALUATION_SHADER_BIT                      = 0x00000010;
+
+    public static final int GL_QUADS                                           = 0x0007;
+    public static final int GL_LINES_ADJACENCY                                 = 0x000A;
+    public static final int GL_LINE_STRIP_ADJACENCY                            = 0x000B;
+    public static final int GL_TRIANGLES_ADJACENCY                             = 0x000C;
+    public static final int GL_TRIANGLE_STRIP_ADJACENCY                        = 0x000D;
+    public static final int GL_PATCHES                                         = 0x000E;
+    public static final int GL_STACK_OVERFLOW                                  = 0x0503;
+    public static final int GL_STACK_UNDERFLOW                                 = 0x0504;
+    public static final int GL_CONTEXT_LOST                                    = 0x0507;
+    public static final int GL_TEXTURE_BORDER_COLOR                            = 0x1004;
+    public static final int GL_VERTEX_ARRAY                                    = 0x8074;
+    public static final int GL_CLAMP_TO_BORDER                                 = 0x812D;
+    public static final int GL_CONTEXT_FLAGS                                   = 0x821E;
+    public static final int GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED         = 0x8221;
+    public static final int GL_DEBUG_OUTPUT_SYNCHRONOUS                        = 0x8242;
+    public static final int GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH                = 0x8243;
+    public static final int GL_DEBUG_CALLBACK_FUNCTION                         = 0x8244;
+    public static final int GL_DEBUG_CALLBACK_USER_PARAM                       = 0x8245;
+    public static final int GL_DEBUG_SOURCE_API                                = 0x8246;
+    public static final int GL_DEBUG_SOURCE_WINDOW_SYSTEM                      = 0x8247;
+    public static final int GL_DEBUG_SOURCE_SHADER_COMPILER                    = 0x8248;
+    public static final int GL_DEBUG_SOURCE_THIRD_PARTY                        = 0x8249;
+    public static final int GL_DEBUG_SOURCE_APPLICATION                        = 0x824A;
+    public static final int GL_DEBUG_SOURCE_OTHER                              = 0x824B;
+    public static final int GL_DEBUG_TYPE_ERROR                                = 0x824C;
+    public static final int GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR                  = 0x824D;
+    public static final int GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR                   = 0x824E;
+    public static final int GL_DEBUG_TYPE_PORTABILITY                          = 0x824F;
+    public static final int GL_DEBUG_TYPE_PERFORMANCE                          = 0x8250;
+    public static final int GL_DEBUG_TYPE_OTHER                                = 0x8251;
+    public static final int GL_LOSE_CONTEXT_ON_RESET                           = 0x8252;
+    public static final int GL_GUILTY_CONTEXT_RESET                            = 0x8253;
+    public static final int GL_INNOCENT_CONTEXT_RESET                          = 0x8254;
+    public static final int GL_UNKNOWN_CONTEXT_RESET                           = 0x8255;
+    public static final int GL_RESET_NOTIFICATION_STRATEGY                     = 0x8256;
+    public static final int GL_LAYER_PROVOKING_VERTEX                          = 0x825E;
+    public static final int GL_UNDEFINED_VERTEX                                = 0x8260;
+    public static final int GL_NO_RESET_NOTIFICATION                           = 0x8261;
+    public static final int GL_DEBUG_TYPE_MARKER                               = 0x8268;
+    public static final int GL_DEBUG_TYPE_PUSH_GROUP                           = 0x8269;
+    public static final int GL_DEBUG_TYPE_POP_GROUP                            = 0x826A;
+    public static final int GL_DEBUG_SEVERITY_NOTIFICATION                     = 0x826B;
+    public static final int GL_MAX_DEBUG_GROUP_STACK_DEPTH                     = 0x826C;
+    public static final int GL_DEBUG_GROUP_STACK_DEPTH                         = 0x826D;
+    public static final int GL_BUFFER                                          = 0x82E0;
+    public static final int GL_SHADER                                          = 0x82E1;
+    public static final int GL_PROGRAM                                         = 0x82E2;
+    public static final int GL_QUERY                                           = 0x82E3;
+    public static final int GL_PROGRAM_PIPELINE                                = 0x82E4;
+    public static final int GL_SAMPLER                                         = 0x82E6;
+    public static final int GL_MAX_LABEL_LENGTH                                = 0x82E8;
+    public static final int GL_MAX_TESS_CONTROL_INPUT_COMPONENTS               = 0x886C;
+    public static final int GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS            = 0x886D;
+    public static final int GL_GEOMETRY_SHADER_INVOCATIONS                     = 0x887F;
+    public static final int GL_GEOMETRY_VERTICES_OUT                           = 0x8916;
+    public static final int GL_GEOMETRY_INPUT_TYPE                             = 0x8917;
+    public static final int GL_GEOMETRY_OUTPUT_TYPE                            = 0x8918;
+    public static final int GL_MAX_GEOMETRY_UNIFORM_BLOCKS                     = 0x8A2C;
+    public static final int GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS        = 0x8A32;
+    public static final int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS                = 0x8C29;
+    public static final int GL_TEXTURE_BUFFER                                  = 0x8C2A;
+    public static final int GL_TEXTURE_BUFFER_BINDING                          = 0x8C2A;
+    public static final int GL_MAX_TEXTURE_BUFFER_SIZE                         = 0x8C2B;
+    public static final int GL_TEXTURE_BINDING_BUFFER                          = 0x8C2C;
+    public static final int GL_TEXTURE_BUFFER_DATA_STORE_BINDING               = 0x8C2D;
+    public static final int GL_SAMPLE_SHADING                                  = 0x8C36;
+    public static final int GL_MIN_SAMPLE_SHADING_VALUE                        = 0x8C37;
+    public static final int GL_PRIMITIVES_GENERATED                            = 0x8C87;
+    public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED                  = 0x8DA7;
+    public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS            = 0x8DA8;
+    public static final int GL_SAMPLER_BUFFER                                  = 0x8DC2;
+    public static final int GL_INT_SAMPLER_BUFFER                              = 0x8DD0;
+    public static final int GL_UNSIGNED_INT_SAMPLER_BUFFER                     = 0x8DD8;
+    public static final int GL_GEOMETRY_SHADER                                 = 0x8DD9;
+    public static final int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS                 = 0x8DDF;
+    public static final int GL_MAX_GEOMETRY_OUTPUT_VERTICES                    = 0x8DE0;
+    public static final int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS            = 0x8DE1;
+    public static final int GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS    = 0x8E1E;
+    public static final int GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E1F;
+    public static final int GL_FIRST_VERTEX_CONVENTION                         = 0x8E4D;
+    public static final int GL_LAST_VERTEX_CONVENTION                          = 0x8E4E;
+    public static final int GL_MAX_GEOMETRY_SHADER_INVOCATIONS                 = 0x8E5A;
+    public static final int GL_MIN_FRAGMENT_INTERPOLATION_OFFSET               = 0x8E5B;
+    public static final int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET               = 0x8E5C;
+    public static final int GL_FRAGMENT_INTERPOLATION_OFFSET_BITS              = 0x8E5D;
+    public static final int GL_PATCH_VERTICES                                  = 0x8E72;
+    public static final int GL_TESS_CONTROL_OUTPUT_VERTICES                    = 0x8E75;
+    public static final int GL_TESS_GEN_MODE                                   = 0x8E76;
+    public static final int GL_TESS_GEN_SPACING                                = 0x8E77;
+    public static final int GL_TESS_GEN_VERTEX_ORDER                           = 0x8E78;
+    public static final int GL_TESS_GEN_POINT_MODE                             = 0x8E79;
+    public static final int GL_ISOLINES                                        = 0x8E7A;
+    public static final int GL_FRACTIONAL_ODD                                  = 0x8E7B;
+    public static final int GL_FRACTIONAL_EVEN                                 = 0x8E7C;
+    public static final int GL_MAX_PATCH_VERTICES                              = 0x8E7D;
+    public static final int GL_MAX_TESS_GEN_LEVEL                              = 0x8E7E;
+    public static final int GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS             = 0x8E7F;
+    public static final int GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS          = 0x8E80;
+    public static final int GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS            = 0x8E81;
+    public static final int GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS         = 0x8E82;
+    public static final int GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS              = 0x8E83;
+    public static final int GL_MAX_TESS_PATCH_COMPONENTS                       = 0x8E84;
+    public static final int GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS        = 0x8E85;
+    public static final int GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS           = 0x8E86;
+    public static final int GL_TESS_EVALUATION_SHADER                          = 0x8E87;
+    public static final int GL_TESS_CONTROL_SHADER                             = 0x8E88;
+    public static final int GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS                 = 0x8E89;
+    public static final int GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS              = 0x8E8A;
+    public static final int GL_TEXTURE_CUBE_MAP_ARRAY                          = 0x9009;
+    public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY                  = 0x900A;
+    public static final int GL_SAMPLER_CUBE_MAP_ARRAY                          = 0x900C;
+    public static final int GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW                   = 0x900D;
+    public static final int GL_INT_SAMPLER_CUBE_MAP_ARRAY                      = 0x900E;
+    public static final int GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY             = 0x900F;
+    public static final int GL_IMAGE_BUFFER                                    = 0x9051;
+    public static final int GL_IMAGE_CUBE_MAP_ARRAY                            = 0x9054;
+    public static final int GL_INT_IMAGE_BUFFER                                = 0x905C;
+    public static final int GL_INT_IMAGE_CUBE_MAP_ARRAY                        = 0x905F;
+    public static final int GL_UNSIGNED_INT_IMAGE_BUFFER                       = 0x9067;
+    public static final int GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY               = 0x906A;
+    public static final int GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS                 = 0x90CB;
+    public static final int GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS              = 0x90CC;
+    public static final int GL_MAX_GEOMETRY_IMAGE_UNIFORMS                     = 0x90CD;
+    public static final int GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS              = 0x90D7;
+    public static final int GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS          = 0x90D8;
+    public static final int GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS       = 0x90D9;
+    public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY                    = 0x9102;
+    public static final int GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY            = 0x9105;
+    public static final int GL_SAMPLER_2D_MULTISAMPLE_ARRAY                    = 0x910B;
+    public static final int GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY                = 0x910C;
+    public static final int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY       = 0x910D;
+    public static final int GL_MAX_GEOMETRY_INPUT_COMPONENTS                   = 0x9123;
+    public static final int GL_MAX_GEOMETRY_OUTPUT_COMPONENTS                  = 0x9124;
+    public static final int GL_MAX_DEBUG_MESSAGE_LENGTH                        = 0x9143;
+    public static final int GL_MAX_DEBUG_LOGGED_MESSAGES                       = 0x9144;
+    public static final int GL_DEBUG_LOGGED_MESSAGES                           = 0x9145;
+    public static final int GL_DEBUG_SEVERITY_HIGH                             = 0x9146;
+    public static final int GL_DEBUG_SEVERITY_MEDIUM                           = 0x9147;
+    public static final int GL_DEBUG_SEVERITY_LOW                              = 0x9148;
+    public static final int GL_TEXTURE_BUFFER_OFFSET                           = 0x919D;
+    public static final int GL_TEXTURE_BUFFER_SIZE                             = 0x919E;
+    public static final int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT                 = 0x919F;
+    public static final int GL_MULTIPLY                                        = 0x9294;
+    public static final int GL_SCREEN                                          = 0x9295;
+    public static final int GL_OVERLAY                                         = 0x9296;
+    public static final int GL_DARKEN                                          = 0x9297;
+    public static final int GL_LIGHTEN                                         = 0x9298;
+    public static final int GL_COLORDODGE                                      = 0x9299;
+    public static final int GL_COLORBURN                                       = 0x929A;
+    public static final int GL_HARDLIGHT                                       = 0x929B;
+    public static final int GL_SOFTLIGHT                                       = 0x929C;
+    public static final int GL_DIFFERENCE                                      = 0x929E;
+    public static final int GL_EXCLUSION                                       = 0x92A0;
+    public static final int GL_HSL_HUE                                         = 0x92AD;
+    public static final int GL_HSL_SATURATION                                  = 0x92AE;
+    public static final int GL_HSL_COLOR                                       = 0x92AF;
+    public static final int GL_HSL_LUMINOSITY                                  = 0x92B0;
+    public static final int GL_PRIMITIVE_BOUNDING_BOX                          = 0x92BE;
+    public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS         = 0x92CD;
+    public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS      = 0x92CE;
+    public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS             = 0x92CF;
+    public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS                = 0x92D3;
+    public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS             = 0x92D4;
+    public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTERS                    = 0x92D5;
+    public static final int GL_DEBUG_OUTPUT                                    = 0x92E0;
+    public static final int GL_IS_PER_PATCH                                    = 0x92E7;
+    public static final int GL_REFERENCED_BY_TESS_CONTROL_SHADER               = 0x9307;
+    public static final int GL_REFERENCED_BY_TESS_EVALUATION_SHADER            = 0x9308;
+    public static final int GL_REFERENCED_BY_GEOMETRY_SHADER                   = 0x9309;
+    public static final int GL_FRAMEBUFFER_DEFAULT_LAYERS                      = 0x9312;
+    public static final int GL_MAX_FRAMEBUFFER_LAYERS                          = 0x9317;
+    public static final int GL_MULTISAMPLE_LINE_WIDTH_RANGE                    = 0x9381;
+    public static final int GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY              = 0x9382;
+    public static final int GL_COMPRESSED_RGBA_ASTC_4x4                        = 0x93B0;
+    public static final int GL_COMPRESSED_RGBA_ASTC_5x4                        = 0x93B1;
+    public static final int GL_COMPRESSED_RGBA_ASTC_5x5                        = 0x93B2;
+    public static final int GL_COMPRESSED_RGBA_ASTC_6x5                        = 0x93B3;
+    public static final int GL_COMPRESSED_RGBA_ASTC_6x6                        = 0x93B4;
+    public static final int GL_COMPRESSED_RGBA_ASTC_8x5                        = 0x93B5;
+    public static final int GL_COMPRESSED_RGBA_ASTC_8x6                        = 0x93B6;
+    public static final int GL_COMPRESSED_RGBA_ASTC_8x8                        = 0x93B7;
+    public static final int GL_COMPRESSED_RGBA_ASTC_10x5                       = 0x93B8;
+    public static final int GL_COMPRESSED_RGBA_ASTC_10x6                       = 0x93B9;
+    public static final int GL_COMPRESSED_RGBA_ASTC_10x8                       = 0x93BA;
+    public static final int GL_COMPRESSED_RGBA_ASTC_10x10                      = 0x93BB;
+    public static final int GL_COMPRESSED_RGBA_ASTC_12x10                      = 0x93BC;
+    public static final int GL_COMPRESSED_RGBA_ASTC_12x12                      = 0x93BD;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4                = 0x93D0;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4                = 0x93D1;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5                = 0x93D2;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5                = 0x93D3;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6                = 0x93D4;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5                = 0x93D5;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6                = 0x93D6;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8                = 0x93D7;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5               = 0x93D8;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6               = 0x93D9;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8               = 0x93DA;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10              = 0x93DB;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10              = 0x93DC;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12              = 0x93DD;
+
+
+    native private static void _nativeClassInit();
+    static {
+        _nativeClassInit();
+    }
+
+    private GLES32() {}
diff --git a/opengl/tools/glgen/stubs/gles11/GLES32cHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES32cHeader.cpp
new file mode 100644 (file)
index 0000000..e9c5fc7
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// This source file is automatically generated
+
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+
+#include <stdint.h>
+#include <GLES3/gl32.h>
\ No newline at end of file
diff --git a/opengl/tools/glgen/stubs/gles11/glDebugMessageCallback.cpp b/opengl/tools/glgen/stubs/gles11/glDebugMessageCallback.cpp
new file mode 100644 (file)
index 0000000..a5329d6
--- /dev/null
@@ -0,0 +1,5 @@
+/* void glDebugMessageCallback ( GLDEBUGPROC callback, const void *userParam ) */
+static void
+android_glDebugMessageCallback(JNIEnv *_env, jobject _this, jobject callback) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+}
diff --git a/opengl/tools/glgen/stubs/gles11/glDebugMessageCallback.java b/opengl/tools/glgen/stubs/gles11/glDebugMessageCallback.java
new file mode 100644 (file)
index 0000000..21cbef3
--- /dev/null
@@ -0,0 +1,8 @@
+    // C function void glDebugMessageCallback ( GLDEBUGPROC callback, const void *userParam )
+
+    public interface DebugProc {
+        void onMessage(int source, int type, int id, int severity, String message);
+    }
+
+    public static native void glDebugMessageCallback(DebugProc callback);
+
diff --git a/opengl/tools/glgen/stubs/gles11/glDebugMessageCallback.nativeReg b/opengl/tools/glgen/stubs/gles11/glDebugMessageCallback.nativeReg
new file mode 100644 (file)
index 0000000..589df79
--- /dev/null
@@ -0,0 +1 @@
+{"glDebugMessageCallback", "(Landroid/opengl/GLES32$DebugProc;)V", (void *) android_glDebugMessageCallback },
diff --git a/opengl/tools/glgen/stubs/gles11/glDrawElementsInstancedBaseVertex.cpp b/opengl/tools/glgen/stubs/gles11/glDrawElementsInstancedBaseVertex.cpp
new file mode 100644 (file)
index 0000000..4e253b7
--- /dev/null
@@ -0,0 +1,51 @@
+/* void glDrawElementsInstancedBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount, GLint basevertex ) */
+static void
+android_glDrawElementsInstancedBaseVertex__IIILjava_nio_Buffer_2II
+  (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf, jint instanceCount, jint basevertex) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    jarray _array = (jarray) 0;
+    jint _bufferOffset = (jint) 0;
+    jint _remaining;
+    void *indices = (void *) 0;
+
+    indices = (void *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset);
+    if (_remaining < count-basevertex) {
+        _exception = 1;
+        _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
+        _exceptionMessage = "remaining() < count-basevertex < needed";
+        goto exit;
+    }
+    if (indices == NULL) {
+        char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+        indices = (void *) (_indicesBase + _bufferOffset);
+    }
+    glDrawElementsInstancedBaseVertex(
+        (GLenum)mode,
+        (GLsizei)count,
+        (GLenum)type,
+        (void *)indices,
+        (GLsizei)instanceCount,
+        (GLint) basevertex
+    );
+
+exit:
+    if (_array) {
+        releasePointer(_env, _array, indices, JNI_FALSE);
+    }
+}
+
+/* void glDrawElementsInstancedBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount, GLint basevertex ) */
+static void
+android_glDrawElementsInstancedBaseVertex__IIIIII
+  (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint indicesOffset, jint instanceCount, jint basevertex) {
+    glDrawElementsInstancedBaseVertex(
+        (GLenum)mode,
+        (GLsizei)count,
+        (GLenum)type,
+        (void *)static_cast<uintptr_t>(indicesOffset),
+        (GLsizei)instanceCount,
+        (GLint)basevertex
+    );
+}
diff --git a/opengl/tools/glgen/stubs/gles11/glDrawElementsInstancedBaseVertex.java b/opengl/tools/glgen/stubs/gles11/glDrawElementsInstancedBaseVertex.java
new file mode 100644 (file)
index 0000000..2aad293
--- /dev/null
@@ -0,0 +1,22 @@
+    // C function void glDrawElementsInstancedBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount, GLint basevertex )
+
+    public static native void glDrawElementsInstancedBaseVertex(
+        int mode,
+        int count,
+        int type,
+        java.nio.Buffer indices,
+        int instanceCount,
+        int basevertex
+    );
+
+    // C function void glDrawElementsInstancedBaseVertex ( GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount, GLint basevertex )
+
+    public static native void glDrawElementsInstancedBaseVertex(
+        int mode,
+        int count,
+        int type,
+        int indicesOffset,
+        int instanceCount,
+        int basevertex
+    );
+
diff --git a/opengl/tools/glgen/stubs/gles11/glDrawElementsInstancedBaseVertex.nativeReg b/opengl/tools/glgen/stubs/gles11/glDrawElementsInstancedBaseVertex.nativeReg
new file mode 100644 (file)
index 0000000..5faafa6
--- /dev/null
@@ -0,0 +1,2 @@
+{"glDrawElementsInstancedBaseVertex", "(IIILjava/nio/Buffer;II)V", (void *) android_glDrawElementsInstancedBaseVertex__IIILjava_nio_Buffer_2II },
+{"glDrawElementsInstancedBaseVertex", "(IIIIII)V", (void *) android_glDrawElementsInstancedBaseVertex__IIIIII },
diff --git a/opengl/tools/glgen/stubs/gles11/glGetDebugMessageLog.cpp b/opengl/tools/glgen/stubs/gles11/glGetDebugMessageLog.cpp
new file mode 100644 (file)
index 0000000..0a37d97
--- /dev/null
@@ -0,0 +1,31 @@
+/* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
+static jint
+android_glGetDebugMessageLog__II_3II_3II_3II_3II_3II_3BI
+  (JNIEnv *_env, jobject _this, jint count, jint bufSize, jintArray sources_ref, jint sourcesOffset, jintArray types_ref, jint typesOffset, jintArray ids_ref, jint idsOffset, jintArray severities_ref, jint severitiesOffset, jintArray lengths_ref, jint lengthsOffset, jbyteArray messageLog_ref, jint messageLogOffset) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+    return 0;
+}
+
+/* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
+static uint
+android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2
+  (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref, jobject lengths_ref, jobject messageLog_ref) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+    return 0;
+}
+
+/* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
+static jobjectArray
+android_glGetDebugMessageLog__I_3II_3II_3II_3II
+  (JNIEnv *_env, jobject _this, jint count, jintArray sources_ref, jint sourcesOffset, jintArray types_ref, jint typesOffset, jintArray ids_ref, jint idsOffset, jintArray severities_ref, jint severitiesOffset) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+    return 0;
+}
+
+/* GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
+static jobjectArray
+android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
+  (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+    return 0;
+}
diff --git a/opengl/tools/glgen/stubs/gles11/glGetDebugMessageLog.java b/opengl/tools/glgen/stubs/gles11/glGetDebugMessageLog.java
new file mode 100644 (file)
index 0000000..9162c0a
--- /dev/null
@@ -0,0 +1,51 @@
+    // C function GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog )
+
+    public static native int glGetDebugMessageLog(
+        int count,
+        int bufSize,
+        int[] sources,
+        int sourcesOffset,
+        int[] types,
+        int typesOffset,
+        int[] ids,
+        int idsOffset,
+        int[] severities,
+        int severitiesOffset,
+        int[] lengths,
+        int lengthsOffset,
+        byte[] messageLog,
+        int messageLogOffset);
+
+    // C function GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog )
+
+    public static native int glGetDebugMessageLog(
+        int count,
+        java.nio.IntBuffer sources,
+        java.nio.IntBuffer types,
+        java.nio.IntBuffer ids,
+        java.nio.IntBuffer severities,
+        java.nio.IntBuffer lengths,
+        java.nio.ByteBuffer messageLog);
+
+    // C function GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog )
+
+    public static native String[] glGetDebugMessageLog(
+        int count,
+        int[] sources,
+        int sourcesOffset,
+        int[] types,
+        int typesOffset,
+        int[] ids,
+        int idsOffset,
+        int[] severities,
+        int severitiesOffset);
+
+    // C function GLuint glGetDebugMessageLog ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog )
+
+    public static native String[] glGetDebugMessageLog(
+        int count,
+        java.nio.IntBuffer sources,
+        java.nio.IntBuffer types,
+        java.nio.IntBuffer ids,
+        java.nio.IntBuffer severities);
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetDebugMessageLog.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetDebugMessageLog.nativeReg
new file mode 100644 (file)
index 0000000..fd027e7
--- /dev/null
@@ -0,0 +1,4 @@
+{"glGetDebugMessageLog", "(II[II[II[II[II[II[BI)I", (void *) android_glGetDebugMessageLog__II_3II_3II_3II_3II_3II_3BI },
+{"glGetDebugMessageLog", "(ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/ByteBuffer;)I", (void *) android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2 },
+{"glGetDebugMessageLog", "(I[II[II[II[II)[Ljava/lang/String;", (void *) android_glGetDebugMessageLog__I_3II_3II_3II_3II },
+{"glGetDebugMessageLog", "(ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)[Ljava/lang/String;", (void *) android_glGetDebugMessageLog__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
diff --git a/opengl/tools/glgen/stubs/gles11/glGetObjectLabel.cpp b/opengl/tools/glgen/stubs/gles11/glGetObjectLabel.cpp
new file mode 100644 (file)
index 0000000..16f03ab
--- /dev/null
@@ -0,0 +1,7 @@
+/* void glGetObjectLabel ( GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label ) */
+static jstring
+android_glGetObjectLabel(JNIEnv *_env, jobject _this, jint identifier, jint name) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+    return NULL;
+}
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetObjectLabel.java b/opengl/tools/glgen/stubs/gles11/glGetObjectLabel.java
new file mode 100644 (file)
index 0000000..23eb1bb
--- /dev/null
@@ -0,0 +1,4 @@
+    // C function void glGetObjectLabel ( GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label )
+
+    public static native String glGetObjectLabel(int identifier, int name);
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetObjectLabel.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetObjectLabel.nativeReg
new file mode 100644 (file)
index 0000000..318f07a
--- /dev/null
@@ -0,0 +1 @@
+{"glGetObjectLabel", "(II)Ljava/lang/String;", (void *) android_glGetObjectLabel },
diff --git a/opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabel.cpp b/opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabel.cpp
new file mode 100644 (file)
index 0000000..d73f937
--- /dev/null
@@ -0,0 +1,7 @@
+/* void glGetObjectPtrLabel ( const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label ) */
+static jstring
+android_glGetObjectPtrLabel(JNIEnv *_env, jobject _this, jlong ptr) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+    return NULL;
+}
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabel.java b/opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabel.java
new file mode 100644 (file)
index 0000000..cdaa0f7
--- /dev/null
@@ -0,0 +1,4 @@
+    // C function void glGetObjectPtrLabel ( const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label )
+
+    public static native String glGetObjectPtrLabel(long ptr);
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabel.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabel.nativeReg
new file mode 100644 (file)
index 0000000..645b6da
--- /dev/null
@@ -0,0 +1 @@
+{"glGetObjectPtrLabel", "(J)Ljava/lang/String;", (void *) android_glGetObjectPtrLabel },
diff --git a/opengl/tools/glgen/stubs/gles11/glGetPointerv.cpp b/opengl/tools/glgen/stubs/gles11/glGetPointerv.cpp
new file mode 100644 (file)
index 0000000..8311591
--- /dev/null
@@ -0,0 +1,7 @@
+/* void glGetPointerv ( GLenum pname, void **params ) */
+static jlong
+android_glGetPointerv(JNIEnv *_env, jobject _this, jint pname) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+    return NULL;
+}
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetPointerv.java b/opengl/tools/glgen/stubs/gles11/glGetPointerv.java
new file mode 100644 (file)
index 0000000..043e5c3
--- /dev/null
@@ -0,0 +1,6 @@
+    // C function void glGetPointerv ( GLenum pname, void **params )
+
+    public static native long glGetPointerv(
+        int pname
+    );
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetPointerv.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetPointerv.nativeReg
new file mode 100644 (file)
index 0000000..05962f6
--- /dev/null
@@ -0,0 +1 @@
+{"glGetPointerv", "(I)J", (void *) android_glGetPointerv },
diff --git a/opengl/tools/glgen/stubs/gles11/glObjectPtrLabel.cpp b/opengl/tools/glgen/stubs/gles11/glObjectPtrLabel.cpp
new file mode 100644 (file)
index 0000000..0925b8f
--- /dev/null
@@ -0,0 +1,6 @@
+/* void glObjectPtrLabel ( const void *ptr, GLsizei length, const GLchar *label ) */
+static void
+android_glObjectPtrLabel(JNIEnv *_env, jobject _this, jlong ptr, jstring label) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+}
+
diff --git a/opengl/tools/glgen/stubs/gles11/glObjectPtrLabel.java b/opengl/tools/glgen/stubs/gles11/glObjectPtrLabel.java
new file mode 100644 (file)
index 0000000..8e96a41
--- /dev/null
@@ -0,0 +1,4 @@
+    // C function void glObjectPtrLabel ( const void *ptr, GLsizei length, const GLchar *label )
+
+    public static native void glObjectPtrLabel(long ptr, String label);
+
diff --git a/opengl/tools/glgen/stubs/gles11/glObjectPtrLabel.nativeReg b/opengl/tools/glgen/stubs/gles11/glObjectPtrLabel.nativeReg
new file mode 100644 (file)
index 0000000..0cd9cf8
--- /dev/null
@@ -0,0 +1 @@
+{"glObjectPtrLabel", "(JLjava/lang/String;)V", (void *) android_glObjectPtrLabel },
index cc873ec..a140091 100755 (executable)
@@ -287,7 +287,12 @@ if __name__ == '__main__':
             emitversions        = None,
             defaultExtensions   = None,
             addExtensions       = '^({})$'.format('|'.join(AEP_EXTENSIONS)),
-            filename            = '../glgen/specs/gles11/GLES31Ext.spec')]
+            filename            = '../glgen/specs/gles11/GLES31Ext.spec'),
+        reg.GeneratorOptions(
+            apiname             = 'gles2',
+            profile             = 'common',
+            versions            = '3\.2',
+            filename            = '../glgen/specs/gles11/GLES32.spec')]
     # SpecGenerator creates a good starting point, but the CFunc.java parser is
     # so terrible that the .spec file needs a lot of manual massaging before
     # it works. Commenting this out to avoid accidentally overwriting all the