Can anybody tell me how to load textures without DevIL? I just found a tutorial with DevIL, but DevIL has been removed from LWJGL...
DevIL hasn't been removed... yet. It's in the optional package.
Guess I'm to stupid, but how can i use the optional package ???
just download it here: http://downloads.sourceforge.net/java-game-lib/lwjgl_optional-1.0.zip?use_mirror=switch
extract on top of lwjgl and include it on the classpath.
http://lwjgl.org/wiki/doku.php/lwjgl/tutorials/index#devil
thanks
whatever i try, i get this exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.lwjgl.devil.IL.nilGenImages(ILjava/nio/IntBuffer;I)V
at org.lwjgl.devil.IL.nilGenImages(Native Method)
at org.lwjgl.devil.IL.ilGenImages(IL.java:344)
What can be wrong?
remember to call IL.create - and make sure the devil dll's are in the library path
where do i need to call IL.create()?
you were right, they weren't in the path, but now i still get errors.
(without calling create still the UnsatisfiesdLinkError, with calling it it gives:
org.lwjgl.opengl.OpenGLException: Invalid operation (1282)
at org.lwjgl.opengl.Util.checkGLError(Util.java:56)
at org.lwjgl.opengl.Display.swapBuffers(Display.java:555)
at org.lwjgl.opengl.Display.update(Display.java:571)
)
Please check the texture width and height, they are important and should be of the power of 2. For example 128x16, 256x256 etc.
it's a 256x256 .tga file
Another try:
I downloaded the LWJGL code for NeHe Lesson 7, it compiles fine, starts fine, shows a cube, but no texture... ???
Look at this game's code:
http://lwjgl.org/forum/index.php/topic,2289.0.html
All the texture loading is done without Devil (mainly because it was supposed to run on linux and MacOsX as well).
Fab