History

replace uint64_t with quint64 for Qt friendlyness

Stephen Birarda committed 12 years ago

Commit cda06d11 parent 7b4921e57 files · +347 −347Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+10−10
@@ -638,8 +638,8 @@ void VoxelSystem::setupNewVoxelsForDrawing() { · 637 unmodified lines
638 return; // bail early if we're not initialized638 return; // bail early if we're not initialized
639 }639 }
640 640
641 uint64_t start = usecTimestampNow();641 quint64 start = usecTimestampNow();
642 uint64_t sinceLastTime = (start - _setupNewVoxelsForDrawingLastFinished) / 1000;642 quint64 sinceLastTime = (start - _setupNewVoxelsForDrawingLastFinished) / 1000;
643 643
644 bool iAmDebugging = false; // if you're debugging set this to true, so you won't get skipped for slow debugging644 bool iAmDebugging = false; // if you're debugging set this to true, so you won't get skipped for slow debugging
645 if (!iAmDebugging && sinceLastTime <= std::max((float) _setupNewVoxelsForDrawingLastElapsed, SIXTY_FPS_IN_MILLISECONDS)) {645 if (!iAmDebugging && sinceLastTime <= std::max((float) _setupNewVoxelsForDrawingLastElapsed, SIXTY_FPS_IN_MILLISECONDS)) {
@@ -685,7 +685,7 @@ void VoxelSystem::setupNewVoxelsForDrawing() { · 39 unmodified lines
685 685
686 _bufferWriteLock.unlock();686 _bufferWriteLock.unlock();
687 687
688 uint64_t end = usecTimestampNow();688 quint64 end = usecTimestampNow();
689 int elapsedmsec = (end - start) / 1000;689 int elapsedmsec = (end - start) / 1000;
690 _setupNewVoxelsForDrawingLastFinished = end;690 _setupNewVoxelsForDrawingLastFinished = end;
691 _setupNewVoxelsForDrawingLastElapsed = elapsedmsec;691 _setupNewVoxelsForDrawingLastElapsed = elapsedmsec;
@@ -702,8 +702,8 @@ void VoxelSystem::setupNewVoxelsForDrawingSingleNode(bool allowBailEarly) { · 10 unmodified lines
702 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),702 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
703 "setupNewVoxelsForDrawingSingleNode() xxxxx");703 "setupNewVoxelsForDrawingSingleNode() xxxxx");
704 704
705 uint64_t start = usecTimestampNow();705 quint64 start = usecTimestampNow();
706 uint64_t sinceLastTime = (start - _setupNewVoxelsForDrawingLastFinished) / 1000;706 quint64 sinceLastTime = (start - _setupNewVoxelsForDrawingLastFinished) / 1000;
707 707
708 bool iAmDebugging = false; // if you're debugging set this to true, so you won't get skipped for slow debugging708 bool iAmDebugging = false; // if you're debugging set this to true, so you won't get skipped for slow debugging
709 if (allowBailEarly && !iAmDebugging &&709 if (allowBailEarly && !iAmDebugging &&
@@ -728,7 +728,7 @@ void VoxelSystem::setupNewVoxelsForDrawingSingleNode(bool allowBailEarly) { · 18 unmodified lines
728 728
729 _bufferWriteLock.unlock();729 _bufferWriteLock.unlock();
730 730
731 uint64_t end = usecTimestampNow();731 quint64 end = usecTimestampNow();
732 int elapsedmsec = (end - start) / 1000;732 int elapsedmsec = (end - start) / 1000;
733 _setupNewVoxelsForDrawingLastFinished = end;733 _setupNewVoxelsForDrawingLastFinished = end;
734 _setupNewVoxelsForDrawingLastElapsed = elapsedmsec;734 _setupNewVoxelsForDrawingLastElapsed = elapsedmsec;
@@ -737,14 +737,14 @@ void VoxelSystem::setupNewVoxelsForDrawingSingleNode(bool allowBailEarly) { · 2 unmodified lines
737void VoxelSystem::checkForCulling() {737void VoxelSystem::checkForCulling() {
738 738
739 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), "checkForCulling()");739 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), "checkForCulling()");
740 uint64_t start = usecTimestampNow();740 quint64 start = usecTimestampNow();
741 741
742 // track how long its been since we were last moving. If we have recently moved then only use delta frustums, if742 // track how long its been since we were last moving. If we have recently moved then only use delta frustums, if
743 // it's been a long time since we last moved, then go ahead and do a full frustum cull.743 // it's been a long time since we last moved, then go ahead and do a full frustum cull.
744 if (isViewChanging()) {744 if (isViewChanging()) {
745 _lastViewIsChanging = start;745 _lastViewIsChanging = start;
746 }746 }
747 uint64_t sinceLastMoving = (start - _lastViewIsChanging) / 1000;747 quint64 sinceLastMoving = (start - _lastViewIsChanging) / 1000;
748 bool enoughTime = (sinceLastMoving >= std::max((float) _lastViewCullingElapsed, VIEW_CULLING_RATE_IN_MILLISECONDS));748 bool enoughTime = (sinceLastMoving >= std::max((float) _lastViewCullingElapsed, VIEW_CULLING_RATE_IN_MILLISECONDS));
749 749
750 // These has changed events will occur before we stop. So we need to remember this for when we finally have stopped750 // These has changed events will occur before we stop. So we need to remember this for when we finally have stopped
@@ -766,7 +766,7 @@ void VoxelSystem::checkForCulling() { · 15 unmodified lines
766 hideOutOfView(forceFullFrustum);766 hideOutOfView(forceFullFrustum);
767 767
768 if (forceFullFrustum) {768 if (forceFullFrustum) {
769 uint64_t endViewCulling = usecTimestampNow();769 quint64 endViewCulling = usecTimestampNow();
770 _lastViewCullingElapsed = (endViewCulling - start) / 1000;770 _lastViewCullingElapsed = (endViewCulling - start) / 1000;
771 }771 }
772 772
@@ -775,7 +775,7 @@ void VoxelSystem::checkForCulling() { · 2 unmodified lines
775 // VBO reubuilding. Possibly we should do this only if our actual VBO usage crosses some lower boundary.775 // VBO reubuilding. Possibly we should do this only if our actual VBO usage crosses some lower boundary.
776 cleanupRemovedVoxels();776 cleanupRemovedVoxels();
777 777
778 uint64_t sinceLastAudit = (start - _lastAudit) / 1000;778 quint64 sinceLastAudit = (start - _lastAudit) / 1000;
779 779
780 if (Menu::getInstance()->isOptionChecked(MenuOption::AutomaticallyAuditTree)) {780 if (Menu::getInstance()->isOptionChecked(MenuOption::AutomaticallyAuditTree)) {
781 if (sinceLastAudit >= std::max((float) _lastViewCullingElapsed, VIEW_CULLING_RATE_IN_MILLISECONDS)) {781 if (sinceLastAudit >= std::max((float) _lastViewCullingElapsed, VIEW_CULLING_RATE_IN_MILLISECONDS)) {