Was not sure to post in math or here but lets have a try here.
usually when u want to have the origin coordinate (0,0) in the upper left corner, Y looking down, (instead of the default “center of screen Y looking up” coordinate system), you just call:
glOrthof(0, width, height, 0, -1, 1),
But in my case i need first to do a 90 rotation (iphone lansacape mode). New code becomes:
glRotatef(90.0, 0.0, 0.0, 1.0);
glOrthof(0, width, height, 0, -1, 1);
this doesnt work because after the 90 degree rotation my upper left corner becomes the lower left corner (if you rotate the rectangle its quiet obvious).
My question is:
what kind of transformation shall i do (after the glRotate) to keep my original current system (0,0 at upper left, Y looking down)…
i guess its obvious when you know math behind opengl but i dont understand them …