mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 12:38:27 +02:00
fix bug with dragonfly leaving trailing bits
This commit is contained in:
parent
718fa291cf
commit
79648ce656
1 changed files with 7 additions and 5 deletions
|
@ -1485,11 +1485,13 @@ int VoxelTree::encodeTreeBitstreamRecursion(VoxelNode* node, unsigned char* outp
|
||||||
if (params.includeColor && !params.includeExistsBits && childTreeBytesOut == 2) {
|
if (params.includeColor && !params.includeExistsBits && childTreeBytesOut == 2) {
|
||||||
childTreeBytesOut = 0; // this is the degenerate case of a tree with no colors and no child trees
|
childTreeBytesOut = 0; // this is the degenerate case of a tree with no colors and no child trees
|
||||||
}
|
}
|
||||||
// If we've asked for existBits, this is also true, except that the tree will output 3 bytes
|
// We used to try to collapse trees that didn't contain any data, but this does appear to create a problem
|
||||||
// NOTE: does this introduce a problem with detecting deletion??
|
// in detecting node deletion. So, I've commented this out but left it in here as a warning to anyone else
|
||||||
if (params.includeColor && params.includeExistsBits && childTreeBytesOut == 3) {
|
// about not attempting to add this optimization back in, without solving the node deletion case.
|
||||||
childTreeBytesOut = 0; // this is the degenerate case of a tree with no colors and no child trees
|
// We need to send these bitMasks in case the exists in tree bitmask is indicating the deletion of a tree
|
||||||
}
|
//if (params.includeColor && params.includeExistsBits && childTreeBytesOut == 3) {
|
||||||
|
// childTreeBytesOut = 0; // this is the degenerate case of a tree with no colors and no child trees
|
||||||
|
//}
|
||||||
|
|
||||||
bytesAtThisLevel += childTreeBytesOut;
|
bytesAtThisLevel += childTreeBytesOut;
|
||||||
availableBytes -= childTreeBytesOut;
|
availableBytes -= childTreeBytesOut;
|
||||||
|
|
Loading…
Reference in a new issue