Jump to content
  • Advertisement
Sign in to follow this  
bjle

Using direct3d with windows gui

This topic is 4975 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've been trying to figure out the best way of using direct3d along with the windows gui. This was pretty easy with DirectDraw, where I could just assign a surface to each HWND...but according to MSDN creating multiple d3d devices will cause a huge performance hit. Is using the HWNDOverride parameter in Present() a viable way to do this, or is there an easier/better way? EDIT: Sorry, I should make it clear that I was interested in having two or more "scroll-able" child windows each using d3d, within one main parent window.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by bjle
Is using the HWNDOverride parameter in Present() a viable way to do this, or is there an easier/better way?
Yup, that's the usual way to do things I beleive.
For each D3D (child?)window you have, you render a seperate scene, and use the HWND parameter in Preset() to tell it to copy to that window.
You get a minor performance loss (You're rendering 2 scenes per frame), but I expect you're expecting that.

If you have a multihead card (one card that exposes 2 adapters), or 2 physical cards, you can create 2 devices without any performance loss. But if that's the case, you'll have 2 monitors, so you'll need to have 1 window on each monitor, which would be a little silly :P

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!