Problem when loading more than 128 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
raytaller
Posts: 17
Joined: Wed Feb 07, 2007 11:28 am

Problem when loading more than 128 textures

Post by raytaller »

Hello
Context : Irrlicht 1.5, Win32, OpenGL or DirectX

I have some textures that I load :
driver->getTexture(...)
driver->getTexture(...)

and then I unload everything :
driver->removeAllTextures();

When I repeat this until driver->getTexture is called 128 times, my program no longer displays textures correctly (ie : some of the textured quads are not visible). I'm not calling drop() on any loaded texture.
Looking at the OpenGL driver code, I can't see why there would be any limitation on 128 textures loaded.

Any idea of what could cause this ?
I'll try to reproduce the bug on a standard demo
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Post by Sylence »

Maybe a driver or hardware limitation ?
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
raytaller
Posts: 17
Joined: Wed Feb 07, 2007 11:28 am

Post by raytaller »

Well, the problem is that it occurs even if removeAllTexture is called between the loadings... I was only stress-testing my save/load game system, so the number of loaded images is always the same.

The log says something like :
Loaded texture A
Loaded texture B
Loaded texture C

driver->removeAllTextures()

Loaded texture A
Loaded texture B
Loaded texture C

etc.

which proves that textures are indeed unloaded.
Unfortunately, I didn't manage to reproduce the bug on the samples, so I'll have to simplify my code until I can show explicit the bug here
raytaller
Posts: 17
Joined: Wed Feb 07, 2007 11:28 am

Post by raytaller »

Ok never mind, it certainly comes from my code
Post Reply