glDeleteLists doen't free memory 😕!

Hi!

I’m developong a mfc app, which uses openGL in order to draw on each view, after which I use some GDI to draw text.

Each view has its own display list, referenced by a unique index. Each time the view’s image must be rerendered from scratch, I delete the display list and recalc it, which works fine.

The problem is that, when I destroy the view, the memory used by the last display list calculated is not alliberated. However, I call glDeleteLists on the view’s destructor, so I can’t understant what’s happening.

Any guesses will be appreciated. thanks in advance!

just a guess : are you sure that by the time the view destructor is called, your GL context is still current and valid? If not, any gl* call is ignored.

Try:

glNewList();
glEndList();
glDeleteLists();

So you are sure that your contents of your display list are overridden, and therefore deleted.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.