从 directx 9 迁移到 directx 10
migrating from directx 9 to directx 10
我有一个使用 DX9 的软件,但它在特定 windows 10 版本上有太多 fps 下降问题,所以我尝试使用 d3dx10 库编译它并收到以下错误:
我不知道这样会不会很容易,但是有什么方法可以使用 directx10 上的新功能重新实现这些功能吗?提前致谢
不幸的是,要在一个端口上提前 14 年以上将是一个相当大的项目,但是有很多资源可以提供帮助。
首先,有一个从 Direct3D 9 to Direct3D 10. These days you should not actually port to Direct3D 10 but port to Direct3D 11 which has the same features but broader hardware support, more utility libraries, and more community support. As noted in the official guide Migrating to Direct3D 11 迁移的官方指南,从 Direct3D 10 迁移到 Direct3D 11 是一个非常简单的过程。通过同时遵循这两个指南,您可以从逻辑上将代码从 Direct3D 9 移动到 Direct3D 10,然后将 Direct3D 10 移动到 Direct3D 11。
其次,D3DX
、D3DX10
和 D3DX11
以及旧版 DirectX SDK 本身都已弃用。因此,您应该花点时间阅读 MSDN, this blog post, and Living without D3DX 以充分了解此处发生的变化。在迁移到 Direct3D 11 时,您应该尽可能多地移除对旧版 DirectX SDK 的依赖。
第三,根据缺少的导出,您正在为着色器使用 FX
系统。有一个Effects for Direct3D 11 but it's not part of D3DX11
. The latest runtime is available on GitHub。请务必注意,编译器对 fx_4_0
、fx_4_1
和 fx_5_0
配置文件的支持已 弃用 ,因此您应该考虑不再使用FX
直接管理着色器和状态组合。
More resources on the retired legacy DirectX SDK: DirectX SDK Tools Catalog, DirectX SDK Samples Catalog, DirectX SDKs of a certain age, and The Zombie DirectX SDK
More resources for learning Direct3D11: Getting Started with Direct3D 11 and DirectX Tool Kit for DX11
注意:您还应该考虑转向 VS 2017,而不是坚持使用 12 年以上的旧工具集。请务必查看 community edition and this porting guide.
我有一个使用 DX9 的软件,但它在特定 windows 10 版本上有太多 fps 下降问题,所以我尝试使用 d3dx10 库编译它并收到以下错误:
我不知道这样会不会很容易,但是有什么方法可以使用 directx10 上的新功能重新实现这些功能吗?提前致谢
不幸的是,要在一个端口上提前 14 年以上将是一个相当大的项目,但是有很多资源可以提供帮助。
首先,有一个从 Direct3D 9 to Direct3D 10. These days you should not actually port to Direct3D 10 but port to Direct3D 11 which has the same features but broader hardware support, more utility libraries, and more community support. As noted in the official guide Migrating to Direct3D 11 迁移的官方指南,从 Direct3D 10 迁移到 Direct3D 11 是一个非常简单的过程。通过同时遵循这两个指南,您可以从逻辑上将代码从 Direct3D 9 移动到 Direct3D 10,然后将 Direct3D 10 移动到 Direct3D 11。
其次,D3DX
、D3DX10
和 D3DX11
以及旧版 DirectX SDK 本身都已弃用。因此,您应该花点时间阅读 MSDN, this blog post, and Living without D3DX 以充分了解此处发生的变化。在迁移到 Direct3D 11 时,您应该尽可能多地移除对旧版 DirectX SDK 的依赖。
第三,根据缺少的导出,您正在为着色器使用 FX
系统。有一个Effects for Direct3D 11 but it's not part of D3DX11
. The latest runtime is available on GitHub。请务必注意,编译器对 fx_4_0
、fx_4_1
和 fx_5_0
配置文件的支持已 弃用 ,因此您应该考虑不再使用FX
直接管理着色器和状态组合。
More resources on the retired legacy DirectX SDK: DirectX SDK Tools Catalog, DirectX SDK Samples Catalog, DirectX SDKs of a certain age, and The Zombie DirectX SDK
More resources for learning Direct3D11: Getting Started with Direct3D 11 and DirectX Tool Kit for DX11
注意:您还应该考虑转向 VS 2017,而不是坚持使用 12 年以上的旧工具集。请务必查看 community edition and this porting guide.