Showing the changes to interface/src/Application.cpp (1 of 75 files). Show all
Unified · Split
| @@ -58,6 +58,7 @@ · 57 unmodified lines | |||
| 58 | #include <PacketHeaders.h> | 58 | #include <PacketHeaders.h> |
| 59 | #include <ParticlesScriptingInterface.h> | 59 | #include <ParticlesScriptingInterface.h> |
| 60 | #include <PerfStat.h> | 60 | #include <PerfStat.h> |
| 61 | #include <ResourceCache.h> | ||
| 61 | #include <UUID.h> | 62 | #include <UUID.h> |
| 62 | #include <VoxelSceneStats.h> | 63 | #include <VoxelSceneStats.h> |
| 63 | #include <LocalVoxelsList.h> | 64 | #include <LocalVoxelsList.h> |
| @@ -276,6 +277,9 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 212 unmodified lines | |||
| 276 | cache->setCacheDirectory(!cachePath.isEmpty() ? cachePath : "interfaceCache"); | 277 | cache->setCacheDirectory(!cachePath.isEmpty() ? cachePath : "interfaceCache"); |
| 277 | _networkAccessManager->setCache(cache); | 278 | _networkAccessManager->setCache(cache); |
| 278 | 279 | ||
| 280 | ResourceCache::setNetworkAccessManager(_networkAccessManager); | ||
| 281 | ResourceCache::setRequestLimit(3); | ||
| 282 | |||
| 279 | _window->setCentralWidget(_glWidget); | 283 | _window->setCentralWidget(_glWidget); |
| 280 | 284 | ||
| 281 | restoreSizeAndPosition(); | 285 | restoreSizeAndPosition(); |
| @@ -2469,6 +2473,8 @@ void Application::computeOffAxisFrustum(float& left, float& right, float& bottom · 2187 unmodified lines | |||
| 2469 | _viewFrustum.computeOffAxisFrustum(left, right, bottom, top, nearVal, farVal, nearClipPlane, farClipPlane); | 2473 | _viewFrustum.computeOffAxisFrustum(left, right, bottom, top, nearVal, farVal, nearClipPlane, farClipPlane); |
| 2470 | } | 2474 | } |
| 2471 | 2475 | ||
| 2476 | const float WHITE_TEXT[] = { 0.93, 0.93, 0.93 }; | ||
| 2477 | |||
| 2472 | void Application::displayOverlay() { | 2478 | void Application::displayOverlay() { |
| 2473 | PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), "Application::displayOverlay()"); | 2479 | PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), "Application::displayOverlay()"); |
| 2474 | 2480 | ||
| @@ -2491,16 +2497,13 @@ void Application::displayOverlay() { · 16 unmodified lines | |||
| 2491 | } | 2497 | } |
| 2492 | 2498 | ||
| 2493 | if (Menu::getInstance()->isOptionChecked(MenuOption::Stats)) { | 2499 | if (Menu::getInstance()->isOptionChecked(MenuOption::Stats)) { |
| 2494 | displayStatsBackground(0x33333399, 0, _glWidget->height() - 68, 296, 68); | 2500 | _audio.renderMuteIcon(1, _glWidget->height() - 50); |
| 2495 | _audio.render(_glWidget->width(), _glWidget->height()); | ||
| 2496 | if (Menu::getInstance()->isOptionChecked(MenuOption::Oscilloscope)) { | 2501 | if (Menu::getInstance()->isOptionChecked(MenuOption::Oscilloscope)) { |
| 2497 | int oscilloscopeTop = Menu::getInstance()->isOptionChecked(MenuOption::Mirror) ? 130 : 25; | 2502 | int oscilloscopeTop = _glWidget->height() - 135; |
| 2498 | _audioScope.render(25, oscilloscopeTop); | 2503 | _audioScope.render(25, oscilloscopeTop); |
| 2499 | } | 2504 | } |
| 2500 | } | 2505 | } |
| 2501 | 2506 | ||
| 2502 | //noiseTest(_glWidget->width(), _glWidget->height()); | ||
| 2503 | |||
| 2504 | if (Menu::getInstance()->isOptionChecked(MenuOption::HeadMouse)) { | 2507 | if (Menu::getInstance()->isOptionChecked(MenuOption::HeadMouse)) { |
| 2505 | _myAvatar->renderHeadMouse(); | 2508 | _myAvatar->renderHeadMouse(); |
| 2506 | } | 2509 | } |
| @@ -2542,8 +2545,7 @@ void Application::displayOverlay() { · 35 unmodified lines | |||
| 2542 | (Menu::getInstance()->isOptionChecked(MenuOption::Stats) && | 2545 | (Menu::getInstance()->isOptionChecked(MenuOption::Stats) && |
| 2543 | Menu::getInstance()->isOptionChecked(MenuOption::Bandwidth)) | 2546 | Menu::getInstance()->isOptionChecked(MenuOption::Bandwidth)) |
| 2544 | ? 80 : 20; | 2547 | ? 80 : 20; |
| 2545 | drawtext(_glWidget->width() - 100, _glWidget->height() - timerBottom, 0.30f, 0, 1.0f, 0, frameTimer, 0, 0, 0); | 2548 | drawText(_glWidget->width() - 100, _glWidget->height() - timerBottom, 0.30f, 1.0f, 0, frameTimer, WHITE_TEXT); |
| 2546 | drawtext(_glWidget->width() - 102, _glWidget->height() - timerBottom - 2, 0.30f, 0, 1.0f, 0, frameTimer, 1, 1, 1); | ||
| 2547 | } | 2549 | } |
| 2548 | 2550 | ||
| 2549 | if (_pieMenu.isDisplayed()) { | 2551 | if (_pieMenu.isDisplayed()) { |
| @@ -2571,6 +2573,7 @@ void Application::displayStatsBackground(unsigned int rgba, int x, int y, int wi · 21 unmodified lines | |||
| 2571 | } | 2573 | } |
| 2572 | 2574 | ||
| 2573 | // display expanded or contracted stats | 2575 | // display expanded or contracted stats |
| 2576 | |||
| 2574 | void Application::displayStats() { | 2577 | void Application::displayStats() { |
| 2575 | unsigned int backgroundColor = 0x33333399; | 2578 | unsigned int backgroundColor = 0x33333399; |
| 2576 | int verticalOffset = 0, horizontalOffset = 0, lines = 0; | 2579 | int verticalOffset = 0, horizontalOffset = 0, lines = 0; |
| @@ -2601,22 +2604,22 @@ void Application::displayStats() { · 24 unmodified lines | |||
| 2601 | sprintf(framesPerSecond, "Framerate: %3.0f FPS", _fps); | 2604 | sprintf(framesPerSecond, "Framerate: %3.0f FPS", _fps); |
| 2602 | 2605 | ||
| 2603 | verticalOffset += STATS_PELS_PER_LINE; | 2606 | verticalOffset += STATS_PELS_PER_LINE; |
| 2604 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0f, 2, serverNodes, .93f, .93f, .93f); | 2607 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, serverNodes, WHITE_TEXT); |
| 2605 | verticalOffset += STATS_PELS_PER_LINE; | 2608 | verticalOffset += STATS_PELS_PER_LINE; |
| 2606 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0f, 2, avatarNodes, .93f, .93f, .93f); | 2609 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarNodes, WHITE_TEXT); |
| 2607 | verticalOffset += STATS_PELS_PER_LINE; | 2610 | verticalOffset += STATS_PELS_PER_LINE; |
| 2608 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, framesPerSecond, .93f, .93f, .93f); | 2611 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, framesPerSecond, WHITE_TEXT); |
| 2609 | 2612 | ||
| 2610 | if (_statsExpanded) { | 2613 | if (_statsExpanded) { |
| 2611 | char packetsPerSecond[30]; | 2614 | char packetsPerSecond[30]; |
| 2612 | sprintf(packetsPerSecond, "Pkts/sec: %d", _packetsPerSecond); | 2615 | sprintf(packetsPerSecond, "Pkts/sec: %d", _packetsPerSecond); |
| 2613 | char averageMegabitsPerSecond[30]; | 2616 | char averageMegabitsPerSecond[30]; |
| 2614 | sprintf(averageMegabitsPerSecond, "Avg Mbps: %3.2f", (float)_bytesPerSecond * 8.f / 1000000.f); | 2617 | sprintf(averageMegabitsPerSecond, "Mbps: %3.2f", (float)_bytesPerSecond * 8.f / 1000000.f); |
| 2615 | 2618 | ||
| 2616 | verticalOffset += STATS_PELS_PER_LINE; | 2619 | verticalOffset += STATS_PELS_PER_LINE; |
| 2617 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, packetsPerSecond, .93f, .93f, .93f); | 2620 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, packetsPerSecond, WHITE_TEXT); |
| 2618 | verticalOffset += STATS_PELS_PER_LINE; | 2621 | verticalOffset += STATS_PELS_PER_LINE; |
| 2619 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, averageMegabitsPerSecond, .93f, .93f, .93f); | 2622 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, averageMegabitsPerSecond, WHITE_TEXT); |
| 2620 | } | 2623 | } |
| 2621 | 2624 | ||
| 2622 | verticalOffset = 0; | 2625 | verticalOffset = 0; |
| @@ -2654,26 +2657,36 @@ void Application::displayStats() { · 31 unmodified lines | |||
| 2654 | displayStatsBackground(backgroundColor, horizontalOffset, 0, 175, lines * STATS_PELS_PER_LINE + 10); | 2657 | displayStatsBackground(backgroundColor, horizontalOffset, 0, 175, lines * STATS_PELS_PER_LINE + 10); |
| 2655 | horizontalOffset += 5; | 2658 | horizontalOffset += 5; |
| 2656 | 2659 | ||
| 2660 | char audioJitter[30]; | ||
| 2661 | sprintf(audioJitter, | ||
| 2662 | "Buffer msecs %.1f", | ||
| 2663 | (float) (_audio.getNetworkBufferLengthSamplesPerChannel() + (float) _audio.getJitterBufferSamples()) / | ||
| 2664 | (float)_audio.getNetworkSampleRate() * 1000.f); | ||
| 2665 | drawText(30, _glWidget->height() - 22, 0.10f, 0, 2, audioJitter, WHITE_TEXT); | ||
| 2666 | |||
| 2667 | |||
| 2657 | char audioPing[30]; | 2668 | char audioPing[30]; |
| 2658 | sprintf(audioPing, "Audio ping: %d", pingAudio); | 2669 | sprintf(audioPing, "Audio ping: %d", pingAudio); |
| 2670 | |||
| 2671 | |||
| 2659 | char avatarPing[30]; | 2672 | char avatarPing[30]; |
| 2660 | sprintf(avatarPing, "Avatar ping: %d", pingAvatar); | 2673 | sprintf(avatarPing, "Avatar ping: %d", pingAvatar); |
| 2661 | char voxelAvgPing[30]; | 2674 | char voxelAvgPing[30]; |
| 2662 | sprintf(voxelAvgPing, "Voxel avg ping: %d", pingVoxel); | 2675 | sprintf(voxelAvgPing, "Voxel avg ping: %d", pingVoxel); |
| 2663 | 2676 | ||
| 2664 | verticalOffset += STATS_PELS_PER_LINE; | 2677 | verticalOffset += STATS_PELS_PER_LINE; |
| 2665 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, audioPing, .93f, .93f, .93f); | 2678 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, audioPing, WHITE_TEXT); |
| 2666 | verticalOffset += STATS_PELS_PER_LINE; | 2679 | verticalOffset += STATS_PELS_PER_LINE; |
| 2667 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, avatarPing, .93f, .93f, .93f); | 2680 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarPing, WHITE_TEXT); |
| 2668 | verticalOffset += STATS_PELS_PER_LINE; | 2681 | verticalOffset += STATS_PELS_PER_LINE; |
| 2669 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, voxelAvgPing, .93f, .93f, .93f); | 2682 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, voxelAvgPing, WHITE_TEXT); |
| 2670 | 2683 | ||
| 2671 | if (_statsExpanded) { | 2684 | if (_statsExpanded) { |
| 2672 | char voxelMaxPing[30]; | 2685 | char voxelMaxPing[30]; |
| 2673 | sprintf(voxelMaxPing, "Voxel max ping: %d", pingVoxelMax); | 2686 | sprintf(voxelMaxPing, "Voxel max ping: %d", pingVoxelMax); |
| 2674 | 2687 | ||
| 2675 | verticalOffset += STATS_PELS_PER_LINE; | 2688 | verticalOffset += STATS_PELS_PER_LINE; |
| 2676 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, voxelMaxPing, .93f, .93f, .93f); | 2689 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, voxelMaxPing, WHITE_TEXT); |
| 2677 | } | 2690 | } |
| 2678 | 2691 | ||
| 2679 | verticalOffset = 0; | 2692 | verticalOffset = 0; |
| @@ -2692,20 +2705,20 @@ void Application::displayStats() { · 12 unmodified lines | |||
| 2692 | sprintf(avatarPosition, "Pos: %.0f,%.0f,%.0f", avatarPos.x, avatarPos.y, avatarPos.z); | 2705 | sprintf(avatarPosition, "Pos: %.0f,%.0f,%.0f", avatarPos.x, avatarPos.y, avatarPos.z); |
| 2693 | } else { | 2706 | } else { |
| 2694 | // longhand way | 2707 | // longhand way |
| 2695 | sprintf(avatarPosition, "Position: %.3f, %.3f, %.3f", avatarPos.x, avatarPos.y, avatarPos.z); | 2708 | sprintf(avatarPosition, "Position: %.1f, %.1f, %.1f", avatarPos.x, avatarPos.y, avatarPos.z); |
| 2696 | } | 2709 | } |
| 2697 | char avatarVelocity[30]; | 2710 | char avatarVelocity[30]; |
| 2698 | sprintf(avatarVelocity, "Velocity: %.1f", glm::length(_myAvatar->getVelocity())); | 2711 | sprintf(avatarVelocity, "Velocity: %.1f", glm::length(_myAvatar->getVelocity())); |
| 2699 | char avatarBodyYaw[30]; | 2712 | char avatarBodyYaw[30]; |
| 2700 | sprintf(avatarBodyYaw, "Yaw: %.2f", _myAvatar->getBodyYaw()); | 2713 | sprintf(avatarBodyYaw, "Yaw: %.1f", _myAvatar->getBodyYaw()); |
| 2701 | char avatarMixerStats[200]; | 2714 | char avatarMixerStats[200]; |
| 2702 | 2715 | ||
| 2703 | verticalOffset += STATS_PELS_PER_LINE; | 2716 | verticalOffset += STATS_PELS_PER_LINE; |
| 2704 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, avatarPosition, .93f, .93f, .93f); | 2717 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarPosition, WHITE_TEXT); |
| 2705 | verticalOffset += STATS_PELS_PER_LINE; | 2718 | verticalOffset += STATS_PELS_PER_LINE; |
| 2706 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, avatarVelocity, .93f, .93f, .93f); | 2719 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarVelocity, WHITE_TEXT); |
| 2707 | verticalOffset += STATS_PELS_PER_LINE; | 2720 | verticalOffset += STATS_PELS_PER_LINE; |
| 2708 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, avatarBodyYaw, .93f, .93f, .93f); | 2721 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarBodyYaw, WHITE_TEXT); |
| 2709 | 2722 | ||
| 2710 | if (_statsExpanded) { | 2723 | if (_statsExpanded) { |
| 2711 | SharedNodePointer avatarMixer = NodeList::getInstance()->soloNodeOfType(NodeType::AvatarMixer); | 2724 | SharedNodePointer avatarMixer = NodeList::getInstance()->soloNodeOfType(NodeType::AvatarMixer); |
| @@ -2718,7 +2731,7 @@ void Application::displayStats() { · 6 unmodified lines | |||
| 2718 | } | 2731 | } |
| 2719 | 2732 | ||
| 2720 | verticalOffset += STATS_PELS_PER_LINE; | 2733 | verticalOffset += STATS_PELS_PER_LINE; |
| 2721 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, avatarMixerStats, .93f, .93f, .93f); | 2734 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarMixerStats, WHITE_TEXT); |
| 2722 | } | 2735 | } |
| 2723 | 2736 | ||
| 2724 | verticalOffset = 0; | 2737 | verticalOffset = 0; |
| @@ -2733,7 +2746,7 @@ void Application::displayStats() { · 8 unmodified lines | |||
| 2733 | voxelStats.str(""); | 2746 | voxelStats.str(""); |
| 2734 | voxelStats << "Voxels Memory Nodes: " << VoxelTreeElement::getTotalMemoryUsage() / 1000000.f << "MB"; | 2747 | voxelStats << "Voxels Memory Nodes: " << VoxelTreeElement::getTotalMemoryUsage() / 1000000.f << "MB"; |
| 2735 | verticalOffset += STATS_PELS_PER_LINE; | 2748 | verticalOffset += STATS_PELS_PER_LINE; |
| 2736 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, (char*)voxelStats.str().c_str(), .93f, .93f, .93f); | 2749 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT); |
| 2737 | 2750 | ||
| 2738 | voxelStats.str(""); | 2751 | voxelStats.str(""); |
| 2739 | voxelStats << | 2752 | voxelStats << |
| @@ -2743,14 +2756,14 @@ void Application::displayStats() { · 3 unmodified lines | |||
| 2743 | voxelStats << " / GPU: " << _voxels.getVoxelMemoryUsageGPU() / 1000000.f << "MB"; | 2756 | voxelStats << " / GPU: " << _voxels.getVoxelMemoryUsageGPU() / 1000000.f << "MB"; |
| 2744 | } | 2757 | } |
| 2745 | verticalOffset += STATS_PELS_PER_LINE; | 2758 | verticalOffset += STATS_PELS_PER_LINE; |
| 2746 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, (char*)voxelStats.str().c_str(), .93f, .93f, .93f); | 2759 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT); |
| 2747 | 2760 | ||
| 2748 | // Voxel Rendering | 2761 | // Voxel Rendering |
| 2749 | voxelStats.str(""); | 2762 | voxelStats.str(""); |
| 2750 | voxelStats.precision(4); | 2763 | voxelStats.precision(4); |
| 2751 | voxelStats << "Voxel Rendering Slots Max: " << _voxels.getMaxVoxels() / 1000.f << "K"; | 2764 | voxelStats << "Voxel Rendering Slots Max: " << _voxels.getMaxVoxels() / 1000.f << "K"; |
| 2752 | verticalOffset += STATS_PELS_PER_LINE; | 2765 | verticalOffset += STATS_PELS_PER_LINE; |
| 2753 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, (char*)voxelStats.str().c_str(), .93f, .93f, .93f); | 2766 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT); |
| 2754 | } | 2767 | } |
| 2755 | 2768 | ||
| 2756 | voxelStats.str(""); | 2769 | voxelStats.str(""); |
| @@ -2758,7 +2771,7 @@ void Application::displayStats() { · 1 unmodified line | |||
| 2758 | voxelStats << "Drawn: " << _voxels.getVoxelsWritten() / 1000.f << "K " << | 2771 | voxelStats << "Drawn: " << _voxels.getVoxelsWritten() / 1000.f << "K " << |
| 2759 | "Abandoned: " << _voxels.getAbandonedVoxels() / 1000.f << "K "; | 2772 | "Abandoned: " << _voxels.getAbandonedVoxels() / 1000.f << "K "; |
| 2760 | verticalOffset += STATS_PELS_PER_LINE; | 2773 | verticalOffset += STATS_PELS_PER_LINE; |
| 2761 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, (char*)voxelStats.str().c_str(), .93f, .93f, .93f); | 2774 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT); |
| 2762 | 2775 | ||
| 2763 | // iterate all the current voxel stats, and list their sending modes, and total voxel counts | 2776 | // iterate all the current voxel stats, and list their sending modes, and total voxel counts |
| 2764 | std::stringstream sendingMode(""); | 2777 | std::stringstream sendingMode(""); |
| @@ -2802,7 +2815,7 @@ void Application::displayStats() { · 37 unmodified lines | |||
| 2802 | sendingMode << " <SCENE STABLE>"; | 2815 | sendingMode << " <SCENE STABLE>"; |
| 2803 | } | 2816 | } |
| 2804 | verticalOffset += STATS_PELS_PER_LINE; | 2817 | verticalOffset += STATS_PELS_PER_LINE; |
| 2805 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, (char*)sendingMode.str().c_str(), .93f, .93f, .93f); | 2818 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)sendingMode.str().c_str(), WHITE_TEXT); |
| 2806 | } | 2819 | } |
| 2807 | 2820 | ||
| 2808 | // Incoming packets | 2821 | // Incoming packets |
| @@ -2814,7 +2827,7 @@ void Application::displayStats() { · 5 unmodified lines | |||
| 2814 | voxelStats << "Voxel Packets to Process: " << packetsString.toLocal8Bit().constData() | 2827 | voxelStats << "Voxel Packets to Process: " << packetsString.toLocal8Bit().constData() |
| 2815 | << " [Recent Max: " << maxString.toLocal8Bit().constData() << "]"; | 2828 | << " [Recent Max: " << maxString.toLocal8Bit().constData() << "]"; |
| 2816 | verticalOffset += STATS_PELS_PER_LINE; | 2829 | verticalOffset += STATS_PELS_PER_LINE; |
| 2817 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, (char*)voxelStats.str().c_str(), .93f, .93f, .93f); | 2830 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT); |
| 2818 | } | 2831 | } |
| 2819 | 2832 | ||
| 2820 | if (_resetRecentMaxPacketsSoon && voxelPacketsToProcess > 0) { | 2833 | if (_resetRecentMaxPacketsSoon && voxelPacketsToProcess > 0) { |
| @@ -2837,7 +2850,7 @@ void Application::displayStats() { · 16 unmodified lines | |||
| 2837 | voxelStats.str(""); | 2850 | voxelStats.str(""); |
| 2838 | voxelStats << "Server voxels: " << serversTotalString.toLocal8Bit().constData(); | 2851 | voxelStats << "Server voxels: " << serversTotalString.toLocal8Bit().constData(); |
| 2839 | verticalOffset += STATS_PELS_PER_LINE; | 2852 | verticalOffset += STATS_PELS_PER_LINE; |
| 2840 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, (char*)voxelStats.str().c_str(), .93f, .93f, .93f); | 2853 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT); |
| 2841 | 2854 | ||
| 2842 | if (_statsExpanded) { | 2855 | if (_statsExpanded) { |
| 2843 | QString serversInternalString = locale.toString((uint)totalInternal); | 2856 | QString serversInternalString = locale.toString((uint)totalInternal); |
| @@ -2848,7 +2861,7 @@ void Application::displayStats() { · 4 unmodified lines | |||
| 2848 | "Internal: " << serversInternalString.toLocal8Bit().constData() << " " << | 2861 | "Internal: " << serversInternalString.toLocal8Bit().constData() << " " << |
| 2849 | "Leaves: " << serversLeavesString.toLocal8Bit().constData() << ""; | 2862 | "Leaves: " << serversLeavesString.toLocal8Bit().constData() << ""; |
| 2850 | verticalOffset += STATS_PELS_PER_LINE; | 2863 | verticalOffset += STATS_PELS_PER_LINE; |
| 2851 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, (char*)voxelStats.str().c_str(), .93f, .93f, .93f); | 2864 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT); |
| 2852 | } | 2865 | } |
| 2853 | 2866 | ||
| 2854 | unsigned long localTotal = VoxelTreeElement::getNodeCount(); | 2867 | unsigned long localTotal = VoxelTreeElement::getNodeCount(); |
| @@ -2858,7 +2871,7 @@ void Application::displayStats() { · 3 unmodified lines | |||
| 2858 | voxelStats.str(""); | 2871 | voxelStats.str(""); |
| 2859 | voxelStats << "Local voxels: " << localTotalString.toLocal8Bit().constData(); | 2872 | voxelStats << "Local voxels: " << localTotalString.toLocal8Bit().constData(); |
| 2860 | verticalOffset += STATS_PELS_PER_LINE; | 2873 | verticalOffset += STATS_PELS_PER_LINE; |
| 2861 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, (char*)voxelStats.str().c_str(), .93f, .93f, .93f); | 2874 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT); |
| 2862 | 2875 | ||
| 2863 | if (_statsExpanded) { | 2876 | if (_statsExpanded) { |
| 2864 | unsigned long localInternal = VoxelTreeElement::getInternalNodeCount(); | 2877 | unsigned long localInternal = VoxelTreeElement::getInternalNodeCount(); |
| @@ -2871,7 +2884,7 @@ void Application::displayStats() { · 6 unmodified lines | |||
| 2871 | "Internal: " << localInternalString.toLocal8Bit().constData() << " " << | 2884 | "Internal: " << localInternalString.toLocal8Bit().constData() << " " << |
| 2872 | "Leaves: " << localLeavesString.toLocal8Bit().constData() << ""; | 2885 | "Leaves: " << localLeavesString.toLocal8Bit().constData() << ""; |
| 2873 | verticalOffset += STATS_PELS_PER_LINE; | 2886 | verticalOffset += STATS_PELS_PER_LINE; |
| 2874 | drawtext(horizontalOffset, verticalOffset, 0.10f, 0, 1.0, 2, (char*)voxelStats.str().c_str(), .93f, .93f, .93f); | 2887 | drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT); |
| 2875 | } | 2888 | } |
| 2876 | } | 2889 | } |
| 2877 | 2890 | ||