How do I change the following lines during the initialization, so that
the origin is at the center and not at the bottom left ?
Code:glMatrixMode ( GL_PROJECTION ); glLoadIdentity(); gluOrtho2D ( 0.0, (GLdouble)320, 0.0, (GLdouble)240 );
How do I change the following lines during the initialization, so that
the origin is at the center and not at the bottom left ?
Code:glMatrixMode ( GL_PROJECTION ); glLoadIdentity(); gluOrtho2D ( 0.0, (GLdouble)320, 0.0, (GLdouble)240 );
For a clipping rectangle with width xSize and height ySize:
Code:gluOrtho2D(-xSize/2.0, xSize/2.0, -ySize/2.0, ySize/2.0);
Consider this post signed