/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #pragma once #include "ResourceLoader.hpp" #include #include namespace OpenVulkano { class WebResourceLoader : public ResourceLoader { protected: std::filesystem::path m_cacheDirectory; std::filesystem::path GetCacheFilePath(const std::string& url); Array DownloadResource(const std::string& url); public: static bool IsUrl(const std::string& str); WebResourceLoader(); ~WebResourceLoader(); Array GetResource(const std::string& resourceName) override; }; }