views:

442

answers:

2

In a DirectX 10 application, does switching between fullscreen and windowed mode incur any sort of overhead like having to recreate textures and/or vertexbuffers?

In other words, can I build an application that is designed to do "a lot" of switching between windowed mode and fullscreen mode without having to suffer a performance hit when the switches occur?

+4  A: 

In DirectX10 there is DXGI. You use a swap chain. The buffer of the swap chain will need to be resized so there is some overhead (of course) but it is supposedly optimized. The thing I would be worried about is causing epileptic seizures on your users by switching view modes.

http://msdn.microsoft.com/en-us/library/bb205075(VS.85).aspx

Chap
Please allow me to worry about the usability and design of what I'm trying to create. I was asking for a technical answer.
korona
Go ahead I'm not stopping you. I gave you a technical answer and a concern.
Chap
+1  A: 

In D3D10, you don't need to recreate your textures, buffers or any D3D resources on mode switch. One notable exception is swapchain backbuffer references need to be updated after ResizeBuffers call (which should be done for optimal fullscreen performance), but it's not that big of a deal in terms of performance.

Still, it doesn't mean mode change is cheap. Mode change operation itself is very expensive both for your app and the rest of the system (particularly, in Vista, DWM needs to be restarted). Win7 improved a lot, so I suggest you play with it and see if it meets your performance requirements, but don't expect instant transition.

Simon Kozlov