GLLOADNAME(3G)

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

πŸ’– GLLOADNAME β€” the 3G girlies' guide to loading names πŸ’–

okay bestie, welcome to GLLOADNAME(3G) β€” the page where we learn how to slap a name onto the top of the name stack. it's giving selection mode support, it's giving unsigned integers, it's giving everything. let's go 🫢


✨ C SPECIFICATION ✨

void glLoadName( GLuint name )

πŸŽ€ PARAMETERS πŸŽ€

  • name β€” the name that's gonna replace the top value on the name stack. that's it. that's the whole job. she's a simple icon πŸ’…

🌸 DESCRIPTION 🌸

so here's the tea, bestie β˜• β€” the name stack is what we use during selection mode to let sets of rendering commands be uniquely identified. it's literally just an ordered set of unsigned integers. no cap. that's the whole data structure. slay.

glLoadName makes name replace the value on the top of the name stack. and bestie, hear me when i say: that stack is initially empty. like, fresh out the box, zero notes, no entries. 😭

and now the important part β€” the way that the name stack is always empty while the render mode is not GL_SELECT?? yeah. so if you call glLoadName while the render mode is not GL_SELECT, it's ignored. just straight up ignored. she's not even mad, she's just not listening. πŸ™ˆ

✨ friendly reminder bestie: selection mode on = name stack has opinions. selection mode off = name stack is empty and your calls are getting left on read.

πŸ’€ ERRORS πŸ’€

things that will absolutely not pass the vibe check:

  • GL_INVALID_OPERATION is generated if glLoadName is called while the name stack is empty. ma'am. there's nothing there to replace. πŸ’€
  • GL_INVALID_OPERATION is generated if glLoadName is executed between the execution of glBegin and the corresponding execution of glEnd. do not do this. i'm begging. 😭

πŸ” ASSOCIATED GETS πŸ”

want the receipts? you can pull these:

  • glGet with argument GL_NAME_STACK_DEPTH
  • glGet with argument GL_MAX_NAME_STACK_DEPTH

πŸ¦‹ SEE ALSO πŸ¦‹

the girlies in the same friend group, iykyk:

  • glInitNames(3G)
  • glPushName(3G)
  • glRenderMode(3G)
  • glSelectBuffer(3G)

and that's the whole page, bestie!! GLLOADNAME(3G), 3G manual, living her best life in the OpenGL docs πŸ’– go forth, load those names, stay out of GL_INVALID_OPERATION jail, and remember β€” no cap, the name stack is always empty when you're not in GL_SELECT. periodt. πŸ‘‘βœ¨

πŸ“¦ where this page comes from