Set the filename as the OSG object name on shaders - should have done this years ago :)

This commit is contained in:
James Turner 2012-04-04 16:44:23 +01:00
parent 95a9d7a229
commit 8d0330675a

View File

@ -839,6 +839,7 @@ void ShaderProgramBuilder::buildAttribute(Effect* effect, Pass* pass,
program->addShader(sitr->second.get());
} else {
ref_ptr<Shader> shader = new Shader(stype);
shader->setName(fileName);
if (shader->loadShaderSourceFromFile(fileName)) {
program->addShader(shader.get());
shaderMap.insert(ShaderMap::value_type(skey, shader));