Direct3D 10是否有COM暴露 [英] Is there COM exposure for Direct3D 10

查看:113
本文介绍了Direct3D 10是否有COM暴露的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生们和尊敬的女士们。

Gentlemen and esteemed ladies.

我在Code Project的COM论坛上发布了这个问题,得到了一个卑鄙的答复,希望您会有所帮助。

I posted this question in the COM forum at Code Project and got a snotty reply so hopefully you will be more helpful.

我看到Microsoft有一个Direct3D 9的COM库,它公开了GUID 81BDCBCA-64D4-426d-AE8D-AD0147F4275C。

I see that Microsoft has a COM library for Direct3D 9 exposed with GUID 81BDCBCA-64D4-426d-AE8D-AD0147F4275C.

Microsoft是否已在COM上公开Direct3D 10,如果是,则GUID界面是什么?

Has Microsoft exposed Direct3D 10 on COM and if so, what is the interface GUID?

预先感谢。

推荐答案

从MSDN上的文档看,他们似乎已经不再拥有具有成员函数(例如 IDirect3D9 :: CreateDevice 可以使用诸如 D3D10CreateDevice 。使用Direct3D 10,他们将IDirect3D9中与(例如)适配器相关的许多功能拆分为 DirectX图形基础结构(DXGI)

From the documentation on MSDN, it looks like they've moved from having an IDirect3D9 object with member functions such as IDirect3D9::CreateDevice to using global functions such as D3D10CreateDevice. With Direct3D 10, they've split many of the functions that were in IDirect3D9 relating to (for example) adapters into the DirectX Graphics Infrastructure (DXGI).

换句话说,Direct3D 10仍使用COM,但没有,没有IDirect3D9的对应版本。现在,您使用IDirect3D9进行的操作可以通过其他方式完成。

In other words, Direct3D 10 still uses COM, but no, there isn't a counterpart of IDirect3D9. Things that you used IDirect3D9 for are now accomplished via other means.

编辑:上面带有GUID的COM类是IDirect3D9。 Direct3D 10没有此版本的更新(没有IDirect3D10可以完成IDirect3D9的工作);而是将该类的成员函数拆分为全局函数(例如 D3D10CreateDevice )并进入DXGI类(例如 IDXGIOutput )。您不需要IDirect3D10对象,因为现在将以不同的方式完成使用该对象的任务。

The COM class with the GUID above is IDirect3D9. Direct3D 10 doesn't have an updated version of this (there is no IDirect3D10 that does the things IDirect3D9 does); instead, the member functions of that class were split into global functions (such as D3D10CreateDevice) which you call directly instead of via an object, and into the DXGI classes (such as IDXGIOutput). You don't need an IDirect3D10 object because the tasks that you would use it for are now done in different ways.

您应该能够将GUID映射到COM类名。通过在Direct3D头文件中搜索DEFINE_GUID宏。

You should be able to map GUIDs to COM class names by searching the Direct3D header files for the DEFINE_GUID macro.

这篇关于Direct3D 10是否有COM暴露的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