public void Dispose() { DefaultShader.Dispose(); DepthShader.Dispose(); DepthCubeShader.Dispose(); DefaultTexture.Dispose(); FallbackTexture.Dispose(); WhiteTexture.Dispose(); BlackTexture.Dispose(); DefaultMaterial.Dispose(); DefaultTextureMaterial.Dispose(); MissingTextureMaterial.Dispose(); m_shaderRegistry.Dispose(); foreach (CResource waitingResource in m_waitingResources) { waitingResource.Dispose(); } m_waitingResources.Clear(); foreach (var registeredResource in m_registeredResources) { registeredResource.Value.Dispose(); } m_registeredResources.Clear(); }
public void Dispose() { _graphicsDeviceManager.PreparingDeviceSettings -= OnPreparingDeviceChanged; SpriteBatch?.Dispose(); WhiteTexture?.Dispose(); BgRenderer.Dispose(); }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { In.Dispose(); WhiteTexture.Dispose(); } }
} = 1; // 0 is white texture public static void Dispose() { VertexArray?.Dispose(); WhiteTexture?.Dispose(); TextureShader?.Dispose(); }