summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorprep linden <prep@lindenlab.com>2011-08-02 17:02:14 -0400
committerprep linden <prep@lindenlab.com>2011-08-02 17:02:14 -0400
commit64a82a0d8ad3e85f29c56780775b0e9ab1fe0a58 (patch)
tree199622e5fcb4062254b738d1971e270c909be1fc /indra/newview
parentb9247373fbbbc45aeb82017feb2e6c687d65a5b5 (diff)
parent74d5b08dea093b4728c79cf81fafc0d40c392b10 (diff)
merge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llmeshrepository.cpp64
1 files changed, 35 insertions, 29 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 4b2fafccd4..7bbb7f2ecd 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1471,47 +1471,53 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
void LLMeshUploadThread::generateHulls()
{
+ bool has_valid_requests = false ;
+
for (instance_map::iterator iter = mInstance.begin(); iter != mInstance.end(); ++iter)
- {
- LLMeshUploadData data;
- data.mBaseModel = iter->first;
+ {
+ LLMeshUploadData data;
+ data.mBaseModel = iter->first;
- LLModelInstance& instance = *(iter->second.begin());
+ LLModelInstance& instance = *(iter->second.begin());
- for (S32 i = 0; i < 5; i++)
- {
- data.mModel[i] = instance.mLOD[i];
- }
+ for (S32 i = 0; i < 5; i++)
+ {
+ data.mModel[i] = instance.mLOD[i];
+ }
- //queue up models for hull generation
- LLModel* physics = NULL;
+ //queue up models for hull generation
+ LLModel* physics = NULL;
- if (data.mModel[LLModel::LOD_PHYSICS].notNull())
- {
- physics = data.mModel[LLModel::LOD_PHYSICS];
- }
- else if (data.mModel[LLModel::LOD_MEDIUM].notNull())
- {
- physics = data.mModel[LLModel::LOD_MEDIUM];
- }
- else
- {
- physics = data.mModel[LLModel::LOD_HIGH];
- }
+ if (data.mModel[LLModel::LOD_PHYSICS].notNull())
+ {
+ physics = data.mModel[LLModel::LOD_PHYSICS];
+ }
+ else if (data.mModel[LLModel::LOD_MEDIUM].notNull())
+ {
+ physics = data.mModel[LLModel::LOD_MEDIUM];
+ }
+ else
+ {
+ physics = data.mModel[LLModel::LOD_HIGH];
+ }
- llassert(physics != NULL);
+ llassert(physics != NULL);
- DecompRequest* request = new DecompRequest(physics, data.mBaseModel, this);
- if(request->isValid())
- {
- gMeshRepo.mDecompThread->submitRequest(request);
- }
+ DecompRequest* request = new DecompRequest(physics, data.mBaseModel, this);
+ if(request->isValid())
+ {
+ gMeshRepo.mDecompThread->submitRequest(request);
+ has_valid_requests = true ;
}
-
+ }
+
+ if(has_valid_requests)
+ {
while (!mPhysicsComplete)
{
apr_sleep(100);
}
+ }
}
void LLMeshUploadThread::doWholeModelUpload()