---
name: "glEnable"
section: "3x"
platform: "linux"
package: "xlibmesa-gl-dev"
version: "4.3.0.dfsg.1-14sarge7"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/glEnable"
---

# glEnable(3x)

enable or disable server-side GL capabilities

## 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 **GL\_DITHER** is **GL\_FALSE**. The initial value for **GL\_DITHER** is **GL\_TRUE**.

Both **glEnable** and **glDisable** take a single argument, *cap*, which can assume one of the following values:

- **GL\_ALPHA\_TEST**

  If enabled, do alpha testing. See **glAlphaFunc**.

- **GL\_AUTO\_NORMAL**

  If enabled, generate normal vectors when either **GL\_MAP2\_VERTEX\_3** or **GL\_MAP2\_VERTEX\_4** is used to generate vertices.  See **glMap2**.

- **GL\_BLEND**

  If enabled, blend the incoming RGBA color values with the values in the color buffers. See **glBlendFunc**.

- **GL\_CLIP\_PLANE***i*

  If enabled, clip geometry against user-defined clipping plane *i*. See **glClipPlane**.

- **GL\_COLOR\_LOGIC\_OP**

  If enabled, apply the currently selected logical operation to the incoming RGBA color and color buffer values. See **glLogicOp**.

- **GL\_COLOR\_MATERIAL**

  If enabled, have one or more material parameters track the current color. See **glColorMaterial**.

- **GL\_COLOR\_TABLE**

  If enabled, preform a color table lookup on the incoming RGBA color values. See **glColorTable**.

- **GL\_CONVOLUTION\_1D**

  If enabled, perform a 1D convolution operation on incoming RGBA color values. See **glConvolutionFilter1D**.

- **GL\_CONVOLUTION\_2D**

  If enabled, perform a 2D convolution operation on incoming RGBA color values. See **glConvolutionFilter2D**.

- **GL\_CULL\_FACE**

  If enabled, cull polygons based on their winding in window coordinates.  See **glCullFace**.

- **GL\_DEPTH\_TEST**

  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**.

- **GL\_DITHER**

  If enabled, dither color components or indices before they are written to the color buffer.

- **GL\_FOG**

  If enabled, blend a fog color into the posttexturing color. See **glFog**.

- **GL\_HISTOGRAM**

  If enabled, histogram incoming RGBA color values. See **glHistogram**.

- **GL\_INDEX\_LOGIC\_OP**

  If enabled, apply the currently selected logical operation to the incoming index and color buffer indices. See \
   **glLogicOp**.

- **GL\_LIGHT***i*

  If enabled, include light *i* in the evaluation of the lighting equation. See **glLightModel** and **glLight**.

- **GL\_LIGHTING**

  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**.

- **GL\_LINE\_SMOOTH**

  If enabled, draw lines with correct filtering. Otherwise, draw aliased lines. See **glLineWidth**.

- **GL\_LINE\_STIPPLE**

  If enabled, use the current line stipple pattern when drawing lines. See **glLineStipple**.

- **GL\_MAP1\_COLOR\_4**

  If enabled, calls to **glEvalCoord1**, **glEvalMesh1**, and **glEvalPoint1** generate RGBA values. See **glMap1**.

- **GL\_MAP1\_INDEX**

  If enabled, calls to **glEvalCoord1**, **glEvalMesh1**, and **glEvalPoint1** generate color indices. See **glMap1**.

- **GL\_MAP1\_NORMAL**

  If enabled, calls to **glEvalCoord1**, **glEvalMesh1**, and **glEvalPoint1** generate normals. See **glMap1**.

- **GL\_MAP1\_TEXTURE\_COORD\_1**

  If enabled, calls to **glEvalCoord1**, **glEvalMesh1**, and **glEvalPoint1** generate *s* texture coordinates. See **glMap1**.

- **GL\_MAP1\_TEXTURE\_COORD\_2**

  If enabled, calls to **glEvalCoord1**, **glEvalMesh1**, and **glEvalPoint1** generate *s* and *t* texture coordinates. See **glMap1**.

- **GL\_MAP1\_TEXTURE\_COORD\_3**

  If enabled, calls to **glEvalCoord1**, **glEvalMesh1**, and **glEvalPoint1** generate *s*, *t*, and *r* texture coordinates. See **glMap1**.

