Hi there. I’m having a problem with glGenLists and glIsList. I have a program that creates a grid with a user defined x and y. It generates a list to display the grid. That works fine the first time, but it fails if I try to delete the first list and create a new one. It simply displays the original list.
I have a GLuint defined as a global. I get a list id using “grid=glGenLists(1)” and then create it with “glNewList(grid,GL_COMPILE)”. This works fine and I get a display list id of “1”. The next time I initiate the grid, I try to do a “if(glIsList(grid)) glDeleteLists(grid,1)”. First of all, the glIsList never returns a value other than 0 (if I set it equal to a GLuint or ‘’ if I set it equal to a GLboolean). Second, since the glDeleteLists is skipped, I get successive glGenLists(1) calls. So it should return something other than 1 since that’s what I used the previous time, right? Nope, I get 1 every time…
Am I missing something here?
Thanks,
Tad