1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 21:49:55 +00:00

Do not unref a Texture's image data after applying it

This commit is contained in:
scrawl 2016-02-05 23:21:54 +01:00
parent 499beda665
commit 9e5225bb6f
2 changed files with 1 additions and 5 deletions

View file

@ -448,7 +448,7 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
VFS::registerArchives(mVFS.get(), mFileCollections, mArchives, true);
mResourceSystem.reset(new Resource::ResourceSystem(mVFS.get()));
mResourceSystem->getSceneManager()->setUnRefImageDataAfterApply(true);
mResourceSystem->getSceneManager()->setUnRefImageDataAfterApply(false); // keep to Off for now to allow better state sharing
mResourceSystem->getSceneManager()->setFilterSettings(
Settings::Manager::getString("texture mag filter", "General"),
Settings::Manager::getString("texture min filter", "General"),

View file

@ -166,10 +166,6 @@ osg::ref_ptr<osg::Node> TerrainGrid::buildTerrain (osg::Group* parent, float chu
textureCompileDummy->getOrCreateStateSet()->setTextureAttributeAndModes(dummyTextureCounter++, blendmapTextures.back());
}
// SharedStatemanager->share(textureCompileDummy);
// Remove unrefImageDataAfterApply for better state sharing
// use texture coordinates for both texture units, the layer texture and blend texture
for (unsigned int i=0; i<2; ++i)
geometry->setTexCoordArray(i, mCache.getUVBuffer());