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. 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; }
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; }
public void Shutdown() { // Before shutting down set to windowed mode or when you release the swap chain it will throw an exception. if (SwapChain != null) { SwapChain.SetFullscreenState(false, null); } if (DepthDisabledStencilState != null) { DepthDisabledStencilState.Dispose(); DepthDisabledStencilState = null; } if (RasterState != null) { RasterState.Dispose(); RasterState = null; } if (DepthStencilView != null) { DepthStencilView.Dispose(); DepthStencilView = null; } if (DepthStencilState != null) { DepthStencilState.Dispose(); DepthStencilState = null; } if (DepthStencilBuffer != null) { DepthStencilBuffer.Dispose(); DepthStencilBuffer = null; } if (RenderTargetView != null) { RenderTargetView.Dispose(); RenderTargetView = null; } if (Device != null) { Device.Dispose(); Device = null; } if (SwapChain != null) { SwapChain.Dispose(); SwapChain = null; } }
public void ShutDown() { SwapChain?.SetFullscreenState(false, 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; }
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(); }