GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: Add Line Numbers


init by DELTRON
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluOrtho2D(0, WINDOW_X, 0, WINDOW_Y);
    // for the demonstration set the origin to the middle of the window
    glTranslatef(WINDOW_X/2,WINDOW_Y/2,0);
    // invert the y axis so that down is positive
    glScalef(1, -1, 1);

    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();