History

merge

atlante45 committed 13 years ago

Commit b8c18be2 parents 5da525f f0bb42a14 files · +192 −151Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+13−1
@@ -429,7 +429,7 @@ int VoxelSystem::newTreeToArrays(VoxelNode* node) { · 428 unmodified lines
429 bool shouldRender = false; // assume we don't need to render it429 bool shouldRender = false; // assume we don't need to render it
430 // if it's colored, we might need to render it!430 // if it's colored, we might need to render it!
431 shouldRender = node->calculateShouldRender(_viewFrustum);431 shouldRender = node->calculateShouldRender(_viewFrustum);
432 432
433 node->setShouldRender(shouldRender);433 node->setShouldRender(shouldRender);
434 // let children figure out their renderness434 // let children figure out their renderness
435 if (!node->isLeaf()) {435 if (!node->isLeaf()) {
@@ -646,6 +646,18 @@ void VoxelSystem::init() { · 210 unmodified lines
646 _initialized = true;646 _initialized = true;
647}647}
648 648
649void VoxelSystem::changeTree(VoxelTree* newTree) {
650 disconnect(_tree, 0, this, 0);
651
652 _tree = newTree;
653 _tree->setDirtyBit();
654
655 connect(_tree, SIGNAL(importSize(float,float,float)), SIGNAL(importSize(float,float,float)));
656 connect(_tree, SIGNAL(importProgress(int)), SIGNAL(importProgress(int)));
657
658 setupNewVoxelsForDrawing();
659}
660
649void VoxelSystem::updateFullVBOs() {661void VoxelSystem::updateFullVBOs() {
650 updateVBOSegment(0, _voxelsInReadArrays);662 updateVBOSegment(0, _voxelsInReadArrays);
651 663