I just wanted to know what the default behavior, if any, of a display list in the event of the following sequence of calls (all calls here are just illustrated for order, not syntax):
//////////////////////////////////////
glGenLists(foo);
glNewList(foo);
// What happens now:
glNewList(foo);
// … Any number more of glNewList(foo)'s
// …
glDeleteLists(foo);
//////////////////////////////////////
My question is, after the list is generated, the first glNewList fills the list. Am I leaking any memory by the subsequent glNewList calls, or am I automagically deleting any memory used by the previous list and reusing/replacing it with the new one?
I ask this question because it gets kindof hard to track the glGenLists/glNewList/glDeleteList cycles, and having to delete a list (or lists) and regenerate all associated lists would be very annoying.
One point I must make is that I haven’t had any adverse effects using the type of code I’ve just questioned. I would like to know whether or not this will break on other video systems down the road.
Thanks in advance for anyone and everyone looking into this with me.
Siwko
(I know each implementation is different, but hey, you never know.)