summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.h
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-05-20 02:06:08 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-05-20 02:06:08 +0300
commitc50f96b49215b4279192ffc3eb336a3465a00756 (patch)
treeda923846a177ea97882dd0ba07b9235a5f0e7b8b /indra/newview/llvoavatar.h
parentd3de134da047460c68ffd7cc732e592049a1e83d (diff)
parentb25a22a2c113a1e95f2cd5d45bb5b80a756c4a80 (diff)
Merged in lindenlab/viewer-lynx
Diffstat (limited to 'indra/newview/llvoavatar.h')
-rw-r--r--[-rwxr-xr-x]indra/newview/llvoavatar.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 09d8662034..418cca519d 100755..100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -253,20 +253,22 @@ public:
// force all name tags to rebuild, useful when display names turned on/off
static void invalidateNameTags();
void addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font);
- void idleUpdateRenderCost();
- void calculateUpdateRenderCost();
- void updateVisualComplexity() { mVisualComplexityStale = TRUE; }
+ void idleUpdateRenderComplexity();
+ void calculateUpdateRenderComplexity();
+ static const U32 VISUAL_COMPLEXITY_UNKNOWN;
+ void updateVisualComplexity();
- S32 getVisualComplexity() { return mVisualComplexity; }; // Numbers calculated here by rendering AV
- S32 getAttachmentGeometryBytes() { return mAttachmentGeometryBytes; }; // number of bytes in attached geometry
+ U32 getVisualComplexity() { return mVisualComplexity; }; // Numbers calculated here by rendering AV
F32 getAttachmentSurfaceArea() { return mAttachmentSurfaceArea; }; // estimated surface area of attachments
+ void addAttachmentArea(F32 delta_area);
+ void subtractAttachmentArea(F32 delta_area);
- S32 getReportedVisualComplexity() { return mReportedVisualComplexity; }; // Numbers as reported by the SL server
- void setReportedVisualComplexity(S32 value) { mReportedVisualComplexity = value; };
+ U32 getReportedVisualComplexity() { return mReportedVisualComplexity; }; // Numbers as reported by the SL server
+ void setReportedVisualComplexity(U32 value) { mReportedVisualComplexity = value; };
S32 getUpdatePeriod() { return mUpdatePeriod; };
const LLColor4 & getMutedAVColor() { return mMutedAVColor; };
-
+ static void updateImpostorRendering(U32 newMaxNonImpostorsValue);
void idleUpdateBelowWater();
@@ -276,10 +278,12 @@ public:
public:
static S32 sRenderName;
static BOOL sRenderGroupTitles;
- static U32 sMaxVisible; //(affected by control "RenderAvatarMaxVisible")
+ static const U32 IMPOSTORS_OFF; /* Must equal the maximum allowed the RenderAvatarMaxNonImpostors
+ * slider in panel_preferences_graphics1.xml */
+ static U32 sMaxNonImpostors; //(affected by control "RenderAvatarMaxNonImpostors")
static F32 sRenderDistance; //distance at which avatars will render.
static BOOL sShowAnimationDebug; // show animation debug info
- static BOOL sUseImpostors; //use impostors for far away avatars
+ static bool sUseImpostors; //use impostors for far away avatars
static BOOL sShowFootPlane; // show foot collision plane reported by server
static BOOL sShowCollisionVolumes; // show skeletal collision volumes
static BOOL sVisibleInFirstPerson;
@@ -303,9 +307,9 @@ public:
//--------------------------------------------------------------------
public:
BOOL isFullyLoaded() const;
- bool isTooComplex() const;
+ bool isTooComplex() const;
bool visualParamWeightsAreDefault();
- virtual BOOL getIsCloud() const;
+ virtual bool getIsCloud() const;
BOOL isFullyTextured() const;
BOOL hasGray() const;
S32 getRezzedStatus() const; // 0 = cloud, 1 = gray, 2 = textured, 3 = textured and fully downloaded.
@@ -321,7 +325,7 @@ public:
static void logPendingPhasesAllAvatars();
void logMetricsTimerRecord(const std::string& phase_name, F32 elapsed, bool completed);
- static LLColor4 calcMutedAVColor(F32 value, S32 range_low, S32 range_high);
+ void calcMutedAVColor();
protected:
LLViewerStats::PhaseMap& getPhases() { return mPhases; }
@@ -336,8 +340,6 @@ private:
BOOL mPreviousFullyLoaded;
BOOL mFullyLoadedInitialized;
S32 mFullyLoadedFrameCounter;
- S32 mVisualComplexity;
- BOOL mVisualComplexityStale;
LLColor4 mMutedAVColor;
LLFrameTimer mFullyLoadedTimer;
LLFrameTimer mRuthTimer;
@@ -386,16 +388,15 @@ public:
U32 renderImpostor(LLColor4U color = LLColor4U(255,255,255,255), S32 diffuse_channel = 0);
bool isVisuallyMuted();
bool isInMuteList();
- void setCachedVisualMute(bool muted) { mCachedVisualMute = muted; };
void forceUpdateVisualMuteSettings();
enum VisualMuteSettings
{
- VISUAL_MUTE_NOT_SET = 0,
- ALWAYS_VISUAL_MUTE = 1,
- NEVER_VISUAL_MUTE = 2
+ AV_RENDER_NORMALLY = 0,
+ AV_DO_NOT_RENDER = 1,
+ AV_ALWAYS_RENDER = 2
};
- void setVisualMuteSettings(VisualMuteSettings set) { mVisuallyMuteSetting = set; };
+ void setVisualMuteSettings(VisualMuteSettings set);
VisualMuteSettings getVisualMuteSettings() { return mVisuallyMuteSetting; };
U32 renderRigid();
@@ -408,12 +409,9 @@ public:
static void destroyGL();
static void restoreGL();
S32 mSpecialRenderMode; // special lighting
- S32 mAttachmentGeometryBytes; //number of bytes in attached geometry
+
+ private:
F32 mAttachmentSurfaceArea; //estimated surface area of attachments
-
- S32 mReportedVisualComplexity; // Numbers as reported by the SL server
-
-private:
bool shouldAlphaMask();
BOOL mNeedsSkin; // avatar has been animated and verts have not been updated
@@ -422,8 +420,10 @@ private:
S32 mUpdatePeriod;
S32 mNumInitFaces; //number of faces generated when creating the avatar drawable, does not inculde splitted faces due to long vertex buffer.
- bool mCachedVisualMute; // cached return value for isVisuallyMuted()
- F64 mCachedVisualMuteUpdateTime; // Time to update mCachedVisualMute
+ // the isTooComplex method uses these mutable values to avoid recalculating too frequently
+ mutable U32 mVisualComplexity;
+ mutable bool mVisualComplexityStale;
+ U32 mReportedVisualComplexity; // from other viewers through the simulator
bool mCachedInMuteList;
F64 mCachedMuteListUpdateTime;
@@ -469,6 +469,7 @@ private:
//--------------------------------------------------------------------
public:
BOOL isImpostor();
+ BOOL shouldImpostor(const U32 rank_factor = 1) const;
BOOL needsImpostorUpdate() const;
const LLVector3& getImpostorOffset() const;
const LLVector2& getImpostorDim() const;
@@ -703,7 +704,6 @@ private:
public:
BOOL isVisible() const;
void setVisibilityRank(U32 rank);
- U32 getVisibilityRank() const { return mVisibilityRank; } // unused
static S32 sNumVisibleAvatars; // Number of instances of this class
/** Appearance
** **