xenocara/doc/gl-docs/GL/gl/pushclientattrib.3gl
2006-11-29 17:00:35 +00:00

102 lines
3.1 KiB
Plaintext

.\" $XFree86$
'\" et
'\"! eqn|tbl | mmdoc
'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 24 September 1999
.ds Re Release 1.2.1
.ds Dp Jan 14 18:30
.ds Dm 01 pushclien
.ds Xs 42589 5 pushclientattrib.gl
.TH GLPUSHCLIENTATTRIB 3G
.SH NAME
.B "glPushClientAttrib, glPopClientAttrib
\- push and pop the client attribute stack
.SH C SPECIFICATION
void \f3glPushClientAttrib\fP(
GLbitfield mask); \fI1.1\fP )
.nf
.fi
.SH PARAMETERS
.TP \w'\f21.1\fP\ \ 'u
\f21.1\fP
Specifies a mask that indicates which attributes to save. Values for
\f21.1\fP are listed below.
.SH C SPECIFICATION
void \f3glPopClientAttrib\fP(
void); \fI1.1\fP )
.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.
\f21.1\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(3G)\fP,
\%\f3glDisableClientState(3G)\fP,
\%\f3glEdgeFlagPointer(3G)\fP,
\%\f3glEnableClientState(3G)\fP,
\%\f3glGet(3G)\fP,
\%\f3glGetError(3G)\fP,
\%\f3glIndexPointer(3G)\fP,
\%\f3glNormalPointer(3G)\fP,
\%\f3glNewList(3G)\fP,
\%\f3glPixelStore(3G)\fP,
\%\f3glPushAttrib(3G)\fP,
\%\f3glTexCoordPointer(3G)\fP,
\%\f3glVertexPointer(3G)\fP