Results 1 to 4 of 4

Thread: difference between glFrustum() and glOrtho

  1. #1
    Member Newbie
    Join Date
    Nov 2010
    Posts
    31

    difference between glFrustum() and glOrtho

    can someone explain difference between the two and should they be called in same program

  2. #2
    Member Contributor
    Join Date
    Jan 2011
    Posts
    78

    Re: difference between glFrustum() and glOrtho

    Frustum makes far objects look smaller, but Ortho does not. Thus, you would use Frustum in 3D rendering, and Ortho for 2D rendering.

  3. #3
    Senior Member Regular Contributor remdul's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands
    Posts
    346

    Re: difference between glFrustum() and glOrtho

    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.

  4. #4
    Member Contributor
    Join Date
    Jul 2007
    Location
    Forest Grove, OR, and/or UNM
    Posts
    67

    Re: difference between glFrustum() and glOrtho

    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.

Similar Threads

  1. GlOrtho and glFrustum
    By BruceG in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 06-21-2014, 10:40 AM
  2. Replies: 3
    Last Post: 10-03-2007, 12:55 AM
  3. glFrustum/glOrtho
    By jenny in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 08-15-2002, 07:33 AM
  4. glFrustum
    By imported_Flavius in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-18-2001, 03:55 AM
  5. glFrustum()...
    By jtwoods in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 12-20-2000, 01:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean