summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-01-05 10:37:00 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-01-05 10:37:00 -0500
commita7db3b1786e8ac2fc1ee1da306689219ec6aae6a (patch)
tree47330782030dbf0ad74984a3afb2db13b69ef660 /indra/newview/llmeshrepository.cpp
parent3348a1ecc0854f249bf31c9dd65cc926b03c0c40 (diff)
parent875d36b083582a2c5afdc8f515f203f331269312 (diff)
merge
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-xindra/newview/llmeshrepository.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index dd2dcffc28..d2f76eceb0 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1450,17 +1450,21 @@ void LLMeshUploadThread::DecompRequest::completed()
mThread->mHullMap[mBaseModel] = mHull[0];
}
-void LLMeshUploadThread::run()
+//called in the main thread.
+void LLMeshUploadThread::preStart()
{
- mCurlRequest = new LLCurlRequest();
-
//build map of LLModel refs to instances for callbacks
for (instance_list::iterator iter = mInstanceList.begin(); iter != mInstanceList.end(); ++iter)
{
mInstance[iter->mModel].push_back(*iter);
}
+}
+
+void LLMeshUploadThread::run()
+{
+ mCurlRequest = new LLCurlRequest();
- std::set<LLPointer<LLViewerTexture> > textures;
+ std::set<LLViewerTexture* > textures;
//populate upload queue with relevant models
for (instance_map::iterator iter = mInstance.begin(); iter != mInstance.end(); ++iter)
@@ -1483,9 +1487,9 @@ void LLMeshUploadThread::run()
material_iter != instance.mMaterial.end(); ++material_iter)
{
- if (textures.find(material_iter->mDiffuseMap) == textures.end())
+ if (textures.find(material_iter->mDiffuseMap.get()) == textures.end())
{
- textures.insert(material_iter->mDiffuseMap);
+ textures.insert(material_iter->mDiffuseMap.get());
LLTextureUploadData data(material_iter->mDiffuseMap.get(), material_iter->mDiffuseMapLabel);
uploadTexture(data);
@@ -2148,6 +2152,7 @@ S32 LLMeshRepository::update()
for (S32 i = 0; i < size; ++i)
{
mUploads.push_back(mUploadWaitList[i]);
+ mUploadWaitList[i]->preStart() ;
mUploadWaitList[i]->start() ;
}
mUploadWaitList.clear() ;