Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ DirectX
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 26-Jan-13 4:53am
Smit D487
Edited 26-Jan-13 5:01am
v2

1 solution

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

Solution 1

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.
  Permalink  
Comments
Smit D at 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 at 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
0 Maciej Los 495
1 Sergey Alexandrovich Kryukov 419
2 OriginalGriff 360
3 CHill60 310
4 CPallini 275
0 Sergey Alexandrovich Kryukov 10,017
1 OriginalGriff 9,495
2 Peter Leow 5,241
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 3,076


Advertise | Privacy | Mobile
Web01 | 2.8.150327.1 | Last Updated 27 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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