glPushClientAttrib.3   [plain text]


'\" et  
'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 24 September 1999
.ds Re Release 1.2.1
.ds Dp May 22 14:46
.ds Dm 3 May 22 14:
.ds Xs 42589     5
.TH GLPUSHCLIENTATTRIB 3G
.SH NAME
.B "glPushClientAttrib, glPopClientAttrib
\- push and pop the client attribute stack

.SH C SPECIFICATION
void \f3glPushClientAttrib\fP(
GLbitfield \fImask\fP )
.nf
.fi

.SH PARAMETERS
.TP \w'\f2mask\fP\ \ 'u 
\f2mask\fP
Specifies a mask that indicates which attributes to save.  Values for
\f2mask\fP are listed below.
.SH C SPECIFICATION
void \f3glPopClientAttrib\fP( void )
.nf
.fi

.SH DESCRIPTION
\%\f3glPushClientAttrib\fP 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.
\f2mask\fP
is typically constructed by OR'ing several of these constants together.
The special mask
\%\f3GL_CLIENT_ALL_ATTRIB_BITS\fP
can be used to save all stackable client state.
.P
The symbolic mask constants and their associated GL client state are as follows
(the second column lists which attributes are saved):
.P
\%\f3GL_CLIENT_PIXEL_STORE_BIT\fP	Pixel storage modes
.br
\%\f3GL_CLIENT_VERTEX_ARRAY_BIT\fP	Vertex arrays (and enables)
.P
\%\f3glPopClientAttrib\fP restores the values of the client-state variables 
saved with the last \%\f3glPushClientAttrib\fP.
Those not saved are left unchanged.
.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
Initially, the client attribute stack is empty.
.SH NOTES
\%\f3glPushClientAttrib\fP is available only if the GL version is 1.1 or greater.
.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
The depth of the attribute stack depends on the implementation,
but it must be at least 16.
.P 
Use \%\f3glPushAttrib\fP and \%\f3glPopAttrib\fP 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 
\%\f3glPushClientAttrib\fP and \%\f3glPopClientAttrib\fP.
.P
When the \%\f3GL_ARB_multitexture\fP extension is supported, pushing and
popping client vertex array state apples to all supported texture units, 
and the active client texture state.
.SH ERRORS
\%\f3GL_STACK_OVERFLOW\fP is generated if \%\f3glPushClientAttrib\fP is called while
the attribute stack is full.
.P
\%\f3GL_STACK_UNDERFLOW\fP is generated if \%\f3glPopClientAttrib\fP is called while
the attribute stack is empty.
.SH ASSOCIATED GETS 
\%\f3glGet\fP with argument \%\f3GL_ATTRIB_STACK_DEPTH\fP
.br
\%\f3glGet\fP with argument \%\f3GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\fP 
.SH SEE ALSO
\%\f3glColorPointer\fP,
\%\f3glDisableClientState\fP,
\%\f3glEdgeFlagPointer\fP,
\%\f3glEnableClientState\fP,
\%\f3glGet\fP,
\%\f3glGetError\fP,
\%\f3glIndexPointer\fP,
\%\f3glNormalPointer\fP,
\%\f3glNewList\fP,
\%\f3glPixelStore\fP,
\%\f3glPushAttrib\fP,
\%\f3glTexCoordPointer\fP,
\%\f3glVertexPointer\fP