View Full Version : GL perspective

09-28-2001, 02:05 PM
I am slightly confused about perspective in OpenGL. I rendered a cube on the left side of the display
and I cannot see the right side of the cube unless I rotate it. This means the GL is projectinf along exact perpendiculars with the view port plane. How can I get it to do perspective correct mapping? That is perspective projection with a vanishing point in the middle of the screen. In this method perspective os projected along rays origination at the viewers eye an moving outward.


09-29-2001, 10:17 AM
Depends how you setup your projection matrix.
Easiest way is to use gluPerspective(...), if you use glOrtho(...) or gluOrtho2D(...) you get orthographic projection, that is without any depth.


09-29-2001, 10:25 AM
OpenGL is projecting throught projection matrix! It's all! Whow do you set matrix, that will be projection!