Exemplo n.º 1
0
 public void Dispose()
 {
     if (_disposed)
     {
         return;
     }
     DeviceManager.Dispose();
     MaterialManager.Dispose();
     TextureResourceManager.Dispose();
     TextureSamplerManager.Dispose();
     BlendStateManager.Dispose();
     RasterizerStateManager.Dispose();
     _disposed = true;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Releases unmanaged and - optionally - managed resources.
        /// </summary>
        /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                _hudTextFormat.Dispose();
                _hudYellow.Dispose();
                _hudWhite.Dispose();

                _fontCollection.Dispose();
                _fontLoader.Dispose();
                _dwFactory.Dispose();

                _texResMan.Dispose();
                _spriteResMan.Dispose();

                _swapChain.Dispose();
                _d2dTarget.Dispose();
                _d2dFactory.Dispose();
                _d3dContext.Dispose();
                _d2dContext.Dispose();
                _device.Dispose();
            }
        }