Hi,
I'm still dealing with this stuff...
So the initial conditions are the following: I have an
.irr file, an
.irrmesh file (size is approx. 50 MB), an
.obj file and an
.mtl file.
house.irrmesh 58,824,784 bytes
house.obj 23,417,887 bytes
house.irr 1,433,932 bytes
house.mtl 24,396 bytes
The problem is, that the texture loading time of the 154 jpg textures is more than one minute. Size of the directory is 40 MB.
I tried out, what happens, if I load the textures into memory as a very first step in the main() function:
Code: Select all
IImage* ThreadTexture = 0;
device->getVideoDriver()->addTexture ( "pictures\\recorder_texture_512.jpg" , ThreadTexture , 0 );
device->getVideoDriver()->addTexture ( "pictures\\bookshelve1.jpg" , ThreadTexture , 0 );
device->getVideoDriver()->addTexture ( "pictures\\bookshelve2.jpg" , ThreadTexture , 0 );
...(+151 more lines)
device->getVideoDriver()->getTexture ( "pictures\\recorder_texture_512.jpg");
device->getVideoDriver()->getTexture ( "pictures\\bookshelve1.jpg");
device->getVideoDriver()->getTexture ( "pictures\\bookshelve2.jpg");
...(+151 more lines)
When I execute my app, I can see, that the textures are loading much faster, when loading from the original place (via .irr file). But, when the code reaches the .irr file loading part, my application crashes without any informative window...
I thought, that with this method, I can include some kind of multithreading to this texture loading part, and if the textures will be in memory in the beginning of my application quickly, than the .irr file loading process will not load them once again.
Experts, please comment.
Thanks!