Showing the changes to interface/src/VoxelSystem.cpp (1 of 5 files). Show all
Unified · Split
| @@ -774,7 +774,10 @@ void VoxelSystem::checkForCulling() { · 773 unmodified lines | |||
| 774 | uint64_t start = usecTimestampNow(); | 774 | uint64_t start = usecTimestampNow(); |
| 775 | uint64_t sinceLastViewCulling = (start - _lastViewCulling) / 1000; | 775 | uint64_t sinceLastViewCulling = (start - _lastViewCulling) / 1000; |
| 776 | 776 | ||
| 777 | bool constantCulling = !Menu::getInstance()->isOptionChecked(MenuOption::DisableConstantCulling); | 777 | // These items used to be menu options, we are not defaulting to and only supporting these modes. |
| 778 | bool constantCulling = true; | ||
| 779 | bool performHideOutOfViewLogic = true; | ||
| 780 | bool performRemoveOutOfViewLogic = false; | ||
| 778 | 781 | ||
| 779 | // If the view frustum is no longer changing, but has changed, since last time, then remove nodes that are out of view | 782 | // If the view frustum is no longer changing, but has changed, since last time, then remove nodes that are out of view |
| 780 | if (constantCulling || ( | 783 | if (constantCulling || ( |
| @@ -785,7 +788,7 @@ void VoxelSystem::checkForCulling() { · 4 unmodified lines | |||
| 785 | // When we call removeOutOfView() voxels, we don't actually remove the voxels from the VBOs, but we do remove | 788 | // When we call removeOutOfView() voxels, we don't actually remove the voxels from the VBOs, but we do remove |
| 786 | // them from tree, this makes our tree caclulations faster, but doesn't require us to fully rebuild the VBOs (which | 789 | // them from tree, this makes our tree caclulations faster, but doesn't require us to fully rebuild the VBOs (which |
| 787 | // can be expensive). | 790 | // can be expensive). |
| 788 | if (!Menu::getInstance()->isOptionChecked(MenuOption::DisableHideOutOfView)) { | 791 | if (performHideOutOfViewLogic) { |
| 789 | 792 | ||
| 790 | // track how long its been since we were last moving. If we have recently moved then only use delta frustums, if | 793 | // track how long its been since we were last moving. If we have recently moved then only use delta frustums, if |
| 791 | // it's been a long time since we last moved, then go ahead and do a full frustum cull. | 794 | // it's been a long time since we last moved, then go ahead and do a full frustum cull. |
| @@ -819,7 +822,7 @@ void VoxelSystem::checkForCulling() { · 27 unmodified lines | |||
| 819 | _lastViewCullingElapsed = (endViewCulling - start) / 1000; | 822 | _lastViewCullingElapsed = (endViewCulling - start) / 1000; |
| 820 | } | 823 | } |
| 821 | 824 | ||
| 822 | } else if (Menu::getInstance()->isOptionChecked(MenuOption::RemoveOutOfView)) { | 825 | } else if (performRemoveOutOfViewLogic) { |
| 823 | _lastViewCulling = start; | 826 | _lastViewCulling = start; |
| 824 | removeOutOfView(); | 827 | removeOutOfView(); |
| 825 | uint64_t endViewCulling = usecTimestampNow(); | 828 | uint64_t endViewCulling = usecTimestampNow(); |
| @@ -1943,7 +1946,7 @@ void VoxelSystem::hideOutOfView(bool forceFullFrustum) { · 1117 unmodified lines | |||
| 1943 | // Both these problems are solved by intermittently calling this with forceFullFrustum set | 1946 | // Both these problems are solved by intermittently calling this with forceFullFrustum set |
| 1944 | // to true. This will essentially clean up the improperly hidden or shown voxels. | 1947 | // to true. This will essentially clean up the improperly hidden or shown voxels. |
| 1945 | // | 1948 | // |
| 1946 | bool wantDeltaFrustums = !forceFullFrustum && !Menu::getInstance()->isOptionChecked(MenuOption::UseFullFrustumInHide); | 1949 | bool wantDeltaFrustums = !forceFullFrustum; |
| 1947 | hideOutOfViewArgs args(this, this->_tree, _culledOnce, widenFrustum, wantDeltaFrustums); | 1950 | hideOutOfViewArgs args(this, this->_tree, _culledOnce, widenFrustum, wantDeltaFrustums); |
| 1948 | 1951 | ||
| 1949 | const bool wantViewFrustumDebugging = false; // change to true for additional debugging | 1952 | const bool wantViewFrustumDebugging = false; // change to true for additional debugging |