public void Dispose() { SpriteBatch?.Dispose(); BackBuffer?.Dispose(); DepthBuffer?.Dispose(); GraphicsDevice?.Dispose(); Device10?.Dispose(); Device11?.Dispose(); }
private void Reset(int width, int height) { Color?backgroundColor = BackBuffer?.BackgroundColor; BackBuffer?.Dispose(); DepthBuffer?.Dispose(); ResizeBuffers(width, height); BackBuffer = new BackBuffer(Device10, Device11); DepthBuffer = new DepthBuffer(Device11, width, height); if (backgroundColor != null) { BackBuffer.BackgroundColor = backgroundColor.Value; } SetViewport(width, height); SetTargets(); Reseted?.Invoke(this); }