mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-16 00:56:50 +02:00
removed some debugging
This commit is contained in:
parent
b9429eeb1e
commit
c25199c80a
1 changed files with 1 additions and 11 deletions
|
@ -1933,33 +1933,23 @@ void VoxelTree::writeToSVOFile(const char* fileName, VoxelNode* node) {
|
||||||
|
|
||||||
int packetEndsAt = packet.getBytesInUse();
|
int packetEndsAt = packet.getBytesInUse();
|
||||||
|
|
||||||
printf("writeToSVOFile()... bytesWritten=%d\n",bytesWritten);
|
|
||||||
|
|
||||||
// if bytesWritten == 0, then it means that the subTree couldn't fit, and so we should reset the packet
|
// if bytesWritten == 0, then it means that the subTree couldn't fit, and so we should reset the packet
|
||||||
// and reinsert the node in our bag and try again...
|
// and reinsert the node in our bag and try again...
|
||||||
if (bytesWritten == 0) {
|
if (bytesWritten == 0) {
|
||||||
|
|
||||||
if (packet.getBytesInUse()) {
|
if (packet.getBytesInUse()) {
|
||||||
printf("writeToSVOFile()... WRITING %d bytes...\n", packet.getBytesInUse());
|
printf("writeToSVOFile()... WRITING %d bytes...\n", packet.getBytesInUse());
|
||||||
file.write((const char*)packet.getStartOfBuffer(), packet.getBytesInUse());
|
file.write((const char*)packet.getStartOfBuffer(), packet.getBytesInUse());
|
||||||
lastPacketWritten = true;
|
lastPacketWritten = true;
|
||||||
} else {
|
|
||||||
printf("writeToSVOFile()... ODD!!! NOTHING TO WRITE???\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("writeToSVOFile()... resetting packet...\n");
|
|
||||||
packet.reset(); // is there a better way to do this? could we fit more?
|
packet.reset(); // is there a better way to do this? could we fit more?
|
||||||
nodeBag.insert(subTree);
|
nodeBag.insert(subTree);
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
printf("writeToSVOFile()... PROCEEDING without resetting packet...\n");
|
|
||||||
lastPacketWritten = false;
|
lastPacketWritten = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// debug compare the buffer to the packet...
|
// debug compare the buffer to the packet...
|
||||||
bool debug = true;
|
bool debug = false;
|
||||||
if (debug) {
|
if (debug) {
|
||||||
if (bytesWritten > 0) {
|
if (bytesWritten > 0) {
|
||||||
unsigned char* packetCompare = packet.getStartOfBuffer() + packetStartsAt;
|
unsigned char* packetCompare = packet.getStartOfBuffer() + packetStartsAt;
|
||||||
|
|
Loading…
Reference in a new issue