Showing the changes to interface/src/VoxelSystem.cpp (1 of 1 file). Show all
Unified · Split
| @@ -139,14 +139,14 @@ void VoxelSystem::setupNewVoxelsForDrawing() { · 138 unmodified lines | |||
| 139 | double start = usecTimestampNow(); | 139 | double start = usecTimestampNow(); |
| 140 | double sinceLastTime = (start - _setupNewVoxelsForDrawingLastFinished) / 1000.0; | 140 | double sinceLastTime = (start - _setupNewVoxelsForDrawingLastFinished) / 1000.0; |
| 141 | 141 | ||
| 142 | if (sinceLastTime <= std::max(_setupNewVoxelsForDrawingLastElapsed,SIXTY_FPS_IN_MILLISECONDS)) { | 142 | if (sinceLastTime <= std::max(_setupNewVoxelsForDrawingLastElapsed, SIXTY_FPS_IN_MILLISECONDS)) { |
| 143 | return; // bail early, it hasn't been long enough since the last time we ran | 143 | return; // bail early, it hasn't been long enough since the last time we ran |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | double sinceLastViewCulling = (start - _lastViewCulling) / 1000.0; | 146 | double sinceLastViewCulling = (start - _lastViewCulling) / 1000.0; |
| 147 | 147 | ||
| 148 | // If the view frustum has changed, since last time, then remove nodes that are out of view | 148 | // If the view frustum has changed, since last time, then remove nodes that are out of view |
| 149 | if ((sinceLastViewCulling >= std::max(_lastViewCullingElapsed,VIEW_CULLING_RATE_IN_MILLISECONDS)) && hasViewChanged()) { | 149 | if ((sinceLastViewCulling >= std::max(_lastViewCullingElapsed, VIEW_CULLING_RATE_IN_MILLISECONDS)) && hasViewChanged()) { |
| 150 | _lastViewCulling = start; | 150 | _lastViewCulling = start; |
| 151 | removeOutOfView(); | 151 | removeOutOfView(); |
| 152 | double endViewCulling = usecTimestampNow(); | 152 | double endViewCulling = usecTimestampNow(); |