GLENABLE(3G)

πŸ“¦ version 24.3.3, in opensuse-leap 16.0

πŸ’… glEnable / glDisable β€” enable or disable server-side GL capabilities πŸ’…

okay bestie, welcome to the GLENABLE(3G) page β€” it’s literally the on/off switch situation for server-side GL capabilities, and yes it ate. 🫢

🌸 NAME 🌸

glEnable, glDisable β€” enable or disable server-side GL capabilities. that’s the whole title, no cap.

✨ C SPECIFICATION ✨

void glEnable( GLenum cap )

πŸŽ€ PARAMETERS πŸŽ€

  • cap β€” a symbolic constant that tells the function which GL capability you mean. cute, symbolic, iconic.

✨ C SPECIFICATION ✨

void glDisable( GLenum cap )

πŸŽ€ PARAMETERS πŸŽ€

  • cap β€” same deal: a symbolic constant that names a GL capability.

πŸ’– DESCRIPTION πŸ’–

okay so glEnable and glDisable are the duo that enable and disable various capabilities. If you need to know the current setting of any capability, use glIsEnabled or glGet β€” that’s your vibe check. The initial value for each capability is GL_FALSE, with one exception: GL_DITHER starts out as GL_TRUE. Not me pointing out the one exception, but here we are. 😭

Both glEnable and glDisable take a single argument, cap, and it can assume one of these iconic 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_PLANEi β€” 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, do 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. big caveat: 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_LIGHTi β€” 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, do a color table lookup on RGBA color values after color matrix transformation. See glColorTable.
  • GL_POST_CONVOLUTION_COLOR_TABLE β€” if enabled, do 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 β€” turn this on and you get one-dimensional texturing, bestie ✨ (unless two- or three-dimensional texturing is also on, which, like, rude to this one but okay). See glTexImage1D.
  • GL_TEXTURE_2D β€” enables two-dimensional texturing, gorgeous πŸ’… (again, she yields if three-dimensional texturing is also enabled). See glTexImage2D.
  • GL_TEXTURE_3D β€” three-dimensional texturing time, no competition here, she's the main character πŸ‘‘. See glTexImage3D.
  • GL_TEXTURE_GEN_Q β€” when this is on, the q texture coordinate gets computed by the texture generation function you set up with glTexGen. When it's off? You just use the current q texture coordinate, simple as that πŸ’–. See glTexGen.
  • GL_TEXTURE_GEN_R β€” same vibe as above but for the r coordinate: enabled means it's computed via the texture generation function from glTexGen, otherwise the current r texture coordinate is used. See glTexGen.
  • GL_TEXTURE_GEN_S β€” the s coordinate version of the whole situation: enabled = computed with the glTexGen function, otherwise the current s texture coordinate is what you get πŸŽ€. See glTexGen.
  • GL_TEXTURE_GEN_T β€” and finally the t coordinate: enabled = computed using the generation function from glTexGen, otherwise the current t texture coordinate. See glTexGen.

πŸ’« NOTES πŸ’«

Okay so some of these have a vibe check attached, meaning they only exist on newer GL, lowkey important 🫢:

  • GL_POLYGON_OFFSET_FILL, GL_POLYGON_OFFSET_LINE, GL_POLYGON_OFFSET_POINT, GL_COLOR_LOGIC_OP, and GL_INDEX_LOGIC_OP? Only available if the GL version is 1.1 or greater, periodt.
  • GL_RESCALE_NORMAL and GL_TEXTURE_3D? Only available 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? These are available only if GL_ARB_imaging is returned from glGet with an argument of GL_EXTENSIONS β€” like, check the extension list first, iykyk πŸ‘€.
  • And here's a big one πŸ”₯: if GL_ARB_multitexture is supported, then 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. So like, whichever unit you picked, that's the one getting the toggle πŸ’….

πŸ’€ ERRORS πŸ’€

  • GL_INVALID_ENUM gets generated if cap is not one of the values listed previously. So don't be making up caps, bestie, she will know πŸ™ˆ.
  • GL_INVALID_OPERATION gets generated if glEnable or glDisable is executed between the execution of glBegin and the corresponding execution of glEnd. Like, do not do that mid-primitive, it's giving undefined-chaos energy 😭.

🌈 SEE ALSO 🌈

The whole friend group, assembled 🫢:

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)


That's the whole page, bestie β€” go forth and enable things responsibly 🌸 And that little footer at the bottom? It's GLENABLE(3G), the source/version tag doing its quiet iconic thing. Byeee πŸ’œπŸ¦‹

πŸ“¦ where this page comes from