I have a small question regarding changing device settings (such as multisampling, refresh rate, etc) after the device has been initialized.
These things is what I know: Changing fullscreen mode requires a single call:
swapChain.IsFullscreen = !swapChain.IsFullscreen
Changing screen resolution is fairly simple too, it's written at the SlimDX tutorial page. This is what I did:
// Sets the forms size window.Form.ClientSize = new Size(width, height); // Dispose the current render target and create a new one renderTarget.Dispose(); swapChain.ResizeBuffers(1, 0, 0, Format.R8G8B8A8_UNorm, SwapChainFlags.AllowModeSwitch); using (var resource = Resource.FromSwapChain<Texture2D>(swapChain, 0)) renderTarget = new RenderTargetView(device, resource); // Set the new target context.OutputMerger.SetTargets(renderTarget);
Now to the problem. If I want to change any other settings (settings in the SwapChainDescription structure), such as multisampling and refresh rate, what do I need to do? Do I need to recreate the device and swap chain objects? If that is the case, what happens to resources created or loaded with the device, such as effects, textures, vertex and index buffers, etc.? Do these need to be recreated aswell?
Thanks in advance!