Пример #1
0
        public void Dispose()
        {
            StopRender();
            WaitForCompletion();

            foreach (var view in views)
            {
                view.Dispose();
            }
            debugFont.Dispose();
            instanceBuffer.Dispose();
            device.Dispose();
            swapChain.Dispose();
        }
Пример #2
0
        private void DestroyD3D()
        {
            _textureManager.Dispose();
            _dxCube.Dispose();
            //_dxEffect.Dispose();
            _kinectPoints.Dispose();


            if (_dxFont != null)
            {
                _dxFont.Dispose();
                _dxFont = null;
            }

            if (DepthTexture != null)
            {
                DepthTexture.Dispose();
                DepthTexture = null;
            }

            if (SharedTexture != null)
            {
                SharedTexture.Dispose();
                SharedTexture = null;
            }

            if (_dxRenderView != null)
            {
                _dxRenderView.Dispose();
                _dxRenderView = null;
            }

            if (_dxDepthStencilView != null)
            {
                _dxDepthStencilView.Dispose();
                _dxDepthStencilView = null;
            }

            if (_dxDevice != null)
            {
                _dxDevice.Dispose();
                _dxDevice = null;
            }
        }