Advertisement Jump to content
Sign in to follow this  

picture in picture

This topic is 4910 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

Let me clarify that a bit. You can get the main viewport like this:

gD3dDevice->GetViewport( &m_mainViewport );

then make a copy for your picture in picture and set it to a size and screen position:

// Create a PIP viewport

// Make it a set size

// Position

In your render loop set the main viewport using SetViewport and render as normal. Then set the viewport to the PIP viewport and change camera etc whatever you want to do - and render again. Note you only have to clear the z buffer before rendering this.

That works fine although render to texture may be better depending on use.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!