summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-04-06 16:24:08 -0500
committerDave Parks <davep@lindenlab.com>2010-04-06 16:24:08 -0500
commit47ffcdb93d6e2ac1f9d497e43e0213c98d129254 (patch)
tree1d3c1d159bca20cdca21a4e3eac23b1515372615 /indra/newview/llvovolume.cpp
parent807d835c2bfc5d794a74f9690d1fafbe55ff88cc (diff)
Rigged attachments (almost works).
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index bc83e11fd2..56fb42bb89 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3496,6 +3496,10 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
drawablep->clearState(LLDrawable::HAS_ALPHA);
+ bool rigged = vobj->isAttachment() &&
+ vobj->isMesh() &&
+ gMeshRepo.getSkinInfo(vobj->getVolume()->getParams().getSculptID());
+
//for each face
for (S32 i = 0; i < drawablep->getNumFaces(); i++)
{
@@ -3503,6 +3507,22 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
drawablep->updateFaceSize(i);
LLFace* facep = drawablep->getFace(i);
+ if (rigged)
+ {
+ if (!facep->isState(LLFace::RIGGED))
+ {
+ facep->mVertexBuffer = NULL;
+ facep->mLastVertexBuffer = NULL;
+ facep->setState(LLFace::RIGGED);
+ }
+
+ continue;
+ }
+ else
+ {
+ facep->clearState(LLFace::RIGGED);
+ }
+
if (cur_total > max_total || facep->getIndicesCount() <= 0 || facep->getGeomCount() <= 0)
{
facep->mVertexBuffer = NULL;