diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-12-01 22:13:17 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-12-01 22:13:17 +0200 |
commit | 06c94c83feac1f7c3ee3e71d9654f6acd8679f24 (patch) | |
tree | 9d6ba42e1b5905ef4474719cacc4d5adc0aebd23 | |
parent | 3f82f7ce3d4fb51407f366b2ad2f15d990de40b2 (diff) |
SL-16420 Upload's physics LODs are broken in preview
-rw-r--r-- | indra/newview/llmodelpreview.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index 566a89e24d..1ce15e04da 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -2661,6 +2661,8 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights) *(index_strider++) = vf.mIndices[i]; } + vb->flush(); + mVertexBuffer[lod][mdl].push_back(vb); vertex_count += num_vertices; @@ -3136,6 +3138,11 @@ BOOL LLModelPreview::render() genBuffers(mPreviewLOD, skin_weight); } + if (physics && mVertexBuffer[LLModel::LOD_PHYSICS].empty()) + { + genBuffers(LLModel::LOD_PHYSICS, false); + } + if (!skin_weight) { for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter) @@ -3290,11 +3297,6 @@ BOOL LLModelPreview::render() if (render_mesh) { - if (mVertexBuffer[LLModel::LOD_PHYSICS].empty()) - { - genBuffers(LLModel::LOD_PHYSICS, false); - } - U32 num_models = mVertexBuffer[LLModel::LOD_PHYSICS][model].size(); if (pass > 0){ for (U32 i = 0; i < num_models; ++i) @@ -3358,11 +3360,6 @@ BOOL LLModelPreview::render() if (physics.mHull.empty()) { - if (mVertexBuffer[LLModel::LOD_PHYSICS].empty()) - { - genBuffers(LLModel::LOD_PHYSICS, false); - } - U32 num_models = mVertexBuffer[LLModel::LOD_PHYSICS][model].size(); for (U32 v = 0; v < num_models; ++v) { |