GLINITNAMES(3G)

πŸ“¦ version 24.3.3, in opensuse-leap 16.0

✨ NAME ✨

glInitNames β€” bestie, this is the one that resets your name stack to empty πŸ’…


πŸŽ€ C SPECIFICATION πŸŽ€

void glInitNames( void )

That's it. No args, no return value, no drama. She's a void queen. πŸ‘‘


🌸 DESCRIPTION 🌸

okay so picture this: the name stack is what you use during selection mode, and its whole job is letting sets of rendering commands be uniquely identified. iykyk πŸ¦‹

It's made of an ordered set of unsigned integers, like a little lineup of IDs, one after another, in order, no cap.

What glInitNames does is cause that name stack to be initialized to its default empty state. poof. gone. fresh start. ✨

and here's the important bit: the name stack is always empty while the render mode is not GL_SELECT. so if you call glInitNames while the render mode isn't GL_SELECT, the call is just… ignored. literally ignored. she said nothing to me. πŸ’€

πŸ’€ ERRORS πŸ’€

  • GL_INVALID_OPERATION is generated if glInitNames is executed between the execution of glBegin and the corresponding execution of glEnd.

so like, do NOT try to slide this in mid-glBegin/glEnd block, bestie. that's a hard no. 🚫


🫢 ASSOCIATED GETS 🫢

  • glGet with argument GL_NAME_STACK_DEPTH
  • glGet with argument GL_MAX_NAME_STACK_DEPTH

🌈 SEE ALSO 🌈

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

go read those next, they're the rest of the friend group fr fr 🧚


and that's the whole page, gorgeous 🌟 this lil' cutie lives in the GLINITNAMES(3G) manual page β€” the 3G section, which is where all the OpenGL besties hang out. mwah, go forth and init your names πŸ’–πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from