Obtaining State Information

OpenGL maintains many state variables that affect the behavior of many functions. Some of these variables have specialized query functions.

glGetClipPlane glGetPixelMap glGetTexImage
glGetLight glGetPolygonStipple glGetTexLevelParameter
glGetMap glGetTexEnv glGetTexParameter
glGetMaterial glGetTexGen

 

To obtain the value of other state variables, use glGetBooleanv, glGetDoublev, glGetFloatv, or glGetIntegerv, as appropriate. See glGet for information about how to use these functions. Other query functions you might want to use are glGetError, glGetString, and glIsEnabled. (See Handling Errors for more information about functions related to error handling.) To save and restore sets of state variables, use glPushAttrib and glPopAttrib.

 

 

Show: