mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 06:53:46 +02:00
fix bug where some parts of scene weren't sent, turned out it was in the octal code not fitting voxels getting ignored
This commit is contained in:
parent
32e770d2b7
commit
0cd269632e
3 changed files with 14 additions and 2 deletions
|
@ -375,6 +375,13 @@ int VoxelSendThread::deepestLevelVoxelDistributor(Node* node, VoxelNodeData* nod
|
|||
_myServer->getServerTree().lockForRead();
|
||||
nodeData->stats.encodeStarted();
|
||||
bytesWritten = _myServer->getServerTree().encodeTreeBitstream(subTree, &_tempPacket, nodeData->nodeBag, params);
|
||||
|
||||
if (_tempPacket.hasContent() && bytesWritten == 0 && _tempPacket.getFinalizedSize() < 1450) {
|
||||
printf(">>>>>>>>>>>>>>> got bytesWritten==0 _tempPacket.getFinalizedSize()=%d <<<<<<<<<<<<<<<\n",
|
||||
_tempPacket.getFinalizedSize());
|
||||
|
||||
}
|
||||
|
||||
if (bytesWritten > 0) {
|
||||
_encodedSomething = true;
|
||||
}
|
||||
|
|
|
@ -6,10 +6,14 @@
|
|||
//
|
||||
// TO DO:
|
||||
//
|
||||
// * further testing of compression to determine optimal configuration for performance and compression
|
||||
//
|
||||
// * add stats tracking for number of bytes of octal code, bitmasks, and colors in a packet.
|
||||
//
|
||||
// * determine why we sometimes don't fill packets very well (rarely) mid-scene... sometimes it appears as if
|
||||
// the "next node" would encode with more bytes than can fit in the remainder of the packet. this might be
|
||||
// several tens or hundreds of bytes, but theoretically other voxels would have fit. This happens in the 0100
|
||||
// scene a couple times.
|
||||
//
|
||||
// * further testing of compression to determine optimal configuration for performance and compression
|
||||
// * improve semantics for "reshuffle" - current approach will work for now and with compression
|
||||
// but wouldn't work with RLE because the colors in the levels would get reordered and RLE would need
|
||||
// to be recalculated
|
||||
|
|
|
@ -1062,6 +1062,7 @@ int VoxelTree::encodeTreeBitstream(VoxelNode* node,
|
|||
// If the octalcode couldn't fit, then we can return, because no nodes below us will fit...
|
||||
if (!roomForOctalCode) {
|
||||
doneEncoding(node);
|
||||
bag.insert(node); // add the node back to the bag so it will eventually get included
|
||||
return bytesWritten;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue