glDrawArraysInstanced — draw multiple instances of a range of elements
Specifies what kind of primitives to render. Symbolic constants
Specifies the starting index in the enabled arrays.
Specifies the number of indices to be rendered.
Specifies the number of instances of the specified range of indices to be rendered.
glDrawArraysInstanced behaves identically to glDrawArrays
primcount instances of the range of elements are executed. Those attributes
that have divisor N where N is other than zero
(as specified by glVertexAttribDivisor)
advance once every N instances. Thus, the element transferred from instanced
vertex attributes is given by:
The value of
instance may be read by a vertex shader as
If an array corresponding to a generic attribute required by a vertex shader is not enabled, then the corresponding element is taken from the current generic attribute state.
GL_INVALID_ENUM is generated if
mode is not one of
the accepted values.
GL_INVALID_VALUE is generated if
primcount are negative.
GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an
enabled array and the buffer object's data store is currently mapped.
GL_INVALID_FRAMEBUFFER_OPERATION is generated if the currently bound framebuffer is not
framebuffer complete (i.e. the return value from
glCheckFramebufferStatus is not
GL_INVALID_OPERATION is generated if recording the vertices of a primitive to the buffer objects being
used for transform feedback purposes would result in either exceeding the limits of any buffer object’s size,
or in exceeding the end position
size - 1, as set
|OpenGL ES API Version|
Copyright © 2010-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. https://opencontent.org/openpub/.