Sign in to follow this  
SubMatrix

[SlimDX] Device constructor + Direct3D object

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this