Changeset 2209


Ignore:
Timestamp:
03/08/07 11:45:04 (17 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

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

    r2200 r2209  
    2929                                                                                                                                                0, 
    3030                                                                                                                                                0, 
    31                                                                                                                                                 PF_FLOAT32_RGBA, 
     31                                                                                                                                                PF_FLOAT16_RGBA, 
    3232                                                                                                                                                TU_RENDERTARGET); 
    3333         allWeightsTexture = texPtr.getPointer(); 
     
    5050                                                                                                                                0, 
    5151                                                                                                                                0, 
    52                                                                                                                                 PF_FLOAT32_RGBA, 
     52                                                                                                                                PF_FLOAT16_RGBA, 
    5353                                                                                                                                TU_RENDERTARGET); 
    5454         weightTexture = texPtr.getPointer(); 
     
    9494 
    9595                        rt->writeContentsToFile("allweights.bmp");                       
    96                         rt->writeContentsToFile("allweights.dds"); 
     96                //      rt->writeContentsToFile("allweights.dds"); 
     97 
     98 
     99///////////////////DEBUG 
     100                        static BillboardSet* entryPointBBSet = 0; 
     101                        if(entryPointBBSet == 0) 
     102                        { 
     103                                SceneManager* sm = Root::getSingleton()._getCurrentSceneManager(); 
     104                                entryPointBBSet = sm->createBillboardSet("PATHMAP_ENTRYPOINTS", entryPointCnt); 
     105                                entryPointBBSet->setBillboardType(BBT_POINT); 
     106                                entryPointBBSet->setBillboardsInWorldSpace(true); 
     107                                entryPointBBSet->setPointRenderingEnabled(true); 
     108                                for(unsigned int i = 0; i < entryPointCnt; i++) 
     109                                { 
     110                                        PathMapEntryPoint EP = OgreIlluminationManager::getSingleton().getPathMapEntryPoints().at(i); 
     111                                        Vector3 billboardPosition = EP.position; 
     112                                        float uCoord = ((float) (i % col) + 0.5f) / (float) col; 
     113                                        float vCoord = ((float)(i / col) + 0.5f) / 4096.0f; 
     114                                        entryPointBBSet->createBillboard(billboardPosition, ColourValue(uCoord, vCoord, 0, 0)); 
     115                                } 
     116                                entryPointBBSet->setMaterialName("GTP/PM/EPBillboards"); 
     117                                MaterialPtr mater = MaterialManager::getSingleton().getByName("GTP/PM/EPBillboards"); 
     118                                mater->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTextureName(allWeightsTexture->getName()); 
     119                                sm->getRootSceneNode()->createChildSceneNode()->attachObject(entryPointBBSet); 
     120                        } 
     121///////////////// 
    97122        } 
    98123        else 
     
    100125                ///not implemented 
    101126        } 
    102  
     127/* 
    103128        unsigned int clustercount = OgreIlluminationManager::getSingleton().getPathMapClusterLengthsSize(); 
    104129 
     
    118143 
    119144        rt->writeContentsToFile("weights.bmp");  
    120         rt->writeContentsToFile("weights.dds");  
     145        rt->writeContentsToFile("weights.dds"); */ 
    121146} 
    122147 
Note: See TracChangeset for help on using the changeset viewer.