summaryrefslogtreecommitdiff
path: root/indra/newview/llspatialpartition.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2021-11-20 18:49:19 +0000
committerDave Parks <davep@lindenlab.com>2021-11-20 18:49:19 +0000
commit28f9fb06a9f4cb9edccb2ff8132c7f6a9b27c060 (patch)
treee3096bac94279dded08731dcc4f042d81dc2bfac /indra/newview/llspatialpartition.cpp
parent3171aaad9b1f2757f8b0d8cbb784a45a7bbebafa (diff)
SL-16289 Rigged mesh rendering overhaul
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rw-r--r--indra/newview/llspatialpartition.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 30b7124550..332fa73944 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -2901,8 +2901,24 @@ void renderBatchSize(LLDrawInfo* params)
{
LLGLEnable offset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.f, 1.f);
- gGL.diffuseColor4ubv((GLubyte*) &(params->mDebugColor));
- pushVerts(params, LLVertexBuffer::MAP_VERTEX);
+ LLGLSLShader* old_shader = LLGLSLShader::sCurBoundShaderPtr;
+ U32 mask = LLVertexBuffer::MAP_VERTEX;
+ bool bind = false;
+ if (params->mAvatar)
+ {
+ bind = true;
+ old_shader->mRiggedVariant->bind();
+ LLRenderPass::uploadMatrixPalette(*params);
+ mask |= LLVertexBuffer::MAP_WEIGHT4;
+ }
+
+ gGL.diffuseColor4ubv((GLubyte*)&(params->mDebugColor));
+ pushVerts(params, mask);
+
+ if (bind)
+ {
+ old_shader->bind();
+ }
}
void renderShadowFrusta(LLDrawInfo* params)
@@ -4085,6 +4101,11 @@ void LLDrawInfo::validate()
mVertexBuffer->validateRange(mStart, mEnd, mCount, mOffset);
}
+U64 LLDrawInfo::getSkinHash()
+{
+ return mSkinInfo ? mSkinInfo->mHash : 0;
+}
+
LLVertexBuffer* LLGeometryManager::createVertexBuffer(U32 type_mask, U32 usage)
{
return new LLVertexBuffer(type_mask, usage);