Jump to content
  • Advertisement
Sign in to follow this  
tts1980

Multiple device in single application?

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

Hi all, I am relatively new to directX programming and currently I am working on a terrain tool which allows artist to paint a terrain in a 3D viewport and export the texture for in game usage. The problem arises when exporting the texture. The process involves rendering to a separate target (i.e. offscreen texture instead of the back buffer). The export is a long running process and this results in the application window freezing up and not updating the viewport during the period. I think this is unacceptable for a tool and was wondering if it's possible to have 2 devices, 1 for each target. I read on msdn that it seems possible but there will be performance penalty involved. Just wondering is using 2 devices a better idea or should I do some sort of rendering queue with 1 device that alternates between the export render target and the 3D viewport render target? Hope someone can advice on this. tts

Share this post


Link to post
Share on other sites
Advertisement
You can use multiple devices in a single application, but it sounds like what you actually want is multiple swap chains.

Share this post


Link to post
Share on other sites
Yes you can use multiple devices,but as SiCrane said you should use swap chains for your work. Actually there are several different methods to do multiple window rendering:
- Multiple devices ( where you need to create multiple d3d)
- Swap Chains ( where you can use multiple views on single device)
- Dual or more Head approach ( where you can render in fullscreen on several monitors)
- or you can just create one d3d and two devices with two different HWND and make two render calls for each of them
- or you can create one d3d window normally and draw texture with DC

Simplest will be the last one, because you can manage texture draw on DC very easy, while in d3d you need to lock, unlock textures....

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!