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