diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llvieweroctree.cpp | 5 | ||||
-rwxr-xr-x | indra/newview/llviewerregion.cpp | 15 |
2 files changed, 13 insertions, 7 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index ef802f2651..3646133e91 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -36,7 +36,7 @@ //----------------------------------------------------------------------------------- //static variables definitions //----------------------------------------------------------------------------------- -U32 LLViewerOctreeEntryData::sCurVisible = 0; +U32 LLViewerOctreeEntryData::sCurVisible = 10; //reserve the low numbers for special use. BOOL LLViewerOctreeDebug::sInDebug = FALSE; static LLTrace::CountStatHandle<S32> sOcclusionQueries("occlusion_queries", "Number of occlusion queries executed"), @@ -234,7 +234,8 @@ LLViewerOctreeEntry::LLViewerOctreeEntry() : LLTrace::MemTrackable<LLViewerOctreeEntry, 16>("LLViewerOctreeEntry"), mGroup(NULL), mBinRadius(0.f), - mBinIndex(-1) + mBinIndex(-1), + mVisible(0) { mPositionGroup.clear(); mExtents[0].clear(); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index d619a2af8b..23660dd3ce 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1059,8 +1059,13 @@ F32 LLViewerRegion::updateVisibleEntries(F32 max_time) return max_time; } - LLTimer update_timer; + if(!sNewObjectCreationThrottle) + { + return max_time; + } + LLTimer update_timer; + const F32 LARGE_SCENE_CONTRIBUTION = 100.f; //a large number to force to load the object. const LLVector3 camera_origin = LLViewerCamera::getInstance()->getOrigin(); const U32 cur_frame = LLViewerOctreeEntryData::getCurrentFrame(); @@ -1145,7 +1150,7 @@ F32 LLViewerRegion::updateVisibleEntries(F32 max_time) } vo_entry->calcSceneContribution(camera_origin, needs_update, last_update); - mImpl->mWaitingList.insert(vo_entry); + mImpl->mWaitingList.insert(vo_entry); } } } @@ -1171,7 +1176,7 @@ F32 LLViewerRegion::createVisibleObjects(F32 max_time) { mImpl->mVOCachePartition->setCullHistory(FALSE); return max_time; - } + } //object projected area threshold F32 pixel_meter_ratio = LLViewerCamera::getInstance()->getPixelMeterRatio(); @@ -1184,8 +1189,8 @@ F32 LLViewerRegion::createVisibleObjects(F32 max_time) for(LLVOCacheEntry::vocache_entry_priority_list_t::iterator iter = mImpl->mWaitingList.begin(); iter != mImpl->mWaitingList.end(); ++iter) { - LLVOCacheEntry* vo_entry = *iter; - + LLVOCacheEntry* vo_entry = *iter; + if(vo_entry->getSceneContribution() < projection_threshold) { break; |