Skip to main content
gamedev.net
🔒 Locked

simple question about glTexImage2D and texture objects

Started by Khaos Dragon Jun 4, 2004 at 6:26 PM 0 replies 200+ views
Original Post
Khaos Dragon
Khaos Dragon
I have tried to look this up on google but couldn't find a definite awnser. My question can be asked by posing a small little example. Say you store into a specific texture object via glTexImage a 1024 by 1024 image. Then later you bind to that texture image and use glTexImage again to load in a 256 by 256 image. This is clearly much less memory than before, but is the huge amount of memory first allocated for the object freed since now it only has to deal with this small image? Edit: And I know I could technically use glDeleteTextures to be guaranteed I am freeing the memory, but if opengl takes this into consideration I would prefer to do things as mentioned above. [edited by - Khaos Dragon on June 4, 2004 7:27:28 PM]
ga
ga
opengl doesn''t say anything about that, it''s implementation-dependant. depending on your graphics card and driver, you may get texture memery fragmentation but i think the same is true if you delete the texture first. i think for practical purposes it doesn''t make a difference.
Visit our homepage: www.rarebyte.de.stGA

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.