glIsEnabled, glIsEnabledi — test whether a capability is enabled
GLboolean glIsEnabled(
|
GLenum cap); |
GLboolean glIsEnabledi(
|
GLenum cap, |
GLuint index); |
cap
Specifies a symbolic constant indicating a GL capability.
index
Specifies the index of the capability.
glIsEnabled returns GL_TRUE if cap is an enabled capability
and returns GL_FALSE otherwise.
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 |
GL_CULL_FACE
|
glCullFace |
GL_DEBUG_OUTPUT
|
glEnable |
GL_DEBUG_OUTPUT_SYNCHRONOUS
|
glEnable |
GL_DEPTH_TEST
|
glDepthFunc, glDepthRangef |
GL_DITHER
|
glEnable |
GL_POLYGON_OFFSET_FILL
|
glPolygonOffset |
GL_PRIMITIVE_RESTART_FIXED_INDEX
|
glEnable |
GL_RASTERIZER_DISCARD
|
glEnable |
GL_SAMPLE_ALPHA_TO_COVERAGE
|
glSampleCoverage |
GL_SAMPLE_COVERAGE
|
glSampleCoverage |
GL_SCISSOR_TEST
|
glScissor |
GL_STENCIL_TEST
|
glStencilFunc, glStencilOp |
If an error is generated,
glIsEnabled and glIsEnabledi return GL_FALSE.
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.
| OpenGL ES API Version | ||||
|---|---|---|---|---|
| Function Name | 2.0 | 3.0 | 3.1 | 3.2 |
| glIsEnabled | ✔ | ✔ | ✔ | ✔ |
| glIsEnabledi | - | - | - | ✔ |
Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2015 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt.