Export (0) Print
Expand All
Expand Minimize

glPushClientAttrib function

Applies to: desktop apps only

The glPushClientAttrib and glPopClientAttrib functions save and restore groups of client-state variables on the client-attribute stack.

Syntax

void WINAPI glPushClientAttrib(
  GLbitfield mask
);

Parameters

mask

A mask that indicates which attributes to save. The following are the symbolic mask constants and their associated OpenGL client states.

ValueMeaning
GL_CLIENT_PIXEL_STORE_BIT

Pixel storage mode attributes.

GL_CLIENT_VERTEX_ARRAY_BIT

Vertex array attributes.

GL_CLIENT_ALL_ATTRIB_BITs

all stackable client-state attributes.

 

Return value

This function does not return a value.

Error codes

The following error code can be retrieved by the glGetError function.

NameMeaning
GL_STACK_OVERFLOW

The function was called while the client-attribute stack was full.

Remarks

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

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Gl.h

Library

Opengl32.lib

DLL

Opengl32.dll

See also

glColorPointer
glDisableClientState
glEdgeFlagPointer
glEnableClientState
glGet
glGetError
glIndexPointer
glNormalPointer
glNewList
glPixelStore
glPushAttrib
glTexCoordPointer
glVertexPointer

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2014 Microsoft