mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-26 13:35:09 +02:00
fix voxel randomly disappearing bug
This commit is contained in:
parent
a8a634752a
commit
a960330f34
1 changed files with 8 additions and 10 deletions
|
@ -925,7 +925,6 @@ int VoxelSystem::newTreeToArrays(VoxelTreeElement* voxel) {
|
||||||
// for either voxels that should not render, or those that should render and are in view
|
// for either voxels that should not render, or those that should render and are in view
|
||||||
// update their geometry in the array.if the voxel "should render" but is not in view, then
|
// update their geometry in the array.if the voxel "should render" but is not in view, then
|
||||||
// it actually doesn't need to be rendered
|
// it actually doesn't need to be rendered
|
||||||
if (!shouldRender || voxel->isInView(*_viewFrustum)) {
|
|
||||||
if (_writeRenderFullVBO) {
|
if (_writeRenderFullVBO) {
|
||||||
const bool DONT_REUSE_INDEX = false;
|
const bool DONT_REUSE_INDEX = false;
|
||||||
const bool FORCE_REDRAW = true;
|
const bool FORCE_REDRAW = true;
|
||||||
|
@ -935,7 +934,6 @@ int VoxelSystem::newTreeToArrays(VoxelTreeElement* voxel) {
|
||||||
const bool DONT_FORCE_REDRAW = false;
|
const bool DONT_FORCE_REDRAW = false;
|
||||||
voxelsUpdated += updateNodeInArrays(voxel, REUSE_INDEX, DONT_FORCE_REDRAW);
|
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.
|
||||||
|
|
||||||
return voxelsUpdated;
|
return voxelsUpdated;
|
||||||
|
|
Loading…
Reference in a new issue