diff options
| author | Oz Linden <oz@lindenlab.com> | 2011-06-17 17:32:28 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2011-06-17 17:32:28 -0400 |
| commit | 068c6d45099411d7827db3e50d9c91331fa5c189 (patch) | |
| tree | c46cce78e6db0d87c1d9b0da9229ea0cf1d727de /indra/newview/llfloatermodelwizard.cpp | |
| parent | 5e5be51edebf0fb6a59d4907c9fcaac1b1667ac4 (diff) | |
| parent | 806b11c5720e1bd9e9764fcfd896436b8385e8b2 (diff) | |
merge mesh branch changes (storm-1390)
Diffstat (limited to 'indra/newview/llfloatermodelwizard.cpp')
| -rw-r--r-- | indra/newview/llfloatermodelwizard.cpp | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/indra/newview/llfloatermodelwizard.cpp b/indra/newview/llfloatermodelwizard.cpp index faf81dbc5c..707c8288df 100644 --- a/indra/newview/llfloatermodelwizard.cpp +++ b/indra/newview/llfloatermodelwizard.cpp @@ -422,8 +422,11 @@ void LLFloaterModelWizard::executePhysicsStage(std::string stage_name) { LLModel* mdl = sInstance->mModelPreview->mModel[LLModel::LOD_PHYSICS][i]; DecompRequest* request = new DecompRequest(stage_name, mdl); - sInstance->mCurRequest.insert(request); - gMeshRepo.mDecompThread->submitRequest(request); + if(request->isValid()) + { + sInstance->mCurRequest.insert(request); + gMeshRepo.mDecompThread->submitRequest(request); + } } } } @@ -438,35 +441,7 @@ LLFloaterModelWizard::DecompRequest::DecompRequest(const std::string& stage, LLM mParams = sInstance->mDecompParams; //copy out positions and indices - if (mdl) - { - U16 index_offset = 0; - - mPositions.clear(); - mIndices.clear(); - - //queue up vertex positions and indices - for (S32 i = 0; i < mdl->getNumVolumeFaces(); ++i) - { - const LLVolumeFace& face = mdl->getVolumeFace(i); - if (mPositions.size() + face.mNumVertices > 65535) - { - continue; - } - - for (U32 j = 0; j < face.mNumVertices; ++j) - { - mPositions.push_back(LLVector3(face.mPositions[j].getF32ptr())); - } - - for (U32 j = 0; j < face.mNumIndices; ++j) - { - mIndices.push_back(face.mIndices[j]+index_offset); - } - - index_offset += face.mNumVertices; - } - } + assignData(mdl) ; } |
