mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:03:53 +02:00
limit size of polyvox data property to below MTU
This commit is contained in:
parent
3af916e27e
commit
429cc631f3
2 changed files with 9 additions and 3 deletions
|
@ -39,3 +39,5 @@ function keyReleaseEvent(event) {
|
|||
|
||||
|
||||
Controller.mousePressEvent.connect(mousePressEvent);
|
||||
Controller.keyPressEvent.connect(keyPressEvent);
|
||||
Controller.keyReleaseEvent.connect(keyReleaseEvent);
|
||||
|
|
|
@ -289,8 +289,12 @@ void RenderablePolyVoxEntityItem::compressVolumeData() {
|
|||
}
|
||||
}
|
||||
|
||||
_voxelData = qCompress(uncompressedData, 9);
|
||||
qDebug() << "-------------- voxel compresss ------------------------------------------------------------";
|
||||
QByteArray newVoxelData = qCompress(uncompressedData, 9);
|
||||
// HACK -- until we have a way to allow for properties larger than MTU, don't update.
|
||||
if (newVoxelData.length() < 1300) {
|
||||
_voxelData = newVoxelData;
|
||||
}
|
||||
qDebug() << "-------------- voxel compresss --------------";
|
||||
qDebug() << "raw-size =" << rawSize << " compressed-size =" << _voxelData.size();
|
||||
}
|
||||
|
||||
|
@ -312,6 +316,6 @@ void RenderablePolyVoxEntityItem::decompressVolumeData() {
|
|||
|
||||
_needsModelReload = true;
|
||||
|
||||
qDebug() << "--------------- voxel decompress -----------------------------------------------------------";
|
||||
qDebug() << "--------------- voxel decompress ---------------";
|
||||
qDebug() << "raw-size =" << rawSize << " compressed-size =" << _voxelData.size();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue