From b4d24e8f2cb4838acc0b827f007e7faa609039ba Mon Sep 17 00:00:00 2001 From: ladevieq Date: Wed, 24 Dec 2025 15:35:21 +0100 Subject: Use build.bat for building Everything is included in main.cpp Do not rely on vcpkg anymore --- src/gltf.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/gltf.cpp') diff --git a/src/gltf.cpp b/src/gltf.cpp index e868357..4cdfdce 100644 --- a/src/gltf.cpp +++ b/src/gltf.cpp @@ -1,8 +1,6 @@ #include "gltf.hpp" -#include #include -#include #include #ifndef API_TEST @@ -20,10 +18,6 @@ #include "vk-renderer.hpp" #endif -#ifdef TRACY_ENABLE -#include "tracy/Tracy.hpp" -#endif - gltf::gltf(const std::filesystem::path& filepath) { auto parent_path = filepath.parent_path(); std::fstream f{ filepath }; @@ -50,7 +44,7 @@ gltf::gltf(const std::filesystem::path& filepath) { load_meshes(); auto& root_children = scene["nodes"]; - uint32_t root_children_count = scene["nodes"].size(); + size_t root_children_count = scene["nodes"].size(); root_node.children.resize(root_children_count); for (size_t child_index = 0; child_index < root_children_count; child_index++) { @@ -163,7 +157,7 @@ void gltf::load_textures(const std::filesystem::path& path) { }; graphics_command_buffer command_buffers[buffers_count]; - device.allocate_command_buffers(command_buffers, buffers_count, QueueType::GRAPHICS); + device.allocate_command_buffers(command_buffers, buffers_count, QueueType::GRAPHICS, "upload_buffer"); auto buffer_index = 0U; auto command_buffer = command_buffers[buffer_index]; auto buffer_handle = staging_buffers_handle[buffer_index]; @@ -279,10 +273,10 @@ void gltf::load_materials() { if (pbr_params.contains("baseColorFactor")) { const auto& base_color = pbr_params["baseColorFactor"]; - material.base_color.v[0] = base_color[0].get(); - material.base_color.v[1] = base_color[1].get(); - material.base_color.v[2] = base_color[2].get(); - material.base_color.v[3] = base_color[3].get(); + material.base_color.set<0>(base_color[0].get()); + material.base_color.set<1>(base_color[1].get()); + material.base_color.set<2>(base_color[2].get()); + material.base_color.arr[3] = base_color[3].get(); // Since we use a vec3 for colors we are not allowed toset fourth value with set<3> } else { material.base_color = vec3(1.f); } -- cgit v1.3