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:: No Line Numbers


A Paste by XP
1
 
void Test()
{
        GLint   viewport[4];
        glGetIntegerv(GL_VIEWPORT, viewport);
        glMatrixMode(GL_PROJECTION);
        glPushMatrix();
        glLoadIdentity();
        gluOrtho2D(viewport[0],viewport[2],viewport[1],viewport[3]);

        glColor3f(1,1,0);
        glBegin(GL_QUADS);
        glVertex2f(10+0, 10+0 );
        glVertex2f(10+0, 10+5 );
        glVertex2f(10+5, 10+5 );
        glVertex2f(10+5, 10+0 );
        glEnd();

        glPopMatrix();
        return 0;
}