Changeset 1644 for GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src
- Timestamp:
- 10/19/06 12:24:18 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreRenderingRun.cpp
r1592 r1644 1 1 #include "OgreRenderingrun.h" 2 2 #include "OgreIlluminationManager.h" 3 #include "OgreTerrainSceneManager.h" 3 4 4 5 MovablePlane* OgreRenderingRun::fullScreenQuad = NULL; … … 121 122 void OgreRenderingRun::setMaterialForRenderables(String& materialName, RenderQueue* rq, bool solidsonly) 122 123 { 124 SceneManager* sm = Ogre::Root::getSingleton()._getCurrentSceneManager(); 125 if(sm->getTypeName()==TerrainSceneManagerFactory::FACTORY_TYPE_NAME) 126 { 127 terrainMaterial = ((TerrainSceneManager*)sm)->getTerrainMaterial()->getName(); 128 ((TerrainSceneManager*)sm)->setCustomMaterial(materialName); 129 } 130 123 131 RenderQueue::QueueGroupIterator queueIt = rq->_getQueueGroupIterator(); 124 132 … … 153 161 } 154 162 155 SceneManager* sm = Ogre::Root::getSingleton()._getCurrentSceneManager();156 163 sm->setFindVisibleObjects(false); 157 164 } … … 178 185 void OgreRenderingRun::restoreMaterials() 179 186 { 187 SceneManager* sm = Ogre::Root::getSingleton()._getCurrentSceneManager(); 188 if(sm->getTypeName()==TerrainSceneManagerFactory::FACTORY_TYPE_NAME) 189 ((TerrainSceneManager*)sm)->setCustomMaterial(terrainMaterial); 190 191 180 192 std::map<Renderable*, String>::iterator it = visibleObjects.begin(); 181 193 std::map<Renderable*, String>::iterator itend = visibleObjects.end(); … … 189 201 visibleObjects.clear(); 190 202 191 SceneManager* sm = Ogre::Root::getSingleton()._getCurrentSceneManager();192 203 sm->setFindVisibleObjects(true); 193 204 }
Note: See TracChangeset
for help on using the changeset viewer.