summaryrefslogtreecommitdiff
path: root/indra/newview/llfetchedgltfmaterial.h
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2023-01-24 17:48:18 -0800
committerCosmic Linden <cosmic@lindenlab.com>2023-01-25 12:34:35 -0800
commit2aaa15fef15243e6b38f46426d8ebb355ccfb807 (patch)
tree718f00f4f3c5eb412199ab1b4c530e3308a647c2 /indra/newview/llfetchedgltfmaterial.h
parenta851aa83e705fa4a1c78919cfcac6709cfb1a875 (diff)
SL-19012: Fix new material IDs sometimes not applying when set via LSL
Diffstat (limited to 'indra/newview/llfetchedgltfmaterial.h')
-rw-r--r--indra/newview/llfetchedgltfmaterial.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/llfetchedgltfmaterial.h b/indra/newview/llfetchedgltfmaterial.h
index 4f6c56012e..f784f19c4f 100644
--- a/indra/newview/llfetchedgltfmaterial.h
+++ b/indra/newview/llfetchedgltfmaterial.h
@@ -39,6 +39,9 @@ public:
LLFetchedGLTFMaterial();
virtual ~LLFetchedGLTFMaterial();
+ // If this material is loaded, fire the given function
+ void onMaterialComplete(std::function<void()> material_complete);
+
// bind this material for rendering
void bind();
@@ -49,9 +52,14 @@ public:
LLPointer<LLViewerFetchedTexture> mEmissiveTexture;
protected:
- //Lifetime management
+ // Lifetime management
+
+ void materialBegin();
+ void materialComplete();
+
F64 mExpectedFlusTime; // since epoch in seconds
bool mActive;
bool mFetching;
+ std::vector<std::function<void()>> materialCompleteCallbacks;
};