Slight rework so that config can have a base dir but the program can start in another one.
This commit is contained in:
parent
d1c2352237
commit
3d4ddde96e
8 changed files with 32 additions and 13 deletions
|
@ -18,8 +18,10 @@ namespace shaders {
|
|||
|
||||
bool load_shader(std::string name, nlohmann::json& settings) {
|
||||
std::string file_name = settings["file_name"];
|
||||
|
||||
auto ptr = std::make_shared<sf::Shader>();
|
||||
bool good = ptr->loadFromFile(file_name, sf::Shader::Type::Fragment);
|
||||
bool good = ptr->loadFromFile(Config::path_to(file_name),
|
||||
sf::Shader::Type::Fragment);
|
||||
|
||||
if(good) {
|
||||
configure_shader_defaults(ptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue