protected override void ResizeDepthStencilBuffer(int width, int height, PixelFormat format) { var newTextureDescrition = DepthStencilBuffer.Description; newTextureDescrition.Width = width; newTextureDescrition.Height = height; // Manually update the texture DepthStencilBuffer.OnDestroyed(); // Put it in our back buffer texture DepthStencilBuffer.InitializeFrom(newTextureDescrition); }
protected override void ResizeDepthStencilBuffer(int width, int height, PixelFormat format) { var newTextureDescrition = DepthStencilBuffer.Description; newTextureDescrition.Width = width; newTextureDescrition.Height = height; // Manually update the texture DepthStencilBuffer.OnDestroyed(); // Manually update all children textures var fastList = DestroyChildrenTextures(DepthStencilBuffer); // Put it in our back buffer texture DepthStencilBuffer.InitializeFrom(newTextureDescrition); foreach (var texture in fastList) { texture.InitializeFrom(DepthStencilBuffer, texture.ViewDescription); } }