View Full Version : glut coordinates help please

02-18-2003, 04:02 AM

I'm using glut to draw some polygons
inside a window.

the problem is i'm only using coordinates
such as 0 <= x,y <= 1 and i want (0,0)
to be bottom left of window, and not
the center of the window!

right now i did a transformation macro
FIX(x) (2*(x)-1)
and it works okay
but i'm pretty sure there is a better
normal way to do it ...
my question is how?


02-18-2003, 05:06 AM
This is what you use the projection matrix for.

glOrtho(0, 1, 0, 1, -1, 1);

02-18-2003, 02:07 PM
thank you