Commit 05255a19 authored by hybrid's avatar hybrid

Fix diffuse texture for csm files.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2540 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 5c91b1cb
...@@ -447,16 +447,19 @@ namespace scene ...@@ -447,16 +447,19 @@ namespace scene
texName+= surface->getTextureName(); texName+= surface->getTextureName();
video::ITexture* texture = 0; video::ITexture* texture = 0;
if (FileSystem->existFile(texName)) if (texName.size())
driver->getTexture(texName); {
else if (FileSystem->existFile(surface->getTextureName())) if (FileSystem->existFile(texName))
driver->getTexture(surface->getTextureName()); texture = driver->getTexture(texName);
else if (FileSystem->existFile(FileSystem->getFileBasename(surface->getTextureName()))) else if (FileSystem->existFile(surface->getTextureName()))
driver->getTexture(FileSystem->getFileBasename(surface->getTextureName())); texture = driver->getTexture(surface->getTextureName());
else if (FileSystem->existFile(FileSystem->getFileDir(lmprefix)+"/"+surface->getTextureName())) else if (FileSystem->existFile(FileSystem->getFileBasename(surface->getTextureName())))
driver->getTexture(FileSystem->getFileDir(lmprefix)+"/"+surface->getTextureName()); texture = driver->getTexture(FileSystem->getFileBasename(surface->getTextureName()));
else else if (FileSystem->existFile(FileSystem->getFileDir(lmprefix)+"/"+surface->getTextureName()))
driver->getTexture(FileSystem->getFileDir(lmprefix)+"/"+FileSystem->getFileBasename(surface->getTextureName())); texture = driver->getTexture(FileSystem->getFileDir(lmprefix)+"/"+surface->getTextureName());
else
texture = driver->getTexture(FileSystem->getFileDir(lmprefix)+"/"+FileSystem->getFileBasename(surface->getTextureName()));
}
//material //material
core::string<c16> lmapName = lmprefix; core::string<c16> lmapName = lmprefix;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment