|
Well,
since he loads .bmp files, that means that he already has JAI installed, isn't
it ? .bmp files are not directly supported by java awt
toolkit.
It
make sense for .bmp files to load faster then anything else, since there is a
fairly large amount of decoding involved with gif and jpg
files.
However, what Dave Yazel has suggested is the most efficient algorithm to
load textures. I can't imagine anything faster than that. The only problem is
that you need to write a "converter" from whatever format are you using to the
raw int array containing the image !
So,
I'll do it in two steps:
1.
Preconstruct the images, using the classical TextureLoader to load the image and
build the mipmap levels, then extract the bytes containing the in-memory image
and save them to disk as raw int data.
2. At
runtime, don't bother using the TextureLoader anymore, just use Dave's algorithm
to directly load the prebuild raw data. You can use BY_REF mode to avoid
recopying of the data.
Cheers,
Florin
|
- Re: [JAVA3D] AW: [JAVA3D] Texture loading problem for big ... Florin Herinean
- Re: [JAVA3D] AW: [JAVA3D] Texture loading problem for... Lan Wu-Cavener
- Re: [JAVA3D] AW: [JAVA3D] Texture loading problem for... Lan Wu-Cavener