- **GL\_MAP1\_TEXTURE\_COORD\_4**

  If enabled, calls to **glEvalCoord1**, **glEvalMesh1**, and **glEvalPoint1** generate *s*, *t*, *r*, and *q* texture coordinates. See **glMap1**.

- **GL\_MAP1\_VERTEX\_3**

  If enabled, calls to **glEvalCoord1**, **glEvalMesh1**, and **glEvalPoint1** generate *x*, *y*, and *z* vertex coordinates. See **glMap1**.

- **GL\_MAP1\_VERTEX\_4**

  If enabled, calls to **glEvalCoord1**, **glEvalMesh1**, and **glEvalPoint1** generate homogeneous *x*, *y*, *z*, and *w* vertex coordinates. See **glMap1**.

- **GL\_MAP2\_COLOR\_4**

  If enabled, calls to **glEvalCoord2**, **glEvalMesh2**, and **glEvalPoint2** generate RGBA values. See **glMap2**.

- **GL\_MAP2\_INDEX**

  If enabled, calls to **glEvalCoord2**, **glEvalMesh2**, and **glEvalPoint2** generate color indices. See **glMap2**.

- **GL\_MAP2\_NORMAL**

  If enabled, calls to **glEvalCoord2**, **glEvalMesh2**, and **glEvalPoint2** generate normals. See **glMap2**.

- **GL\_MAP2\_TEXTURE\_COORD\_1**

  If enabled, calls to **glEvalCoord2**, **glEvalMesh2**, and **glEvalPoint2** generate *s* texture coordinates. See **glMap2**.

- **GL\_MAP2\_TEXTURE\_COORD\_2**

  If enabled, calls to **glEvalCoord2**, **glEvalMesh2**, and **glEvalPoint2** generate *s* and *t* texture coordinates. See **glMap2**.

- **GL\_MAP2\_TEXTURE\_COORD\_3**

  If enabled, calls to **glEvalCoord2**, **glEvalMesh2**, and **glEvalPoint2** generate *s*, *t*, and *r* texture coordinates. See **glMap2**.

- **GL\_MAP2\_TEXTURE\_COORD\_4**

  If enabled, calls to **glEvalCoord2**, **glEvalMesh2**, and **glEvalPoint2** generate *s*, *t*, *r*, and *q* texture coordinates. See **glMap2**.

- **GL\_MAP2\_VERTEX\_3**

  If enabled, calls to **glEvalCoord2**, **glEvalMesh2**, and **glEvalPoint2** generate *x*, *y*, and *z* vertex coordinates. See **glMap2**.

- **GL\_MAP2\_VERTEX\_4**

  If enabled, calls to **glEvalCoord2**, **glEvalMesh2**, and **glEvalPoint2** generate homogeneous *x*, *y*, *z*, and *w* vertex coordinates. See **glMap2**.

- **GL\_MINMAX**

  If enabled, compute the minimum and maximum values of incoming RGBA color values. See **glMinmax**.

- **GL\_NORMALIZE**

  If enabled, normal vectors specified with **glNormal** are scaled to unit length after transformation. See **glNormal**.

- **GL\_POINT\_SMOOTH**

  If enabled, draw points with proper filtering. Otherwise, draw aliased points. See **glPointSize**.

- **GL\_POLYGON\_OFFSET\_FILL**

  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**.

- **GL\_POLYGON\_OFFSET\_LINE**

  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**.

- **GL\_POLYGON\_OFFSET\_POINT**

  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**.

- **GL\_POLYGON\_SMOOTH**

  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.

- **GL\_POLYGON\_STIPPLE**

  If enabled, use the current polygon stipple pattern when rendering polygons. See **glPolygonStipple**.

- **GL\_POST\_COLOR\_MATRIX\_COLOR\_TABLE**

  If enabled, preform a color table lookup on RGBA color values after color matrix  transformation. See **glColorTable**.

- **GL\_POST\_CONVOLUTION\_COLOR\_TABLE**

  If enabled, preform a color table lookup on RGBA color values after convolution. See **glColorTable**.

