Ejemplo n.º 1
0
        protected void Dispose(bool disposing)
        {
            if (!disposed)
            {
                if (disposing)
                {
                    this.Context = null;
                }

                if (WorldSpace != null)
                {
                    WorldSpace.Dispose();
                    WorldSpace = null;
                }

                DisposeTargetViews();
                if (RenderTarget != null && !RenderTarget.Disposed)
                {
                    RenderTarget.Dispose();
                }
                if (DepthTarget != null && !DepthTarget.Disposed)
                {
                    DepthTarget.Dispose();
                }
                HitChecker.Dispose();
                disposed = true;
            }
        }
Ejemplo n.º 2
0
 public override void Dispose()
 {
     if (WorldSpace != null)
     {
         WorldSpace.Dispose();
     }
     if (RenderTargetView != null && !RenderTargetView.Disposed)
     {
         RenderTargetView.Dispose();
     }
     if (DepthTargetView != null && !DepthTargetView.Disposed)
     {
         DepthTargetView.Dispose();
     }
     if (SwapChain != null && !SwapChain.Disposed)
     {
         SwapChain.Dispose();
     }
     HitChekcer.Dispose();
 }