GLENABLE(3G)
π 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. SeeglAlphaFunc.GL_AUTO_NORMALβ if enabled, generate normal vectors when eitherGL_MAP2_VERTEX_3orGL_MAP2_VERTEX_4is used to generate vertices. SeeglMap2.GL_BLENDβ if enabled, blend the incoming RGBA color values with the values in the color buffers. SeeglBlendFunc.GL_CLIP_PLANEiβ if enabled, clip geometry against user-defined clipping plane i. SeeglClipPlane.GL_COLOR_LOGIC_OPβ if enabled, apply the currently selected logical operation to the incoming RGBA color and color buffer values. SeeglLogicOp.GL_COLOR_MATERIALβ if enabled, have one or more material parameters track the current color. SeeglColorMaterial.GL_COLOR_TABLEβ if enabled, do a color table lookup on the incoming RGBA color values. SeeglColorTable.GL_CONVOLUTION_1Dβ if enabled, perform a 1D convolution operation on incoming RGBA color values. SeeglConvolutionFilter1D.GL_CONVOLUTION_2Dβ if enabled, perform a 2D convolution operation on incoming RGBA color values. SeeglConvolutionFilter2D.GL_CULL_FACEβ if enabled, cull polygons based on their winding in window coordinates. SeeglCullFace.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. SeeglDepthFuncandglDepthRange.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. SeeglFog.GL_HISTOGRAMβ if enabled, histogram incoming RGBA color values. SeeglHistogram.GL_INDEX_LOGIC_OPβ if enabled, apply the currently selected logical operation to the incoming index and color buffer indices. SeeglLogicOp.GL_LIGHTiβ if enabled, include light i in the evaluation of the lighting equation. SeeglLightModelandglLight.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. SeeglMaterial,glLightModel, andglLight.GL_LINE_SMOOTHβ if enabled, draw lines with correct filtering. Otherwise, draw aliased lines. SeeglLineWidth.GL_LINE_STIPPLEβ if enabled, use the current line stipple pattern when drawing lines. SeeglLineStipple.GL_MAP1_COLOR_4β if enabled, calls toglEvalCoord1,glEvalMesh1, andglEvalPoint1generate RGBA values. SeeglMap1.GL_MAP1_INDEXβ if enabled, calls toglEvalCoord1,glEvalMesh1, andglEvalPoint1generate color indices. SeeglMap1.GL_MAP1_NORMALβ if enabled, calls toglEvalCoord1,glEvalMesh1, andglEvalPoint1generate normals. SeeglMap1.GL_MAP1_TEXTURE_COORD_1β if enabled, calls toglEvalCoord1,glEvalMesh1, andglEvalPoint1generatestexture coordinates. SeeglMap1.GL_MAP1_TEXTURE_COORD_2β if enabled, calls toglEvalCoord1,glEvalMesh1, andglEvalPoint1generatesandttexture coordinates. SeeglMap1.GL_MAP1_TEXTURE_COORD_3β if enabled, calls toglEvalCoord1,glEvalMesh1, andglEvalPoint1generates,t, andrtexture coordinates. SeeglMap1.GL_MAP1_TEXTURE_COORD_4β if enabled, calls toglEvalCoord1,glEvalMesh1, andglEvalPoint1generates,t,r, andqtexture coordinates. SeeglMap1.GL_MAP1_VERTEX_3β if enabled, calls toglEvalCoord1,glEvalMesh1, andglEvalPoint1generatex,y, andzvertex coordinates. SeeglMap1.GL_MAP1_VERTEX_4β if enabled, calls toglEvalCoord1,glEvalMesh1, andglEvalPoint1generate homogeneousx,y,z, andwvertex coordinates. SeeglMap1.GL_MAP2_COLOR_4β if enabled, calls toglEvalCoord2,glEvalMesh2, andglEvalPoint2generate RGBA values. SeeglMap2.GL_MAP2_INDEXβ if enabled, calls toglEvalCoord2,glEvalMesh2, andglEvalPoint2generate color indices. SeeglMap2.GL_MAP2_NORMALβ if enabled, calls toglEvalCoord2,glEvalMesh2, andglEvalPoint2generate normals. SeeglMap2.GL_MAP2_TEXTURE_COORD_1β if enabled, calls toglEvalCoord2,glEvalMesh2, andglEvalPoint2generatestexture coordinates. SeeglMap2.GL_MAP2_TEXTURE_COORD_2β if enabled, calls toglEvalCoord2,glEvalMesh2, andglEvalPoint2generatesandttexture coordinates. SeeglMap2.GL_MAP2_TEXTURE_COORD_3β if enabled, calls toglEvalCoord2,glEvalMesh2, andglEvalPoint2generates,t, andrtexture coordinates. SeeglMap2.GL_MAP2_TEXTURE_COORD_4β if enabled, calls toglEvalCoord2,glEvalMesh2, andglEvalPoint2generates,t,r, andqtexture coordinates. SeeglMap2.GL_MAP2_VERTEX_3β if enabled, calls toglEvalCoord2,glEvalMesh2, andglEvalPoint2generatex,y, andzvertex coordinates. SeeglMap2.GL_MAP2_VERTEX_4β if enabled, calls toglEvalCoord2,glEvalMesh2, andglEvalPoint2generate homogeneousx,y,z, andwvertex coordinates. SeeglMap2.GL_MINMAXβ if enabled, compute the minimum and maximum values of incoming RGBA color values. SeeglMinmax.GL_NORMALIZEβ if enabled, normal vectors specified withglNormalare scaled to unit length after transformation. SeeglNormal.GL_POINT_SMOOTHβ if enabled, draw points with proper filtering. Otherwise, draw aliased points. SeeglPointSize.GL_POLYGON_OFFSET_FILLβ if enabled, and if the polygon is rendered inGL_FILLmode, an offset is added to depth values of a polygonβs fragments before the depth comparison is performed. SeeglPolygonOffset.GL_POLYGON_OFFSET_LINEβ if enabled, and if the polygon is rendered inGL_LINEmode, an offset is added to depth values of a polygonβs fragments before the depth comparison is performed. SeeglPolygonOffset.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 inGL_POINTmode. SeeglPolygonOffset.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. SeeglPolygonStipple.GL_POST_COLOR_MATRIX_COLOR_TABLEβ if enabled, do a color table lookup on RGBA color values after color matrix transformation. SeeglColorTable.GL_POST_CONVOLUTION_COLOR_TABLEβ if enabled, do a color table lookup on RGBA color values after convolution. SeeglColorTable.GL_RESCALE_NORMALβ if enabled, normal vectors specified withglNormalare scaled to unit length after transformation. SeeglNormal.GL_SEPARABLE_2Dβ if enabled, perform a two-dimensional convolution operation using a separable convolution filter on incoming RGBA color values. SeeglSeparableFilter2D.GL_SCISSOR_TESTβ if enabled, discard fragments that are outside the scissor rectangle. SeeglScissor.GL_STENCIL_TESTβ if enabled, do stencil testing and update the stencil buffer. SeeglStencilFuncandglStencilOp.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). SeeglTexImage1D.GL_TEXTURE_2Dβ enables two-dimensional texturing, gorgeous π (again, she yields if three-dimensional texturing is also enabled). SeeglTexImage2D.GL_TEXTURE_3Dβ three-dimensional texturing time, no competition here, she's the main character π. SeeglTexImage3D.GL_TEXTURE_GEN_Qβ when this is on, theqtexture coordinate gets computed by the texture generation function you set up withglTexGen. When it's off? You just use the currentqtexture coordinate, simple as that π. SeeglTexGen.GL_TEXTURE_GEN_Rβ same vibe as above but for thercoordinate: enabled means it's computed via the texture generation function fromglTexGen, otherwise the currentrtexture coordinate is used. SeeglTexGen.GL_TEXTURE_GEN_Sβ thescoordinate version of the whole situation: enabled = computed with theglTexGenfunction, otherwise the currentstexture coordinate is what you get π. SeeglTexGen.GL_TEXTURE_GEN_Tβ and finally thetcoordinate: enabled = computed using the generation function fromglTexGen, otherwise the currentttexture coordinate. SeeglTexGen.
π« 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, andGL_INDEX_LOGIC_OP? Only available if the GL version is1.1or greater, periodt.GL_RESCALE_NORMALandGL_TEXTURE_3D? Only available if the GL version is1.2or 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, andGL_SEPARABLE_2D? These are available only ifGL_ARB_imagingis returned fromglGetwith an argument ofGL_EXTENSIONSβ like, check the extension list first, iykyk π.- And here's a big one π₯: if
GL_ARB_multitextureis supported, thenGL_TEXTURE_1D,GL_TEXTURE_2D,GL_TEXTURE_3D,GL_TEXTURE_GEN_S,GL_TEXTURE_GEN_T,GL_TEXTURE_GEN_R, andGL_TEXTURE_GEN_Qenable or disable the respective state for the active texture unit specified withglActiveTextureARB. So like, whichever unit you picked, that's the one getting the toggle π .
π ERRORS π
GL_INVALID_ENUMgets generated ifcapis not one of the values listed previously. So don't be making up caps, bestie, she will know π.GL_INVALID_OPERATIONgets generated ifglEnableorglDisableis executed between the execution ofglBeginand the corresponding execution ofglEnd. 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
- opensuse-leap 16.0: Mesa-libGL-devel 24.1.7-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms