private void DestroyBuffers()
 {
     ImmediateContext.OutputMerger.SetRenderTargets((RenderTargetView)null);
     BackBufferView.Dispose();
     BackBuffer.Dispose();
     DepthBufferView.Dispose();
     DepthBuffer.Dispose();
 }
 public void DestroyBuffers()
 {
     if (BackBuffer != null)
     {
         ImmediateContext.OutputMerger.SetRenderTargets((RenderTargetView)null);
         BackBufferView.Dispose();
         BackBuffer.Dispose();
         DepthBufferView.Dispose();
         DepthBuffer.Dispose();
         BackBuffer = null;
     }
 }
        public void UnloadDirect3D()
        {
            if (!Ready)
            {
                return;
            }

            TextureCache.Dispose();

            DefaultTextureView.Dispose();
            DefaultTexture.Dispose();
            SampleState.Dispose();
            DefaultEffect.Dispose();
            BackBufferView.Dispose();
            BackBuffer.Dispose();
            DepthBufferView.Dispose();
            DepthBuffer.Dispose();
            Device.Dispose();
        }