History

Merge branch 'master' of git://github.com/worklist/hifi into windows_build

Brad Hefta-Gaub committed 12 years ago

Commit 170dbe62 parents a39c20e 8325753106 files · +1132 −2119Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+44−44
@@ -197,7 +197,7 @@ glBufferIndex VoxelSystem::getNextBufferIndex() { · 196 unmodified lines
197// will be "invisible"197// will be "invisible"
198void VoxelSystem::freeBufferIndex(glBufferIndex index) {198void VoxelSystem::freeBufferIndex(glBufferIndex index) {
199 if (_voxelsInWriteArrays == 0) {199 if (_voxelsInWriteArrays == 0) {
200 qDebug() << "freeBufferIndex() called when _voxelsInWriteArrays == 0!!!!\n";200 qDebug() << "freeBufferIndex() called when _voxelsInWriteArrays == 0!";
201 }201 }
202 202
203 // if the "freed" index was our max index, then just drop the _voxelsInWriteArrays down one...203 // if the "freed" index was our max index, then just drop the _voxelsInWriteArrays down one...
@@ -207,7 +207,7 @@ void VoxelSystem::freeBufferIndex(glBufferIndex index) { · 3 unmodified lines
207 if (Menu::getInstance()->isOptionChecked(MenuOption::AutomaticallyAuditTree)) {207 if (Menu::getInstance()->isOptionChecked(MenuOption::AutomaticallyAuditTree)) {
208 for (unsigned long i = 0; i < _freeIndexes.size(); i++) {208 for (unsigned long i = 0; i < _freeIndexes.size(); i++) {
209 if (_freeIndexes[i] == index) {209 if (_freeIndexes[i] == index) {
210 printf("freeBufferIndex(glBufferIndex index)... index=%ld already in free list!\n", index);210 printf("freeBufferIndex(glBufferIndex index)... index=%ld already in free list!", index);
211 inList = true;211 inList = true;
212 break;212 break;
213 }213 }
@@ -605,7 +605,7 @@ int VoxelSystem::parseData(unsigned char* sourceBuffer, int numBytes) { · 391 unmodified lines
605 if (Application::getInstance()->getLogger()->extraDebugging()) {605 if (Application::getInstance()->getLogger()->extraDebugging()) {
606 qDebug("VoxelSystem::parseData() ... Got Packet Section"606 qDebug("VoxelSystem::parseData() ... Got Packet Section"
607 " color:%s compressed:%s sequence: %u flight:%d usec size:%d data:%d"607 " color:%s compressed:%s sequence: %u flight:%d usec size:%d data:%d"
608 " subsection:%d sectionLength:%d uncompressed:%d\n",608 " subsection:%d sectionLength:%d uncompressed:%d",
609 debug::valueOf(packetIsColored), debug::valueOf(packetIsCompressed),609 debug::valueOf(packetIsColored), debug::valueOf(packetIsCompressed),
610 sequence, flightTime, numBytes, dataBytes, subsection, sectionLength, packetData.getUncompressedSize());610 sequence, flightTime, numBytes, dataBytes, subsection, sectionLength, packetData.getUncompressedSize());
611 }611 }
@@ -694,7 +694,7 @@ void VoxelSystem::setupNewVoxelsForDrawing() { · 82 unmodified lines
694 694
695 bool extraDebugging = Application::getInstance()->getLogger()->extraDebugging();695 bool extraDebugging = Application::getInstance()->getLogger()->extraDebugging();
696 if (extraDebugging) {696 if (extraDebugging) {
697 qDebug("setupNewVoxelsForDrawing()... _voxelsUpdated=%lu...\n",_voxelsUpdated);697 qDebug("setupNewVoxelsForDrawing()... _voxelsUpdated=%lu...",_voxelsUpdated);
698 _viewFrustum->printDebugDetails();698 _viewFrustum->printDebugDetails();
699 }699 }
700}700}
@@ -791,7 +791,7 @@ void VoxelSystem::cleanupRemovedVoxels() { · 90 unmodified lines
791 // This handles cleanup of voxels that were culled as part of our regular out of view culling operation791 // This handles cleanup of voxels that were culled as part of our regular out of view culling operation
792 if (!_removedVoxels.isEmpty()) {792 if (!_removedVoxels.isEmpty()) {
793 if (Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings)) {793 if (Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings)) {
794 qDebug() << "cleanupRemovedVoxels().. _removedVoxels=" << _removedVoxels.count() << "\n";794 qDebug() << "cleanupRemovedVoxels().. _removedVoxels=" << _removedVoxels.count();
795 }795 }
796 while (!_removedVoxels.isEmpty()) {796 while (!_removedVoxels.isEmpty()) {
797 delete _removedVoxels.extract();797 delete _removedVoxels.extract();
@@ -805,7 +805,7 @@ void VoxelSystem::cleanupRemovedVoxels() { · 7 unmodified lines
805 if (!_writeRenderFullVBO && (_abandonedVBOSlots > (_voxelsInWriteArrays * TOO_MANY_ABANDONED_RATIO))) {805 if (!_writeRenderFullVBO && (_abandonedVBOSlots > (_voxelsInWriteArrays * TOO_MANY_ABANDONED_RATIO))) {
806 if (Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings)) {806 if (Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings)) {
807 qDebug() << "cleanupRemovedVoxels().. _abandonedVBOSlots ["807 qDebug() << "cleanupRemovedVoxels().. _abandonedVBOSlots ["
808 << _abandonedVBOSlots << "] > TOO_MANY_ABANDONED_RATIO \n";808 << _abandonedVBOSlots << "] > TOO_MANY_ABANDONED_RATIO";
809 }809 }
810 _writeRenderFullVBO = true;810 _writeRenderFullVBO = true;
811 }811 }
@@ -972,7 +972,7 @@ int VoxelSystem::updateNodeInArrays(VoxelTreeElement* node, bool reuseIndex, boo · 160 unmodified lines
972 // possibly shifting down to lower LOD or something. This debug message is to help identify, if/when/how this972 // possibly shifting down to lower LOD or something. This debug message is to help identify, if/when/how this
973 // state actually occurs.973 // state actually occurs.
974 if (Application::getInstance()->getLogger()->extraDebugging()) {974 if (Application::getInstance()->getLogger()->extraDebugging()) {
975 qDebug("OHHHH NOOOOOO!!!! updateNodeInArrays() BAILING (_voxelsInWriteArrays >= _maxVoxels)\n");975 qDebug("OH NO! updateNodeInArrays() BAILING (_voxelsInWriteArrays >= _maxVoxels)");
976 }976 }
977 return 0;977 return 0;
978 }978 }
@@ -1052,7 +1052,7 @@ ProgramObject VoxelSystem::_shadowMapProgram; · 73 unmodified lines
1052 1052
1053void VoxelSystem::init() {1053void VoxelSystem::init() {
1054 if (_initialized) {1054 if (_initialized) {
1055 qDebug("[ERROR] VoxelSystem is already initialized.\n");1055 qDebug("[ERROR] VoxelSystem is already initialized.");
1056 return;1056 return;
1057 }1057 }
1058 1058
@@ -1426,7 +1426,7 @@ void VoxelSystem::clearAllNodesBufferIndex() { · 367 unmodified lines
1426 _tree->recurseTreeWithOperation(clearAllNodesBufferIndexOperation);1426 _tree->recurseTreeWithOperation(clearAllNodesBufferIndexOperation);
1427 unlockTree();1427 unlockTree();
1428 if (Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings)) {1428 if (Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings)) {
1429 qDebug("clearing buffer index of %d nodes\n", _nodeCount);1429 qDebug("clearing buffer index of %d nodes", _nodeCount);
1430 }1430 }
1431}1431}
1432 1432
@@ -1439,7 +1439,7 @@ bool VoxelSystem::forceRedrawEntireTreeOperation(OctreeElement* element, void* e · 6 unmodified lines
1439void VoxelSystem::forceRedrawEntireTree() {1439void VoxelSystem::forceRedrawEntireTree() {
1440 _nodeCount = 0;1440 _nodeCount = 0;
1441 _tree->recurseTreeWithOperation(forceRedrawEntireTreeOperation);1441 _tree->recurseTreeWithOperation(forceRedrawEntireTreeOperation);
1442 qDebug("forcing redraw of %d nodes\n", _nodeCount);1442 qDebug("forcing redraw of %d nodes", _nodeCount);
1443 _tree->setDirtyBit();1443 _tree->setDirtyBit();
1444 setupNewVoxelsForDrawing();1444 setupNewVoxelsForDrawing();
1445}1445}
@@ -1457,7 +1457,7 @@ bool VoxelSystem::randomColorOperation(OctreeElement* element, void* extraData) · 11 unmodified lines
1457void VoxelSystem::randomizeVoxelColors() {1457void VoxelSystem::randomizeVoxelColors() {
1458 _nodeCount = 0;1458 _nodeCount = 0;
1459 _tree->recurseTreeWithOperation(randomColorOperation);1459 _tree->recurseTreeWithOperation(randomColorOperation);
1460 qDebug("setting randomized true color for %d nodes\n", _nodeCount);1460 qDebug("setting randomized true color for %d nodes", _nodeCount);
1461 _tree->setDirtyBit();1461 _tree->setDirtyBit();
1462 setupNewVoxelsForDrawing();1462 setupNewVoxelsForDrawing();
1463}1463}
@@ -1473,7 +1473,7 @@ bool VoxelSystem::falseColorizeRandomOperation(OctreeElement* element, void* ext · 9 unmodified lines
1473void VoxelSystem::falseColorizeRandom() {1473void VoxelSystem::falseColorizeRandom() {
1474 _nodeCount = 0;1474 _nodeCount = 0;
1475 _tree->recurseTreeWithOperation(falseColorizeRandomOperation);1475 _tree->recurseTreeWithOperation(falseColorizeRandomOperation);
1476 qDebug("setting randomized false color for %d nodes\n", _nodeCount);1476 qDebug("setting randomized false color for %d nodes", _nodeCount);
1477 _tree->setDirtyBit();1477 _tree->setDirtyBit();
1478 setupNewVoxelsForDrawing();1478 setupNewVoxelsForDrawing();
1479}1479}
@@ -1489,7 +1489,7 @@ void VoxelSystem::trueColorize() { · 9 unmodified lines
1489 PerformanceWarning warn(true, "trueColorize()",true);1489 PerformanceWarning warn(true, "trueColorize()",true);
1490 _nodeCount = 0;1490 _nodeCount = 0;
1491 _tree->recurseTreeWithOperation(trueColorizeOperation);1491 _tree->recurseTreeWithOperation(trueColorizeOperation);
1492 qDebug("setting true color for %d nodes\n", _nodeCount);1492 qDebug("setting true color for %d nodes", _nodeCount);
1493 _tree->setDirtyBit();1493 _tree->setDirtyBit();
1494 setupNewVoxelsForDrawing();1494 setupNewVoxelsForDrawing();
1495}1495}
@@ -1511,7 +1511,7 @@ bool VoxelSystem::falseColorizeInViewOperation(OctreeElement* element, void* ext · 15 unmodified lines
1511void VoxelSystem::falseColorizeInView() {1511void VoxelSystem::falseColorizeInView() {
1512 _nodeCount = 0;1512 _nodeCount = 0;
1513 _tree->recurseTreeWithOperation(falseColorizeInViewOperation,(void*)_viewFrustum);1513 _tree->recurseTreeWithOperation(falseColorizeInViewOperation,(void*)_viewFrustum);
1514 qDebug("setting in view false color for %d nodes\n", _nodeCount);1514 qDebug("setting in view false color for %d nodes", _nodeCount);
1515 _tree->setDirtyBit();1515 _tree->setDirtyBit();
1516 setupNewVoxelsForDrawing();1516 setupNewVoxelsForDrawing();
1517}1517}
@@ -1594,13 +1594,13 @@ void VoxelSystem::falseColorizeBySource() { · 76 unmodified lines
1594 };1594 };
1595 1595
1596 // create a bunch of colors we'll use during colorization1596 // create a bunch of colors we'll use during colorization
1597 NodeList* nodeList = NodeList::getInstance();1597
1598 for (NodeList::iterator node = nodeList->begin(); node != nodeList->end(); node++) {1598 foreach (const SharedNodePointer& node, NodeList::getInstance()->getNodeHash()) {
1599 if (node->getType() == NODE_TYPE_VOXEL_SERVER) {1599 if (node->getType() == NODE_TYPE_VOXEL_SERVER) {
1600 uint16_t nodeID = VoxelTreeElement::getSourceNodeUUIDKey(node->getUUID());1600 uint16_t nodeID = VoxelTreeElement::getSourceNodeUUIDKey(node->getUUID());
1601 int groupColor = voxelServerCount % NUMBER_OF_COLOR_GROUPS;1601 int groupColor = voxelServerCount % NUMBER_OF_COLOR_GROUPS;
1602 args.colors[nodeID] = groupColors[groupColor];1602 args.colors[nodeID] = groupColors[groupColor];
1603 1603
1604 if (groupColors[groupColor].red > 0) {1604 if (groupColors[groupColor].red > 0) {
1605 groupColors[groupColor].red = ((groupColors[groupColor].red - MIN_COLOR)/2) + MIN_COLOR;1605 groupColors[groupColor].red = ((groupColors[groupColor].red - MIN_COLOR)/2) + MIN_COLOR;
1606 }1606 }
@@ -1610,13 +1610,13 @@ void VoxelSystem::falseColorizeBySource() { · 3 unmodified lines
1610 if (groupColors[groupColor].blue > 0) {1610 if (groupColors[groupColor].blue > 0) {
1611 groupColors[groupColor].blue = ((groupColors[groupColor].blue - MIN_COLOR)/2) + MIN_COLOR;1611 groupColors[groupColor].blue = ((groupColors[groupColor].blue - MIN_COLOR)/2) + MIN_COLOR;
1612 }1612 }
1613 1613
1614 voxelServerCount++;1614 voxelServerCount++;
1615 }1615 }
1616 }1616 }
1617 1617
1618 _tree->recurseTreeWithOperation(falseColorizeBySourceOperation, &args);1618 _tree->recurseTreeWithOperation(falseColorizeBySourceOperation, &args);
1619 qDebug("setting false color by source for %d nodes\n", _nodeCount);1619 qDebug("setting false color by source for %d nodes", _nodeCount);
1620 _tree->setDirtyBit();1620 _tree->setDirtyBit();
1621 setupNewVoxelsForDrawing();1621 setupNewVoxelsForDrawing();
1622}1622}
@@ -1669,10 +1669,10 @@ void VoxelSystem::falseColorizeDistanceFromView() { · 46 unmodified lines
1669 _maxDistance = 0.0;1669 _maxDistance = 0.0;
1670 _minDistance = FLT_MAX;1670 _minDistance = FLT_MAX;
1671 _tree->recurseTreeWithOperation(getDistanceFromViewRangeOperation, (void*) _viewFrustum);1671 _tree->recurseTreeWithOperation(getDistanceFromViewRangeOperation, (void*) _viewFrustum);
1672 qDebug("determining distance range for %d nodes\n", _nodeCount);1672 qDebug("determining distance range for %d nodes", _nodeCount);
1673 _nodeCount = 0;1673 _nodeCount = 0;
1674 _tree->recurseTreeWithOperation(falseColorizeDistanceFromViewOperation, (void*) _viewFrustum);1674 _tree->recurseTreeWithOperation(falseColorizeDistanceFromViewOperation, (void*) _viewFrustum);
1675 qDebug("setting in distance false color for %d nodes\n", _nodeCount);1675 qDebug("setting in distance false color for %d nodes", _nodeCount);
1676 _tree->setDirtyBit();1676 _tree->setDirtyBit();
1677 setupNewVoxelsForDrawing();1677 setupNewVoxelsForDrawing();
1678}1678}
@@ -1803,7 +1803,7 @@ void VoxelSystem::removeOutOfView() { · 124 unmodified lines
1803 }1803 }
1804 bool showRemoveDebugDetails = false;1804 bool showRemoveDebugDetails = false;
1805 if (showRemoveDebugDetails) {1805 if (showRemoveDebugDetails) {
1806 qDebug("removeOutOfView() scanned=%ld removed=%ld inside=%ld intersect=%ld outside=%ld _removedVoxels.count()=%d \n",1806 qDebug("removeOutOfView() scanned=%ld removed=%ld inside=%ld intersect=%ld outside=%ld _removedVoxels.count()=%d",
1807 args.nodesScanned, args.nodesRemoved, args.nodesInside,1807 args.nodesScanned, args.nodesRemoved, args.nodesInside,
1808 args.nodesIntersect, args.nodesOutside, _removedVoxels.count()1808 args.nodesIntersect, args.nodesOutside, _removedVoxels.count()
1809 );1809 );
@@ -1832,7 +1832,7 @@ void VoxelSystem::showAllLocalVoxels() { · 22 unmodified lines
1832 1832
1833 bool showRemoveDebugDetails = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);1833 bool showRemoveDebugDetails = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
1834 if (showRemoveDebugDetails) {1834 if (showRemoveDebugDetails) {
1835 qDebug("showAllLocalVoxels() scanned=%ld \n",args.nodesScanned );1835 qDebug("showAllLocalVoxels() scanned=%ld",args.nodesScanned );
1836 }1836 }
1837}1837}
1838 1838
@@ -1969,15 +1969,15 @@ void VoxelSystem::hideOutOfView(bool forceFullFrustum) { · 130 unmodified lines
1969 1969
1970 bool extraDebugDetails = false; // Application::getInstance()->getLogger()->extraDebugging();1970 bool extraDebugDetails = false; // Application::getInstance()->getLogger()->extraDebugging();
1971 if (extraDebugDetails) {1971 if (extraDebugDetails) {
1972 qDebug("hideOutOfView() scanned=%ld removed=%ld show=%ld inside=%ld intersect=%ld outside=%ld\n",1972 qDebug("hideOutOfView() scanned=%ld removed=%ld show=%ld inside=%ld intersect=%ld outside=%ld",
1973 args.nodesScanned, args.nodesRemoved, args.nodesShown, args.nodesInside,1973 args.nodesScanned, args.nodesRemoved, args.nodesShown, args.nodesInside,
1974 args.nodesIntersect, args.nodesOutside1974 args.nodesIntersect, args.nodesOutside
1975 );1975 );
1976 qDebug(" inside/inside=%ld intersect/inside=%ld outside/outside=%ld\n",1976 qDebug("inside/inside=%ld intersect/inside=%ld outside/outside=%ld",
1977 args.nodesInsideInside, args.nodesIntersectInside, args.nodesOutsideOutside1977 args.nodesInsideInside, args.nodesIntersectInside, args.nodesOutsideOutside
1978 );1978 );
1979 1979
1980 qDebug() << "args.thisViewFrustum....\n";1980 qDebug() << "args.thisViewFrustum....";
1981 args.thisViewFrustum.printDebugDetails();1981 args.thisViewFrustum.printDebugDetails();
1982 }1982 }
1983 _inhideOutOfView = false;1983 _inhideOutOfView = false;
@@ -2214,7 +2214,7 @@ bool VoxelSystem::falseColorizeRandomEveryOtherOperation(OctreeElement* element, · 230 unmodified lines
2214void VoxelSystem::falseColorizeRandomEveryOther() {2214void VoxelSystem::falseColorizeRandomEveryOther() {
2215 falseColorizeRandomEveryOtherArgs args;2215 falseColorizeRandomEveryOtherArgs args;
2216 _tree->recurseTreeWithOperation(falseColorizeRandomEveryOtherOperation,&args);2216 _tree->recurseTreeWithOperation(falseColorizeRandomEveryOtherOperation,&args);
2217 qDebug("randomized false color for every other node: total %ld, colorable %ld, colored %ld\n",2217 qDebug("randomized false color for every other node: total %ld, colorable %ld, colored %ld",
2218 args.totalNodes, args.colorableNodes, args.coloredNodes);2218 args.totalNodes, args.colorableNodes, args.coloredNodes);
2219 _tree->setDirtyBit();2219 _tree->setDirtyBit();
2220 setupNewVoxelsForDrawing();2220 setupNewVoxelsForDrawing();
@@ -2284,14 +2284,14 @@ bool VoxelSystem::collectStatsForTreesAndVBOsOperation(OctreeElement* element, v · 63 unmodified lines
2284 2284
2285 const bool extraDebugging = false; // enable for extra debugging2285 const bool extraDebugging = false; // enable for extra debugging
2286 if (extraDebugging) {2286 if (extraDebugging) {
2287 qDebug("node In VBO... [%f,%f,%f] %f ... index=%ld, isDirty=%s, shouldRender=%s \n",2287 qDebug("node In VBO... [%f,%f,%f] %f ... index=%ld, isDirty=%s, shouldRender=%s",
2288 voxel->getCorner().x, voxel->getCorner().y, voxel->getCorner().z, voxel->getScale(),2288 voxel->getCorner().x, voxel->getCorner().y, voxel->getCorner().z, voxel->getScale(),
2289 nodeIndex, debug::valueOf(voxel->isDirty()), debug::valueOf(voxel->getShouldRender()));2289 nodeIndex, debug::valueOf(voxel->isDirty()), debug::valueOf(voxel->getShouldRender()));
2290 }2290 }
2291 2291
2292 if (args->hasIndexFound[nodeIndex]) {2292 if (args->hasIndexFound[nodeIndex]) {
2293 args->duplicateVBOIndex++;2293 args->duplicateVBOIndex++;
2294 qDebug("duplicateVBO found... index=%ld, isDirty=%s, shouldRender=%s \n", nodeIndex,2294 qDebug("duplicateVBO found... index=%ld, isDirty=%s, shouldRender=%s", nodeIndex,
2295 debug::valueOf(voxel->isDirty()), debug::valueOf(voxel->getShouldRender()));2295 debug::valueOf(voxel->isDirty()), debug::valueOf(voxel->getShouldRender()));
2296 } else {2296 } else {
2297 args->hasIndexFound[nodeIndex] = true;2297 args->hasIndexFound[nodeIndex] = true;
@@ -2325,17 +2325,17 @@ void VoxelSystem::collectStatsForTreesAndVBOs() { · 27 unmodified lines
2325 collectStatsForTreesAndVBOsArgs args(_maxVoxels);2325 collectStatsForTreesAndVBOsArgs args(_maxVoxels);
2326 args.expectedMax = _voxelsInWriteArrays;2326 args.expectedMax = _voxelsInWriteArrays;
2327 2327
2328 qDebug("CALCULATING Local Voxel Tree Statistics >>>>>>>>>>>>\n");2328 qDebug("CALCULATING Local Voxel Tree Statistics >>>>>>>>>>>>");
2329 2329
2330 _tree->recurseTreeWithOperation(collectStatsForTreesAndVBOsOperation,&args);2330 _tree->recurseTreeWithOperation(collectStatsForTreesAndVBOsOperation,&args);
2331 2331
2332 qDebug("Local Voxel Tree Statistics:\n total nodes %ld \n leaves %ld \n dirty %ld \n colored %ld \n shouldRender %ld \n",2332 qDebug("Local Voxel Tree Statistics:\n total nodes %ld \n leaves %ld \n dirty %ld \n colored %ld \n shouldRender %ld",
2333 args.totalNodes, args.leafNodes, args.dirtyNodes, args.coloredNodes, args.shouldRenderNodes);2333 args.totalNodes, args.leafNodes, args.dirtyNodes, args.coloredNodes, args.shouldRenderNodes);
2334 2334
2335 qDebug(" _voxelsDirty=%s \n _voxelsInWriteArrays=%ld \n minDirty=%ld \n maxDirty=%ld \n", debug::valueOf(_voxelsDirty),2335 qDebug(" _voxelsDirty=%s \n _voxelsInWriteArrays=%ld \n minDirty=%ld \n maxDirty=%ld", debug::valueOf(_voxelsDirty),
2336 _voxelsInWriteArrays, minDirty, maxDirty);2336 _voxelsInWriteArrays, minDirty, maxDirty);
2337 2337
2338 qDebug(" inVBO %ld \n nodesInVBOOverExpectedMax %ld \n duplicateVBOIndex %ld \n nodesInVBONotShouldRender %ld \n",2338 qDebug(" inVBO %ld \n nodesInVBOOverExpectedMax %ld \n duplicateVBOIndex %ld \n nodesInVBONotShouldRender %ld",
2339 args.nodesInVBO, args.nodesInVBOOverExpectedMax, args.duplicateVBOIndex, args.nodesInVBONotShouldRender);2339 args.nodesInVBO, args.nodesInVBOOverExpectedMax, args.duplicateVBOIndex, args.nodesInVBONotShouldRender);
2340 2340
2341 glBufferIndex minInVBO = GLBUFFER_INDEX_UNKNOWN;2341 glBufferIndex minInVBO = GLBUFFER_INDEX_UNKNOWN;
@@ -2348,13 +2348,13 @@ void VoxelSystem::collectStatsForTreesAndVBOs() { · 6 unmodified lines
2348 }2348 }
2349 }2349 }
2350 2350
2351 qDebug(" minInVBO=%ld \n maxInVBO=%ld \n _voxelsInWriteArrays=%ld \n _voxelsInReadArrays=%ld \n",2351 qDebug(" minInVBO=%ld \n maxInVBO=%ld \n _voxelsInWriteArrays=%ld \n _voxelsInReadArrays=%ld",
2352 minInVBO, maxInVBO, _voxelsInWriteArrays, _voxelsInReadArrays);2352 minInVBO, maxInVBO, _voxelsInWriteArrays, _voxelsInReadArrays);
2353 2353
2354 qDebug(" _freeIndexes.size()=%ld \n",2354 qDebug(" _freeIndexes.size()=%ld",
2355 _freeIndexes.size());2355 _freeIndexes.size());
2356 2356
2357 qDebug("DONE WITH Local Voxel Tree Statistics >>>>>>>>>>>>\n");2357 qDebug("DONE WITH Local Voxel Tree Statistics >>>>>>>>>>>>");
2358}2358}
2359 2359
2360 2360
@@ -2534,7 +2534,7 @@ void VoxelSystem::falseColorizeOccluded() { · 173 unmodified lines
2534 2534
2535 _tree->recurseTreeWithOperationDistanceSorted(falseColorizeOccludedOperation, position, (void*)&args);2535 _tree->recurseTreeWithOperationDistanceSorted(falseColorizeOccludedOperation, position, (void*)&args);
2536 2536
2537 qDebug("falseColorizeOccluded()\n position=(%f,%f)\n total=%ld\n colored=%ld\n occluded=%ld\n notOccluded=%ld\n outOfView=%ld\n subtreeVoxelsSkipped=%ld\n nonLeaves=%ld\n nonLeavesOutOfView=%ld\n nonLeavesOccluded=%ld\n pointInside_calls=%ld\n occludes_calls=%ld\n intersects_calls=%ld\n",2537 qDebug("falseColorizeOccluded()\n position=(%f,%f)\n total=%ld\n colored=%ld\n occluded=%ld\n notOccluded=%ld\n outOfView=%ld\n subtreeVoxelsSkipped=%ld\n nonLeaves=%ld\n nonLeavesOutOfView=%ld\n nonLeavesOccluded=%ld\n pointInside_calls=%ld\n occludes_calls=%ld\n intersects_calls=%ld",
2538 position.x, position.y,2538 position.x, position.y,
2539 args.totalVoxels, args.coloredVoxels, args.occludedVoxels,2539 args.totalVoxels, args.coloredVoxels, args.occludedVoxels,
2540 args.notOccludedVoxels, args.outOfView, args.subtreeVoxelsSkipped,2540 args.notOccludedVoxels, args.outOfView, args.subtreeVoxelsSkipped,
@@ -2667,9 +2667,9 @@ void VoxelSystem::falseColorizeOccludedV2() { · 126 unmodified lines
2667 setupNewVoxelsForDrawing();2667 setupNewVoxelsForDrawing();
2668}2668}
2669 2669
2670void VoxelSystem::nodeAdded(Node* node) {2670void VoxelSystem::nodeAdded(SharedNodePointer node) {
2671 if (node->getType() == NODE_TYPE_VOXEL_SERVER) {2671 if (node->getType() == NODE_TYPE_VOXEL_SERVER) {
2672 qDebug("VoxelSystem... voxel server %s added...\n", node->getUUID().toString().toLocal8Bit().constData());2672 qDebug("VoxelSystem... voxel server %s added...", node->getUUID().toString().toLocal8Bit().constData());
2673 _voxelServerCount++;2673 _voxelServerCount++;
2674 }2674 }
2675}2675}
@@ -2688,11 +2688,11 @@ bool VoxelSystem::killSourceVoxelsOperation(OctreeElement* element, void* extraD · 12 unmodified lines
2688 return true;2688 return true;
2689}2689}
2690 2690
2691void VoxelSystem::nodeKilled(Node* node) {2691void VoxelSystem::nodeKilled(SharedNodePointer node) {
2692 if (node->getType() == NODE_TYPE_VOXEL_SERVER) {2692 if (node->getType() == NODE_TYPE_VOXEL_SERVER) {
2693 _voxelServerCount--;2693 _voxelServerCount--;
2694 QUuid nodeUUID = node->getUUID();2694 QUuid nodeUUID = node->getUUID();
2695 qDebug("VoxelSystem... voxel server %s removed...\n", nodeUUID.toString().toLocal8Bit().constData());2695 qDebug("VoxelSystem... voxel server %s removed...", nodeUUID.toString().toLocal8Bit().constData());
2696 }2696 }
2697}2697}
2698 2698
@@ -2761,7 +2761,7 @@ void VoxelSystem::unlockTree() { · 62 unmodified lines
2761 2761
2762 2762
2763void VoxelSystem::localVoxelCacheLoaded() {2763void VoxelSystem::localVoxelCacheLoaded() {
2764 qDebug() << "localVoxelCacheLoaded()\n";2764 qDebug() << "localVoxelCacheLoaded()";
2765 2765
2766 // Make sure that the application has properly set up the view frustum for our loaded state2766 // Make sure that the application has properly set up the view frustum for our loaded state
2767 Application::getInstance()->initAvatarAndViewFrustum();2767 Application::getInstance()->initAvatarAndViewFrustum();
@@ -2774,11 +2774,11 @@ void VoxelSystem::localVoxelCacheLoaded() { · 6 unmodified lines
2774}2774}
2775 2775
2776void VoxelSystem::beginLoadingLocalVoxelCache() {2776void VoxelSystem::beginLoadingLocalVoxelCache() {
2777 qDebug() << "beginLoadingLocalVoxelCache()\n";2777 qDebug() << "beginLoadingLocalVoxelCache()";
2778 _writeRenderFullVBO = true; // this will disable individual node updates2778 _writeRenderFullVBO = true; // this will disable individual node updates
2779 _inhideOutOfView = true; // this will disable hidOutOfView which we want to do until local cache is loaded2779 _inhideOutOfView = true; // this will disable hidOutOfView which we want to do until local cache is loaded
2780 killLocalVoxels();2780 killLocalVoxels();
2781 qDebug() << "DONE beginLoadingLocalVoxelCache()\n";2781 qDebug() << "DONE beginLoadingLocalVoxelCache()";
2782}2782}
2783 2783
2784 2784