View Full Version : difference between glFrustum() and glOrtho
03-19-2011, 06:10 AM
can someone explain difference between the two and should they be called in same program
03-19-2011, 07:08 AM
Frustum makes far objects look smaller, but Ortho does not. Thus, you would use Frustum in 3D rendering, and Ortho for 2D rendering.
03-19-2011, 12:01 PM
And for completeness, yes they can be called in the same program. As DarkGKnight said, you can draw a 2D GUI (ortho) on top of a 3D scene (perspective). Before drawing each of those two elements you redefine the projection matrix with glFrustum or glPerspective.
03-19-2011, 12:42 PM
glFrustum should be compared with gluPerspective: both set up perspective matrices. The difference is that glFrustum takes clipping planes as arguments, and gluPerspective takes a field of view and aspect ratio.
glOrtho and gluOrtho2D set up 2D projection modes (i.e., parallel projection). Such are not necessarily 2D, but they do imply that farther objects are not any smaller than closer ones.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.