summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawable.cpp')
-rw-r--r--indra/newview/lldrawable.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index a42f4fcaa1..4efd2bf4b8 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -57,6 +57,8 @@ const F32 MIN_SHADOW_CASTER_RADIUS = 2.0f;
static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound");
+extern bool gShiftFrame;
+
////////////////////////
//
@@ -716,6 +718,11 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
return;
}
+ if (gShiftFrame)
+ {
+ return;
+ }
+
//switch LOD with the spatial group to avoid artifacts
//LLSpatialGroup* sg = getSpatialGroup();
@@ -825,14 +832,19 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector)
mXform.setPosition(mVObjp->getPositionAgent());
}
- mXform.setRotation(mVObjp->getRotation());
- mXform.setScale(1,1,1);
mXform.updateMatrix();
if (isStatic())
{
LLVOVolume* volume = getVOVolume();
- if (!volume)
+
+ bool rebuild = (!volume &&
+ getRenderType() != LLPipeline::RENDER_TYPE_TREE &&
+ getRenderType() != LLPipeline::RENDER_TYPE_TERRAIN &&
+ getRenderType() != LLPipeline::RENDER_TYPE_SKY &&
+ getRenderType() != LLPipeline::RENDER_TYPE_GROUND);
+
+ if (rebuild)
{
gPipeline.markRebuild(this, LLDrawable::REBUILD_ALL, TRUE);
}
@@ -846,7 +858,7 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector)
facep->mExtents[0].add(shift_vector);
facep->mExtents[1].add(shift_vector);
- if (!volume && facep->hasGeometry())
+ if (rebuild && facep->hasGeometry())
{
facep->clearVertexBuffer();
}
@@ -1406,6 +1418,11 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
markDead();
return;
}
+
+ if (gShiftFrame)
+ {
+ return;
+ }
if (mDrawable->getVObj())
{