Browse Source

More pleasant formatting of shader variation not found -error.

Lasse Öörni 14 years ago
parent
commit
6b86e66f93

+ 1 - 1
Engine/Graphics/Direct3D9/D3D9Shader.cpp

@@ -153,7 +153,7 @@ ShaderVariation* Shader::GetVariation(const String& name)
     Map<StringHash, SharedPtr<ShaderVariation> >::Iterator i = variations_.Find(nameHash);
     Map<StringHash, SharedPtr<ShaderVariation> >::Iterator i = variations_.Find(nameHash);
     if (i == variations_.End())
     if (i == variations_.End())
     {
     {
-        LOGERROR("Could not find shader variation " + GetName() + "_" + name);
+        LOGERROR("Could not find shader variation " + GetFileName(GetName()) + "_" + name);
         variations_[nameHash] = 0; // Store a null pointer so that the error is printed only once
         variations_[nameHash] = 0; // Store a null pointer so that the error is printed only once
         return 0;
         return 0;
     }
     }

+ 1 - 1
Engine/Graphics/OpenGL/OGLShader.cpp

@@ -101,7 +101,7 @@ ShaderVariation* Shader::GetVariation(const String& name)
     Map<StringHash, SharedPtr<ShaderVariation> >::Iterator i = variations_.Find(nameHash);
     Map<StringHash, SharedPtr<ShaderVariation> >::Iterator i = variations_.Find(nameHash);
     if (i == variations_.End())
     if (i == variations_.End())
     {
     {
-        LOGERROR("Could not find shader variation " + GetName() + "_" + name);
+        LOGERROR("Could not find shader variation " + GetFileName(GetName()) + "_" + name);
         variations_[nameHash] = 0; // Store a null pointer so that the error is printed only once
         variations_[nameHash] = 0; // Store a null pointer so that the error is printed only once
         return 0;
         return 0;
     }
     }