- Timestamp:
- 10/20/05 18:49:11 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/ogre_changes/OgreMain/src/OgreRenderQueueSortingGrouping.cpp
r139 r343 278 278 #ifdef GTP_VISIBILITY_MODIFIED_OGRE 279 279 //----------------------------------------------------------------------- 280 void RenderPriorityGroup::clearSolids(void)281 {282 /*SolidRenderablePassMap::iterator i, iend;283 // Delete queue groups which are using passes which are to be284 // deleted, we won't need these any more and they clutter up285 // the list and can cause problems with future clones286 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 recalculated295 // by the parent queue after all groups have been processed296 // If we don't do this, the std::map will become inconsistent for new insterts297 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, because305 // it needs to be acted on for all groups, the parent queue takes306 // care of this afterwards307 308 // We do not clear the unchanged solid pass maps, only the contents of each list309 // This is because we assume passes are reused a lot and it saves resorting310 clearSolidPassMap(mSolidPasses);311 clearSolidPassMap(mSolidPassesDecal);312 clearSolidPassMap(mSolidPassesDiffuseSpecular);313 clearSolidPassMap(mSolidPassesNoShadow);314 }315 //-----------------------------------------------------------------------316 280 void RenderPriorityGroup::clear(const int leavePassesInQueue) 317 281 { 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 321 283 if (leavePassesInQueue == 0) 322 284 { … … 328 290 // This is because we assume passes are reused a lot and it saves resorting 329 291 if (!(leavePassesInQueue & SOLID_PASSES)) 330 clearSolidPassMap(mSolidPasses);292 destroySolidPassMap(mSolidPasses); 331 293 if (!(leavePassesInQueue & SOLID_PASSES_DECAL)) 332 clearSolidPassMap(mSolidPassesDecal);294 destroySolidPassMap(mSolidPassesDecal); 333 295 if (!(leavePassesInQueue & SOLID_PASSES_DIFFUSE_SPECULAR)) 334 clearSolidPassMap(mSolidPassesDiffuseSpecular);296 destroySolidPassMap(mSolidPassesDiffuseSpecular); 335 297 if (!(leavePassesInQueue & SOLID_PASSES_NOSHADOW)) 336 clearSolidPassMap(mSolidPassesNoShadow);298 destroySolidPassMap(mSolidPassesNoShadow); 337 299 338 300 if (!(leavePassesInQueue & TRANSPARENT_PASSES)) 339 301 mTransparentPasses.clear(); 340 302 } 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 } 341 335 #endif // GTP_VISIBILITY_MODIFIED_OGRE 342 336 //-----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.