I have a little problem with this function:
My little program (from a tutorial) works fine, i can see the 2D-polygon.
glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
glColor3f(1.0, 1.0, 1.0);
glVertex3f(0.25, 0.25, -0.20);
glVertex3f(0.75, 0.25, -0.20);
glVertex3f(0.75, 0.75, -0.20);
glVertex3f(0.25, 0.75, -0.20);
But when i try to change my view to the objects by adding the line
in front of the glOrtho i can’t see anything.
But when looking from (0,0,-15) to (0,0,0) i’m still looking in the z-axis and should see the polygon in the (x,y)-plane.
Perhaps i misunderstood something in using this function.
(Just for explanation:
i need to draw a cube with glutSolidCube() but the cube is automatically not centered, so i need to center it myselfe -with glOrtho- and then hope to be able to view it from different directions -with gluLookAt-)
Or are there any other way to do this?
Any suggestions and help is welcome.