summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawable.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-03-03 16:15:37 -0600
committerDave Parks <davep@lindenlab.com>2011-03-03 16:15:37 -0600
commit33d9a577ecf280ddc309479089c6d4d323698dfb (patch)
tree66e334baf35faf4d6e0048aa4e573f90415b4079 /indra/newview/lldrawable.cpp
parent0a76e7620f3c97571ccd85a0d31392c0235d87ec (diff)
parent162d467b4a8ca1dae6b16ece1728873d43a287ac (diff)
merge
Diffstat (limited to 'indra/newview/lldrawable.cpp')
-rw-r--r--indra/newview/lldrawable.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index d370c72a04..fe743e7451 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -820,8 +820,7 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector)
if (!volume && facep->hasGeometry())
{
- facep->mVertexBuffer = NULL;
- facep->mLastVertexBuffer = NULL;
+ facep->clearVertexBuffer();
}
}
@@ -935,6 +934,18 @@ void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp)
{
mSpatialGroupp->setState(LLSpatialGroup::GEOM_DIRTY);
}*/
+
+ if (mSpatialGroupp != groupp && getVOVolume())
+ { //NULL out vertex buffer references for volumes on spatial group change to maintain
+ //requirement that every face vertex buffer is either NULL or points to a vertex buffer
+ //contained by its drawable's spatial group
+ for (S32 i = 0; i < getNumFaces(); ++i)
+ {
+ LLFace* facep = getFace(i);
+ facep->clearVertexBuffer();
+ }
+ }
+
mSpatialGroupp = groupp;
}