Changeset 2184 for GTP/trunk/Lib
- Timestamp:
- 03/02/07 17:39:47 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h
r2183 r2184 298 298 299 299 ObjReader *mObjReader; 300 301 Camera *mDummyCamera; 300 302 }; 301 303 -
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); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgrePlatformHierarchyInterface.cpp
r1621 r2184 95 95 static RenderOperation ro; 96 96 97 //LogManager::getSingleton().logMessage("here66"); 97 98 SolidBoundingBox *solidBox = GetSolidBoundingBox(); 98 99 … … 106 107 107 108 solidBox->SetupBoundingBoxVertices(*box); 108 109 109 110 solidBox->getRenderOperation(ro); 110 111 ro.srcRenderable = solidBox; 112 //std::stringstream d; 113 //d << "vt2: " << ro.vertexData; 114 //LogManager::getSingleton().logMessage(d.str()); 115 111 116 mRenderSystem->_render(ro); 112 117 } … … 175 180 //----------------------------------------------------------------------- 176 181 GtpVisibility::OcclusionQuery *PlatformHierarchyInterface::IssueNodeOcclusionQuery( 177 GtpVisibility::HierarchyNode *node, const bool wasVisible) 178 { 182 GtpVisibility::HierarchyNode *node, 183 const bool wasVisible) 184 {//LogManager::getSingleton().logMessage("here6960"); 179 185 // get next available test id 180 186 GtpVisibility::OcclusionQuery *query = GetNextOcclusionQuery(); … … 261 267 { 262 268 if (!mSolidBoundingBox) 269 { 263 270 mSolidBoundingBox = new SolidBoundingBox; 271 //LogManager::getSingleton().logMessage("solid box created"); 272 } 264 273 265 274 return mSolidBoundingBox; -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgrePlatformQueryManager.cpp
r2171 r2184 12 12 //----------------------------------------------------------------------- 13 13 PlatformQueryManager::PlatformQueryManager(GtpVisibility::HierarchyInterface *hierarchyInterface, 14 Viewport *vp, int queryModes): 14 Viewport *vp, 15 int queryModes): 15 16 QueryManager(hierarchyInterface, queryModes), 16 17 mViewport(vp), -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSolidBoundingBox.cpp
r925 r2184 76 76 SetOcclusionQueryMaterial(); 77 77 //setMaterial("BaseWhiteNoLighting"); 78 79 /* std::stringstream d; 80 d << "vtx: " << mRenderOp.vertexData; 81 LogManager::getSingleton().logMessage(d.str()); 82 */ 83 78 84 } 79 85 //----------------------------------------------------------------------- -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj
r2183 r2184 52 52 <Tool 53 53 Name="VCPostBuildEventTool" 54 CommandLine="copy $(OutDir)\$(TargetFileName) $(OGRE_PATH)\Samples\Common\bin\$(ConfigurationName)"/> 54 CommandLine="copy $(OutDir)\$(TargetFileName) $(OGRE_PATH)\Samples\Common\bin\$(ConfigurationName) 55 copy $(OutDir)\$(TargetFileName) D:\svn\gametools\GTP\trunk\App\Demos\Illum\Ogre\bin\$(ConfigurationName)"/> 55 56 <Tool 56 57 Name="VCPreBuildEventTool"/> -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp
r2171 r2184 115 115 // update node's visited flag 116 116 mHierarchyInterface->SetLastVisited(node, mHierarchyInterface->GetFrameId()); 117 117 //Ogre::LogManager::getSingleton().logMessage("here999"); 118 118 // skip testing previously visible nodes without geometry 119 119 if (issueQuery)
Note: See TracChangeset
for help on using the changeset viewer.