mirror of
https://github.com/overte-org/overte.git
synced 2025-06-23 07:59:35 +02:00
Fix voxel state machine
This commit is contained in:
parent
bf231dfc87
commit
5b12f42dd4
1 changed files with 9 additions and 1 deletions
|
@ -1099,6 +1099,10 @@ void RenderablePolyVoxEntityItem::compressVolumeDataAndSendEditPacket() {
|
||||||
voxelZSize = _voxelVolumeSize.z;
|
voxelZSize = _voxelVolumeSize.z;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
#ifdef WANT_DEBUG
|
||||||
|
qDebug() << "Compressing voxel and sending data packet";
|
||||||
|
#endif
|
||||||
|
|
||||||
QtConcurrent::run([voxelXSize, voxelYSize, voxelZSize, entity] {
|
QtConcurrent::run([voxelXSize, voxelYSize, voxelZSize, entity] {
|
||||||
auto polyVoxEntity = std::static_pointer_cast<RenderablePolyVoxEntityItem>(entity);
|
auto polyVoxEntity = std::static_pointer_cast<RenderablePolyVoxEntityItem>(entity);
|
||||||
QByteArray uncompressedData = polyVoxEntity->volDataToArray(voxelXSize, voxelYSize, voxelZSize);
|
QByteArray uncompressedData = polyVoxEntity->volDataToArray(voxelXSize, voxelYSize, voxelZSize);
|
||||||
|
@ -1386,7 +1390,11 @@ void RenderablePolyVoxEntityItem::setMesh(graphics::MeshPointer mesh) {
|
||||||
}
|
}
|
||||||
_shapeReady = false;
|
_shapeReady = false;
|
||||||
_mesh = mesh;
|
_mesh = mesh;
|
||||||
_state = PolyVoxState::BakingMeshFinished;
|
if (_state == PolyVoxState::BakingMeshNoCompress) {
|
||||||
|
_state = PolyVoxState::BakingMeshNoCompressFinished;
|
||||||
|
} else {
|
||||||
|
_state = PolyVoxState::BakingMeshFinished;
|
||||||
|
}
|
||||||
_meshReady = true;
|
_meshReady = true;
|
||||||
startUpdates();
|
startUpdates();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue