1GLENABLE(3G) OpenGL Manual GLENABLE(3G)
2
3
4
6 glEnable - enable or disable server-side GL capabilities
7
9 void glEnable(GLenum cap);
10
12 cap
13 Specifies a symbolic constant indicating a GL capability.
14
16 void glDisable(GLenum cap);
17
19 cap
20 Specifies a symbolic constant indicating a GL capability.
21
23 void glEnablei(GLenum cap, GLuint index);
24
26 cap
27 Specifies a symbolic constant indicating a GL capability.
28
29 index
30 Specifies the index of the swtich to enable.
31
33 void glDisablei(GLenum cap, GLuint index);
34
36 cap
37 Specifies a symbolic constant indicating a GL capability.
38
39 index
40 Specifies the index of the swtich to disable.
41
43 glEnable and glDisable() enable and disable various capabilities. Use
44 glIsEnabled() or glGet() to determine the current setting of any
45 capability. The initial value for each capability with the exception of
46 GL_DITHER and GL_MULTISAMPLE is GL_FALSE. The initial value for
47 GL_DITHER and GL_MULTISAMPLE is GL_TRUE.
48
49 Both glEnable and glDisable() take a single argument, cap, which can
50 assume one of the following values:
51
52 Some of the GL's capabilities are indexed. glEnablei and glDisablei
53 enable and disable indexed capabilities.
54
55 GL_BLEND
56
57 If enabled, blend the computed fragment color values with the
58 values in the color buffers. See glBlendFunc().
59
60 GL_CLIP_DISTANCEi
61
62 If enabled, clip geometry against user-defined half space i.
63
64 GL_COLOR_LOGIC_OP
65
66 If enabled, apply the currently selected logical operation to the
67 computed fragment color and color buffer values. See glLogicOp().
68
69 GL_CULL_FACE
70
71 If enabled, cull polygons based on their winding in window
72 coordinates. See glCullFace().
73
74 GL_DEBUG_OUTPUT
75
76 If enabled, debug messages are produced by a debug context. When
77 disabled, the debug message log is silenced. Note that in a
78 non-debug context, very few, if any messages might be produced,
79 even when GL_DEBUG_OUTPUT is enabled.
80
81 GL_DEBUG_OUTPUT_SYNCHRONOUS
82
83 If enabled, debug messages are produced synchronously by a debug
84 context. If disabled, debug messages may be produced
85 asynchronously. In particular, they may be delayed relative to the
86 execution of GL commands, and the debug callback function may be
87 called from a thread other than that in which the commands are
88 executed. See glDebugMessageCallback().
89
90 GL_DEPTH_CLAMP
91
92 If enabled, the -wc≤zc≤wc plane equation is ignored by view volume
93 clipping (effectively, there is no near or far plane clipping). See
94 glDepthRange().
95
96 GL_DEPTH_TEST
97
98 If enabled, do depth comparisons and update the depth buffer. Note
99 that even if the depth buffer exists and the depth mask is
100 non-zero, the depth buffer is not updated if the depth test is
101 disabled. See glDepthFunc() and glDepthRange().
102
103 GL_DITHER
104
105 If enabled, dither color components or indices before they are
106 written to the color buffer.
107
108 GL_FRAMEBUFFER_SRGB
109
110 If enabled and the value of
111 GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING for the framebuffer
112 attachment corresponding to the destination buffer is GL_SRGB, the
113 R, G, and B destination color values (after conversion from
114 fixed-point to floating-point) are considered to be encoded for the
115 sRGB color space and hence are linearized prior to their use in
116 blending.
117
118 GL_LINE_SMOOTH
119
120 If enabled, draw lines with correct filtering. Otherwise, draw
121 aliased lines. See glLineWidth().
122
123 GL_MULTISAMPLE
124
125 If enabled, use multiple fragment samples in computing the final
126 color of a pixel. See glSampleCoverage().
127
128 GL_POLYGON_OFFSET_FILL
129
130 If enabled, and if the polygon is rendered in GL_FILL mode, an
131 offset is added to depth values of a polygon's fragments before the
132 depth comparison is performed. See glPolygonOffset().
133
134 GL_POLYGON_OFFSET_LINE
135
136 If enabled, and if the polygon is rendered in GL_LINE mode, an
137 offset is added to depth values of a polygon's fragments before the
138 depth comparison is performed. See glPolygonOffset().
139
140 GL_POLYGON_OFFSET_POINT
141
142 If enabled, an offset is added to depth values of a polygon's
143 fragments before the depth comparison is performed, if the polygon
144 is rendered in GL_POINT mode. See glPolygonOffset().
145
146 GL_POLYGON_SMOOTH
147
148 If enabled, draw polygons with proper filtering. Otherwise, draw
149 aliased polygons. For correct antialiased polygons, an alpha buffer
150 is needed and the polygons must be sorted front to back.
151
152 GL_PRIMITIVE_RESTART
153
154 Enables primitive restarting. If enabled, any one of the draw
155 commands which transfers a set of generic attribute array elements
156 to the GL will restart the primitive when the index of the vertex
157 is equal to the primitive restart index. See
158 glPrimitiveRestartIndex().
159
160 GL_PRIMITIVE_RESTART_FIXED_INDEX
161
162 Enables primitive restarting with a fixed index. If enabled, any
163 one of the draw commands which transfers a set of generic attribute
164 array elements to the GL will restart the primitive when the index
165 of the vertex is equal to the fixed primitive index for the
166 specified index type. The fixed index is equal to 2n−1 where n is
167 equal to 8 for GL_UNSIGNED_BYTE, 16 for GL_UNSIGNED_SHORT and 32
168 for GL_UNSIGNED_INT.
169
170 GL_SAMPLE_ALPHA_TO_COVERAGE
171
172 If enabled, compute a temporary coverage value where each bit is
173 determined by the alpha value at the corresponding sample location.
174 The temporary coverage value is then ANDed with the fragment
175 coverage value.
176
177 GL_SAMPLE_ALPHA_TO_ONE
178
179 If enabled, each sample alpha value is replaced by the maximum
180 representable alpha value.
181
182 GL_SAMPLE_COVERAGE
183
184 If enabled, the fragment's coverage is ANDed with the temporary
185 coverage value. If GL_SAMPLE_COVERAGE_INVERT is set to GL_TRUE,
186 invert the coverage value. See glSampleCoverage().
187
188 GL_SAMPLE_SHADING
189
190 If enabled, the active fragment shader is run once for each covered
191 sample, or at fraction of this rate as determined by the current
192 value of GL_MIN_SAMPLE_SHADING_VALUE. See glMinSampleShading().
193
194 GL_SAMPLE_MASK
195
196 If enabled, the sample coverage mask generated for a fragment
197 during rasterization will be ANDed with the value of
198 GL_SAMPLE_MASK_VALUE before shading occurs. See glSampleMaski().
199
200 GL_SCISSOR_TEST
201
202 If enabled, discard fragments that are outside the scissor
203 rectangle. See glScissor().
204
205 GL_STENCIL_TEST
206
207 If enabled, do stencil testing and update the stencil buffer. See
208 glStencilFunc() and glStencilOp().
209
210 GL_TEXTURE_CUBE_MAP_SEAMLESS
211
212 If enabled, cubemap textures are sampled such that when linearly
213 sampling from the border between two adjacent faces, texels from
214 both faces are used to generate the final sample value. When
215 disabled, texels from only a single face are used to construct the
216 final sample value.
217
218 GL_PROGRAM_POINT_SIZE
219
220 If enabled and a vertex or geometry shader is active, then the
221 derived point size is taken from the (potentially clipped) shader
222 builtin gl_PointSize and clamped to the implementation-dependent
223 point size range.
224
226 GL_INVALID_ENUM is generated if cap is not one of the values listed
227 previously.
228
229 GL_INVALID_VALUE is generated by glEnablei and glDisablei if index is
230 greater than or equal to the number of indexed capabilities for cap.
231
233 GL_PRIMITIVE_RESTART is available only if the GL version is 3.1 or
234 greater.
235
236 GL_TEXTURE_CUBE_MAP_SEAMLESS is available only if the GL version is 3.2
237 or greater.
238
239 GL_PRIMITIVE_RESTART_FIXED_INDEX is available only if the GL version is
240 4.3 or greater.
241
242 GL_DEBUG_OUTPUT and GL_DEBUG_OUTPUT_SYNCHRONOUS are available only if
243 the GL version is 4.3 or greater.
244
245 Any token accepted by glEnable or glDisable is also accepted by
246 glEnablei and glDisablei, but if the capability is not indexed, the
247 maximum value that index may take is zero.
248
249 In general, passing an indexed capability to glEnable or glDisable will
250 enable or disable that capability for all indices, resepectively.
251
253 glIsEnabled()
254
255 glGet()
256
258 glActiveTexture(), glBlendFunc(), glCullFace(), glDepthFunc(),
259 glDepthRange(), glGet(), glIsEnabled(), glLineWidth(), glLogicOp(),
260 glPointSize(), glPolygonMode(), glPolygonOffset(), glSampleCoverage(),
261 glScissor(), glStencilFunc(), glStencilOp(), glTexImage1D(),
262 glTexImage2D(), glTexImage3D()
263
265 Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2011
266 Khronos Group. This document is licensed under the SGI Free Software B
267 License. For details, see http://oss.sgi.com/projects/FreeB/.
268
270 opengl.org
271
272
273
274opengl.org 06/10/2014 GLENABLE(3G)