Results 1 to 5 of 5

Thread: Single window, dual viewport: How?

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Los Angeles, CA USA
    Posts
    3

    Single window, dual viewport: How?

    I'm brand spankin' new to OpenGL so I apologize for cluttering up the forum, but:

    I want to create a single window, 512x256 with two viewports each 256x256. I want to render a solid object in the right viewport, and a wireframe object in the left viewport, both displayed at the same time. I can do one viewport that fills the entire window, but how do what I want?

    Thanks in advance.

  2. #2
    Senior Member Regular Contributor
    Join Date
    Nov 2000
    Posts
    370

    Re: Single window, dual viewport: How?

    Use glViewport.

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Los Angeles, CA USA
    Posts
    3

    Re: Single window, dual viewport: How?

    Yes, I knew to use glViewport. I performed a search and was able to find the answer I needed.

    New question though: I have two viewports going each with their respective objects, however, the aspect ratio is whacked right from the get go, the square are tall and narrow. How do I manage to the aspect correct working within two viewports?

    Secondly, on resizing of the window, I don't want anything to change except the window. Like a window in your home, if you shut the blinds halfway, you only see out half the window now. That's what I want to do.

    Thanks in advance.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    Aurora, Illinois, USA
    Posts
    192

    Re: Single window, dual viewport: How?

    gluPerspective
    Navreet Gill [img]/forum/images/%%GRAEMLIN_URL%%/smile.gif[/img]

  5. #5
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Los Angeles, CA USA
    Posts
    3

    Re: Single window, dual viewport: How?

    Okay, now I can do all that.

    Now I do want everything to resize along with the window resize.

    So the question is how do you maintain proper aspect ratios with two viewports?
    One viewport is no problem but two?

    Thanks in advanced.

Similar Threads

  1. Replies: 2
    Last Post: 09-26-2012, 11:39 AM
  2. Single Pass Dual-Paraboloid Shadow Mapping
    By mark76 in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 08-11-2005, 12:10 AM
  3. How to make one window for dual displays?
    By linux-nerd in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 12-06-2002, 09:43 AM
  4. Replies: 0
    Last Post: 03-19-2001, 09:37 AM
  5. Viewport or multiple viewport in a window!
    By Boubou in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 11-30-2000, 05:45 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