Ignore:
Timestamp:
06/24/07 11:00:45 (17 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgrePathMapRenderTechnique.cpp

    r2406 r2460  
    146146        sm->_populateLightList(OgreIlluminationManager::getSingleton().getMainCamera()->getPosition(), 1000, lights); 
    147147 
    148         for(int i = 0 ; i < 5 && i < lights.size(); i++) 
    149         { 
    150                 String lightName = lights.at(i)->getName(); 
    151                 OgreIlluminationManager::getSingleton().createPerLightRun(lightName, ILLUMRUN_PM_WEIGHTMAP); 
    152                 OgreIlluminationManager::getSingleton().updatePerLightRun(lightName, ILLUMRUN_PM_WEIGHTMAP, frameNum);           
     148        int found = 0; 
     149        for(int i = 0 ; found < 5 && i < lights.size(); i++) 
     150        { 
     151                if(lights.at(i)->isAttached()) 
     152                { 
     153                        found ++; 
     154                        String lightName = lights.at(i)->getName(); 
     155                        OgreIlluminationManager::getSingleton().createPerLightRun(lightName, ILLUMRUN_PM_WEIGHTMAP); 
     156                        OgreIlluminationManager::getSingleton().updatePerLightRun(lightName, ILLUMRUN_PM_WEIGHTMAP, frameNum);           
     157                } 
    153158        } 
    154159        OgrePMWeightComputeRenderingRun::sumWeights(frameNum); 
Note: See TracChangeset for help on using the changeset viewer.