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_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_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_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_MASKIf enabled, convert fragment alpha values to multisample coverage modification masks. See glSampleCoverage.
GL_SAMPLE_ALPHA_TO_ONEIf enabled, set fragment alpha to the maximum permissible value after computing multisample coverage modification masks. See glSampleCoverage.
GL_SAMPLE_MASKIf enabled, apply a mask to modify fragment coverage during multisampling. 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 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