Click here to Skip to main content
13,595,750 members
Rate this:
Please Sign up or sign in to 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.

Posted 26-Jan-13 3:53am
Updated 26-Jan-13 4:01am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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[^]

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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web03-2016 | 2.8.180621.3 | Last Updated 27 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100