mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:25:52 +02:00
limit size of polyvox data property to below MTU
This commit is contained in:
parent
429cc631f3
commit
14c68519f3
1 changed files with 7 additions and 3 deletions
|
@ -291,11 +291,15 @@ void RenderablePolyVoxEntityItem::compressVolumeData() {
|
||||||
|
|
||||||
QByteArray newVoxelData = qCompress(uncompressedData, 9);
|
QByteArray newVoxelData = qCompress(uncompressedData, 9);
|
||||||
// HACK -- until we have a way to allow for properties larger than MTU, don't update.
|
// HACK -- until we have a way to allow for properties larger than MTU, don't update.
|
||||||
if (newVoxelData.length() < 1300) {
|
if (newVoxelData.length() < 1200) {
|
||||||
_voxelData = newVoxelData;
|
_voxelData = newVoxelData;
|
||||||
|
qDebug() << "-------------- voxel compresss --------------";
|
||||||
|
qDebug() << "raw-size =" << rawSize << " compressed-size =" << newVoxelData.size();
|
||||||
|
} else {
|
||||||
|
qDebug() << "voxel data too large, reverting change.";
|
||||||
|
// revert
|
||||||
|
decompressVolumeData();
|
||||||
}
|
}
|
||||||
qDebug() << "-------------- voxel compresss --------------";
|
|
||||||
qDebug() << "raw-size =" << rawSize << " compressed-size =" << _voxelData.size();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue