PDA

View Full Version : Unloading Textures From Memory



Andreaz
01-01-2003, 11:05 AM
Hi.

Anyone knows how to destroy a texture and freeing it's memory that's created with glGenTextures ??

TheLion
02-01-2003, 12:45 PM
I'm not sure about this, but what if you would assign the value 0 to the texture variable?

Alimonster
02-01-2003, 04:21 PM
I think glDeleteTextures does the trick:


glDeleteTextures deletes n textures named by the elements of the array textures. After a texture is deleted, it has no contents or dimensionality, and its name is free for reuse (for example by glGenTextures). If a texture that is currently bound is deleted, the binding reverts to 0 (the default texture).

Your array would contain IDs from glGenTextures for each texture to squish.

Andreaz
03-01-2003, 05:43 AM
okey, thanks, think it's works =)

andygfx
28-03-2003, 09:36 AM
Hi.

Anyone knows how to destroy a texture and freeing it's memory that's created with glGenTextures ??

For remove texture from memory use this:

glDeleteTextures(1, @texture);