don't recurse on octree elements that have not changed

This commit is contained in:
Stephen Birarda 2017-01-30 17:01:45 -08:00
parent 89cc6ac315
commit 1b1ae48650

View file

@ -1084,8 +1084,9 @@ int Octree::encodeTreeBitstreamRecursion(OctreeElementPointer element,
params.stopReason = EncodeBitstreamParams::WAS_IN_VIEW;
return bytesAtThisLevel;
}
}
// If we're not in delta sending mode, and we weren't asked to do a force send, and the voxel hasn't changed,
// If we're not in delta sending mode, and we weren't asked to do a force send, and the octree element hasn't changed,
// then we can also bail early and save bits
if (!params.forceSendScene && !params.deltaView &&
!element->hasChangedSince(params.lastQuerySent - CHANGE_FUDGE)) {
@ -1095,7 +1096,6 @@ int Octree::encodeTreeBitstreamRecursion(OctreeElementPointer element,
params.stopReason = EncodeBitstreamParams::NO_CHANGE;
return bytesAtThisLevel;
}
}
bool keepDiggingDeeper = true; // Assuming we're in view we have a great work ethic, we're always ready for more!