summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorAnchor Linden <anchor@lindenlab.com>2018-06-05 23:21:30 +0530
committerAnchor Linden <anchor@lindenlab.com>2018-06-05 23:21:30 +0530
commit6e1cbd04b43ad779afcd562cdaefe8a8c179ed06 (patch)
tree2cb1b5ba8ab5d73f9d96bc804bdb006afda6a7f6 /indra/newview/llface.cpp
parent809e5563db244a8d1af617b6dcf90f3eebb7f691 (diff)
parent40d4e8b2e6d25a625c7a5ef5dd3e94321d18ce82 (diff)
Merge
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r--indra/newview/llface.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 50a4925c37..7f7d7f3dcc 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -53,6 +53,7 @@
#include "llviewershadermgr.h"
#include "llviewertexture.h"
#include "llvoavatar.h"
+#include "llsculptidsize.h"
#if LL_LINUX
// Work-around spurious used before init warning on Vector4a
@@ -2650,12 +2651,27 @@ LLViewerTexture* LLFace::getTexture(U32 ch) const
void LLFace::setVertexBuffer(LLVertexBuffer* buffer)
{
+ if (buffer)
+ {
+ LLSculptIDSize::instance().inc(mDrawablep, buffer->getSize() + buffer->getIndicesSize());
+ }
+
+ if (mVertexBuffer)
+ {
+ LLSculptIDSize::instance().dec(mDrawablep);
+ }
+
mVertexBuffer = buffer;
llassert(verify());
}
void LLFace::clearVertexBuffer()
{
+ if (mVertexBuffer)
+ {
+ LLSculptIDSize::instance().dec(mDrawablep);
+ }
+
mVertexBuffer = NULL;
}