Toss attachments into their own bridge that sets their type to TYPE_AVATAR, and use generic bridge for plain old 'active' volumes. Resolves issue where non-attached ACTIVE flagged linksets would be included in the avatar render type, and thus would vanish when such type was disabled.
This commit is contained in:
@@ -1056,6 +1056,10 @@ LLSpatialPartition* LLDrawable::getSpatialPartition()
|
|||||||
{
|
{
|
||||||
setSpatialBridge(new LLHUDBridge(this));
|
setSpatialBridge(new LLHUDBridge(this));
|
||||||
}
|
}
|
||||||
|
else if (mVObjp->isAttachment())
|
||||||
|
{
|
||||||
|
setSpatialBridge(new LLAttachmentBridge(this));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setSpatialBridge(new LLVolumeBridge(this));
|
setSpatialBridge(new LLVolumeBridge(this));
|
||||||
@@ -1663,12 +1667,18 @@ void LLDrawable::updateFaceSize(S32 idx)
|
|||||||
LLBridgePartition::LLBridgePartition()
|
LLBridgePartition::LLBridgePartition()
|
||||||
: LLSpatialPartition(0, FALSE, 0)
|
: LLSpatialPartition(0, FALSE, 0)
|
||||||
{
|
{
|
||||||
mDrawableType = LLPipeline::RENDER_TYPE_AVATAR;
|
mDrawableType = LLPipeline::RENDER_TYPE_VOLUME;
|
||||||
mPartitionType = LLViewerRegion::PARTITION_BRIDGE;
|
mPartitionType = LLViewerRegion::PARTITION_BRIDGE;
|
||||||
mLODPeriod = 16;
|
mLODPeriod = 16;
|
||||||
mSlopRatio = 0.25f;
|
mSlopRatio = 0.25f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLAttachmentPartition::LLAttachmentPartition()
|
||||||
|
: LLBridgePartition()
|
||||||
|
{
|
||||||
|
mDrawableType = LLPipeline::RENDER_TYPE_AVATAR;
|
||||||
|
}
|
||||||
|
|
||||||
LLHUDBridge::LLHUDBridge(LLDrawable* drawablep)
|
LLHUDBridge::LLHUDBridge(LLDrawable* drawablep)
|
||||||
: LLVolumeBridge(drawablep)
|
: LLVolumeBridge(drawablep)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -792,6 +792,7 @@ void LLSpatialGroup::shift(const LLVector4a &offset)
|
|||||||
if (!mSpatialPartition->mRenderByGroup &&
|
if (!mSpatialPartition->mRenderByGroup &&
|
||||||
mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_TREE &&
|
mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_TREE &&
|
||||||
mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_TERRAIN &&
|
mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_TERRAIN &&
|
||||||
|
mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_ATTACHMENT &&
|
||||||
mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_BRIDGE)
|
mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_BRIDGE)
|
||||||
{
|
{
|
||||||
setState(GEOM_DIRTY);
|
setState(GEOM_DIRTY);
|
||||||
|
|||||||
@@ -737,6 +737,12 @@ public:
|
|||||||
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { LLVolumeGeometryManager::addGeometryCount(group, vertex_count, index_count); }
|
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { LLVolumeGeometryManager::addGeometryCount(group, vertex_count, index_count); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class LLAttachmentBridge : public LLVolumeBridge
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
LLAttachmentBridge(LLDrawable* drawable);
|
||||||
|
};
|
||||||
|
|
||||||
class LLHUDBridge : public LLVolumeBridge
|
class LLHUDBridge : public LLVolumeBridge
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -754,11 +760,18 @@ public:
|
|||||||
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { }
|
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//spatial partition that holds nothing but spatial bridges
|
||||||
|
class LLAttachmentPartition : public LLBridgePartition
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
LLAttachmentPartition();
|
||||||
|
};
|
||||||
|
|
||||||
class LLHUDPartition : public LLBridgePartition
|
class LLHUDPartition : public LLBridgePartition
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LLHUDPartition();
|
LLHUDPartition();
|
||||||
virtual void shift(const LLVector4a &offset);
|
virtual void shift(const LLVector4a &offset) { } //HUD objects don't shift with region crossing. That would be silly.
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const F32 SG_BOX_SIDE;
|
extern const F32 SG_BOX_SIDE;
|
||||||
|
|||||||
@@ -380,6 +380,7 @@ void LLViewerRegion::initPartitions()
|
|||||||
mImpl->mObjectPartition.push_back(new LLGrassPartition()); //PARTITION_GRASS
|
mImpl->mObjectPartition.push_back(new LLGrassPartition()); //PARTITION_GRASS
|
||||||
mImpl->mObjectPartition.push_back(new LLVolumePartition()); //PARTITION_VOLUME
|
mImpl->mObjectPartition.push_back(new LLVolumePartition()); //PARTITION_VOLUME
|
||||||
mImpl->mObjectPartition.push_back(new LLBridgePartition()); //PARTITION_BRIDGE
|
mImpl->mObjectPartition.push_back(new LLBridgePartition()); //PARTITION_BRIDGE
|
||||||
|
mImpl->mObjectPartition.push_back(new LLAttachmentPartition()); //PARTITION_ATTACHMENT
|
||||||
mImpl->mObjectPartition.push_back(new LLHUDParticlePartition());//PARTITION_HUD_PARTICLE
|
mImpl->mObjectPartition.push_back(new LLHUDParticlePartition());//PARTITION_HUD_PARTICLE
|
||||||
mImpl->mObjectPartition.push_back(NULL); //PARTITION_NONE
|
mImpl->mObjectPartition.push_back(NULL); //PARTITION_NONE
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ public:
|
|||||||
PARTITION_GRASS,
|
PARTITION_GRASS,
|
||||||
PARTITION_VOLUME,
|
PARTITION_VOLUME,
|
||||||
PARTITION_BRIDGE,
|
PARTITION_BRIDGE,
|
||||||
|
PARTITION_ATTACHMENT,
|
||||||
PARTITION_HUD_PARTICLE,
|
PARTITION_HUD_PARTICLE,
|
||||||
PARTITION_NONE,
|
PARTITION_NONE,
|
||||||
NUM_PARTITIONS
|
NUM_PARTITIONS
|
||||||
|
|||||||
@@ -9017,7 +9017,7 @@ void LLVOAvatar::updateSoftwareSkinnedVertices(const LLMeshSkinInfo* skin, const
|
|||||||
U32 LLVOAvatar::getPartitionType() const
|
U32 LLVOAvatar::getPartitionType() const
|
||||||
{
|
{
|
||||||
// Avatars merely exist as drawables in the bridge partition
|
// Avatars merely exist as drawables in the bridge partition
|
||||||
return LLViewerRegion::PARTITION_BRIDGE;
|
return LLViewerRegion::PARTITION_ATTACHMENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
|
|||||||
@@ -4000,6 +4000,10 @@ U32 LLVOVolume::getPartitionType() const
|
|||||||
{
|
{
|
||||||
return LLViewerRegion::PARTITION_HUD;
|
return LLViewerRegion::PARTITION_HUD;
|
||||||
}
|
}
|
||||||
|
else if (isAttachment())
|
||||||
|
{
|
||||||
|
return LLViewerRegion::PARTITION_ATTACHMENT;
|
||||||
|
}
|
||||||
|
|
||||||
return LLViewerRegion::PARTITION_VOLUME;
|
return LLViewerRegion::PARTITION_VOLUME;
|
||||||
}
|
}
|
||||||
@@ -4028,6 +4032,12 @@ LLVolumeBridge::LLVolumeBridge(LLDrawable* drawablep)
|
|||||||
mSlopRatio = 0.25f;
|
mSlopRatio = 0.25f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLAttachmentBridge::LLAttachmentBridge(LLDrawable* drawablep)
|
||||||
|
: LLVolumeBridge(drawablep)
|
||||||
|
{
|
||||||
|
mPartitionType = LLViewerRegion::PARTITION_ATTACHMENT;
|
||||||
|
}
|
||||||
|
|
||||||
bool can_batch_texture(const LLFace* facep)
|
bool can_batch_texture(const LLFace* facep)
|
||||||
{
|
{
|
||||||
static const LLCachedControl<bool> alt_batching("SHAltBatching",true);
|
static const LLCachedControl<bool> alt_batching("SHAltBatching",true);
|
||||||
@@ -6390,9 +6400,4 @@ LLHUDPartition::LLHUDPartition()
|
|||||||
mLODPeriod = 1;
|
mLODPeriod = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLHUDPartition::shift(const LLVector4a &offset)
|
|
||||||
{
|
|
||||||
//HUD objects don't shift with region crossing. That would be silly.
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6492,6 +6492,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
|
|||||||
for (U32 j = 0; j < LLViewerRegion::NUM_PARTITIONS; j++)
|
for (U32 j = 0; j < LLViewerRegion::NUM_PARTITIONS; j++)
|
||||||
{
|
{
|
||||||
if ((j == LLViewerRegion::PARTITION_VOLUME) ||
|
if ((j == LLViewerRegion::PARTITION_VOLUME) ||
|
||||||
|
(j == LLViewerRegion::PARTITION_ATTACHMENT) ||
|
||||||
(j == LLViewerRegion::PARTITION_BRIDGE) ||
|
(j == LLViewerRegion::PARTITION_BRIDGE) ||
|
||||||
(j == LLViewerRegion::PARTITION_TERRAIN) ||
|
(j == LLViewerRegion::PARTITION_TERRAIN) ||
|
||||||
(j == LLViewerRegion::PARTITION_TREE) ||
|
(j == LLViewerRegion::PARTITION_TREE) ||
|
||||||
@@ -6554,7 +6555,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
|
|||||||
{
|
{
|
||||||
LLViewerRegion* region = *iter;
|
LLViewerRegion* region = *iter;
|
||||||
|
|
||||||
LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_BRIDGE);
|
LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_ATTACHMENT);
|
||||||
if (part && hasRenderType(part->mDrawableType))
|
if (part && hasRenderType(part->mDrawableType))
|
||||||
{
|
{
|
||||||
LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, face_hit, &position, tex_coord, normal, tangent);
|
LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, face_hit, &position, tex_coord, normal, tangent);
|
||||||
|
|||||||
Reference in New Issue
Block a user