fix VEC3 loader
This commit is contained in:
@@ -103,6 +103,7 @@ static model::Mesh build_mesh(
|
|||||||
if (normals) {
|
if (normals) {
|
||||||
vertex.normal = normals[indices[i * attrsCount + normalsIndex]];
|
vertex.normal = normals[indices[i * attrsCount + normalsIndex]];
|
||||||
}
|
}
|
||||||
|
vertices.push_back(std::move(vertex));
|
||||||
}
|
}
|
||||||
return model::Mesh {texture, std::move(vertices)};
|
return model::Mesh {texture, std::move(vertices)};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ namespace vec3 {
|
|||||||
struct File {
|
struct File {
|
||||||
std::unordered_map<std::string, Model> models;
|
std::unordered_map<std::string, Model> models;
|
||||||
std::vector<Material> materials;
|
std::vector<Material> materials;
|
||||||
|
|
||||||
|
File(File&&) = default;
|
||||||
|
|
||||||
|
File& operator=(File&&) = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
File load(const std::string_view file, const util::Buffer<ubyte>& src);
|
File load(const std::string_view file, const util::Buffer<ubyte>& src);
|
||||||
|
|||||||
Reference in New Issue
Block a user