NAME

glPushClientAttrib, glPopClientAttrib - push and pop the client attribute stack

C SPECIFICATION

void ggllPPuusshhCClliieennttAAttttrriibb( GLbitfield mask); _1_._1 )

        

PARAMETERS

_1_._1
Specifies a mask that indicates which attributes to save. Values for _1_._1 are listed below.

C SPECIFICATION

void ggllPPooppCClliieennttAAttttrriibb( void); _1_._1 )

        

DESCRIPTION

ggllPPuusshhCClliieennttAAttttrriibb 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. _1_._1 is typically constructed by OR'ing several of these constants together. The special mask GGLL__CCLLIIEENNTT__AALLLL__AATTTTRRIIBB__BBIITTSS can be used to save all stackable client state.

The symbolic mask constants and their associated GL client state are as follows (the second column lists which attributes are saved):

GGLL__CCLLIIEENNTT__PPIIXXEELL__SSTTOORREE__BBIITT Pixel storage modes
GGLL__CCLLIIEENNTT__VVEERRTTEEXX__AARRRRAAYY__BBIITT Vertex arrays (and enables)

ggllPPooppCClliieennttAAttttrriibb restores the values of the client-state variables saved with the last ggllPPuusshhCClliieennttAAttttrriibb. Those not saved are left unchanged.

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.

Initially, the client attribute stack is empty.

NOTES

ggllPPuusshhCClliieennttAAttttrriibb is available only if the GL version is 1.1 or greater.

Not all values for GL client state can be saved on the attribute stack. For example, select and feedback state cannot be saved.

The depth of the attribute stack depends on the implementation, but it must be at least 16.

Use ggllPPuusshhAAttttrriibb and ggllPPooppAAttttrriibb 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 ggllPPuusshhCClliieennttAAttttrriibb and ggllPPooppCClliieennttAAttttrriibb.

When the GGLL__AARRBB__mmuullttiitteexxttuurree extension is supported, pushing and popping client vertex array state apples to all supported texture units, and the active client texture state.

ERRORS

GGLL__SSTTAACCKK__OOVVEERRFFLLOOWW is generated if ggllPPuusshhCClliieennttAAttttrriibb is called while the attribute stack is full.

GGLL__SSTTAACCKK__UUNNDDEERRFFLLOOWW is generated if ggllPPooppCClliieennttAAttttrriibb is called while the attribute stack is empty.

ASSOCIATED GETS

ggllGGeett with argument GGLL__AATTTTRRIIBB__SSTTAACCKK__DDEEPPTTHH
ggllGGeett with argument GGLL__MMAAXX__CCLLIIEENNTT__AATTTTRRIIBB__SSTTAACCKK__DDEEPPTTHH

SEE ALSO

ggllCCoolloorrPPooiinntteerr((33GG)), ggllDDiissaabblleeCClliieennttSSttaattee((33GG)), ggllEEddggeeFFllaaggPPooiinntteerr((33GG)), ggllEEnnaabblleeCClliieennttSSttaattee((33GG)), ggllGGeett((33GG)), ggllGGeettEErrrroorr((33GG)), ggllIInnddeexxPPooiinntteerr((33GG)), ggllNNoorrmmaallPPooiinntteerr((33GG)), ggllNNeewwLLiisstt((33GG)), ggllPPiixxeellSSttoorree((33GG)), ggllPPuusshhAAttttrriibb((33GG)), ggllTTeexxCCoooorrddPPooiinntteerr((33GG)), ggllVVeerrtteexxPPooiinntteerr((33GG))