DirectX SDK与Windows SDK:哪一个使用? [英] DirectX SDK vs Windows SDK: which one to use?

查看:170
本文介绍了DirectX SDK与Windows SDK:哪一个使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于DirectX 10的旧游戏引擎(一类),我已经计划移动到DX 11.我也刚刚安装了Windows 8和VS 2013,而试图运行这个老项目我了解到 DirectX SDK已弃用,现在已由Windows 8 SDK替代。在这种情况下,我想知道更新到DX 11是否有意义,或者我应该尝试让我的引擎使用新的Windows 8 SDK。在作出决定之前,我想知道几件事:



1)Windows 8 SDK是现在学习还是DX 11还是相关的?喜欢,如果你想学习C ++,你应该学习C ++ 11,所以如果你想学习Direct3D,你应该学习Windows 8 SDK?



2)有很多丰富的资源学习DirectX SDK:很多教程,微软自己的示例 NVidia Graphics SDK示例 AMD Radeon SDK示例等。是否有任何类似的质量材料可用于Windows 8的Direct3D或只是msdn?



3)基于Windows 8 SDK的引擎是否只能在Windows 8上运行?



解决方案

div>


1)Windows 8 SDK是现在要学习还是DX 11仍然相关?


发生了什么:他们从独立的DirectX SDK中弃用了一些东西,剥离了一点,并且合并到Windows SDK中。也重命名了一些标题。这一切。没有什么可学习。



实际上,你必须清除(即忘记)一些东西。值得注意的是D3DX,效果框架等等,当他们从新的SDK剥离,你需要找到替代libs来替换它们(例如,Effect11源可用;对于位图加载使用DirectXTK或FreeImage;对于网格使用Assimp; find



好的,需要说明的是,他们已经添加了DirectX 11.1(Win8)和11.2(Win8.1) 。


2)如果您有任何疑问, ...有没有类似的质量材料可用于Windows
8的Direct3D或只是msdn目前?


有一个新的 MSDN上的样本集,例如Windows应用商店应用示例。他们都弄乱了与其他(非DirectX)Windows SDK示例,所以使用搜索。由于API本身保持不变,桌面应用程序没有什么新鲜事。


3)我的基于Windows 8 SDK的引擎运行是否正常只有在Windows 8?


没有,使用这个SDK你可以定位到从Windows XP开始的任何东西。但是你移植到DirectX 11 API,这意味着你的应用程序至少需要Vista SP2。您可以保留没有SP目标的Vista的DirectX 10代码。而要在Win XP下运行,则需要DirectX 9代码路径。或者OpenGL在所有情况下;)


4)任何第一手经验/两者之间的比较?


好的,微软的弃用风格和移动的东西,没有收益有时是令人沮丧的。但我们已经习惯了。



从DirectX 10移植到DirectX 11 API是真的很简单。但移植扩展内容,如D3DX是一个痛苦:看看我的回答这里一些有用的链接。



我自己的意见是,你不能依赖Microsoft的辅助库,因为他们可以在最糟糕的可能时刻被弃用和删除。但是你的解决方案他们不会。所以如果你有基于FreeImage或者你自己的lib的纹理加载器,你有一个指针位图数据,并可以使用它在任何地方:DirectX,OpenGL,blit它直接进入窗口,任何你想要的。如果你有自己的着色效果引擎,你永远不会遇到不可能在Windows商店应用程序中使用自己的效果框架的麻烦。



我倾向于只使用微软的核心API,以及通用的便携式第三方库来减少耦合和依赖于自己的决定,并提供更多的自由。因此,如果一个库损坏,我不需要重写所有的库。


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!

解决方案

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.

这篇关于DirectX SDK与Windows SDK:哪一个使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