message: Ptex cache is global but texture map is per file
diff: @@ -599,8 +599,6 @@ void load_moana(std::string const& filename, model& mod)
  void load_moana(std::vector<std::string> const& filenames, model& mod)
  {
  - // Textures, init with one empty texture
  - std::map<std::string, std::shared_ptr<sg::texture>> textures;
  #if VSNRAY_COMMON_HAVE_PTEX
  std::shared_ptr<PtexPtr<PtexCache>> texture_cache = std::make_shared<PtexPtr<PtexCache>>(
  Ptex::PtexCache::create(
  @@ -610,6 +608,19 @@ void load_moana(std::vector<std::string> const& filenames, model& mod)
  nullptr
  )
  );
  +#endif
  +
  + auto root = std::make_shared<sg::node>();
  +
  + for (auto filename : filenames)
  + {
  + // Materials map
  + std::map<std::string, std::shared_ptr<sg::disney_material>> materials;
  +
  + // Textures, init with one empty texture
  + std::map<std::string, std::shared_ptr<sg::texture>> textures;
  +
  +#if VSNRAY_COMMON_HAVE_PTEX
  auto dummy = std::make_shared<sg::ptex_texture>("null", texture_cache);
  #else
  // No texture cache..
  @@ -624,13 +635,6 @@ void load_moana(std::vector<std::string> const& filenames, model& mod)
  textures.insert(std::make_pair("null", dummy));
  - auto root = std::make_shared<sg::node>();
  -
  - for (auto filename : filenames)
  - {
  - // Materials map
  - std::map<std::string, std::shared_ptr<sg::disney_material>> materials;
  -
  std::cout << "Load moana file: " << filename << '\n';
  cfile file(filename, "r");
  if (!file.good())
  