Jump to content
  • Advertisement
Sign in to follow this  
Sambori

Present to Multiple Views

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

If I have one Direct3D device that renders to multiple views or widgets, can I use Present on the same device but each time for different view by passing it the view/widget's window handle? Do I have to reset the view port before Present based on the current view dimensions? If so do I have to Reset the device? If the whole idea is wrong, what's the best way to do it? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
You can present your back buffer to as many views as you want. The area of the window that is painted is controlled by the "pDestRect" parameter of Present(), not the viewport. If your backbuffer is a different size, it will be scaled to the target rectangle.

You don't need to reset the device unless you want to change the size of your backbuffer. If you want multiple backbuffer sizes, you can create additional swap chains for your windows and specify the size you want.

Share this post


Link to post
Share on other sites
These views are not going to be of fixed size, they are resizable.

Rendering to a different size as you said it gonna scale up or down the original buffer size and map it to fit into the present view. This may cause artifacts such as blocky/jaggy images vs. rendering to the view size.

Hmmm I'm not sure of a limitation in D3D itself because this can be done easily in OpenGL, just to give an example.



Share this post


Link to post
Share on other sites
In that case you'll want to create additional swap chains. When you create a swap chain you specify the size of the backbuffer used, and you can make it match the client area of your window. Then if a window resizes, you just Release the old swap chain and create a new one. You only need to call Reset if you want to resize the backbuffer used by the device's implicit swap chain.

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!