1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id=
"glIsEnabled">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>glIsEnabled
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glIsEnabled, glIsEnabledi
</refname>
17 <refpurpose>test whether a capability is enabled
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>GLboolean
<function>glIsEnabled
</function></funcdef>
23 <paramdef>GLenum
<parameter>cap
</parameter></paramdef>
28 <funcdef>GLboolean
<function>glIsEnabledi
</function></funcdef>
29 <paramdef>GLenum
<parameter>cap
</parameter></paramdef>
30 <paramdef>GLuint
<parameter>index
</parameter></paramdef>
34 <refsect1 id=
"parameters"><title>Parameters
</title>
37 <term><parameter>cap
</parameter></term>
40 Specifies a symbolic constant indicating a GL capability.
45 <term><parameter>index
</parameter></term>
48 Specifies the index of the capability.
54 <refsect1 id=
"description"><title>Description
</title>
56 <function>glIsEnabled
</function> returns
<constant>GL_TRUE
</constant> if
<parameter>cap
</parameter> is an enabled capability
57 and returns
<constant>GL_FALSE
</constant> otherwise. Boolean states that are indexed may be tested with
<function>glIsEnabledi
</function>.
58 For
<function>glIsEnabledi
</function>,
<parameter>index
</parameter> specifies the index of the capability to test.
<parameter>index
</parameter>
59 must be between zero and the count of indexed capabilities for
<parameter>cap
</parameter>.
60 Initially all capabilities except
<constant>GL_DITHER
</constant> are disabled;
61 <constant>GL_DITHER
</constant> is initially enabled.
64 The following capabilities are accepted for
<parameter>cap
</parameter>:
68 <informaltable frame=
"topbot">
69 <tgroup cols=
"2" align=
"left">
74 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
77 <entry rowsep=
"1" align=
"left"><emphasis role=
"bold">
85 <constant>GL_BLEND
</constant>
88 <citerefentry><refentrytitle>glBlendFunc
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glLogicOp
</refentrytitle></citerefentry>
93 <constant>GL_CLIP_DISTANCE
</constant><emphasis>i
</emphasis>
96 <citerefentry><refentrytitle>glEnable
</refentrytitle></citerefentry>
101 <constant>GL_COLOR_LOGIC_OP
</constant>
104 <citerefentry><refentrytitle>glLogicOp
</refentrytitle></citerefentry>
109 <constant>GL_CULL_FACE
</constant>
112 <citerefentry><refentrytitle>glCullFace
</refentrytitle></citerefentry>
117 <constant>GL_DEPTH_CLAMP
</constant>
120 <citerefentry><refentrytitle>glEnable
</refentrytitle></citerefentry>
125 <constant>GL_DEPTH_TEST
</constant>
128 <citerefentry><refentrytitle>glDepthFunc
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glDepthRange
</refentrytitle></citerefentry>
133 <constant>GL_DITHER
</constant>
136 <citerefentry><refentrytitle>glEnable
</refentrytitle></citerefentry>
141 <constant>GL_FRAMEBUFFER_SRGB
</constant>
144 <citerefentry><refentrytitle>glEnable
</refentrytitle></citerefentry>
149 <constant>GL_LINE_SMOOTH
</constant>
152 <citerefentry><refentrytitle>glLineWidth
</refentrytitle></citerefentry>
157 <constant>GL_MULTISAMPLE
</constant>
160 <citerefentry><refentrytitle>glSampleCoverage
</refentrytitle></citerefentry>
165 <constant>GL_POLYGON_SMOOTH
</constant>
168 <citerefentry><refentrytitle>glPolygonMode
</refentrytitle></citerefentry>
173 <constant>GL_POLYGON_OFFSET_FILL
</constant>
176 <citerefentry><refentrytitle>glPolygonOffset
</refentrytitle></citerefentry>
181 <constant>GL_POLYGON_OFFSET_LINE
</constant>
184 <citerefentry><refentrytitle>glPolygonOffset
</refentrytitle></citerefentry>
189 <constant>GL_POLYGON_OFFSET_POINT
</constant>
192 <citerefentry><refentrytitle>glPolygonOffset
</refentrytitle></citerefentry>
197 <constant>GL_PROGRAM_POINT_SIZE
</constant>
200 <citerefentry><refentrytitle>glEnable
</refentrytitle></citerefentry>
205 <constant>GL_PRIMITIVE_RESTART
</constant>
208 <citerefentry><refentrytitle>glEnable
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glPrimitiveRestartIndex
</refentrytitle></citerefentry>
213 <constant>GL_SAMPLE_ALPHA_TO_COVERAGE
</constant>
216 <citerefentry><refentrytitle>glSampleCoverage
</refentrytitle></citerefentry>
221 <constant>GL_SAMPLE_ALPHA_TO_ONE
</constant>
224 <citerefentry><refentrytitle>glSampleCoverage
</refentrytitle></citerefentry>
229 <constant>GL_SAMPLE_COVERAGE
</constant>
232 <citerefentry><refentrytitle>glSampleCoverage
</refentrytitle></citerefentry>
237 <constant>GL_SAMPLE_MASK
</constant>
240 <citerefentry><refentrytitle>glEnable
</refentrytitle></citerefentry>
245 <constant>GL_SCISSOR_TEST
</constant>
248 <citerefentry><refentrytitle>glScissor
</refentrytitle></citerefentry>
253 <constant>GL_STENCIL_TEST
</constant>
256 <citerefentry><refentrytitle>glStencilFunc
</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glStencilOp
</refentrytitle></citerefentry>
261 <constant>GL_TEXTURE_CUBE_MAP_SEAMLESS
</constant>
264 <citerefentry><refentrytitle>glEnable
</refentrytitle></citerefentry>
273 <refsect1 id=
"notes"><title>Notes
</title>
275 If an error is generated,
276 <function>glIsEnabled
</function> and
<function>glIsEnabledi
</function> return
<constant>GL_FALSE
</constant>.
279 <refsect1 id=
"errors"><title>Errors
</title>
281 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>cap
</parameter> is not an accepted value.
284 <constant>GL_INVALID_VALUE
</constant> is generated by
<function>glIsEnabledi
</function> if
<parameter>index
</parameter> is outside the
285 valid range for the indexed state
<parameter>cap
</parameter>.
288 <refsect1 id=
"seealso"><title>See Also
</title>
290 <citerefentry><refentrytitle>glEnable
</refentrytitle></citerefentry>,
291 <citerefentry><refentrytitle>glDisable
</refentrytitle></citerefentry>,
292 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry>
295 <refsect1 id=
"Copyright"><title>Copyright
</title>
297 Copyright
<trademark class=
"copyright"></trademark> 1991-
2006
298 Silicon Graphics, Inc. Copyright
<trademark class=
"copyright"></trademark> 2010-
2011
299 Khronos Group. This document is licensed under the SGI
300 Free Software B License. For details, see
301 <ulink url=
"http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/
</ulink>.