GLCALLLIST(3G)

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

πŸ’– NAME πŸ’–

glCallList β€” bestie, this is the one that executes a display list. like, actually runs it. periodt. ✨


🌸 C SPECIFICATION 🌸

void glCallList( GLuint list )

πŸŽ€ PARAMETERS πŸŽ€

  • list β€” the integer name of the display list you want executed. that's it, that's the whole vibe check. πŸ’…

✨ DESCRIPTION ✨

okay so glCallList causes the named display list to be executed. the commands that were saved in that display list get executed in order, literally just as if you had called them without using a display list at all. same energy, same result. πŸ¦‹

and here's the tea: if list has not been defined as a display list, glCallList is just... ignored. no drama, no error, it simply does not engage. πŸ’€

glCallList can appear inside a display list. which is cute until you realize display lists can call each other, and that's how you get infinite recursion β€” the recursion glitch of your nightmares 😭. so to avoid that possibility, a limit is placed on the nesting level of display lists during display-list execution. this limit is at least 64, and ngl it depends on the implementation. so don't go feral with the nesting, bestie.

GL state is not saved and restored across a call to glCallList. so any changes made to GL state during the execution of a display list remain after execution of the display list is completed. the state changes are staying, they're committed, they're main character energy πŸ‘‘

want to preserve GL state across glCallList calls? use glPushAttrib, glPopAttrib, glPushMatrix, and glPopMatrix. those are your besties for this. 🫢


πŸ“ NOTES πŸ“

display lists can be executed between a call to glBegin and the corresponding call to glEnd, as long as the display list includes only commands that are allowed in this interval. so like, read the room and check what's allowed in there first. πŸ™ˆ


πŸ” ASSOCIATED GETS πŸ”

  • glGet with argument GL_MAX_LIST_NESTING
  • glIsList

πŸ‘€ SEE ALSO πŸ‘€

  • glCallLists(3G)
  • glDeleteLists(3G)
  • glGenLists(3G)
  • glNewList(3G)
  • glPushAttrib(3G)
  • glPushMatrix(3G)

and that's the whole page, no cap πŸ’œ this was GLCALLLIST(3G), from the 3G manual, girlies β€” go forth and execute your display lists responsibly πŸŒˆβ­πŸ’–

πŸ“¦ where this page comes from