<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "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>glPushAttrib</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glPushAttrib"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glPushAttrib — push and pop the server 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">glPushAttrib</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>
                    Specifies a mask that indicates which attributes to save. Values for
                    <em class="parameter"><code>mask</code></em> are listed below.
                </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">glPopAttrib</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>
            <code class="function">glPushAttrib</code> takes one argument,
            a mask that indicates which groups of state variables
            to save on the attribute stack.
            Symbolic constants are used to set bits in the mask.
            <em class="parameter"><code>mask</code></em>
            is typically constructed by specifying the bitwise-or of several 
            of these constants together.
            The special mask
            <code class="constant">GL_ALL_ATTRIB_BITS</code>
            can be used to save all stackable states.
        </p><p>
            The symbolic mask constants and their associated GL state are as follows
            (the second column lists which attributes are saved):
        </p><p>
        </p><div class="informaltable"><table border="1"><colgroup><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left">
                        <code class="constant">GL_ACCUM_BUFFER_BIT</code>
                        </td><td align="left">
                        Accumulation buffer clear value
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_COLOR_BUFFER_BIT</code>
                        </td><td align="left">
                        <code class="constant">GL_ALPHA_TEST</code> enable bit
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Alpha test function and reference value
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_BLEND</code> enable bit
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Blending source and destination functions
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Constant blend color
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Blending equation
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_DITHER</code> enable bit
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_DRAW_BUFFER</code> setting
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_COLOR_LOGIC_OP</code> enable bit
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_INDEX_LOGIC_OP</code> enable bit
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Logic op function
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Color mode and index mode clear values
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Color mode and index mode writemasks
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_CURRENT_BIT</code>
                        </td><td align="left">
                        Current RGBA color
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Current color index
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Current normal vector
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Current texture coordinates
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Current raster position
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_CURRENT_RASTER_POSITION_VALID</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        RGBA color associated with current raster position
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Color index associated with current raster position
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Texture coordinates associated with current raster position
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_EDGE_FLAG</code> flag
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_DEPTH_BUFFER_BIT</code>
                        </td><td align="left">
                        <code class="constant">GL_DEPTH_TEST</code> enable bit
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Depth buffer test function
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Depth buffer clear value
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_DEPTH_WRITEMASK</code> enable bit
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_ENABLE_BIT</code>
                        </td><td align="left">
                        <code class="constant">GL_ALPHA_TEST</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_AUTO_NORMAL</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_BLEND</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Enable bits for the user-definable clipping planes
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_COLOR_MATERIAL</code>
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_CULL_FACE</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_DEPTH_TEST</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_DITHER</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_FOG</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_LIGHT</code><span class="emphasis"><em>i</em></span>
			where
				    <code class="constant">0</code> &lt;= 		  				    <span class="emphasis"><em>i</em></span> &lt;     				    <code class="constant">GL_MAX_LIGHTS</code>
   
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_LIGHTING</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_LINE_SMOOTH</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_LINE_STIPPLE</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_COLOR_LOGIC_OP</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_INDEX_LOGIC_OP</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_MAP1_</code><span class="emphasis"><em>x</em></span> where <span class="emphasis"><em>x</em></span> is a map type
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_MAP2_</code><span class="emphasis"><em>x</em></span> where <span class="emphasis"><em>x</em></span> is a map type
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_MULTISAMPLE</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_NORMALIZE</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_POINT_SMOOTH</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_POLYGON_OFFSET_LINE</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_POLYGON_OFFSET_FILL</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_POLYGON_OFFSET_POINT</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_POLYGON_SMOOTH</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_POLYGON_STIPPLE</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_SAMPLE_ALPHA_TO_COVERAGE</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_SAMPLE_ALPHA_TO_ONE</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_SAMPLE_COVERAGE</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_SCISSOR_TEST</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_STENCIL_TEST</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_TEXTURE_1D</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_TEXTURE_2D</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_TEXTURE_3D</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Flags <code class="constant">GL_TEXTURE_GEN_</code><span class="emphasis"><em>x</em></span> where <span class="emphasis"><em>x</em></span> is S, T, R, or Q
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_EVAL_BIT</code>
                        </td><td align="left">
                        <code class="constant">GL_MAP1_</code><span class="emphasis"><em>x</em></span> enable bits, where <span class="emphasis"><em>x</em></span> is a map type
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_MAP2_</code><span class="emphasis"><em>x</em></span> enable bits, where <span class="emphasis"><em>x</em></span> is a map type
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        1D grid endpoints and divisions
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        2D grid endpoints and divisions
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_AUTO_NORMAL</code> enable bit
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_FOG_BIT</code>
                        </td><td align="left">
                        <code class="constant">GL_FOG</code> enable bit
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Fog color
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Fog density
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Linear fog start
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Linear fog end
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Fog index
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_FOG_MODE</code> value
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_HINT_BIT</code>
                        </td><td align="left">
                        <code class="constant">GL_PERSPECTIVE_CORRECTION_HINT</code> setting
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_POINT_SMOOTH_HINT</code> setting
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_LINE_SMOOTH_HINT</code> setting
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_POLYGON_SMOOTH_HINT</code> setting
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_FOG_HINT</code> setting
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_GENERATE_MIPMAP_HINT</code> setting
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_TEXTURE_COMPRESSION_HINT</code> setting
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_LIGHTING_BIT</code>
                        </td><td align="left">
                        <code class="constant">GL_COLOR_MATERIAL</code> enable bit
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_COLOR_MATERIAL_FACE</code> value
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Color material parameters that are tracking the current color
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Ambient scene color
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_LIGHT_MODEL_LOCAL_VIEWER</code> value
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_LIGHT_MODEL_TWO_SIDE</code> setting
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_LIGHTING</code> enable bit
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Enable bit for each light
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Ambient, diffuse, and specular intensity for each light
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Direction, position, exponent, and cutoff angle for each light
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Constant, linear, and quadratic attenuation factors for each light
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Ambient, diffuse, specular, and emissive color for each material
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Ambient, diffuse, and specular color indices for each material
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Specular exponent for each material
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_SHADE_MODEL</code> setting
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_LINE_BIT</code>
                        </td><td align="left">
                        <code class="constant">GL_LINE_SMOOTH</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_LINE_STIPPLE</code> enable bit
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Line stipple pattern and repeat counter
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Line width
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_LIST_BIT</code>
                        </td><td align="left">
                        <code class="constant">GL_LIST_BASE</code> setting
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_MULTISAMPLE_BIT</code>
                        </td><td align="left">
                        <code class="constant">GL_MULTISAMPLE</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_SAMPLE_ALPHA_TO_COVERAGE</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_SAMPLE_ALPHA_TO_ONE</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_SAMPLE_COVERAGE</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_SAMPLE_COVERAGE_VALUE</code> value
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_SAMPLE_COVERAGE_INVERT</code> value
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_PIXEL_MODE_BIT</code>
                        </td><td align="left">
                        <code class="constant">GL_RED_BIAS</code> and <code class="constant">GL_RED_SCALE</code> settings
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_GREEN_BIAS</code> and <code class="constant">GL_GREEN_SCALE</code> values
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_BLUE_BIAS</code> and <code class="constant">GL_BLUE_SCALE</code>
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_ALPHA_BIAS</code> and <code class="constant">GL_ALPHA_SCALE</code>
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_DEPTH_BIAS</code> and <code class="constant">GL_DEPTH_SCALE</code>
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_INDEX_OFFSET</code> and <code class="constant">GL_INDEX_SHIFT</code> values
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_MAP_COLOR</code> and <code class="constant">GL_MAP_STENCIL</code> flags
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_ZOOM_X</code> and <code class="constant">GL_ZOOM_Y</code> factors
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_READ_BUFFER</code> setting
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_POINT_BIT</code>
                        </td><td align="left">
                        <code class="constant">GL_POINT_SMOOTH</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Point size
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_POLYGON_BIT</code>
                        </td><td align="left">
                        <code class="constant">GL_CULL_FACE</code> enable bit
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_CULL_FACE_MODE</code> value
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_FRONT_FACE</code> indicator
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_POLYGON_MODE</code> setting
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_POLYGON_SMOOTH</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_POLYGON_STIPPLE</code> enable bit
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_POLYGON_OFFSET_FILL</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_POLYGON_OFFSET_LINE</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_POLYGON_OFFSET_POINT</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_POLYGON_OFFSET_FACTOR</code>
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_POLYGON_OFFSET_UNITS</code>
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_POLYGON_STIPPLE_BIT</code>
                        </td><td align="left">
                        Polygon stipple image
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_SCISSOR_BIT</code>
                        </td><td align="left">
                        <code class="constant">GL_SCISSOR_TEST</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Scissor box
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_STENCIL_BUFFER_BIT</code>
                        </td><td align="left">
                        <code class="constant">GL_STENCIL_TEST</code> enable bit
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Stencil function and reference value
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Stencil value mask
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Stencil fail, pass, and depth buffer pass actions
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Stencil buffer clear value
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Stencil buffer writemask
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_TEXTURE_BIT</code>
                        </td><td align="left">
                        Enable bits for the four texture coordinates
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Border color for each texture image
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Minification function for each texture image
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Magnification function for each texture image
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Texture coordinates and wrap mode for each texture image
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Color and mode for each texture environment
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Enable bits <code class="constant">GL_TEXTURE_GEN_</code><span class="emphasis"><em>x</em></span>, <span class="emphasis"><em>x</em></span> is S, T, R, and Q
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_TEXTURE_GEN_MODE</code> setting for S, T, R, and Q
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <a class="citerefentry" href="glTexGen.xml"><span class="citerefentry"><span class="refentrytitle">glTexGen</span></span></a> plane equations for S, T, R, and Q
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Current texture bindings (for example, <code class="constant">GL_TEXTURE_BINDING_2D</code>)
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_TRANSFORM_BIT</code>
                        </td><td align="left">
                        Coefficients of the six clipping planes
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Enable bits for the user-definable clipping planes
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_MATRIX_MODE</code> value
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_NORMALIZE</code> flag
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        <code class="constant">GL_RESCALE_NORMAL</code> flag
                        </td></tr><tr><td align="left">
                        <code class="constant">GL_VIEWPORT_BIT</code>
                        </td><td align="left">
                        Depth range (near and far)
                        </td></tr><tr><td align="left">
                        </td><td align="left">
                        Viewport origin and extent
                        </td></tr></tbody></table></div><p>
            <a class="citerefentry" href="glPopAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPopAttrib</span></span></a> restores the values of the state variables saved with the last
            <code class="function">glPushAttrib</code> command.
            Those not saved are left unchanged.
        </p><p>
            It is an error to push attributes onto a full 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 attribute stack is empty.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
            Not all values for GL state can be saved on the attribute stack.
            For example,
            render mode state,
            and select and feedback state cannot be saved.
            Client state must be saved with
            <a class="citerefentry" href="glPushClientAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushClientAttrib</span></span></a>.
        </p><p>
            The depth of the attribute stack depends on the implementation,
            but it must be at least 16.
        </p><p>
            For OpenGL versions 1.3 and greater, or when the <code class="code">ARB_multitexture</code> extension is supported, pushing and
            popping texture state applies to all supported texture units.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
            <code class="constant">GL_STACK_OVERFLOW</code> is generated if <code class="function">glPushAttrib</code> is called while
            the attribute stack is full.
        </p><p>
            <code class="constant">GL_STACK_UNDERFLOW</code> is generated if <a class="citerefentry" href="glPopAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPopAttrib</span></span></a> is called while
            the attribute stack is empty.
        </p><p>
            <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glPushAttrib</code> or <a class="citerefentry" href="glPopAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPopAttrib</span></span></a>
            is executed between the execution of <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>
            and the corresponding execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
            <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>
        </p><p>
            <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_MAX_ATTRIB_STACK_DEPTH</code>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
            <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a>,
            <a class="citerefentry" href="glGetClipPlane.xml"><span class="citerefentry"><span class="refentrytitle">glGetClipPlane</span></span></a>,
            <a class="citerefentry" href="glGetError.xml"><span class="citerefentry"><span class="refentrytitle">glGetError</span></span></a>,
            <a class="citerefentry" href="glGetLight.xml"><span class="citerefentry"><span class="refentrytitle">glGetLight</span></span></a>,
            <a class="citerefentry" href="glGetMap.xml"><span class="citerefentry"><span class="refentrytitle">glGetMap</span></span></a>,
            <a class="citerefentry" href="glGetMaterial.xml"><span class="citerefentry"><span class="refentrytitle">glGetMaterial</span></span></a>,
            <a class="citerefentry" href="glGetPixelMap.xml"><span class="citerefentry"><span class="refentrytitle">glGetPixelMap</span></span></a>,
            <a class="citerefentry" href="glGetPolygonStipple.xml"><span class="citerefentry"><span class="refentrytitle">glGetPolygonStipple</span></span></a>,
            <a class="citerefentry" href="glGetString.xml"><span class="citerefentry"><span class="refentrytitle">glGetString</span></span></a>,
            <a class="citerefentry" href="glGetTexEnv.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexEnv</span></span></a>,
            <a class="citerefentry" href="glGetTexGen.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexGen</span></span></a>,
            <a class="citerefentry" href="glGetTexImage.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexImage</span></span></a>,
            <a class="citerefentry" href="glGetTexLevelParameter.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexLevelParameter</span></span></a>,
            <a class="citerefentry" href="glGetTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexParameter</span></span></a>,
            <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a>,
            <a class="citerefentry" href="glPushClientAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushClientAttrib</span></span></a>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></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 class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
        </p></div></div></body></html>
