From 7bd9d21e19b923096ba2b5ea3cbc8be3e13d7aa0 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Thu, 19 Jan 2023 09:13:45 -0600 Subject: Optimizations, decruft, and intel compatibility pass (#53) SL-18869, SL-18772 Overhaul VBO management, restore occlusion culling, intel compatibility pass, etc --- indra/newview/llviewerobject.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerobject.h') 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& emissivep, LLStrider& indicesp) = 0; - virtual void getBlendFunc(S32 face, U32& src, U32& dst); + virtual void getBlendFunc(S32 face, LLRender::eBlendFactor& src, LLRender::eBlendFactor& dst); F32 mDepth; }; -- cgit v1.2.3