<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0013)about:internet -->
<?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>glCallList</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glCallList"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glCallList — execute a display list</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><p><code class="funcdef">void <b class="fsfunc">glCallList</b>(</code>GLuint <var class="pdparam">list</var><code>)</code>;</p></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4782011"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>list</code></em></span></dt><dd><p>
                    Specifies the integer name of the display list to be executed.
                </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4782041"></a><h2>Description</h2><p>
            <code class="function">glCallList</code> causes the named display list to be executed.
            The commands saved in the display list are executed in order,
            just as if they were called without using a display list.
            If <em class="parameter"><code>list</code></em> has not been defined as a display list,
            <code class="function">glCallList</code> is ignored.
        </p><p>
            <code class="function">glCallList</code> can appear inside a display list.
            To avoid the possibility of infinite recursion resulting from display lists
            calling one another,
            a limit is placed on the nesting level of display
            lists during display-list execution.
            This limit is at least 64, and it depends on the implementation.
        </p><p>
            GL state is not saved and restored across a call to <code class="function">glCallList</code>.
            Thus,
            changes made to GL state during the execution of a display list
            remain after execution of the display list is completed.
            Use <a href="glPushAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a>,
            <a href="glPopAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPopAttrib</span></span></a>,
            <a href="glPushMatrix.xml"><span class="citerefentry"><span class="refentrytitle">glPushMatrix</span></span></a>,
            and <a href="glPopMatrix.xml"><span class="citerefentry"><span class="refentrytitle">glPopMatrix</span></span></a> to preserve GL state across <code class="function">glCallList</code> calls.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4768536"></a><h2>Notes</h2><p>
            Display lists can be executed between a call to <a href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>
            and the corresponding call to <a href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>,
            as long as the display list includes only commands that are allowed
            in this interval.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4768558"></a><h2>Associated Gets</h2><p>
            <a href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_MAX_LIST_NESTING</code>
        </p><p>
            <a href="glIsList.xml"><span class="citerefentry"><span class="refentrytitle">glIsList</span></span></a>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4768583"></a><h2>See Also</h2><p>
            <code class="function">glCallLists</code>,
            <a href="glDeleteLists.xml"><span class="citerefentry"><span class="refentrytitle">glDeleteLists</span></span></a>,
            <a href="glGenLists.xml"><span class="citerefentry"><span class="refentrytitle">glGenLists</span></span></a>,
            <a href="glNewList.xml"><span class="citerefentry"><span class="refentrytitle">glNewList</span></span></a>,
            <a href="glPushAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a>,
            <a href="glPushMatrix.xml"><span class="citerefentry"><span class="refentrytitle">glPushMatrix</span></span></a>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4768624"></a><h2>Copyright</h2><p>
            Copyright <span class="trademark"></span>© 1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <a href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
        </p></div></div></body></html>

