History

some debug changes for testing occlusion culling

ZappoMan committed 13 years ago

Commit 627f61b1 parent 2e58a772 files · +24 −6Browse files

Showing the changes to interface/src/VoxelSystem.cpp (1 of 2 files). Show all

Unified · Split

interface/src/VoxelSystem.cpp+10−2
@@ -1189,21 +1189,29 @@ void VoxelSystem::falseColorizeTestOccluded() { · 1188 unmodified lines
11891189 }
11901190
11911191 bool VoxelSystem::falseColorizeOccludedOperation(VoxelNode* node, void* extraData) {
1192+//node->printDebugDetails(">>>>>>>>>>>>>>> falseColorizeOccludedOperation() BEGIN >>>>>>>>>>>>>>");
11921193 FalseColorizeOccludedArgs* args = (FalseColorizeOccludedArgs*) extraData;
1193− if (node->isColored() && node->isLeaf()) {
1194+ if (node->isColored() && node->isLeaf() && !node->isStagedForDeletion() && node->getShouldRender()) {
1195+//printLog("***** falseColorizeOccludedOperation() NODE is colored, etc, so consider it *****\n");
11941196 AABox voxelBox = node->getAABox();
11951197 voxelBox.scale(TREE_SCALE);
11961198 VoxelProjectedShadow* voxelShadow = new VoxelProjectedShadow(args->viewFrustum->getProjectedShadow(voxelBox));
11971199 CoverageMap::StorageResult result = args->map->storeInMap(voxelShadow);
11981200 if (result == CoverageMap::OCCLUDED) {
1201+//printLog("***** falseColorizeOccludedOperation() NODE is OCCLUDED *****\n");
11991202 node->setFalseColor(255, 0, 0);
1203+ } else if (result == CoverageMap::STORED) {
1204+//printLog("***** falseColorizeOccludedOperation() NODE is STORED *****\n");
1205+ } else if (result == CoverageMap::DOESNT_FIT) {
1206+//printLog("***** falseColorizeOccludedOperation() NODE DOESNT_FIT???? *****\n");
12001207 }
12011208 }
1209+//printLog("<<<<<<<<<<<<<<<<< falseColorizeOccludedOperation() END <<<<<<<<<<<<<<<<<\n");
12021210 return true; // keep going!
12031211 }
12041212
12051213 void VoxelSystem::falseColorizeOccluded() {
1206− CoverageMap map(BoundingBox(glm::vec2(-1.f,-1.f), glm::vec2(2.f,2.f)), true);
1214+ CoverageMap map(BoundingBox(glm::vec2(-2.f,-2.f), glm::vec2(4.f,4.f)), true);
12071215 FalseColorizeOccludedArgs args;
12081216 args.viewFrustum = Application::getInstance()->getViewFrustum();
12091217 args.map = &map;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t