glGetBooleanv, glGetDoublev, glGetFloatv, glGetIntegerv
These functions return the value or values of a selected parameter.
void glGetBooleanv( GLenum pname, GLboolean *params ); void glGetDoublev( GLenum pname, GLdouble *params ); void glGetFloatv( GLenum pname, GLfloat * params ); void glGetIntegerv( GLenum pname, GLint * params );
Parameters
-
pname
-
The parameter value to be returned. The following symbolic constants are accepted:
Constant Description GL_ACCUM_ALPHA_BITS The params parameter returns one value: the number of alpha bitplanes in the accumulation buffer. GL_ACCUM_BLUE_BITS The params parameter returns one value: the number of blue bitplanes in the accumulation buffer. GL_ACCUM_CLEAR_VALUE The params parameter returns four values: the red, green, blue, and alpha values used to clear the accumulation buffer. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and –1.0 returns the most negative representable integer value. See glClearAccum. GL_ACCUM_GREEN_BITS The params parameter returns one value: the number of green bitplanes in the accumulation buffer. GL_ACCUM_RED_BITS The params parameter returns one value: the number of red bitplanes in the accumulation buffer. GL_ALPHA_BIAS The params parameter returns one value: the alpha bias factor used during pixel transfers. See glPixelTransfer. GL_ALPHA_BITS The params parameter returns one value: the number of alpha bitplanes in each color buffer. GL_ALPHA_SCALE The params parameter returns one value: the alpha scale factor used during pixel transfers. See glPixelTransfer. GL_ALPHA_TEST The params parameter returns a single Boolean value indicating whether alpha testing of fragments is enabled. See glAlphaFunc. GL_ALPHA_TEST_FUNC The params parameter returns one value: the symbolic name of the alpha test function. See glAlphaFunc. GL_ALPHA_TEST_REF The params parameter returns one value: the reference value for the alpha test. See glAlphaFunc. An integer value, if requested, is linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and –1.0 returns the most negative representable integer value. GL_ATTRIB_STACK_DEPTH The params parameter returns one value: the depth of the attribute stack. If the stack is empty, zero is returned. See glPushAttrib. GL_AUTO_NORMAL The params parameter returns a single Boolean value indicating whether 2-D map evaluation automatically generates surface normals. See glMap2. GL_AUX_BUFFERS The params parameter returns one value: the number of auxiliary color buffers. GL_BLEND The params parameter returns a single Boolean value indicating whether blending is enabled. See glBlendFunc. GL_BLEND_DST The params parameter returns one value: the symbolic constant identifying the destination blend function. See glBlendFunc. GL_BLEND_SRC The params parameter returns one value: the symbolic constant identifying the source blend function. See glBlendFunc. GL_BLUE_BIAS The params parameter returns one value: the blue bias factor used during pixel transfers. See glPixelTransfer. GL_BLUE_BITS The params parameter returns one value: the number of blue bitplanes in each color buffer. GL_BLUE_SCALE The params parameter returns one value: the blue scale factor used during pixel transfers. See glPixelTransfer. GL_CLIENT_ATTRIB_STACK_DEPTH The params parameter returns one value indicating the depth of the attribute stack. The initial value is zero. See glPushClientAttrib. GL_CLIP_PLANEi The params parameter returns a single Boolean value indicating whether the specified clipping plane is enabled. See glClipPlane. GL_COLOR_ARRAY The params parameter returns a single Boolean value indicating whether the specified clipping plane is enabled. See glClipPlane. GL_COLOR_ARRAY_SIZE The params parameter returns one value, the number of components per color in the color array. See glColorPointer. GL_COLOR_ARRAY_STRIDE The params parameter returns one value, the byte offset between consecutive colors in the color array. See glColorPointer. GL_COLOR_ARRAY_TYPE The params parameter returns one value, the data type of each component in the color array. See glColorPointer. GL_COLOR_CLEAR_VALUE The params parameter returns four values: the red, green, blue, and alpha values used to clear the color buffers. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and –1.0 returns the most negative representable integer value. See glClearColor. GL_COLOR_LOGIC_OP The params parameter returns a single Boolean value indicating whether a fragment's RGBA color values are merged into the framebuffer using a logical operation. See glLogicOp. GL_COLOR_MATERIAL The params parameter returns a single Boolean value indicating whether one or more material parameters are tracking the current color. See glColorMaterial. GL_COLOR_MATERIAL_FACE The params parameter returns one value: a symbolic constant indicating which materials have a parameter that is tracking the current color. See glColorMaterial. GL_COLOR_MATERIAL_PARAMETER The params parameter returns one value: a symbolic constant indicating which material parameters are tracking the current color. See glColorMaterial. GL_COLOR_WRITEMASK The params parameter returns four Boolean values: the red, green, blue, and alpha write enables for the color buffers. See glColorMask. GL_CULL_FACE The params parameter returns a single Boolean value indicating whether polygon culling is enabled. See glCullFace. GL_CULL_FACE_MODE The params parameter returns one value: a symbolic constant indicating which polygon faces are to be culled. See glCullFace. GL_CURRENT_COLOR The params parameter returns four values: the red, green, blue, and alpha values of the current color. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and –1.0 returns the most negative representable integer value. See glColor. GL_CURRENT_INDEX The params parameter returns one value: the current color index. See glIndex. GL_CURRENT_NORMAL The params parameter returns three values: the x, y, and z values of the current normal. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and –1.0 returns the most negative representable integer value. See glNormal. GL_CURRENT_RASTER_COLOR The params parameter returns four values: the red, green, blue, and alpha values of the current raster position. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and –1.0 returns the most negative representable integer value. See glRasterPos. GL_CURRENT_RASTER_DISTANCE The params parameter returns one value: the distance from the eye to the current raster position. See glRasterPos. GL_CURRENT_RASTER_INDEX The params parameter returns one value: the color index of the current raster position. See glRasterPos