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


inverted origin by DELTRON
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluOrtho2D(0, WINDOW_X, 0, WINDOW_Y);

    // invert the y axis so that down is positive
    glScalef(1, -1, 1);
    // origin will be upper left
    glTranslatef(0, -WINDOW_Y, 0);

    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();