View Full Version : find the diferences!
This is probably a silly question but i would like a more precise distinction between these functions:
Thanks in advance
05-16-2004, 07:36 AM
To get a full description of those function and all the other I suggest you have a look at the OpenGL spec. you can find it at this website, it explains all the details and is pretty easy to understand to. This together with some tutorials (can also be found here or with google) would give you a pretty good start.
05-16-2004, 08:20 AM
gluPerspective, glOrtho, and glFrustum all modify the _projection matrix_. The projection matrix transforms eye coordinates into screen coordinates. glFrustum gives you a perspective projection, which makes things look as they do in real life (objects appear smaller as they get further away). gluPerspective actually calls glFrustum internally. gluPerspective provides you with an easier way to set up a viewing frustum. glOrtho sets up a parallel projection, meaning that objects appear the same size when they are far away as they do when they are close. Orthographic projection is used in many 3D modellers for the 3 non-perspective views. Orthographic projection is also used for drawing 2D graphics in OpenGL, since it allows you to map world coordinates directly to screen coordinates.
Finally, gluLookAt is different from the others, because it modifies the _modelview matrix_, not the projection matrix. gluLookAt is supposed to give you an easy way of orienting your "camera".
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.