assets-related refactor

This commit is contained in:
MihailRis 2024-04-10 17:44:17 +03:00
parent 216e38e411
commit befc9cf09c
14 changed files with 242 additions and 202 deletions

View file

@ -5,6 +5,7 @@
#include <string>
#include <memory>
#include <functional>
#include <unordered_map>
#include <vector>
@ -12,12 +13,18 @@ class Texture;
class Shader;
class Font;
class Atlas;
class Assets;
class UiDocument;
namespace audio {
class Sound;
}
namespace assetload {
/// @brief final work to do in the main thread
using postfunc = std::function<void(Assets*)>;
}
class Assets {
std::unordered_map<std::string, std::shared_ptr<Texture>> textures;
std::unordered_map<std::string, std::shared_ptr<Shader>> shaders;