DirectX 托管池
我正在为现有的 C++ DirectX9 应用程序编写一个插件。一切都工作正常,直到出于性能原因他们决定切换到 IDirect3DDevice9Ex。
现在我得到了 使用“D3DXCreateFontA”渲染文本时出现“D3DPOOL_MANAGED 对于 IDirect3DDevice9Ex 无效”错误。
问题:使用 IDirect3DDevice9Ex 时是否有一些解决方法来绘制文本,或者是否有一些好的库允许我在不使用托管纹理的情况下绘制文本?
I am writing a plugin for an existent C++ DirectX9 application. Everything was working fine until they decided to switch to IDirect3DDevice9Ex for performance reasons.
Now I get the
"D3DPOOL_MANAGED is not valid with IDirect3DDevice9Ex" error when using "D3DXCreateFontA" to render text.
Question: Is there some workaround to draw text while using IDirect3DDevice9Ex, or some good library that allows me to draw text without using managed textures?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于我不知道一个好的答案,也许这是同一个问题,有更多更好的答案:
IDirect3DDevice9Ex 和 D3DPOOL_MANAGED?
祝你好运!
Since i don't know a good answer, maybe this is the same question with more and better answers:
IDirect3DDevice9Ex and D3DPOOL_MANAGED?
Good luck!
管理池在系统内存中保存资源的副本。这允许进程将图形设备释放给其他程序,然后能够使用系统内存中的副本重新创建任何丢失的资源。
要解决此问题,请尝试使用集中式资源缓存,它将转储丢失设备上的所有资源,然后在设备恢复时重新创建它们。
A manage pool keeps a copy of the resource in system memory. This allows the process to release the graphics device to other programs and then be able to recreate any lost assets using the copy in system memory.
To resolve this, try using a centralized resource cache that will dump all your resources on device lost and then recreate them when the device is recovered.