PDA

View Full Version : display lists leed to big win386.swp



kschroed
01-26-2001, 05:48 AM
hi all! i have 3 displaylists (600+ quads) that need to be recalculated periodically. This process

1. glDeleteLists(1, 3) // if existing
2. glNewList(1), ... glNewList(2), ... glNewList(3) .... // rebuild lists
3. display // looks really good!!
4. do certain things and GOTO STEP 1

seems to leave significant amounts of memory in the swapfile every cyclus. i tested this on different gfx boards (s3, ati, nvidia) -> same result.

any idea?

thank you!

Relic
01-26-2001, 06:28 AM
Difficult to answer with these few informations.
If it happens on different OpenGL implementations chances are high that the program itself leaks memory.

Actually you don't need to delete the lists. Just call glNewList with the desired id and the currently existing list will be overwritten.
glDeleteLists when you exit the program.

BTW, if you periodically regenerate geometry, you might want to look at vertex arrays instead of display lists, too.

coco
01-26-2001, 08:39 AM
just in case, do you call glEndList() for each corresponding glNewList()?

kschroed
01-27-2001, 12:00 AM
Originally posted by coco:
just in case, do you call glEndList() for each corresponding glNewList()?

I do! I didn't want to post the whole code. sorry!

holocaust
01-28-2001, 03:48 AM
Don't be afraid to show us more if you want more help....
Sharing pieces of code won't kill trust me :)