diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2022-07-19 23:52:56 +0200 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2022-07-19 23:52:56 +0200 |
| commit | 9cf2e341adfdb389c0dd8eb9a621d83ccba78826 (patch) | |
| tree | 0f54383d6f0c7a709cd98b02259b722c76baa4b8 /src/gltf.cpp | |
| parent | 715ab680e68f62a3a00777e81b18f8e64110058d (diff) | |
Fix window resize on windows
Diffstat (limited to 'src/gltf.cpp')
| -rw-r--r-- | src/gltf.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gltf.cpp b/src/gltf.cpp index a044842..adb58d2 100644 --- a/src/gltf.cpp +++ b/src/gltf.cpp @@ -22,8 +22,8 @@ node gltf::load(std::filesystem::path &path, std::string &filename, vkrenderer & auto buffers_content = std::vector<std::vector<uint8_t>>(buffers.size()); for (size_t buffer_index{0}; buffer_index < buffers.size(); buffer_index++) { auto& buffer = buffers[buffer_index]; - auto buffer_path = (path / buffer["uri"].get<std::string>()).string(); - buffers_content[buffer_index] = read_file(buffer_path); + auto buffer_path = path / buffer["uri"].get<std::string>(); + buffers_content[buffer_index] = read_file(buffer_path.string().c_str()); } auto textures = load_textures(gltf_json, path, renderer); @@ -40,6 +40,8 @@ node gltf::load(std::filesystem::path &path, std::string &filename, vkrenderer & load_node(gltf_json, root_children[child_index].get<uint32_t>(), root_node.children[child_index], meshes); } + f.close(); + return root_node; } |
