PDA

View Full Version : What to clear when closing an OpenGL windows?



Anonymous Coward
08-25-2000, 02:43 AM
I should delete Texture objects with glDeleteTexture(), what else should someone clear when closing a window? pointers?

Gorg
08-25-2000, 03:39 AM
display lists,

rendering context
device context

all other memory allocated

MikeC
08-25-2000, 05:10 AM
For performance you should be using a private DC (CS_OWNDC in the window class) - you don't need to release these, and in fact calling ReleaseDC on one will fail harmlessly.

I thought texture objects and dlists are automatically cleaned up when their RC is deleted, but I wouldn't swear to it.

Gorg
08-25-2000, 05:35 AM
They supposedly are, but it is always good practive to release memory you allocated just in case the platform you are running one doesn't do that job too well for you.