The reload mechanism for shaders is a bit better, but still to make them unique.

This commit is contained in:
Zed A. Shaw 2025-04-14 13:16:19 -04:00
parent 08bc48df3d
commit 19b9a4affd
7 changed files with 68 additions and 44 deletions

View file

@ -19,9 +19,10 @@ namespace shaders {
std::unordered_map<std::string, Record> shaders;
};
std::shared_ptr<sf::Shader> get_shared(std::string& name);
std::shared_ptr<sf::Shader> get(const std::string& name);
void init();
bool load_shader(std::string& name, nlohmann::json& settings);
sf::Shader* get(std::string name);
void reload();
bool updated(int my_version);
int reload();
int version();
}