Hello,
Every time I try to load a png using this method:
public static Texture loadTexture(String path){
try {
return TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream(path));
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
I get this in my console and a black screen:
WARN:class org.newdawn.slick.opengl.PNGImageData failed to read the data
Any ideas? Thanks.
That has nothing to do with LWJGL, if you have a problem with the Slick2D library you should try to find help in a Slick2D support forum.
If you cant get it to work I would recommend using the PNGDecoder by Mathias Mann. I am using it myself and it is pretty good and very reliable.