LWJGL
May 17, 2012, 02:07:00
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
LWJGL 2.8.3 released!
Home
Help
Search
Login
Register
LWJGL
>
Archive
>
DevIL
>
ilLoadFromStream
Pages: [
1
]
« previous
next »
Print
Author
Topic: ilLoadFromStream (Read 5084 times)
DanDanger
Newbie
Posts: 21
ilLoadFromStream
«
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
ilLoadFromStream
«
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
ilLoadFromStream
«
Reply #2 on:
March 25, 2005, 01:26:09 »
fixed in CVS. Loads in a splitsecond now
Logged
http://certusgames.com
(Free Online Multiplayer Java Games)
http://lwjgl.org
(OpenGL/OpenAL for Java)
DanDanger
Newbie
Posts: 21
ilLoadFromStream
«
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
Logged
Matzon
Administrator
Demigod
Posts: 2177
ilLoadFromStream
«
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
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Programming
-----------------------------
=> Lightweight Java Library Game Development
=> LWJGL Documentation
=> Bug Reports / RFE
=> OpenGL
=> OpenAL
=> General Java Game Development
-----------------------------
Archive
-----------------------------
=> Resolved Bugs/RFE
=> DirectX
=> DevIL
=> FMOD
Loading...