Jump to content
  • Advertisement
Sign in to follow this  
SubMatrix

[SlimDX] Device constructor + Direct3D object

This topic is 3567 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, I've been trying to port my application to SlimDX so that I can compile a 64-bit version. Unless I am missing something, I noticed that in the latest release the constructor for the Device class was changed to take a SlimDX.Direct3D object as a parameter. Later on in my code, I make a call to CheckDeviceMultisampleType(), which now resides in this SlimDX.Direct3D class. The function is no longer static, however (as it previously was in MDX), so I am curious how to get back the Direct3D object that I used to create my Device. The Device class doesn't seem to hold on to it on creation (as far as I can tell). Am I supposed to keep track of the Direct3D object I pass to the Device constructor myself? Or am I missing something simple here? Great work overall on SlimDX btw.

Share this post


Link to post
Share on other sites
Advertisement
Yeah, you have to keep track of it yourself. This was mainly done because D3D 9Ex support was a problem otherwise. Honestly, you can just shove a public static Direct3D Direct3D = new Direct3D(); somewhere and it will yield basically the same results.

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!