Пример #1
0
        /// <summary>
        ///     レンダーターゲットをリセットします.
        /// </summary>
        private void ResetTargets()
        {
            // ターゲットを破棄
            if (RenderTargetView != null && !RenderTargetView.Disposed)
            {
                RenderTargetView.Dispose();
            }
            if (RenderTarget != null && !RenderTarget.Disposed)
            {
                RenderTarget.Dispose();
            }
            if (DepthTargetView != null && !DepthTargetView.Disposed)
            {
                DepthTargetView.Dispose();
            }
            if (DepthTarget != null && !DepthTarget.Disposed)
            {
                DepthTarget.Dispose();
            }

            Device device = Context.DeviceManager.Device;

            //深度ステンシルバッファの初期化
            //レンダーターゲットの初期化
            renderTarget     = new Texture2D(device, getRenderTargetTexture2DDescription());
            renderTargetView = new RenderTargetView(device, RenderTarget);
            //深度ステンシルバッファの初期化
            depthTarget     = new Texture2D(device, getDepthBufferTexture2DDescription());
            depthTargetView = new DepthStencilView(device, DepthTarget);

            SetViewport();
        }
Пример #2
0
 /// <summary>
 /// リサイズ時などのためにDepthtargetViewとRenderTargetViewをDisposeします。
 /// nullの場合はスキップされます。
 /// </summary>
 protected void DisposeTargetViews()
 {
     if (RenderTargetView != null && !RenderTargetView.Disposed)
     {
         RenderTargetView.Dispose();
     }
     if (DepthTargetView != null && !DepthTargetView.Disposed)
     {
         DepthTargetView.Dispose();
     }
 }
Пример #3
0
 public void Dispose()
 {
     RenderTexture.Dispose();
     DepthTexture.Dispose();
     RenderTargetView.Dispose();
     RenderSourceView.Dispose();
     DepthTargetView.Dispose();
     DepthResourceView.Dispose();
     ResolveTexture.Dispose();
     ResolveTargetView.Dispose();
     ResolveSourceView.Dispose();
 }
    public void Dispose()
    {
        AccumTexture.Dispose();
        AccumTargetView.Dispose();
        AccumResourceView.Dispose();

        RevealageTexture.Dispose();
        RevealageTargetView.Dispose();
        RevealageSourceView.Dispose();

        DepthTexture.Dispose();
        DepthTargetView.Dispose();
        DepthSourceView.Dispose();

        depthCopyingStates.Dispose();
        compositingStates.Dispose();
    }
Пример #5
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();
 }