I'm making a tile based game, and the Textures for the Tiles are 16x16. Whenever I try to load the Texture so it can be rendered,
I get this error:

Code :

java.io.IOException: Attempt to allocate a texture to big for the current hardware
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:292)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:231)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:184)
at org.newdawn.slick.opengl.TextureLoader.getTexture(TextureLoader.java:64)
at org.newdawn.slick.opengl.TextureLoader.getTexture(TextureLoader.java:24)
at main.Tile.loadTexture(Tile.java:124)
at main.Draw.drawMap(Draw.java:282)
at main.Draw.render(Draw.java:324)
at main.LaunchWindow.main(LaunchWindow.java:65)
Exception in thread "main" java.lang.NullPointerException
at main.Draw.drawMap(Draw.java:284)
at main.Draw.render(Draw.java:324)
at main.LaunchWindow.main(LaunchWindow.java:65)

I am not a Java person but I would sugest looking at the loader code - things like missing file

01-22-2013, 08:33 AM

cookedbird

I am also not a Java (not with opengl at least) person but my guess would be would be that the space for the texture was never allocated correctly. Did you call glGenTexture and all that stuff (not sure what it would be in java)