glIsEnabled.3G man page

glIsEnabled — test whether a capability is enabled

C Specification

GLboolean glIsEnabled(GLenum cap);

Parameters

cap

Specifies a symbolic constant indicating a GL capability.

Description

glIsEnabled returns GL_TRUE if cap is an enabled capability and returns GL_FALSE otherwise. Initially all capabilities except GL_DITHER are disabled; GL_DITHER is initially enabled.

The following capabilities are accepted for cap:

Constant
See
GL_ALPHA_TESTglAlphaFunc()
GL_AUTO_NORMALglEvalCoord()
GL_BLENDglBlendFunc(), glLogicOp()
GL_CLIP_PLANEiglClipPlane()
GL_COLOR_ARRAYglColorPointer()
GL_COLOR_LOGIC_OPglLogicOp()
GL_COLOR_MATERIALglColorMaterial()
GL_COLOR_SUMglSecondaryColor()
GL_COLOR_TABLEglColorTable()
GL_CONVOLUTION_1DglConvolutionFilter1D()
GL_CONVOLUTION_2DglConvolutionFilter2D()
GL_CULL_FACEglCullFace()
GL_DEPTH_TESTglDepthFunc(), glDepthRange()
GL_DITHERglEnable()
GL_EDGE_FLAG_ARRAYglEdgeFlagPointer()
GL_FOGglFog()
GL_FOG_COORD_ARRAYglFogCoordPointer()
GL_HISTOGRAMglHistogram()
GL_INDEX_ARRAYglIndexPointer()
GL_INDEX_LOGIC_OPglLogicOp()
GL_LIGHTiglLightModel(), glLight()
GL_LIGHTINGglMaterial(), glLightModel(), glLight()
GL_LINE_SMOOTHglLineWidth()
GL_LINE_STIPPLEglLineStipple()
GL_MAP1_COLOR_4glMap1()
GL_MAP1_INDEXglMap1()
GL_MAP1_NORMALglMap1()
GL_MAP1_TEXTURE_COORD_1glMap1()
GL_MAP1_TEXTURE_COORD_2glMap1()
GL_MAP1_TEXTURE_COORD_3glMap1()
GL_MAP1_TEXTURE_COORD_4glMap1()
GL_MAP2_COLOR_4glMap2()
GL_MAP2_INDEXglMap2()
GL_MAP2_NORMALglMap2()
GL_MAP2_TEXTURE_COORD_1glMap2()
GL_MAP2_TEXTURE_COORD_2glMap2()
GL_MAP2_TEXTURE_COORD_3glMap2()
GL_MAP2_TEXTURE_COORD_4glMap2()
GL_MAP2_VERTEX_3glMap2()
GL_MAP2_VERTEX_4glMap2()
GL_MINMAXglMinmax()
GL_MULTISAMPLEglSampleCoverage()
GL_NORMAL_ARRAYglNormalPointer()
GL_NORMALIZEglNormal()
GL_POINT_SMOOTHglPointSize()
GL_POINT_SPRITEglEnable()
GL_POLYGON_SMOOTHglPolygonMode()
GL_POLYGON_OFFSET_FILLglPolygonOffset()
GL_POLYGON_OFFSET_LINEglPolygonOffset()
GL_POLYGON_OFFSET_POINTglPolygonOffset()
GL_POLYGON_STIPPLEglPolygonStipple()
GL_POST_COLOR_MATRIX_COLOR_TABLEglColorTable()
GL_POST_CONVOLUTION_COLOR_TABLEglColorTable()
GL_RESCALE_NORMALglNormal()
GL_SAMPLE_ALPHA_TO_COVERAGEglSampleCoverage()
GL_SAMPLE_ALPHA_TO_ONEglSampleCoverage()
GL_SAMPLE_COVERAGEglSampleCoverage()
GL_SCISSOR_TESTglScissor()
GL_SECONDARY_COLOR_ARRAYglSecondaryColorPointer()
GL_SEPARABLE_2DglSeparableFilter2D()
GL_STENCIL_TESTglStencilFunc(), glStencilOp()
GL_TEXTURE_1DglTexImage1D()
GL_TEXTURE_2DglTexImage2D()
GL_TEXTURE_3DglTexImage3D()
GL_TEXTURE_COORD_ARRAYglTexCoordPointer()
GL_TEXTURE_CUBE_MAPglTexImage2D()
GL_TEXTURE_GEN_QglTexGen()
GL_TEXTURE_GEN_RglTexGen()
GL_TEXTURE_GEN_SglTexGen()
GL_TEXTURE_GEN_TglTexGen()
GL_VERTEX_ARRAYglVertexPointer()
GL_VERTEX_PROGRAM_POINT_SIZEglEnable()
GL_VERTEX_PROGRAM_TWO_SIDEglEnable()

Notes

If an error is generated, glIsEnabled returns 0.

GL_COLOR_LOGIC_OP, GL_COLOR_ARRAY, GL_EDGE_FLAG_ARRAY, GL_INDEX_ARRAY, GL_INDEX_LOGIC_OP, GL_NORMAL_ARRAY, GL_POLYGON_OFFSET_FILL, GL_POLYGON_OFFSET_LINE, GL_POLYGON_OFFSET_POINT, GL_TEXTURE_COORD_ARRAY, and GL_VERTEX_ARRAY are available only if the GL version is 1.1 or greater.

GL_RESCALE_NORMAL, and GL_TEXTURE_3D are available only if the GL version is 1.2 or greater.

GL_MULTISAMPLE, GL_SAMPLE_ALPHA_TO_COVERAGE, GL_SAMPLE_ALPHA_TO_ONE, GL_SAMPLE_COVERAGE, GL_TEXTURE_CUBE_MAP are available only if the GL version is 1.3 or greater.

GL_FOG_COORD_ARRAY and GL_SECONDARY_COLOR_ARRAY are available only if the GL version is 1.4 or greater.

GL_POINT_SPRITE, GL_VERTEX_PROGRAM_POINT_SIZE, and GL_VERTEX_PROGRAM_TWO_SIDE are available only if the GL version is 2.0 or greater.

GL_COLOR_TABLE, GL_CONVOLUTION_1D, GL_CONVOLUTION_2D, GL_HISTOGRAM, GL_MINMAX, GL_POST_COLOR_MATRIX_COLOR_TABLE, GL_POST_CONVOLUTION_COLOR_TABLE, and GL_SEPARABLE_2D are available only if ARB_imaging is returned when glGet() is called with GL_EXTENSIONS.

For OpenGL versions 1.3 and greater, or when the ARB_multitexture extension is supported, the following parameters return the associated value for the active texture unit: GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_GEN_S, GL_TEXTURE_GEN_T, GL_TEXTURE_GEN_R, GL_TEXTURE_GEN_Q, GL_TEXTURE_MATRIX, and GL_TEXTURE_STACK_DEPTH. Likewise, the following parameters return the associated value for the active client texture unit: GL_TEXTURE_COORD_ARRAY, GL_TEXTURE_COORD_ARRAY_SIZE, GL_TEXTURE_COORD_ARRAY_STRIDE, GL_TEXTURE_COORD_ARRAY_TYPE.

Errors

GL_INVALID_ENUM is generated if cap is not an accepted value.

GL_INVALID_OPERATION is generated if glIsEnabled is executed between the execution of glBegin() and the corresponding execution of glEnd().

See Also

glEnable(), glEnableClientState(), glGet()

Authors

opengl.org

Info

02/04/2016 opengl.org OpenGL Manual