diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-09-22 18:04:03 +0100 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-09-22 18:04:03 +0100 |
| commit | a6068419e7fe1a5a0eda007b2e989769c0a92262 (patch) | |
| tree | 8faf3e8004b6ec1e79d611a86e9c9c131f156702 /indra/newview/llviewerobject.cpp | |
| parent | a634d878098cff98b0622d492f5454a1bd41cff6 (diff) | |
SL-794, SL-790 - viewer-side enforcement in UI for various animated object limits that are also enforced on the server.
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
| -rw-r--r-- | indra/newview/llviewerobject.cpp | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 34e7bc0fad..0140a63e73 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -3580,6 +3580,38 @@ F32 LLViewerObject::getLinksetPhysicsCost() return mLinksetPhysicsCost; } +F32 LLViewerObject::recursiveGetEstTrianglesHigh() const +{ + F32 est_tris = getEstTrianglesHigh(); + for (child_list_t::const_iterator iter = mChildList.begin(); + iter != mChildList.end(); iter++) + { + const LLViewerObject* child = *iter; + est_tris += child->recursiveGetEstTrianglesHigh(); + } + return est_tris; +} + +S32 LLViewerObject::getAnimatedObjectMaxTris() const +{ + S32 max_tris = 0; + LLSD features; + if (getRegion()) + { + getRegion()->getSimulatorFeatures(features); + if (features.has("AnimatedObjects")) + { + max_tris = features["AnimatedObjects"]["AnimatedObjectMaxTris"].asInteger(); + } + } + return max_tris; +} + +F32 LLViewerObject::getEstTrianglesHigh() const +{ + return 0.f; +} + F32 LLViewerObject::getStreamingCost(S32* bytes, S32* visible_bytes, F32* unscaled_value) const { return 0.f; @@ -3698,7 +3730,6 @@ void LLViewerObject::boostTexturePriority(BOOL boost_children /* = TRUE */) } } - void LLViewerObject::setLineWidthForWindowSize(S32 window_width) { if (window_width < 700) |
