Results 1 to 4 of 4

Thread: gluPerspective() / glOrtho() ??

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2002
    Posts
    27

    gluPerspective() / glOrtho() ??

    Hi,
    It may be a basic doubt....
    What is the major difference between gluPerspective() and glOrtho() ?.In glOrtho(), we can specify the left,right bottom and top co-ordinates range.But in gluPerspective()there is any parameter for that.If any need for specifying if using gluPerspective() ?.If needed how i can specify ???

    Thanks for any input,

    Jerry

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: gluPerspective() / glOrtho() ??

    Ortho and Perspective are two diffrent render modes.

    glOrtho draw's every thing as if you where looking down at an image on a piece of paper.
    Object do not get smaller as they move away from you.

    gluPerspective gives a camara type function: field of view angle.
    aspect ratio, how square the image is.
    Area to render start point and end point on the z plane.
    With Perspective mode of rendering objects look smaller as you move them away from the camara.
    With gluPerspective use just the glViewport to set hight and width.


    Originally posted by jerin3D:
    Hi,
    It may be a basic doubt....
    What is the major difference between gluPerspective() and glOrtho() ?.In glOrtho(), we can specify the left,right bottom and top co-ordinates range.But in gluPerspective()there is any parameter for that.If any need for specifying if using gluPerspective() ?.If needed how i can specify ???

    Thanks for any input,

    Jerry

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,502

    Re: gluPerspective() / glOrtho() ??

    More to the point (pun intended), the perspective projection setup by gluPerspective has a vanishing point, whereas the othognal projection setup by glOrtho has no vanishing point.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Location
    Kingston, Jamaica, W.I.
    Posts
    282

    Re: gluPerspective() / glOrtho() ??

    gluPerspective() is essentially a user friendly wrapper for glFrustrum(). If I remember right glFrustrum() uses the same parameters as glOrtho() namely left, right, top, bottom, near, far. But because its a perspective projection its not as intuitive to use a glOrtho() hence the heavy reliance on gluPerspective().

    Feel free to correct me if I'm wrong.

Similar Threads

  1. How can I use glOrtho and gluPerspective in same frame?
    By Mars_999 in forum OpenGL: Advanced Coding
    Replies: 8
    Last Post: 03-14-2006, 08:06 AM
  2. gluPerspective after glOrtho
    By tmgergo in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-19-2004, 01:28 AM
  3. help switching between glortho and gluperspective
    By bogaat in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-14-2003, 07:26 AM
  4. gluPerspective vs glOrtho
    By jesusgumbau in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 02-12-2001, 03:07 PM
  5. glOrtho or gluPerspective ....
    By KurtCob in forum OpenGL: Advanced Coding
    Replies: 10
    Last Post: 10-19-2000, 04:58 AM

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