From bf512216323f3df55627421bb0187ed364d58340 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Wed, 1 Sep 2021 00:18:04 +0200 Subject: White furnace test on gltf scenes & load normals --- include/gltf.hpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'include/gltf.hpp') diff --git a/include/gltf.hpp b/include/gltf.hpp index 7008e8a..6633811 100644 --- a/include/gltf.hpp +++ b/include/gltf.hpp @@ -9,12 +9,14 @@ using json = nlohmann::json; -#include +#include "material.hpp" +#include "vec3.hpp" struct mesh_part { - std::vector indices; - std::vector positions; - // std::vector normals; + std::vector indices; + std::vector positions; + std::vector normals; + material mat; }; struct mesh { @@ -34,9 +36,11 @@ private: static void load_node(json &gltf_json, uint32_t index, node &parent, std::vector &meshes); - static std::vector load_meshes(json &gltf_json, std::vector> &buffers_content); + static std::vector load_meshes(json &gltf_json, std::vector> &buffers_content, std::vector &materials); - static mesh_part load_primitive(json &gltf_json, json &primitive, std::vector> &buffers_content); + static std::vector load_materials(json &gltf_json); + + static mesh_part load_primitive(json &gltf_json, json &primitive, std::vector> &buffers_content, std::vector &materials); }; #endif -- cgit v1.3