Jump to content
  • Advertisement
Sign in to follow this  
SteveHatcher

Can D3D 11 get the created d3d Device?

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

This might be a stupid question but...

 

In the very limited win32 programming I have seen, whenever you call a function that needs the created HWND, you can call GetActiveWindow().

 

Does direct 3d 11 have anything like this? Such that if I open a win 32 window, then initialize a d3dDevice, I can call something that gives me previously initialized device within that window?

 

Thanks

Share this post


Link to post
Share on other sites
Advertisement
Like Hodgman said.

You can store the device pointer in the window data, though. Store it (or your own struct that contains it) via SetWindowLongPtr.

If you're dealing with multiple windows, keep in mind that you might want to just keep a single device; attach the per-window swap chains and default render targets to the windows rather than the device. This will be especially beneficial if you plan to share any kind of resources between the two windows.

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!