diff --git a/gltf/gltfpack.cpp b/gltf/gltfpack.cpp index 202fd772..d45a42b7 100644 --- a/gltf/gltfpack.cpp +++ b/gltf/gltfpack.cpp @@ -2,7 +2,7 @@ #include "gltfpack.h" #include -#include +#include #include #include @@ -329,6 +329,18 @@ static bool isExtensionSupported(const ExtensionInfo* extensions, size_t count, return false; } +namespace std +{ +template <> +struct hash > +{ + size_t operator()(const std::pair& x) const + { + return std::hash()(x.first ^ x.second); + } +}; +} // namespace std + static void process(cgltf_data* data, const char* input_path, const char* output_path, const char* report_path, std::vector& meshes, std::vector& animations, const Settings& settings, std::string& json, std::string& bin, std::string& fallback, size_t& fallback_size) { if (settings.verbose) @@ -565,7 +577,7 @@ static void process(cgltf_data* data, const char* input_path, const char* output ext_texture_transform = ext_texture_transform || mi.uses_texture_transform; } - std::map, std::pair > primitive_cache; + std::unordered_map, std::pair > primitive_cache; for (size_t i = 0; i < meshes.size(); ++i) {