fix VEC3 loader

This commit is contained in:
MihailRis 2024-10-25 10:09:36 +03:00
parent 30725c80c7
commit 5c019c53f0
2 changed files with 5 additions and 0 deletions

View File

@ -103,6 +103,7 @@ static model::Mesh build_mesh(
if (normals) {
vertex.normal = normals[indices[i * attrsCount + normalsIndex]];
}
vertices.push_back(std::move(vertex));
}
return model::Mesh {texture, std::move(vertices)};
}

View File

@ -30,6 +30,10 @@ namespace vec3 {
struct File {
std::unordered_map<std::string, Model> models;
std::vector<Material> materials;
File(File&&) = default;
File& operator=(File&&) = default;
};
File load(const std::string_view file, const util::Buffer<ubyte>& src);