glIsEnabled,_glIsEnabledi - test whether a capability is enabled
Contents
C Specification
GLbooleanglIsEnabled(GLenumcap);GLbooleanglIsEnabledi(GLenumcap,GLuintindex);
Copyright
Copyright © 1991-2006 Silicon Graphics, Inc.
Copyright © 2010-2014 Khronos Group
[FIXME: source] 11/18/2024 GLISENABLED(3G)
Description
glIsEnabled returns GL_TRUE if cap is an enabled capability and returns GL_FALSE otherwise. Boolean
states that are indexed may be tested with glIsEnabledi. For glIsEnabledi, index specifies the index of
the capability to test. index must be between zero and the count of indexed capabilities for cap.
Initially all capabilities except GL_DITHER are disabled; GL_DITHER is initially enabled.
The following capabilities are accepted for cap:
┌──────────────────────────────┬───────────────────────────────────────────────────────┐
│ Constant │ See │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_BLEND │ glBlendFunc(), │
│ │ glLogicOp() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_CLIP_DISTANCEi │ glEnable() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_COLOR_LOGIC_OP │ glLogicOp() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_CULL_FACE │ glCullFace() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_DEPTH_CLAMP │ glEnable() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_DEBUG_OUTPUT │ glEnable() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_DEBUG_OUTPUT_SYNCHRONOUS │ glEnable() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_DEPTH_TEST │ glDepthFunc(), │
│ │ glDepthRange() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_DITHER │ glEnable() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_FRAMEBUFFER_SRGB │ glEnable() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_LINE_SMOOTH │ glLineWidth() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_MULTISAMPLE │ glSampleCoverage() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_POLYGON_SMOOTH │ glPolygonMode() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_POLYGON_OFFSET_FILL │ glPolygonOffset() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_POLYGON_OFFSET_LINE │ glPolygonOffset() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_POLYGON_OFFSET_POINT │ glPolygonOffset() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_PROGRAM_POINT_SIZE │ glEnable() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_PRIMITIVE_RESTART │ glEnable(), │
│ │ glPrimitiveRestartIndex() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_SAMPLE_ALPHA_TO_COVERAGE │ glSampleCoverage() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_SAMPLE_ALPHA_TO_ONE │ glSampleCoverage() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_SAMPLE_COVERAGE │ glSampleCoverage() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_SAMPLE_MASK │ glEnable() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_SCISSOR_TEST │ glScissor() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_STENCIL_TEST │ glStencilFunc(), │
│ │ glStencilOp() │
├──────────────────────────────┼───────────────────────────────────────────────────────┤
│ GL_TEXTURE_CUBE_MAP_SEAMLESS │ glEnable() │
└──────────────────────────────┴───────────────────────────────────────────────────────┘
Errors
GL_INVALID_ENUM is generated if cap is not an accepted value.
GL_INVALID_VALUE is generated by glIsEnabledi if index is outside the valid range for the indexed state
cap.
Name
glIsEnabled,_glIsEnabledi - test whether a capability is enabled
Notes
If an error is generated, glIsEnabled and glIsEnabledi return GL_FALSE.
GL_DEBUG_OUTPUT and GL_DEBUG_OUTPUT_SYNCHRONOUS are available only if the GL version is 4.3 or greater.
Parameters
cap
Specifies a symbolic constant indicating a GL capability.
index
Specifies the index of the capability.
See Also
glEnable(),
glDisable, glGet()
Version Support
┌──────────────┬───────────────────────────────────────────────────────────────────────┐
│ │ OpenGLVersion │
├──────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
│ Function │ 2.0 │ 2.1 │ 3.0 │ 3.1 │ 3.2 │ 3.3 │ 4.0 │ 4.1 │ 4.2 │ 4.3 │ 4.4 │ 4.5 │
│ / │ │ │ │ │ │ │ │ │ │ │ │ │
│ Feature │ │ │ │ │ │ │ │ │ │ │ │ │
│ Name │ │ │ │ │ │ │ │ │ │ │ │ │
├──────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ glIsEnabled │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │
├──────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ glIsEnabledi │ - │ - │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │
└──────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
