LWJGL Forum

Archive => DevIL => Topic started by: mcsquared on February 14, 2007, 17:22:11

Title: Null Pointer Exception
Post by: mcsquared on February 14, 2007, 17:22:11
Hi

I'm trying to use devil to load a bitmap, the tutorial on the wiki.

The only difference in the code I am using is that i've added:

IL.create();
ILU.create();
ILUT.create();
ILUT.ilutRenderer( ILUT.ILUT_OPENGL );


before trying to load the image, and:

IL.ilLoadFromURL(IL.class.getClassLoader().getResource(name))

has been changed to:

IL.ilLoadImage(name)

But I keep getting a Null Pointer Exception at the line:

GL11.glGenTextures(scratch);

If you can't tell, I am very new to this and have no idea why this is happening.

Can anybody please help?

Cheers
Title: Re: Null Pointer Exception
Post by: Matzon on February 14, 2007, 22:00:45
have you created the Display prior to this ?
Title: Re: Null Pointer Exception
Post by: mcsquared on February 14, 2007, 22:51:49
sorry for wasting you time.

i was calling it before creating the display
Title: Re: Null Pointer Exception
Post by: mcsquared on February 15, 2007, 22:16:01
http://lwjgl.org/forum/index.php/topic,1600.0.html (http://lwjgl.org/forum/index.php/topic,1600.0.html)