Clearing textures?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
terence
Posts: 12
Joined: Sat Apr 01, 2006 2:22 pm
Contact:

Clearing textures?

Post by terence »

Hi,

Probably a stupid question, but not asking is worse.

I know you call driver->getTexture(X) to load a texture but I don't see a 'clear'/release texture function. I am assuming that the engine does texture management for us? Still I am building a surface management class and would like to be able to clear a texture..or should I not even bother.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

The video driver has a texture cache. Every time you call getTexture for a texture that is not yet in the cache, it will be loaded from disk. Once it is in the cache, it will remain until you remove it. The IVideoDriver interface provides methods for removing textures from the cache.

If a texture has been removed from the cache, it should be automatically deleted when the last reference to it is dropped.

Travis
Post Reply