Sign in to follow this  
freka586

[SlimDX] DX and SDX upgrade scenarios?

Recommended Posts

First of all, thanks for all the quick answers to my previous questions. All have been really helpful and posted with impressive speed! My current interest concerns the future life of SlimDX and DirectX, more specifically different upgrade scenarios. What would happen when trying to run: a) Older DirectX and newer SlimDX? (July DX and September SlimDX) b) Newer DirectX and older SlimDX? (September DX and July SlimDX) Or is the topic perhaps slightly more complicated and one cannot make a general assumption but need to look at each individual scenario?

Share this post


Link to post
Share on other sites
SlimDX is upgraded to the latest SDK version every time there is a new release. This means that in order for SlimDX to run as-is, you need to have the redist installed on the target machine for the latest release.

Using an older version of SlimDX should work correctly, since a full DirectX installation carries with it all previous binaries.

If the "currentness" of SlimDX poses a problem for you, there is a solution, although it will take slightly more work on your part. You can download the source from the repository and change the project to reference whichever SDK version you need. You will also have to fix any compile errors that result, but they should be few and far between (they represent the breaking changes introduced by the DX team over the course of however many releases you are jumping).

We used to have a wiki page explaining how to do that in detail, but it was lost when the wiki went down a few months ago. If you feel you need to do this, let us know and we'll help you out.

Share this post


Link to post
Share on other sites
OK, I think I have a good picture of how things work! I should be able to handle building against a different version on my own, if we choose to go that way.

Thanks.

Share this post


Link to post
Share on other sites
On a fairly related topic (at least close enough to avoid adding yet another thread)...

As I now understand, the SlimDX installer contains a minimum DX redist of the correct version. From a deployment perspective it is an interesting thought to use only this one and not worry about the DirectX redist.

However, I am having some problems getting the full picture of how a dual platform 32/64-bit scenario would be best setup in this case. Basically we would have a 64-bit build machine that outputs both a 32-bit and 64-bit version of the application.

From an end user perspective he/she would simply run the corresponding version of the SlimDX installer, and all is golden. But on the build and reference side I am struggling a bit...

Is there any way to avoid having 2 of every single assembly that includes SlimDX? Ie, to have some sort of conditional include, such that when I am building and targeting 32-bit CPU that version of the SlimDX as referenced, and when building 64-bit the other one is used? Given the size and complexity of our main SlimDX assemblies I would like to avoid having duplicate assemblies, basically at any cost...

Share this post


Link to post
Share on other sites
Normally this might be handled with an "Any CPU" build, however the nature of our project setup and the fact that we have to link against the 32 or 64 bit versions of the binary makes this a bit problematic for us to support right now.

It's something we've been looking into but it is not immediately clear what the optimal solution is.

Share this post


Link to post
Share on other sites
When you add the reference to SlimDX, VS explicitly specifies the processor architecture to use. It's not clear to me why it does this, but in any case, you can open the project file in text mode (Unload Project, then Edit) and remove the architecture setting. That will make it use whatever is available, which should behave correctly.

Share this post


Link to post
Share on other sites
That last post by Promit sure does sound promising, but I'm not sure I follow things completely..

* What kind of reference to SlimDX should I be adding to my project? From Program Files? GAC? Copy to local when building?
* When doing a quick test I ran into troubles caused by x64 machines having a different file/folder structure, so I assume anything related to Program Files does not seem very reliable.

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