From a8939bc3180a8475be9dd38878228c924a31e9b0 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 4 Mar 2012 00:08:56 +0100 Subject: [PATCH] disabled the composite map, improves loading time a lot --- apps/openmw/mwrender/terrain.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/apps/openmw/mwrender/terrain.cpp b/apps/openmw/mwrender/terrain.cpp index ca218388f5..a66b4ad3f0 100644 --- a/apps/openmw/mwrender/terrain.cpp +++ b/apps/openmw/mwrender/terrain.cpp @@ -51,6 +51,7 @@ namespace MWRender mActiveProfile->setLayerNormalMappingEnabled(false); mActiveProfile->setLayerParallaxMappingEnabled(false); mActiveProfile->setReceiveDynamicShadowsEnabled(false); + mActiveProfile->setCompositeMapEnabled(false); mTerrainGroup = OGRE_NEW Ogre::TerrainGroup(mgr, Ogre::Terrain::ALIGN_X_Z, @@ -160,10 +161,6 @@ namespace MWRender else mActiveProfile->setGlobalColourMapEnabled(false); - /// \todo are we possibly generating the materials twice? - mActiveProfile->generate(terrain); - mActiveProfile->generateForCompositeMap(terrain); - if ( store->land[1][1]->landData->usingColours ) { Ogre::TexturePtr vertex = getVertexColours(store, @@ -173,10 +170,10 @@ namespace MWRender //this is a hack to get around the fact that Ogre seems to //corrupt the global colour map leading to rendering errors - MaterialPtr mat = terrain->_getMaterial(); - mat->getTechnique(0)->getPass(0)->getTextureUnitState(1)->setTextureName( vertex->getName() ); - mat = terrain->_getCompositeMapMaterial(); + MaterialPtr mat = terrain->getMaterial(); mat->getTechnique(0)->getPass(0)->getTextureUnitState(1)->setTextureName( vertex->getName() ); + //mat = terrain->_getCompositeMapMaterial(); + //mat->getTechnique(0)->getPass(0)->getTextureUnitState(1)->setTextureName( vertex->getName() ); } } }