Original Post
Hello I'm creating a windowed application that uses an XNA-enabled custom control. The presentation parameters are as follows: presentationParameters.BackBufferCount = 1; presentationParameters.IsFullScreen = false; presentationParameters.DeviceWindowHandle = this.renderControl.Handle; presentationParameters.BackBufferWidth = 0;// this.renderControl.Width; presentationParameters.BackBufferHeight = this.renderControl.Height; presentationParameters.SwapEffect = SwapEffect.Discard; presentationParameters.AutoDepthStencilFormat = DepthFormat.Depth24Stencil8; presentationParameters.EnableAutoDepthStencil = true; presentationParameters.PresentationInterval = PresentInterval.Default; presentationParameters.BackBufferFormat = SurfaceFormat.Unknown; presentationParameters.MultiSampleType = MultiSampleType.None; //presentParams.MultiSampleType = MultiSampleType.TwoSamples; /* This does not run on Intel? */ //presentParams.MultiSampleQuality = 1; presentationParameters.RenderTargetUsage = RenderTargetUsage.PreserveContents; graphicsDevice = new GraphicsDevice( GraphicsAdapter.DefaultAdapter, DeviceType.Hardware, this.renderControl.Handle, presentationParameters ); Upon resizing the control: renderer.graphicsDevice.PresentationParameters.BackBufferWidth = w; renderer.graphicsDevice.PresentationParameters.BackBufferHeight = h; //Viewport vp = new Viewport(); //vp.X = 0; //vp.Y = 0; //vp.Width = w; //vp.Height = h; //renderer.graphicsDevice.Viewport = vp; renderer.graphicsDevice.Reset(); float aspectRation = renderer.graphicsDevice.Viewport.AspectRatio; renderer.projMatrix = Matrix.CreatePerspectiveFieldOfView( (float) Math.PI / 4, aspectRation, 4.0f, 40000.0f ); However, after resetting the device, the backbuffer dimensions are set back to the creation time width and height which is incorrect. What's wrong? Thanks.