glut coordinates help please


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?


This is what you use the projection matrix for.

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

thank you