DirectX SDK vs Windows SDK: which one to use?

jaho picture jaho · Dec 3, 2013 · Viewed 11.2k times · Source

I have an old game engine (sort of) based on DirectX 10, which I've been planning to move to DX 11. I have also just installed Windows 8 and VS 2013 and, while trying to run this old project I've learnt that DirectX SDK has been deprecated and now replaced by Windows 8 SDK. In this case I wonder whether it makes sense to update to DX 11 or should I try and make my engine use the new Windows 8 SDK. There are several things I'd like to know before I make the decision:

1) Is Windows 8 SDK the thing to learn now or is DX 11 still relevant? Like, if you want to learn C++ you should learn C++11, so if you want to learn Direct3D now, you should learn Windows 8 SDK?

2) There are plenty of great resources for learning DirectX SDK: a lot of tutorials, Microsoft's own samples, NVidia Graphics SDK samples, AMD Radeon SDK samples etc. Are there any similar quality materials available for Windows 8's Direct3D or just msdn at the moment?

3) Will my Windows 8 SDK based engine run only on Windows 8?

4) Any first hand experience / comparisons between the two?

Many thanks!

Answer

Ivan Aksamentov - Drop picture Ivan Aksamentov - Drop · Dec 4, 2013

1) Is Windows 8 SDK the thing to learn now or is DX 11 still relevant?

What' happened exactly: they deprecated some stuff from standalone DirectX SDK, stripped it a bit and merged into Windows SDK. Also renamed some headers. That it all. Nothing to learn.

Actually you must unlearn (i.e. forget) some things. Notably D3DX, Effect framework, etc. As they are stripped off from the new SDK, you need to find alternative libs to replace those (for example, Effect11 source is available; for bitmap loading use DirectXTK or FreeImage; for meshes use Assimp; find or roll out your own sprite and font engines etc.).

OK, need to say, they've added DirectX 11.1 (Win8) and 11.2 (Win8.1). But, their features are too minor and very specific to say that you must learn it.

2) There are plenty of great resources for learning DirectX SDK [...] Are there any similar quality materials available for Windows 8's Direct3D or just msdn at the moment?

There is a new set of samples on MSDN, e.g. Windows Store Apps samples. They are all messed up with other (non-DirectX) Windows SDK samples, so use search. As API itself remain unchanged, there is nothing really new for desktop apps. You can easily adapt old samples to build without standalone DirectX SDK, by replacing deprecated stuff.

3) Will my Windows 8 SDK based engine run only on Windows 8?

Nope, with this SDK you can target to anything starting from Windows XP. But you porting to DirectX 11 API, that means that your apps will need at least Vista SP2. You can preserve your DirectX 10 code for Vista with no SP targets. And to run under Win XP, you will need DirectX 9 code path. Or OpenGL in all cases of course ;)

4) Any first hand experience / comparisons between the two?

Well, Microsoft deprecation style and moving things around with no gain is sometimes frustrating. But we have become accustomed.

Porting from DirectX 10 to DirectX 11 API is really straightforward. But porting extension stuff, such as D3DX is a pain: look my answer here for some useful links.

My own opinion is that you can not rely on Microsoft's secondary libs as they can be deprecated and cut of at the worst possible moment. But solutions of yours they will cannot. So if you have texture loader based on FreeImage or on your own lib, you have a pointer to bitmap data and can use it anywhere: DirectX, OpenGL, blit it into window directly, whatever you want. If you have your own shader effect engine, you will never go into trouble of impossibility to use their own effect framework in Windows Store Apps.

I tend to use only core APIs of Microsoft anywhere and universal, portable third party libs for anything else: this reduces coupling and dependency on one's decisions and gives more freedom. So if one lib is broken I do not need to rewrite all of them.