diff options
author | Loren Shih <seraph@lindenlab.com> | 2011-01-05 15:10:31 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2011-01-05 15:10:31 -0500 |
commit | df1c6d2a2e4ccfe7bd19a66ba95c4f7bc6edee5e (patch) | |
tree | 5d278369af1ba0ee4e75868b676b486009dbace2 /indra/newview/llmeshrepository.cpp | |
parent | 02783213455418a509994df16f9250b05753c183 (diff) | |
parent | dfddccd65da32ac2c11c9106c3995a3281d7c30d (diff) |
Automated merge from mesh-development
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-x | indra/newview/llmeshrepository.cpp | 17 |
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() ; |