Hi, I got lwjgl working on my computer and I am trying to load a png with slick util. Lwjgl alone is working just fine, but when I added slick-util to my project, it crashes when I try to load an image(see code below).
Texture tex;
try {
tex = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("rsrc/tux.png")); // <==== Crash Line
} catch (IOException e) {
e.printStackTrace();
}
I added the jar file for slick util in eclipse. I didn't add any natives for slick, I searched and it seems like I just have to add the jar file(am I right here?). The error code is this one:
Exception in thread "main" java.lang.NoSuchMethodError: org.lwjgl.opengl.GL11.glGetInteger(ILjava/nio/IntBuffer;)V
at org.newdawn.slick.opengl.renderer.ImmediateModeOGLRenderer.glGetInteger(ImmediateModeOGLRenderer.java:194)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:317)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:254)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:200)
at org.newdawn.slick.opengl.TextureLoader.getTexture(TextureLoader.java:64)
at org.newdawn.slick.opengl.TextureLoader.getTexture(TextureLoader.java:24)
at HelloWorld.loop(HelloWorld.java:106)
at HelloWorld.run(HelloWorld.java:32)
at HelloWorld.main(HelloWorld.java:152)
I think that it may have to do with the project's setup. But the lwjgl natives are there. Maybe it's just that slick works with lwjgl2?
Anyway, I can't get it to work, Any Ideas?