diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lldrawpoolavatar.cpp | 69 |
1 files changed, 67 insertions, 2 deletions
diff --git a/linden/indra/newview/lldrawpoolavatar.cpp b/linden/indra/newview/lldrawpoolavatar.cpp index 80c7d73..af7b5e3 100644 --- a/linden/indra/newview/lldrawpoolavatar.cpp +++ b/linden/indra/newview/lldrawpoolavatar.cpp | |||
@@ -94,6 +94,7 @@ BOOL gAvatarEmbossBumpMap = FALSE; | |||
94 | static BOOL sRenderingSkinned = FALSE; | 94 | static BOOL sRenderingSkinned = FALSE; |
95 | S32 normal_channel = -1; | 95 | S32 normal_channel = -1; |
96 | S32 specular_channel = -1; | 96 | S32 specular_channel = -1; |
97 | S32 diffuse_channel = -1; | ||
97 | 98 | ||
98 | LLDrawPoolAvatar::LLDrawPoolAvatar() : | 99 | LLDrawPoolAvatar::LLDrawPoolAvatar() : |
99 | LLFacePool(POOL_AVATAR) | 100 | LLFacePool(POOL_AVATAR) |
@@ -447,7 +448,8 @@ void LLDrawPoolAvatar::beginDeferredImpostor() | |||
447 | 448 | ||
448 | normal_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::DEFERRED_NORMAL); | 449 | normal_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::DEFERRED_NORMAL); |
449 | specular_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::SPECULAR_MAP); | 450 | specular_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::SPECULAR_MAP); |
450 | 451 | diffuse_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP); // KL SD | |
452 | |||
451 | sVertexProgram->bind(); | 453 | sVertexProgram->bind(); |
452 | } | 454 | } |
453 | 455 | ||
@@ -456,6 +458,7 @@ void LLDrawPoolAvatar::endDeferredImpostor() | |||
456 | sShaderLevel = mVertexShaderLevel; | 458 | sShaderLevel = mVertexShaderLevel; |
457 | sVertexProgram->disableTexture(LLViewerShaderMgr::DEFERRED_NORMAL); | 459 | sVertexProgram->disableTexture(LLViewerShaderMgr::DEFERRED_NORMAL); |
458 | sVertexProgram->disableTexture(LLViewerShaderMgr::SPECULAR_MAP); | 460 | sVertexProgram->disableTexture(LLViewerShaderMgr::SPECULAR_MAP); |
461 | sVertexProgram->disableTexture(LLViewerShaderMgr::DIFFUSE_MAP); // KL SD | ||
459 | sVertexProgram->unbind(); | 462 | sVertexProgram->unbind(); |
460 | gGL.getTexUnit(0)->activate(); | 463 | gGL.getTexUnit(0)->activate(); |
461 | } | 464 | } |
@@ -699,7 +702,8 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) | |||
699 | avatarp->mImpostor.bindTexture(1, specular_channel); | 702 | avatarp->mImpostor.bindTexture(1, specular_channel); |
700 | } | 703 | } |
701 | } | 704 | } |
702 | avatarp->renderImpostor(); | 705 | // avatarp->renderImpostor(LLColor4U(255,255,255,255), diffuse_channel); // KL SD |
706 | avatarp->renderImpostor(); | ||
703 | } | 707 | } |
704 | else if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FOOT_SHADOWS) && !LLPipeline::sRenderDeferred) | 708 | else if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FOOT_SHADOWS) && !LLPipeline::sRenderDeferred) |
705 | { | 709 | { |
@@ -752,6 +756,67 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) | |||
752 | 756 | ||
753 | if( !single_avatar || (avatarp == single_avatar) ) | 757 | if( !single_avatar || (avatarp == single_avatar) ) |
754 | { | 758 | { |
759 | if (LLVOAvatar::sShowCollisionVolumes) | ||
760 | { | ||
761 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); | ||
762 | avatarp->renderCollisionVolumes(); | ||
763 | } | ||
764 | |||
765 | if (avatarp->isSelf() && LLAgent::sDebugDisplayTarget) | ||
766 | { | ||
767 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); | ||
768 | LLVector3 pos = avatarp->getPositionAgent(); | ||
769 | |||
770 | gGL.color4f(1.0f, 0.0f, 0.0f, 0.8f); | ||
771 | gGL.begin(LLRender::LINES); | ||
772 | { | ||
773 | gGL.vertex3fv((pos - LLVector3(0.2f, 0.f, 0.f)).mV); | ||
774 | gGL.vertex3fv((pos + LLVector3(0.2f, 0.f, 0.f)).mV); | ||
775 | gGL.vertex3fv((pos - LLVector3(0.f, 0.2f, 0.f)).mV); | ||
776 | gGL.vertex3fv((pos + LLVector3(0.f, 0.2f, 0.f)).mV); | ||
777 | gGL.vertex3fv((pos - LLVector3(0.f, 0.f, 0.2f)).mV); | ||
778 | gGL.vertex3fv((pos + LLVector3(0.f, 0.f, 0.2f)).mV); | ||
779 | }gGL.end(); | ||
780 | |||
781 | pos = avatarp->mDrawable->getPositionAgent(); | ||
782 | gGL.color4f(1.0f, 0.0f, 0.0f, 0.8f); | ||
783 | gGL.begin(LLRender::LINES); | ||
784 | { | ||
785 | gGL.vertex3fv((pos - LLVector3(0.2f, 0.f, 0.f)).mV); | ||
786 | gGL.vertex3fv((pos + LLVector3(0.2f, 0.f, 0.f)).mV); | ||
787 | gGL.vertex3fv((pos - LLVector3(0.f, 0.2f, 0.f)).mV); | ||
788 | gGL.vertex3fv((pos + LLVector3(0.f, 0.2f, 0.f)).mV); | ||
789 | gGL.vertex3fv((pos - LLVector3(0.f, 0.f, 0.2f)).mV); | ||
790 | gGL.vertex3fv((pos + LLVector3(0.f, 0.f, 0.2f)).mV); | ||
791 | }gGL.end(); | ||
792 | |||
793 | pos = avatarp->mRoot.getWorldPosition(); | ||
794 | gGL.color4f(1.0f, 1.0f, 1.0f, 0.8f); | ||
795 | gGL.begin(LLRender::LINES); | ||
796 | { | ||
797 | gGL.vertex3fv((pos - LLVector3(0.2f, 0.f, 0.f)).mV); | ||
798 | gGL.vertex3fv((pos + LLVector3(0.2f, 0.f, 0.f)).mV); | ||
799 | gGL.vertex3fv((pos - LLVector3(0.f, 0.2f, 0.f)).mV); | ||
800 | gGL.vertex3fv((pos + LLVector3(0.f, 0.2f, 0.f)).mV); | ||
801 | gGL.vertex3fv((pos - LLVector3(0.f, 0.f, 0.2f)).mV); | ||
802 | gGL.vertex3fv((pos + LLVector3(0.f, 0.f, 0.2f)).mV); | ||
803 | }gGL.end(); | ||
804 | |||
805 | pos = avatarp->mPelvisp->getWorldPosition(); | ||
806 | gGL.color4f(0.0f, 0.0f, 1.0f, 0.8f); | ||
807 | gGL.begin(LLRender::LINES); | ||
808 | { | ||
809 | gGL.vertex3fv((pos - LLVector3(0.2f, 0.f, 0.f)).mV); | ||
810 | gGL.vertex3fv((pos + LLVector3(0.2f, 0.f, 0.f)).mV); | ||
811 | gGL.vertex3fv((pos - LLVector3(0.f, 0.2f, 0.f)).mV); | ||
812 | gGL.vertex3fv((pos + LLVector3(0.f, 0.2f, 0.f)).mV); | ||
813 | gGL.vertex3fv((pos - LLVector3(0.f, 0.f, 0.2f)).mV); | ||
814 | gGL.vertex3fv((pos + LLVector3(0.f, 0.f, 0.2f)).mV); | ||
815 | }gGL.end(); | ||
816 | |||
817 | color.setColor(1.0f, 1.0f, 1.0f, 1.0f); | ||
818 | } | ||
819 | |||
755 | avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE); | 820 | avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE); |
756 | } | 821 | } |
757 | } | 822 | } |