Texture and VRAM optimization

Blitz3D Forums/Blitz3D Programming/Texture and VRAM optimization

Nikko(Posted 2004) [#1]
Hi all,

I've a problem with a model, it uses only 4 different texture files, but is splited in several parts each referencing the same texture files.

When I do a loadmesh, it seems that if there are 10 reference to the same texture, this texture is loaded 10 times in the memory.

Does anymone has made some kind of b3d parser that will extract each models adn their textures and affect them (optimize) in the way that the textures are loaded only once in memory VRAM?


Gabriel(Posted 2004) [#2]
You don't need to. Blitz manages textures automatically. You are being a little wasteful with surfaces, so if you could stand joining together different parts using the same surface, join them, but if you check VRAM usage and compare it with the textures ( uncompressed, of course, since Blitz uncompresses all textures into VRAM ) I think you'll find that each texture is only being loaded once.


John Blackledge(Posted 2004) [#3]
Textures are only reloaded if:
a) The name differs.
b) The texture flags differ.
c) The folder is different.
So if you can keep all your textures in one folder, and not change the flags you can easily re-use the same textures with no extra memory loss.