Ignore:
Timestamp:
05/15/07 11:46:00 (17 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreDepthShadowMapRenderingRun.cpp

    r2366 r2375  
    8484                //updateDepthCubeFace(currentFace); 
    8585                //currentFace = (currentFace+1)%6; 
     86                 
     87 
     88                //Timer* t = Root::getSingleton().getTimer(); 
     89                //unsigned long  start =  t->getMicroseconds();          
     90                //setMaterialForRenderables(materialName, true);                                 
     91                //unsigned long  end =  t->getMicroseconds(); 
     92                //double elapsed = (double) (end - start) / 1000.0; 
     93                //LogManager::getSingleton().logMessage(String("MaterialSetTime: ") + name + " : " + StringConverter::toString(Real(elapsed)) + " ms"); 
     94                //visibleObjects.clear(); 
    8695 
    8796                for(int i = 0; i < 6 ; i++) 
    8897                        updateDepthCubeFace(i); 
     98 
     99                //start =  t->getMicroseconds(); 
     100                 
     101                restoreMaterials(); 
     102 
     103                //end =  t->getMicroseconds(); 
     104                //elapsed = (double) (end - start) / 1000000.0; 
     105                //LogManager::getSingleton().logMessage(String("MaterialRestoreTime: ") + name + " : " +  StringConverter::toString(Real(elapsed)) + " ms");     
    89106        } 
    90107        else 
     
    95112 
    96113void OgreDepthShadowMapRenderingRun::updateDepthCubeFace(int facenum) 
    97 { 
     114{        
     115        Vector3 lightpos = light->getDerivedPosition();                  
    98116        String triggerName = "ILLUM_TRIGGER_SM_POINT";   
    99  
    100         Vector3 lightpos = light->getDerivedPosition();                  
    101          
     117                 
    102118        RenderTarget* rt = depthMapTexture->getBuffer(facenum, 0).getPointer()->getRenderTarget();       
    103119        Camera*  cam =  rt->getViewport(0)->getCamera(); 
    104         cam->setPosition(lightpos);      
    105120        cam->setFarClipDistance(lightFarPlane); 
    106  
     121        cam->setPosition(lightpos); 
     122         
     123         
    107124        setMaterialForVisibles(materialName, cam, true, false, triggerName); 
     125         
    108126        rt->update(); 
    109         restoreMaterials(); 
    110  
     127 
     128//      restoreMaterials(); 
     129         
    111130        //rt->writeContentsToFile("shadowmap_" + StringConverter::toString(facenum) + ".dds"); 
    112131 
     
    120139                 
    121140                //rt->writeContentsToFile("shadowmap_blurred_" + StringConverter::toString(facenum) + ".dds"); 
    122         } 
    123          
     141        }        
    124142} 
    125143 
Note: See TracChangeset for help on using the changeset viewer.