From 63134f79434481a450a146eae76f90a9f86091a4 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Mon, 14 Jul 2025 15:23:52 +0300 Subject: #4204 Cache processed materials --- indra/newview/gltf/llgltfloader.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/gltf/llgltfloader.h') diff --git a/indra/newview/gltf/llgltfloader.h b/indra/newview/gltf/llgltfloader.h index 3a9531bf7b..b4c6e0c66c 100644 --- a/indra/newview/gltf/llgltfloader.h +++ b/indra/newview/gltf/llgltfloader.h @@ -131,11 +131,15 @@ protected: // per skin joint count, needs to be tracked for the sake of limits check. std::vector mValidJointsCount; + // Material cache to avoid duplicate processing + std::map mMaterialCache; + private: bool parseMeshes(); void computeCombinedNodeTransform(const LL::GLTF::Asset& asset, S32 node_index, glm::mat4& combined_transform) const; void processNodeHierarchy(S32 node_idx, std::map& mesh_name_counts, U32 submodel_limit, const LLVolumeParams& volume_params); bool addJointToModelSkin(LLMeshSkinInfo& skin_info, S32 gltf_skin_idx, size_t gltf_joint_idx); + LLImportMaterial processMaterial(S32 material_index); bool populateModelFromMesh(LLModel* pModel, const std::string& base_name, const LL::GLTF::Mesh &mesh, const LL::GLTF::Node &node, material_map& mats); void populateJointsFromSkin(S32 skin_idx); void populateJointGroups(); -- cgit v1.2.3