Ignore:
Timestamp:
10/20/05 18:49:11 (19 years ago)
Author:
mattausch
Message:

added switch between NV and ARB queries in the render system and in the demos.
Fixed render queue bug: when clearing queue, we traversed through all priority groups
to clear the passmaps. This became very slow because had to traverse many elements (over 1000
for city demo). Now all we destroy the priority groups for each rendering (per hierarchy node).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/work/ogre_changes/OgreMain/src/OgreRenderQueueSortingGrouping.cpp

    r139 r343  
    278278#ifdef GTP_VISIBILITY_MODIFIED_OGRE      
    279279        //----------------------------------------------------------------------- 
    280     void RenderPriorityGroup::clearSolids(void) 
    281     { 
    282         /*SolidRenderablePassMap::iterator i, iend; 
    283         // Delete queue groups which are using passes which are to be 
    284         // deleted, we won't need these any more and they clutter up  
    285         // the list and can cause problems with future clones 
    286         const Pass::PassSet& graveyardList = Pass::getPassGraveyard(); 
    287         Pass::PassSet::const_iterator gi, giend; 
    288         giend = graveyardList.end(); 
    289         for (gi = graveyardList.begin(); gi != giend; ++gi) 
    290         { 
    291             removeSolidPassEntry(*gi); 
    292         } 
    293  
    294         // Now remove any dirty passes, these will have their hashes recalculated 
    295         // by the parent queue after all groups have been processed 
    296         // If we don't do this, the std::map will become inconsistent for new insterts 
    297         const Pass::PassSet& dirtyList = Pass::getDirtyHashList(); 
    298         Pass::PassSet::const_iterator di, diend; 
    299         diend = dirtyList.end(); 
    300         for (di = dirtyList.begin(); di != diend; ++di) 
    301         { 
    302             removeSolidPassEntry(*di); 
    303         }*/ 
    304         // NB we do NOT clear the graveyard or the dirty list here, because  
    305         // it needs to be acted on for all groups, the parent queue takes  
    306         // care of this afterwards 
    307  
    308         // We do not clear the unchanged solid pass maps, only the contents of each list 
    309         // This is because we assume passes are reused a lot and it saves resorting 
    310         clearSolidPassMap(mSolidPasses); 
    311         clearSolidPassMap(mSolidPassesDecal); 
    312         clearSolidPassMap(mSolidPassesDiffuseSpecular); 
    313         clearSolidPassMap(mSolidPassesNoShadow); 
    314     } 
    315         //----------------------------------------------------------------------- 
    316280    void RenderPriorityGroup::clear(const int leavePassesInQueue) 
    317281    { 
    318                 SolidRenderablePassMap::iterator i, iend; 
    319         
    320                 // -- standard method if no passes are left in queue 
     282                //-- standard method if no passes are left in queue 
    321283                if (leavePassesInQueue == 0) 
    322284                { 
     
    328290        // This is because we assume passes are reused a lot and it saves resorting 
    329291                if (!(leavePassesInQueue & SOLID_PASSES)) 
    330                         clearSolidPassMap(mSolidPasses); 
     292                        destroySolidPassMap(mSolidPasses); 
    331293                if (!(leavePassesInQueue & SOLID_PASSES_DECAL)) 
    332                         clearSolidPassMap(mSolidPassesDecal); 
     294                        destroySolidPassMap(mSolidPassesDecal); 
    333295                if (!(leavePassesInQueue & SOLID_PASSES_DIFFUSE_SPECULAR)) 
    334                         clearSolidPassMap(mSolidPassesDiffuseSpecular); 
     296                        destroySolidPassMap(mSolidPassesDiffuseSpecular); 
    335297                if (!(leavePassesInQueue & SOLID_PASSES_NOSHADOW)) 
    336                         clearSolidPassMap(mSolidPassesNoShadow); 
     298                        destroySolidPassMap(mSolidPassesNoShadow); 
    337299 
    338300        if (!(leavePassesInQueue & TRANSPARENT_PASSES)) 
    339301                        mTransparentPasses.clear(); 
    340302    } 
     303        //----------------------------------------------------------------------- 
     304    void RenderPriorityGroup::destroyPassMaps(const int leavePassesInQueue) 
     305    { 
     306                /*     
     307        const Pass::PassSet& graveyardList = Pass::getPassGraveyard(); 
     308        Pass::PassSet::const_iterator gi, giend; 
     309        giend = graveyardList.end(); 
     310        for (gi = graveyardList.begin(); gi != giend; ++gi) 
     311        { 
     312            removeSolidPassEntry(*gi); 
     313        } 
     314 
     315        const Pass::PassSet& dirtyList = Pass::getDirtyHashList(); 
     316        Pass::PassSet::const_iterator di, diend; 
     317        diend = dirtyList.end(); 
     318        for (di = dirtyList.begin(); di != diend; ++di) 
     319        { 
     320            removeSolidPassEntry(*di); 
     321                } 
     322                */ 
     323 
     324        // We do not clear the unchanged solid pass maps, only the contents of each list 
     325        // This is because we assume passes are reused a lot and it saves resorting 
     326                if (!(leavePassesInQueue & SOLID_PASSES)) 
     327                        destroySolidPassMap(mSolidPasses); 
     328                if (!(leavePassesInQueue & SOLID_PASSES_DECAL)) 
     329                        destroySolidPassMap(mSolidPassesDecal); 
     330                if (!(leavePassesInQueue & SOLID_PASSES_DIFFUSE_SPECULAR)) 
     331                        destroySolidPassMap(mSolidPassesDiffuseSpecular); 
     332                if (!(leavePassesInQueue & SOLID_PASSES_NOSHADOW)) 
     333                        destroySolidPassMap(mSolidPassesNoShadow); 
     334    } 
    341335#endif // GTP_VISIBILITY_MODIFIED_OGRE           
    342336//----------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.