Reasonably safe changes.

Using accessor for vertexbuffer in LLFace
Extra occlusion query lookup in llgl (unused)
Const changes.
This commit is contained in:
Shyotl
2011-05-18 14:35:27 -05:00
parent b314172533
commit 62e3aa10c1
39 changed files with 594 additions and 249 deletions

View File

@@ -803,8 +803,7 @@ void LLDrawable::shiftPos(const LLVector3 &shift_vector)
if (!volume && facep->hasGeometry())
{
facep->mVertexBuffer = NULL;
facep->mLastVertexBuffer = NULL;
facep->clearVertexBuffer();
}
}
@@ -913,6 +912,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;
}
@@ -1030,7 +1041,7 @@ BOOL LLDrawable::isVisible() const
//=======================================
LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask)
: LLSpatialPartition(data_mask, render_by_group, FALSE)
: LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW_ARB)
{
mDrawable = root;
root->setSpatialBridge(this);