'\" t .\" Title: glDrawArraysIndirect .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 01/03/2018 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLDRAWARRAYSINDIRECT" "3G" "01/03/2018" "[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" glDrawArraysIndirect \- render primitives from array data, taking parameters from memory .SH "C SPECIFICATION" .HP \w'void\ glDrawArraysIndirect('u .BI "void glDrawArraysIndirect(GLenum\ " "mode" ", const\ void\ *" "indirect" ");" .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 a structure containing the draw parameters\&. .RE .SH "DESCRIPTION" .PP \fBglDrawArraysIndirect\fR specifies multiple geometric primitives with very few subroutine calls\&. \fBglDrawArraysIndirect\fR behaves similarly to \fBglDrawArraysInstancedBaseInstance\fR(), execept that the parameters to \fBglDrawArraysInstancedBaseInstance\fR() are stored in memory at the address given by \fIindirect\fR\&. .PP The parameters addressed by \fIindirect\fR are packed into a structure that takes the form (in C): .sp .if n \{\ .RS 4 .\} .nf typedef struct { uint count; uint primCount; uint first; uint baseInstance; } DrawArraysIndirectCommand; const DrawArraysIndirectCommand *cmd = (const DrawArraysIndirectCommand *)indirect; glDrawArraysInstancedBaseInstance(mode, cmd\->first, cmd\->count, cmd\->primCount, cmd\->baseInstance); .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 \fBglDrawArraysIndirect\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 \fBglDrawArraysIndirect\fR have an unspecified value after \fBglDrawArraysIndirect\fR returns\&. Attributes that aren\*(Aqt modified remain well defined\&. .SH "NOTES" .PP The \fIbaseInstance\fR member of the \fIDrawArraysIndirectCommand\fR structure is defined only if the GL version is 4\&.2 or greater\&. For versions of the GL less than 4\&.2, this parameter is present but is reserved and should be set to zero\&. On earlier versions of the GL, behavior is undefined if it is non\-zero\&. .SH "ERRORS" .PP \fBGL_INVALID_ENUM\fR is generated if \fImode\fR is not an accepted value\&. .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\&. .SH "VERSION SUPPORT" .TS allbox tab(:); lB cB s s s s s s s s s s s lB 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& l c c c c c c c c c c c c. T{ \fBglDrawArraysIndirect\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} .TE .sp 1 .SH "SEE ALSO" .PP \fBglDrawArrays\fR(), \fBglDrawArraysInstanced\fR(), \fBglDrawElements\fR(), \fBglDrawRangeElements\fR(), .SH "COPYRIGHT" .PP Copyright \(co 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\&. \m[blue]\fBhttp://opencontent\&.org/openpub/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 2010-2014 Khronos Group. .br