GLAPI/glIsEnabled: Difference between revisions
m Bot: Adding better formatting. |
m Bot: Adding better formatting. |
||
Line 18: | Line 18: | ||
== Description == | == Description == | ||
'''glIsEnabled''' returns {{ | '''glIsEnabled''' returns {{enum|GL_TRUE}} if {{param|cap}} is an enabled capability and returns {{enum|GL_FALSE}} otherwise. Boolean states that are indexed may be tested with '''glIsEnabledi'''. For '''glIsEnabledi''', {{param|index}} specifies the index of the capability to test. {{param|index}} must be between zero and the count of indexed capabilities for {{param|cap}}. Initially all capabilities except {{enum|GL_DITHER}} are disabled; {{enum|GL_DITHER}} is initially enabled. | ||
The following capabilities are accepted for {{param|cap}}: | The following capabilities are accepted for {{param|cap}}: | ||
Line 29: | Line 29: | ||
! '''See''' | ! '''See''' | ||
|+ | |+ | ||
| {{ | | {{enum|GL_BLEND}} | ||
| {{apifunc|glBlendFunc}}, {{apifunc|glLogicOp}} | | {{apifunc|glBlendFunc}}, {{apifunc|glLogicOp}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_CLIP_DISTANCE}}''i'' | ||
| {{apifunc|glEnable}} | | {{apifunc|glEnable}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_COLOR_LOGIC_OP}} | ||
| {{apifunc|glLogicOp}} | | {{apifunc|glLogicOp}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_CULL_FACE}} | ||
| {{apifunc|glCullFace}} | | {{apifunc|glCullFace}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_DEPTH_CLAMP}} | ||
| {{apifunc|glEnable}} | | {{apifunc|glEnable}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_DEPTH_TEST}} | ||
| {{apifunc|glDepthFunc}}, {{apifunc|glDepthRange}} | | {{apifunc|glDepthFunc}}, {{apifunc|glDepthRange}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_DITHER}} | ||
| {{apifunc|glEnable}} | | {{apifunc|glEnable}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_FRAMEBUFFER_SRGB}} | ||
| {{apifunc|glEnable}} | | {{apifunc|glEnable}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_LINE_SMOOTH}} | ||
| {{apifunc|glLineWidth}} | | {{apifunc|glLineWidth}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_MULTISAMPLE}} | ||
| {{apifunc|glSampleCoverage}} | | {{apifunc|glSampleCoverage}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_POLYGON_SMOOTH}} | ||
| {{apifunc|glPolygonMode}} | | {{apifunc|glPolygonMode}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_POLYGON_OFFSET_FILL}} | ||
| {{apifunc|glPolygonOffset}} | | {{apifunc|glPolygonOffset}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_POLYGON_OFFSET_LINE}} | ||
| {{apifunc|glPolygonOffset}} | | {{apifunc|glPolygonOffset}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_POLYGON_OFFSET_POINT}} | ||
| {{apifunc|glPolygonOffset}} | | {{apifunc|glPolygonOffset}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_PROGRAM_POINT_SIZE}} | ||
| {{apifunc|glEnable}} | | {{apifunc|glEnable}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_PRIMITIVE_RESTART}} | ||
| {{apifunc|glEnable}}, {{apifunc|glPrimitiveRestartIndex}} | | {{apifunc|glEnable}}, {{apifunc|glPrimitiveRestartIndex}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_SAMPLE_ALPHA_TO_COVERAGE}} | ||
| {{apifunc|glSampleCoverage}} | | {{apifunc|glSampleCoverage}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_SAMPLE_ALPHA_TO_ONE}} | ||
| {{apifunc|glSampleCoverage}} | | {{apifunc|glSampleCoverage}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_SAMPLE_COVERAGE}} | ||
| {{apifunc|glSampleCoverage}} | | {{apifunc|glSampleCoverage}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_SAMPLE_MASK}} | ||
| {{apifunc|glEnable}} | | {{apifunc|glEnable}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_SCISSOR_TEST}} | ||
| {{apifunc|glScissor}} | | {{apifunc|glScissor}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_STENCIL_TEST}} | ||
| {{apifunc|glStencilFunc}}, {{apifunc|glStencilOp}} | | {{apifunc|glStencilFunc}}, {{apifunc|glStencilOp}} | ||
|+ | |+ | ||
| {{ | | {{enum|GL_TEXTURE_CUBEMAP_SEAMLESS}} | ||
| {{apifunc|glEnable}} | | {{apifunc|glEnable}} | ||
|} | |} | ||
Line 103: | Line 103: | ||
== Notes == | == Notes == | ||
If an error is generated, '''glIsEnabled''' and '''glIsEnabledi''' return {{ | If an error is generated, '''glIsEnabled''' and '''glIsEnabledi''' return {{enum|GL_FALSE}}. | ||
== Errors == | == Errors == | ||
{{ | {{enum|GL_INVALID_ENUM}} is generated if {{param|cap}} is not an accepted value. | ||
{{ | {{enum|GL_INVALID_VALUE}} is generated by '''glIsEnabledi''' if {{param|index}} is outside the valid range for the indexed state {{param|cap}}. | ||
== See Also == | == See Also == |
Revision as of 17:25, 29 April 2012
Core in version | 4.6 | |
---|---|---|
Core since version | 1.0 |
glIsEnabled, glIsEnabledi: test whether a capability is enabled
Function Definition
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.
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_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_CUBEMAP_SEAMLESS | glEnable |
Notes
If an error is generated, glIsEnabled and glIsEnabledi return GL_FALSE.
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.
See Also
Copyright
Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2011 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.