summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2018-06-02 02:18:57 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2018-06-02 02:18:57 +0300
commit1fe32c16fb299c1eb6a47e6860198f07b0c806c4 (patch)
tree04a3c93faa058e547140c9d43d15fb9b1467f2a6 /indra/newview/llface.cpp
parent18bb3f6b86b32c4ca22f0466ee175d68969a03fd (diff)
parent9437d1511e2c4b73a58abc823b1ca2a29a8a4d04 (diff)
Merged in lindenlab/viewer-bear
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 474645c084..06f64b7597 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
@@ -2656,12 +2657,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;
}