mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 11:23:51 +00:00
Fix terrain material leak, this should in theory allow the terrain to free its temporary resources
This commit is contained in:
parent
78596cad83
commit
9648804af5
1 changed files with 2 additions and 1 deletions
|
@ -54,9 +54,10 @@ namespace MWRender
|
||||||
|
|
||||||
TerrainMaterial::Profile::~Profile()
|
TerrainMaterial::Profile::~Profile()
|
||||||
{
|
{
|
||||||
|
if (mMaterial)
|
||||||
|
sh::Factory::getInstance().destroyMaterialInstance(mMaterial->getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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();
|
||||||
|
|
Loading…
Reference in a new issue