在 DirectX10 中绘制 IDirect3DSurface9
我经常使用 DirectX 9,最近才切换到 DirectX 10。我注意到许多 9 的设备方法已丢失或已更改。例如,在 DX9 中,方法 StretchRect 用于在屏幕上绘制表面。
我的问题是这样的:我有一个 IDirect3DSurface9 需要绘制到屏幕上,但我使用的是 DirectX 10。10 的图形设备可以做到这一点吗?或者我是否需要获得 9 的图形设备并用它来完成?是否可以同时拥有 IDirect3D9Device 和 IDirect3D10Device?
I've worked with DirectX 9 a fair amount, and just recently switched to DirectX 10. I've noticed that a lot of 9's device methods have gone missing or been changed. For instance, in DX9, the method StretchRect was used to draw a surface to the screen.
My problem is this: I have a IDirect3DSurface9 that I need to draw to the screen, but I am using DirectX 10. Can 10's graphics device do this? Or do I need to get 9's graphics device and do it with that one? Is it even possible to have both an IDirect3D9Device and an IDirect3D10Device at the same time??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经实现了 DirectX 9 代码,以便在 DirectX 10 代码之上进行绘图,结果......很有趣。看起来这些设备实际上正在争夺屏幕。 DX10 的设备似乎也经常赢得这场比赛,可能是因为我使用了交换链。无论如何,部分问题仍然有待回答。如果有办法使用 DX10 设备绘制 DX9 曲面,我将奖励该答案。
I've implemented DirectX 9 code for drawing on top of the DirectX 10 code, and the results are... interesting. It looks like the devices actually compete for the screen. DX10's device seems to win this competition more often than not, as well, probably because i'm using the swap chain with it. Anyways, part of the question is still open for answering. If there is a way to draw DX9 surfaces using a DX10 device, i will award that answer.