glEnable , glDisable - enable or disable server-side GL capabilities
void glEnable(GLenum cap) void glDisable(GLenum cap)
capSpecifies a symbolic constant indicating a GL capability.
glEnable and glDisable enable and disable various capabilities. 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:
GL_ALPHA_TESTIf enabled, do alpha testing. See glAlphaFunc.
GL_BLENDIf enabled, blend the incoming color values with the values in the color buffers. See glBlendFunc.
GL_CLIP_PLANEiIf enabled, clipping plane i is enabled. See glClipPlane.
GL_COLOR_LOGIC_OPIf enabled, apply the currently selected logical operation to the incoming color and color buffer values. See glLogicOp.
GL_COLOR_MATERIALIf enabled, have ambient and diffuse material parameters track the current color.
GL_CULL_FACEIf enabled, cull polygons based on their winding in window coordinates. See glCullFace.
GL_DEPTH_TESTIf 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, glDepthMask, and glDepthRange.
GL_DITHERIf enabled, dither color components or indices before they are written to the color buffer.
GL_FOGIf enabled, blend a fog color into the posttexturing color. See glFog.
GL_LIGHTiIf enabled, include light i in the evaluation of the lighting equation. See glLightModel and glLight.
GL_LIGHTINGIf enabled, use the current lighting parameters to compute the vertex color. Otherwise, simply associate the current color with each vertex. See glMaterial, glLightModel, and glLight.
GL_LINE_SMOOTHIf enabled, draw lines with correct filtering. Otherwise, draw aliased lines. See glLineWidth.
GL_MATRIX_PALETTE_OESIf enabled, the matrix palette extension is enabled. See glMatrixMode.
GL_MULTISAMPLEIf enabled, perform multisampling of fragments for single-pass antialiasing and other effects. See glSampleCoverage.
GL_NORMALIZEIf enabled, normal vectors are scaled to unit length after transformation. See glNormal and glNormalPointer.
GL_POINT_SMOOTHIf enabled, draw points with proper filtering. Otherwise, draw aliased points. See glPointSize.
GL_POINT_SPRITE_OESIf enabled, point sprites are enabled. See glPointSize and glTexEnv
GL_POLYGON_OFFSET_FILLIf enabled, an offset is added to depth values of a polygon's fragments before the depth comparison is performed. See glPolygonOffset.
GL_RESCALE_NORMALIf enabled, normal vectors are scaled by a factor derived from the modelview matrix. See glNormal and glNormalPointer.
GL_SAMPLE_ALPHA_TO_COVERAGEIf enabled, a temporary coverage value is generated 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. Otherwise the fragment coverage value is unchanged at this point. See glSampleCoverage.
GL_SAMPLE_ALPHA_TO_ONEIf enabled, each fragment alpha value is replaced by the maximum representable alpha value. Otherwise, the alpha values are not changed. See glSampleCoverage.
GL_SAMPLE_COVERAGEIf enabled, the fragment coverage is ANDed with another temporary coverage. This temporary coverage is generated in the same manner as for GL_SAMPLE_ALPHA_TO_COVERAGE described above, but as a function of the value of GL_SAMPLE_COVERAGE_VALUE. If GL_SAMPLE_COVERAGE_INVERT is GL_TRUE, the temporary coverage is inverted (all bit values are inverted) before it is ANDed with the fragment coverage. See glSampleCoverage.
GL_SCISSOR_TESTIf enabled, discard fragments that are outside the scissor rectangle. See glScissor.
GL_STENCIL_TESTIf enabled, do stencil testing and update the stencil buffer. See glStencilFunc, glStencilMask, and glStencilOp.
GL_TEXTURE_2DIf enabled, two-dimensional texturing is performed for the active texture unit. See glActiveTexture, glTexImage2D, glCompressedTexImage2D, and glCopyTexImage2D.
GL_INVALID_ENUM is generated if cap is not one of the values listed previously.
Copyright © 2003-2004 Silicon Graphics, Inc.
This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.
glActiveTexture, glAlphaFunc, glBlendFunc, glCompressedTexImage2D, glCopyTexImage2D, glCullFace, glDepthFunc, glDepthRange, glEnableClientState, glFog, glLight, glLightModel, glLineWidth, glLogicOp, glMaterial, glNormal, glPointSize, glPolygonOffset, glSampleCoverage, glScissor, glStencilFunc, glStencilOp, glTexImage2D