LWJGL
May 17, 2012, 02:07:00 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.8.3 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: ilLoadFromStream  (Read 5084 times)
DanDanger
Newbie
*
Posts: 21


« on: March 24, 2005, 14:25:33 »

Hello all!

Just adding to the pool of knowledge:

Has anyone used IL.ilLoadFromStream() ? I was tryng to use it and thought it was crashing but it turns out it was taking about 30 secs to load my image from a jar file.

I now use this code , which runs fine, instead :

            InputStream is = new BufferedInputStream( getClass().getResourceAsStream(path));

            ByteBuffer bb = ByteBuffer.allocateDirect(is.available()).order(ByteOrder.nativeOrder());
            byte[] ba = new byte[(int)is.available()];
            is.read(ba);
            bb.put(ba);
            bb.clear();
            IL.ilLoadL(IL.IL_TGA,bb,is.available());
            IL.ilLoadFromStream()
            is.close();
Logged
Matzon
Administrator
Demigod
*****
Posts: 2177



« Reply #1 on: March 24, 2005, 15:16:46 »

the current implementation is rather unoptimized. I am working on making devil load dynamically and will optimize the method while I am at it.
Logged

http://certusgames.com (Free Online Multiplayer Java Games)
http://lwjgl.org (OpenGL/OpenAL for Java)
Matzon
Administrator
Demigod
*****
Posts: 2177



« Reply #2 on: March 25, 2005, 01:26:09 »

fixed in CVS. Loads in a splitsecond now Smiley
Logged

http://certusgames.com (Free Online Multiplayer Java Games)
http://lwjgl.org (OpenGL/OpenAL for Java)
DanDanger
Newbie
*
Posts: 21


« Reply #3 on: April 20, 2005, 04:32:59 »

yeah!

Ill have to get that from CVS, as soon as I figure out how to use cvs Smiley
Logged
Matzon
Administrator
Demigod
*****
Posts: 2177



« Reply #4 on: April 20, 2005, 05:59:39 »

0.96 includes that fix
Logged

http://certusgames.com (Free Online Multiplayer Java Games)
http://lwjgl.org (OpenGL/OpenAL for Java)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!