diff options
author | Oz Linden <oz@lindenlab.com> | 2011-05-18 07:33:08 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-05-18 07:33:08 -0400 |
commit | 5eb6cb8d86cf19da79d034df52a0254079f2c95f (patch) | |
tree | cd2853e9c7c2cbf0bce317ca9018a6f4fa46a23f /indra/newview/llflexibleobject.cpp | |
parent | 66c078de5e5a6b685d435f7b1a462d64ca80f35e (diff) | |
parent | 644cbc44871992a95bcd5a6854dfc2a4d56a7b62 (diff) |
merge up latest viewer-development (post mesh)
Diffstat (limited to 'indra/newview/llflexibleobject.cpp')
-rw-r--r-- | indra/newview/llflexibleobject.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index 8ab2229235..3d1650d2f5 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -91,11 +91,13 @@ void LLVolumeImplFlexible::onParameterChanged(U16 param_type, LLNetworkData *dat } } -void LLVolumeImplFlexible::onShift(const LLVector3 &shift_vector) +void LLVolumeImplFlexible::onShift(const LLVector4a &shift_vector) { + //VECTORIZE THIS + LLVector3 shift(shift_vector.getF32ptr()); for (int section = 0; section < (1<<FLEXIBLE_OBJECT_MAX_SECTIONS)+1; ++section) { - mSection[section].mPosition += shift_vector; + mSection[section].mPosition += shift; } } @@ -314,11 +316,13 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6 return FALSE; // (we are not initialized or updated) } - if (force_update) + bool visible = mVO->mDrawable->isVisible(); + + if (force_update && visible) { gPipeline.markRebuild(mVO->mDrawable, LLDrawable::REBUILD_POSITION, FALSE); } - else if (mVO->mDrawable->isVisible() && + else if (visible && !mVO->mDrawable->isState(LLDrawable::IN_REBUILD_Q1) && mVO->getPixelArea() > 256.f) { @@ -362,7 +366,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate() LLFastTimer ftm(FTM_DO_FLEXIBLE_UPDATE); LLVolume* volume = mVO->getVolume(); LLPath *path = &volume->getPath(); - if (mSimulateRes == 0) + if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible()) // if its uninitialized but not visible, what then? - Nyx { mVO->markForUpdate(TRUE); if (!doIdleUpdate(gAgent, *LLWorld::getInstance(), 0.0)) @@ -690,6 +694,8 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) } volume->updateRelativeXform(); + + if (mRenderRes > -1) { LLFastTimer t(FTM_DO_FLEXIBLE_UPDATE); doFlexibleUpdate(); |