mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 12:09:41 +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)
|
Ogre::MaterialPtr TerrainMaterial::Profile::generate(const Ogre::Terrain* terrain)
|
||||||
{
|
{
|
||||||
const Ogre::String& matName = terrain->getMaterialName();
|
const Ogre::String& matName = terrain->getMaterialName();
|
||||||
|
|
||||||
|
sh::Factory::getInstance().destroyMaterialInstance (matName);
|
||||||
|
|
||||||
Ogre::MaterialPtr mat = Ogre::MaterialManager::getSingleton().getByName(matName);
|
Ogre::MaterialPtr mat = Ogre::MaterialManager::getSingleton().getByName(matName);
|
||||||
if (!mat.isNull())
|
if (!mat.isNull())
|
||||||
Ogre::MaterialManager::getSingleton().remove(matName);
|
Ogre::MaterialManager::getSingleton().remove(matName);
|
||||||
|
|
||||||
|
|
||||||
mMaterial = sh::Factory::getInstance().createMaterialInstance (matName);
|
mMaterial = sh::Factory::getInstance().createMaterialInstance (matName);
|
||||||
|
|
||||||
mMaterial->setProperty ("allow_fixed_function", sh::makeProperty<sh::BooleanValue>(new sh::BooleanValue(false)));
|
mMaterial->setProperty ("allow_fixed_function", sh::makeProperty<sh::BooleanValue>(new sh::BooleanValue(false)));
|
||||||
|
@ -54,6 +56,11 @@ namespace MWRender
|
||||||
createPass();
|
createPass();
|
||||||
|
|
||||||
return Ogre::MaterialManager::getSingleton().getByName(matName);
|
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
|
int TerrainMaterial::Profile::getLayersPerPass () const
|
||||||
|
|
Loading…
Reference in a new issue