Hi!
I just decided to switch to lwjgl 2.0, now I'm trying to replace the DevIL code with slick.
Any examples for loading images via Slick and turning them into a texture?
Maybe I just think to complicated, but I can't get it... :-\
Thanks!
Texture texture = TextureLoader.getTexture("PNG", new FileInputStream("testdata/rocks.png"));
...
texture = TextureLoader.getTexture("PNG", new FileInputStream("testdata/rocks.png"));
System.out.println("Texture loaded: " + texture);
System.out.println(">> Image width: " + texture.getImageWidth());
System.out.println(">> Image height: " + texture.getImageWidth());
System.out.println(">> Texture width: " + texture.getTextureWidth());
System.out.println(">> Texture height: " + texture.getTextureHeight());
System.out.println(">> Texture ID: " + texture.getTextureID());
btw way, its slick-util that replaces Devil and Fmod, and not Slick.
Its probably what you meant but just to avoid confusion as they are very easy to mix up. ;D
Just looked at the wrong "place"! :-[
Thanks!
Quote from: javalwjgl on June 26, 2008, 20:12:32
btw way, its slick-util that replaces Devil and Fmod, and not Slick.
Its probably what you meant but just to avoid confusion as they are very easy to mix up. ;D
but the TextureLoader needs a loggin-class that is in slick and not in slick-utils...
It is in the binary JAR, missing from the source package. Just uploading a new package now.
Kev