History

progress on keep local voxels

ZappoMan committed 13 years ago

Commit 0a6ddf11 parent c86bad71 file · +1 −9Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+1−9
@@ -634,9 +634,6 @@ void VoxelSystem::setupNewVoxelsForDrawing() { · 633 unmodified lines
634 uint64_t start = usecTimestampNow();634 uint64_t start = usecTimestampNow();
635 uint64_t sinceLastTime = (start - _setupNewVoxelsForDrawingLastFinished) / 1000;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 bool iAmDebugging = false; // if you're debugging set this to true, so you won't get skipped for slow debugging637 bool iAmDebugging = false; // if you're debugging set this to true, so you won't get skipped for slow debugging
641 if (!iAmDebugging && sinceLastTime <= std::max((float) _setupNewVoxelsForDrawingLastElapsed, SIXTY_FPS_IN_MILLISECONDS)) {638 if (!iAmDebugging && sinceLastTime <= std::max((float) _setupNewVoxelsForDrawingLastElapsed, SIXTY_FPS_IN_MILLISECONDS)) {
642 return; // bail early, it hasn't been long enough since the last time we ran639 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 if (_writeRenderFullVBO) {654 if (_writeRenderFullVBO) {
658 printf("resetting _freeIndexes and _voxelsInWriteArrays\n");655 printf("resetting _freeIndexes and _voxelsInWriteArrays\n");
659 _voxelsInWriteArrays = 0; // reset our VBO656 _voxelsInWriteArrays = 0; // reset our VBO
660 pthread_mutex_lock(&_freeIndexLock);657 clearFreeBufferIndexes();
661 _freeIndexes.clear(); // reset our free indexes
662 pthread_mutex_unlock(&_freeIndexLock);
663 }658 }
664 _voxelsUpdated = newTreeToArrays(_tree->rootNode);659 _voxelsUpdated = newTreeToArrays(_tree->rootNode);
665 _tree->clearDirtyBit(); // after we pull the trees into the array, we can consider the tree clean660 _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 uint64_t start = usecTimestampNow();697 uint64_t start = usecTimestampNow();
703 uint64_t sinceLastTime = (start - _setupNewVoxelsForDrawingLastFinished) / 1000;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 bool iAmDebugging = false; // if you're debugging set this to true, so you won't get skipped for slow debugging700 bool iAmDebugging = false; // if you're debugging set this to true, so you won't get skipped for slow debugging
709 if (allowBailEarly && !iAmDebugging && 701 if (allowBailEarly && !iAmDebugging &&
710 sinceLastTime <= std::max((float) _setupNewVoxelsForDrawingLastElapsed, SIXTY_FPS_IN_MILLISECONDS)) {702 sinceLastTime <= std::max((float) _setupNewVoxelsForDrawingLastElapsed, SIXTY_FPS_IN_MILLISECONDS)) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t