diff options
author | Dave Parks <davep@lindenlab.com> | 2010-04-21 16:52:03 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-04-21 16:52:03 -0500 |
commit | 6e7bd47bea51c54377943314cbc51361399f8176 (patch) | |
tree | 6a4e32479105427a71110418d890147df4168dc3 /indra | |
parent | 4d204d4903fdf8f4ea083f752a27d185dad63ce6 (diff) | |
parent | 07856a0640ba5c881571952f6c67d40fe5651ebb (diff) |
merge
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 20 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 9 |
2 files changed, 23 insertions, 6 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 51a78fc125..e2650d22b0 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3705,7 +3705,15 @@ U32 LLVOAvatar::renderSkinnedAttachments() U16 offset = 0; LLMatrix4 mat_vert = skin->mBindShapeMatrix; - LLMatrix3 mat_normal; + glh::matrix4f m((F32*) mat_vert.mMatrix); + m = m.inverse().transpose(); + + F32 mat3[] = + { m.m[0], m.m[1], m.m[2], + m.m[4], m.m[5], m.m[6], + m.m[8], m.m[9], m.m[10] }; + + LLMatrix3 mat_normal(mat3); face->getGeometryVolume(*volume, i, mat_vert, mat_normal, offset, true); buff = face->mVertexBuffer; @@ -3729,8 +3737,8 @@ U32 LLVOAvatar::renderSkinnedAttachments() LLJoint* joint = getJoint(skin->mJointNames[i]); if (joint) { - mat[i*2+0] = skin->mInvBindMatrix[i]; - mat[i*2+1] = joint->getWorldMatrix(); + mat[i] = skin->mInvBindMatrix[i]; + mat[i] *= joint->getWorldMatrix(); } } @@ -3750,9 +3758,9 @@ U32 LLVOAvatar::renderSkinnedAttachments() S32 offset = face->getIndicesStart(); U32 count = face->getIndicesCount(); - glPointSize(8.f); - buff->drawRange(LLRender::POINTS, start, end, count, offset); - glPointSize(1.f); + gGL.getTexUnit(0)->bind(face->getTexture()); + buff->drawRange(LLRender::TRIANGLES, start, end, count, offset); + } } } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 318d5d5ca1..44c95a4fd6 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6747,6 +6747,15 @@ void LLPipeline::renderDeferredLighting() continue; } + if (volume->isAttachment()) + { + if (!sRenderAttachedLights) + { + continue; + } + } + + LLVector3 center = drawablep->getPositionAgent(); F32* c = center.mV; F32 s = volume->getLightRadius()*1.5f; |