/// <summary>
        /// Dispose
        /// </summary>
        /// <param name="disposing">disposing</param>
        protected override void Dispose(bool disposing)
        {
            try
            {
                if (disposing)
                {
                    {
                        DisposeHelper.DisposeAndNullify(ref _vertexShaderConstantBuffer);
                        DisposeHelper.DisposeAndNullify(ref _geometryShaderConstantBuffer);

                        DisposeHelper.DisposeAndNullify(ref _vertexShaderSharedResource);
                        DisposeHelper.DisposeAndNullify(ref _inputLayoutSharedResource);
                        DisposeHelper.DisposeAndNullify(ref _vertexShaderPerPointColorSharedResource);
                        DisposeHelper.DisposeAndNullify(ref _inputLayoutPerPointColorSharedResource);
                        DisposeHelper.DisposeAndNullify(ref _geometryShaderSharedResource);
                        DisposeHelper.DisposeAndNullify(ref _pixelShaderSharedResource);

                        _dxDevice         = null;
                        _renderingContext = null;
                    }
                }
            }
            finally
            {
                base.Dispose(disposing);
            }
        }
Esempio n. 2
0
        private void DiposeMsaaBuffers()
        {
            DisposeHelper.DisposeAndNullify(ref _msaaBackBuffer);
            DisposeHelper.DisposeAndNullify(ref _msaaDepthStencilView);
            DisposeHelper.DisposeAndNullify(ref _msaaBackBufferRenderTargetView);

            _msaaBackBufferDescription = new Texture2DDescription(); // Reset the description values
        }
Esempio n. 3
0
        private void DisposeOutlineBackBuffers()
        {
            DisposeHelper.DisposeAndNullify(ref _outlineBackBuffer);
            DisposeHelper.DisposeAndNullify(ref _outlineRenderTargetView);
            DisposeHelper.DisposeAndNullify(ref _outlineDepthStencilView);
            DisposeHelper.DisposeAndNullify(ref _outlineShaderResourceView);

            DisposeHelper.DisposeAndNullify(ref _blurredOutlineBackBuffer);
            DisposeHelper.DisposeAndNullify(ref _blurredRenderTargetView);
            DisposeHelper.DisposeAndNullify(ref _blurredShaderResourceView);

            // Reset structs
            _outlineBackBufferDescription = new Texture2DDescription();
        }