Showing the changes to interface/src/VoxelSystem.cpp (1 of 1 file). Show all
Unified · Split
| @@ -634,9 +634,6 @@ void VoxelSystem::setupNewVoxelsForDrawing() { · 633 unmodified lines | ||
| 634 | 634 | uint64_t start = usecTimestampNow(); |
| 635 | 635 | uint64_t sinceLastTime = (start - _setupNewVoxelsForDrawingLastFinished) / 1000; |
| 636 | 636 | |
| 637 | − // clear up the VBOs for any nodes that have been recently deleted. | |
| 638 | − //clearFreeBufferIndexes(); | |
| 639 | − | |
| 640 | 637 | bool iAmDebugging = false; // if you're debugging set this to true, so you won't get skipped for slow debugging |
| 641 | 638 | if (!iAmDebugging && sinceLastTime <= std::max((float) _setupNewVoxelsForDrawingLastElapsed, SIXTY_FPS_IN_MILLISECONDS)) { |
| 642 | 639 | return; // bail early, it hasn't been long enough since the last time we ran |
| @@ -657,9 +654,7 @@ void VoxelSystem::setupNewVoxelsForDrawing() { · 14 unmodified lines | ||
| 657 | 654 | if (_writeRenderFullVBO) { |
| 658 | 655 | printf("resetting _freeIndexes and _voxelsInWriteArrays\n"); |
| 659 | 656 | _voxelsInWriteArrays = 0; // reset our VBO |
| 660 | − pthread_mutex_lock(&_freeIndexLock); | |
| 661 | − _freeIndexes.clear(); // reset our free indexes | |
| 662 | − pthread_mutex_unlock(&_freeIndexLock); | |
| 657 | + clearFreeBufferIndexes(); | |
| 663 | 658 | } |
| 664 | 659 | _voxelsUpdated = newTreeToArrays(_tree->rootNode); |
| 665 | 660 | _tree->clearDirtyBit(); // after we pull the trees into the array, we can consider the tree clean |
| @@ -702,9 +697,6 @@ void VoxelSystem::setupNewVoxelsForDrawingSingleNode(bool allowBailEarly) { · 36 unmodified lines | ||
| 702 | 697 | uint64_t start = usecTimestampNow(); |
| 703 | 698 | uint64_t sinceLastTime = (start - _setupNewVoxelsForDrawingLastFinished) / 1000; |
| 704 | 699 | |
| 705 | − // clear up the VBOs for any nodes that have been recently deleted. | |
| 706 | − //clearFreeBufferIndexes(); | |
| 707 | − | |
| 708 | 700 | bool iAmDebugging = false; // if you're debugging set this to true, so you won't get skipped for slow debugging |
| 709 | 701 | if (allowBailEarly && !iAmDebugging && |
| 710 | 702 | sinceLastTime <= std::max((float) _setupNewVoxelsForDrawingLastElapsed, SIXTY_FPS_IN_MILLISECONDS)) { |