Automated merge with http://bitbucket.org/lindenlab/viewer-interesting
commit
62d40c8d85
|
|
@ -4015,6 +4015,7 @@ void LLAgent::teleportCancel()
|
|||
}
|
||||
clearTeleportRequest();
|
||||
gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
|
||||
gPipeline.resetVertexBuffers();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ S32 AABBSphereIntersect(const LLVector3& min, const LLVector3& max, const LLVect
|
|||
S32 AABBSphereIntersectR2(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &radius_squared);
|
||||
|
||||
//defines data needed for octree of an entry
|
||||
LL_ALIGN_PREFIX(16)
|
||||
//LL_ALIGN_PREFIX(16)
|
||||
class LLViewerOctreeEntry : public LLRefCount
|
||||
{
|
||||
friend class LLViewerOctreeEntryData;
|
||||
|
|
@ -128,10 +128,10 @@ private:
|
|||
mutable S32 mBinIndex;
|
||||
mutable U32 mVisible;
|
||||
|
||||
} LL_ALIGN_POSTFIX(16);
|
||||
} ;//LL_ALIGN_POSTFIX(16);
|
||||
|
||||
//defines an abstract class for entry data
|
||||
LL_ALIGN_PREFIX(16)
|
||||
//LL_ALIGN_PREFIX(16)
|
||||
class LLViewerOctreeEntryData : public LLRefCount
|
||||
{
|
||||
protected:
|
||||
|
|
@ -178,11 +178,11 @@ protected:
|
|||
LLPointer<LLViewerOctreeEntry> mEntry;
|
||||
LLViewerOctreeEntry::eEntryDataType_t mDataType;
|
||||
static U32 sCurVisible; // Counter for what value of mVisible means currently visible
|
||||
}LL_ALIGN_POSTFIX(16);
|
||||
};//LL_ALIGN_POSTFIX(16);
|
||||
|
||||
|
||||
//defines an octree group for an octree node, which contains multiple entries.
|
||||
LL_ALIGN_PREFIX(16)
|
||||
//LL_ALIGN_PREFIX(16)
|
||||
class LLviewerOctreeGroup : public LLOctreeListener<LLViewerOctreeEntry>
|
||||
{
|
||||
friend class LLViewerOctreeCull;
|
||||
|
|
@ -279,7 +279,7 @@ protected:
|
|||
public:
|
||||
S32 mVisible[LLViewerCamera::NUM_CAMERAS];
|
||||
|
||||
}LL_ALIGN_POSTFIX(16);
|
||||
};//LL_ALIGN_POSTFIX(16);
|
||||
|
||||
//octree group which has capability to support occlusion culling
|
||||
//LL_ALIGN_PREFIX(16)
|
||||
|
|
|
|||
|
|
@ -1207,12 +1207,7 @@ BOOL LLViewerRegion::idleUpdate(F32 max_update_time)
|
|||
|
||||
max_update_time -= update_timer.getElapsedTimeF32();
|
||||
|
||||
if(gViewerWindow->getProgressView()->getVisible())
|
||||
{
|
||||
//in case rendering pipeline is not started yet.
|
||||
mImpl->mVOCachePartition->cull(*(LLViewerCamera::getInstance()), false);
|
||||
}
|
||||
else if(max_update_time < 0.f)
|
||||
if(max_update_time < 0.f && !gViewerWindow->getProgressView()->getVisible())
|
||||
{
|
||||
return did_update;
|
||||
}
|
||||
|
|
@ -1279,7 +1274,8 @@ F32 LLViewerRegion::killInvisibleObjects(F32 max_time)
|
|||
return max_time;
|
||||
}
|
||||
|
||||
size_t max_update = sNewObjectCreationThrottle < 0 ? mImpl->mActiveSet.size() : 64;
|
||||
bool unstable = sNewObjectCreationThrottle < 0;
|
||||
size_t max_update = unstable ? mImpl->mActiveSet.size() : 64;
|
||||
if(!mInvisibilityCheckHistory && isViewerCameraStatic())
|
||||
{
|
||||
//history is clean, reduce number of checking
|
||||
|
|
@ -1299,7 +1295,7 @@ F32 LLViewerRegion::killInvisibleObjects(F32 max_time)
|
|||
iter = mImpl->mActiveSet.begin();
|
||||
}
|
||||
|
||||
if(!(*iter)->isRecentlyVisible() && (*iter)->mLastCameraUpdated < sLastCameraUpdated)
|
||||
if(!(*iter)->isRecentlyVisible() && (unstable || (*iter)->mLastCameraUpdated < sLastCameraUpdated))
|
||||
{
|
||||
killObject((*iter), delete_list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -636,6 +636,11 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if(LLViewerCamera::sCurCameraID >= LLViewerCamera::CAMERA_WATER0)
|
||||
{
|
||||
return 0; //no need for those cameras.
|
||||
}
|
||||
|
||||
if(mCulledTime[LLViewerCamera::sCurCameraID] == LLViewerOctreeEntryData::getCurrentFrame())
|
||||
{
|
||||
return 0; //already culled
|
||||
|
|
|
|||
|
|
@ -2103,6 +2103,13 @@ void LLPipeline::updateMove()
|
|||
part->mOctree->balance();
|
||||
}
|
||||
}
|
||||
|
||||
//balance the VO Cache tree
|
||||
LLVOCachePartition* vo_part = region->getVOCachePartition();
|
||||
if(vo_part)
|
||||
{
|
||||
vo_part->mOctree->balance();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2895,6 +2902,52 @@ void LLPipeline::clearRebuildGroups()
|
|||
mGroupQ2Locked = false;
|
||||
}
|
||||
|
||||
void LLPipeline::clearRebuildDrawables()
|
||||
{
|
||||
// Clear all drawables on the priority build queue,
|
||||
for (LLDrawable::drawable_list_t::iterator iter = mBuildQ1.begin();
|
||||
iter != mBuildQ1.end(); ++iter)
|
||||
{
|
||||
LLDrawable* drawablep = *iter;
|
||||
if (drawablep && !drawablep->isDead())
|
||||
{
|
||||
drawablep->clearState(LLDrawable::IN_REBUILD_Q2);
|
||||
drawablep->clearState(LLDrawable::IN_REBUILD_Q1);
|
||||
}
|
||||
}
|
||||
mBuildQ1.clear();
|
||||
|
||||
// clear drawables on the non-priority build queue
|
||||
for (LLDrawable::drawable_list_t::iterator iter = mBuildQ2.begin();
|
||||
iter != mBuildQ2.end(); ++iter)
|
||||
{
|
||||
LLDrawable* drawablep = *iter;
|
||||
if (!drawablep->isDead())
|
||||
{
|
||||
drawablep->clearState(LLDrawable::IN_REBUILD_Q2);
|
||||
}
|
||||
}
|
||||
mBuildQ2.clear();
|
||||
|
||||
//clear all moving bridges
|
||||
for (LLDrawable::drawable_vector_t::iterator iter = mMovedBridge.begin();
|
||||
iter != mMovedBridge.end(); ++iter)
|
||||
{
|
||||
LLDrawable *drawablep = *iter;
|
||||
drawablep->clearState(LLDrawable::EARLY_MOVE | LLDrawable::MOVE_UNDAMPED | LLDrawable::ON_MOVE_LIST | LLDrawable::ANIMATED_CHILD);
|
||||
}
|
||||
mMovedBridge.clear();
|
||||
|
||||
//clear all moving drawables
|
||||
for (LLDrawable::drawable_vector_t::iterator iter = mMovedList.begin();
|
||||
iter != mMovedList.end(); ++iter)
|
||||
{
|
||||
LLDrawable *drawablep = *iter;
|
||||
drawablep->clearState(LLDrawable::EARLY_MOVE | LLDrawable::MOVE_UNDAMPED | LLDrawable::ON_MOVE_LIST | LLDrawable::ANIMATED_CHILD);
|
||||
}
|
||||
mMovedList.clear();
|
||||
}
|
||||
|
||||
void LLPipeline::rebuildPriorityGroups()
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_REBUILD_PRIORITY_GROUPS);
|
||||
|
|
@ -7314,7 +7367,13 @@ void LLPipeline::doResetVertexBuffers()
|
|||
}
|
||||
}
|
||||
}
|
||||
LLSpatialPartition::sTeleportRequested = FALSE;
|
||||
if(LLSpatialPartition::sTeleportRequested)
|
||||
{
|
||||
LLSpatialPartition::sTeleportRequested = FALSE;
|
||||
|
||||
clearRebuildGroups();
|
||||
clearRebuildDrawables();
|
||||
}
|
||||
|
||||
resetDrawOrders();
|
||||
|
||||
|
|
|
|||
|
|
@ -245,6 +245,7 @@ public:
|
|||
void rebuildPriorityGroups();
|
||||
void rebuildGroups();
|
||||
void clearRebuildGroups();
|
||||
void clearRebuildDrawables();
|
||||
|
||||
//calculate pixel area of given box from vantage point of given camera
|
||||
static F32 calcPixelArea(LLVector3 center, LLVector3 size, LLCamera& camera);
|
||||
|
|
|
|||
Loading…
Reference in New Issue