rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man3 / glDrawElementsInstancedBaseVertex.xml
CommitLineData
7faf1d71
AW
1<?xml version="1.0" encoding="UTF-8"?>\r
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r
4<refentry id="glDrawElementsBaseVertex">\r
5 <refmeta>\r
6 <refmetainfo>\r
7 <copyright>\r
8 <year>2010</year>\r
9 <holder>Khronos Group</holder>\r
10 </copyright>\r
11 </refmetainfo>\r
12 <refentrytitle>glDrawElementsInstancedBaseVertex</refentrytitle>\r
13 <manvolnum>3G</manvolnum>\r
14 </refmeta>\r
15 <refnamediv>\r
16 <refname>glDrawElementsInstancedBaseVertex</refname>\r
17 <refpurpose>render multiple instances of a set of primitives from array data with a per-element offset</refpurpose>\r
18 </refnamediv>\r
19 <refsynopsisdiv><title>C Specification</title>\r
20 <funcsynopsis>\r
21 <funcprototype>\r
22 <funcdef>void <function>glDrawElementsInstancedBaseVertex</function></funcdef>\r
23 <paramdef>GLenum <parameter>mode</parameter></paramdef>\r
24 <paramdef>GLsizei <parameter>count</parameter></paramdef>\r
25 <paramdef>GLenum <parameter>type</parameter></paramdef>\r
26 <paramdef>GLvoid *<parameter>indices</parameter></paramdef>\r
27 <paramdef>GLsizei <parameter>primcount</parameter></paramdef>\r
28 <paramdef>GLint <parameter>basevertex</parameter></paramdef>\r
29 </funcprototype>\r
30 </funcsynopsis>\r
31 </refsynopsisdiv>\r
32 <!-- eqn: ignoring delim $$ -->\r
33 <refsect1 id="parameters"><title>Parameters</title>\r
34 <variablelist>\r
35 <varlistentry>\r
36 <term><parameter>mode</parameter></term>\r
37 <listitem>\r
38 <para>\r
39 Specifies what kind of primitives to render.\r
40 Symbolic constants\r
41 <constant>GL_POINTS</constant>, <constant>GL_LINE_STRIP</constant>, <constant>GL_LINE_LOOP</constant>,\r
42 <constant>GL_LINES</constant>, <constant>GL_TRIANGLE_STRIP</constant>, <constant>GL_TRIANGLE_FAN</constant>,\r
43 and <constant>GL_TRIANGLES</constant> are accepted.\r
44 </para>\r
45 </listitem>\r
46 </varlistentry>\r
47 <varlistentry>\r
48 <term><parameter>count</parameter></term>\r
49 <listitem>\r
50 <para>\r
51 Specifies the number of elements to be rendered.\r
52 </para>\r
53 </listitem>\r
54 </varlistentry>\r
55 <varlistentry>\r
56 <term><parameter>type</parameter></term>\r
57 <listitem>\r
58 <para>\r
59 Specifies the type of the values in indices. Must be one of <constant>GL_UNSIGNED_BYTE</constant>,\r
60 <constant>GL_UNSIGNED_SHORT</constant>, or <constant>GL_UNSIGNED_INT</constant>.\r
61 </para>\r
62 </listitem>\r
63 </varlistentry>\r
64 <varlistentry>\r
65 <term><parameter>indices</parameter></term>\r
66 <listitem>\r
67 <para>\r
68 Specifies a pointer to the location where the indices are stored.\r
69 </para>\r
70 </listitem>\r
71 </varlistentry>\r
72 <varlistentry>\r
73 <term><parameter>primcount</parameter></term>\r
74 <listitem>\r
75 <para>\r
76 Specifies the number of instances of the indexed geometry that should be drawn.\r
77 </para>\r
78 </listitem>\r
79 </varlistentry>\r
80 <varlistentry>\r
81 <term><parameter>basevertex</parameter></term>\r
82 <listitem>\r
83 <para>\r
84 Specifies a constant that should be added to each element of <parameter>indices</parameter>\r
85 when chosing elements from the enabled vertex arrays.\r
86 </para>\r
87 </listitem>\r
88 </varlistentry>\r
89 </variablelist>\r
90 </refsect1>\r
91 <refsect1 id="description"><title>Description</title>\r
92 <para>\r
93 <function>glDrawElementsInstancedBaseVertex</function> behaves identically to\r
94 <citerefentry><refentrytitle>glDrawElementsInstanced</refentrytitle></citerefentry> except that the <emphasis>i</emphasis>th element\r
95 transferred by the corresponding draw call will be taken from element <parameter>indices</parameter>[i] + <parameter>basevertex</parameter>\r
96 of each enabled array. If the resulting value is larger than the maximum value representable by <parameter>type</parameter>,\r
97 it is as if the calculation were upconverted to 32-bit unsigned integers (with wrapping on overflow conditions).\r
98 The operation is undefined if the sum would be negative.\r
99 </para>\r
100 </refsect1>\r
101 <refsect1 id="notes"><title>Notes</title>\r
102 <function>glDrawElementsInstancedBaseVertex</function> is only supported if the GL version is 3.2 or greater.\r
103 </refsect1>\r
104 <refsect1 id="errors"><title>Errors</title>\r
105 <para>\r
106 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.\r
107 </para>\r
108 <para>\r
109 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>count</parameter> or <parameter>primcount</parameter> is negative.\r
110 </para>\r
111 <para>\r
112 <constant>GL_INVALID_OPERATION</constant> is generated if a geometry shader is active and <parameter>mode</parameter>\r
113 is incompatible with the input primitive type of the geometry shader in the currently installed program object.\r
114 </para>\r
115 <para>\r
116 <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to an\r
117 enabled array or the element array and the buffer object's data store is currently mapped.\r
118 </para>\r
119 </refsect1>\r
120 <refsect1 id="seealso"><title>See Also</title>\r
121 <para>\r
122 <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,\r
123 <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,\r
124 <citerefentry><refentrytitle>glDrawRangeElementsBaseVertex</refentrytitle></citerefentry>,\r
125 <citerefentry><refentrytitle>glDrawElementsInstanced</refentrytitle></citerefentry>,\r
126 <citerefentry><refentrytitle>glDrawElementsInstancedBaseVertex</refentrytitle></citerefentry>\r
127 </para>\r
128 </refsect1>\r
129 <refsect1 id="Copyright"><title>Copyright</title>\r
130 <para>\r
131 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. \r
132 This material may be distributed subject to the terms and conditions set forth in \r
133 the Open Publication License, v 1.0, 8 June 1999.\r
134 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r
135 </para>\r
136 </refsect1>\r
137</refentry>\r