I tried the TextureLoader Tutorial
http://lwjgl.org/wiki/doku.php/lwjgl/tutorials/devil/loadingtextures,
and for some reasons, I don't get it to work! I'm trying to load a jpeg-file.
I added
IL.create();
ILU.create();
ILUT.create();
after trying to load a Texture the first time, it throws a NullPointer-Exception when executing this part:
if (!IL.ilLoadFromURL(IL.class.getClassLoader().getResource(name))) {
return null;
}
I replaced it with:
if(!IL.ilLoadImage(name)) {
return null;
}
No the Exception is throwed around this part:
GL11.glGenTextures(scratch);
GL11.glBindTexture(GL11.GL_TEXTURE_2D, scratch.get(0));
oglImageHandle = scratch.get(0);
And I'm using it like this:
...
Texture tex = TexureLoader.loadTexture("resources/texture.jpg", false);
...
Does somebody got a clue whats wrong? Or is it my fault...I'm a bit confused...
Thanks in advance!