]> git.mxchange.org Git - simgear.git/commitdiff
Set the filename as the OSG object name on shaders - should have done this years...
authorJames Turner <zakalawe@mac.com>
Wed, 4 Apr 2012 15:44:23 +0000 (16:44 +0100)
committerJames Turner <zakalawe@mac.com>
Wed, 4 Apr 2012 15:44:23 +0000 (16:44 +0100)
simgear/scene/material/Effect.cxx

index fa99ccb5b2cadb346bf23ba053a80d347d6491e7..978aa064e7d7f4851842dc4784e9c5eab649bfea 100644 (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));