Obtaining State Information
OpenGL maintains many state variables that affect the behavior of many functions. Some of these variables have specialized query functions.
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.
- Using the Query Functions
- Error Handling
- OpenGL Error Codes
- Saving and Restoring Sets of State Variables
- OpenGL State Variables
- State Information Reference