summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-08-02 14:59:30 -0600
committerXiaohong Bao <bao@lindenlab.com>2011-08-02 14:59:30 -0600
commit74d5b08dea093b4728c79cf81fafc0d40c392b10 (patch)
tree46c8dc0f194234054782f2110fe1c3fe747a57d2 /indra
parentfdcf43e0b3482eace09b5d2a1dbd9ff0b4dffdc2 (diff)
fix for SH-2144: [PUBLIC] Hi-resolution model that don't upload.
Diffstat (limited to 'indra')
-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()