message: Supply default normals, tex-coords and colors
diff: @@ -905,6 +905,24 @@ std::shared_ptr<sg::node> vsnray_parser::parse_triangle_mesh(Object const& obj)
  );
  }
  }
  + else
  + {
  + for (size_t i = 0; i < mesh->vertices.size(); i += 3)
  + {
  + vec3 v1 = mesh->vertices[i];
  + vec3 v2 = mesh->vertices[i + 1];
  + vec3 v3 = mesh->vertices[i + 2];
  +
  + vec3 e1 = v2 - v1;
  + vec3 e2 = v3 - v1;
  +
  + vec3 gn = normalize(cross(e1, e2));
  +
  + mesh->normals.emplace_back(gn);
  + mesh->normals.emplace_back(gn);
  + mesh->normals.emplace_back(gn);
  + }
  + }
  if (obj.HasMember("tex_coords"))
  {
  @@ -918,6 +936,15 @@ std::shared_ptr<sg::node> vsnray_parser::parse_triangle_mesh(Object const& obj)
  );
  }
  }
  + else
  + {
  + for (size_t i = 0; i < mesh->vertices.size(); i += 3)
  + {
  + mesh->tex_coords.emplace_back(0.0f, 0.0f);
  + mesh->tex_coords.emplace_back(0.0f, 0.0f);
  + mesh->tex_coords.emplace_back(0.0f, 0.0f);
  + }
  + }
  if (obj.HasMember("colors"))
  {
  @@ -932,6 +959,15 @@ std::shared_ptr<sg::node> vsnray_parser::parse_triangle_mesh(Object const& obj)
  );
  }
  }
  + else
  + {
  + for (size_t i = 0; i < mesh->vertices.size(); i += 3)
  + {
  + mesh->colors.emplace_back(1.0f, 1.0f, 1.0f);
  + mesh->colors.emplace_back(1.0f, 1.0f, 1.0f);
  + mesh->colors.emplace_back(1.0f, 1.0f, 1.0f);
  + }
  + }
  return mesh;
  }
  