I'm trying to use your code to get lwjgl to display a 2d png image on the screen, however I'm a bit stuck
in my init I have
1 2
| TextureLoader textureLoader = new TextureLoader(); Texture fontTexture = textureLoader.getTexture("font","data/test.png"); |
I also declared fontTexture at the top using:
1
| private static Texture fontTexture; |
then in my render part I have:
everything works fine when I leave the bind() part out, but when I put it in I get the following output:
Loading texture data/test.png to ID: 1 wrap:true mipmapped:false
java.lang.NullPointerException
at org.lwjgl.examples.Game.render(Game.java:170)
at org.lwjgl.examples.Game.run(Game.java:115)
at org.lwjgl.examples.Game.main(Game.java:45)
Press any key to continue...
This should probably go into the Clueless Newbie section, because my main question is of course how the hell do I get a 2d sprite on the screen using lwjgl. I figured on the texture loading, I've done the first 5 nehe tutorials with success. I had a look at the Space Invaders 103 tutorial. But I can't get it to work

So I guess I'm clueless, but I'm just missing something.