diff options
author | Aimee Linden <aimee@lindenlab.com> | 2010-03-29 17:53:21 +0100 |
---|---|---|
committer | Aimee Linden <aimee@lindenlab.com> | 2010-03-29 17:53:21 +0100 |
commit | eb0aaff4aac1dcf9f238242c107df650584efdf9 (patch) | |
tree | b07b612c33f23e820492b06488a8c406856b64c8 /indra/newview/lltoolmorph.cpp | |
parent | fc0906d6e8c1238fe7fd21c185957ca89511e76e (diff) | |
parent | b6e7850c0a3d65ed0a1501e19a1655055000e32f (diff) |
Merge
Diffstat (limited to 'indra/newview/lltoolmorph.cpp')
-rw-r--r-- | indra/newview/lltoolmorph.cpp | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp index c42c47c486..969049ee65 100644 --- a/indra/newview/lltoolmorph.cpp +++ b/indra/newview/lltoolmorph.cpp @@ -139,22 +139,20 @@ void LLVisualParamHint::requestHintUpdates( LLVisualParamHint* exception1, LLVis BOOL LLVisualParamHint::needsRender() { - return mNeedsUpdate && mDelayFrames-- <= 0 && !gAgent.getAvatarObject()->mAppearanceAnimating && mAllowsUpdates; + return mNeedsUpdate && mDelayFrames-- <= 0 && !gAgentAvatarp->mAppearanceAnimating && mAllowsUpdates; } void LLVisualParamHint::preRender(BOOL clear_depth) { - LLVOAvatarSelf* avatarp = gAgent.getAvatarObject(); - mLastParamWeight = mVisualParam->getWeight(); mVisualParam->setWeight(mVisualParamWeight, FALSE); - avatarp->setVisualParamWeight(mVisualParam->getID(), mVisualParamWeight, FALSE); - avatarp->setVisualParamWeight("Blink_Left", 0.f); - avatarp->setVisualParamWeight("Blink_Right", 0.f); - avatarp->updateComposites(); - avatarp->updateVisualParams(); - avatarp->updateGeometry(avatarp->mDrawable); - avatarp->updateLOD(); + gAgentAvatarp->setVisualParamWeight(mVisualParam->getID(), mVisualParamWeight, FALSE); + gAgentAvatarp->setVisualParamWeight("Blink_Left", 0.f); + gAgentAvatarp->setVisualParamWeight("Blink_Right", 0.f); + gAgentAvatarp->updateComposites(); + gAgentAvatarp->updateVisualParams(); + gAgentAvatarp->updateGeometry(gAgentAvatarp->mDrawable); + gAgentAvatarp->updateLOD(); LLViewerDynamicTexture::preRender(clear_depth); } @@ -165,7 +163,6 @@ void LLVisualParamHint::preRender(BOOL clear_depth) BOOL LLVisualParamHint::render() { LLVisualParamReset::sDirty = TRUE; - LLVOAvatarSelf* avatarp = gAgent.getAvatarObject(); gGL.pushUIMatrix(); gGL.loadUIIdentity(); @@ -196,7 +193,7 @@ BOOL LLVisualParamHint::render() const std::string& cam_target_mesh_name = mVisualParam->getCameraTargetName(); if( !cam_target_mesh_name.empty() ) { - cam_target_joint = (LLViewerJointMesh*)avatarp->getJoint( cam_target_mesh_name ); + cam_target_joint = (LLViewerJointMesh*)gAgentAvatarp->getJoint( cam_target_mesh_name ); } if( !cam_target_joint ) { @@ -204,11 +201,11 @@ BOOL LLVisualParamHint::render() } if( !cam_target_joint ) { - cam_target_joint = (LLViewerJointMesh*)avatarp->getJoint("mHead"); + cam_target_joint = (LLViewerJointMesh*)gAgentAvatarp->getJoint("mHead"); } LLQuaternion avatar_rotation; - LLJoint* root_joint = avatarp->getRootJoint(); + LLJoint* root_joint = gAgentAvatarp->getRootJoint(); if( root_joint ) { avatar_rotation = root_joint->getWorldRotation(); @@ -236,17 +233,17 @@ BOOL LLVisualParamHint::render() LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE); - if (avatarp->mDrawable.notNull()) + if (gAgentAvatarp->mDrawable.notNull()) { - LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool(); + LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)gAgentAvatarp->mDrawable->getFace(0)->getPool(); LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE); gGL.setAlphaRejectSettings(LLRender::CF_ALWAYS); gGL.setSceneBlendType(LLRender::BT_REPLACE); - avatarPoolp->renderAvatars(avatarp); // renders only one avatar + avatarPoolp->renderAvatars(gAgentAvatarp); // renders only one avatar gGL.setSceneBlendType(LLRender::BT_ALPHA); gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); } - avatarp->setVisualParamWeight(mVisualParam->getID(), mLastParamWeight); + gAgentAvatarp->setVisualParamWeight(mVisualParam->getID(), mLastParamWeight); mVisualParam->setWeight(mLastParamWeight, FALSE); gGL.color4f(1,1,1,1); mGLTexturep->setGLTextureCreated(true); @@ -297,10 +294,9 @@ BOOL LLVisualParamReset::render() { if (sDirty) { - LLVOAvatarSelf* avatarp = gAgent.getAvatarObject(); - avatarp->updateComposites(); - avatarp->updateVisualParams(); - avatarp->updateGeometry(avatarp->mDrawable); + gAgentAvatarp->updateComposites(); + gAgentAvatarp->updateVisualParams(); + gAgentAvatarp->updateGeometry(gAgentAvatarp->mDrawable); sDirty = FALSE; } |