rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / glPushName.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id="glPushName">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glPushName</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glPushName</refname>
17 <refpurpose>push and pop the name stack</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glPushName</function></funcdef>
23 <paramdef>GLuint <parameter>name</parameter></paramdef>
24 </funcprototype>
25 </funcsynopsis>
26 </refsynopsisdiv>
27 <refsect1 id="parameters"><title>Parameters</title>
28 <variablelist>
29 <varlistentry>
30 <term><parameter>name</parameter></term>
31 <listitem>
32 <para>
33 Specifies a name that will be pushed onto the name stack.
34 </para>
35 </listitem>
36 </varlistentry>
37 </variablelist>
38 </refsect1>
39 <refsynopsisdiv><title>C Specification</title>
40 <funcsynopsis>
41 <funcprototype>
42 <funcdef>void <function>glPopName</function></funcdef>
43 <paramdef> <parameter>void</parameter></paramdef>
44 </funcprototype>
45 </funcsynopsis>
46 </refsynopsisdiv>
47 <refsect1 id="description"><title>Description</title>
48 <para>
49 The name stack is used during selection mode to allow sets of rendering
50 commands to be uniquely identified.
51 It consists of an ordered set of unsigned integers and is initially empty.
52 </para>
53 <para>
54 <function>glPushName</function> causes <parameter>name</parameter> to be pushed onto the name stack.
55 <citerefentry><refentrytitle>glPopName</refentrytitle></citerefentry> pops one name off the top of the stack.
56 </para>
57 <para>
58 The maximum name stack depth is implementation-dependent; call
59 <constant>GL_MAX_NAME_STACK_DEPTH</constant> to find out the value for a particular
60 implementation. It is an
61 error to push a name onto a full stack
62 or to pop a name off an empty stack.
63 It is also an error to manipulate the name stack between the execution of
64 <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
65 In any of these cases, the error flag is set and no other change is
66 made to GL state.
67 </para>
68 <para>
69 The name stack is always empty while the render mode is not <constant>GL_SELECT</constant>.
70 Calls to <function>glPushName</function> or <citerefentry><refentrytitle>glPopName</refentrytitle></citerefentry> while the render mode is not
71 <constant>GL_SELECT</constant> are ignored.
72 </para>
73 </refsect1>
74 <refsect1 id="errors"><title>Errors</title>
75 <para>
76 <constant>GL_STACK_OVERFLOW</constant> is generated if <function>glPushName</function> is called while the
77 name stack is full.
78 </para>
79 <para>
80 <constant>GL_STACK_UNDERFLOW</constant> is generated if <citerefentry><refentrytitle>glPopName</refentrytitle></citerefentry> is called while the
81 name stack is empty.
82 </para>
83 <para>
84 <constant>GL_INVALID_OPERATION</constant> is generated if <function>glPushName</function> or <citerefentry><refentrytitle>glPopName</refentrytitle></citerefentry>
85 is executed between a call to <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding call to
86 <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
87 </para>
88 </refsect1>
89 <refsect1 id="associatedgets"><title>Associated Gets</title>
90 <para>
91 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_NAME_STACK_DEPTH</constant>
92 </para>
93 <para>
94 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_NAME_STACK_DEPTH</constant>
95 </para>
96 </refsect1>
97 <refsect1 id="seealso"><title>See Also</title>
98 <para>
99 <citerefentry><refentrytitle>glInitNames</refentrytitle></citerefentry>,
100 <citerefentry><refentrytitle>glLoadName</refentrytitle></citerefentry>,
101 <citerefentry><refentrytitle>glRenderMode</refentrytitle></citerefentry>,
102 <citerefentry><refentrytitle>glSelectBuffer</refentrytitle></citerefentry>
103 </para>
104 </refsect1>
105 <refsect1 id="Copyright"><title>Copyright</title>
106 <para>
107 Copyright <trademark class="copyright"></trademark> 1991-2006
108 Silicon Graphics, Inc. This document is licensed under the SGI
109 Free Software B License. For details, see
110 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
111 </para>
112 </refsect1>
113 </refentry>