Commit | Line | Data |
---|---|---|
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>glPushClientAttrib</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glPushClientAttrib"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glPushClientAttrib — push and pop the client attribute stack</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">glPushClientAttrib</b>(</code></td><td>GLbitfield </td><td><var class="pdparam">mask</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>mask</code></em></span></dt><dd><p> | |
4 | Specifies a mask that indicates which attributes to save. Values for | |
5 | <em class="parameter"><code>mask</code></em> are listed below. | |
6 | </p></dd></dl></div></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">glPopClientAttrib</b>(</code></td><td> </td><td><var class="pdparam">void</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p> | |
7 | <code class="function">glPushClientAttrib</code> takes one argument, | |
8 | a mask that indicates which groups of client-state variables | |
9 | to save on the client attribute stack. | |
10 | Symbolic constants are used to set bits in the mask. | |
11 | <em class="parameter"><code>mask</code></em> | |
12 | is typically constructed by specifying the bitwise-or of several | |
13 | of these constants together. | |
14 | The special mask | |
15 | <code class="constant">GL_CLIENT_ALL_ATTRIB_BITS</code> | |
16 | can be used to save all stackable client state. | |
17 | </p><p> | |
18 | The symbolic mask constants and their associated GL client state are as follows | |
19 | (the second column lists which attributes are saved): | |
20 | </p><p> | |
21 | <code class="constant">GL_CLIENT_PIXEL_STORE_BIT</code> Pixel storage modes | |
22 | <code class="constant">GL_CLIENT_VERTEX_ARRAY_BIT</code> Vertex arrays (and enables) | |
23 | </p><p> | |
24 | <a class="citerefentry" href="glPopClientAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPopClientAttrib</span></span></a> restores the values of the client-state variables | |
25 | saved with the last <code class="function">glPushClientAttrib</code>. | |
26 | Those not saved are left unchanged. | |
27 | </p><p> | |
28 | It is an error to push attributes onto a full client attribute stack | |
29 | or to pop attributes off an empty stack. | |
30 | In either case, the error flag is set, | |
31 | and no other change is made to GL state. | |
32 | </p><p> | |
33 | Initially, the client attribute stack is empty. | |
34 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p> | |
35 | <code class="function">glPushClientAttrib</code> is available only if the GL version is 1.1 or greater. | |
36 | </p><p> | |
37 | Not all values for GL client state can be saved on the attribute stack. | |
38 | For example, select and feedback state cannot be saved. | |
39 | </p><p> | |
40 | The depth of the attribute stack depends on the implementation, | |
41 | but it must be at least 16. | |
42 | </p><p> | |
43 | Use <a class="citerefentry" href="glPushAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a> and <a class="citerefentry" href="glPopAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPopAttrib</span></span></a> to push and restore | |
44 | state that is kept on the server. Only pixel storage modes and | |
45 | vertex array state may be pushed and popped with | |
46 | <code class="function">glPushClientAttrib</code> and <a class="citerefentry" href="glPopClientAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPopClientAttrib</span></span></a>. | |
47 | </p><p> | |
48 | For OpenGL versions 1.3 and greater, or when the <code class="code">ARB_multitexture</code> extension is supported, pushing and | |
49 | popping client vertex array state applies to all supported texture units, | |
50 | and the active client texture state. | |
51 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p> | |
52 | <code class="constant">GL_STACK_OVERFLOW</code> is generated if <code class="function">glPushClientAttrib</code> is called while | |
53 | the attribute stack is full. | |
54 | </p><p> | |
55 | <code class="constant">GL_STACK_UNDERFLOW</code> is generated if <a class="citerefentry" href="glPopClientAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPopClientAttrib</span></span></a> is called while | |
56 | the attribute stack is empty. | |
57 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p> | |
58 | <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_ATTRIB_STACK_DEPTH</code> | |
59 | </p><p> | |
60 | <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_MAX_CLIENT_ATTRIB_STACK_DEPTH</code> | |
61 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p> | |
62 | <a class="citerefentry" href="glColorPointer.xml"><span class="citerefentry"><span class="refentrytitle">glColorPointer</span></span></a>, | |
63 | <a class="citerefentry" href="glDisableClientState.xml"><span class="citerefentry"><span class="refentrytitle">glDisableClientState</span></span></a>, | |
64 | <a class="citerefentry" href="glEdgeFlagPointer.xml"><span class="citerefentry"><span class="refentrytitle">glEdgeFlagPointer</span></span></a>, | |
65 | <a class="citerefentry" href="glEnableClientState.xml"><span class="citerefentry"><span class="refentrytitle">glEnableClientState</span></span></a>, | |
66 | <a class="citerefentry" href="glFogCoordPointer.xml"><span class="citerefentry"><span class="refentrytitle">glFogCoordPointer</span></span></a>, | |
67 | <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a>, | |
68 | <a class="citerefentry" href="glGetError.xml"><span class="citerefentry"><span class="refentrytitle">glGetError</span></span></a>, | |
69 | <a class="citerefentry" href="glIndexPointer.xml"><span class="citerefentry"><span class="refentrytitle">glIndexPointer</span></span></a>, | |
70 | <a class="citerefentry" href="glNormalPointer.xml"><span class="citerefentry"><span class="refentrytitle">glNormalPointer</span></span></a>, | |
71 | <a class="citerefentry" href="glNewList.xml"><span class="citerefentry"><span class="refentrytitle">glNewList</span></span></a>, | |
72 | <a class="citerefentry" href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a>, | |
73 | <a class="citerefentry" href="glPushAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a>, | |
74 | <a class="citerefentry" href="glTexCoordPointer.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoordPointer</span></span></a>, | |
75 | <a class="citerefentry" href="glVertexPointer.xml"><span class="citerefentry"><span class="refentrytitle">glVertexPointer</span></span></a> | |
76 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p> | |
77 | Copyright <span class="trademark"></span>© 1991-2006 | |
78 | Silicon Graphics, Inc. This document is licensed under the SGI | |
79 | Free Software B License. For details, see | |
80 | <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>. | |
81 | </p></div></div></body></html> |