Showing the changes to interface/src/VoxelSystem.cpp (1 of 4 files). Show all
Unified · Split
| @@ -101,6 +101,11 @@ int VoxelSystem::parseData(unsigned char* sourceBuffer, int numBytes) { · 100 unmodified lines | |||
| 101 | double start = usecTimestampNow(); | 101 | double start = usecTimestampNow(); |
| 102 | // ask the VoxelTree to read the bitstream into the tree | 102 | // ask the VoxelTree to read the bitstream into the tree |
| 103 | _tree->readBitstreamToTree(voxelData, numBytes - 1); | 103 | _tree->readBitstreamToTree(voxelData, numBytes - 1); |
| 104 | if (_renderWarningsOn && _tree->getNodesChangedFromBitstream()) { | ||
| 105 | printLog("readBitstreamToTree()... getNodesChangedFromBitstream=%ld _tree->isDirty()=%s \n", | ||
| 106 | _tree->getNodesChangedFromBitstream(), (_tree->isDirty() ? "yes" : "no") ); | ||
| 107 | } | ||
| 108 | |||
| 104 | double end = usecTimestampNow(); | 109 | double end = usecTimestampNow(); |
| 105 | double elapsedmsec = (end - start)/1000.0; | 110 | double elapsedmsec = (end - start)/1000.0; |
| 106 | if (_renderWarningsOn && elapsedmsec > 1) { | 111 | if (_renderWarningsOn && elapsedmsec > 1) { |
| @@ -178,7 +183,7 @@ void VoxelSystem::setupNewVoxelsForDrawing() { · 71 unmodified lines | |||
| 178 | 183 | ||
| 179 | void VoxelSystem::copyWrittenDataToReadArrays() { | 184 | void VoxelSystem::copyWrittenDataToReadArrays() { |
| 180 | double start = usecTimestampNow(); | 185 | double start = usecTimestampNow(); |
| 181 | if (_voxelsDirty) { | 186 | if (_voxelsDirty && _voxelsUpdated) { |
| 182 | // lock on the buffer write lock so we can't modify the data when the GPU is reading it | 187 | // lock on the buffer write lock so we can't modify the data when the GPU is reading it |
| 183 | pthread_mutex_lock(&_bufferWriteLock); | 188 | pthread_mutex_lock(&_bufferWriteLock); |
| 184 | int bytesOfVertices = (_voxelsInArrays * VERTEX_POINTS_PER_VOXEL) * sizeof(GLfloat); | 189 | int bytesOfVertices = (_voxelsInArrays * VERTEX_POINTS_PER_VOXEL) * sizeof(GLfloat); |