<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:mml="http://www.w3.org/1998/Math/MathML"
><head><title>glPushClientAttrib</title><link rel="stylesheet" href="style.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"/><link rel="home" href="index.xml" title="PyOpenGL 2.0.1.07 Man Pages"/><link rel="up" href="reference-GL.xml" title="GL"/><link rel="previous" href="glPushAttrib.3G.xml" title="glPushAttrib"/><link rel="next" href="glPushMatrix.3G.xml" title="glPushMatrix"/></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glPushClientAttrib</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glPushAttrib.3G.xml">Prev</a> </td><th width="60%" align="center">GL</th><td width="20%" align="right"> <a accesskey="n" href="glPushMatrix.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glPushClientAttrib.3G"/><div class="titlepage"/><div class="refnamediv"><a name="glPushClientAttrib.3G-name"/><h2>Name</h2><p>glPushClientAttrib, glPopClientAttrib &#8212; push and pop the client attribute stack</p></div><div class="refsynopsisdiv"><a name="glPushClientAttrib.3G-c_spec-push"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>glPushClientAttrib</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLbitfield <i><tt>mask</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glPushClientAttrib.3G-python_spec-push"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glPushClientAttrib</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>mask</tt></i>) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glPushClientAttrib.3G-parameters-push"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>mask</tt></i></span></dt><dd>
						Specifies a mask that indicates which attributes to save. Values for <i><tt>mask</tt></i> are listed
						below.
					</dd></dl></div></div><div class="refsynopsisdiv"><a name="glPushClientAttrib.3G-c_spec-pop"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>glPopClientAttrib</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glPushClientAttrib.3G-python_spec-pop"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glPopClientAttrib</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glPushClientAttrib.3G-description"/><h2>Description</h2><p>
			<tt>glPushClientAttrib</tt> takes one argument, a mask that indicates which groups of client-state
			variables to save on the client attribute stack. Symbolic constants are used to set bits in the mask.
			<i><tt>mask</tt></i> is typically constructed by OR'ing several of these constants together. The special mask
			<tt>GL_CLIENT_ALL_ATTRIB_BITS</tt> can be used to save all stackable client state.
		</p><p>
			The symbolic mask constants and their associated GL client state are as follows (the second column lists which
			attributes are saved):
		</p><p>
			<tt>GL_CLIENT_PIXEL_STORE_BIT</tt> Pixel storage modes
		</p><p>
			<tt>GL_CLIENT_VERTEX_ARRAY_BIT</tt> Vertex arrays (and enables)
		</p><p>
			<tt>glPopClientAttrib</tt> restores the values of the client-state variables saved with the last
			<tt>glPushClientAttrib</tt>. Those not saved are left unchanged.
		</p><p>
			It is an error to push attributes onto a full client attribute stack, or to pop attributes off an empty stack. In
			either case, the error flag is set, and no other change is made to GL state.
		</p><p>
			Initially, the client attribute stack is empty.
		</p></div><div class="refsect1" lang="en"><a name="glPushClientAttrib.3G-notes"/><h2>Notes</h2><p>
			<tt>glPushClientAttrib</tt> is available only if the GL version is 1.1 or greater.
		</p><p>
			Not all values for GL client state can be saved on the attribute stack. For example, select and feedback state cannot
			be saved.
		</p><p>
			The depth of the attribute stack depends on the implementation, but it must be at least 16.
		</p><p>
			Use <a href="glPushAttrib.3G.xml"><tt>glPushAttrib</tt></a> and <a href="glPushAttrib.3G.xml"><tt>glPopAttrib</tt></a> to
			push and restore state which is kept on the server. Only pixel storage modes and vertex array state may be pushed and
			popped with <tt>glPushClientAttrib</tt> and <tt>glPopClientAttrib</tt>.
		</p><p>
			When the <tt>GL_ARB_multitexture</tt> extension is supported, pushing and popping client vertex array state
			apples to all supported texture units, and the active client texture state.
		</p></div><div class="refsect1" lang="en"><a name="glPushClientAttrib.3G-errors"/><h2>Errors</h2><p>
			<tt>GL_STACK_OVERFLOW</tt> is generated if <tt>glPushClientAttrib</tt> is called while the
			attribute stack is full.
		</p><p>
			<tt>GL_STACK_UNDERFLOW</tt> is generated if <tt>glPopClientAttrib</tt> is called while the
			attribute stack is empty.
		</p></div><div class="refsect1" lang="en"><a name="glPushClientAttrib.3G-associated_gets"/><h2>Associated Gets</h2><p>
			<tt>glGet</tt> with argument <tt>GL_ATTRIB_STACK_DEPTH</tt>
		</p><p>
			<tt>glGet</tt> with argument <tt>GL_MAX_CLIENT_ATTRIB_STACK_DEPTH</tt>
		</p></div><div class="refsect1" lang="en"><a name="glPushClientAttrib.3G-see_also"/><h2>See Also</h2><p>
			<span class="simplelist"><a href="glColorPointer.3G.xml">glColorPointer</a>, <a href="glEdgeFlagPointer.3G.xml">glEdgeFlagPointer</a>, <a href="glEnableClientState.3G.xml">glEnableClientState</a>, <a href="glGet.3G.xml">glGet</a>, <a href="glGetError.3G.xml">glGetError</a>, <a href="glIndexPointer.3G.xml">glIndexPointer</a>, <a href="glNormalPointer.3G.xml">glNormalPointer</a>, <a href="glNewList.3G.xml">glNewList</a>, <a href="glPixelStore.3G.xml">glPixelStore</a>, <a href="glPushAttrib.3G.xml">glPushAttrib</a>, <a href="glTexCoordPointer.3G.xml">glTexCoordPointer</a>, <a href="glVertexPointer.3G.xml">glVertexPointer</a></span>
		</p></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glPushAttrib.3G.xml">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference-GL.xml">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="glPushMatrix.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glPushAttrib </td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top"> glPushMatrix</td></tr></table></div></body></html>
