Merge branch 'master' of https://github.com/highfidelity/hifi into debone

This commit is contained in:
Andrzej Kapolka 2014-01-16 13:55:28 -08:00
commit cf40e76767

View file

@ -922,19 +922,15 @@ int VoxelSystem::newTreeToArrays(VoxelTreeElement* voxel) {
} }
} }
// for either voxels that should not render, or those that should render and are in view // update their geometry in the array. depending on our over all mode (fullVBO or not) we will reuse or not reuse the index
// update their geometry in the array.if the voxel "should render" but is not in view, then if (_writeRenderFullVBO) {
// it actually doesn't need to be rendered const bool DONT_REUSE_INDEX = false;
if (!shouldRender || voxel->isInView(*_viewFrustum)) { const bool FORCE_REDRAW = true;
if (_writeRenderFullVBO) { voxelsUpdated += updateNodeInArrays(voxel, DONT_REUSE_INDEX, FORCE_REDRAW);
const bool DONT_REUSE_INDEX = false; } else {
const bool FORCE_REDRAW = true; const bool REUSE_INDEX = true;
voxelsUpdated += updateNodeInArrays(voxel, DONT_REUSE_INDEX, FORCE_REDRAW); const bool DONT_FORCE_REDRAW = false;
} else { voxelsUpdated += updateNodeInArrays(voxel, REUSE_INDEX, DONT_FORCE_REDRAW);
const bool REUSE_INDEX = true;
const bool DONT_FORCE_REDRAW = false;
voxelsUpdated += updateNodeInArrays(voxel, REUSE_INDEX, DONT_FORCE_REDRAW);
}
} }
voxel->clearDirtyBit(); // clear the dirty bit, do this before we potentially delete things. voxel->clearDirtyBit(); // clear the dirty bit, do this before we potentially delete things.