GLPUSHNAME(3G)
π GLPUSHNAME π
okay bestie, we're in the 3G manual section and today's topic is glPushName and glPopName β the two functions that push stuff onto and pop stuff off the name stack. yes the name stack is real and yes it's a whole vibe. π
β¨ NAME β¨
glPushName, glPopName β push and pop the name stack π«Ά
β¨ C SPECIFICATION β¨
void glPushName( GLuint name )
πΈ PARAMETERS πΈ
nameβ the name you're yeeting onto the name stack. that's it, that's the whole parameter, she's simple and she serves. β¨
β¨ C SPECIFICATION (round two, electric boogaloo) β¨
void glPopName( void )
π DESCRIPTION π
so, the name stack. it's the thing that shows up during selection mode and lets you give a unique identity to whole sets of rendering commands. it's an ordered set of unsigned integers, and it starts out empty β like, completely empty, no names, nothing, not a single one. π
glPushName causes name to be pushed onto the name stack. glPopName pops one name off the top of the stack. push, pop, push, pop, it's giving stack energy, it's giving LIFO, it's giving iconic. π
the maximum name stack depth is implementation-dependent β no fixed number bestie, it depends on your implementation. call GL_MAX_NAME_STACK_DEPTH to find out the value for a particular implementation. and here's the part where we get serious for a sec:
it is an error to push a name onto a full stack, or to pop a name off an empty stack. it is also an error to manipulate the name stack between the execution ofglBeginand the corresponding execution ofglEnd. in any of these cases, the error flag is set and no other change is made to GL state. π¨
also! the name stack is always empty while the render mode is not GL_SELECT. calls to glPushName or glPopName while the render mode is not GL_SELECT are ignored β literally just screaming into the void, no cap. π
π₯ ERRORS π₯
GL_STACK_OVERFLOWis generated ifglPushNameis called while the name stack is full. (too much!! overflowing!! the drama!! π)GL_STACK_UNDERFLOWis generated ifglPopNameis called while the name stack is empty. (popping from nothing?? she's empty bestie, stop π)GL_INVALID_OPERATIONis generated ifglPushNameorglPopNameis executed between a call toglBeginand the corresponding call toglEnd. (do NOT do this in between, i am begging π)
π ASSOCIATED GETS π
glGetwith argumentGL_NAME_STACK_DEPTHglGetwith argumentGL_MAX_NAME_STACK_DEPTH
π SEE ALSO π
glInitNames(3G)glLoadName(3G)glRenderMode(3G)glSelectBuffer(3G)
okay that's the whole page bestie, you ate that. this was GLPUSHNAME from the 3G manual β mwah, go push some names responsibly, and remember: no pushing on a full stack, no popping on an empty one. periodt. πβ¨ππ¦πΈπ π«Ά
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- fedora 43: gl-manpages 1.1-34.20190306.fc43 Β· Apache-2.0 AND HPND AND HPND-sell-variant AND MIT AND OpenPBS-2.3 AND SGI-B-2.0 AND W3C-19980720 AND X11
- fedora 44: gl-manpages 1.1-35.20190306.fc44 Β· Apache-2.0 AND HPND AND HPND-sell-variant AND MIT AND OpenPBS-2.3 AND SGI-B-2.0 AND W3C-19980720 AND X11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms