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/newview/llvoavatar.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'indra/newview') 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