Jump to content
  • Advertisement
Sign in to follow this  
QuinnJohns

Windows within Windows

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

I'd like to do how calagari truspace does, how you can create 4 windows that can be seperately rendered within the running application, all of which are resizable. In my perception, the window that has focus when running the render button, will be rendered only-- does anyone have any tutorial or know some good sample code to get me started for the picture-in-picture windows? An included note: the windows will be viewing the same scene, just different camera angels, top, left, right, perspective. |[ 1 ][ 2 ] |[ 3 ][ 4 ] Thanks in advance for all the help. This application is the start of a world editor for me.

Share this post


Link to post
Share on other sites
Advertisement
Thanks. I'll take a look at that. Any other options?

I saw from another thread, I've seen a post where people
are using 'multiple devices' with 'swap chains'? Based on what,
I need to accomplish, is there an adverse difference between
viewports vs swap chaining devices?

Thanks again for any addt'l information.

Share this post


Link to post
Share on other sites
There are several ways to achieve this.

1) Single device, single swap chain. In this method, you have a swap chain render target that is at least as large as the largest window. For each window you render the scene to the appropriately sized viewport on the render target and then do a RECTangle based Present of the rendered area in the render target to the window. All the windows share a single swap chain. One of them can be implicitly associated with the swap chain, but its not necessary since you are using the HWND override in the Present anyway.

2) Single device, multiple swap chains. In this method you have one swap chain per window and you just render each one and Present with no HWND override. The rendering is epsilon easier than 1), but you're burning video memory for all of the swap chains unlike 1).

3) Multiple devices, one per window. This is just plain dumb, don't do this. You don't need multiple devices in this scenario and doing so will just make the gods come down from Mt. Olympus and smite thee. Don't do it.

In Chapter 7. Viewing and Projection in my book I have a sample application that renders multiple views of the same scene.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!