diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2024-02-08 13:24:16 -0800 |
---|---|---|
committer | Cosmic Linden <cosmic@lindenlab.com> | 2024-02-08 13:24:16 -0800 |
commit | 9c6e351e05d7e0580700f040af8161da52de7a08 (patch) | |
tree | 0632ecc0349c5978634dccdfb38a4c985fa89a22 /indra/newview/llvlcomposition.h | |
parent | 43b4159c8c2ca9ed1ff11399ac09e5496db9d271 (diff) |
secondlife/viewer-issues#67: Improve PBR terrain loading robustness
Diffstat (limited to 'indra/newview/llvlcomposition.h')
-rw-r--r-- | indra/newview/llvlcomposition.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/newview/llvlcomposition.h b/indra/newview/llvlcomposition.h index d59c0f95bb..73bfca6ed4 100644 --- a/indra/newview/llvlcomposition.h +++ b/indra/newview/llvlcomposition.h @@ -61,12 +61,16 @@ public: LLUUID getDetailAssetID(S32 asset); virtual void setDetailAssetID(S32 asset, const LLUUID& id); Type getMaterialType(); - BOOL texturesReady(BOOL boost = FALSE); - BOOL materialsReady(BOOL boost = FALSE); + bool texturesReady(bool boost, bool strict); + // strict = true -> all materials must be sufficiently loaded + // strict = false -> at least one material must be loaded + bool materialsReady(bool boost, bool strict); protected: - static BOOL textureReady(LLPointer<LLViewerFetchedTexture>& tex, BOOL boost = FALSE); - static BOOL materialReady(LLPointer<LLFetchedGLTFMaterial>& mat, bool& textures_set, BOOL boost = FALSE); + static bool textureReady(LLPointer<LLViewerFetchedTexture>& tex, bool boost); + // strict = true -> all materials must be sufficiently loaded + // strict = false -> at least one material must be loaded + static bool materialReady(LLPointer<LLFetchedGLTFMaterial>& mat, bool& textures_set, bool boost, bool strict); LLPointer<LLViewerFetchedTexture> mDetailTextures[ASSET_COUNT]; LLPointer<LLFetchedGLTFMaterial> mDetailMaterials[ASSET_COUNT]; bool mMaterialTexturesSet[ASSET_COUNT]; @@ -116,8 +120,8 @@ public: BOOL getParamsReady() const { return mParamsReady; } protected: - static BOOL textureReady(LLPointer<LLViewerFetchedTexture>& tex, BOOL boost = FALSE); - static BOOL materialReady(LLPointer<LLFetchedGLTFMaterial>& mat, bool& textures_set, BOOL boost = FALSE); + static bool textureReady(LLPointer<LLViewerFetchedTexture>& tex, bool boost = false); + static bool materialReady(LLPointer<LLFetchedGLTFMaterial>& mat, bool& textures_set, bool boost = false); BOOL mParamsReady = FALSE; LLSurface *mSurfacep; |