Device.Reset and SwapChain confusion

It is said in the sdk doc that the device holds a default swap chain and the user can create additional swap chains.

I'm confused when I try to reset the device. What am I resetting? The device, the default swap chain, or my additional swap chain? There's a presentation parameters struct which I need to pass to Reset(), and different swap chain has different presentation parameters. Which one should I pass?

My guess is that it should be the current swap chain, but when the device is in the lost state, which one is the current swap chain?

And confusion 2: when I put one swap chain into full-screen mode, it's the device that is in full-screen mode according to the sdk doc. So the other swap chains are just sleeping? What happens if I alt-tab, and look at other swap chain windows?

I know I'm doing something what smart men will avoid, but it's my job to work it out. :-S

[914 byte] By [qrli] at [2007-12-23]
# 1

I finally worked out a partially working system. What I want is multiple swap chain windows and the user can make one of them full-screen.

The idea is to use an invisible form as the focus window as well as the full-screen device window. Invisible here just means the user cannot see it in windowed mode, because I put it outside of the screen. And create other d3d windows using additional swap chains. When one d3d window need to switch to full-screen, I redirect rendering to the focus window and redirect the events from the focus window to the scene logic.

It seems that in full-screen mode, the device window can only be the focus window. I tried other combinations, and they either don't work or not work properly.

And the device.Reset() seems work on the default internal swapchain.

I'm still confused somewhat...

qrli at 2007-8-30 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...