The reload mechanism for shaders is a bit better, but still to make them unique.
This commit is contained in:
parent
08bc48df3d
commit
19b9a4affd
7 changed files with 68 additions and 44 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue