GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


Manpage of GLPUSHATTRIB

GLPUSHATTRIB

Index
 

NAME

glPushAttrib, glPopAttrib - push and pop the server attribute stack

 

C SPECIFICATION

void f3glPushAttribfP( GLbitfield fImaskfP )


 

PARAMETERS

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

C SPECIFICATION

void f3glPopAttribfP( void )


 

DESCRIPTION

%f3glPushAttribfP takes one argument, a mask that indicates which groups of state variables to save on the attribute stack. Symbolic constants are used to set bits in the mask. f2maskfP is typically constructed by ORing several of these constants together. The special mask %f3GL_ALL_ATTRIB_BITSfP can be used to save all stackable states. The symbolic mask constants and their associated GL state are as follows (the second column lists which attributes are saved):
%f3GL_ACCUM_BUFFER_BITfPAccumulation buffer clear value

%f3GL_COLOR_BUFFER_BITfP%f3GL_ALPHA_TESTfP enable bit
Alpha test function and reference value
%f3GL_BLENDfP enable bit
Blending source and destination functions
Constant blend color
Blending equation
%f3GL_DITHERfP enable bit
%f3GL_DRAW_BUFFERfP setting
%f3GL_COLOR_LOGIC_OPfP enable bit
%f3GL_INDEX_LOGIC_OPfP enable bit
Logic op function
Color mode and index mode clear values
Color mode and index mode writemasks

%f3GL_CURRENT_BITfPCurrent RGBA color
Current color index
Current normal vector
Current texture coordinates
Current raster position
%f3GL_CURRENT_RASTER_POSITION_VALIDfP flag
RGBA color associated with current raster position
Color index associated with current raster position
Texture coordinates associated with current raster position
%f3GL_EDGE_FLAGfP flag

%f3GL_DEPTH_BUFFER_BITfP%f3GL_DEPTH_TESTfP enable bit
Depth buffer test function
Depth buffer clear value
%f3GL_DEPTH_WRITEMASKfP enable bit

%f3GL_ENABLE_BITfP%f3GL_ALPHA_TESTfP flag
%f3GL_AUTO_NORMALfP flag
%f3GL_BLENDfP flag
Enable bits for the user-definable clipping planes
%f3GL_COLOR_MATERIALfP
%f3GL_CULL_FACEfP flag
%f3GL_DEPTH_TESTfP flag
%f3GL_DITHERfP flag
%f3GL_FOGfP flag
%f3GL_LIGHTfPf2ifP where 0 <= f2ifP<%f3GL_MAX_LIGHTSfP
%f3GL_LIGHTINGfP flag
%f3GL_LINE_SMOOTHfP flag
%f3GL_LINE_STIPPLEfP flag
%f3GL_COLOR_LOGIC_OPfP flag
%f3GL_INDEX_LOGIC_OPfP flag
%f3GL_MAP1_fPf2xfP where f2xfP is a map type
%f3GL_MAP2_fPf2xfP where f2xfP is a map type
%f3GL_NORMALIZEfP flag
%f3GL_POINT_SMOOTHfP flag
%f3GL_POLYGON_OFFSET_LINEfP flag
%f3GL_POLYGON_OFFSET_FILLfP flag
%f3GL_POLYGON_OFFSET_POINTfP flag
%f3GL_POLYGON_SMOOTHfP flag
%f3GL_POLYGON_STIPPLEfP flag
%f3GL_SCISSOR_TESTfP flag
%f3GL_STENCIL_TESTfP flag
%f3GL_TEXTURE_1DfP flag
%f3GL_TEXTURE_2DfP flag
%f3GL_TEXTURE_3DfP flag
Flags %f3GL_TEXTURE_GEN_fPf2xfP where f2xfP is S, T, R, or Q

%f3GL_EVAL_BITfP%f3GL_MAP1_fPf2xfP enable bits, where f2xfP is a map type
%f3GL_MAP2_fPf2xfP enable bits, where f2xfP is a map type
1D grid endpoints and divisions
2D grid endpoints and divisions
%f3GL_AUTO_NORMALfP enable bit

%f3GL_FOG_BITfP%f3GL_FOGfP enable bit
Fog color
Fog density
Linear fog start
Linear fog end
Fog index
%f3GL_FOG_MODEfP value

%f3GL_HINT_BITfP%f3GL_PERSPECTIVE_CORRECTION_HINTfP setting
%f3GL_POINT_SMOOTH_HINTfP setting
%f3GL_LINE_SMOOTH_HINTfP setting
%f3GL_POLYGON_SMOOTH_HINTfP setting
%f3GL_FOG_HINTfP setting

%f3GL_LIGHTING_BITfP%f3GL_COLOR_MATERIALfP enable bit
%f3GL_COLOR_MATERIAL_FACEfP value
Color material parameters that are tracking the current color
Ambient scene color
%f3GL_LIGHT_MODEL_LOCAL_VIEWERfP value
%f3GL_LIGHT_MODEL_TWO_SIDEfP setting
%f3GL_LIGHTINGfP enable bit
Enable bit for each light
Ambient, diffuse, and specular intensity for each light
Direction, position, exponent, and cutoff angle for each light
Constant, linear, and quadratic attenuation factors for each light
Ambient, diffuse, specular, and emissive color for each material
Ambient, diffuse, and specular color indices for each material
Specular exponent for each material
%f3GL_SHADE_MODELfP setting

