resizing a backbuffer

This topic is 4587 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

So i've two windows where my scene is rendered, but indifferent view. i'm using swap chains in for manage the same scene. These windows can be resized, but when i resize the second one the mesh became blured. So i've tried to create a new presentParams for the second chain, but i don't get good results. Where i wrong?

public void OnResetDevice(object sender, EventArgs e)
{
sc_0 = device.GetSwapChain(0);
presentParams2.Windowed = true;
DisplayMode mode = new DisplayMode();

presentParams2.BackBufferFormat = mode.Format;
presentParams2.BackBufferWidth = mode.Width;
presentParams2.BackBufferHeight = mode.Height;
presentParams2.EnableAutoDepthStencil = true;
presentParams2.AutoDepthStencilFormat = DepthFormat.D16;
sc_1 = new SwapChain(device, presentParams2);
device.RenderState.ZBufferEnable = true;
device.RenderState.Ambient = System.Drawing.Color.White;
}