ID3DX10Mesh 和 ID3DXMesh 指南完全相同

发布于 2024-07-26 17:36:12 字数 608 浏览 1 评论 0原文

我正在与 Direct3D 进行 C# 互操作(我了解 SlimDX 和 XNA,所以我们不讨论它的优点),并且我正在调用 D3DX10CreateMesh 并将其传递给我的 ID3DX10Mesh 接口。 我收到一条错误消息“不支持此类接口(HRESULT 异常:0x80004002 (E_NOINTERFACE))”。 当我尝试创建一个 10 网格以将 9 网格复制到其中时(成功加载 x 文件后),会发生 D3DX10CreateMesh 调用。 我查看了 ID3DX10Mesh 的 C# 定义,它遵循与我定义的所有其他工作接口相同的结构。

但后来我注意到了一些事情。 9 和 10 网格的引导线完全相同 (4020E5C2-1403-4929-883F-E2E849FAC195)。 我仔细检查了 d3dx9mesh 和 d3dx10mesh 标头,情况就是如此。 9 个网格接口可以工作,但 10 个网格不能工作(这可能与实例化顺序相关)我个人不理解这一点,因为这意味着即使在 C/C++ 应用程序中也不能同时使用这两个网格,但我们知道你能行。 我已经在 NVUT SDK 中看到了它的完成。 我只能认为运行时可调用包装器被指南搞糊涂了?

为什么网格引导相同以及 C/C++ 应用程序如何避免冲突?

I'm doing C# interop with Direct3D (I know about SlimDX and XNA so let's not get into the merits of this) and I'm calling D3DX10CreateMesh passing it my ID3DX10Mesh interface. I'm getting an error saying "No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))". The D3DX10CreateMesh call comes while I am trying to create a 10 mesh to copy a 9 mesh into (after successfully loading an x file). I've looked at my C# definition of the ID3DX10Mesh and it follows the same structure as every other working interface I've defined.

But then I noticed something. The Guids for the 9 and 10 meshes are exactly the same (4020E5C2-1403-4929-883F-E2E849FAC195). I've double checked the d3dx9mesh and d3dx10mesh headers and this is the case. The 9 mesh interface works but the 10 doesn't (This maybe be instantiation-order dependent) I personally don't understand this as it would imply that even in C/C++ apps you couldn't use the two meshes together but we know that you can. I've seen it done in NVUT SDK. I can only think that the Runtime Callable Wrapper is getting confused byt the Guids?

Why are the mesh guids the same and how are C/C++ apps able to avoid the conflict?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文