Showing the changes to interface/src/VoxelSystem.cpp (1 of 10 files). Show all
Unified · Split
| @@ -420,7 +420,7 @@ int VoxelSystem::newTreeToArrays(VoxelNode* node) { · 419 unmodified lines | |||
| 420 | bool shouldRender = false; // assume we don't need to render it | 420 | bool shouldRender = false; // assume we don't need to render it |
| 421 | // if it's colored, we might need to render it! | 421 | // if it's colored, we might need to render it! |
| 422 | shouldRender = node->calculateShouldRender(_viewFrustum); | 422 | shouldRender = node->calculateShouldRender(_viewFrustum); |
| 423 | 423 | ||
| 424 | node->setShouldRender(shouldRender); | 424 | node->setShouldRender(shouldRender); |
| 425 | // let children figure out their renderness | 425 | // let children figure out their renderness |
| 426 | if (!node->isLeaf()) { | 426 | if (!node->isLeaf()) { |
| @@ -631,6 +631,18 @@ void VoxelSystem::init() { · 204 unmodified lines | |||
| 631 | _perlinModulateProgram->release(); | 631 | _perlinModulateProgram->release(); |
| 632 | } | 632 | } |
| 633 | 633 | ||
| 634 | void VoxelSystem::changeTree(VoxelTree* newTree) { | ||
| 635 | disconnect(_tree, 0, this, 0); | ||
| 636 | |||
| 637 | _tree = newTree; | ||
| 638 | _tree->setDirtyBit(); | ||
| 639 | |||
| 640 | connect(_tree, SIGNAL(importSize(float,float,float)), SIGNAL(importSize(float,float,float))); | ||
| 641 | connect(_tree, SIGNAL(importProgress(int)), SIGNAL(importProgress(int))); | ||
| 642 | |||
| 643 | setupNewVoxelsForDrawing(); | ||
| 644 | } | ||
| 645 | |||
| 634 | void VoxelSystem::updateFullVBOs() { | 646 | void VoxelSystem::updateFullVBOs() { |
| 635 | updateVBOSegment(0, _voxelsInReadArrays); | 647 | updateVBOSegment(0, _voxelsInReadArrays); |
| 636 | 648 | ||