实时调整directx窗口的大小 [英] Realtime resizing of directx window

查看:73
本文介绍了实时调整directx窗口的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用DirectX做一些GUI的东西,但问题是根据规范,我每次调整窗口大小时都必须调整帧缓冲区,这需要在设备上重置并再次重置需要所有GPU资源被发布。



虽然我没有尝试过这种方法,但考虑到调整窗口大小时产生的大量消息,它似乎非常昂贵。



另外我有点惊讶地看到,在互联网上关于这个话题的讨论很少,我的意思是硬件加速无窗是不是一个很酷的主意具有很多吸引人的效果的图形用户界面???

(我想知道WPF是否真的基于Direct3D然后MS如何做到这一点?)



我非常渴望听到专家的意见......即使你没有我想听的解决方案......



1)你的意见或任何其他建议我做我想做的事。

2)关于程序员这种能力的必要性。

3)你对这个问题的任何经验。



谢谢!

I want to do some GUI stuff using DirectX but the problem is that according to the specs I have to resize the frame buffer every time I resize the window which demands a reset on the device and again reseting requires all the GPU resources to be released.

Although I did not tried that approach but it appears to be verry expensive given the huge no of messages generated while resizing a window.

Also I am a bit surprised to see that on the internet there is very little discussion about this topic, I mean is it not a cool idea to have hardware accelerated windowless GUIs with lots of attractive effects???
(I wonder if WPF is truely based on Direct3D then how MS is doing just that?)

I am very eager to hear from you experts about it...even if u dont have a solution I would love to hear....

1) Your opinion or any other suggestions for doing what I want to do.
2) About the necessity for such ability to programmers.
3) Any experience of yours regarding the subject.

Thanks!

推荐答案

您好,

如果您正在使用全屏模式比你应该在changine模式下恢复所有资源。但是如果你使用窗口模式,你应该只使用交换链进行渲染。

你可以在我的文章中找到的用法示例: Direct3D中的视频效果。第1部分 [ ^ ]



问候,

Maxim。
Hello,
If you are using full screen mode than you should restore all resources while changine mode. But if you uses windowed mode than you should just use swap chains for rendering.
Example of usage you can find in my article: Video Effects in Direct3D. Part 1[^]

Regards,
Maxim.


这篇关于实时调整directx窗口的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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