Display lists & wglDeleteContext

Hi!

  1. I’d like to know if wglDeleteContext deletes all desplay lists created on that context?

  2. Are there all unique indices or glGenLists may return the same IDs on different contexts?

There is no sharing between the display lists!

Thanks in advance,
Peter

The specification allows the implementation to return the same Id from different contexts. Similarly, you may specify the same Id in different contexts, and have them mean different things, if lists are not shared.

The lists will be auto-deleted when all contexts that the lists have been shared into are deleted.

Thx, very much!

Do i have to delete the opengl context manually or is this done automatically, when the program is terminated (as I would guess)? Sometimes the program seems to be running significantly slower after it has been run and terminated several times.

It will be nice to manually delete lists and all gl object (textures, VBO,…) that you create in some context. Driver should delete them too, but if you leave this job to driver it may run to memory leak if driver have bug and OS can be unstable.

yooyo