diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llface.cpp | 22 | ||||
-rw-r--r-- | indra/newview/llface.h | 4 |
2 files changed, 22 insertions, 4 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 10847e7067..290115417f 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -384,6 +384,24 @@ void LLFace::setSize(S32 num_vertices, S32 num_indices, bool align) llassert(verify()); } +void LLFace::setGeomIndex(U16 idx) +{ + if (mGeomIndex != idx) + { + mGeomIndex = idx; + mVertexBuffer = NULL; + } +} + +void LLFace::setIndicesIndex(S32 idx) +{ + if (mIndicesIndex != idx) + { + mIndicesIndex = idx; + mVertexBuffer = NULL; + } +} + //============================================================================ U16 LLFace::getGeometryAvatar( @@ -1858,7 +1876,7 @@ BOOL LLFace::verify(const U32* indices_array) const } // First, check whether the face data fits within the pool's range. - if ((mGeomIndex + mGeomCount) > mVertexBuffer->getNumVerts()) + if ((mGeomIndex + mGeomCount) > mVertexBuffer->getRequestedVerts()) { ok = FALSE; llinfos << "Face references invalid vertices!" << llendl; @@ -1877,7 +1895,7 @@ BOOL LLFace::verify(const U32* indices_array) const llinfos << "Face has bogus indices count" << llendl; } - if (mIndicesIndex + mIndicesCount > mVertexBuffer->getNumIndices()) + if (mIndicesIndex + mIndicesCount > mVertexBuffer->getRequestedIndices()) { ok = FALSE; llinfos << "Face references invalid indices!" << llendl; diff --git a/indra/newview/llface.h b/indra/newview/llface.h index 1f69dd145e..b2170c4cf3 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -196,8 +196,8 @@ public: BOOL verify(const U32* indices_array = NULL) const; void printDebugInfo() const; - void setGeomIndex(U16 idx) { mGeomIndex = idx; } - void setIndicesIndex(S32 idx) { mIndicesIndex = idx; } + void setGeomIndex(U16 idx); + void setIndicesIndex(S32 idx); void setDrawInfo(LLDrawInfo* draw_info); F32 getTextureVirtualSize() ; |