Jump to content
  • Advertisement
Sign in to follow this  

resizing a backbuffer

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

If you intended to correct an error in the post then please contact us.

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;
			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;

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!