[ Previous | Next | Contents | Glossary | Home | Search ]
OpenGL 1.1 for AIX: Reference Manual

glPushClientAttrib or glPopClientAttrib Subroutine

Purpose

Pushes and pops the attribute stack.

Library

OpenGL C bindings library: libGL.a

C Syntax

void glPushClientAttrib(GLbitfield mask)
void glPopClientAttrib(void)

Parameters

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

Description

The glPushClientAttrib subroutine 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. The mask parameter is typically constructed by OR'ing several of these constants together. The special mask GL_CLIENT_ALL_ATTRIB_BITS 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):

GL_CLIENT_PIXEL_STORE_BIT Pixel storage modes
GL_CLIENT_VERTEX_ARRAY_BIT Vertex arrays (and enables)

The glPopClientAttrib subroutine restores the values of the client state variables saved with the last glPushClientAttrib. 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

The glPushClientAttrib subroutine 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.

The glPushClientAttrib and glPopClientAttrib subroutines are not compiled

into display lists, but are executed immediately.

Use glPushAttrib and glPopAttrib 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 glPushClientAttrib and glPopClientAttrib.

Errors

GL_STACK_OVERFLOW is generated if glPushClientAttrib is called while the attribute stack is full.

GL_STACK_UNDERFLOW is generated if glPopClientAttrib is called while the attribute stack is empty.

Associated Gets

glGet with argument GL_ATTRIB_STACK_DEPTH

glGet with argument GL_MAX_CLIENT_ATTRIB_STACK_DEPTH

Related Information

The glColorPointer subroutine, glDisableClientState subroutine, glEdgeFlagPointer subroutine, glEnableClientState subroutine, glGet subroutine, glGetError subroutine, glIndexPointer subroutine, glNewList subroutine, glNormalPointer subroutine, glPixelStore subroutine, glPushAttrib subroutine, glTexCoordPointer subroutine, glVertexPointer subroutine.


[ Previous | Next | Contents | Glossary | Home | Search ]