|
|
|
@ -6,7 +6,9 @@
|
|
|
|
|
|
|
|
|
|
#include <boost/functional/hash.hpp>
|
|
|
|
|
|
|
|
|
|
#if TERRAIN_USE_SHADER
|
|
|
|
|
#include <extern/shiny/Main/Factory.hpp>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
namespace
|
|
|
|
|
{
|
|
|
|
@ -64,7 +66,9 @@ namespace Terrain
|
|
|
|
|
assert(!renderCompositeMap || !displayCompositeMap);
|
|
|
|
|
if (!mat.isNull())
|
|
|
|
|
{
|
|
|
|
|
#if TERRAIN_USE_SHADER
|
|
|
|
|
sh::Factory::getInstance().destroyMaterialInstance(mat->getName());
|
|
|
|
|
#endif
|
|
|
|
|
Ogre::MaterialManager::getSingleton().remove(mat->getName());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -144,6 +148,7 @@ namespace Terrain
|
|
|
|
|
|
|
|
|
|
return mat;
|
|
|
|
|
}
|
|
|
|
|
#if TERRAIN_USE_SHADER
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
sh::MaterialInstance* material = sh::Factory::getInstance().createMaterialInstance (name.str());
|
|
|
|
@ -343,6 +348,7 @@ namespace Terrain
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
return Ogre::MaterialManager::getSingleton().getByName(name.str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|