Skip to main content
GameDev.net gamedev.net
🔒 Locked

Multiple Viewports/Perspectives

Started by asaari Aug 14, 2001 at 5:07 PM 3 replies 600+ views
Original Post
asaari
asaari
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
Shannon Barber
Shannon Barber
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
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Slinger
Slinger
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.
wolfman8k
wolfman8k
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.
ironfroggy
ironfroggy
I''m sure the viewport thing would work. I was going to suggest that too. If there are any problems, just mask out the rest of the scene when doing the 2nd camera.
(http://www.ironfroggy.com/)(http://www.ironfroggy.com/pinch)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.