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
texName+= surface->getTextureName();
video::ITexture* texture = 0;
if (FileSystem->existFile(texName))
driver->getTexture(texName);
else if (FileSystem->existFile(surface->getTextureName()))
driver->getTexture(surface->getTextureName());
else if (FileSystem->existFile(FileSystem->getFileBasename(surface->getTextureName())))
driver->getTexture(FileSystem->getFileBasename(surface->getTextureName()));
else if (FileSystem->existFile(FileSystem->getFileDir(lmprefix)+"/"+surface->getTextureName()))
driver->getTexture(FileSystem->getFileDir(lmprefix)+"/"+surface->getTextureName());
else
driver->getTexture(FileSystem->getFileDir(lmprefix)+"/"+FileSystem->getFileBasename(surface->getTextureName()));
if (texName.size())
{
if (FileSystem->existFile(texName))
texture = driver->getTexture(texName);
else if (FileSystem->existFile(surface->getTextureName()))
texture = driver->getTexture(surface->getTextureName());
else if (FileSystem->existFile(FileSystem->getFileBasename(surface->getTextureName())))
texture = driver->getTexture(FileSystem->getFileBasename(surface->getTextureName()));
else if (FileSystem->existFile(FileSystem->getFileDir(lmprefix)+"/"+surface->getTextureName()))
texture = driver->getTexture(FileSystem->getFileDir(lmprefix)+"/"+surface->getTextureName());
else
texture = driver->getTexture(FileSystem->getFileDir(lmprefix)+"/"+FileSystem->getFileBasename(surface->getTextureName()));
}
//material
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