%f3GL_LINE_BITfP%f3GL_LINE_SMOOTHfP flag
%f3GL_LINE_STIPPLEfP enable bit
Line stipple pattern and repeat counter
Line width

%f3GL_LIST_BITfP%f3GL_LIST_BASEfP setting

%f3GL_PIXEL_MODE_BITfP%f3GL_RED_BIASfP and %f3GL_RED_SCALEfP settings
%f3GL_GREEN_BIASfP and %f3GL_GREEN_SCALEfP values
%f3GL_BLUE_BIASfP and %f3GL_BLUE_SCALEfP
%f3GL_ALPHA_BIASfP and %f3GL_ALPHA_SCALEfP
%f3GL_DEPTH_BIASfP and %f3GL_DEPTH_SCALEfP
%f3GL_INDEX_OFFSETfP and %f3GL_INDEX_SHIFTfP values
%f3GL_MAP_COLORfP and %f3GL_MAP_STENCILfP flags
%f3GL_ZOOM_XfP and %f3GL_ZOOM_YfP factors
%f3GL_READ_BUFFERfP setting

%f3GL_POINT_BITfP%f3GL_POINT_SMOOTHfP flag
Point size

%f3GL_POLYGON_BITfP%f3GL_CULL_FACEfP enable bit
%f3GL_CULL_FACE_MODEfP value
%f3GL_FRONT_FACEfP indicator
%f3GL_POLYGON_MODEfP setting
%f3GL_POLYGON_SMOOTHfP flag
%f3GL_POLYGON_STIPPLEfP enable bit
%f3GL_POLYGON_OFFSET_FILLfP flag
%f3GL_POLYGON_OFFSET_LINEfP flag
%f3GL_POLYGON_OFFSET_POINTfP flag
%f3GL_POLYGON_OFFSET_FACTORfP
%f3GL_POLYGON_OFFSET_UNITSfP

%f3GL_POLYGON_STIPPLE_BITfPPolygon stipple image

%f3GL_SCISSOR_BITfP%f3GL_SCISSOR_TESTfP flag
Scissor box

%f3GL_STENCIL_BUFFER_BITfP%f3GL_STENCIL_TESTfP enable bit
Stencil function and reference value
Stencil value mask
Stencil fail, pass, and depth buffer pass actions
Stencil buffer clear value
Stencil buffer writemask

%f3GL_TEXTURE_BITfPEnable bits for the four texture coordinates
Border color for each texture image
Minification function for each texture image
Magnification function for each texture image
Texture coordinates and wrap mode for each texture image
Color and mode for each texture environment
Enable bits %f3GL_TEXTURE_GEN_fPf2xfP, f2xfP is S, T, R, and Q
%f3GL_TEXTURE_GEN_MODEfP setting for S, T, R, and Q
%f3glTexGenfP plane equations for S, T, R, and Q
Current texture bindings (for example, %f3GL_TEXTURE_BINDING_2DfP)

%f3GL_TRANSFORM_BITfPCoefficients of the six clipping planes
Enable bits for the user-definable clipping planes
%f3GL_MATRIX_MODEfP value
%f3GL_NORMALIZEfP flag
%f3GL_RESCALE_NORMALfP flag

%f3GL_VIEWPORT_BITfPDepth range (near and far)
Viewport origin and extent
%f3glPopAttribfP restores the values of the state variables saved with the last
%f3glPushAttribfP command. Those not saved are left unchanged. It is an error to push attributes onto a full 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 attribute stack is empty.  

NOTES

Not all values for GL state can be saved on the attribute stack. For example, render mode state, and select and feedback state cannot be saved. Client state must be saved with %f3glPushClientAttribfP. The depth of the attribute stack depends on the implementation, but it must be at least 16. When the %f3GL_ARB_multitexturefP extension is supported, pushing and popping texture state apples to all supported texture units.  

ERRORS

%f3GL_STACK_OVERFLOWfP is generated if %f3glPushAttribfP is called while the attribute stack is full. %f3GL_STACK_UNDERFLOWfP is generated if %f3glPopAttribfP is called while the attribute stack is empty. %f3GL_INVALID_OPERATIONfP is generated if %f3glPushAttribfP or %f3glPopAttribfP is executed between the execution of %f3glBeginfP and the corresponding execution of %f3glEndfP.  

ASSOCIATED GETS

%f3glGetfP with argument %f3GL_ATTRIB_STACK_DEPTHfP
%f3glGetfP with argument %f3GL_MAX_ATTRIB_STACK_DEPTHfP  

SEE ALSO

%f3glGet(3G)fP, %f3glGetClipPlane(3G)fP, %f3glGetError(3G)fP, %f3glGetLight(3G)fP, %f3glGetMap(3G)fP, %f3glGetMaterial(3G)fP,
%f3glGetPixelMap(3G)fP, %f3glGetPolygonStipple(3G)fP, %f3glGetString(3G)fP, %f3glGetTexEnv(3G)fP, %f3glGetTexGen(3G)fP, %f3glGetTexImage(3G)fP, %f3glGetTexLevelParameter(3G)fP, %f3glGetTexParameter(3G)fP, %f3glIsEnabled(3G)fP, %f3glPushClientAttrib(3G)fP


 

Index

NAME
C SPECIFICATION
PARAMETERS
C SPECIFICATION
DESCRIPTION
NOTES
ERRORS
ASSOCIATED GETS
SEE ALSO