diff options
| author | Dave Parks <davep@lindenlab.com> | 2023-03-10 10:52:35 -0600 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2023-03-10 10:52:35 -0600 |
| commit | 25ede8638209fac8dde5b71bece4bc1dfa30ea16 (patch) | |
| tree | ce5deda0c12a9e157c07cb72001eda396b1a542e /indra/llrender/llrender.h | |
| parent | cf72c8ec614fcfc2811f10dfacdc51ed3f477e31 (diff) | |
SL-19172 Texture streaming tune up. Incidental decruft.
Diffstat (limited to 'indra/llrender/llrender.h')
| -rw-r--r-- | indra/llrender/llrender.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index e8baf6bb7e..6f61627235 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -52,6 +52,9 @@ class LLTexture ; #define LL_MATRIX_STACK_DEPTH 32 +constexpr U32 LL_NUM_TEXTURE_LAYERS = 32; +constexpr U32 LL_NUM_LIGHT_UNITS = 8; + class LLTexUnit { friend class LLRender; @@ -135,7 +138,7 @@ public: TCS_SRGB } eTextureColorSpace; - LLTexUnit(S32 index); + LLTexUnit(S32 index = -1); // Refreshes renderer state of the texture unit to the cached values // Needed when the render context has changed and invalidated the current state @@ -212,7 +215,9 @@ public: eTextureColorSpace getCurrColorSpace() { return mTexColorSpace; } protected: - const S32 mIndex; + friend class LLRender; + + S32 mIndex; U32 mCurrTexture; eTextureType mCurrTexType; eTextureColorSpace mTexColorSpace; @@ -230,7 +235,7 @@ protected: class LLLightState { public: - LLLightState(S32 index); + LLLightState(S32 index = -1); void enable(); void disable(); @@ -488,9 +493,9 @@ private: LLStrider<LLVector3> mVerticesp; LLStrider<LLVector2> mTexcoordsp; LLStrider<LLColor4U> mColorsp; - std::vector<LLTexUnit*> mTexUnits; - LLTexUnit* mDummyTexUnit; - std::vector<LLLightState*> mLightState; + std::array<LLTexUnit, LL_NUM_TEXTURE_LAYERS> mTexUnits; + LLTexUnit mDummyTexUnit; + std::array<LLLightState, LL_NUM_LIGHT_UNITS> mLightState; eBlendFactor mCurrBlendColorSFactor; eBlendFactor mCurrBlendColorDFactor; |
