Changeset 1251 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src
- Timestamp:
- 08/21/06 18:39:49 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneManager.cpp
r1232 r1251 49 49 mRenderTransparentsForItemBuffer(true), 50 50 mExecuteVertexProgramForAllPasses(false), 51 mIsHierarchicalCulling(false) 51 mIsHierarchicalCulling(false), 52 mDeleteQueueAfterRendering(true) 52 53 { 53 54 // Replace root node with my node … … 731 732 732 733 // delete remaining renderables from queue: 733 // all which are not in mLeavePassesInQueue )734 // all which are not in mLeavePassesInQueue 734 735 #ifdef GTP_VISIBILITY_MODIFIED_OGRE 735 736 _deleteRenderedQueueGroups(mLeavePassesInQueue); … … 744 745 mLeavePassesInQueue = 0; 745 746 746 #if 1747 747 // add visible nodes found by the visibility culling algorithm 748 748 if (mUseDepthPass) 749 749 { 750 //KdRenderableList::const_iterator it, it_end = mVisibleNodes.end();751 752 ////getRenderQueue()->clear();753 //for (it = mVisibleNodes.begin(); it != it_end; ++ it)754 //{755 // (*it)->queueObjects(mCameraInProgress, getRenderQueue(), false);756 //}757 750 KdTree::NodeList::const_iterator it, end = mVisibleNodes.end(); 758 751 for (it = mVisibleNodes.begin(); it != end; it++) … … 762 755 } 763 756 } 764 #endif 757 765 758 //-- now we can render all remaining queue objects 766 759 //-- used for depth pass, transparents, overlay … … 774 767 setAmbientLight(savedAmbient); 775 768 776 getRenderQueue()->clear(); // finally clear render queue 777 if (1) OGRE_DELETE(mRenderQueue); // HACK: should rather only be cleared ... 769 if (!mDeleteQueueAfterRendering) 770 getRenderQueue()->clear(); // finally clear render queue 771 else 772 OGRE_DELETE(mRenderQueue); // HACK: should rather only be cleared ... 778 773 779 774 if (0) WriteLog(); // write out stats -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
r1232 r1251 53 53 mUseVisibilityFilter(false), 54 54 mCurrentViewCell(NULL), 55 mElementaryViewCell(NULL) 55 mElementaryViewCell(NULL), 56 mDeleteQueueAfterRendering(true) 56 57 { 57 58 mHierarchyInterface = new OctreeHierarchyInterface(this, mDestRenderSystem); … … 267 268 268 269 //-- set actual pass here 270 269 271 const Pass *result = SceneManager::_setPass(usedPass); 270 272 … … 360 362 else //-- the hierarchical culling algorithm 361 363 { 362 // this is also called in TerrainSceneManager: really 363 // nexessary? 364 // note matt: this is also called in TerrainSceneManager: really necessary? 364 365 mDestRenderSystem -> setLightingEnabled(false); 365 366 … … 417 418 #endif 418 419 419 //-- reset parameters 420 //-- reset parameters needed for special rendering 421 420 422 mIsDepthPassPhase = false; 421 423 mIsItemBufferPhase = false; … … 425 427 mLeavePassesInQueue = 0; 426 428 427 #if 1428 429 // add visible nodes found by the visibility culling algorithm 429 430 if (mUseDepthPass) … … 437 438 } 438 439 } 439 #endif440 440 //-- now we can render all remaining queue objects 441 441 //-- used for depth pass, transparents, overlay … … 443 443 444 444 TerrainSceneManager::_renderVisibleObjects(); 445 } // hierarchical culling445 } // end hierarchical culling 446 446 447 447 // HACK: set the new render level index, important to avoid cracks … … 452 452 setAmbientLight(savedAmbient); 453 453 454 getRenderQueue()->clear(); // finally clear render queue 455 if (1) OGRE_DELETE(mRenderQueue); // HACK: should rather only be cleared ... 454 if (!mDeleteQueueAfterRendering) 455 getRenderQueue()->clear(); // finally clear render queue 456 else 457 OGRE_DELETE(mRenderQueue); // HACK: should rather only be cleared ... 458 456 459 if (0) WriteLog(); // write out stats 457 460 } … … 519 522 return true; 520 523 } 521 522 524 if (key == "DepthWrite") 523 525 {
Note: See TracChangeset
for help on using the changeset viewer.