Applies to: desktop apps only
The glPushClientAttrib and glPopClientAttrib functions save and restore groups of client-state variables on the client-attribute stack.
void WINAPI glPushClientAttrib( GLbitfield mask );
A mask that indicates which attributes to save. The following are the symbolic mask constants and their associated OpenGL client states.
Pixel storage mode attributes.
Vertex array attributes.
all stackable client-state attributes.
This function does not return a value.
The following error code can be retrieved by the glGetError function.
The function was called while the client-attribute stack was full.
The glPushClientAttrib function uses its mask parameter to determine which groups of client-state variables are saved on the client-attribute stack. You can use the bitwise OR operator to join together accepted symbolic constants to set bits and construct a mask.
The glPopClientAttrib function restores the values of the client-state variables last saved with glPushclientAttrib. Client-state variables not previously saved are left unchanged. Pushing attributes onto a full client-attribute stack or popping attributes off an empty stack sets an error flag and no other change is made to the OpenGL state. By default the client attribute stack is empty.
Some OpenGL client-state values cannot be saved on the client-attribute stack. For example, you cannot save the select or feedback states on the client-attribute stack. The depth of the client-attribute stack is at least 16.
The glPushclientAttrib and glPopClientAttrib functions are not compiled into display lists, but are executed immediately.
The glPushClientAttrib and glPopClientAttrib functions can only push and pop pixel storage modes and vertex array client states. You must use glPushAttrib and glPopAttrib to push and pop states that are kept on the server.
Note The glPushClientAttrib and glPopClientAttrib functions are only available in OpenGL version 1.1 or later.
The following functions retrieve information related to glPushClientAttrib and glPopClientAttrib:
glGet with argument GL_CLIENT_ATTRIB_STACK_DEPTH
glGet with argument GL_MAX_CLIENT_ATTRIB_STACK_DEPTH
Minimum supported client
|Windows 2000 Professional|
Minimum supported server
|Windows 2000 Server|
Build date: 3/6/2012