Commit | Line | Data |
---|---|---|
7faf1d71 AW |
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"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>1991-2006</year> | |
9 | <holder>Silicon Graphics, Inc.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glIsEnabled</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glIsEnabled, glIsEnabledi</refname> | |
17 | <refpurpose>test whether a capability is enabled</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>GLboolean <function>glIsEnabled</function></funcdef> | |
23 | <paramdef>GLenum <parameter>cap</parameter></paramdef> | |
24 | </funcprototype> | |
25 | </funcsynopsis> | |
26 | <funcsynopsis> | |
27 | <funcprototype> | |
28 | <funcdef>GLboolean <function>glIsEnabledi</function></funcdef> | |
29 | <paramdef>GLenum <parameter>cap</parameter></paramdef> | |
30 | <paramdef>GLuint <parameter>index</parameter></paramdef> | |
31 | </funcprototype> | |
32 | </funcsynopsis> | |
33 | </refsynopsisdiv> | |
34 | <refsect1 id="parameters"><title>Parameters</title> | |
35 | <variablelist> | |
36 | <varlistentry> | |
37 | <term><parameter>cap</parameter></term> | |
38 | <listitem> | |
39 | <para> | |
40 | Specifies a symbolic constant indicating a GL capability. | |
41 | </para> | |
42 | </listitem> | |
43 | </varlistentry> | |
44 | <varlistentry> | |
45 | <term><parameter>index</parameter></term> | |
46 | <listitem> | |
47 | <para> | |
48 | Specifies the index of the capability. | |
49 | </para> | |
50 | </listitem> | |
51 | </varlistentry> | |
52 | </variablelist> | |
53 | </refsect1> | |
54 | <refsect1 id="description"><title>Description</title> | |
55 | <para> | |
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. | |
62 | </para> | |
63 | <para> | |
64 | The following capabilities are accepted for <parameter>cap</parameter>: | |
65 | </para> | |
66 | <para> | |
67 | </para> | |
68 | <informaltable frame="topbot"> | |
69 | <tgroup cols="2" align="left"> | |
70 | <colspec/> | |
71 | <colspec/> | |
72 | <thead> | |
73 | <row> | |
74 | <entry rowsep="1" align="left"><emphasis role="bold"> | |
75 | Constant | |
76 | </emphasis></entry> | |
77 | <entry rowsep="1" align="left"><emphasis role="bold"> | |
78 | See | |
79 | </emphasis></entry> | |
80 | </row> | |
81 | </thead> | |
82 | <tbody> | |
83 | <row> | |
84 | <entry align="left"> | |
85 | <constant>GL_BLEND</constant> | |
86 | </entry> | |
87 | <entry align="left"> | |
88 | <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry> | |
89 | </entry> | |
90 | </row> | |
91 | <row> | |
92 | <entry align="left"> | |
93 | <constant>GL_CLIP_DISTANCE</constant><emphasis>i</emphasis> | |
94 | </entry> | |
95 | <entry align="left"> | |
96 | <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> | |
97 | </entry> | |
98 | </row> | |
99 | <row> | |
100 | <entry align="left"> | |
101 | <constant>GL_COLOR_LOGIC_OP</constant> | |
102 | </entry> | |
103 | <entry align="left"> | |
104 | <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry> | |
105 | </entry> | |
106 | </row> | |
107 | <row> | |
108 | <entry align="left"> | |
109 | <constant>GL_CULL_FACE</constant> | |
110 | </entry> | |
111 | <entry align="left"> | |
112 | <citerefentry><refentrytitle>glCullFace</refentrytitle></citerefentry> | |
113 | </entry> | |
114 | </row> | |
115 | <row> | |
116 | <entry align="left"> | |
117 | <constant>GL_DEPTH_CLAMP</constant> | |
118 | </entry> | |
119 | <entry align="left"> | |
120 | <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> | |
121 | </entry> | |
122 | </row> | |
123 | <row> | |
124 | <entry align="left"> | |
125 | <constant>GL_DEBUG_OUTPUT</constant> | |
126 | </entry> | |
127 | <entry align="left"> | |
128 | <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> | |
129 | </entry> | |
130 | </row> | |
131 | <row> | |
132 | <entry align="left"> | |
133 | <constant>GL_DEBUG_OUTPUT_SYNCHRONOUS</constant> | |
134 | </entry> | |
135 | <entry align="left"> | |
136 | <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> | |
137 | </entry> | |
138 | </row> | |
139 | <row> | |
140 | <entry align="left"> | |
141 | <constant>GL_DEPTH_TEST</constant> | |
142 | </entry> | |
143 | <entry align="left"> | |
144 | <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glDepthRange</refentrytitle></citerefentry> | |
145 | </entry> | |
146 | </row> | |
147 | <row> | |
148 | <entry align="left"> | |
149 | <constant>GL_DITHER</constant> | |
150 | </entry> | |
151 | <entry align="left"> | |
152 | <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> | |
153 | </entry> | |
154 | </row> | |
155 | <row> | |
156 | <entry align="left"> | |
157 | <constant>GL_FRAMEBUFFER_SRGB</constant> | |
158 | </entry> | |
159 | <entry align="left"> | |
160 | <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> | |
161 | </entry> | |
162 | </row> | |
163 | <row> | |
164 | <entry align="left"> | |
165 | <constant>GL_LINE_SMOOTH</constant> | |
166 | </entry> | |
167 | <entry align="left"> | |
168 | <citerefentry><refentrytitle>glLineWidth</refentrytitle></citerefentry> | |
169 | </entry> | |
170 | </row> | |
171 | <row> | |
172 | <entry align="left"> | |
173 | <constant>GL_MULTISAMPLE</constant> | |
174 | </entry> | |
175 | <entry align="left"> | |
176 | <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry> | |
177 | </entry> | |
178 | </row> | |
179 | <row> | |
180 | <entry align="left"> | |
181 | <constant>GL_POLYGON_SMOOTH</constant> | |
182 | </entry> | |
183 | <entry align="left"> | |
184 | <citerefentry><refentrytitle>glPolygonMode</refentrytitle></citerefentry> | |
185 | </entry> | |
186 | </row> | |
187 | <row> | |
188 | <entry align="left"> | |
189 | <constant>GL_POLYGON_OFFSET_FILL</constant> | |
190 | </entry> | |
191 | <entry align="left"> | |
192 | <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry> | |
193 | </entry> | |
194 | </row> | |
195 | <row> | |
196 | <entry align="left"> | |
197 | <constant>GL_POLYGON_OFFSET_LINE</constant> | |
198 | </entry> | |
199 | <entry align="left"> | |
200 | <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry> | |
201 | </entry> | |
202 | </row> | |
203 | <row> | |
204 | <entry align="left"> | |
205 | <constant>GL_POLYGON_OFFSET_POINT</constant> | |
206 | </entry> | |
207 | <entry align="left"> | |
208 | <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry> | |
209 | </entry> | |
210 | </row> | |
211 | <row> | |
212 | <entry align="left"> | |
213 | <constant>GL_PROGRAM_POINT_SIZE</constant> | |
214 | </entry> | |
215 | <entry align="left"> | |
216 | <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> | |
217 | </entry> | |
218 | </row> | |
219 | <row> | |
220 | <entry align="left"> | |
221 | <constant>GL_PRIMITIVE_RESTART</constant> | |
222 | </entry> | |
223 | <entry align="left"> | |
224 | <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glPrimitiveRestartIndex</refentrytitle></citerefentry> | |
225 | </entry> | |
226 | </row> | |
227 | <row> | |
228 | <entry align="left"> | |
229 | <constant>GL_SAMPLE_ALPHA_TO_COVERAGE</constant> | |
230 | </entry> | |
231 | <entry align="left"> | |
232 | <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry> | |
233 | </entry> | |
234 | </row> | |
235 | <row> | |
236 | <entry align="left"> | |
237 | <constant>GL_SAMPLE_ALPHA_TO_ONE</constant> | |
238 | </entry> | |
239 | <entry align="left"> | |
240 | <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry> | |
241 | </entry> | |
242 | </row> | |
243 | <row> | |
244 | <entry align="left"> | |
245 | <constant>GL_SAMPLE_COVERAGE</constant> | |
246 | </entry> | |
247 | <entry align="left"> | |
248 | <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry> | |
249 | </entry> | |
250 | </row> | |
251 | <row> | |
252 | <entry align="left"> | |
253 | <constant>GL_SAMPLE_MASK</constant> | |
254 | </entry> | |
255 | <entry align="left"> | |
256 | <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> | |
257 | </entry> | |
258 | </row> | |
259 | <row> | |
260 | <entry align="left"> | |
261 | <constant>GL_SCISSOR_TEST</constant> | |
262 | </entry> | |
263 | <entry align="left"> | |
264 | <citerefentry><refentrytitle>glScissor</refentrytitle></citerefentry> | |
265 | </entry> | |
266 | </row> | |
267 | <row> | |
268 | <entry align="left"> | |
269 | <constant>GL_STENCIL_TEST</constant> | |
270 | </entry> | |
271 | <entry align="left"> | |
272 | <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry> | |
273 | </entry> | |
274 | </row> | |
275 | <row> | |
276 | <entry align="left"> | |
277 | <constant>GL_TEXTURE_CUBEMAP_SEAMLESS</constant> | |
278 | </entry> | |
279 | <entry align="left"> | |
280 | <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> | |
281 | </entry> | |
282 | </row> | |
283 | </tbody> | |
284 | </tgroup> | |
285 | </informaltable> | |
286 | <para> | |
287 | </para> | |
288 | </refsect1> | |
289 | <refsect1 id="notes"><title>Notes</title> | |
290 | <para> | |
291 | If an error is generated, | |
292 | <function>glIsEnabled</function> and <function>glIsEnabledi</function> return <constant>GL_FALSE</constant>. | |
293 | </para> | |
294 | <para> | |
295 | <constant>GL_DEBUG_OUTPUT</constant> and <constant>GL_DEBUG_OUTPUT_SYNCHRONOUS</constant> are available only if the GL version is 4.3 or greater. | |
296 | </para> | |
297 | </refsect1> | |
298 | <refsect1 id="errors"><title>Errors</title> | |
299 | <para> | |
300 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>cap</parameter> is not an accepted value. | |
301 | </para> | |
302 | <para> | |
303 | <constant>GL_INVALID_VALUE</constant> is generated by <function>glIsEnabledi</function> if <parameter>index</parameter> is outside the | |
304 | valid range for the indexed state <parameter>cap</parameter>. | |
305 | </para> | |
306 | </refsect1> | |
307 | <refsect1 id="seealso"><title>See Also</title> | |
308 | <para> | |
309 | <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>, | |
310 | <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry>, | |
311 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> | |
312 | </para> | |
313 | </refsect1> | |
314 | <refsect1 id="Copyright"><title>Copyright</title> | |
315 | <para> | |
316 | Copyright <trademark class="copyright"></trademark> 1991-2006 | |
317 | Silicon Graphics, Inc. Copyright <trademark class="copyright"></trademark> 2010-2011 | |
318 | Khronos Group. This document is licensed under the SGI | |
319 | Free Software B License. For details, see | |
320 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. | |
321 | </para> | |
322 | </refsect1> | |
323 | </refentry> |