GLOBJECTLABEL(3G)

🌸 NAME 🌸

okay so this is GLOBJECTLABEL(3G) β€” manual section 3G, and the header is literally serving [FIXME: manual] placeholder realness πŸ’…. The function is glObjectLabel, and it does exactly this: label a named object identified within a namespace. iconic, lowkey.

✨ C SPECIFICATION ✨

void glObjectLabel(GLenum identifier, GLuint name, GLsizei length,
                   const char * label);

πŸŽ€ PARAMETERS πŸŽ€

  • identifier β€” the namespace from which the name of the object is allocated.
  • name β€” the name of the object to label.
  • length β€” the length of the label to be used for the object.
  • label β€” the address of a string containing the label to assign to the object.

πŸ¦‹ DESCRIPTION πŸ¦‹

glObjectLabel labels the object identified by name within the namespace given by identifier. bestie, identifier has to be one of these, and each one maps to its own little namespace:

  • GL_BUFFER β€” buffers
  • GL_SHADER β€” shaders
  • GL_PROGRAM β€” programs
  • GL_VERTEX_ARRAY β€” vertex array objects
  • GL_QUERY β€” query objects
  • GL_PROGRAM_PIPELINE β€” program pipelines
  • GL_TRANSFORM_FEEDBACK β€” transform feedback objects
  • GL_SAMPLER β€” samplers
  • GL_TEXTURE β€” textures
  • GL_RENDERBUFFER β€” renderbuffers
  • GL_FRAMEBUFFER β€” frame buffers

label is the address of a string that will be used to label an object. length contains the number of characters in label. If length is negative, it is implied that label contains a null-terminated string. If label is NULL, any debug label is effectively removed from the object 🫢.

πŸ’€ ERRORS πŸ’€

  • GL_INVALID_ENUM is generated if identifier is not one of the accepted object types.
  • GL_INVALID_OPERATION is generated if name is not the name of an existing object of the type specified by identifier.
  • GL_INVALID_VALUE is generated if the number of characters in label, excluding the null terminator when length is negative, is greater than the value of GL_MAX_LABEL_LENGTH.

πŸ”Ž ASSOCIATED GETS πŸ”Ž

glGet() with argument GL_MAX_LABEL_LENGTH. that's the one, no cap ✨.

πŸ“Š VERSION SUPPORT πŸ“Š

The table's Function/Feature Name is glObjectLabel, and the OpenGL Version vibe check goes like this:

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

πŸ‘€ SEE ALSO πŸ‘€

  • glPushDebugGroup()
  • glPopDebugGroup()
  • glObjectPtrLabel()

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 πŸ’– the footer says [FIXME: source], dated 08/09/2021, and signed GLOBJECTLABEL(3G) β€” periodt πŸŽ€.

πŸ“¦ where this page comes from