diff options
author | Brad Kittenbrink <brad@lindenlab.com> | 2022-10-14 14:33:18 -0700 |
---|---|---|
committer | Brad Kittenbrink <brad@lindenlab.com> | 2022-10-14 14:44:05 -0700 |
commit | 7a3ed9dadc116e73349ec6fcd37eb3aee5916676 (patch) | |
tree | a31c8f5d1871f57a375524d6cc52144510099d8e | |
parent | c6bb0fef90b0c2c6557b933b0bc57cabd66fa572 (diff) |
Added stub handler for GLTF LargeGenericMessage as part of work on SL-18105 SL-17697 and SL-17698
-rw-r--r-- | indra/newview/llgltfmateriallist.cpp | 28 | ||||
-rw-r--r-- | indra/newview/llgltfmateriallist.h | 2 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 4 |
3 files changed, 34 insertions, 0 deletions
diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index 5cbf853179..9c71f11bbc 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -28,13 +28,36 @@ #include "llgltfmateriallist.h" #include "llassetstorage.h" +#include "lldispatcher.h" #include "llfilesystem.h" #include "llsdserialize.h" #include "lltinygltfhelper.h" +#include "llviewergenericmessage.h" #include "tinygltf/tiny_gltf.h" #include <strstream> +namespace +{ + class LLGLTFOverrideDispatchHandler : public LLDispatchHandler + { + public: + LLGLTFOverrideDispatchHandler() = default; + ~LLGLTFOverrideDispatchHandler() override = default; + + bool operator()(const LLDispatcher* dispatcher, const std::string& key, const LLUUID& invoice, const sparam_t& strings) override + { + LL_DEBUGS() << "strings: "; + for (std::string const & s : strings) { + LL_CONT << " " << s; + } + LL_CONT << LL_ENDL; + return true; + } + }; + LLGLTFOverrideDispatchHandler handle_gltf_override_message; +} + LLGLTFMaterialList gGLTFMaterialList; LLGLTFMaterial* LLGLTFMaterialList::getMaterial(const LLUUID& id) @@ -128,3 +151,8 @@ void LLGLTFMaterialList::removeMaterial(const LLUUID& id) mList.erase(id); } +// static +void LLGLTFMaterialList::registerCallbacks() +{ + gGenericDispatcher.addHandler("GLTF", &handle_gltf_override_message); +} diff --git a/indra/newview/llgltfmateriallist.h b/indra/newview/llgltfmateriallist.h index 49760504e6..4aed4b009d 100644 --- a/indra/newview/llgltfmateriallist.h +++ b/indra/newview/llgltfmateriallist.h @@ -44,6 +44,8 @@ public: void addMaterial(const LLUUID& id, LLGLTFMaterial* material); void removeMaterial(const LLUUID& id); + static void registerCallbacks(); + }; extern LLGLTFMaterialList gGLTFMaterialList; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 6aca701fe2..64dd3af223 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -60,6 +60,7 @@ #include "llfloatergridstatus.h" #include "llfloaterimsession.h" #include "lllocationhistory.h" +#include "llgltfmateriallist.h" #include "llimageworker.h" #include "llloginflags.h" @@ -1473,6 +1474,9 @@ bool idle_startup() gXferManager->registerCallbacks(gMessageSystem); display_startup(); + LLGLTFMaterialList::registerCallbacks(); + display_startup(); + LLStartUp::initNameCache(); display_startup(); |