glEnable - enable or disable server-side GL capabilities
void glEnable(GLenum cap);
void glDisable(GLenum cap);
void glEnablei(GLenum cap, GLuint index);
void glDisablei(GLenum cap, GLuint index);
glEnable and glDisable() enable and disable various capabilities. Use glIsEnabled() or glGet() to determine the current setting of any capability. The initial value for each capability with the exception of GL_DITHER and GL_MULTISAMPLE is GL_FALSE. The initial value for GL_DITHER and GL_MULTISAMPLE is GL_TRUE.
Both glEnable and glDisable() take a single argument, cap, which can assume one of the following values:
Some of the GL's capabilities are indicated. glEnablei and glDisablei enable and disable indexed capabilities.
If enabled, blend the computed fragment color values with the values in the color buffers. See glBlendFunc().
If enabled, clip geometry against user-defined half space i.
If enabled, apply the currently selected logical operation to the computed fragment color and color buffer values. See glLogicOp().
If enabled, cull polygons based on their winding in window coordinates. See glCullFace().
If enabled, the
-wc≤zc≤wc plane equation is ignored by view volume clipping (effectively, there is no near or far plane clipping). See glDepthRange().
If enabled, do depth comparisons and update the depth buffer. Note that even if the depth buffer exists and the depth mask is non-zero, the depth buffer is not updated if the depth test is disabled. See glDepthFunc() and glDepthRange().
If enabled, dither color components or indices before they are written to the color buffer.
If enabled, draw lines with correct filtering. Otherwise, draw aliased lines. See glLineWidth().
If enabled, use multiple fragment samples in computing the final color of a pixel. See glSampleCoverage().
If enabled, and if the polygon is rendered in GL_FILL mode, an offset is added to depth values of a polygon's fragments before the depth comparison is performed. See glPolygonOffset().
If enabled, and if the polygon is rendered in GL_LINE mode, an offset is added to depth values of a polygon's fragments before the depth comparison is performed. See glPolygonOffset().
If enabled, an offset is added to depth values of a polygon's fragments before the depth comparison is performed, if the polygon is rendered in GL_POINT mode. See glPolygonOffset().
If enabled, draw polygons with proper filtering. Otherwise, draw aliased polygons. For correct antialiased polygons, an alpha buffer is needed and the polygons must be sorted front to back.
Enables primitive restarting. If enabled, any one of the draw commands which transfers a set of generic attribute array elements to the GL will restart the primitive when the index of the vertex is equal to the primitive restart index. See glPrimitiveRestartIndex().
If enabled, compute a temporary coverage value where each bit is determined by the alpha value at the corresponding sample location. The temporary coverage value is then ANDed with the fragment coverage value.
If enabled, each sample alpha value is replaced by the maximum representable alpha value.
If enabled, the fragment's coverage is ANDed with the temporary coverage value. If GL_SAMPLE_COVERAGE_INVERT is set to GL_TRUE, invert the coverage value. See glSampleCoverage().
If enabled, discard fragments that are outside the scissor rectangle. See glScissor().
If enabled, do stencil testing and update the stencil buffer. See glStencilFunc() and glStencilOp().
If enabled, modifies the way sampling is performed on cube map textures. See the spec for more information.
If enabled and a vertex or geometry shader is active, then the derived point size is taken from the (potentially clipped) shader builtin gl_PointSize and clamped to the implementation-dependent point size range.
GL_INVALID_ENUM is generated if cap is not one of the values listed previously.
GL_INVALID_VALUE is generated by glEnablei and glDisablei if index is greater than or equal to the number of indexed capabilities for cap.
GL_PRIMITIVE_RESTART is available only if the GL version is 3.1 or greater.
GL_TEXTURE_CUBE_MAP_SEAMLESS is available only if the GL version is 3.2 or greater.
Any token accepted by glEnable or glDisable is also accepted by glEnablei and glDisablei, but if the capability is not indexed, the maximum value that index may take is zero.
In general, passing an indexed capability to glEnable or glDisable will enable or disable that capability for all indices, resepectively.
glActiveTexture(), glBlendFunc(), glCullFace(), glDepthFunc(), glDepthRange(), glGet(), glIsEnabled(), glLineWidth(), glLogicOp(), glPointSize(), glPolygonMode(), glPolygonOffset(), glSampleCoverage(), glScissor(), glStencilFunc(), glStencilOp(), glTexImage1D(), glTexImage2D(), glTexImage3D()
Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.