logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

glIsEnabled,_glIsEnabledi - test whether a capability is enabled

C Specification

GLbooleanglIsEnabled(GLenumcap);GLbooleanglIsEnabledi(GLenumcap,GLuintindex);

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:

       ┌──────────────────────────────┬───────────────────────────────────────────────────────┐
       │  ConstantSee                                                  │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_BLENDglBlendFunc(),                                        │
       │                              │                             glLogicOp()               │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_CLIP_DISTANCEiglEnable()                                            │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_COLOR_LOGIC_OPglLogicOp()                                           │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_CULL_FACEglCullFace()                                          │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_DEPTH_CLAMPglEnable()                                            │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_DEBUG_OUTPUTglEnable()                                            │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_DEBUG_OUTPUT_SYNCHRONOUSglEnable()                                            │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_DEPTH_TESTglDepthFunc(),                                        │
       │                              │                             glDepthRange()            │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_DITHERglEnable()                                            │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_FRAMEBUFFER_SRGBglEnable()                                            │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_LINE_SMOOTHglLineWidth()                                         │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_MULTISAMPLEglSampleCoverage()                                    │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_POLYGON_SMOOTHglPolygonMode()                                       │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_POLYGON_OFFSET_FILLglPolygonOffset()                                     │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_POLYGON_OFFSET_LINEglPolygonOffset()                                     │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_POLYGON_OFFSET_POINTglPolygonOffset()                                     │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_PROGRAM_POINT_SIZEglEnable()                                            │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_PRIMITIVE_RESTARTglEnable(),                                           │
       │                              │                             glPrimitiveRestartIndex() │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_SAMPLE_ALPHA_TO_COVERAGEglSampleCoverage()                                    │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_SAMPLE_ALPHA_TO_ONEglSampleCoverage()                                    │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_SAMPLE_COVERAGEglSampleCoverage()                                    │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_SAMPLE_MASKglEnable()                                            │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_SCISSOR_TESTglScissor()                                           │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_STENCIL_TESTglStencilFunc(),                                      │
       │                              │                             glStencilOp()             │
       ├──────────────────────────────┼───────────────────────────────────────────────────────┤
       │ GL_TEXTURE_CUBE_MAP_SEAMLESSglEnable()                                            │
       └──────────────────────────────┴───────────────────────────────────────────────────────┘

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                                         │
       ├──────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
       │ Function2.02.13.03.13.23.34.04.14.24.34.44.5 │
       │ /            │     │     │     │     │     │     │     │     │     │     │     │     │
       │ Feature      │     │     │     │     │     │     │     │     │     │     │     │     │
       │ Name         │     │     │     │     │     │     │     │     │     │     │     │     │
       ├──────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
       │ glIsEnabled  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
       ├──────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
       │ glIsEnabledi │  -  │  -  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
       └──────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘

See Also