LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Rainer on April 18, 2007, 05:54:19

Title: Loading textures without DevIL
Post by: Rainer on April 18, 2007, 05:54:19
Can anybody tell me how to load textures without DevIL? I just found a tutorial with DevIL, but DevIL has been removed from LWJGL...
Title: Re: Loading textures without DevIL
Post by: Matzon on April 18, 2007, 06:30:15
DevIL hasn't been removed... yet. It's in the optional package.
Title: Re: Loading textures without DevIL
Post by: Rainer on April 18, 2007, 07:48:22
Guess I'm to stupid, but how can i use the optional package  ???
Title: Re: Loading textures without DevIL
Post by: Matzon on April 18, 2007, 08:38:12
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
Title: Re: Loading textures without DevIL
Post by: Rainer on April 18, 2007, 09:21:12
thanks
Title: Re: Loading textures without DevIL
Post by: Rainer on April 18, 2007, 10:09:22
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?
Title: Re: Loading textures without DevIL
Post by: Matzon on April 18, 2007, 12:40:52
remember to call IL.create - and make sure the devil dll's are in the library path
Title: Re: Loading textures without DevIL
Post by: Rainer on April 18, 2007, 13:47:30
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)
)
Title: Re: Loading textures without DevIL
Post by: rainforest on April 18, 2007, 16:05:07
Please check the texture width and height, they are important and should be of the power of 2. For example 128x16, 256x256 etc.
Title: Re: Loading textures without DevIL
Post by: Rainer on April 18, 2007, 16:10:09
it's a 256x256 .tga file
Title: Re: Loading textures without DevIL
Post by: Rainer on April 18, 2007, 16:39:12
Another try:
I downloaded the LWJGL code for NeHe Lesson 7, it compiles fine, starts fine, shows a cube, but no texture...  ???
Title: Re: Loading textures without DevIL
Post by: nicolasbol on April 24, 2007, 18:14:45
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