History

first major pass at voxelEctomy

ZappoMan committed 11 years ago

Commit 4ea9bbc1 parent 2a129b665 files · +43 −5956Browse files

Showing the changes to interface/src/ui/Stats.cpp (1 of 65 files). Show all

Unified · Split

interface/src/ui/Stats.cpp+3−37
@@ -471,8 +471,6 @@ void Stats::display( · 470 unmodified lines
471 verticalOffset = 0;471 verticalOffset = 0;
472 horizontalOffset = _lastHorizontalOffset + _generalStatsWidth + _pingStatsWidth + _geoStatsWidth + 3;472 horizontalOffset = _lastHorizontalOffset + _generalStatsWidth + _pingStatsWidth + _geoStatsWidth + 3;
473 473
474 VoxelSystem* voxels = Application::getInstance()->getVoxels();
475
476 lines = _expanded ? 14 : 3;474 lines = _expanded ? 14 : 3;
477 475
478 drawBackground(backgroundColor, horizontalOffset, 0, glCanvas->width() - horizontalOffset,476 drawBackground(backgroundColor, horizontalOffset, 0, glCanvas->width() - horizontalOffset,
@@ -510,38 +508,6 @@ void Stats::display( · 31 unmodified lines
510 drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);508 drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);
511 }509 }
512 510
513 voxelStats.str("");
514 voxelStats.precision(4);
515 voxelStats << "Voxels Drawn: " << voxels->getVoxelsWritten() / 1000.0f << "K " <<
516 "Abandoned: " << voxels->getAbandonedVoxels() / 1000.0f << "K ";
517 verticalOffset += STATS_PELS_PER_LINE;
518 drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);
519
520 if (_expanded) {
521 // Local Voxel Memory Usage
522 voxelStats.str("");
523 voxelStats << " Voxels Memory Nodes: " << VoxelTreeElement::getTotalMemoryUsage() / 1000000.0f << "MB";
524 verticalOffset += STATS_PELS_PER_LINE;
525 drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);
526
527 voxelStats.str("");
528 voxelStats <<
529 " Geometry RAM: " << voxels->getVoxelMemoryUsageRAM() / 1000000.0f << "MB / " <<
530 "VBO: " << voxels->getVoxelMemoryUsageVBO() / 1000000.0f << "MB";
531 if (voxels->hasVoxelMemoryUsageGPU()) {
532 voxelStats << " / GPU: " << voxels->getVoxelMemoryUsageGPU() / 1000000.0f << "MB";
533 }
534 verticalOffset += STATS_PELS_PER_LINE;
535 drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);
536
537 // Voxel Rendering
538 voxelStats.str("");
539 voxelStats.precision(4);
540 voxelStats << " Voxel Rendering Slots Max: " << voxels->getMaxVoxels() / 1000.0f << "K";
541 verticalOffset += STATS_PELS_PER_LINE;
542 drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);
543 }
544
545 // iterate all the current voxel stats, and list their sending modes, and total voxel counts511 // iterate all the current voxel stats, and list their sending modes, and total voxel counts
546 std::stringstream sendingMode("");512 std::stringstream sendingMode("");
547 sendingMode << "Octree Sending Mode: [";513 sendingMode << "Octree Sending Mode: [";
@@ -612,7 +578,7 @@ void Stats::display( · 64 unmodified lines
612 }578 }
613 579
614 QString serversTotalString = locale.toString((uint)totalNodes); // consider adding: .rightJustified(10, ' ');580 QString serversTotalString = locale.toString((uint)totalNodes); // consider adding: .rightJustified(10, ' ');
615 unsigned long localTotal = VoxelTreeElement::getNodeCount();581 unsigned long localTotal = OctreeElement::getNodeCount();
616 QString localTotalString = locale.toString((uint)localTotal); // consider adding: .rightJustified(10, ' ');582 QString localTotalString = locale.toString((uint)localTotal); // consider adding: .rightJustified(10, ' ');
617 583
618 // Server Octree Elements584 // Server Octree Elements
@@ -641,8 +607,8 @@ void Stats::display( · 22 unmodified lines
641 drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);607 drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);
642 608
643 // Local Voxels609 // Local Voxels
644 unsigned long localInternal = VoxelTreeElement::getInternalNodeCount();610 unsigned long localInternal = OctreeElement::getInternalNodeCount();
645 unsigned long localLeaves = VoxelTreeElement::getLeafNodeCount();611 unsigned long localLeaves = OctreeElement::getLeafNodeCount();
646 QString localInternalString = locale.toString((uint)localInternal);612 QString localInternalString = locale.toString((uint)localInternal);
647 QString localLeavesString = locale.toString((uint)localLeaves);613 QString localLeavesString = locale.toString((uint)localLeaves);
648 614

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