mesa/es: Enable GL_OES_vertex_array_object
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 22 Aug 2012 01:03:49 +0000 (18:03 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 29 Aug 2012 22:09:37 +0000 (15:09 -0700)
Functionally the same as GL_ARB_vertex_array_object.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mapi/glapi/gen/es_EXT.xml
src/mapi/glapi/gen/gles_api.py
src/mesa/main/api_exec.c
src/mesa/main/extensions.c
src/mesa/main/get.c

index d012ccd5bf33da70bf065a6727380bbaa443168a..fc2ec621e23899e99495e923501b19a70fca8624 100644 (file)
 
 <!-- 69. GL_EXT_multi_draw_arrays -->
 
+<!-- 71. GL_OES_vertex_array_object -->
+<category name="GL_OES_vertex_array_object" number="71">
+    <function name="BindVertexArrayOES" alias="BindVertexArray">
+        <param name="array" type="GLuint"/>
+    </function>
+
+    <function name="DeleteVertexArraysOES" alias="DeleteVertexArraysAPPLE">
+        <param name="n" type="GLsizei"/>
+        <param name="arrays" type="const GLuint *" count="n"/>
+    </function>
+
+    <function name="GenVertexArraysOES" alias="GenVertexArrays">
+        <param name="n" type="GLsizei"/>
+        <param name="arrays" type="GLuint *" output="true" count="n"/>
+    </function>
+
+    <function name="IsVertexArrayOES" alias="IsVertexArrayAPPLE">
+        <param name="array" type="GLuint"/>
+        <return type="GLboolean"/>
+    </function>
+
+    <enum name="VERTEX_ARRAY_BINDING_OES"      count="1"  value="0x85B5">
+        <size name="Get" mode="get"/>
+    </enum>
+</category>
+
 <!-- 87. GL_OES_EGL_image_external -->
 <category name="GL_OES_EGL_image_external" number="87">
     <enum name="TEXTURE_EXTERNAL_OES"                     value="0x8D65"/>
index 70ae2e300ea17a75676a6c9fbc5a4f7e18cb4355..8dfef655a8ca97bbad34c9c04d541bc30421d591 100644 (file)
@@ -449,6 +449,11 @@ es2_api = es2_core + (
         # GL_OES_get_program_binary
         'GetProgramBinaryOES',
         'ProgramBinaryOES',
+        # GL_OES_vertex_array_object
+        'BindVertexArrayOES',
+        'DeleteVertexArraysOES',
+        'GenVertexArraysOES',
+        'IsVertexArrayOES',
         # GL_NV_draw_buffers
         'DrawBuffersNV',
         # GL_NV_read_buffer
index 167a9428634004bf5332675766dd9608e4249c2b..c448189456685a32d39c2513516d94076f6b2ff2 100644 (file)
@@ -521,11 +521,9 @@ _mesa_create_exec_table(struct gl_context *ctx)
       SET_BindVertexArrayAPPLE(exec, _mesa_BindVertexArrayAPPLE);
       SET_GenVertexArraysAPPLE(exec, _mesa_GenVertexArraysAPPLE);
    }
-   /* Reused by ARB_vertex_array_object */
-   if (ctx->API != API_OPENGLES2) {
-      SET_DeleteVertexArraysAPPLE(exec, _mesa_DeleteVertexArraysAPPLE);
-      SET_IsVertexArrayAPPLE(exec, _mesa_IsVertexArrayAPPLE);
-   }
+   /* Reused by ARB_vertex_array_object / OES_vertex_array_object */
+   SET_DeleteVertexArraysAPPLE(exec, _mesa_DeleteVertexArraysAPPLE);
+   SET_IsVertexArrayAPPLE(exec, _mesa_IsVertexArrayAPPLE);
 
    /* 282. GL_NV_fragment_program */
 #if FEATURE_NV_fragment_program
@@ -809,11 +807,9 @@ _mesa_create_exec_table(struct gl_context *ctx)
       SET_CopyBufferSubData(exec, _mesa_CopyBufferSubData);
    }
 
-   /* GL_ARB_vertex_array_object */
-   if (ctx->API != API_OPENGLES2) {
-      SET_BindVertexArray(exec, _mesa_BindVertexArray);
-      SET_GenVertexArrays(exec, _mesa_GenVertexArrays);
-   }
+   /* GL_ARB_vertex_array_object / GL_OES_vertex_array_object */
+   SET_BindVertexArray(exec, _mesa_BindVertexArray);
+   SET_GenVertexArrays(exec, _mesa_GenVertexArrays);
 
    /* GL_EXT_draw_buffers2 */
    if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
index e5659b31e8663fb7c1e3ef6ea4b0e828dc330f5e..7e116bdd1b18b93645f93d1c137515d024efd440 100644 (file)
@@ -266,6 +266,7 @@ static const struct extension extension_table[] = {
    { "GL_OES_texture_env_crossbar",                o(ARB_texture_env_crossbar),                     ES1,       2005 },
    { "GL_OES_texture_mirrored_repeat",             o(dummy_true),                                   ES1,       2005 },
    { "GL_OES_texture_npot",                        o(ARB_texture_non_power_of_two),                       ES2, 2005 },
+   { "GL_OES_vertex_array_object",                 o(dummy_true),                                   ES1 | ES2, 2010 },
 
    /* Vendor extensions */
    { "GL_3DFX_texture_compression_FXT1",           o(TDFX_texture_compression_FXT1),           GL,             1999 },
index 9672a92a5e3621840fafda55911bcf3a8bcacc6c..fe1035be8acab3fb83a0527ea1bfc34eddab81c1 100644 (file)
@@ -535,6 +535,9 @@ static const struct value_desc values[] = {
     * GLSL: */
    { GL_MAX_CLIP_PLANES, CONTEXT_INT(Const.MaxClipPlanes), NO_EXTRA },
 
+   /* GL_{APPLE,ARB,OES}_vertex_array_object */
+   { GL_VERTEX_ARRAY_BINDING_APPLE, ARRAY_INT(Name), NO_EXTRA },
+
 #if FEATURE_GL || FEATURE_ES1
    /* Enums in OpenGL and GLES1 */
    { 0, 0, TYPE_API_MASK, API_OPENGL_BIT | API_OPENGLES_BIT | API_OPENGL_CORE_BIT, NO_EXTRA },
@@ -1212,9 +1215,6 @@ static const struct value_desc values[] = {
    { GL_MAX_SAMPLES, CONTEXT_INT(Const.MaxSamples),
      extra_ARB_framebuffer_object_EXT_framebuffer_multisample },
 
-   /* GL_APPLE_vertex_array_object */
-   { GL_VERTEX_ARRAY_BINDING_APPLE, ARRAY_INT(Name), NO_EXTRA },
-
    /* GL_ARB_seamless_cube_map */
    { GL_TEXTURE_CUBE_MAP_SEAMLESS,
      CONTEXT_BOOL(Texture.CubeMapSeamless), extra_ARB_seamless_cube_map },