summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.h
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2023-01-19 09:13:45 -0600
committerGitHub <noreply@github.com>2023-01-19 09:13:45 -0600
commit7bd9d21e19b923096ba2b5ea3cbc8be3e13d7aa0 (patch)
treee96b35f6ae7a1377334e467fc324ec17ac6e49c3 /indra/newview/llviewerobject.h
parent1ff3b1ffa54db0f7aaca543e2565e1ac3087d1e0 (diff)
Optimizations, decruft, and intel compatibility pass (#53)
SL-18869, SL-18772 Overhaul VBO management, restore occlusion culling, intel compatibility pass, etc
Diffstat (limited to 'indra/newview/llviewerobject.h')
-rw-r--r--indra/newview/llviewerobject.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 71d7a7ebbb..fae29c3bc2 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -602,6 +602,14 @@ public:
virtual void parameterChanged(U16 param_type, bool local_origin);
virtual void parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_use, bool local_origin);
+ bool isShrinkWrapped() const { return mShouldShrinkWrap; }
+
+ // Used to improve performance. If an object is likely to rebuild its vertex buffer often
+ // as a side effect of some update (color update, scale, etc), setting this to true
+ // will cause it to be pushed deeper into the octree and isolate it from other nodes
+ // so that nearby objects won't attempt to share a vertex buffer with this object.
+ void shrinkWrap();
+
friend class LLViewerObjectList;
friend class LLViewerMediaList;
@@ -866,6 +874,9 @@ protected:
F32 mPhysicsCost;
F32 mLinksetPhysicsCost;
+ // If true, "shrink wrap" this volume in its spatial partition. See "shrinkWrap"
+ bool mShouldShrinkWrap = false;
+
bool mCostStale;
mutable bool mPhysicsShapeUnknown;
@@ -978,7 +989,7 @@ public:
LLStrider<LLColor4U>& emissivep,
LLStrider<U16>& indicesp) = 0;
- virtual void getBlendFunc(S32 face, U32& src, U32& dst);
+ virtual void getBlendFunc(S32 face, LLRender::eBlendFactor& src, LLRender::eBlendFactor& dst);
F32 mDepth;
};