コード例 #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();
 }
コード例 #4
0
    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();
 }