On using glFrustum,
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1, 1, -1, 1, 0.1, 1000.0);
glLoadMatrxi(GL_MODELVIEW);
glBegin(GL_QUADS); //A room's left wall
glVertex3f(-1.0, 1.0, 0.0);
glVertex3f(-1.0, 1.0, -0.4);
glVertex3f(-1.0, -1.0, -0.4);
glVertex3f(-1.0, -1.0, 0.0);
glEnd();
All my drawings happen in -1, 1 (notice the above snippet for //A room's left wall) i.e.
X- axis: -1 becomes the left, 1 becomes the right with origin in centre.
Y-Axis: 1 becomes the top and -1 becomes the right with origin in the center
Does glFrustum automatically change my coordinates to [-1,1]?
Normally, I would draw a cube with by specifying the screen coordinates as follows:
eg: ofBox(512,384,0,10) gives me a box in the center of screen [Window width: 1024, Window Height: 768]
What if I want to keep drawing as I draw normally in my pixel coordinates and don't want to make things complex for myself by trying to convert from pixel coordinates drawing to normalised coordinates even if I use glFrustum?
