- Timestamp:
- 06/14/07 17:24:08 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
r2402 r2455 311 311 } 312 312 313 ///////////// 313 314 val = config.getSetting("OnlineCullingAlgorithm"); 314 315 … … 357 358 358 359 ///////////// 359 // terrain options 360 val = config.getSetting("TestGeometryForVisibleLeaves"); 361 362 if (!val.empty()) 363 { 364 if (val == "yes") 365 mVisibilityManager->SetTestGeometryForVisibleLeaves(true); 366 else 367 mVisibilityManager->SetTestGeometryForVisibleLeaves(false); 368 } 369 370 ///////////// 371 val = config.getSetting("TestGeometryBounds"); 372 373 if (!val.empty()) 374 { 375 if (val == "yes") 376 mHierarchyInterface->SetTestGeometryBounds(true); 377 else 378 mHierarchyInterface->SetTestGeometryBounds(false); 379 } 380 381 ///////////// 382 val = config.getSetting("AssumedVisibleFrames"); 383 384 if (!val.empty()) 385 { 386 mVisibilityManager->SetAssumedVisibilityForChc(atoi(val.c_str())); 387 } 388 389 390 ///////////// 391 val = config.getSetting("RandomUpdateCandidates"); 392 393 if (!val.empty()) 394 { 395 mVisibilityManager->SetRandomUpdateCandidatesForRuc(atoi(val.c_str())); 396 } 397 398 399 ///////////// 400 // output 360 401 361 402 if (mUseDepthPass) … … 395 436 else 396 437 LogManager::getSingleton().logMessage("not flushing queue after some frames"); 438 439 if (mVisibilityManager->GetTestGeometryForVisibleLeaves()) 440 LogManager::getSingleton().logMessage("test geometry for visible leaves"); 441 else 442 LogManager::getSingleton().logMessage("not testing geometry for visible leaves"); 443 444 if (mHierarchyInterface->GetTestGeometryBounds()) 445 LogManager::getSingleton().logMessage("test geometry bounds instead of bounding box"); 446 else 447 LogManager::getSingleton().logMessage("not testing geometry bounds instead of bounding box"); 448 449 450 ///////////// 451 // terrain options 397 452 398 453 if (!mShowTerrain) … … 1263 1318 d << "Depth pass: " << StringConverter::toString(mUseDepthPass) << ", " 1264 1319 << "Delay transparents: " << StringConverter::toString(mDelayRenderTransparents) << ", " 1265 << "Use optimization: " << StringConverter::toString(mHierarchyInterface->GetTestGeometryForVisibleLeaves()) << ", "1320 // << "Use optimization: " << StringConverter::toString(mHierarchyInterface->GetTestGeometryForVisibleLeaves()) << ", " 1266 1321 << "Algorithm type: " << mVisibilityManager->GetCullingManagerType() << ", " 1267 1322 << "Hierarchy nodes: " << mNumOctants << ", " … … 1686 1741 LogManager::getSingleton().logMessage("error: should not come here"); 1687 1742 // question: if no view cell, set everything visible? 1688 //SetObjectsVisible(true);1689 1743 SetObjectsVisible(false); 1690 1744 return; … … 1693 1747 //////////// 1694 1748 //-- set PVS of view cell to visible 1695 1696 //std::stringstream d; d << "appying new view cell pvs: " << vc->GetPvs().GetSize();1697 //LogManager::getSingleton().logMessage(d.str());1698 1749 1699 1750 GtpVisibilityPreprocessor::ObjectPvsIterator pit = vc->GetPvs().GetIterator(); … … 1717 1768 const GtpVisibilityPreprocessor::Vector3 viewPoint = 1718 1769 OgreTypeConverter::ConvertFromOgre(cam->getDerivedPosition()); 1719 1720 //std::stringstream d; d << "vp: " << viewPoint;1721 //LogManager::getSingleton().logMessage(d.str());1722 1770 1723 1771 GtpVisibilityPreprocessor::ViewCell *newElementary = … … 2173 2221 } 2174 2222 2175 // Prepare render queue for receiving new objects2176 //prepareRenderQueue();2177 2178 2223 mDestRenderSystem->_beginGeometryCount(); 2179 2224 // Begin the frame … … 2281 2326 /////////////////////// 2282 2327 //-- put items in render queue 2283 //////////2284 2328 2285 2329 getRenderQueue()->clear(); 2286 2330 2287 //////////////////////2288 //-- apply queries on geometry level2289 2290 2331 if (!nodeVisibility) 2291 2332 { 2333 ////////////////// 2334 //-- apply queries on geometry level 2335 2292 2336 MeshInfoContainer::iterator geomIt, geomIt_end = visibleGeometry.end(); 2293 2337 … … 2384 2428 if (camera->isWindowSet()) 2385 2429 { 2386 const std::vector<Plane>& planeList = 2387 camera->getWindowPlanes(); 2388 for (ushort i = 0; i < 4; ++ i)2430 const std::vector<Plane>& planeList = camera->getWindowPlanes(); 2431 2432 for (ushort i = 0; i < 4; ++ i) 2389 2433 { 2390 2434 mDestRenderSystem->enableClipPlane(i, true); … … 2421 2465 2422 2466 RenderHierarchicalCulling(fillQueue); 2423 // _renderVisibleObjects();2424 2467 2425 2468 // End frame … … 2529 2572 2530 2573 if (mQueryMode == 2) 2531 {2532 2574 approximateVisibility = true; 2533 }2534 2575 } 2535 2576 else … … 2542 2583 new OcclusionQueriesQueryManager(mHierarchyInterface, 2543 2584 cam->getViewport(), 2544 //mCurrentViewport,2545 2585 queryModes, 2546 2586 itemBufferMode);
Note: See TracChangeset
for help on using the changeset viewer.