 |
» |
|
|
 |
Return the value or values of a selected parameter.
C Specification |  |
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
Specifies the parameter value to be returned. The symbolic constants in
the list below are accepted.
- params
Returns the value or values of the specified parameter.
Description |  |
These four commands return values for simple state variables in IVL. The
pname argument is a symbolic constant indicating the state variable to
be returned, and params is a pointer to an array of the indicated type
in which to place the returned data.
Type conversion is performed if params has a different type than the state
variable value being requested. If glGetBooleanv is called, a
floating-point or integer value is converted to GL_FALSE if and only if it
is zero. Otherwise, it is converted to GL_TRUE. If glGetIntegerv is
called, Boolean values are returned as GL_TRUE or GL_FALSE, and most
floating-point values are rounded to the nearest integer value.
Floating-point colors, however, are returned with a linear mapping that maps
1.0 to the most positive representable integer value, and -1.0 to the
most negative representable integer value. If glGetFloatv or
glGetDoublev is called, Boolean values are returned as GL_TRUE or
GL_FALSE, and integer values are converted to floating-point values.
The following symbolic constants are accepted by pname:
GL_ALPHA_BITS
params returns one value, the number of alpha bitplanes in each color
buffer.
GL_BLUE_BITS
params returns one value, the number of blue bitplanes in each color
buffer.
GL_COLOR_CLEAR_VALUE
params 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_CONVOLUTION_2D_EXT
params returns a single Boolean value indicating whether
two-dimensional convolution will be performed during pixel transfers. See
glConvolutionFilter2DEXT.
GL_CURRENT_RASTER_POSITION
params returns four values: the x, y, z, and w components of the
current raster position. x, y, and z are in window coordinates, and w is in
clip coordinates. See glRasterPos.
GL_CURRENT_RASTER_POSITION_VALID
params returns a single Boolean value indicating whether the
current raster position is valid. See
glRasterPos.
GL_DOUBLEBUFFER
params returns a single Boolean value indicating whether
double-buffering is supported.
GL_DRAW_BUFFER
params returns one value, a symbolic constant indicating which
buffers are being drawn to. See
glDrawBuffer.
GL_GREEN_BITS
params returns one value, the number of green bitplanes in each
color buffer.
GL_PACK_ALIGNMENT
params returns one value, the byte alignment used for writing pixel
data to memory. See glPixelStore.
GL_PACK_ROW_LENGTH
params returns one value, the row length used for writing pixel data
to memory. See glPixelStore.
GL_PACK_SKIP_PIXELS
params returns one value, the number of pixel locations skipped
before the first pixel is written into memory. See
glPixelStore.
GL_PACK_SKIP_ROWS
params returns one value, the number of rows of pixel locations
skipped before the first pixel is written into memory. See
glPixelStore.
GL_POST_CONVOLUTION_ALPHA_BIAS_EXT
params returns a single value, the bias term to be added to alpha
immediately after convolution. See
glConvolutionFilter2DEXT.
GL_POST_CONVOLUTION_ALPHA_SCALE_EXT
params returns a single value, the scale factor to be applied to
alpha immediately after post-convolution scaling. See
glConvolutionFilter2DEXT.
GL_POST_CONVOLUTION_BLUE_BIAS_EXT
params returns a single value, the bias term to be added to blue
immediately after convolution. See
glConvolutionFilter2DEXT.
GL_POST_CONVOLUTION_BLUE_SCALE_EXT
params returns a single value, the scale factor to be applied to
blue immediately after post-convolution scaling. See
glConvolutionFilter2DEXT.
GL_POST_CONVOLUTION_GREEN_BIAS_EXT
params returns a single value, the bias term to be added to green
immediately after convolution. See
glConvolutionFilter2DEXT.
GL_POST_CONVOLUTION_GREEN_SCALE_EXT
params returns a single value, the scale factor to be applied to
green immediately after post-convolution scaling. See
glConvolutionFilter2DEXT.
GL_POST_CONVOLUTION_RED_BIAS_EXT
params returns a single value, the bias term to be added to red
immediately after convolution. See
glConvolutionFilter2DEXT.
GL_POST_CONVOLUTION_RED_SCALE_EXT
params returns a single value, the scale factor to be applied to
red immediately after post-convolution scaling. See
glConvolutionFilter2DEXT.
GL_READ_BUFFER
params returns one value, a symbolic constant indicating which color
buffer is selected for reading. See
glReadPixels.
GL_RED_BITS
params returns one value, the number of red bitplanes in each color
buffer.
GL_RGBA_MODE
params returns a single Boolean value indicating whether IVL
is in RGBA mode (true) or color index mode (false).
GL_SCISSOR_BOX
params returns four values: the x and y window coordinates of the
scissor box, followed by its width and height. See
glScissor.
GL_SCISSOR_TEST
params returns a single Boolean value indicating whether scissoring
is enabled. See glScissor.
GL_UNPACK_ALIGNMENT
params returns one value, the byte alignment used for reading pixel
data from memory. See glPixelStore.
GL_UNPACK_ROW_LENGTH
params returns one value, the row length used for reading pixel data
from memory. See glPixelStore.
GL_UNPACK_SKIP_PIXELS
params returns one value, the number of pixel locations skipped
before the first pixel is read from memory. See
glPixelStore.
GL_UNPACK_SKIP_ROWS
params returns one value, the number of rows of pixel locations
skipped before the first pixel is read from memory. See
glPixelStore.
GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP
params returns a single value indicating whether the post-image
transformation color lookup table is enabled. See
glColorTableEXT.
GL_IMAGE_TRANSFORM_2D_HP
params returns a single value indicating whether the 2D image
transformation operation is enabled. See
glImageTransformParameterHP.
Many of the Boolean parameters can also be queried more easily using
glIsEnabled.
Errors |  |
GL_INVALID_ENUM is generated if pname is not an accepted value.
See Also |  |
glClearColor,
glColorTableEXT,
glColorTableEXT,
glConvolutionFilter2DEXT,
glDrawBuffer,
glGetColorTableParameterEXT,
glGetConvolutionFilterEXT,
glGetConvolutionParameterEXT,
glGetError,
glGetImageTransformParameterHP,
glGetString,
glImageTransformParameterHP,
glIsEnabled,
glPixelStore,
glRasterPos,
glReadPixels,
glScissor.
|