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 6 of 6

Thread: rendering to multiple windows

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2003
    Posts
    5

    rendering to multiple windows

    I want to create a solar sistem in full screen, and when the user selects a planet i want that in a small window to show only that planet spining and maybe some info text about it. How can i do that?

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,651

    Re: rendering to multiple windows

    glViewport allows you to select what area of a window to render to, so you can render your solar system first, then change the viewport to a smaller rectangle in one of the corners or something like that and render the "zoom in" there. (remember to reset the viewport at the end...)

    Mikael

  3. #3
    Junior Member Newbie
    Join Date
    Nov 2003
    Posts
    5

    Re: rendering to multiple windows

    ok....i tryed the glViewport but the problem is that is actualy rendering the whole scene in a part of the window.....and i just want to render a part....so it doesn't work

  4. #4
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,651

    Re: rendering to multiple windows

    Not sure I understand what the problem is, you can render anything you want to the current viewport, change the viewport and render something different any number of times if you want.

    Mikael

  5. #5
    Junior Member Newbie
    Join Date
    Nov 2003
    Posts
    5

    Re: rendering to multiple windows

    Yes, the thing is that i still want the solar sistem to be visible on the full screen(even if it doesn#t move anymore).
    When i use glViewport the whole screeen becomes black besides the part where i render.....Can't i keep the big solar sistem, and render something differend the same time in a small window?

  6. #6
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,797

    Re: rendering to multiple windows

    Did you also setup a scissor test for your new viewport? You can use that to keep glClear from clearing the rest of the scene.
    Deiussum
    Software Engineer and OpenGL enthusiast

Posting Permissions

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