public void draw(int x, int y) {
// store the current model matrix
GL11.glPushMatrix();
// translate to the right location and prepare to draw
GL11.glTranslatef(x, y, 0);
GL11.glColor3f(50,100,100);
// draw a quad textured to match the sprite
GL11.glBegin(GL11.GL_POLYGON);
{
GL11.glVertex2d( 0.5, 0.5);
GL11.glVertex2d( 0.5, -0.5);
GL11.glVertex2d(-0.5, -0.5);
GL11.glVertex2d(-0.5, 0.5);
}
GL11.glEnd();
// restore the model view matrix to prevent contamination
GL11.glPopMatrix();