- Timestamp:
- 07/06/07 03:19:45 (17 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/IVReader/src/IVReader.vcproj
r2353 r2532 81 81 OptimizeForWindowsApplication="TRUE" 82 82 AdditionalIncludeDirectories=""$(OGRE_PATH)\Dependencies\include\CEGUI";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";"$(OGRE_PATH)\OgreMain\include";"$(OGRE_PATH)\Dependencies\include";"$(OGRE_PATH)\Samples\Common\include";..\include" 83 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IVREADER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE "83 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IVREADER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE1" 84 84 RuntimeLibrary="2" 85 85 UsePrecompiledHeader="0" -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionQueriesQueryManager.cpp
r2513 r2532 217 217 GtpVisibility::QueryList::iterator projQueryIt = queryList[1].begin(); 218 218 219 if (1) 220 { 221 // collect occlusion queries for hierarchy nodes 222 CollectNodeVisibility(visQueryIt, 219 // collect occlusion queries for hierarchy nodes 220 CollectNodeVisibility(visQueryIt, 223 221 projQueryIt, 224 222 &nodeList, 225 223 visibleNodes, 226 224 relativeVisibility); 227 } 228 229 if (1) 230 { 231 CollectGeometryVisibility(visQueryIt, 225 226 CollectGeometryVisibility(visQueryIt, 232 227 projQueryIt, 233 228 &geometryList, 234 229 visibleGeometry, 235 230 relativeVisibility); 236 } 237 238 if (1) 239 { 240 // collect occlusion queries for patches 241 CollectPatchVisibility(visQueryIt, 231 232 // collect occlusion queries for patches 233 CollectPatchVisibility(visQueryIt, 242 234 projQueryIt, 243 235 &patchList, 244 236 visiblePatches, 245 237 relativeVisibility); 246 }247 238 248 239 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSolidBoundingBox.cpp
r2455 r2532 129 129 130 130 Pass *queryPass = m_pMaterial->getTechnique(0)->getPass(0); 131 131 132 queryPass->setColourWriteEnabled(false); 132 133 queryPass->setDepthWriteEnabled(false); … … 137 138 } 138 139 139 // Override this method to prevent parent transforms (rotation, translation,scale)140 // Override this method to prevent parent transforms (rotation, translation, scale) 140 141 void SolidBoundingBox::getWorldTransforms(Matrix4* xform) const 141 142 { -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSolidHalfBoundingBox.cpp
r1146 r2532 101 101 } 102 102 103 103 104 } // namespace Ogre 104 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj
r2513 r2532 92 92 OptimizeForWindowsApplication="TRUE" 93 93 AdditionalIncludeDirectories=""$(OGRE_PATH)\PlugIns\OctreeSceneManager\include";"$(OGRE_PATH)\Samples\Common\include";"$(OGRE_PATH)\Dependencies\include\CEGUI";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";"$(OGRE_PATH)\OgreMain\include";"$(OGRE_PATH)\Dependencies\include";..\include;..\..\..\OnlineCullingCHC\include;..\..\..\Preprocessing\src;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\ObjReader\include" 94 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_KD_TERRAIN_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE "94 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_KD_TERRAIN_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE1" 95 95 StringPooling="TRUE" 96 96 RuntimeLibrary="2" -
GTP/trunk/Lib/Vis/OnlineCullingCHC/ObjReader/src/ObjReader.vcproj
r2353 r2532 81 81 OptimizeForWindowsApplication="TRUE" 82 82 AdditionalIncludeDirectories=""$(OGRE_PATH)\OgreMain\include";"$(OGRE_PATH)\Dependencies\include";"$(OGRE_PATH)\Samples\Common\include";..\include;..\..\..\Preprocessing\src" 83 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;OBJREADER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE "83 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;OBJREADER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE1" 84 84 RuntimeLibrary="2" 85 85 UsePrecompiledHeader="0" -
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.