diff options
author | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
commit | cd17687f01420952712a500107e0f93e7ab8d5f8 (patch) | |
tree | ce48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llviewerobjectlist.cpp | |
parent | Second Life viewer sources 1.19.0.5 (diff) | |
download | meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2 meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz |
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/newview/llviewerobjectlist.cpp')
-rw-r--r-- | linden/indra/newview/llviewerobjectlist.cpp | 53 |
1 files changed, 24 insertions, 29 deletions
diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp index df90954..612baf1 100644 --- a/linden/indra/newview/llviewerobjectlist.cpp +++ b/linden/indra/newview/llviewerobjectlist.cpp | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "message.h" | 36 | #include "message.h" |
37 | #include "timing.h" | 37 | #include "timing.h" |
38 | #include "llfasttimer.h" | 38 | #include "llfasttimer.h" |
39 | #include "llglimmediate.h" | ||
39 | 40 | ||
40 | #include "llviewercontrol.h" | 41 | #include "llviewercontrol.h" |
41 | #include "llface.h" | 42 | #include "llface.h" |
@@ -45,6 +46,7 @@ | |||
45 | #include "llnetmap.h" | 46 | #include "llnetmap.h" |
46 | #include "llagent.h" | 47 | #include "llagent.h" |
47 | #include "pipeline.h" | 48 | #include "pipeline.h" |
49 | #include "llspatialpartition.h" | ||
48 | #include "llhoverview.h" | 50 | #include "llhoverview.h" |
49 | #include "llworld.h" | 51 | #include "llworld.h" |
50 | #include "llstring.h" | 52 | #include "llstring.h" |
@@ -206,30 +208,28 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, | |||
206 | 208 | ||
207 | // ignore returned flags | 209 | // ignore returned flags |
208 | objectp->processUpdateMessage(msg, user_data, i, update_type, dpp); | 210 | objectp->processUpdateMessage(msg, user_data, i, update_type, dpp); |
209 | 211 | ||
210 | if (objectp->isDead()) | 212 | if (objectp->isDead()) |
211 | { | 213 | { |
212 | // The update failed | 214 | // The update failed |
213 | return; | 215 | return; |
214 | } | 216 | } |
215 | updateActive(objectp); | ||
216 | |||
217 | // Also sets the approx. pixel area | ||
218 | objectp->setPixelAreaAndAngle(gAgent); | ||
219 | 217 | ||
220 | // Update the image levels of textures for this object. | 218 | updateActive(objectp); |
221 | objectp->updateTextures(gAgent); | ||
222 | 219 | ||
223 | if (just_created) | 220 | if (just_created) |
224 | { | 221 | { |
225 | gPipeline.addObject(objectp); | 222 | gPipeline.addObject(objectp); |
226 | } | 223 | } |
227 | 224 | ||
225 | // Also sets the approx. pixel area | ||
226 | objectp->setPixelAreaAndAngle(gAgent); | ||
227 | |||
228 | // RN: this must be called after we have a drawable | 228 | // RN: this must be called after we have a drawable |
229 | // (from gPipeline.addObject) | 229 | // (from gPipeline.addObject) |
230 | // so that the drawable parent is set properly | 230 | // so that the drawable parent is set properly |
231 | findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort()); | 231 | findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort()); |
232 | 232 | ||
233 | // If we're just wandering around, don't create new objects selected. | 233 | // If we're just wandering around, don't create new objects selected. |
234 | if (just_created | 234 | if (just_created |
235 | && update_type != OUT_TERSE_IMPROVED | 235 | && update_type != OUT_TERSE_IMPROVED |
@@ -528,18 +528,6 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys, | |||
528 | processObjectUpdate(mesgsys, user_data, update_type, true, false); | 528 | processObjectUpdate(mesgsys, user_data, update_type, true, false); |
529 | } | 529 | } |
530 | 530 | ||
531 | void LLViewerObjectList::relightAllObjects() | ||
532 | { | ||
533 | for (S32 i = 0; i < mObjects.count(); i++) | ||
534 | { | ||
535 | LLDrawable *drawable = mObjects[i]->mDrawable; | ||
536 | if (drawable) | ||
537 | { | ||
538 | gPipeline.markRelight(drawable); | ||
539 | } | ||
540 | } | ||
541 | } | ||
542 | |||
543 | void LLViewerObjectList::dirtyAllObjectInventory() | 531 | void LLViewerObjectList::dirtyAllObjectInventory() |
544 | { | 532 | { |
545 | S32 count = mObjects.count(); | 533 | S32 count = mObjects.count(); |
@@ -1008,7 +996,7 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset) | |||
1008 | } | 996 | } |
1009 | 997 | ||
1010 | gPipeline.shiftObjects(offset); | 998 | gPipeline.shiftObjects(offset); |
1011 | gWorldPointer->mPartSim.shift(offset); | 999 | gWorldp->shiftRegions(offset); |
1012 | } | 1000 | } |
1013 | 1001 | ||
1014 | void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) | 1002 | void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) |
@@ -1109,12 +1097,17 @@ U32 LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, BOOL pick_parce | |||
1109 | 1097 | ||
1110 | std::vector<LLDrawable*> pick_drawables; | 1098 | std::vector<LLDrawable*> pick_drawables; |
1111 | 1099 | ||
1112 | for (i = 0; i < LLPipeline::NUM_PARTITIONS-1; i++) | 1100 | for (LLWorld::region_list_t::iterator iter = gWorldp->getRegionList().begin(); |
1101 | iter != gWorldp->getRegionList().end(); ++iter) | ||
1113 | { | 1102 | { |
1114 | LLSpatialPartition* part = gPipeline.getSpatialPartition(i); | 1103 | LLViewerRegion* region = *iter; |
1115 | if (part) | 1104 | for (U32 i = 0; i < LLViewerRegion::NUM_PARTITIONS; i++) |
1116 | { | 1105 | { |
1117 | part->cull(camera, &pick_drawables, TRUE); | 1106 | LLSpatialPartition* part = region->getSpatialPartition(i); |
1107 | if (part) | ||
1108 | { | ||
1109 | part->cull(camera, &pick_drawables, TRUE); | ||
1110 | } | ||
1118 | } | 1111 | } |
1119 | } | 1112 | } |
1120 | 1113 | ||
@@ -1157,11 +1150,11 @@ U32 LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, BOOL pick_parce | |||
1157 | LLVOAvatar* avatarp = gAgent.getAvatarObject(); | 1150 | LLVOAvatar* avatarp = gAgent.getAvatarObject(); |
1158 | if (avatarp) | 1151 | if (avatarp) |
1159 | { | 1152 | { |
1160 | LLViewerJointAttachment* attachmentp; | 1153 | for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin(); |
1161 | for (attachmentp = avatarp->mAttachmentPoints.getFirstData(); | 1154 | iter != avatarp->mAttachmentPoints.end(); ) |
1162 | attachmentp; | ||
1163 | attachmentp = avatarp->mAttachmentPoints.getNextData()) | ||
1164 | { | 1155 | { |
1156 | LLVOAvatar::attachment_map_t::iterator curiter = iter++; | ||
1157 | LLViewerJointAttachment* attachmentp = curiter->second; | ||
1165 | if (attachmentp->getIsHUDAttachment()) | 1158 | if (attachmentp->getIsHUDAttachment()) |
1166 | { | 1159 | { |
1167 | LLViewerObject* objectp = attachmentp->getObject(); | 1160 | LLViewerObject* objectp = attachmentp->getObject(); |
@@ -1213,10 +1206,12 @@ U32 LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, BOOL pick_parce | |||
1213 | // | 1206 | // |
1214 | // Render pass for selected objects | 1207 | // Render pass for selected objects |
1215 | // | 1208 | // |
1209 | gGL.start(); | ||
1216 | gViewerWindow->renderSelections( TRUE, pick_parcel_wall, FALSE ); | 1210 | gViewerWindow->renderSelections( TRUE, pick_parcel_wall, FALSE ); |
1217 | 1211 | ||
1218 | // render pickable ui elements, like names, etc. | 1212 | // render pickable ui elements, like names, etc. |
1219 | LLHUDObject::renderAllForSelect(); | 1213 | LLHUDObject::renderAllForSelect(); |
1214 | gGL.stop(); | ||
1220 | 1215 | ||
1221 | gRenderForSelect = FALSE; | 1216 | gRenderForSelect = FALSE; |
1222 | 1217 | ||