rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / xhtml / glCallLists.xml
CommitLineData
7faf1d71
AW
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
2<!-- saved from url=(0013)about:internet -->
3<?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>glCallLists</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glCallLists"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glCallLists — execute a list of display lists</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glCallLists</b>(</code></td><td>GLsizei  </td><td><var class="pdparam">n</var>, </td></tr><tr><td> </td><td>GLenum  </td><td><var class="pdparam">type</var>, </td></tr><tr><td> </td><td>const GLvoid *  </td><td><var class="pdparam">lists</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>n</code></em></span></dt><dd><p>
4 Specifies the number of display lists to be executed.
5 </p></dd><dt><span class="term"><em class="parameter"><code>type</code></em></span></dt><dd><p>
6 Specifies the type of values in <em class="parameter"><code>lists</code></em>.
7 Symbolic constants
8 <code class="constant">GL_BYTE</code>,
9 <code class="constant">GL_UNSIGNED_BYTE</code>,
10 <code class="constant">GL_SHORT</code>,
11 <code class="constant">GL_UNSIGNED_SHORT</code>,
12 <code class="constant">GL_INT</code>,
13 <code class="constant">GL_UNSIGNED_INT</code>,
14 <code class="constant">GL_FLOAT</code>,
15 <code class="constant">GL_2_BYTES</code>,
16 <code class="constant">GL_3_BYTES</code>, and
17 <code class="constant">GL_4_BYTES</code> are accepted.
18 </p></dd><dt><span class="term"><em class="parameter"><code>lists</code></em></span></dt><dd><p>
19 Specifies the address of an array of name offsets in the display list.
20 The pointer type is void because the offsets can be bytes,
21 shorts,
22 ints,
23 or floats,
24 depending on the value of <em class="parameter"><code>type</code></em>.
25 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
26 <code class="function">glCallLists</code> causes each display list in the list of names passed as <em class="parameter"><code>lists</code></em>
27 to be executed.
28 As a result,
29 the commands saved in each display list are executed in order,
30 just as if they were called without using a display list.
31 Names of display lists that have not been defined are ignored.
32 </p><p>
33 <code class="function">glCallLists</code> provides an efficient means for executing more than one display list.
34 <em class="parameter"><code>type</code></em> allows lists with various name formats to be accepted.
35 The formats are as
36 follows:
37 </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_BYTE</code></span></dt><dd><p>
38 <em class="parameter"><code>lists</code></em> is treated as an array of signed bytes,
39 each in the range
40 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
41
42 <mml:mn>-128</mml:mn>
43 </mml:math>
44 through 127.
45 </p></dd><dt><span class="term"><code class="constant">GL_UNSIGNED_BYTE</code></span></dt><dd><p>
46 <em class="parameter"><code>lists</code></em> is treated as an array of unsigned bytes,
47 each in the range 0 through 255.
48 </p></dd><dt><span class="term"><code class="constant">GL_SHORT</code></span></dt><dd><p>
49 <em class="parameter"><code>lists</code></em> is treated as an array of signed two-byte integers,
50 each in the range
51 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
52
53 <mml:mn>-32768</mml:mn>
54 </mml:math>
55 through 32767.
56 </p></dd><dt><span class="term"><code class="constant">GL_UNSIGNED_SHORT</code></span></dt><dd><p>
57 <em class="parameter"><code>lists</code></em> is treated as an array of unsigned two-byte integers,
58 each in the range 0 through 65535.
59 </p></dd><dt><span class="term"><code class="constant">GL_INT</code></span></dt><dd><p>
60 <em class="parameter"><code>lists</code></em> is treated as an array of signed four-byte integers.
61 </p></dd><dt><span class="term"><code class="constant">GL_UNSIGNED_INT</code></span></dt><dd><p>
62 <em class="parameter"><code>lists</code></em> is treated as an array of unsigned four-byte integers.
63 </p></dd><dt><span class="term"><code class="constant">GL_FLOAT</code></span></dt><dd><p>
64 <em class="parameter"><code>lists</code></em> is treated as an array of four-byte floating-point values.
65 </p></dd><dt><span class="term"><code class="constant">GL_2_BYTES</code></span></dt><dd><p>
66 <em class="parameter"><code>lists</code></em> is treated as an array of unsigned bytes.
67 Each pair of bytes specifies a single display-list name.
68 The value of the pair is computed as 256 times the unsigned value
69 of the first byte plus the unsigned value of the second byte.
70 </p></dd><dt><span class="term"><code class="constant">GL_3_BYTES</code></span></dt><dd><p>
71 <em class="parameter"><code>lists</code></em> is treated as an array of unsigned bytes.
72 Each triplet of bytes specifies a single display-list name.
73 The value of the triplet is computed as 65536 times the unsigned value
74 of the first byte,
75 plus 256 times the unsigned value of the second byte,
76 plus the unsigned value of the third byte.
77 </p></dd><dt><span class="term"><code class="constant">GL_4_BYTES</code></span></dt><dd><p>
78 <em class="parameter"><code>lists</code></em> is treated as an array of unsigned bytes.
79 Each quadruplet of bytes specifies a single display-list name.
80 The value of the quadruplet is computed as 16777216 times the unsigned value
81 of the first byte,
82 plus 65536 times the unsigned value of the second byte,
83 plus 256 times the unsigned value of the third byte,
84 plus the unsigned value of the fourth byte.
85 </p></dd></dl></div><p>
86 The list of display-list names is not null-terminated.
87 Rather,
88 <em class="parameter"><code>n</code></em> specifies how many names are to be taken from <em class="parameter"><code>lists</code></em>.
89 </p><p>
90 An additional level of indirection is made available with the
91 <a class="citerefentry" href="glListBase.xml"><span class="citerefentry"><span class="refentrytitle">glListBase</span></span></a> command,
92 which specifies an unsigned offset that is added to each display-list
93 name specified in <em class="parameter"><code>lists</code></em> before that display list is executed.
94 </p><p>
95 <code class="function">glCallLists</code> can appear inside a display list.
96 To avoid the possibility of infinite recursion resulting from display lists
97 calling one another,
98 a limit is placed on the nesting level of display
99 lists during display-list execution.
100 This limit must be at least 64, and it depends on the implementation.
101 </p><p>
102 GL state is not saved and restored across a call to <code class="function">glCallLists</code>.
103 Thus,
104 changes made to GL state during the execution of the display lists
105 remain after execution is completed.
106 Use <a class="citerefentry" href="glPushAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a>,
107 <a class="citerefentry" href="glPopAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPopAttrib</span></span></a>,
108 <a class="citerefentry" href="glPushMatrix.xml"><span class="citerefentry"><span class="refentrytitle">glPushMatrix</span></span></a>,
109 and <a class="citerefentry" href="glPopMatrix.xml"><span class="citerefentry"><span class="refentrytitle">glPopMatrix</span></span></a> to preserve GL state across <code class="function">glCallLists</code> calls.
110 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
111 Display lists can be executed between a call to <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>
112 and the corresponding call to <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>,
113 as long as the display list includes only commands that are allowed
114 in this interval.
115 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
116 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>n</code></em> is negative.
117 </p><p>
118 <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>type</code></em> is not one of
119 <code class="constant">GL_BYTE</code>,
120 <code class="constant">GL_UNSIGNED_BYTE</code>,
121 <code class="constant">GL_SHORT</code>,
122 <code class="constant">GL_UNSIGNED_SHORT</code>,
123 <code class="constant">GL_INT</code>,
124 <code class="constant">GL_UNSIGNED_INT</code>,
125 <code class="constant">GL_FLOAT</code>,
126 <code class="constant">GL_2_BYTES</code>,
127 <code class="constant">GL_3_BYTES</code>,
128 <code class="constant">GL_4_BYTES</code>.
129 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
130 <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_LIST_BASE</code>
131 </p><p>
132 <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_MAX_LIST_NESTING</code>
133 </p><p>
134 <a class="citerefentry" href="glIsList.xml"><span class="citerefentry"><span class="refentrytitle">glIsList</span></span></a>
135 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
136 <a class="citerefentry" href="glCallList.xml"><span class="citerefentry"><span class="refentrytitle">glCallList</span></span></a>,
137 <a class="citerefentry" href="glDeleteLists.xml"><span class="citerefentry"><span class="refentrytitle">glDeleteLists</span></span></a>,
138 <a class="citerefentry" href="glGenLists.xml"><span class="citerefentry"><span class="refentrytitle">glGenLists</span></span></a>,
139 <a class="citerefentry" href="glListBase.xml"><span class="citerefentry"><span class="refentrytitle">glListBase</span></span></a>,
140 <a class="citerefentry" href="glNewList.xml"><span class="citerefentry"><span class="refentrytitle">glNewList</span></span></a>,
141 <a class="citerefentry" href="glPushAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a>,
142 <a class="citerefentry" href="glPushMatrix.xml"><span class="citerefentry"><span class="refentrytitle">glPushMatrix</span></span></a>
143 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
144 Copyright <span class="trademark"></span>© 1991-2006
145 Silicon Graphics, Inc. This document is licensed under the SGI
146 Free Software B License. For details, see
147 <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
148 </p></div></div></body></html>