コード例 #1
0
 public void ShutDown()
 {
     SwapChain?.SetFullscreenState(false, null);
     AlphaEnableBlendingState?.Dispose();
     AlphaEnableBlendingState = null;
     AlphaDisableBlendingState?.Dispose();
     AlphaDisableBlendingState = null;
     DepthDisabledStencilState?.Dispose();
     DepthDisabledStencilState = null;
     RasterState?.Dispose();
     RasterState = null;
     RasterStateNoCulling?.Dispose();
     RasterStateNoCulling = null;
     RasterStateWirefram?.Dispose();
     RasterStateWirefram = null;
     DepthStencilView?.Dispose();
     DepthStencilView = null;
     DepthStencilState?.Dispose();
     DepthStencilState = null;
     DepthStencilBuffer?.Dispose();
     DepthStencilBuffer = null;
     RenderTargetView?.Dispose();
     RenderTargetView = null;
     DeviceContext?.Dispose();
     DeviceContext = null;
     Device?.Dispose();
     Device = null;
     SwapChain?.Dispose();
     SwapChain = null;
 }
コード例 #2
0
        public void ShutDown()
        {
            // Before shutting down set to windowed mode or when you release the swap chain it will throw an exception.
            SwapChain?.SetFullscreenState(false, null);

            // Dispose of all objects.
            AlphaEnableBlendingState?.Dispose();
            AlphaEnableBlendingState = null;
            AlphaDisableBlendingState?.Dispose();
            AlphaDisableBlendingState = null;
            DepthDisabledStencilState?.Dispose();
            DepthDisabledStencilState = null;
            RasterState?.Dispose();
            RasterState = null;
            DepthStencilView?.Dispose();
            DepthStencilView = null;
            DepthStencilState?.Dispose();
            DepthStencilState = null;
            DepthStencilBuffer?.Dispose();
            DepthStencilBuffer = null;
            RenderTargetView?.Dispose();
            RenderTargetView = null;
            DeviceContext?.Dispose();
            DeviceContext = null;
            Device?.Dispose();
            Device = null;
            SwapChain?.Dispose();
            SwapChain = null;
        }
コード例 #3
0
        public void ShutDown()
        {
            // Before shutting down set to windowed mode or when you release the swap chain it will throw an exception.
            SwapChain?.SetFullscreenState(false, null);
            RasterState?.Dispose();
            RasterState = null;
            depthStencilState?.Dispose();
            depthStencilState = null;
            DepthStencilBuffer?.Dispose();
            DepthStencilBuffer = null;
            _depthStencilView?.Dispose();
            _depthStencilView = null;
            _renderTargetView?.Dispose();
            _renderTargetView = null;
            DeviceContext?.Dispose();
            Device?.Dispose();
            SwapChain?.Dispose();



            AlphaEnableBlendingState?.Dispose();
            AlphaEnableBlendingState = null;
            AlphaDisableBlendingState?.Dispose();
            AlphaDisableBlendingState = null;
            DepthDisabledStencilState?.Dispose();
            DepthDisabledStencilState = null;
            //DepthStencilView?.Dispose();
            //DepthStencilView = null;
            DepthStencilState?.Dispose();
            DepthStencilState = null;
            DepthStencilBuffer?.Dispose();
            DepthStencilBuffer = null;


            if (main_thread_update != null)
            {
                //main_thread_update.Suspend();
                main_thread_update = null;
            }
            ShutDownGraphics();
        }
コード例 #4
0
        public void Dispose()
        {
            _swapChain?.SetFullscreenState(false, null);

            AlphaAdditiveBlendState2?.Dispose();
            AlphaAdditiveBlendState2 = null;

            AlphaEnableBlendingState?.Dispose();
            AlphaEnableBlendingState = null;

            AlphaDisableBlendingState?.Dispose();
            AlphaDisableBlendingState = null;

            DepthDisabledStencilState?.Dispose();
            DepthDisabledStencilState = null;

            _rasterState?.Dispose();
            _rasterState = null;

            _depthStencilView?.Dispose();
            _depthStencilView = null;

            DepthStencilState?.Dispose();
            DepthStencilState = null;

            _depthStencilBuffer?.Dispose();
            _depthStencilBuffer = null;

            _renderTargetView?.Dispose();
            _renderTargetView = null;

            DeviceContext?.Dispose();
            DeviceContext = null;

            Device?.Dispose();
            Device = null;

            _swapChain?.Dispose();
            _swapChain = null;
        }