PDA

View Full Version : Who manage texture memory?



mdive
12-01-2003, 10:27 PM
Hello.

When we get texture handle from OpenGL API(like glGenTextures, glBindTexture, etc), who release these memory allocated for texture when we exit our application?

OpenGL video card like nVidia automatically release these memory background?

If you know, I hope any comments.

Sorry, my broken English.
Thanks.

mikael_aronsson
12-01-2003, 11:14 PM
The nice thing to do is to call glDeleteTextures when your application closes, but the textures are "owned" by the opengl context so when that is closed the textures will be deleted... (with a little luck....)

Mikael

mdive
12-02-2003, 02:54 AM
Thank you very mach for your reply.

I recalled glDeleteTextures()!
(My old code called glDeleteTextures()...)

I ashamed of having asked such a thing!

I'm very glad to see your advaice.
Thank you very much.

I'll enjoy happy coding http://www.opengl.org/discussion_boards/ubb/smile.gif