GLISENABLED(3G)
β¨ GLISENABLED(3G) β¨
Okay bestie, welcome to GLISENABLED(3G) β the 3G manual page, and yes the header literally says [FIXME: manual] in it, we love a work-in-progress icon π
. This is part 1 of 2, so buckle up, we're only getting started.
πΈ NAME πΈ
glIsEnabled, _glIsEnabledi β test whether a capability is enabled
It's giving "is this thing on?" but make it OpenGL, fr fr.
π C SPECIFICATION π
GLboolean glIsEnabled(GLenum cap);
GLboolean glIsEnabledi(GLenum cap, GLuint index);
Two functions, same energy. One asks about a capability, the other asks about a specific index of a capability. Love that for them π
π¦ PARAMETERS π¦
capβ a symbolic constant that says which GL capability you're asking about, like your little lookup key πindexβ the index of the capability. Only the indexed girlies need this one, iykyk.
π DESCRIPTION π
So here's the tea: glIsEnabled returns GL_TRUE if cap is an enabled capability, and returns GL_FALSE otherwise. That's it. That's the whole vibe check β¨
Boolean states that are indexed can be tested with glIsEnabledi. For glIsEnabledi, index tells you which index of the capability to test, and index must be between zero and the count of indexed capabilities for cap β no going out of bounds, bestie, that's not the move π.
Initially all capabilities except GL_DITHER are disabled; GL_DITHER is initially enabled. So GL_DITHER is the main character from day one, periodt π
The following capabilities are accepted for cap β this is the whole guest list π:
GL_BLENDβ seeglBlendFunc(),glLogicOp()GL_CLIP_DISTANCEiβ seeglEnable()GL_COLOR_LOGIC_OPβ seeglLogicOp()GL_CULL_FACEβ seeglCullFace()GL_DEPTH_CLAMPβ seeglEnable()GL_DEBUG_OUTPUTβ seeglEnable()GL_DEBUG_OUTPUT_SYNCHRONOUSβ seeglEnable()GL_DEPTH_TESTβ seeglDepthFunc(),glDepthRange()GL_DITHERβ seeglEnable()GL_FRAMEBUFFER_SRGBβ seeglEnable()GL_LINE_SMOOTHβ seeglLineWidth()GL_MULTISAMPLEβ seeglSampleCoverage()GL_POLYGON_SMOOTHβ seeglPolygonMode()GL_POLYGON_OFFSET_FILLβ seeglPolygonOffset()GL_POLYGON_OFFSET_LINEβ seeglPolygonOffset()GL_POLYGON_OFFSET_POINTβ seeglPolygonOffset()GL_PROGRAM_POINT_SIZEβ seeglEnable()GL_PRIMITIVE_RESTARTβ seeglEnable(),glPrimitiveRestartIndex()GL_SAMPLE_ALPHA_TO_COVERAGEβ seeglSampleCoverage()GL_SAMPLE_ALPHA_TO_ONEβ seeglSampleCoverage()GL_SAMPLE_COVERAGEβ seeglSampleCoverage()GL_SAMPLE_MASKβ seeglEnable()GL_SCISSOR_TESTβ seeglScissor()GL_STENCIL_TESTβ seeglStencilFunc(),glStencilOp()GL_TEXTURE_CUBE_MAP_SEAMLESSβ seeglEnable()
Like, that's the whole list. No substitutions, no "close enough" β if it's not on this list, it's not invited π
π NOTES π
If an error is generated, glIsEnabled and glIsEnabledi return GL_FALSE. So an error lowkey looks like a "no" β keep that in mind before you start blaming your shaders π
GL_DEBUG_OUTPUT and GL_DEBUG_OUTPUT_SYNCHRONOUS are available only if the GL version is 4.3 or greater. Old GL? Not invited, sorry bestie π«Ά
π₯ ERRORS π₯
GL_INVALID_ENUMis generated ifcapis not an accepted value. If it's not on the guest list, security is gonna stop you at the door πGL_INVALID_VALUEis generated byglIsEnablediifindexis outside the valid range for the indexed statecap. Out of range = immediate vibe check failure, no cap π«
<!-- part 1 end, part 2 coming, no sign-off bestie -->
β¨ VERSION SUPPORT β¨
okay bestie this is the vibe check for which OpenGL versions these functions actually exist in, and honestly? the chart is giving "we been here the whole time" for one of them and "3.0 baby, we arrived late and we ate" for the other π
Columns you're reading are the OpenGL versions: 2.0, 2.1, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5 π
glIsEnabledβ literally an icon in every single version, no gaps, no notes π2.0β2.1β3.0β3.1β3.2β3.3β4.0β4.1β4.2β4.3β4.4β4.5β
glIsEnablediβ the newer sibling, shows up at3.0and stays booked and busy through4.5π2.0-2.1-3.0β3.1β3.2β3.3β4.0β4.1β4.2β4.3β4.4β4.5β
(the - just means "not a thing there", no drama π«Ά)
π¦ SEE ALSO π¦
go touch some related manpages, they're all part of the same friend group fr fr:
glEnable(),glDisable, glGet()
π COPYRIGHT π
Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.
π COPYRIGHT π
Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group
okay that's the whole page, we're done, go enable something responsibly β¨ and remember: [FIXME: source] is being its lil placeholder self, the date on this bad boy is 08/09/2021, and it's officially page GLISENABLED(3G) of the man-verse β mwah, love u, bye ππ¦π
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms