diff options
author | Dave Parks <davep@lindenlab.com> | 2011-10-07 17:44:57 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-10-07 17:44:57 -0500 |
commit | cffcb414f57bcdc7de862d791f8f9c1fea91a7fb (patch) | |
tree | f47d74e1da86e550ac4b6dd9e5dfa59c4099f4a3 /indra/newview | |
parent | 9cf4a4322b75a4d8fdc618c8f1edbf945c2f25b3 (diff) |
SH-2488 Fix for shiny and alpha not interacting well on rigged attachments (and fix for assertion when rendering model import preview)
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lldrawpoolavatar.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 9 |
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) |