Changeset 2145 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE
- Timestamp:
- 02/20/07 15:37:34 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h
r2123 r2145 273 273 274 274 bool mShowTerrain; 275 276 int mFlushRate; 277 int mCurrentFrame; 275 278 276 279 ObjReader *mObjReader; -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
r2130 r2145 62 62 mShowTerrain(false), 63 63 mViewCellsFilename(""), 64 mFilename("terrain") 64 mFilename("terrain"), 65 mFlushRate(10), 66 mCurrentFrame(0) 65 67 { 66 68 Ogre::LogManager::getSingleton(). … … 192 194 String val; 193 195 196 LogManager::getSingleton().logMessage("****** OcclusionCullingSceneManager Options ********"); 194 197 config.load(stream); 195 198 … … 203 206 } 204 207 208 if (mUseDepthPass) 209 LogManager::getSingleton().logMessage("using depth"); 210 else 211 LogManager::getSingleton().logMessage("not using depth"); 212 205 213 val = config.getSetting("FlushQueue"); 206 214 … … 210 218 } 211 219 220 if (mDeleteQueueAfterRendering) 221 LogManager::getSingleton().logMessage("flushing queue"); 222 else 223 LogManager::getSingleton().logMessage("not flushing queue"); 224 212 225 val = config.getSetting("Scene"); 213 226 … … 382 395 // set the page source 383 396 selectPageSource(pageSourceName, optlist); 397 398 LogManager::getSingleton().logMessage("****** Finished OcclusionCullingSceneManager Options ********"); 384 399 } 385 400 … … 675 690 676 691 // for the shadow pass we use only standard rendering 677 // because shadows have low occlusion snyway692 // because shadows have low occlusion anyway 678 693 if (mShadowTechnique == SHADOWTYPE_TEXTURE_MODULATIVE && 679 694 mIlluminationStage == IRS_RENDER_TO_TEXTURE) … … 704 719 void OcclusionCullingSceneManager::_renderVisibleObjects() 705 720 { 706 // $$matt temp: Remove this!! 707 if (0) 708 { 709 getDestinationRenderSystem()->_setCullingMode(CULL_NONE); 710 //LogManager::getSingleton().logMessage("warning: culling mode"); 711 } 721 const bool flushQueue = mDeleteQueueAfterRendering && ((mCurrentFrame % mFlushRate) == 0); 722 ++ mCurrentFrame; 712 723 713 724 if (mNormalExecution) … … 715 726 // the standard octree rendering mode 716 727 TerrainSceneManager::_renderVisibleObjects(); 717 getRenderQueue()->clear( mDeleteQueueAfterRendering);728 getRenderQueue()->clear(flushQueue); 718 729 return; 719 730 } … … 847 858 848 859 // almost same effect as below 849 getRenderQueue()->clear( mDeleteQueueAfterRendering);860 getRenderQueue()->clear(flushQueue); 850 861 851 862 if (0) WriteLog(); // write out stats … … 935 946 return true; 936 947 } 937 else if (key == " DeleteRenderQueue")948 else if (key == "FlushQueue") 938 949 { 939 950 mDeleteQueueAfterRendering = (*static_cast<const bool *>(val)); … … 1052 1063 return true; 1053 1064 } 1065 if (key == "FlushQueue") 1066 { 1067 * static_cast<bool *>(val) = (bool *)mDeleteQueueAfterRendering; 1068 return true; 1069 } 1054 1070 if (key == "NormalExecution") 1055 1071 { … … 1062 1078 mVisibilityManager->GetCullingManagerType(); 1063 1079 1064 * static_cast<unsigned int *>(val) = 1065 (unsigned int)algorithm; 1080 * static_cast<unsigned int *>(val) = (unsigned int)algorithm; 1081 1082 getRenderQueue()->clear(true); 1083 1066 1084 return true; 1067 1085 }
Note: See TracChangeset
for help on using the changeset viewer.