multipleview

Started by
2 comments, last by thomasggiusepe 22 years, 5 months ago
Hi there, How could I put 2 or more cameras view in the same scene? Some hints !? Thnx in advance. Thomas
Advertisement
Do you mean swapping between cameras or split-screen?
Hi,

e.g., if I have robot arm, I would like to see the robot motion from back and from above in the same time... so I will be have two ogl screen looking for the same scene with user input interactions with its related robot motion, but from diferent point of view in my 2 screen display.

Thnx, Thomas
To do that, use glViewport() calls.
Like this:

  glViewport(0, 0, 160, 120); //Use a 160x120 rectangle for first view//Now draw your first camera''s view hereglViewport(160, 0, 320, 120); //Use a 160x120 rectangle just to the right of the first//Now draw the second, and flip your back buffer (if you''re using one).  

This topic is closed to new replies.

Advertisement