Difference between revisions of "GLAPI/glIsEnabled"

From OpenGL Wiki
Jump to: navigation, search
m (Renaming category: 'API Reference 4' to 'Core API Reference'.)
m (Bot: Adding better formatting.)
Line 8: Line 8:
 
== Function Definition ==
 
== Function Definition ==
  
   GLboolean '''glIsEnabled'''(GLenum ''cap'');
+
   GLboolean '''glIsEnabled'''(GLenum {{param|cap}});
   GLboolean '''glIsEnabledi'''(GLenum ''cap'', GLuint ''index'');
+
   GLboolean '''glIsEnabledi'''(GLenum {{param|cap}}, GLuint {{param|index}});
  
 
; cap
 
; cap
Line 18: Line 18:
 
== Description ==
 
== Description ==
  
'''glIsEnabled''' returns {{code|GL_TRUE}} if ''cap'' is an enabled capability and returns {{code|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 {{code|GL_DITHER}} are disabled; {{code|GL_DITHER}} is initially enabled.
+
'''glIsEnabled''' returns {{code|GL_TRUE}} if {{param|cap}} is an enabled capability and returns {{code|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 {{code|GL_DITHER}} are disabled; {{code|GL_DITHER}} is initially enabled.
  
The following capabilities are accepted for ''cap'':
+
The following capabilities are accepted for {{param|cap}}:
  
  
Line 30: Line 30:
 
|+
 
|+
 
| {{code|GL_BLEND}}
 
| {{code|GL_BLEND}}
| [[GLAPI/glBlendFunc|glBlendFunc]], [[GLAPI/glLogicOp|glLogicOp]]
+
| {{apifunc|glBlendFunc}}, {{apifunc|glLogicOp}}
 
|+
 
|+
 
| {{code|GL_CLIP_DISTANCE}}''i''
 
| {{code|GL_CLIP_DISTANCE}}''i''
| [[GLAPI/glEnable|glEnable]]
+
| {{apifunc|glEnable}}
 
|+
 
|+
 
| {{code|GL_COLOR_LOGIC_OP}}
 
| {{code|GL_COLOR_LOGIC_OP}}
| [[GLAPI/glLogicOp|glLogicOp]]
+
| {{apifunc|glLogicOp}}
 
|+
 
|+
 
| {{code|GL_CULL_FACE}}
 
| {{code|GL_CULL_FACE}}
| [[GLAPI/glCullFace|glCullFace]]
+
| {{apifunc|glCullFace}}
 
|+
 
|+
 
| {{code|GL_DEPTH_CLAMP}}
 
| {{code|GL_DEPTH_CLAMP}}
| [[GLAPI/glEnable|glEnable]]
+
| {{apifunc|glEnable}}
 
|+
 
|+
 
| {{code|GL_DEPTH_TEST}}
 
| {{code|GL_DEPTH_TEST}}
| [[GLAPI/glDepthFunc|glDepthFunc]], [[GLAPI/glDepthRange|glDepthRange]]
+
| {{apifunc|glDepthFunc}}, {{apifunc|glDepthRange}}
 
|+
 
|+
 
| {{code|GL_DITHER}}
 
| {{code|GL_DITHER}}
| [[GLAPI/glEnable|glEnable]]
+
| {{apifunc|glEnable}}
 
|+
 
|+
 
| {{code|GL_FRAMEBUFFER_SRGB}}
 
| {{code|GL_FRAMEBUFFER_SRGB}}
| [[GLAPI/glEnable|glEnable]]
+
| {{apifunc|glEnable}}
 
|+
 
|+
 
| {{code|GL_LINE_SMOOTH}}
 
| {{code|GL_LINE_SMOOTH}}
| [[GLAPI/glLineWidth|glLineWidth]]
+
| {{apifunc|glLineWidth}}
 
|+
 
|+
 
| {{code|GL_MULTISAMPLE}}
 
| {{code|GL_MULTISAMPLE}}
| [[GLAPI/glSampleCoverage|glSampleCoverage]]
+
| {{apifunc|glSampleCoverage}}
 
|+
 
|+
 
| {{code|GL_POLYGON_SMOOTH}}
 
| {{code|GL_POLYGON_SMOOTH}}
| [[GLAPI/glPolygonMode|glPolygonMode]]
+
| {{apifunc|glPolygonMode}}
 
|+
 
|+
 
| {{code|GL_POLYGON_OFFSET_FILL}}
 
| {{code|GL_POLYGON_OFFSET_FILL}}
| [[GLAPI/glPolygonOffset|glPolygonOffset]]
+
| {{apifunc|glPolygonOffset}}
 
|+
 
|+
 
| {{code|GL_POLYGON_OFFSET_LINE}}
 
| {{code|GL_POLYGON_OFFSET_LINE}}
| [[GLAPI/glPolygonOffset|glPolygonOffset]]
+
| {{apifunc|glPolygonOffset}}
 
|+
 
|+
 
| {{code|GL_POLYGON_OFFSET_POINT}}
 
| {{code|GL_POLYGON_OFFSET_POINT}}
| [[GLAPI/glPolygonOffset|glPolygonOffset]]
+
| {{apifunc|glPolygonOffset}}
 
|+
 
|+
 
| {{code|GL_PROGRAM_POINT_SIZE}}
 
| {{code|GL_PROGRAM_POINT_SIZE}}
| [[GLAPI/glEnable|glEnable]]
+
| {{apifunc|glEnable}}
 
|+
 
|+
 
| {{code|GL_PRIMITIVE_RESTART}}
 
| {{code|GL_PRIMITIVE_RESTART}}
| [[GLAPI/glEnable|glEnable]], [[GLAPI/glPrimitiveRestartIndex|glPrimitiveRestartIndex]]
+
| {{apifunc|glEnable}}, {{apifunc|glPrimitiveRestartIndex}}
 
|+
 
|+
 
| {{code|GL_SAMPLE_ALPHA_TO_COVERAGE}}
 
| {{code|GL_SAMPLE_ALPHA_TO_COVERAGE}}
| [[GLAPI/glSampleCoverage|glSampleCoverage]]
+
| {{apifunc|glSampleCoverage}}
 
|+
 
|+
 
| {{code|GL_SAMPLE_ALPHA_TO_ONE}}
 
| {{code|GL_SAMPLE_ALPHA_TO_ONE}}
| [[GLAPI/glSampleCoverage|glSampleCoverage]]
+
| {{apifunc|glSampleCoverage}}
 
|+
 
|+
 
| {{code|GL_SAMPLE_COVERAGE}}
 
| {{code|GL_SAMPLE_COVERAGE}}
| [[GLAPI/glSampleCoverage|glSampleCoverage]]
+
| {{apifunc|glSampleCoverage}}
 
|+
 
|+
 
| {{code|GL_SAMPLE_MASK}}
 
| {{code|GL_SAMPLE_MASK}}
| [[GLAPI/glEnable|glEnable]]
+
| {{apifunc|glEnable}}
 
|+
 
|+
 
| {{code|GL_SCISSOR_TEST}}
 
| {{code|GL_SCISSOR_TEST}}
| [[GLAPI/glScissor|glScissor]]
+
| {{apifunc|glScissor}}
 
|+
 
|+
 
| {{code|GL_STENCIL_TEST}}
 
| {{code|GL_STENCIL_TEST}}
| [[GLAPI/glStencilFunc|glStencilFunc]], [[GLAPI/glStencilOp|glStencilOp]]
+
| {{apifunc|glStencilFunc}}, {{apifunc|glStencilOp}}
 
|+
 
|+
 
| {{code|GL_TEXTURE_CUBEMAP_SEAMLESS}}
 
| {{code|GL_TEXTURE_CUBEMAP_SEAMLESS}}
| [[GLAPI/glEnable|glEnable]]
+
| {{apifunc|glEnable}}
 
|}
 
|}
  
Line 107: Line 107:
 
== Errors ==
 
== Errors ==
  
{{code|GL_INVALID_ENUM}} is generated if ''cap'' is not an accepted value.
+
{{code|GL_INVALID_ENUM}} is generated if {{param|cap}} is not an accepted value.
  
{{code|GL_INVALID_VALUE}} is generated by '''glIsEnabledi''' if ''index'' is outside the valid range for the indexed state ''cap''.
+
{{code|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 ==
  
[[GLAPI/glEnable|glEnable]], [[GLAPI/glDisable|glDisable]], [[GLAPI/glGet|glGet]]
+
{{apifunc|glEnable}}, {{apifunc|glDisable}}, {{apifunc|glGet}}
  
 
== Copyright ==
 
== Copyright ==

Revision as of 01:22, 29 April 2012

glIsEnabled, glIsEnabledi
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

glEnable, glDisable, glGet

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/.