GLDEBUGMESSAGEINSERT(3G)

πŸ’… GLDEBUGMESSAGEINSERT(3G) πŸ’… β€” inject ur own debug tea β˜•

Okay bestie, welcome to the GLDEBUGMESSAGEINSERT(3G) page. It’s giving β€œI have something to say and I’m putting it directly into the debug queue.” Periodt. πŸ’–


🌸 NAME 🌸

glDebugMessageInsert β€” inject an application-supplied message into the debug message queue. Literally what it says, no cap. ✨


✨ C SPECIFICATION ✨

The actual signature, bestie β€” copy it exactly:

void glDebugMessageInsert(GLenum source, GLenum type, GLuint id,
                          GLenum severity, GLsizei length,
                          const char *message);

πŸŽ€ PARAMETERS πŸŽ€

  • source β€” the source of the debug message to insert. Like, where this message is coming from. 🫢
  • type β€” the type of the debug message insert. The category/vibe of the message you’re inserting. πŸ’…
  • id β€” the user-supplied identifier of the message to insert. You pick it, bestie.
  • severity β€” the severity of the debug messages to insert. How loud this message should be. πŸ”₯
  • length β€” the length of the string contained in the character array whose address is given by message. Yes, it’s the character count. πŸŽ€
  • message β€” the address of a character array containing the message to insert. The actual tea. β˜•

πŸ¦‹ DESCRIPTION πŸ¦‹

glDebugMessageInsert inserts a user-supplied message into the debug output queue. Iconic behavior, honestly. πŸ’–

source specifies the source that will be used to classify the message, and it must be GL_DEBUG_SOURCE_APPLICATION or GL_DEBUG_SOURCE_THIRD_PARTY. All other sources are reserved for use by the GL implementation. So don’t try it, bestie. πŸ™ˆ

type indicates the type of the message to be inserted and 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
  • GL_DEBUG_TYPE_OTHER

severity indicates the severity of the message and may be:

  • GL_DEBUG_SEVERITY_LOW
  • GL_DEBUG_SEVERITY_MEDIUM
  • GL_DEBUG_SEVERITY_HIGH
  • GL_DEBUG_SEVERITY_NOTIFICATION

id is available for application defined use and may be any value. This value will be recorded and used to identify the message. So yes, you can absolutely pick your little ID bestie. πŸ‘‘

length contains a count of the characters in the character array whose address is given in message. If length is negative then message is treated as a null-terminated string. The length of the message, whether specified explicitly or implicitly, must be less than or equal to the implementation defined constant GL_MAX_DEBUG_MESSAGE_LENGTH. That’s the limit, bestie β€” respect it. 😭


🧚 NOTES 🧚

GL_DEBUG_TYPE_MARKER, GL_DEBUG_TYPE_PUSH_GROUP, GL_DEBUG_TYPE_POP_GROUP, and GL_DEBUG_SEVERITY_NOTIFICATION are available only if the GL version is 4.3 or higher. Iykyk. πŸ’œ


πŸ’€ ERRORS πŸ’€

  • GL_INVALID_ENUM is generated if any of source, type or severity is not one of the accepted interface types. Not me getting an invalid enum… couldn’t be me. πŸ™ˆ
  • GL_INVALID_VALUE is generated if the length of the message is greater than the value of GL_MAX_DEBUG_MESSAGE_LENGTH. Too long, bestie. Way too long. πŸ’…

🌈 VERSION SUPPORT 🌈

Function / Feature Name: glDebugMessageInsert.

Here’s the full OpenGL version vibe check, with every version from the original table:

  • 2.0 β€” -
  • 2.1 β€” -
  • 3.0 β€” -
  • 3.1 β€” -
  • 3.2 β€” -
  • 3.3 β€” -
  • 4.0 β€” -
  • 4.1 β€” -
  • 4.2 β€” -
  • 4.3 β€” βœ”
  • 4.4 β€” βœ”
  • 4.5 β€” βœ”

πŸ“ SEE ALSO πŸ“

Go read these too, bestie:

  • glDebugMessageControl()
  • glDebugMessageCallback()
  • glGetDebugMessageLog()

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


Cute sign-off: source/version [FIXME: source], date 08/09/2021, manual GLDEBUGMESSAGEINSERT(3G). That’s the footer tea, and we are out. Byeee πŸ’–πŸ«Άβœ¨

πŸ“¦ where this page comes from