GL perspective

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.

Robin.

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.

Mikael

OpenGL is projecting throught projection matrix! It’s all! Whow do you set matrix, that will be projection!