1GLENABLE(3G)                    [FIXME: manual]                   GLENABLE(3G)
2
3
4

NAME

6       glEnable - enable or disable server-side GL capabilities
7

C SPECIFICATION

9       void glEnable(GLenum cap);
10
11       void glDisable(GLenum cap);
12
13       void glEnablei(GLenum cap, GLuint index);
14
15       void glDisablei(GLenum cap, GLuint index);
16

PARAMETERS

18       cap
19           Specifies a symbolic constant indicating a GL capability.
20
21       index
22           Specifies the index of the switch to disable (for glEnablei and
23           glDisablei only).
24

DESCRIPTION

26       glEnable and glDisable enable and disable various capabilities. Use
27       glIsEnabled() or glGet() to determine the current setting of any
28       capability. The initial value for each capability with the exception of
29       GL_DITHER and GL_MULTISAMPLE is GL_FALSE. The initial value for
30       GL_DITHER and GL_MULTISAMPLE is GL_TRUE.
31
32       Both glEnable and glDisable take a single argument, cap, which can
33       assume one of the following values:
34
35       Some of the GL's capabilities are indexed.  glEnablei and glDisablei
36       enable and disable indexed capabilities.
37
38       GL_BLEND
39
40           If enabled, blend the computed fragment color values with the
41           values in the color buffers. See glBlendFunc().
42
43       GL_CLIP_DISTANCEi
44
45           If enabled, clip geometry against user-defined half space i.
46
47       GL_COLOR_LOGIC_OP
48
49           If enabled, apply the currently selected logical operation to the
50           computed fragment color and color buffer values. See glLogicOp().
51
52       GL_CULL_FACE
53
54           If enabled, cull polygons based on their winding in window
55           coordinates. See glCullFace().
56
57       GL_DEBUG_OUTPUT
58
59           If enabled, debug messages are produced by a debug context. When
60           disabled, the debug message log is silenced. Note that in a
61           non-debug context, very few, if any messages might be produced,
62           even when GL_DEBUG_OUTPUT is enabled.
63
64       GL_DEBUG_OUTPUT_SYNCHRONOUS
65
66           If enabled, debug messages are produced synchronously by a debug
67           context. If disabled, debug messages may be produced
68           asynchronously. In particular, they may be delayed relative to the
69           execution of GL commands, and the debug callback function may be
70           called from a thread other than that in which the commands are
71           executed. See glDebugMessageCallback().
72
73       GL_DEPTH_CLAMP
74
75           If enabled, the
76
77           -wc≤zc≤wc plane equation is ignored by view volume clipping
78           (effectively, there is no near or far plane clipping). See
79           glDepthRange().
80
81       GL_DEPTH_TEST
82
83           If enabled, do depth comparisons and update the depth buffer. Note
84           that even if the depth buffer exists and the depth mask is
85           non-zero, the depth buffer is not updated if the depth test is
86           disabled. See glDepthFunc() and glDepthRange().
87
88       GL_DITHER
89
90           If enabled, dither color components or indices before they are
91           written to the color buffer.
92
93       GL_FRAMEBUFFER_SRGB
94
95           If enabled and the value of
96           GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING for the framebuffer
97           attachment corresponding to the destination buffer is GL_SRGB, the
98           R, G, and B destination color values (after conversion from
99           fixed-point to floating-point) are considered to be encoded for the
100           sRGB color space and hence are linearized prior to their use in
101           blending.
102
103       GL_LINE_SMOOTH
104
105           If enabled, draw lines with correct filtering. Otherwise, draw
106           aliased lines. See glLineWidth().
107
108       GL_MULTISAMPLE
109
110           If enabled, use multiple fragment samples in computing the final
111           color of a pixel. See glSampleCoverage().
112
113       GL_POLYGON_OFFSET_FILL
114
115           If enabled, and if the polygon is rendered in GL_FILL mode, an
116           offset is added to depth values of a polygon's fragments before the
117           depth comparison is performed. See glPolygonOffset().
118
119       GL_POLYGON_OFFSET_LINE
120
121           If enabled, and if the polygon is rendered in GL_LINE mode, an
122           offset is added to depth values of a polygon's fragments before the
123           depth comparison is performed. See glPolygonOffset().
124
125       GL_POLYGON_OFFSET_POINT
126
127           If enabled, an offset is added to depth values of a polygon's
128           fragments before the depth comparison is performed, if the polygon
129           is rendered in GL_POINT mode. See glPolygonOffset().
130
131       GL_POLYGON_SMOOTH
132
133           If enabled, draw polygons with proper filtering. Otherwise, draw
134           aliased polygons. For correct antialiased polygons, an alpha buffer
135           is needed and the polygons must be sorted front to back.
136
137       GL_PRIMITIVE_RESTART
138
139           Enables primitive restarting. If enabled, any one of the draw
140           commands which transfers a set of generic attribute array elements
141           to the GL will restart the primitive when the index of the vertex
142           is equal to the primitive restart index. See
143           glPrimitiveRestartIndex().
144
145       GL_PRIMITIVE_RESTART_FIXED_INDEX
146
147           Enables primitive restarting with a fixed index. If enabled, any
148           one of the draw commands which transfers a set of generic attribute
149           array elements to the GL will restart the primitive when the index
150           of the vertex is equal to the fixed primitive index for the
151           specified index type. The fixed index is equal to 2n−1 where n is
152           equal to 8 for GL_UNSIGNED_BYTE, 16 for GL_UNSIGNED_SHORT and 32
153           for GL_UNSIGNED_INT.
154
155       GL_RASTERIZER_DISCARD
156
157           If enabled, primitives are discarded after the optional transform
158           feedback stage, but before rasterization. Furthermore, when
159           enabled, glClear(), glClearBufferData(), glClearBufferSubData(),
160           glClearTexImage(), and glClearTexSubImage() are ignored.
161
162       GL_SAMPLE_ALPHA_TO_COVERAGE
163
164           If enabled, compute a temporary coverage value where each bit is
165           determined by the alpha value at the corresponding sample location.
166           The temporary coverage value is then ANDed with the fragment
167           coverage value.
168
169       GL_SAMPLE_ALPHA_TO_ONE
170
171           If enabled, each sample alpha value is replaced by the maximum
172           representable alpha value.
173
174       GL_SAMPLE_COVERAGE
175
176           If enabled, the fragment's coverage is ANDed with the temporary
177           coverage value. If GL_SAMPLE_COVERAGE_INVERT is set to GL_TRUE,
178           invert the coverage value. See glSampleCoverage().
179
180       GL_SAMPLE_SHADING
181
182           If enabled, the active fragment shader is run once for each covered
183           sample, or at fraction of this rate as determined by the current
184           value of GL_MIN_SAMPLE_SHADING_VALUE. See glMinSampleShading().
185
186       GL_SAMPLE_MASK
187
188           If enabled, the sample coverage mask generated for a fragment
189           during rasterization will be ANDed with the value of
190           GL_SAMPLE_MASK_VALUE before shading occurs. See glSampleMaski().
191
192       GL_SCISSOR_TEST
193
194           If enabled, discard fragments that are outside the scissor
195           rectangle. See glScissor().
196
197       GL_STENCIL_TEST
198
199           If enabled, do stencil testing and update the stencil buffer. See
200           glStencilFunc() and glStencilOp().
201
202       GL_TEXTURE_CUBE_MAP_SEAMLESS
203
204           If enabled, cubemap textures are sampled such that when linearly
205           sampling from the border between two adjacent faces, texels from
206           both faces are used to generate the final sample value. When
207           disabled, texels from only a single face are used to construct the
208           final sample value.
209
210       GL_PROGRAM_POINT_SIZE
211
212           If enabled and a vertex or geometry shader is active, then the
213           derived point size is taken from the (potentially clipped) shader
214           builtin gl_PointSize and clamped to the implementation-dependent
215           point size range.
216

