diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-06-11 10:21:19 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-06-11 10:21:19 -0400 |
commit | 30f4163b7b576d96533b61d9b31243960fb83f2e (patch) | |
tree | bd5dc1450e08c674a4619d7f16a9a4816005f9c4 /indra/newview/llfetchedgltfmaterial.h | |
parent | 3d1aac4f5c369e9d402c41f1c790d9015f7c7773 (diff) | |
parent | f5e2708a0fc4e08d3d0a5dc393bbd4bac09e1c55 (diff) |
Merge branch 'main' of github.com:secondlife/viewer into lua-bradfix
to pick up Featurettes promotion + Brad's GitHub Windows build workaround.
Diffstat (limited to 'indra/newview/llfetchedgltfmaterial.h')
-rw-r--r-- | indra/newview/llfetchedgltfmaterial.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/indra/newview/llfetchedgltfmaterial.h b/indra/newview/llfetchedgltfmaterial.h index 3352438660..7550c75b45 100644 --- a/indra/newview/llfetchedgltfmaterial.h +++ b/indra/newview/llfetchedgltfmaterial.h @@ -40,6 +40,8 @@ public: virtual ~LLFetchedGLTFMaterial(); LLFetchedGLTFMaterial& operator=(const LLFetchedGLTFMaterial& rhs); + // LLGLTFMaterial::operator== is defined, but LLFetchedGLTFMaterial::operator== is not. + bool operator==(const LLGLTFMaterial& rhs) const = delete; // If this material is loaded, fire the given function void onMaterialComplete(std::function<void()> material_complete); @@ -49,8 +51,7 @@ public: void bind(LLViewerTexture* media_tex = nullptr); bool isFetching() const { return mFetching; } - - LLPointer<LLViewerFetchedTexture> getUITexture(); + bool isLoaded() const { return !mFetching && mFetchSuccess; } void addTextureEntry(LLTextureEntry* te) override; void removeTextureEntry(LLTextureEntry* te) override; @@ -65,18 +66,18 @@ public: std::set<LLTextureEntry*> mTextureEntires; - // Texture used for previewing the material in the UI - LLPointer<LLViewerFetchedTexture> mPreviewTexture; - + // default material for when assets don't have one + static LLFetchedGLTFMaterial sDefault; protected: // Lifetime management - + void materialBegin(); - void materialComplete(); + void materialComplete(bool success); F64 mExpectedFlusTime; // since epoch in seconds - bool mActive; - bool mFetching; + bool mActive = true; + bool mFetching = false; + bool mFetchSuccess = false; std::vector<std::function<void()>> materialCompleteCallbacks; }; |