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

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

问题描述

我有一个基于 DirectX 10 的旧游戏引擎(有点),我一直计划迁移到 DX 11.我还刚刚安装了 Windows 8 和 VS 2013,并且在尝试运行这个旧项目时我'已经了解到 DirectX SDK 已被弃用,现在被替换为视窗 8 SDK.在这种情况下,我想知道更新到 DX 11 是否有意义,或者我应该尝试让我的引擎使用新的 Windows 8 SDK.在做出决定之前,我想知道几件事:

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) 现在要学习 Windows 8 SDK 还是 DX 11 仍然相关?比如,如果你想学C++就应该学C++11,那么如果你现在想学Direct3D,你应该学Windows 8 SDK?

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) 学习 DirectX SDK 的资源很多:很多教程,微软自己的 示例NVidia 图形 SDK 示例AMD RadeonSDK 示例 等.目前是否有可用于 Windows 8 的 Direct3D 或仅 msdn 的类似质量材料?

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) 我的基于 Windows 8 SDK 的引擎是否只能在 Windows 8 上运行?

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

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

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

非常感谢!

推荐答案

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

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

究竟发生了什么:他们弃用了独立 DirectX SDK 中的一些内容,将其剥离了一点并合并到 Windows SDK 中.还重命名了一些标题.这一切.没什么可学的.

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.

实际上你必须忘记(即忘记)一些事情.值得注意的是 D3DX、Effect 框架等.由于它们已从新 SDK 中剥离,您需要找到替代库来替换它们(例如,Effect11 源可用;位图加载使用 DirectXTK 或 FreeImage;网格使用 Assimp;找到或推出自己的精灵和字体引擎等).

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

好的,不得不说,他们添加了 DirectX 11.1 (Win8) 和 11.2 (Win8.1).但是,它们的功能太小而且非常具体,不能说您必须学习它.

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) 有很多学习 DirectX SDK 的重要资源 [...] 是否有任何类似的高质量材料可用于 Windows8 的 Direct3D 还是目前只有 msdn?

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?

有一个新的 MSDN 上的一组样本,例如Windows 应用商店应用示例.它们都与其他(非 DirectX)Windows SDK 示例相混淆,因此请使用搜索.由于 API 本身保持不变,桌面应用程序并没有什么新东西.通过替换已弃用的东西,您可以轻松地调整旧样本以在没有独立 DirectX SDK 的情况下构建.

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) 我的基于 Windows 8 SDK 的引擎是否只能在 Windows 8 上运行?

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

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

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) 两者之间有任何第一手经验/比较吗?

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.

从 DirectX 10 移植到 DirectX 11 API 非常简单.但是移植扩展的东西,比如 D3DX 是一件痛苦的事情:查看我的答案这里以获得一些有用的链接.

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.

我自己的观点是,您不能依赖 Microsoft 的辅助库,因为它们可能会在最糟糕的时刻被弃用和删除.但是您的解决方案将无法解决.因此,如果您有基于 FreeImage 或您自己的 lib 的纹理加载器,您就有一个指向位图数据的指针,并且可以在任何地方使用它:DirectX、OpenGL、直接将其 blit 到窗口中,无论您想要什么.如果您拥有自己的着色器效果引擎,您将永远不会在 Windows 应用商店应用程序中无法使用自己的效果框架而陷入困境.

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.

我倾向于在任何地方只使用 Microsoft 的核心 API,而在其他任何地方都使用通用的、可移植的第三方库:这减少了对决策的耦合和依赖,并提供了更多的自由.所以如果一个库坏了,我不需要全部重写.

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天全站免登陆