Disable texture pooling for some textures?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Disable texture pooling for some textures?

Post by Andi|xng »

As far as I know, getTexture() load a texture only then, when it is not already loaded.
Is it also possible to load a texture two times (or more often), by disabling the texture pooling of the IVideoDriver?

In my special case, I want to use different 2d images for my GUI. I want to delete them, as soon as the corresponding GUI object is destroyed. removeTexture() is not a solution, because I need multiple "instances" of the texture, because they are modified independently...

Any ideas? Thanks.
Elise
Posts: 48
Joined: Tue Jul 19, 2005 6:30 am
Contact:

Post by Elise »

Try using addTexture(), it creates new texture for every image.
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Post by Andi|xng »

Thanks :) I can not believe that the solution is so simple ;)
addTexture() really makes a copy of the old texture, not only a new reference? I did not really understand the docs here. But it sounds as if it really is a copy.
Post Reply