Showing the changes to interface/src/VoxelSystem.cpp (1 of 2 files). Show all
Unified · Split
| @@ -55,7 +55,7 @@ GLubyte identityIndicesRight[] = { 1, 2, 6, 1, 6, 5 }; · 54 unmodified lines | |||
| 55 | GLubyte identityIndicesFront[] = { 0, 2, 1, 0, 3, 2 }; | 55 | GLubyte identityIndicesFront[] = { 0, 2, 1, 0, 3, 2 }; |
| 56 | GLubyte identityIndicesBack[] = { 4, 5, 6, 4, 6, 7 }; | 56 | GLubyte identityIndicesBack[] = { 4, 5, 6, 4, 6, 7 }; |
| 57 | 57 | ||
| 58 | VoxelSystem::VoxelSystem(float treeScale, int maxVoxels) | 58 | VoxelSystem::VoxelSystem(float treeScale, int maxVoxels, VoxelTree* tree) |
| 59 | : NodeData(), | 59 | : NodeData(), |
| 60 | _treeScale(treeScale), | 60 | _treeScale(treeScale), |
| 61 | _maxVoxels(maxVoxels), | 61 | _maxVoxels(maxVoxels), |
| @@ -71,7 +71,7 @@ VoxelSystem::VoxelSystem(float treeScale, int maxVoxels) · 9 unmodified lines | |||
| 71 | _voxelsInReadArrays = _voxelsInWriteArrays = _voxelsUpdated = 0; | 71 | _voxelsInReadArrays = _voxelsInWriteArrays = _voxelsUpdated = 0; |
| 72 | _writeRenderFullVBO = true; | 72 | _writeRenderFullVBO = true; |
| 73 | _readRenderFullVBO = true; | 73 | _readRenderFullVBO = true; |
| 74 | _tree = new VoxelTree(); | 74 | _tree = (tree) ? tree : new VoxelTree(); |
| 75 | 75 | ||
| 76 | _tree->getRoot()->setVoxelSystem(this); | 76 | _tree->getRoot()->setVoxelSystem(this); |
| 77 | 77 | ||