LWJGL Rectangle Textures (new to openGl)

ok so I’m trying to make a spritesheet and I’m at the point where I’m trying to only get part of the spritesheet drawn

public SpriteSheetSprite(Texture texture, int x, int  y, int maxCol, int maxRows){
		this.texture = texture;
		this.x = x;
		this.y = y;
		this.maxCol = maxCol;
		this.maxRows = maxRows;
				
		glBindTexture(GL_TEXTURE_RECTANGLE_ARB, texture.getTextureID());
		//texture.bind();
	}

	@Override
	public void Render() {
		glBegin(GL_QUADS);
			glTexCoord2f(0,0);
			glVertex2i(x,y);//top left
			glTexCoord2f(32,0);
			glVertex2i(x + getWidth(),y);//top right
			glTexCoord2f(32,32);
			glVertex2i(x+ getWidth(),y + getHeight());//bottem right
			glTexCoord2f(0,32);
			glVertex2i(x,y + getHeight());//bottem left
		glEnd();
		
	}

Using the above code my quad gets an image which is the spritesheet stretched over and over, that is to be expected as we’re no longer wrapping the texture around the quad from 0,0 to 1,1

The problem I’m having is that when I switch OpenGl from GL_TEXTURE_2D to GL_TEXTURE_RECTANGLE_ARB the texture no longer wants to be applied to the quad (I just get a white rectangle). Here is my code for initalizing open gl

	private void startOpenGl(){
		glMatrixMode(GL_PROJECTION);
		glLoadIdentity();
		glOrtho(0,Settings.WIDTH, Settings.HEIGHT,0,1,-1);
		glMatrixMode(GL_MODELVIEW);
		glEnable(GL_TEXTURE_RECTANGLE_ARB);
	}

any help on the matter would be awesome

[]Texture rectangles are old and no longer necessary – you should stick to GL_TEXTURE_2D.
[
]If you’re using SlickUtils (which is also old and crappy…) then you should not call glBindTexture directly, but instead stick with texture.bind() and TextureImpl.bindNone().
[]For that matter, glBegin/glEnd is also old and deprecated… but if you must use it, don’t call glBegin and glEnd for each quad. Instead, batch a bunch of quads within a single draw call. Also glBindTexture before you render your quad to be sure you are not binding other textures, rather than only doing it once at creation time.
[
]Also note that SlickUtils is based on GL_TEXTURE_2D and doesn’t support texture rectangles.

If you are keen to learn things using more “modern GL approaches,” see here: