GLISENABLED(3G)

πŸ“¦ version 1.1, in centos-stream 9, fedora 43, fedora 44

✨ GLISENABLED ✨

okay bestie so this page lives in the 3G manual section (that's the OpenGL one, iykyk) πŸ’… and it's literally just one lil question: is this thing on?


🌸 NAME 🌸

glIsEnabled β€” test whether a capability is enabled


πŸŽ€ C SPECIFICATION πŸŽ€

GLboolean glIsEnabled( GLenum cap )

πŸ¦‹ PARAMETERS πŸ¦‹

  • cap β€” a symbolic constant that names one specific GL capability. that's it, that's the whole input 🫢

πŸ‘‘ DESCRIPTION πŸ‘‘

glIsEnabled hits you back with GL_TRUE when cap is an enabled capability, and GL_FALSE when it isn't. periodt.

and here's the tea on the starting lineup: initially every single capability is disabled except GL_DITHER β€” GL_DITHER is the one that starts out enabled πŸ’–

these are all the capabilities that are accepted for cap, with where to go read about them:

  • GL_ALPHA_TEST β€” see glAlphaFunc
  • GL_AUTO_NORMAL β€” see glEvalCoord
  • GL_BLEND β€” see glBlendFunc, glLogicOp
  • GL_CLIP_PLANEi β€” see glClipPlane
  • GL_COLOR_ARRAY β€” see glColorPointer
  • GL_COLOR_LOGIC_OP β€” see glLogicOp
  • GL_COLOR_MATERIAL β€” see glColorMaterial
  • GL_COLOR_TABLE β€” see glColorTable
  • GL_CONVOLUTION_1D β€” see glConvolutionFilter1D
  • GL_CONVOLUTION_2D β€” see glConvolutionFilter2D
  • GL_CULL_FACE β€” see glCullFace
  • GL_DEPTH_TEST β€” see glDepthFunc, glDepthRange
  • GL_DITHER β€” see glEnable
  • GL_EDGE_FLAG_ARRAY β€” see glEdgeFlagPointer
  • GL_FOG β€” see glFog
  • GL_HISTOGRAM β€” see glHistogram
  • GL_INDEX_ARRAY β€” see glIndexPointer
  • GL_INDEX_LOGIC_OP β€” see glLogicOp
  • GL_LIGHTi β€” see glLightModel, glLight
  • GL_LIGHTING β€” see glMaterial, glLightModel, glLight
  • GL_LINE_SMOOTH β€” see glLineWidth
  • GL_LINE_STIPPLE β€” see glLineStipple
  • GL_MAP1_COLOR_4 β€” see glMap1
  • GL_MAP1_INDEX β€” see glMap1
  • GL_MAP1_NORMAL β€” see glMap1
  • GL_MAP1_TEXTURE_COORD_1 β€” see glMap1
  • GL_MAP1_TEXTURE_COORD_2 β€” see glMap1
  • GL_MAP1_TEXTURE_COORD_3 β€” see glMap1
  • GL_MAP1_TEXTURE_COORD_4 β€” see glMap1
  • GL_MAP2_COLOR_4 β€” see glMap2
  • GL_MAP2_INDEX β€” see glMap2
  • GL_MAP2_NORMAL β€” see glMap2
  • GL_MAP2_TEXTURE_COORD_1 β€” see glMap2
  • GL_MAP2_TEXTURE_COORD_2 β€” see glMap2
  • GL_MAP2_TEXTURE_COORD_3 β€” see glMap2
  • GL_MAP2_TEXTURE_COORD_4 β€” see glMap2
  • GL_MAP2_VERTEX_3 β€” see glMap2
  • GL_MAP2_VERTEX_4 β€” see glMap2
  • GL_MINMAX β€” see glMinmax
  • GL_NORMAL_ARRAY β€” see glNormalPointer
  • GL_NORMALIZE β€” see glNormal
  • GL_POINT_SMOOTH β€” see glPointSize
  • GL_POLYGON_SMOOTH β€” see glPolygonMode
  • GL_POLYGON_OFFSET_FILL β€” see glPolygonOffset
  • GL_POLYGON_OFFSET_LINE β€” see glPolygonOffset
  • GL_POLYGON_OFFSET_POINT β€” see glPolygonOffset
  • GL_POLYGON_STIPPLE β€” see glPolygonStipple
  • GL_POST_COLOR_MATRIX_COLOR_TABLE β€” see glColorTable
  • GL_POST_CONVOLUTION_COLOR_TABLE β€” see glColorTable
  • GL_RESCALE_NORMAL β€” see glNormal
  • GL_SCISSOR_TEST β€” see glScissor
  • GL_SEPARABLE_2D β€” see glSeparableFilter2D
  • GL_STENCIL_TEST β€” see glStencilFunc, glStencilOp
  • GL_TEXTURE_1D β€” see glTexImage1D
  • GL_TEXTURE_2D β€” see glTexImage2D
  • GL_TEXTURE_3D β€” see glTexImage3D
  • GL_TEXTURE_COORD_ARRAY β€” see glTexCoordPointer
  • GL_TEXTURE_GEN_Q β€” see glTexGen
  • GL_TEXTURE_GEN_R β€” see glTexGen
  • GL_TEXTURE_GEN_S β€” see glTexGen
  • GL_TEXTURE_GEN_T β€” see glTexGen
  • GL_VERTEX_ARRAY β€” see glVertexPointer

sixty-three constants, no skips, no shortcuts πŸ’œ


πŸ’€ NOTES πŸ’€

if an error gets generated, glIsEnabled returns 0. that's your red flag bestie, don't ignore it 😭

these ones are only available if the GL version is 1.1 or greater:

GL_COLOR_LOGIC_OP, GL_COLOR_ARRAY, GL_EDGE_FLAG_ARRAY, GL_INDEX_ARRAY, GL_INDEX_LOGIC_OP, GL_NORMAL_ARRAY, GL_POLYGON_OFFSET_FILL, GL_POLYGON_OFFSET_LINE, GL_POLYGON_OFFSET_POINT, GL_TEXTURE_COORD_ARRAY, and GL_VERTEX_ARRAY

and these two need GL version 1.2 or greater:

GL_RESCALE_NORMAL, and GL_TEXTURE_3D

meanwhile this whole squad is only available if GL_ARB_imaging shows up when glGet is called with GL_EXTENSIONS:

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

now listen. when the GL_ARB_multitexture extension is supported, these parameters return the associated value for the active texture unit: GL_TEXTURE_1D, GL_TEXTURE_BINDING_1D, GL_TEXTURE_2D, GL_TEXTURE_BINDING_2D, GL_TEXTURE_3D, GL_TEXTURE_BINDING_3D, GL_TEXTURE_GEN_S, GL_TEXTURE_GEN_T, GL_TEXTURE_GEN_R, GL_TEXTURE_GEN_Q, GL_TEXTURE_MATRIX, and GL_TEXTURE_STACK_DEPTH. likewise, these ones return the associated value for the active client texture unit: GL_TEXTURE_COORD_ARRAY, GL_TEXTURE_COORD_ARRAY_SIZE, GL_TEXTURE_COORD_ARRAY_STRIDE, GL_TEXTURE_COORD_ARRAY_TYPE.

that's the whole multitexture situation, no cap 🧚


πŸ”₯ ERRORS πŸ”₯

  • GL_INVALID_ENUM gets generated if cap is not an accepted value. like, you made that one up bestie, it's giving improv 🫠
  • GL_INVALID_OPERATION gets generated if glIsEnabled is executed between the execution of glBegin and the corresponding execution of glEnd. do not try to vibe-check a capability mid-draw, that's illegal in OpenGL court πŸ’€

🌈 SEE ALSO 🌈

glEnable(3G), glEnableClientState(3G), glGet(3G)


and that's the whole page, main character energy from top to bottom ✨ the footer line is just GLISENABLED(3G) all over again β€” same 3G manual section we started in β€” so consider yourself properly tagged and released, bestie. go check your caps, stay iconic πŸ‘‘πŸ’–

πŸ“¦ where this page comes from