- **GL\_RESCALE\_NORMAL**

  If enabled, normal vectors specified with **glNormal** are scaled to unit length after transformation. See **glNormal**.

- **GL\_SEPARABLE\_2D**

  If enabled, perform a two-dimensional convolution operation using a separable convolution filter on incoming RGBA color values. See **glSeparableFilter2D**.

- **GL\_SCISSOR\_TEST**

  If enabled, discard fragments that are outside the scissor rectangle.  See **glScissor**.

- **GL\_STENCIL\_TEST**

  If enabled, do stencil testing and update the stencil buffer.  See **glStencilFunc** and **glStencilOp**.

- **GL\_TEXTURE\_1D**

  If enabled, one-dimensional texturing is performed (unless two- or three-dimensional texturing is also enabled). See **glTexImage1D**.

- **GL\_TEXTURE\_2D**

  If enabled, two-dimensional texturing is performed (unless three-dimensional texturing is also enabled). See **glTexImage2D**.

- **GL\_TEXTURE\_3D**

  If enabled, three-dimensional texturing is performed. See **glTexImage3D**.

- **GL\_TEXTURE\_GEN\_Q**

  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**.

- **GL\_TEXTURE\_GEN\_R**

  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**.

- **GL\_TEXTURE\_GEN\_S**

  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**.

- **GL\_TEXTURE\_GEN\_T**

  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**.

## NOTES

**GL\_POLYGON\_OFFSET\_FILL**, **GL\_POLYGON\_OFFSET\_LINE**, **GL\_POLYGON\_OFFSET\_POINT**, **GL\_COLOR\_LOGIC\_OP**, and **GL\_INDEX\_LOGIC\_OP** are available only if the GL version is 1.1 or greater.

**GL\_RESCALE\_NORMAL**, and **GL\_TEXTURE\_3D** are available only if the GL version is 1.2 or greater.

**GL\_COLOR\_TABLE**, **GL\_CONVOLUTION\_1D**, **GL\_CONVOLUTION\_2D**, **GL\_HISTOGRAM**, **GL\_MINMAX**, **GL\_POST\_COLOR\_MATRIX\_COLOR\_TABLE**, **GL\_POST\_CONVOLUTION\_COLOR\_TABLE**, and **GL\_SEPARABLE\_2D** are available only if **GL\_ARB\_imaging** is returned from **glGet** with an argument of **GL\_EXTENSIONS**.

If **GL\_ARB\_multitexture** is supported, **GL\_TEXTURE\_1D**, **GL\_TEXTURE\_2D**, **GL\_TEXTURE\_3D**, **GL\_TEXTURE\_GEN\_S**, **GL\_TEXTURE\_GEN\_T**, **GL\_TEXTURE\_GEN\_R**, and **GL\_TEXTURE\_GEN\_Q** enable or disable the respective state for the active texture unit specified with **glActiveTextureARB**.

## ERRORS

**GL\_INVALID\_ENUM** is generated if *cap* is not one of the values listed previously.

**GL\_INVALID\_OPERATION** is generated if **glEnable** or **glDisable** is executed between the execution of **glBegin** and the corresponding execution of **glEnd**.

## SEE ALSO

**glActiveTextureARB(3G)**, **glAlphaFunc(3G)**, **glBlendFunc(3G)**, **glClipPlane(3G)**, **glColorMaterial(3G)**, **glCullFace(3G)**, **glDepthFunc(3G)**, **glDepthRange(3G)**, **glEnableClientState(3G)**, **glFog(3G)**, **glGet(3G)**, **glIsEnabled(3G)**, **glLight(3G)**, **glLightModel(3G)**, **glLineWidth(3G)**, **glLineStipple(3G)**, **glLogicOp(3G)**, **glMap1(3G)**, **glMap2(3G)**, **glMaterial(3G)**, **glNormal(3G)**, **glPointSize(3G)**, **glPolygonMode(3G)**, **glPolygonOffset(3G)**, **glPolygonStipple(3G)**, **glScissor(3G)**, **glStencilFunc(3G)**, **glStencilOp(3G)**, **glTexGen(3G)**, **glTexImage1D(3G)**, **glTexImage2D(3G)**, **glTexImage3D(3G)**
