glGetIntegerv Function

Syntax

GL_APICALL void GL_APIENTRY glGetIntegerv(
     GLenum pname,
     GLint * params
);

Parameters

Name Description
in pname Name of the parameter to get
out params Array storing the obtained parameters

Return Values

No values are returned.

Description

Gets GL parameter settings as GLint-type values.

Set pname to one of the following values.

GL_STENCIL_CLEAR_VALUEGets the clear value for the stencil buffer.
GL_EARLY_DEPTH_CLEAR_VALUE_DMPGets the clear value for the early depth buffer.
GL_EARLY_DEPTH_FUNC_DMPGets the comparison function for the early depth test.
GL_SCISSOR_BOXGets the coordinates of the left and bottom edges, as well as the width and height, of the valid scissoring area.
GL_DEPTH_FUNCGets the comparison function for the depth test.
GL_STENCIL_FUNCGets the comparison function for the stencil test.
GL_STENCIL_FAILGets the method used to manipulate the stencil value when the stencil test fails.
GL_STENCIL_PASS_DEPTH_FAILGets the method used to manipulate the stencil value when the stencil test passes and the depth test fails.
GL_STENCIL_PASS_DEPTH_PASSGets the method used to manipulate the stencil value when the stencil and depth tests pass.
GL_STENCIL_REFGets the reference value for the stencil test.
GL_STENCIL_VALUE_MASKGets the mask pattern used in the stencil buffer.
GL_BLEND_SRC_RGBGets the RGB components' source blending factors.
GL_BLEND_DST_RGBGets the RGB components' destination blending factors.
GL_BLEND_SRC_ALPHAGets the alpha component's source blending factors.
GL_BLEND_DST_ALPHAGets the alpha component's destination blending factors.
GL_BLEND_EQUATION_RGBGets the blending function for RGB components.
GL_BLEND_EQUATION_ALPHAGets the blending function for the alpha component.
GL_STENCIL_WRITEMASKGets a mask pattern that indicates where stencil buffer access is enabled.
GL_CULL_FACE_MODEGets the setting that indicates the faces to cull.
GL_FRONT_FACEGets the value of the setting that defines the front face of a polygon.
GL_VIEWPORTGets the coordinates of the left and bottom edges, as well as the width and height, of the viewport.
GL_MAX_VIEWPORT_DIMSGets the viewport's maximum width and height.
GL_LOGIC_OP_MODEGets the logical operation mode for pixels.
GL_ARRAY_BUFFER_BINDINGGets the vertex buffer objects bound to the bind target GL_ARRAY_BUFFER.
GL_ELEMENT_ARRAY_BUFFER_BINDINGGets the vertex buffer objects bound to the bind target GL_ELEMENT_ARRAY_BUFFER.
GL_VERTEX_STATE_COLLECTION_BINDING_DMPGets the vertex state collection objects that are currently bound.
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITSGets the number of supported texture units.
GL_ACTIVE_TEXTUREGets the currently active textures.
GL_MAX_TEXTURE_SIZEGets the maximum supported size for 2D textures.
GL_MAX_CUBE_MAP_TEXTURE_SIZEGets the maximum supported size for cube-map textures.
GL_TEXTURE_BINDING_2DGets the texture objects currently bound to GL_TEXTURE_2D.
GL_TEXTURE_BINDING_CUBE_MAPGets the texture objects currently bound to GL_TEXTURE_CUBE_MAP.
GL_NUM_COMPRESSED_TEXTURE_FORMATSGets the number of compressed texture formats that are supported.
GL_COMPRESSED_TEXTURE_FORMATSGets the names of compressed texture formats that are supported.
GL_MAX_LUT_TEXTURES_DMPGets the maximum number of lookup table targets.
GL_MAX_LUT_ENTRIES_DMPGets the maximum number of lookup table entries.
GL_TEXTURE_COLLECTION_BINDING_DMPGets the texture collection objects that are currently bound.
GL_TEXTURE_BINDING_LUTi_DMPGets the lookup table objects that are currently bound. The value of i is greater than or equal to 0 and is at least one less than the value obtained with GL_MAX_LUT_TEXTURES_DMP. GL_SUBPIXEL_BITS gets the number of sub-pixel bits. The obtained value is always 0.
GL_RED_BITSGets the number of bits in the red component of the current color buffer.
GL_GREEN_BITSGets the number of bits in the green component of the current color buffer.
GL_BLUE_BITSGets the number of bits in the blue component of the current color buffer.
GL_ALPHA_BITSGets the number of bits in the alpha component of the current color buffer.
GL_DEPTH_BITSGets the number of bits in the depth component of the current depth buffer.
GL_STENCIL_BITSGets the number of bits in the stencil component of the current stencil buffer.
GL_RENDERBUFFER_BINDINGGets the currently bound render buffer object.
GL_FRAMEBUFFER_BINDINGGets the currently bound framebuffer object.
GL_RENDER_BLOCK_MODE_DMPGets the rendering block mode.
GL_IMPLEMENTATION_COLOR_READ_TYPE, GL_IMPLEMENTATION_COLOR_READ_FORMATAlways gets GL_UNSIGNED_BYTE and GL_RGBA. For details on the readable formats and types, see glReadPixels.
GL_MAX_RENDERBUFFER_SIZEGets the maximum render buffer size.
GL_NUM_SHADER_BINARY_FORMATSGets the number of shader binary formats that are supported.
GL_SHADER_BINARY_FORMATSGets the names of the shader binary formats that are supported.
GL_MAX_VERTEX_ATTRIBSGets the maximum number of vertex attributes.
GL_CURRENT_PROGRAMGets the current program object.

You cannot specify GL_EARLY_DEPTH_CLEAR_VALUE_DMP, GL_EARLY_DEPTH_FUNC_DMP, or GL_RENDER_BLOCK_MODE_DMP with POD.

In addition to those above, you can also specify any setting that can be obtained by glGetBooleanv or glGetFloatv, but you will get values that have all been cast to type GLint.

This function generates the following errors.

GL_INVALID_ENUMThe pname argument was set to an invalid value.

Revision History

2010/01/07
Initial version.

CONFIDENTIAL