GLDEBUGMESSAGECONTRO(3G)
π
GLDEBUGMESSAGECONTRO (that's the 3G manual, bestie) β¨
πΈ NAME πΈ
glDebugMessageControl β ok so this is the function that lets you control the reporting of debug messages in a debug context. Basically you're the bouncer at the club and you decide which debug messages get in π
π C SPECIFICATION π
void glDebugMessageControl(GLenum source, GLenum type, GLenum severity,
GLsizei count, const GLuint *ids,
GLboolean enabled);
Like, literally copy that exactly, the parameter order matters, don't improvise π«Ά
β¨ PARAMETERS β¨
sourceβ where the debug messages you're enabling/disabling are coming from. The origin story, if you will.typeβ what kind of debug messages you're enabling or disabling.severityβ how serious those messages are. The vibe check of the message, lowkey.countβ the length of the arrayids. Just how many ids you're handing over.idsβ the address of an array of unsigned integers contianing the ids of the messages to enable or disable. (Yes, "contianing" β that's how it's spelled in the original, I'm not fixing it, I don't make the rules π)enabledβ a Boolean flag determining whether the selected messages should be enabled or disabled. On or off, bestie, pick one π
π¦ DESCRIPTION π¦
So glDebugMessageControl controls the reporting of debug messages generated by a debug context. The parameters source, type and severity form a filter to select messages from the pool of potential messages generated by the GL. Think of it like a group chat β you're muting and unmuting specific people π
On source: it may be GL_DEBUG_SOURCE_API, GL_DEBUG_SOURCE_WINDOW_SYSTEM_, GL_DEBUG_SOURCE_SHADER_COMPILER, GL_DEBUG_SOURCE_THIRD_PARTY, GL_DEBUG_SOURCE_APPLICATION, or GL_DEBUG_SOURCE_OTHER to select messages generated by usage of the GL API, the window system, the shader compiler, third party tools or libraries, explicitly by the application, or by some other source, respectively. (And yes, GL_DEBUG_SOURCE_WINDOW_SYSTEM_ really does have that trailing underscore in this page β I am not touching it, she said what she said π
) It may also take the value GL_DONT_CARE. If source is not GL_DONT_CARE then only messages whose source matches source will be referenced.
On type: it may be one of GL_DEBUG_TYPE_ERROR, GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR, GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR, GL_DEBUG_TYPE_PORTABILITY, GL_DEBUG_TYPE_PERFORMANCE, GL_DEBUG_TYPE_MARKER, GL_DEBUG_TYPE_PUSH_GROUP, GL_DEBUG_TYPE_POP_GROUP, or GL_DEBUG_TYPE_OTHER to indicate the type of messages describing GL errors, attempted use of deprecated features, triggering of undefined behavior, portability issues, performance notifications, markers, group push and pop events, and other types of messages, respectively. It may also take the value GL_DONT_CARE. If type is not GL_DONT_CARE then only messages whose type matches type will be referenced.
On severity: it may be one of GL_DEBUG_SEVERITY_LOW, GL_DEBUG_SEVERITY_MEDIUM, or GL_DEBUG_SEVERITY_HIGH to select messages of low, medium or high severity messages, or to GL_DEBUG_SEVERITY_NOTIFICATION for notifications. It may also take the value GL_DONT_CARE. If severity is not GL_DONT_CARE then only messages whose severity matches severity will be referenced.
On ids (the spicy part πΆοΈ): ids contains a list of count message identifiers to select specific messages from the pool of available messages. If count is zero then the value of ids is ignored. Otherwise, only messages appearing in this list are selected. In this case, source and type may not be GL_DONT_CARE and severity must be GL_DONT_CARE. Like, read that twice, it's giving "special rules apply" energy π
And enabled: if enabled is GL_TRUE then messages that match the filter formed by source, type, severity and ids are enabled. Otherwise, those messages are disabled. Periodt.
π NOTES π
- Although debug messages may be enabled in a non-debug context, the quantity and detail of such messages may be substantially inferior to those in a debug context. Like, the non-debug version is the group chat without the tea π΅
- In particular, a valid implementation of the debug message queue in a non-debug context may produce no messages at all. Nothing. Crickets. Not a single peep π
So fr fr:GL_DEBUG_TYPE_MARKER,GL_DEBUG_TYPE_PUSH_GROUP,GL_DEBUG_TYPE_POP_GROUP, andGL_DEBUG_SEVERITY_NOTIFICATIONare available only if the GL version is4.3or higher. Don't come crying to me if you're on 3.3 and these aren't showing up π
π₯ ERRORS π₯
GL_INVALID_VALUEis generated ifcountis negative. Negative count is not the vibe, ma'am πGL_INVALID_ENUMis generated if any ofsource,typeorseverityis not one of the accepted interface types.GL_INVALID_OPERATIONis generated ifcountis non-zero and eithersourceortypeisGL_DONT_CAREor ifseverityis notGL_DONT_CARE. Yeah I know, that one's a mouthful β screenshot it πΈ
π VERSION SUPPORT π
Ok so picture the chart in your head, bestie β here's the function name and where she shows up across the OpenGL versions:
- Function / Feature Name:
glDebugMessageControl 2.0β-(nope)2.1β-(nope)3.0β-(nope)3.1β-(nope)3.2β-(nope)3.3β-(nope)4.0β-(nope)4.1β-(nope)4.2β-(nope)4.3ββ(THERE she is β¨)4.4ββ(slay)4.5ββ(slay again)
So basically: 4.3 and up, and nowhere else. She's a late bloomer and that's iconic π
π SEE ALSO π
glDebugMessageInsert()glDebugMessageCallback()glGetDebugMessageLog()
π COPYRIGHT π
Copyright Β© 2013-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
Copyright Β© 2013-2014 Khronos Group
And that's the whole page, bestie!! π«Ά Go forth and control your debug messages β this was GLDEBUGMESSAGECONTRO, from that [FIXME: source] situation, dated 08/09/2021. Mwah πβ¨
π¦ 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