LWJGL/Slick-Util Image not displaying

Hi,

I am trying to load an image in LWJGL and am using Slick-Util, however, it is just displaying a white box, no image.

Here is my code (I am using states), also if anyone has an easier way of doing this, go right ahead and suggest it.

	private void render() {
		switch (state) {
		case INTRO:

			try {
				texture = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("res/nac.png"));
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			texture.bind(); // or GL11.glBind(texture.getTextureID());
			
			GL11.glBegin(GL11.GL_QUADS);
				GL11.glTexCoord2f(0,0);
				GL11.glVertex2f(100,100);
				GL11.glTexCoord2f(1,0);
				GL11.glVertex2f(100+texture.getTextureWidth(),100);
				GL11.glTexCoord2f(1,1);
				GL11.glVertex2f(100+texture.getTextureWidth(),100+texture.getTextureHeight());
				GL11.glTexCoord2f(0,1);
				GL11.glVertex2f(100,100+texture.getTextureHeight());
			GL11.glEnd();
		//	glColor3f(1.0f, 0.0f, 0.0f);
		//	glRectf(0, 0, width, height);
			break;
		case MAIN_MENU:
			glColor3f(0.0f, 0.0f, 1.0f);
			glRectf(0, 0, width, height);
			break;
		case GAME:
			gameState.draw();
			break;
		case RAND:
			new RandomTerrain();
			break;
		}
	}

Thanks,

  • Dan