MAINT-646 Cleanup some warnings from previous changes.
parent
9605da154e
commit
93fcff2b24
|
|
@ -969,6 +969,12 @@ void LLDrawable::updateUVMinMax()
|
|||
{
|
||||
}
|
||||
|
||||
LLSpatialGroup* LLDrawable::getSpatialGroup() const
|
||||
{
|
||||
llassert((mSpatialGroupp == NULL) ? getBinIndex() == -1 : getBinIndex() != -1);
|
||||
return mSpatialGroupp;
|
||||
}
|
||||
|
||||
void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp)
|
||||
{
|
||||
/*if (mSpatialGroupp && (groupp != mSpatialGroupp))
|
||||
|
|
@ -991,6 +997,8 @@ void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp)
|
|||
}
|
||||
|
||||
mSpatialGroupp = groupp;
|
||||
|
||||
llassert((mSpatialGroupp == NULL) ? getBinIndex() == -1 : getBinIndex() != -1);
|
||||
}
|
||||
|
||||
LLSpatialPartition* LLDrawable::getSpatialPartition()
|
||||
|
|
@ -1501,7 +1509,13 @@ void LLSpatialBridge::cleanupReferences()
|
|||
LLDrawable::cleanupReferences();
|
||||
if (mDrawable)
|
||||
{
|
||||
mDrawable->setSpatialGroup(NULL);
|
||||
LLSpatialGroup* group = mDrawable->getSpatialGroup();
|
||||
if (group)
|
||||
{
|
||||
group->mOctreeNode->remove(mDrawable);
|
||||
mDrawable->setSpatialGroup(NULL);
|
||||
}
|
||||
|
||||
if (mDrawable->getVObj())
|
||||
{
|
||||
LLViewerObject::const_child_list_t& child_list = mDrawable->getVObj()->getChildren();
|
||||
|
|
@ -1512,7 +1526,12 @@ void LLSpatialBridge::cleanupReferences()
|
|||
LLDrawable* drawable = child->mDrawable;
|
||||
if (drawable)
|
||||
{
|
||||
drawable->setSpatialGroup(NULL);
|
||||
LLSpatialGroup* group = drawable->getSpatialGroup();
|
||||
if (group)
|
||||
{
|
||||
group->mOctreeNode->remove(drawable);
|
||||
drawable->setSpatialGroup(NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ public:
|
|||
S32 findReferences(LLDrawable *drawablep); // Not const because of @#$! iterators...
|
||||
|
||||
void setSpatialGroup(LLSpatialGroup *groupp);
|
||||
LLSpatialGroup *getSpatialGroup() const { return mSpatialGroupp; }
|
||||
LLSpatialGroup *getSpatialGroup() const;
|
||||
LLSpatialPartition* getSpatialPartition();
|
||||
|
||||
// Statics
|
||||
|
|
|
|||
|
|
@ -1189,19 +1189,25 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
{
|
||||
if (num_indices + (S32) mIndicesIndex > mVertexBuffer->getNumIndices())
|
||||
{
|
||||
llwarns << "Index buffer overflow!" << llendl;
|
||||
llwarns << "Indices Count: " << mIndicesCount
|
||||
<< " VF Num Indices: " << num_indices
|
||||
<< " Indices Index: " << mIndicesIndex
|
||||
<< " VB Num Indices: " << mVertexBuffer->getNumIndices() << llendl;
|
||||
llwarns << " Face Index: " << f
|
||||
<< " Pool Type: " << mPoolType << llendl;
|
||||
if (gDebugGL)
|
||||
{
|
||||
llwarns << "Index buffer overflow!" << llendl;
|
||||
llwarns << "Indices Count: " << mIndicesCount
|
||||
<< " VF Num Indices: " << num_indices
|
||||
<< " Indices Index: " << mIndicesIndex
|
||||
<< " VB Num Indices: " << mVertexBuffer->getNumIndices() << llendl;
|
||||
llwarns << " Face Index: " << f
|
||||
<< " Pool Type: " << mPoolType << llendl;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (num_vertices + mGeomIndex > mVertexBuffer->getNumVerts())
|
||||
{
|
||||
llwarns << "Vertex buffer overflow!" << llendl;
|
||||
if (gDebugGL)
|
||||
{
|
||||
llwarns << "Vertex buffer overflow!" << llendl;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1847,12 +1847,14 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp)
|
|||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
||||
drawablep->setSpatialGroup(NULL);
|
||||
|
||||
if (!curp->removeObject(drawablep))
|
||||
{
|
||||
OCT_ERRS << "Failed to remove drawable from octree!" << llendl;
|
||||
}
|
||||
else
|
||||
{
|
||||
drawablep->setSpatialGroup(NULL);
|
||||
}
|
||||
|
||||
assert_octree_valid(mOctree);
|
||||
|
||||
|
|
|
|||
|
|
@ -4702,8 +4702,14 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
|
|||
if (buff)
|
||||
{
|
||||
llassert(!face->isState(LLFace::RIGGED));
|
||||
face->getGeometryVolume(*volume, face->getTEOffset(),
|
||||
vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), face->getGeomIndex());
|
||||
|
||||
if (!face->getGeometryVolume(*volume, face->getTEOffset(),
|
||||
vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), face->getGeomIndex()))
|
||||
{ //something's gone wrong with the vertex buffer accounting, rebuild this group
|
||||
group->dirtyGeom();
|
||||
gPipeline.markRebuild(group, TRUE);
|
||||
}
|
||||
|
||||
|
||||
if (buff->isLocked())
|
||||
{
|
||||
|
|
@ -5037,8 +5043,11 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
|
|||
|
||||
llassert(!facep->isState(LLFace::RIGGED));
|
||||
|
||||
facep->getGeometryVolume(*volume, te_idx,
|
||||
vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), index_offset,true);
|
||||
if (!facep->getGeometryVolume(*volume, te_idx,
|
||||
vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), index_offset,true))
|
||||
{
|
||||
llwarns << "Failed to get geometry for face!" << llendl;
|
||||
}
|
||||
|
||||
if (drawablep->isState(LLDrawable::ANIMATED_CHILD))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue