c++ - Win10 的 DirectX SDK 在哪里?

标签 c++ graphics direct3d

我刚刚被告知,我正在使用(2010 年 6 月)的 SDK 将不再使用,我需要使用他们包含在 Win10 中的任何新的 SDK。那么它在哪里?

我正在尝试启动图形演示解决方案,但由于链接器错误而无法调用 D3D11 函数,这对我来说意味着我需要包含库等。

如果有人能帮我解决这个问题,这样我就可以开始工作了,那我就很好了。

最佳答案

Microsoft 文档页面 Where is the DirectX SDK?告诉你使用Windows SDK,具体是Windows 8.0 SDK,Windows 8.1 SDK,或Windows 10 SDK做DirectX开发(假定为Direct3D 11或Direct2D/DirectWrite)。 Direct3D 12 需要 Windows 10 SDK。

如果您使用的是 Visual Studio 2013 或更高版本,那么您已经拥有 Windows 8.1 SDK 和可选的 Windows 10 SDK。

一个重要的细节是 D3DX 库(D3DX9、D3DX10 和 D3DX11)已被弃用,仅在旧版 DirectX SDK 中可用。这意味着 D3DX11 不是 Windows SDK 的一部分,您不应该使用它。

UPDATE: For older projects, the legacy DirectX SDK 'end-of-life' June 2010 release of the D3DX9, D3DX10, and D3DX11 library is provided in this NuGet package which is to be combined with the Windows 10 SDK. See this blog post for the full details.

对于 HLSL,您使用 D3DCompile直接或者Windows SDK自带的FXC。对于数学,您使用 DirectXMath Windows SDK 附带的。如果您使用的是旧版 Effects 11,则可以使用 GitHub 中的版本.我建议你也看看DirectX Tool Kit for DirectX 11它是 tutorials .有关 D3DX 替代品的完整列表,请参阅 Living without D3DX .

If you really want to continue to use the legacy DirectX SDK components with Visual Studio 2012 or later, you can but you should note the details at the bottom of the MSDN page above. Notably you have to reverse the include/lib path order when you add the legacy DirectX SDK to your project.

有关旧 DirectX SDK 的各个部分最终位置的完整目录,请参阅 DirectX SDKs of a certain age , DirectX SDK Tools Catalog , DirectX SDK Samples Catalog ,以及上面的没有 D3DX 的生活文章。

The Direct3D 11 Debug Device for Windows 10 is not installed by any Windows SDK or by the legacy DirectX SDK. It is a windows optional feature. See Direct3D SDK Debug Layer Tricks.

The actual "DirectX Runtime" has been part of the operating system since Windows XP Service Pack 2. The legacy DirectX SDK never installs "DirectX" on any modern version of Windows, and only deploys some optional side-by-side stuff. It's not required at all if you using the Windows SDK. See Not So Direct Setup.

关于c++ - Win10 的 DirectX SDK 在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40700070/

相关文章:

graphics - WIC和GDI+有什么关系?

java - 图形的透视变换

directx - 使用 Direct3D 绘制带有圆角末端的线条

c++ - 如何将 QImage 中的像素数据转换为另一种格式?

c++ - C/C++ 为什么对二进制数据使用 unsigned char?

android - 所有设备都支持 OpenGL 吗?

c++ - XMMATRIX 对 2D 转换是否有效,或者我应该制作自定义 3x3 矩阵套件?

windows - Direct3DCreate9Ex 在作为 Windows 服务运行时返回 D3DERR_NOTAVAILABLE (0x8876086a)

c++ - 这是什么样的代码? C 或 C++

c++ - 浮点/ double 的字符数据