'\" t .\" Title: glMultiDrawArraysIndirectCount .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets v1.79.2 .\" Date: 03/14/2026 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLMULTIDRAWARRAYSIND" "3G" "03/14/2026" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" glMultiDrawArraysIndirectCount \- render multiple sets of primitives from array data, taking parameters and count from memory .SH "C SPECIFICATION" .HP \w'void\ glMultiDrawArraysIndirectCount('u .BI "void glMultiDrawArraysIndirectCount(GLenum\ " "mode" ", const\ void\ *" "indirect" ", GLintptr\ " "drawcount" ", GLsizei\ " "maxdrawcount" ", GLsizei\ " "stride" ");" .SH "PARAMETERS" .PP \fImode\fR .RS 4 Specifies what kind of primitives to render\&. Symbolic constants \fBGL_POINTS\fR, \fBGL_LINE_STRIP\fR, \fBGL_LINE_LOOP\fR, \fBGL_LINES\fR, \fBGL_LINE_STRIP_ADJACENCY\fR, \fBGL_LINES_ADJACENCY\fR, \fBGL_TRIANGLE_STRIP\fR, \fBGL_TRIANGLE_FAN\fR, \fBGL_TRIANGLES\fR, \fBGL_TRIANGLE_STRIP_ADJACENCY\fR, \fBGL_TRIANGLES_ADJACENCY\fR, and \fBGL_PATCHES\fR are accepted\&. .RE .PP \fIindirect\fR .RS 4 Specifies the address of an array of structures containing the draw parameters\&. .RE .PP \fIdrawcount\fR .RS 4 Specifies an offset (in bytes) into the buffer object bound to the \fBGL_PARAMETER_BUFFER\fR binding point at which a single \fIsizei\fR typed value is stored\&. Must be a multiple of four\&. .RE .PP \fImaxdrawcount\fR .RS 4 Specifies the maximum number of draws that are expected to be stored in the buffer\&. If the value stored at \fIdrawcount\fR into the buffer is greater than \fImaxdrawcount\fR, the implementation stops processing draws after \fImaxdrawcount\fR parameter sets\&. .RE .PP \fIstride\fR .RS 4 Specifies the distance in basic machine units between elements of the draw parameter array\&. .RE .SH "DESCRIPTION" .PP \fBglMultiDrawArraysIndirectCount\fR specifies multiple geometric primitives with very few subroutine calls\&. \fBglMultiDrawArraysIndirectCount\fR behaves similarly to \fBglMultiDrawArraysIndirect\fR(), execept that the \fIdrawcount\fR parameter is stored in the buffer bound to the \fBGL_PARAMETER_BUFFER\fR binding at the offset specified by \fIdrawcount\fR\&. .PP The parameters addressed by \fIindirect\fR are packed into an array of structures, each element of which takes the form (in C): .sp .if n \{\ .RS 4 .\} .nf typedef struct { uint count; uint instanceCount; uint first; uint baseInstance; } DrawArraysIndirectCommand; .fi .if n \{\ .RE .\} .PP If a buffer is bound to the \fBGL_DRAW_INDIRECT_BUFFER\fR binding at the time of a call to \fBglMultiDrawArraysIndirectCount\fR, \fIindirect\fR is interpreted as an offset, in basic machine units, into that buffer and the parameter data is read from the buffer rather than from client memory\&. .PP In contrast to \fBglDrawArraysInstancedBaseInstance\fR(), the first member of the parameter structure is unsigned, and out\-of\-range indices do not generate an error\&. .PP Vertex attributes that are modified by \fBglMultiDrawArraysIndirectCount\fR have an unspecified value after \fBglMultiDrawArraysIndirectCount\fR returns\&. Attributes that aren\*(Aqt modified remain well defined\&. .SH "ERRORS" .PP \fBGL_INVALID_ENUM\fR is generated if \fImode\fR is not an accepted value\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIstride\fR is not a multiple of four\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIdrawcount\fR is negative\&. .PP \fBGL_INVALID_OPERATION\fR is generated if a non\-zero buffer object name is bound to an enabled array or to the \fBGL_DRAW_INDIRECT_BUFFER\fR binding and the buffer object\*(Aqs data store is currently mapped\&. .PP \fBGL_INVALID_OPERATION\fR is generated if a geometry shader is active and \fImode\fR is incompatible with the input primitive type of the geometry shader in the currently installed program object\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fImode\fR is \fBGL_PATCHES\fR and no tessellation control shader is active\&. .PP \fBGL_INVALID_OPERATION\fR error is generated if no buffer is bound to the \fBGL_PARAMETER_BUFFER\fR binding point\&. .PP \fBGL_INVALID_OPERATION\fR error is generated if \fIdrawcount\fR is not a multiple of four\&. .PP \fBGL_INVALID_OPERATION\fR error is generated if reading a \fIsizei\fR typed value from the buffer bound to the \fBGL_PARAMETER_BUFFER\fR target at the offset specified by \fIdrawcount\fR would result in an out\-of\-bounds access\&. .SH "VERSION SUPPORT" .TS allbox tab(:); lB cB s s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ \fBOpenGL Version\fR T} T{ \fBFunction / Feature Name\fR T}:T{ \fB2\&.0\fR T}:T{ \fB2\&.1\fR T}:T{ \fB3\&.0\fR T}:T{ \fB3\&.1\fR T}:T{ \fB3\&.2\fR T}:T{ \fB3\&.3\fR T}:T{ \fB4\&.0\fR T}:T{ \fB4\&.1\fR T}:T{ \fB4\&.2\fR T}:T{ \fB4\&.3\fR T}:T{ \fB4\&.4\fR T}:T{ \fB4\&.5\fR T}:T{ \fB4\&.6\fR T} .T& l c c c c c c c c c c c c c. T{ \fBglMultiDrawArraysIndirectCount\fR 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{ ✔ T} .TE .sp 1 .SH "SEE ALSO" .PP \fBglDrawArrays\fR(), \fBglDrawArraysInstanced\fR(), \fBglDrawElements\fR(), \fBglDrawRangeElements\fR(), \fBglDrawArraysIndirect\fR(), \fBglMultiDrawArraysIndirect\fR(), \fBglMultiDrawElementsIndirect\fR() \fBglMultiDrawElementsIndirectCount\fR() .SH "COPYRIGHT" .PP Copyright \(co 2012\-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\&. \m[blue]\fBhttps://opencontent\&.org/openpub/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 2012-2014 Khronos Group. .br