diff options
author | Steven Bennetts <steve@lindenlab.com> | 2007-03-02 21:25:50 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2007-03-02 21:25:50 +0000 |
commit | 4dabd9c0472deb49573fdafef2fa413e59703f19 (patch) | |
tree | 06c680d6a2047e03838d6548bccd26c7baf9d652 /indra/newview/llviewerobjectlist.cpp | |
parent | d4462963c6ba5db2088723bbedc7b60f1184c594 (diff) |
merge release@58699 beta-1-14-0@58707 -> release
Diffstat (limited to 'indra/newview/llviewerobjectlist.cpp')
-rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 66 |
1 files changed, 44 insertions, 22 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index f4c733299f..68193604bb 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -731,6 +731,15 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) mNumVisCulledStat.addValue(mNumVisCulled); } +void LLViewerObjectList::clearDebugText() +{ + for (S32 i = 0; i < mObjects.count(); i++) + { + mObjects[i]->setDebugText(""); + } +} + + void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) { LLMemType mt(LLMemType::MTYPE_OBJECT); @@ -1052,7 +1061,15 @@ U32 LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, BOOL pick_parce mSelectPickList.clear(); std::vector<LLDrawable*> pick_drawables; - gPipeline.mObjectPartition->cull(camera, &pick_drawables, TRUE); + + for (i = 0; i < LLPipeline::NUM_PARTITIONS-1; i++) + { + LLSpatialPartition* part = gPipeline.getSpatialPartition(i); + if (part) + { + part->cull(camera, &pick_drawables, TRUE); + } + } for (std::vector<LLDrawable*>::iterator iter = pick_drawables.begin(); iter != pick_drawables.end(); iter++) @@ -1074,10 +1091,10 @@ U32 LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, BOOL pick_parce LLHUDText::addPickable(mSelectPickList); - for (objectp = (LLVOAvatar*)LLCharacter::sInstances.getFirstData(); - objectp; - objectp = (LLVOAvatar*)LLCharacter::sInstances.getNextData()) + for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); + iter != LLCharacter::sInstances.end(); ++iter) { + objectp = (LLVOAvatar*) *iter; if (!objectp->isDead()) { if (objectp->mDrawable.notNull() && objectp->mDrawable->isVisible()) @@ -1098,7 +1115,7 @@ U32 LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, BOOL pick_parce { if (attachmentp->getIsHUDAttachment()) { - LLViewerObject* objectp = attachmentp->getObject(0); + LLViewerObject* objectp = attachmentp->getObject(); if (objectp) { mSelectPickList.insert(objectp); @@ -1114,32 +1131,36 @@ U32 LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, BOOL pick_parce } } } - + S32 num_pickables = (S32)mSelectPickList.size() + LLHUDIcon::getNumInstances(); - S32 step = (0x000fffff - GL_NAME_INDEX_OFFSET) / num_pickables; - - std::set<LLViewerObject*>::iterator pick_it; - i = 0; - for (pick_it = mSelectPickList.begin(); pick_it != mSelectPickList.end();) + if (num_pickables != 0) { - LLViewerObject* objp = (*pick_it); - if (!objp || objp->isDead() || !objp->mbCanSelect) + S32 step = (0x000fffff - GL_NAME_INDEX_OFFSET) / num_pickables; + + std::set<LLViewerObject*>::iterator pick_it; + i = 0; + for (pick_it = mSelectPickList.begin(); pick_it != mSelectPickList.end();) { - mSelectPickList.erase(pick_it++); - continue; + LLViewerObject* objp = (*pick_it); + if (!objp || objp->isDead() || !objp->mbCanSelect) + { + mSelectPickList.erase(pick_it++); + continue; + } + + objp->mGLName = (i * step) + GL_NAME_INDEX_OFFSET; + i++; + ++pick_it; } - objp->mGLName = (i * step) + GL_NAME_INDEX_OFFSET; - i++; - ++pick_it; + LLHUDIcon::generatePickIDs(i * step, step); + + // At this point, we should only have live drawables/viewer objects + gPipeline.renderForSelect(mSelectPickList); } - - LLHUDIcon::generatePickIDs(i * step, step); } - // At this point, we should only have live drawables/viewer objects - gPipeline.renderForSelect(); // // Render pass for selected objects // @@ -1432,6 +1453,7 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) } } +//////////////////////////////////////////////////////////////////////////// LLViewerObjectList::OrphanInfo::OrphanInfo() { |