Changeset 2532 for GTP/trunk/Lib/Vis/OnlineCullingCHC/src
- Timestamp:
- 07/06/07 03:19:45 (17 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/GtpVisibility.vcproj
r2455 r2532 72 72 OptimizeForWindowsApplication="TRUE" 73 73 AdditionalIncludeDirectories="..\include;"$(OGRE_PATH)\OgreMain\include"" 74 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE "74 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE1" 75 75 StringPooling="TRUE" 76 76 RuntimeLibrary="2" -
GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp
r2502 r2532 104 104 if (mHierarchyInterface->IsNodeFullyVisible(node)) 105 105 { 106 int nodesTested = 0; 107 106 108 // use different algorithm for finding random candidates 109 #if 1 107 110 HierarchyNodeContainer mynodes; 108 111 mHierarchyInterface->CollectLeaves(node, mynodes); … … 112 115 HierarchyNodeContainer::const_iterator nit, nit_end = mynodes.end(); 113 116 114 int nodesTested = 0;115 117 for (nit = mynodes.begin(); nit != nit_end; ++ nit) 116 118 { … … 120 122 continue; 121 123 124 bool intersects = false; 125 const bool frustumCulled = !mHierarchyInterface->CheckFrustumVisible(leaf, intersects); 126 127 // don't test in these cases ... 128 if (frustumCulled || intersects) 129 continue; 130 122 131 ++ nodesTested; 123 132 124 133 mHierarchyInterface->SetNodeVisible(leaf, false); 125 134 … … 130 139 mHierarchyInterface->IssueNodeOcclusionQuery(node, mTestGeometryForVisibleLeaves); 131 140 } 132 141 133 142 //std::stringstream d; d << "rc: " << mRandomCandidates << " tested: " << nodesTested << " of " << (int)mynodes.size(); 134 143 //CullingLogManager::GetSingleton()->LogMessage(d.str()); 135 144 145 #else 146 147 HierarchyNode *leaf = mHierarchyInterface->GetRandomLeaf(node); 148 149 bool intersects = false; 150 const bool frustumCulled = !mHierarchyInterface->CheckFrustumVisible(leaf, intersects); 151 152 if (frustumCulled || intersects) // don't test in these cases ... 153 continue; 154 155 ++ nodesTested; 156 157 mHierarchyInterface->SetNodeVisible(leaf, false); 158 159 // update node's visited flag: this is important as we are not testing 160 // all nodes in the hierarchy in this mode 161 mHierarchyInterface->PullUpLastVisited(leaf, mHierarchyInterface->GetFrameId()); 162 // issue the query 163 mHierarchyInterface->IssueNodeOcclusionQuery(leaf, mTestGeometryForVisibleLeaves); 164 165 #endif 166 136 167 mHierarchyInterface->RenderNodeRecursive(node); 168 169 // bail out here, recursion has finished 137 170 continue; 138 171 } … … 171 204 const bool testGeometry = wasVisible && mHierarchyInterface->IsLeaf(node) && mTestGeometryForVisibleLeaves; 172 205 173 // previously invisible node174 #if TODO175 if (!mHierarchyInterface->IsNodeVisible(node))176 {177 // batch queries so we can test invisible nodes178 }179 #endif180 206 queryQueue.push(QueryPair(node, mHierarchyInterface-> 181 207 IssueNodeOcclusionQuery(node, testGeometry)));
Note: See TracChangeset
for help on using the changeset viewer.