Display List problem

I have an OpenGL application in Windows that use a Display List for a large polygon object (including the color and normal of each vertex). When the display list is created it works fine the first time, but the next time the display list is invalid. Does someone know the reason for this problem?

Regards, Oscar Antezana

If you mean that when you recreate the display list that it becomes invalid, then try doing the following-

if (glIsList(yourlist))
glDeleteLists(yourList,range);
yourList=glGenLists(range);

before recreating the Display List.

If it is happening for some other reason, then you should post your code.

Without seeing any code it’s hard to say, but my guess is you are not using the right id when you try and redisplay the list the next frame. Try stepping through it and make sure you aren’t losing the id of the list somewhere.

Sounds like a static vs dynamic variable…
just a guess.