summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llvoavatar.h2
-rw-r--r--indra/newview/llvoavatarself.cpp9
-rw-r--r--indra/newview/llvoavatarself.h4
3 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 263c3dadf6..a2232d21a2 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -547,7 +547,7 @@ public:
U32 renderTransparent(bool first_pass);
void renderCollisionVolumes();
void renderBones(const std::string &selected_joint = std::string());
- void renderJoints();
+ virtual void renderJoints();
static void deleteCachedImages(bool clearAll=true);
static void destroyGL();
static void restoreGL();
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 746ef7cacb..f23af5afa4 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -697,6 +697,7 @@ void LLVOAvatarSelf::idleUpdate(LLAgent &agent, const F64 &time)
// virtual
LLJoint *LLVOAvatarSelf::getJoint(const std::string &name)
{
+ std::lock_guard lock(mJointMapMutex);
LLJoint *jointp = NULL;
jointp = LLVOAvatar::getJoint(name);
if (!jointp && mScreenp)
@@ -714,6 +715,14 @@ LLJoint *LLVOAvatarSelf::getJoint(const std::string &name)
return jointp;
}
+
+//virtual
+void LLVOAvatarSelf::renderJoints()
+{
+ std::lock_guard lock(mJointMapMutex);
+ LLVOAvatar::renderJoints();
+}
+
// virtual
bool LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 weight)
{
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 051ac791c0..f9bea41b1d 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -92,6 +92,8 @@ public:
/*virtual*/ void requestStopMotion(LLMotion* motion);
/*virtual*/ LLJoint* getJoint(const std::string &name);
+ /*virtual*/ void renderJoints();
+
/*virtual*/ bool setVisualParamWeight(const LLVisualParam *which_param, F32 weight);
/*virtual*/ bool setVisualParamWeight(const char* param_name, F32 weight);
/*virtual*/ bool setVisualParamWeight(S32 index, F32 weight);
@@ -103,6 +105,8 @@ private:
// helper function. Passed in param is assumed to be in avatar's parameter list.
bool setParamWeight(const LLViewerVisualParam *param, F32 weight);
+ std::mutex mJointMapMutex; // getJoint gets used from mesh thread
+
/********************************************************************************
** **
** STATE