<param name="index" type="GLuint" />
</function>
+ <function name="VertexArrayElementBuffer" offset="assign">
+ <param name="vaobj" type="GLuint" />
+ <param name="buffer" type="GLuint" />
+ </function>
+
<!-- Sampler object functions -->
<function name="CreateSamplers" offset="assign">
return obj->EverBound;
}
+
+
+/**
+ * Sets the element array buffer binding of a vertex array object.
+ *
+ * This is the ARB_direct_state_access equivalent of
+ * glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buffer).
+ */
+void GLAPIENTRY
+_mesa_VertexArrayElementBuffer(GLuint vaobj, GLuint buffer)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_vertex_array_object *vao;
+ struct gl_buffer_object *bufObj;
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ /* The GL_ARB_direct_state_access specification says:
+ *
+ * "An INVALID_OPERATION error is generated by VertexArrayElementBuffer
+ * if <vaobj> is not [compatibility profile: zero or] the name of an
+ * existing vertex array object."
+ */
+ vao =_mesa_lookup_vao_err(ctx, vaobj, "glVertexArrayElementBuffer");
+ if (!vao)
+ return;
+
+ /* The GL_ARB_direct_state_access specification says:
+ *
+ * "An INVALID_OPERATION error is generated if <buffer> is not zero or
+ * the name of an existing buffer object."
+ */
+ if (buffer != 0)
+ bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
+ "glVertexArrayElementBuffer");
+ else
+ bufObj = ctx->Shared->NullBufferObj;
+
+ if (bufObj)
+ _mesa_reference_buffer_object(ctx, &vao->IndexBufferObj, bufObj);
+}
{ "glCreateVertexArrays", 45, -1 },
{ "glDisableVertexArrayAttrib", 45, -1 },
{ "glEnableVertexArrayAttrib", 45, -1 },
+ { "glVertexArrayElementBuffer", 45, -1 },
{ "glCreateSamplers", 45, -1 },
{ "glCreateProgramPipelines", 45, -1 },
{ "glCreateQueries", 45, -1 },