- Timestamp:
- 03/05/07 18:05:16 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreIlluminationManager.cpp
r2185 r2189 3 3 #include "OgreBillboardParticleRenderer.h" 4 4 #include "SpriteParticleRenderer.h" 5 #include "OgrePMEntryPointMapRenderingRun.h" 6 #include "OgrePMWeightComputeRenderingRun.h" 5 7 6 8 OgreIlluminationManager* OgreIlluminationManager::instance = NULL; … … 85 87 blurSM = false; 86 88 focusingSM = true; 87 shadowMapMaterialName = "GameTools/ShadowMapDepth"; 89 shadowMapMaterialName = "GTP/Basic/Distance_NormalizedCCW"; 90 areaLightRadius = 0.1; 88 91 89 92 for(int i = 0; i < RUN_TYPE_COUNT; i++) … … 193 196 OgreRenderable* rend = 0; 194 197 OgreTechniqueGroup* group = 0; 195 198 196 199 for(unsigned int t = 0 ; t < mat->getNumTechniques() ; t++) 197 200 { … … 203 206 204 207 std::vector<IllumTechniqueParams*>& techniques = pass->getIllumTechniques(); 205 std::vector<IllumTechniqueParams*>::iterator i = techniques.begin(); 206 std::vector<IllumTechniqueParams*>::iterator iend = techniques.end(); 207 208 while( i != iend) 208 if( techniques.size() > 0) 209 209 { 210 IllumTechniqueParams* params = *i;211 212 210 if(rend == 0) 213 211 { … … 226 224 sharedruns->updateBounds(); 227 225 } 228 226 String newMaterialName = mat->getName() + rend->getName() + "_clone"; 227 Material* newMat = mat->clone(newMaterialName).getPointer(); 228 mat = newMat; 229 rend->setMaterialName(newMaterialName); 230 break; 231 } 232 } 233 } 234 235 236 for(unsigned int t = 0 ; t < mat->getNumTechniques() ; t++) 237 { 238 Technique* tech = mat->getTechnique(t); 239 240 for(unsigned int p = 0; p< tech->getNumPasses(); p++) 241 { 242 Pass* pass = tech->getPass(p); 243 244 std::vector<IllumTechniqueParams*>& techniques = pass->getIllumTechniques(); 245 std::vector<IllumTechniqueParams*>::iterator i = techniques.begin(); 246 std::vector<IllumTechniqueParams*>::iterator iend = techniques.end(); 247 248 while( i != iend) 249 { 250 IllumTechniqueParams* params = *i; 229 251 createTechnique(params, pass, rend, sharedruns); 230 252 … … 545 567 } 546 568 break; 569 case ILLUMRUN_PM_ENTRYPOINTMAP: 570 if(globalSharedRuns.getRun(ILLUMRUN_PM_ENTRYPOINTMAP) == 0) 571 { 572 OgrePMEntryPointMapRenderingRun* run = new OgrePMEntryPointMapRenderingRun( 573 "PM_ENTRYPOINT_MAP"); 574 globalSharedRuns.addRun(ILLUMRUN_PM_ENTRYPOINTMAP, run); 575 } 576 break; 547 577 } 548 578 } … … 614 644 } 615 645 break; 646 case ILLUMRUN_PM_WEIGHTMAP: 647 if(runs->getRun(ILLUMRUN_PM_WEIGHTMAP) == 0) 648 { 649 SceneManager* sm = Root::getSingleton()._getCurrentSceneManager(); 650 OgrePMWeightComputeRenderingRun* run = new OgrePMWeightComputeRenderingRun( 651 lightName + "PM_WEIGHT_MAP", 652 lightName); 653 runs->addRun(ILLUMRUN_PM_WEIGHTMAP, run); 654 } 655 break; 616 656 } 617 657 }
Note: See TracChangeset
for help on using the changeset viewer.