为什么 Direct3DCreate9 会很慢?

发布于 2024-10-06 18:18:09 字数 212 浏览 0 评论 0原文

我正在尝试稍微加快 Direct3D 应用程序的启动时间,并且我注意到根据探查器,Direct3DCreate9 花费了整整一秒(比其他任何时间都多)。为什么?对此我们能做些什么呢?

操作系统:XP,DirectX:9.0。在具有不同 DirectX 的 Windows 7 上也有相同的行为,而且我注意到许多游戏也受到这种“Direct X 初始化”延迟的影响,所以这不仅仅是我的配置的问题。

I'm trying to speed up the start times for my Direct3D app a bit, and I have noticed Direct3DCreate9 takes a whole second according to profiler (more than anything else). Why? And what can be done about it?

OS: XP, DirectX: 9.0. Same behaviour on Windows 7 with different DirectX, and I have noticed many games suffer from this "Direct X initialization" lag too, so it's not like it's a problem with just my configuration.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

丿*梦醉红颜 2024-10-13 18:18:09

当您调用 Direct3DCreate9 时,您正在初始化所有 DirectX 库。这可能需要一段时间。

您几乎无法提高此调用的速度。最好的选择通常是在首次初始化 DirectX 时向用户提供一些视觉反馈,告知用户正在加载内容(如果可能)。这至少表明您的应用程序正在做“某事”,而不仅仅是挂起。

When you call Direct3DCreate9 you're initializing all of the DirectX libraries. This can take a while.

There is little you can do to improve the speed of this call. The best option is to usually provide some visual feedback to the user that things are loading, if possible, while you first initialize DirectX. This, at least, shows that your application is doing "something" and not just hung.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文