- Timestamp:
- 03/02/07 17:39:47 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
r2183 r2184 59 59 mElementaryViewCell(NULL), 60 60 mDeleteQueueAfterRendering(true), 61 mNormalExecution( false),61 mNormalExecution(true), 62 62 mShowViewCells(false), 63 63 mViewCellsGeometryLoaded(false), … … 730 730 void OcclusionCullingSceneManager::_renderVisibleObjects() 731 731 { 732 if (mNormalExecution) 733 { 734 // the standard octree rendering mode 735 TerrainSceneManager::_renderVisibleObjects(); 736 //getRenderQueue()->clear(flushQueue); 737 return; 738 } 739 732 740 const bool flushQueue = 733 741 mDeleteQueueAfterRendering && ((mCurrentFrame % mFlushRate) == 0); 734 742 ++ mCurrentFrame; 735 743 736 if (mNormalExecution)737 {738 // the standard octree rendering mode739 TerrainSceneManager::_renderVisibleObjects();740 getRenderQueue()->clear(flushQueue);741 return;742 }743 744 744 // create material for item buffer pass 745 745 InitItemBufferPass(); … … 752 752 //-- (e.g., the visualization mode, the shadow pass) 753 753 754 if (mUseDepthPass || mShowVisualization || 754 if (//!mFindVisibleObjects || 755 mUseDepthPass || mShowVisualization || 755 756 (mShadowTechnique == SHADOWTYPE_TEXTURE_MODULATIVE && 756 757 mIlluminationStage == IRS_RENDER_TO_TEXTURE)) … … 767 768 TerrainSceneManager::_renderVisibleObjects(); 768 769 770 //LogManager::getSingleton().logMessage("x"); 769 771 mIlluminationStage = savedStage; 770 772 } 771 773 else //-- the hierarchical culling algorithm 772 { 774 {//LogManager::getSingleton().logMessage("y"); 773 775 // note matt: this is also called in TerrainSceneManager: really necessary? 774 776 mDestRenderSystem->setLightingEnabled(false); … … 812 814 // set all necessary parameters for 813 815 // hierarchical visibility culling and rendering 814 InitVisibilityCulling(m CameraInProgress);816 InitVisibilityCulling(mDummyCamera); 815 817 816 818 … … 857 859 // almost same effect as below 858 860 getRenderQueue()->clear(flushQueue); 859 861 860 862 if (0) WriteLog(); // write out stats 861 863 } … … 864 866 void OcclusionCullingSceneManager::_updateSceneGraph(Camera* cam) 865 867 { 866 if (mNormalExecution) 867 { 868 TerrainSceneManager::_updateSceneGraph(cam); 869 return; 870 } 871 872 mVisibilityManager->GetCullingManager()->SetHierarchyInterface(mHierarchyInterface); 873 mHierarchyInterface->SetRenderSystem(mDestRenderSystem); 868 if (!mNormalExecution) 869 { 870 mVisibilityManager->GetCullingManager()->SetHierarchyInterface(mHierarchyInterface); 871 mHierarchyInterface->SetRenderSystem(mDestRenderSystem); 872 } 874 873 875 874 TerrainSceneManager::_updateSceneGraph(cam); … … 1076 1075 1077 1076 * static_cast<unsigned int *>(val) = (unsigned int)algorithm; 1078 1079 //getRenderQueue()->clear();1080 1077 1081 1078 return true; … … 1913 1910 bool includeOverlays) 1914 1911 { 1912 if (0 && mNormalExecution) 1913 { 1914 TerrainSceneManager::_renderScene(camera, vp, includeOverlays); 1915 return; 1916 } 1917 1915 1918 Root::getSingleton()._setCurrentSceneManager(this); 1916 1919 mActiveQueuedRenderableVisitor->targetSceneMgr = this; … … 2057 2060 { 2058 2061 // Parse the scene and tag visibles 2059 myFindVisibleObjects(camera,2062 _findVisibleObjects(camera, 2060 2063 mIlluminationStage == IRS_RENDER_TO_TEXTURE? true : false); 2061 2064 } … … 2071 2074 } 2072 2075 2073 2076 mDummyCamera = camera; 2074 2077 // Render scene content 2075 2078 _renderVisibleObjects(); … … 2273 2276 // // Render scene content in order fill depth buffer 2274 2277 bool savedUseDepthPass = mUseDepthPass; 2275 mUseDepthPass = true;2278 if (1) mUseDepthPass = true; 2276 2279 2277 2280 // don't need shading, render only depth pass … … 2359 2362 bool onlyShadowCasters) 2360 2363 { 2364 if (1 || mNormalExecution) 2365 { 2366 TerrainSceneManager::_findVisibleObjects(cam, onlyShadowCasters); 2367 return; 2368 } 2369 2361 2370 // lists only used for visualization 2362 2371 mVisible.clear(); … … 2378 2387 OcclusionQueriesQueryManager *queryManager = 2379 2388 new OcclusionQueriesQueryManager(mHierarchyInterface, 2380 2389 cam->getViewport(),//mCurrentViewport, 2381 2390 queryModes, 2382 2391 itemBufferMode);
Note: See TracChangeset
for help on using the changeset viewer.