diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-07-14 15:23:52 +0300 | 
|---|---|---|
| committer | Andrey Lihatskiy <118752495+marchcat@users.noreply.github.com> | 2025-07-14 13:22:41 +0000 | 
| commit | 63134f79434481a450a146eae76f90a9f86091a4 (patch) | |
| tree | d7c04396c625f7bcd919faf9b3d6c7d6a2074a9d /indra/newview/gltf/llgltfloader.h | |
| parent | 07d0fbe94e89d0509b64232858e384a439810bb8 (diff) | |
#4204 Cache processed materials
Diffstat (limited to 'indra/newview/gltf/llgltfloader.h')
| -rw-r--r-- | indra/newview/gltf/llgltfloader.h | 4 | 
1 files changed, 4 insertions, 0 deletions
| 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<S32>                    mValidJointsCount; +    // Material cache to avoid duplicate processing +    std::map<S32, LLImportMaterial>     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<std::string, S32>& 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(); | 
