Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Getting the viewport

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2001
    Location
    India
    Posts
    19

    Getting the viewport

    I understand that
    glGEtIntegerv(GL_VIEWPORT,viewport) will
    return the current viewport cordinates.

    Question: What will happen if I mention more than one viewports while drawing.
    say,
    Setviewport ( left half)
    draw object 1
    Setviewport ( Right half)
    draw object 2

    In this case which value will
    glGEtIntegerv(GL_VIEWPORT,viewport) function
    returns.

    I am trying to use selection buffer in a split screen.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Dec 1969
    Location
    Munich,Germany
    Posts
    227

    Re: Getting the viewport

    glGetIntergerv (GL_VIEWPORT, viewport) gives you the last viewport specified. <I am not sure what exactly will happen if you just change your viewport, the only thing I know is that nothing outside the viewport will be randered to backbuffer but calls like glClear are going to clear the complete buffer, no matter how your viewport is set.

    hope that helps
    Chris
    yes

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2001
    Location
    India
    Posts
    19

    Re: Getting the viewport

    Chris, I agree, But as I said, i am working with selection buffers.
    So When I do a mouse click on the left screen, I should get the viewport set for left screen. right?
    How do I get this?
    thanks
    sur

  4. #4
    Junior Member Regular Contributor
    Join Date
    Dec 1969
    Location
    Munich,Germany
    Posts
    227

    Re: Getting the viewport

    oops didn't read your last sentence
    I'm not sure how to handle the selection buffer, sorry can't help you there

    Chris
    yes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •