Results 1 to 7 of 7

Thread: gluperspective perameters

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2005
    Posts
    20

    gluperspective perameters

    im using the gluperspective function and the objects i draw dont look realistic. im trying to make a simulator and a door thats suppose to be 7 feet high by 3 feet looks like a door thats 10 feet high and 1 foot wide.
    gluperspective 54, width / height, .1, 15000

    whats a more realistic set of perameters i can use

  2. #2
    Senior Member Regular Contributor
    Join Date
    Aug 2005
    Posts
    145

    Re: gluperspective perameters

    Are width and height floats for the divide?

    If you want to look through your monitor, like a virtual window into the world, some simple trig will get you an appropriate fov to use, given a typical eye distance from the screen.

    Watch zNear and zFar, don't hose your depth buffer. Try zNear = 1?

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2005
    Posts
    20

    Re: gluperspective perameters

    width and height is the pixel width and height of the screen.

    as far as the number 45 in the gluperspective function. i have no clue what its suppose to mean or what it does

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jul 2005
    Location
    Berlin, Germany
    Posts
    188

    Re: gluperspective perameters

    Originally posted by ninjarider:
    width and height is the pixel width and height of the screen.
    Just make sure they are floating point values. I not, you will get an integer division, which means your aspect ration will not contain the fractional part of the division result.

    as far as the number 45 in the gluperspective function. i have no clue what its suppose to mean or what it does
    It is the Field of View of your view frustum in y direction. The vertical opening angle of your camera.
    355/113 -- Not the famous irrational number PI, but an incredible simulation!

  5. #5
    Junior Member Newbie
    Join Date
    Jul 2005
    Posts
    20

    Re: gluperspective perameters

    is the angle of the camera view to be concidered from ground level up or is it the full radius of the angle

  6. #6
    Senior Member Regular Contributor
    Join Date
    Jul 2005
    Location
    Berlin, Germany
    Posts
    188

    Re: gluperspective perameters

    The full angle between the upper and lower planes of the view frustum.
    355/113 -- Not the famous irrational number PI, but an incredible simulation!

  7. #7
    Senior Member Regular Contributor
    Join Date
    Aug 2005
    Posts
    145

    Re: gluperspective perameters


Similar Threads

  1. gluPerspective(few more)
    By vivek vyas in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-29-2009, 02:37 AM
  2. gluPerspective
    By vivek vyas in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-15-2009, 08:59 PM
  3. Gluperspective
    By in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 12-03-2002, 12:38 AM
  4. about gluPerspective
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-17-2001, 04:12 AM
  5. gluperspective
    By fox in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-31-2000, 10:43 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