Results 1 to 3 of 3

Thread: Distortions with Multi Viewports

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

    Distortions with Multi Viewports

    Hi,
    I'm using PyOpenGL to make two viewports, but they are both distorted in the y direction. My code is basically a best "guess" at how to do it.

    Can anyone show me code that would make two viewports side by side each 1/2 the width of the screen with no distortions in perspective (not ortho.)?
    Geometrian

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

    Re: Distortions with Multi Viewports

    Methinks you are not setting a proper aspect ratio.

    asp = viewport_width / viewport_height;
    gluPerspective(fov, asp, nearplane, farplane);

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

    Re: Distortions with Multi Viewports

    Ah. Right. I was dividing by the width of the entire thing. Thanks.

Similar Threads

  1. Cascaded Shadow Mapping: Projection distortions
    By Yattabyte in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 10-09-2015, 08:04 PM
  2. multi head/multi window simple program
    By advorak in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-13-2015, 07:56 PM
  3. glAccum distortions
    By Peter Maarssen in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-29-2008, 01:05 PM
  4. Distortions while playing open-gl games
    By in forum OpenGL: User Software
    Replies: 4
    Last Post: 10-31-2002, 03:30 PM
  5. Texture distortions
    By beavis in forum OpenGL: Advanced Coding
    Replies: 9
    Last Post: 10-27-2000, 03:53 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