I am still on the NeHe tutorials and I understand everything except for where they got the coordinates from.
void Display(void){
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glTranslatef(-1.5,0.0,-6.0);
glBegin(GL_POLYGON);
glVertex3f(0.0,1.0,0.0);
glVertex3f(1.0,-1.0,0.0);
glVertex3f(-1.0,-1.0,0.0);
glEnd();
glTranslatef(3.0,0.0,0.0);
glBegin(GL_QUADS);
glVertex3f(-1.0,1.0,0.0);
glVertex3f(1.0,1.0,0.0);
glVertex3f(1.0,-1.0,0.0);
glVertex3f(-1.0,-1.0,0.0);
glEnd();
glutSwapBuffers();
}
and they created the coordinate system with this
gluPerspective(45.0,(GLfloat)Width/(GLfloat)Height,0.1,100.0);
How did they know to translate and how did they get those numbers??