SL-17121 Revert "SL-15940 Remove ability to set zero triangle limit"

This reverts commit b45c0e3ed9.
meow-7.2.2
Andrey Kleshchev 2022-03-31 22:52:56 +03:00
parent 3687b29200
commit 7f0e62ea9e
2 changed files with 1 additions and 10 deletions

View File

@ -180,7 +180,6 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp)
mPreviewLOD = 0;
mModelLoader = NULL;
mMaxTriangleLimit = 0;
mMinTriangleLimit = 0;
mDirty = false;
mGenLOD = false;
mLoading = false;
@ -1643,7 +1642,6 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
}
mMaxTriangleLimit = base_triangle_count;
mMinTriangleLimit = mBaseModel.size();
// Build models
@ -1668,7 +1666,7 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
}
}
mRequestedTriangleCount[lod] = llmax(mMinTriangleLimit, (S32)triangle_limit);
mRequestedTriangleCount[lod] = triangle_limit;
mRequestedErrorThreshold[lod] = lod_error_threshold;
mRequestedLoDMode[lod] = lod_mode;
@ -2003,7 +2001,6 @@ void LLModelPreview::updateStatusMessages()
if (mMaxTriangleLimit == 0)
{
mMaxTriangleLimit = total_tris[LLModel::LOD_HIGH];
mMinTriangleLimit = mUploadData.size();
}
mHasDegenerate = false;
@ -2506,7 +2503,6 @@ void LLModelPreview::updateLodControls(S32 lod)
LLSpinCtrl* limit = mFMP->getChild<LLSpinCtrl>("lod_triangle_limit_" + lod_name[lod]);
limit->setMaxValue(mMaxTriangleLimit);
limit->setMinValue(mMinTriangleLimit);
limit->forceSetValue(mRequestedTriangleCount[lod]);
threshold->forceSetValue(mRequestedErrorThreshold[lod]);
@ -2519,7 +2515,6 @@ void LLModelPreview::updateLodControls(S32 lod)
threshold->setVisible(false);
limit->setMaxValue(mMaxTriangleLimit);
limit->setMinValue(mMinTriangleLimit);
limit->setIncrement(llmax((U32)1, mMaxTriangleLimit / 32));
}
else

View File

@ -290,10 +290,6 @@ protected:
// Amount of triangles in original(base) model
U32 mMaxTriangleLimit;
// Minimum amount of allowed triangles in lod for spin cntrl.
// Leave at least one triangle per model.
S32 mMinTriangleLimit;
LLMeshUploadThread::instance_list mUploadData;
std::set<LLViewerFetchedTexture * > mTextureSet;