diff options
author | cosmic-linden <111533034+cosmic-linden@users.noreply.github.com> | 2024-02-08 13:46:15 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-08 13:46:15 -0800 |
commit | 1a353aafb72cafb1d21626a2ba47e41e3716c9b1 (patch) | |
tree | b132b14ec64b24ce6bd4cd7a35ea5d03b995aa7a /indra/newview/llvlcomposition.h | |
parent | ba9bae05706982f982df8d615a28ac9c7c3c51fe (diff) | |
parent | 9c6e351e05d7e0580700f040af8161da52de7a08 (diff) |
Merge pull request #768 from secondlife/vi-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; |