mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 06:15:35 +00:00
temp commit
This commit is contained in:
parent
7731e9a6fa
commit
d2fbb11475
1 changed files with 8 additions and 1 deletions
|
@ -42,11 +42,13 @@ namespace MWRender
|
|||
Ogre::MaterialPtr TerrainMaterial::Profile::generate(const Ogre::Terrain* terrain)
|
||||
{
|
||||
const Ogre::String& matName = terrain->getMaterialName();
|
||||
|
||||
sh::Factory::getInstance().destroyMaterialInstance (matName);
|
||||
|
||||
Ogre::MaterialPtr mat = Ogre::MaterialManager::getSingleton().getByName(matName);
|
||||
if (!mat.isNull())
|
||||
Ogre::MaterialManager::getSingleton().remove(matName);
|
||||
|
||||
|
||||
mMaterial = sh::Factory::getInstance().createMaterialInstance (matName);
|
||||
|
||||
mMaterial->setProperty ("allow_fixed_function", sh::makeProperty<sh::BooleanValue>(new sh::BooleanValue(false)));
|
||||
|
@ -54,6 +56,11 @@ namespace MWRender
|
|||
createPass();
|
||||
|
||||
return Ogre::MaterialManager::getSingleton().getByName(matName);
|
||||
|
||||
/*
|
||||
Ogre::MaterialPtr m = Ogre::MaterialManager::getSingleton().create(matName, Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
|
||||
return m;
|
||||
*/
|
||||
}
|
||||
|
||||
int TerrainMaterial::Profile::getLayersPerPass () const
|
||||
|
|
Loading…
Reference in a new issue