GLBINDVERTEXBUFFERS(3G)

    .SH "NAME" glBindVertexBuffers, glVertexArrayVertexBuffers - attach multiple buffer objects to a vertex array object
    .SH "C SPECIFICATION"

            .HP u void glBindVertexBuffers(GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
            .HP u void glVertexArrayVertexBuffers(GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);

    .SH "PARAMETERS"

        .PP vaobj

                    Specifies the name of the vertex array object for glVertexArrayVertexBuffers.

            .RE
            .PP first

                        Specifies the first vertex buffer binding point to which a buffer object is to be bound.

                .RE
                .PP count

                            Specifies the number of buffers to bind.

                    .RE
                    .PP buffers

                                Specifies the address of an array of names of existing buffer objects.

                        .RE
                        .PP offsets

                                    Specifies the address of an array of offsets to associate with the binding points.

                            .RE
                            .PP buffers

                                        Specifies the address of an array of strides to associate with the binding points.

                                .RE

                            .SH "DESCRIPTION"
                                .PP glBindVertexBuffers and glVertexArrayVertexBuffers bind storage from an array of existing buffer objects to a specified number of consecutive vertex buffer binding points units in a vertex array object. For glBindVertexBuffers, the vertex array object is the currently bound vertex array object. For glVertexArrayVertexBuffers, vaobj is the name of the vertex array object.
                                .PP count existing buffer objects are bound to vertex buffer binding points numbered $first$ through $first + count - 1$. If buffers is not NULL, it specifies an array of count values, each of which must be zero or the name of an existing buffer object. offsets and strides specify arrays of count values indicating the offset of the first element and stride between elements in each buffer, respectively. If buffers is NULL, each affected vertex buffer binding point from $first$ through $first + count - 1$ will be reset to have no bound buffer object. In this case, the offsets and strides associated with the binding points are set to default values, ignoring offsets and strides.
                                .PP glBindVertexBuffers is equivalent (assuming no errors are generated) to:

                                for (i = 0; i < count; i++) {
                                    if (buffers == NULL) {
                                        glBindVertexBuffer(first + i, 0, 0, 16);
                                    } else {
                                        glBindVertexBuffer(first + i, buffers[i], offsets[i], strides[i]);
                                    }
                                }

                        except that buffers will not be created if they do not exist.
                                .PP glVertexArrayVertexBuffers is equivalent to the pseudocode above, but replacing glBindVertexBuffers(args) with glVertexArrayVertexBuffers(vaobj, args).
                                .PP The values specified in buffers, offsets, and strides will be checked separately for each vertex buffer binding point. When a value for a specific vertex buffer binding point is invalid, the state for that binding point will be unchanged and an error will be generated. However, state for other vertex buffer binding points will still be changed if their corresponding values are valid.

                            .SH "ERRORS"
                                .PP GL_INVALID_OPERATION is generated by glBindVertexBuffers if no vertex array object is bound.
                                .PP GL_INVALID_OPERATION is generated by glVertexArrayVertexBuffers if vaobj is not the name of the vertex array object.
                                .PP GL_INVALID_OPERATION is generated if $first + count$ is greater than the value of GL_MAX_VERTEX_ATTRIB_BINDINGS.
                                .PP GL_INVALID_OPERATION is generated if any value in buffers is not zero or the name of an existing buffer object.
                                .PP GL_INVALID_VALUE is generated if any value in offsets or strides is negative, or if a value is stride is greater than the value of GL_MAX_VERTEX_ATTRIB_STRIDE.

                            .SH "VERSION SUPPORT"
                                .TS allbox tab(:); l l l l l l l l l l l l l l l l l l l l l l l l l l. T{ glBindVertexBuffers T}:T{ T}:T{ T}:T{ T}:T{ T}:T{ T}:T{ T}:T{ T}:T{ T}:T{ T}:T{ T}:T{ T}:T{ T} T{ glVertexArrayVertexBuffers T}:T{ T}:T{ T}:T{ T}:T{ T}:T{ T}:T{ T}:T{ T}:T{ T}:T{ T}:T{ T}:T{ T}:T{ T}

                            .SH "SEE ALSO"
                                .PP glGenBuffers(), glBindBuffer(), glDeleteBuffers() glDeleteTextures()

                            .SH "COPYRIGHT"
                                .PP Copyright © 2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

COPYRIGHT
Copyright © 2014 Khronos Group