diff options
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index bf9a4dfa12..4ddba872f1 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5110,6 +5110,28 @@ LLControlAVBridge::LLControlAVBridge(LLDrawable* drawablep, LLViewerRegion* regi mPartitionType = LLViewerRegion::PARTITION_CONTROL_AV; } +void LLControlAVBridge::updateSpatialExtents() +{ + LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE + + LLControlAvatar* controlAvatar = getVObj()->getControlAvatar(); + + LLSpatialGroup* root = (LLSpatialGroup*)mOctree->getListener(0); + + bool rootWasDirty = root->isDirty(); + + super::updateSpatialExtents(); // root becomes non-dirty here + + // SL-18251 "On-screen animesh characters using pelvis offset animations + // disappear when root goes off-screen" + // + // Expand extents to include Control Avatar placed outside of the bounds + if (controlAvatar && (rootWasDirty || controlAvatar->mPlaying)) + { + root->expandExtents(controlAvatar->mDrawable->getSpatialExtents(), *mDrawable->getXform()); + } +} + bool can_batch_texture(LLFace* facep) { if (facep->getTextureEntry()->getBumpmap()) @@ -6306,7 +6328,6 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace LLSpatialGroup::buffer_map_t buffer_map; LLViewerTexture* last_tex = NULL; - S32 buffer_index = 0; S32 texture_index_channels = 1; @@ -6319,11 +6340,6 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace { texture_index_channels = gDeferredAlphaProgram.mFeatures.mIndexedTextureChannels; } - - if (distance_sort) - { - buffer_index = -1; - } static LLCachedControl<U32> max_texture_index(gSavedSettings, "RenderMaxTextureIndex", 16); texture_index_channels = llmin(texture_index_channels, (S32) max_texture_index); @@ -6347,14 +6363,9 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace tex = NULL; } - if (last_tex == tex) - { - buffer_index++; - } - else + if (last_tex != tex) { last_tex = tex; - buffer_index = 0; } bool bake_sunlight = LLPipeline::sBakeSunlight && facep->getDrawable()->isStatic(); |