ERRORS

218       GL_INVALID_ENUM is generated if cap is not one of the values listed
219       previously.
220
221       GL_INVALID_VALUE is generated by glEnablei and glDisablei if index is
222       greater than or equal to the number of indexed capabilities for cap.
223

NOTES

225       GL_PRIMITIVE_RESTART is available only if the GL version is 3.1 or
226       greater.
227
228       GL_TEXTURE_CUBE_MAP_SEAMLESS is available only if the GL version is 3.2
229       or greater.
230
231       GL_PRIMITIVE_RESTART_FIXED_INDEX is available only if the GL version is
232       4.3 or greater.
233
234       GL_DEBUG_OUTPUT and GL_DEBUG_OUTPUT_SYNCHRONOUS are available only if
235       the GL version is 4.3 or greater.
236
237       Any token accepted by glEnable or glDisable is also accepted by
238       glEnablei and glDisablei, but if the capability is not indexed, the
239       maximum value that index may take is zero.
240
241       In general, passing an indexed capability to glEnable or glDisable will
242       enable or disable that capability for all indices, resepectively.
243

ASSOCIATED GETS

245       glIsEnabled()
246
247       glGet()
248

VERSION SUPPORT

250       ┌───────────┬───────────────────────────────────────────────────────────────────────┐
251       │           │                OpenGL Version                                         
252       ├───────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
253Function   2.0 2.1 3.0 3.1 3.2 3.3 4.0 4.1 4.2 4.3 4.4 4.5 
254/          │     │     │     │     │     │     │     │     │     │     │     │     │
255Feature    │     │     │     │     │     │     │     │     │     │     │     │     │
256Name       │     │     │     │     │     │     │     │     │     │     │     │     │
257       ├───────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
258glDisable  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
259       ├───────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
260glDisablei │  -  │  -  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
261       ├───────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
262glEnable   │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
263       ├───────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
264glEnablei  │  -  │  -  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
265       └───────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
266

SEE ALSO

268       glActiveTexture(), glBlendFunc(), glCullFace(), glDepthFunc(),
269       glDepthRange(), glGet(), glIsEnabled(), glLineWidth(), glLogicOp(),
270       glPointSize(), glPolygonMode(), glPolygonOffset(), glSampleCoverage(),
271       glScissor(), glStencilFunc(), glStencilOp(), glTexImage1D(),
272       glTexImage2D(), glTexImage3D()
273
275       Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2011-2014
276       Khronos Group. This document is licensed under the SGI Free Software B
277       License. For details, see http://oss.sgi.com/projects/FreeB/.
278
280       Copyright © 1991-2006 Silicon Graphics, Inc.
281       Copyright © 2011-2014 Khronos Group
282
283
284
285[FIXME: source]                   03/06/2019                      GLENABLE(3G)
Impressum