Archived

This topic is now archived and is closed to further replies.

Multiple Viewports/Perspectives

This topic is 5963 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How can you make Multiple Viewports/Perspectives?? Like a square in the top left of your screen that shows the view through someone in your squad''s eyer etc.? Ive seen this done in a few D3D games, but I dont remember seeing it in openGL, is there a way to do this, is it very complicated? thx in advance

Share this post


Link to post
Share on other sites
To do something like that, you''d need to render two scenes, your view and the buddy-cam view, render the buddy cam in a samll off-screen buffer and blit onto the primary buffer.

If you wanted a rear-view, you might be able to use environment mapping...

Magmai Kai Holmlor
- Not For Rent

Share this post


Link to post
Share on other sites
Ive done this before, one of the ways to do this is to render the everything you need from the 2nd cameras POV to a texture, then render the texture to a quad. The only problem with this is the speed factor. This will probably slow down your framerate considerably so you will want to implement a lower LOD for the 2nd POV because it will probably be rendered to a smaller portion of the screen.

Share this post


Link to post
Share on other sites
I think the simplest way is something like this:


glViewport(yadda yadda);
// set projection matrix

// Draw first scene


glViewport(yadda yadda);
// set projection matrix

// Draw second scene


I''m not sure if you can have the viewports overlapping though.

Share this post


Link to post
Share on other sites