All pastes #369900 Raw Edit

Mine

public text v1 · immutable
#369900 ·published 2007-02-24 03:26 UTC
rendered paste body
    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();