您通常将 DirectX SDK 文件夹放在哪里?
Where do you usually have your DirectX SDK folder?
我不熟悉使用 DirectX-11 进行图形编程,许多教程都引用了 DirectX SDK 及其中包含的示例。但是我无法在我的桌面上找到我的 DirectX SDK 文件夹,即使我可以 运行 DirectX 程序超过 Visual Studio。
那么 DirectX SDK 通常存储在我的 PC 上的什么地方。我使用的是 Windows 8,所以 DirectX 已经包括在内,我无需安装它。
提前谢谢你。
“DirectX 运行时”是 OS 的一部分,而不是“DirectX SDK”。很长一段时间,DirectX SDK 是您下载和安装的,因此开发人员可以获得 headers、库和工具来编写 DirectX 应用程序。这一切在 2010 年底发生了变化,当时 DirectX SDK 被弃用,核心 headers、库和工具被集成到 Windows SDK 版本 8.
见Where is the DirectX SDK? and Not So DirectSetup。
遗憾的是,大部分 DirectX 11 教程和书籍都是为旧的 DirectX SDK 编写的,从未针对 Windows SDK 进行更新。他们经常使用现已弃用的 D3DX11
(参见 Living without D3DX for a list of replacements) and either D3DXMath
or XNAMath
which have both been replaced by DirectXMath.
今天开始 DirectX 11 开发的最佳方法是安装 Visual Studio2015 Community、Professional 或更高版本。对于C++开发,需要通过custom install which will also add the Windows 8.1 SDK. Then, go check out the DirectX Tool Kit and it's tutorials添加C++。掌握了基础知识后,您可以重新访问那些较旧的教程,并且应该能够使用更新的技术进行跟进。
或者,您可以安装旧版 DirectX SDK 并设置 VS 2012/2013/2015 以使用它,但有一些注意事项。首先,有一些 known issues installing the legacy DirectX SDK. Second, the include & library path order is inverted. Really there's only a few cases where you actually need the old DirectX SDK and for Windows 8 you don't need it. See The Zombie DirectX SDK.
BTW, I hope you are using Windows 8.1 and not Windows 8.0 as Windows 8.0 is no longer supported. See this FAQ.
我已经清理了很多旧的 DirectX SDK 示例,因此它们不需要旧版 DirectX SDK。您可以在 GitHub.
上找到它们
另见 DirectX SDKs of a certain age and DirectX SDK Tools Catalog。
综上所述,旧版 DirectX SDK 的默认安装位置在 64 位系统上为 C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)
或在 32 位系统上为 C:\Program Files\Microsoft DirectX SDK (June 2010)
-位系统.
UPDATE:: 虽然在新项目中避免遗留 D3DX9、D3DX10、and/or D3DX11 实用程序库仍然是个好主意,但现在有一个更简单的方法使用它们的方法可以避免安装旧版 DirectX SDK 或依赖旧版“DirectX End-User Runtime”包来部署它们。只需使用 Microsoft.DXSDK.D3DX NuGet package. See this blog post 了解更多详情。
我不熟悉使用 DirectX-11 进行图形编程,许多教程都引用了 DirectX SDK 及其中包含的示例。但是我无法在我的桌面上找到我的 DirectX SDK 文件夹,即使我可以 运行 DirectX 程序超过 Visual Studio。 那么 DirectX SDK 通常存储在我的 PC 上的什么地方。我使用的是 Windows 8,所以 DirectX 已经包括在内,我无需安装它。
提前谢谢你。
“DirectX 运行时”是 OS 的一部分,而不是“DirectX SDK”。很长一段时间,DirectX SDK 是您下载和安装的,因此开发人员可以获得 headers、库和工具来编写 DirectX 应用程序。这一切在 2010 年底发生了变化,当时 DirectX SDK 被弃用,核心 headers、库和工具被集成到 Windows SDK 版本 8.
见Where is the DirectX SDK? and Not So DirectSetup。
遗憾的是,大部分 DirectX 11 教程和书籍都是为旧的 DirectX SDK 编写的,从未针对 Windows SDK 进行更新。他们经常使用现已弃用的 D3DX11
(参见 Living without D3DX for a list of replacements) and either D3DXMath
or XNAMath
which have both been replaced by DirectXMath.
今天开始 DirectX 11 开发的最佳方法是安装 Visual Studio2015 Community、Professional 或更高版本。对于C++开发,需要通过custom install which will also add the Windows 8.1 SDK. Then, go check out the DirectX Tool Kit and it's tutorials添加C++。掌握了基础知识后,您可以重新访问那些较旧的教程,并且应该能够使用更新的技术进行跟进。
或者,您可以安装旧版 DirectX SDK 并设置 VS 2012/2013/2015 以使用它,但有一些注意事项。首先,有一些 known issues installing the legacy DirectX SDK. Second, the include & library path order is inverted. Really there's only a few cases where you actually need the old DirectX SDK and for Windows 8 you don't need it. See The Zombie DirectX SDK.
BTW, I hope you are using Windows 8.1 and not Windows 8.0 as Windows 8.0 is no longer supported. See this FAQ.
我已经清理了很多旧的 DirectX SDK 示例,因此它们不需要旧版 DirectX SDK。您可以在 GitHub.
上找到它们另见 DirectX SDKs of a certain age and DirectX SDK Tools Catalog。
综上所述,旧版 DirectX SDK 的默认安装位置在 64 位系统上为 C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)
或在 32 位系统上为 C:\Program Files\Microsoft DirectX SDK (June 2010)
-位系统.
UPDATE:: 虽然在新项目中避免遗留 D3DX9、D3DX10、and/or D3DX11 实用程序库仍然是个好主意,但现在有一个更简单的方法使用它们的方法可以避免安装旧版 DirectX SDK 或依赖旧版“DirectX End-User Runtime”包来部署它们。只需使用 Microsoft.DXSDK.D3DX NuGet package. See this blog post 了解更多详情。