glEnable(3G) OpenGL Reference glEnable(3G)
NAME
glEnable, glDisable - enable or disable server-side GL capabilities
C SPECIFICATION
void glEnable( GLenum cap )
PARAMETERS
cap Specifies a symbolic constant indicating a GL capability.
C SPECIFICATION
void glDisable( GLenum cap )
PARAMETERS
cap Specifies a symbolic constant indicating a GL capability.
DESCRIPTION
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 GLDITHER is
GLFALSE. The initial value for GLDITHER is GLTRUE.
Both glEnable and glDisable take a single argument, cap, which can assume
one of the following values:
GLALPHATEST If enabled, do alpha testing. See glAlphaFunc.
GLAUTONORMAL If enabled, generate normal vectors when either
GLMAP2VERTEX3 or GLMAP2VERTEX4 is used to
generate vertices. See glMap2.
GLBLEND If enabled, blend the incoming RGBA color values
with the values in the color buffers. See
glBlendFunc.
GLCALLIGRAPHICFRAGMENTSGIX
If enabled, send fragment information to the
calligraphic interface as fragments are written
to the color buffer(s).
GLCLIPPLANEi If enabled, clip geometry against user-defined
clipping plane i. See glClipPlane.
GLCOLORARRAYEXT If enabled, glArrayElementEXT and
glDrawArraysEXT will transfer colors from the
array supplied to glColorPointerEXT. See
glColorPointerEXT.
Page 1
glEnable(3G) OpenGL Reference glEnable(3G)
GLCOLORLOGICOP If enabled, apply the currently selected logical
operation to the incoming RGBA color and color
buffer values. See glLogicOp.
GLCOLORMATERIAL If enabled, have one or more material parameters
track the current color. See glColorMaterial.
GLCOLORTABLESGI If enabled, the colors produced by the pixel
transfer operation are mapped by a lookup table
before being used by convolution. See
glColorTableSGI.
GLCONVOLUTION1DEXT If enabled, perform one-dimensional convolution
during pixel transfers. See
glConvolutionFilter1DEXT.
GLCULLFACE If enabled, cull polygons based on their winding
in window coordinates. See glCullFace.
GLDEPTHTEST 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.
GLDITHER If enabled, dither color components or indices
before they are written to the color buffer.
GLEDGEFLAGARRAYEXT If enabled, glArrayElementEXT and
glDrawArraysEXT will transfer edge flags from
the array supplied to glEdgeFlagPointerEXT. See
glEdgeFlagPointerEXT.
GLFOG If enabled, blend a fog color into the
posttexturing color. See glFog.
GLFOGOFFSETSGIX If enabled, apply an offset to the Z value used
for computing fog. See glFog.
GLHISTOGRAMEXT If enabled, compute a histogram during pixel
transfers. See glHistogramEXT.
GLINDEXARRAYEXT If enabled, glArrayElementEXT and
glDrawArraysEXT will transfer color indices from
the array supplied to glIndexPointerEXT. See
glIndexPointerEXT.
GLINDEXLOGICOP If enabled, apply the currently selected logical
operation to the incoming index and color buffer
indices. See glLogicOp.
Page 2
glEnable(3G) OpenGL Reference glEnable(3G)
GLINTERLACESGIX If enabled, modifies the behavior of
glDrawPixels, glCopyPixels, glTexImage2D,
glTexSubImage2DEXT, glCopyTexImage2DEXT and
glCopyTexSubImage2DEXT, such that the source
image is considered to be a field of an
"interlaced" frame. That is, the effective
source image has height equal to twice the
original height, with rows $(0,2,4,...)$
corresponding to rows $(0,1,2,...)$ of original
source image, and rows $(1,3,5,...)$ made of
"transparent" pixels that do not affect the
corresponding destination pixels in the target
image. Thus, two successive operations can be
used to assemble a complete frame by interlacing
two fields. See the reference pages for the
above commands for more details.
GLIRINSTRUMENT1SGIX If enabled, allows the gathering of instrument
measurements that can be used to identify
graphics pipeline bottlenecks. See the reference
pages for glFlushRasterSGIX,
glGetInstrumentsSGIX, glInstrumentsBufferSGIX,
glPollInstrumentsSGIX, glReadInstrumentsSGIX,
glStartInstrumentsSGIX, and
glStopInstrumentsSGIX for more details.
GLLIGHTi If enabled, include light i in the evaluation of
the lighting equation. See glLightModel and
glLight.
GLLIGHTING If enabled, use the current lighting parameters
to compute the vertex color or index.
Otherwise, simply associate the current color or
index with each vertex. See glMaterial,
glLightModel, and glLight.
GLLINESMOOTH If enabled, draw lines with correct filtering.
Otherwise, draw aliased lines. See glLineWidth.
GLLINESTIPPLE If enabled, use the current line stipple pattern
when drawing lines. See glLineStipple.
GLMAP1COLOR4 If enabled, calls to glEvalCoord1, glEvalMesh1,
and glEvalPoint1 generate RGBA values. See
glMap1.
GLMAP1INDEX If enabled, calls to glEvalCoord1, glEvalMesh1,
and glEvalPoint1 generate color indices. See
glMap1.
Page 3
glEnable(3G) OpenGL Reference glEnable(3G)
GLMAP1NORMAL If enabled, calls to glEvalCoord1, glEvalMesh1,
and glEvalPoint1 generate normals. See glMap1.
GLMAP1TEXTURECOORD1 If enabled, calls to glEvalCoord1, glEvalMesh1,
and glEvalPoint1 generate s texture coordinates.
See glMap1.
GLMAP1TEXTURECOORD2 If enabled, calls to glEvalCoord1, glEvalMesh1,
and glEvalPoint1 generate s and t texture
coordinates. See glMap1.
GLMAP1TEXTURECOORD3 If enabled, calls to glEvalCoord1, glEvalMesh1,
and glEvalPoint1 generate s, t, and r texture
coordinates. See glMap1.
GLMAP1TEXTURECOORD4 If enabled, calls to glEvalCoord1, glEvalMesh1,
and glEvalPoint1 generate s, t, r, and q texture
coordinates. See glMap1.
GLMAP1VERTEX3 If enabled, calls to glEvalCoord1, glEvalMesh1,
and glEvalPoint1 generate x, y, and z vertex
coordinates. See glMap1.
GLMAP1VERTEX4 If enabled, calls to glEvalCoord1, glEvalMesh1,
and glEvalPoint1 generate homogeneous x, y, z,
and w vertex coordinates. See glMap1.
GLMAP2COLOR4 If enabled, calls to glEvalCoord2, glEvalMesh2,
and glEvalPoint2 generate RGBA values. See
glMap2.
GLMAP2INDEX If enabled, calls to glEvalCoord2, glEvalMesh2,
and glEvalPoint2 generate color indices. See
glMap2.
GLMAP2NORMAL If enabled, calls to glEvalCoord2, glEvalMesh2,
and glEvalPoint2 generate normals. See glMap2.
GLMAP2TEXTURECOORD1 If enabled, calls to glEvalCoord2, glEvalMesh2,
and glEvalPoint2 generate s texture coordinates.
See glMap2.
GLMAP2TEXTURECOORD2 If enabled, calls to glEvalCoord2, glEvalMesh2,
and glEvalPoint2 generate s and t texture
coordinates. See glMap2.
GLMAP2TEXTURECOORD3 If enabled, calls to glEvalCoord2, glEvalMesh2,
and glEvalPoint2 generate s, t, and r texture
coordinates. See glMap2.
Page 4
glEnable(3G) OpenGL Reference glEnable(3G)
GLMAP2TEXTURECOORD4 If enabled, calls to glEvalCoord2, glEvalMesh2,
and glEvalPoint2 generate s, t, r, and q texture
coordinates. See glMap2.
GLMAP2VERTEX3 If enabled, calls to glEvalCoord2, glEvalMesh2,
and glEvalPoint2 generate x, y, and z vertex
coordinates. See glMap2.
GLMAP2VERTEX4 If enabled, calls to glEvalCoord2, glEvalMesh2,
and glEvalPoint2 generate homogeneous x, y, z,
and w vertex coordinates. See glMap2.
GLMINMAXEXT If enabled, compute the minimum and maximum
values of each color component during pixel
transfers. See glMinmaxEXT.
GLMULTISAMPLESGIS If enabled, perform multisampling of fragments
for single-pass antialiasing and other effects.
See glSampleMaskSGIS and glSamplePatternSGIS.
GLNORMALARRAYEXT If enabled, glArrayElementEXT and
glDrawArraysEXT will transfer surface normals
from the array supplied to glNormalPointerEXT.
See glNormalPointerEXT.
GLNORMALIZE If enabled, normal vectors specified with
glNormal are scaled to unit length after
transformation. See glNormal.
GLPIXELTEXGENSGIX If enabled, pixels drawn with glDrawPixels and
glCopyPixels are individually texture-mapped at
texture coordinates derived from each pixel's
color components. See glPixelTexGenSGIX.
GLPOINTSMOOTH If enabled, draw points with proper filtering.
Otherwise, draw aliased points. See
glPointSize.
GLPOLYGONOFFSETFILL If enabled, and if the polygon is rendered in
GLFILL mode, an offset is added to depth values
of a polygon's fragments before the depth
comparison is performed. See glPolygonOffset.
GLPOLYGONOFFSETLINE If enabled, and if the polygon is rendered in
GLLINE mode, an offset is added to depth values
of a polygon's fragments before the depth
comparison is performed. See glPolygonOffset.
GLPOLYGONOFFSETPOINT 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 GLPOINT mode. See glPolygonOffset.
Page 5
glEnable(3G) OpenGL Reference glEnable(3G)
GLPOLYGONSMOOTH If enabled, draw polygons with proper filtering.
Otherwise, draw aliased polygons. For correct
anti-aliased polygons, an alpha buffer is needed
and the polygons must be sorted front to back.
GLPOLYGONSTIPPLE If enabled, use the current polygon stipple
pattern when rendering polygons. See
glPolygonStipple.
GLPOSTCOLORMATRIXCOLORTABLESGI
If enabled, the colors produced by the color
matrix operation are mapped by a lookup table
before being used by the histogram operation.
See glColorTableSGI.
GLPOSTCONVOLUTIONCOLORTABLESGI
If enabled, the colors produced by convolution
are mapped by a lookup table before being used
by the color matrix operation. See
glColorTableSGI.
GLREFERENCEPLANESGIX If enabled, depth values for pixel fragments are
computed from a reference plane rather than from
the primitive being drawn. See
glReferencePlaneSGIX.
GLSAMPLEALPHATOMASKSGIS
If enabled, convert fragment alpha values to
multisample coverage modification masks. See
glSampleMaskSGIS.
GLSAMPLEALPHATOONESGIS
If enabled, set fragment alpha to the maximum
permissible value after computing multisample
coverage modification masks. See
glSampleMaskSGIS.
GLSAMPLEMASKSGIS If enabled, apply a mask to modify fragment
coverage during multisampling. See
glSampleMaskSGIS.
GLSCISSORTEST If enabled, discard fragments that are outside
the scissor rectangle. See glScissor.
GLSEPARABLE2DEXT If enabled, perform separable two-dimensional
convolution during pixel transfers. See
glSeparableFilter2DEXT.
GLSPRITESGIX If enabled, rotate geometry to face the viewer.
See glSpriteParameterSGIX.
Page 6
glEnable(3G) OpenGL Reference glEnable(3G)
GLSTENCILTEST If enabled, do stencil testing and update the
stencil buffer. See glStencilFunc and
glStencilOp.
GLTEXTURE1D If enabled, one-dimensional texturing is
performed (unless two-dimensional texturing is
also enabled). See glTexImage1D.
GLTEXTURE2D If enabled, two-dimensional texturing is
performed. See glTexImage2D.
GLTEXTURE3DEXT If enabled, three-dimensional texturing is
performed. See glTexImage3DEXT.
GLTEXTURECOLORTABLESGI
If enabled, the colors produced by texturing are
mapped by a lookup table before being used to
generate pixel fragments. See glColorTableSGI.
GLTEXTURECOORDARRAYEXT
If enabled, glArrayElementEXT and
glDrawArraysEXT will transfer texture
coordinates from the array supplied to
glTexCoordPointerEXT. See glTexCoordPointerEXT.
GLTEXTUREGENQ If enabled, the q texture coordinate is computed
using the texture generation function defined
with glTexGen. Otherwise, the current q texture
coordinate is used. See glTexGen.
GLTEXTUREGENR If enabled, the r texture coordinate is computed
using the texture generation function defined
with glTexGen. Otherwise, the current r texture
coordinate is used. See glTexGen.
GLTEXTUREGENS If enabled, the s texture coordinate is computed
using the texture generation function defined
with glTexGen. Otherwise, the current s texture
coordinate is used. See glTexGen.
GLTEXTUREGENT If enabled, the t texture coordinate is computed
using the texture generation function defined
with glTexGen. Otherwise, the current t texture
coordinate is used. See glTexGen.
GLVERTEXARRAYEXT If enabled, glArrayElementEXT and
glDrawArraysEXT will transfer vertex coordinates
from the array supplied to glVertexPointerEXT.
See glVertexPointerEXT.
Page 7
glEnable(3G) OpenGL Reference glEnable(3G)
NOTES
GLPOLYGONOFFSETFILL, GLPOLYGONOFFSETLINE, GLPOLYGONOFFSETPOINT,
GLCOLORLOGICOP, and GLINDEXLOGICOP are only available if the GL
version is 1.1 or greater.
ERRORS
GLINVALIDENUM is generated if cap is not one of the values listed
previously.
GLINVALIDOPERATION is generated if glEnable or glDisable is executed
between the execution of glBegin and the corresponding execution of
glEnd.
MACHINE DEPENDENCIES
GLCOLORTABLESGI, GLPOSTCOLORMATRIXCOLORTABLESGI and
GLPOSTCONVOLUTIONCOLORTABLESGI are part of the SGIcolortable
extension which is not supported on RealityEngine, RealityEngine2, and
VTX systems.
The SGIXinterlace extension is supported only on InfiniteReality
systems, on RealityEngine, RealityEngine2, and VTX systems, and on O2
systems.
On RealityEngine, RealityEngine2, and VTX systems, do not enable or
disable GLVERTEXARRAY, GLVERTEXARRAYEXT, GLNORMALARRAY,
GLNORMALARRAYEXT, GLCOLORARRAY, GLCOLORARRAYEXT,
GLINDEXARRAY,GLINDEXARRAYEXT, GLTEXTURECOORDARRAY,
GLTEXTURECOORDARRAYEXT, GLEDGEFLAGARRAY or GLEDGEFLAGARRAYEXT
between a call to glNewList and the corresponding call to glEndList.
Instead, enable or disable before the call to glNewList.
SEE ALSO
glAlphaFunc, glBlendFunc, glClipPlane, glColorMaterial,
glConvolutionFilter1DEXT, glConvolutionFilter2DEXT, glCullFace,
glDepthFunc, glDepthRange, glEnableClientState, glFog, glGet,
glHistogramEXT, glIsEnabled, glLight, glLightModel, glLineWidth,
glLineStipple, glLogicOp, glMap1, glMap2, glMaterial, glMinmaxEXT,
glNormal, glPointSize, glPolygonMode, glPolygonOffset, glPolygonStipple,
glReferencePlaneSGIX, glScissor, glSeparableFilter2DEXT, glStencilFunc,
glStencilOp, glTexGen, glTexImage1D, glTexImage2D, glTexImage3DEXT
Page 8