PDA

View Full Version : Problem with display and transformation 3D -> 2D



11-04-2003, 02:05 AM
Hi,
I would like to display a rectangle in a window of size cx, cy with OpenGL. I wish that my rectangle be to entirely post and that it is largest possible. How to know the coordinates of the tops of my rectangle so that this one is posted correctly???
For the moment, I do that:
glViewport(0, 0, cx, cy);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45, (float)cx/(float) cy, 0, 1000);
gluLookAt(0,0,-10,0,0,0,0,1,0);

Do somebody know how to solve my problem??

Solen