Click here to Skip to main content
15,888,218 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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!
Posted
Updated 26-Jan-13 4:01am
v2

1 solution

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.
 
Share this answer
 
Comments
Smit D 27-Jan-13 6:47am    
As I already mentioned for .dot net application(WPF or managed dx) resizing is not a problem, all I care about is c++ code, still it is a great hint and I will try it...
Maxim Kartavenkov 27-Jan-13 6:55am    
In C++ it will be the same logic: create LPDIRECT3DSWAPCHAIN9 object with resolution you need to render. Perform rendering your scene onto that swap chain and call present method, once you resizing the window - just recreate swap chain object with new resolution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900