Skip to main content
gamedev.net
🔒 Locked

resizing a backbuffer

Started by Say Aug 1, 2005 at 4:39 AM 0 replies 600+ views
Original Post
Say
Say
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;
			presentParams2.SwapEffect = SwapEffect.Discard;
			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;
		}

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.