diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index d96bf16e4..d30d0961a 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -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"), diff --git a/components/terrain/terraingrid.cpp b/components/terrain/terraingrid.cpp index 2efbf1b9e..eb085ca42 100644 --- a/components/terrain/terraingrid.cpp +++ b/components/terrain/terraingrid.cpp @@ -166,10 +166,6 @@ osg::ref_ptr 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());