GLCALLLISTS(3G)
๐ GLCALLLISTS(3G) ๐
okay bestie, pull up a chair, because we're about to talk about glCallLists from the 3G manual section โ she's the OpenGL baddie who executes a whole list of display lists in one go and honestly? iconic. โจ
๐ธ NAME ๐ธ
glCallLists โ execute a list of display lists. yes, a list of lists. we contain multitudes. ๐
๐ C SPECIFICATION ๐
void glCallLists( GLsizei n,
GLenum type,
const GLvoid *lists )
๐ฆ PARAMETERS ๐ฆ
nโ how many display lists you want executed. the headcount, the vibe check, the number of names we're pulling fromlists.typeโ the type of the values chillin' insidelists. she accepts these symbolic constants:GL_BYTE,GL_UNSIGNED_BYTE,GL_SHORT,GL_UNSIGNED_SHORT,GL_INT,GL_UNSIGNED_INT,GL_FLOAT,GL_2_BYTES,GL_3_BYTES, andGL_4_BYTES. that's the whole roster. ๐ซถlistsโ the address of an array of name offsets in the display list. the pointer type isvoidbecause those offsets can be bytes, shorts, ints, or floats, depending on whattypesays. she's flexible like that, no cap. ๐
โจ DESCRIPTION โจ
so here's the tea: glCallLists makes every single display list named in the lists array actually run. and because of that, all the commands saved up in each display list get executed in order โ literally just as if you'd called them without using a display list at all. names of display lists that were never defined? ignored. we don't even look at them. ๐
glCallLists is your efficient girlie for executing more than one display list at a time. and type is what lets her accept lists in all these different name formats:
GL_BYTEโlistsis treated as an array of signed bytes, each one in the range -128 through 127.GL_UNSIGNED_BYTEโlistsis treated as an array of unsigned bytes, each one in the range 0 through 255.GL_SHORTโlistsis treated as an array of signed two-byte integers, each one in the range -32768 through 32767.GL_UNSIGNED_SHORTโlistsis treated as an array of unsigned two-byte integers, each one in the range 0 through 65535.GL_INTโlistsis treated as an array of signed four-byte integers.GL_UNSIGNED_INTโlistsis treated as an array of unsigned four-byte integers.GL_FLOATโlistsis treated as an array of four-byte floating-point values.GL_2_BYTESโlistsis treated as an array of unsigned bytes. each pair of bytes specifies a single display-list name. the value of the pair is computed as 256 times the unsigned value of the first byte plus the unsigned value of the second byte. math girlie behavior. ๐งฎGL_3_BYTESโlistsis treated as an array of unsigned bytes. each triplet of bytes specifies a single display-list name. the value of the triplet is computed as 65536 times the unsigned value of the first byte, plus 256 times the unsigned value of the second byte, plus the unsigned value of the third byte.GL_4_BYTESโlistsis treated as an array of unsigned bytes. each quadruplet of bytes specifies a single display-list name. the value of the quadruplet is computed as 16777216 times the unsigned value of the first byte, plus 65536 times the unsigned value of the second byte, plus 256 times the unsigned value of the third byte, plus the unsigned value of the fourth byte.
okay so important: the list of display-list names is not null-terminated. no little\0saying goodbye at the end, bestie. instead,nis what tells her exactly how many names to take fromlists. periodt.
there's also an extra level of indirection available through the glListBase command โ she specifies an unsigned offset that gets added to each display-list name in lists before that display list is executed. cute little bonus layer. ๐
glCallLists can appear inside a display list, which is fun, but to avoid the possibility of infinite recursion from display lists calling each other, a limit is placed on the nesting level of display lists during display-list execution. this limit must be at least 64, and it depends on the implementation. so like, don't go feral with the recursion, she has boundaries. ๐ง
and heads up: GL state is not saved and restored across a call to glCallLists. so any changes made to GL state while those display lists are executing will still be there when execution finishes. if you want to preserve GL state across glCallLists calls, use glPushAttrib, glPopAttrib, glPushMatrix, and glPopMatrix. protect your state, queen. ๐
๐ 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. read the room and check the rules first, okay? ๐
๐ฅ ERRORS ๐ฅ
GL_INVALID_VALUEis generated ifnis negative. bestie. how many lists. you cannot execute a negative number of lists. ๐ญGL_INVALID_ENUMis generated iftypeis not one ofGL_BYTE,GL_UNSIGNED_BYTE,GL_SHORT,GL_UNSIGNED_SHORT,GL_INT,GL_UNSIGNED_INT,GL_FLOAT,GL_2_BYTES,GL_3_BYTES,GL_4_BYTES. pick from the menu or don't order. ๐
๐ ASSOCIATED GETS ๐
glGetwith argumentGL_LIST_BASEglGetwith argumentGL_MAX_LIST_NESTINGglIsList
๐ SEE ALSO ๐
glCallList(3G), glDeleteLists(3G), glGenLists(3G), glListBase(3G), glNewList(3G), glPushAttrib(3G), glPushMatrix(3G)
and that's the whole page, bestie!! this was GLCALLLISTS(3G), living her best life in the 3G manual section โ go execute some display lists and slay ๐
โจ๐ฆ๐
๐ฆ 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