From 3d66c31156cdde6240f5f27e18275060205f8ce9 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 18 Nov 2015 13:21:15 -0500 Subject: SL-271 WIP, SL-201 WIP - leaf joint attrib is now end. Show bones option now includes occluded portions. --- indra/llappearance/llavatarappearance.cpp | 3 +-- indra/newview/llvoavatar.cpp | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 142120cb6c..de541add97 100755 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -1574,8 +1574,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node) return FALSE; } - // BENTO rename leaf->end - static LLStdStringHandle end_string = LLXmlTree::addAttributeString("leaf"); + static LLStdStringHandle end_string = LLXmlTree::addAttributeString("end"); if (!node->getFastAttributeVector3(end_string, mEnd)) { LL_WARNS() << "Bone without end " << mName << LL_ENDL; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 5fed8ce938..7d38cd116d 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1362,6 +1362,9 @@ void LLVOAvatar::renderCollisionVolumes() void LLVOAvatar::renderBones() { + + LLGLEnable blend(GL_BLEND); + std::ostringstream ostr; std::ostringstream nullstr; @@ -1379,12 +1382,10 @@ void LLVOAvatar::renderBones() ostr << jointp->getName() << ", "; jointp->updateWorldMatrix(); - + gGL.pushMatrix(); gGL.multMatrix( &jointp->getXform()->getWorldMatrix().mMatrix[0][0] ); - gGL.diffuseColor3f( 1.f, 0.f, 1.f ); - gGL.begin(LLRender::LINES); LLVector3 v[] = @@ -1394,6 +1395,19 @@ void LLVOAvatar::renderBones() }; v[1] = jointp->getEnd(); + LLGLDepthTest normal_depth(GL_TRUE); + + // Unoccluded bone portions + gGL.diffuseColor3f( 1.f, 1.f, 1.f ); + + gGL.vertex3fv(v[0].mV); + gGL.vertex3fv(v[1].mV); + + LLGLDepthTest depth_under(GL_TRUE, GL_FALSE, GL_GREATER); + + // Unoccluded bone portions + gGL.diffuseColor3f( 1.0f, 0.f, 0.0f ); + gGL.vertex3fv(v[0].mV); gGL.vertex3fv(v[1].mV); -- cgit v1.2.3