mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
append filename to shader names
This commit is contained in:
parent
b2791fd487
commit
bb834fb44e
@ -335,9 +335,10 @@ namespace Shader
|
||||
|
||||
osg::ref_ptr<osg::Shader> shader (new osg::Shader(shaderType));
|
||||
shader->setShaderSource(shaderSource);
|
||||
// Assign a unique name to allow the SharedStateManager to compare shaders efficiently
|
||||
// Assign a unique prefix to allow the SharedStateManager to compare shaders efficiently.
|
||||
// Append shader source filename for debugging.
|
||||
static unsigned int counter = 0;
|
||||
shader->setName(std::to_string(counter++));
|
||||
shader->setName(Misc::StringUtils::format("%u %s", counter++, templateName));
|
||||
|
||||
shaderIt = mShaders.insert(std::make_pair(std::make_pair(templateName, defines), shader)).first;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user