I am using .PNG files. I can not use the jpgDecoder. I think my only choice
is to use Florin/Dave's algorithm. Thanks for this two step recipe. I was
not thinking obviously.
Thanks!
Lan
At 03:02 PM 6/6/2003 +0200, you wrote:
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
-----Urspr�ngliche Nachricht-----
Von: Alessandro Borges [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 6. Juni 2003 14:28
An: [EMAIL PROTECTED]
Betreff: Re: [JAVA3D] Texture loading problem for big files ...
Another options is install JAI - Java Advanced Imaging - without changing
a line in your code.
In the TextureLoader's Javadocs advices it .
Could you report what works best for you ?
Alessandro
----- Original Message -----
From: <mailto:[EMAIL PROTECTED]>hammad
To: <mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 1:58 AM
Subject: [JAVA3D] Texture loading problem for big files ...
I am trying to load a map within my 3D Universe via TextureLoader
utility.. The problem which i am facing is that is eats a hell lot of time ....
I have tried differenent file formats like gif, bmp and jpg ..... the.bmp
files loads the fastest that is around 40 secs ... which is a 12MB file ....
Is there any more elegant way to load such huge files quicker ... I am P4
system with GForce4 3D card ... so processing is not an issue out here ..
and the map is in the order of 2 so the loading should be efficent in that
case as well
I am using it like this
Texture texture = new TextureLoader(mapPath,null).getTexture();
Any ideas ...
Hammad
Do you Yahoo!?
Free <http://us.rd.yahoo.com/mail_us/tag/*http://calendar.yahoo.com>online
calendar with sync to Outlook(TM).
Lan Wu-Cavener
Dept. of Landscape Architecture
==========================================================================To
unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".