From c5119193ffaedf4ac94fecfb434a3292a4746259 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Sun, 26 Sep 2021 23:57:26 +0200 Subject: Refactor gltf loading and triangles attributes --- src/gltf.cpp | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) (limited to 'src/gltf.cpp') diff --git a/src/gltf.cpp b/src/gltf.cpp index bfd7522..61c68ac 100644 --- a/src/gltf.cpp +++ b/src/gltf.cpp @@ -8,8 +8,6 @@ #include "utils.hpp" -const vec3 scale (0.00800000037997961); - node gltf::load(std::filesystem::path &path, std::string &filename, vkrenderer &renderer) { std::fstream f(path / filename); json gltf_json; @@ -73,7 +71,10 @@ std::vector gltf::load_meshes(json &gltf_json, std::vector()]; + part.vertices_count = part.positions.size() / 3; + part.triangles_count = part.indices.size() / 3; return std::move(part); } -- cgit v1.3