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; } }
void DestroyD3D() { if (SampleVertices != null) { SampleVertices.Dispose(); SampleVertices = null; } if (SampleLayout != null) { SampleLayout.Dispose(); SampleLayout = null; } if (SampleEffect != null) { SampleEffect.Dispose(); SampleEffect = null; } if (SampleRenderView != null) { SampleRenderView.Dispose(); SampleRenderView = null; } if (SampleDepthView != null) { SampleDepthView.Dispose(); SampleDepthView = null; } if (SampleStream != null) { SampleStream.Dispose(); SampleStream = null; } if (SampleLayout != null) { SampleLayout.Dispose(); SampleLayout = null; } if (SharedTexture != null) { SharedTexture.Dispose(); SharedTexture = null; } if (DepthTexture != null) { DepthTexture.Dispose(); DepthTexture = null; } if (D3DDevice != null) { D3DDevice.Dispose(); D3DDevice = null; } }