summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/lldrawpoolavatar.cpp13
-rw-r--r--indra/newview/llfloatermodelpreview.cpp9
2 files changed, 20 insertions, 2 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index d9b0b195f5..a710bdcdbd 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1275,10 +1275,9 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
U32 data_mask = face->getRiggedVertexBufferDataMask();
- S32 num_verts = (vol_face.mNumVertices + 0xF) & ~0xF;
if (buffer.isNull() ||
buffer->getTypeMask() != data_mask ||
- buffer->getRequestedVerts() != num_verts ||
+ buffer->getRequestedVerts() != vol_face.mNumVertices ||
buffer->getRequestedIndices() != vol_face.mNumIndices ||
(drawable && drawable->isState(LLDrawable::REBUILD_ALL)))
{
@@ -1318,6 +1317,16 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
LLMatrix3 mat_normal(mat3);
+ //let getGeometryVolume know if alpha should override shiny
+ if (face->getFaceColor().mV[3] < 1.f)
+ {
+ face->setPoolType(LLDrawPool::POOL_ALPHA);
+ }
+ else
+ {
+ face->setPoolType(LLDrawPool::POOL_AVATAR);
+ }
+
face->getGeometryVolume(*volume, face->getTEOffset(), mat_vert, mat_normal, offset, true);
buffer->flush();
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 2a834ea11f..d9ce72a2c2 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -5409,7 +5409,16 @@ BOOL LLModelPreview::render()
if (joint_positions)
{
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+ if (shader)
+ {
+ gDebugProgram.bind();
+ }
getPreviewAvatar()->renderCollisionVolumes();
+ if (shader)
+ {
+ shader->bind();
+ }
}
for (LLModelLoader::scene::iterator iter = mScene[mPreviewLOD].begin(); iter != mScene[mPreviewLOD].end(); ++iter)