diff options
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r-- | src/resources/resourcemanager.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index f9f55ca03..bb566d9f4 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -763,6 +763,7 @@ struct ShaderProgramLoader final { const std::string vertex; const std::string fragment; + const bool isNewShader; static Resource *load(const void *const v) { @@ -772,15 +773,18 @@ struct ShaderProgramLoader final const ShaderProgramLoader *const rl = static_cast<const ShaderProgramLoader *const>(v); ShaderProgram *const resource = shaders.createProgram( - rl->vertex, rl->fragment); + rl->vertex, + rl->fragment, + rl->isNewShader); return resource; } }; Resource *ResourceManager::getShaderProgram(const std::string &vertex, - const std::string &fragment) + const std::string &fragment, + const bool isNewShader) { - ShaderProgramLoader rl = { vertex, fragment }; + ShaderProgramLoader rl = { vertex, fragment, isNewShader }; return get("program_" + vertex + " + " + fragment, ShaderProgramLoader::load, &rl); } |