- Timestamp:
- 06/15/05 08:57:24 (20 years ago)
- Location:
- trunk/VUT
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/Ogre/src/OgrePlatformQueryManager.cpp
r133 r134 42 42 43 43 /* 44 Test again to get exact visibility with regard to the current camera. 45 Issue all queries first to avoid starvation & stalls. 44 Two query lists: 45 We test two to get exact visibility with regard to the current camera and 46 issue all queries at once to avoid starvation & stalls. 46 47 */ 47 48 GtpVisibility::QueryList queryList[2]; … … 67 68 queryList[i].push_back(mHierarchyInterface->IssueOcclusionQuery(*nodeIt, false)); 68 69 69 // store geometry of nodes in geometry list 70 mHierarchyInterface->GetGeometry(*nodeIt, &geometryList, false); 70 // store geometry of the hierarchy node in a geometry list (only once!) 71 if (i == n - 2) 72 { 73 mHierarchyInterface->GetGeometry(*nodeIt, &geometryList, false); 74 } 71 75 } 72 76 … … 93 97 94 98 // to obtain the correct number of projected pixels, depth write must be disabled 95 bool enableDepth Check= (i != n - 2);99 bool enableDepthWrite = (i != n - 2); 96 100 97 101 // this option must be provided by the scene manager 98 pfHierarchyInterface->GetSceneManager()->setOption("Depth Check", &enableDepthCheck);102 pfHierarchyInterface->GetSceneManager()->setOption("DepthWrite", &enableDepthWrite); 99 103 } 100 104 … … 103 107 unsigned int visiblePixels; 104 108 105 GtpVisibility::QueryList::iterator absQueryIt, relQueryIt;109 GtpVisibility::QueryList::iterator visQueryIt, projQueryIt; 106 110 107 absQueryIt = queryList[0].begin();108 relQueryIt = queryList[1].begin();111 visQueryIt = queryList[0].begin(); 112 projQueryIt = queryList[1].begin(); 109 113 110 114 for (nodeIt = nodeList->begin(); nodeIt != nodeIt_end; ++nodeIt) 111 115 { 112 (* absQueryIt)->GetQueryResult(visiblePixels, true);116 (*visQueryIt)->GetQueryResult(visiblePixels, true); 113 117 114 118 float vis = (float)visiblePixels; … … 116 120 if (relativeVisibility) 117 121 { 118 (* relQueryIt)->GetQueryResult(visiblePixels, true);122 (*projQueryIt)->GetQueryResult(visiblePixels, true); 119 123 std::stringstream d; d << "relativ " << visiblePixels; 120 124 LogManager::getSingleton().logMessage(d.str()); … … 124 128 vis /= (float) visiblePixels; 125 129 } 126 ++ relQueryIt;130 ++projQueryIt; 127 131 } 128 132 129 ++ absQueryIt;133 ++visQueryIt; 130 134 131 135 // leave nodes with visibilty 0 in queue: -
trunk/VUT/Ogre/src/OgreVisibilityTerrainSceneManager.cpp
r133 r134 389 389 return true; 390 390 } 391 if (key == "Depth Check")391 if (key == "DepthWrite") 392 392 { 393 393 mEnableDepthWrite = (*static_cast<const bool *>(val));
Note: See TracChangeset
for help on using the changeset viewer.