glVertexArrayVertexBuffers

glBindVertexBuffers: man4/glBindVertexBuffers.xml

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. 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. 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. glVertexArrayVertexBuffers is equivalent to the pseudocode above, but replacing glBindVertexBuffers (args) with glVertexArrayVertexBuffers (vaobj, args). 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.

@OpenGL_Version(OGLIntroducedIn.V4P5)
@OpenGL_Extension("GL_ARB_direct_state_access")
fn_glVertexArrayVertexBuffers glVertexArrayVertexBuffers;

See Also

glGenBuffers, glBindBuffer, glDeleteBuffers glDeleteTextures

Meta