This commit is contained in:
Guillaume Meunier
2024-01-28 11:33:34 +01:00
parent 7ee4e9a4d2
commit 8dbd47c859
12 changed files with 802 additions and 55 deletions
+5 -1
View File
@@ -603,8 +603,12 @@ public:
materials.reserve(gltf.materials.size());
for (const fastgltf::Material & gltf_material: gltf.materials)
{
// Copy the default material
// Copy the default material, without references to its buffer or descriptor set
auto & material_ref = *materials.emplace_back(std::make_shared<scene_data::material>(default_material));
material_ref.name = gltf_material.name;
spdlog::info("Loading material \"{}\"", material_ref.name);
material_ref.buffer.reset();
material_ref.ds.reset();
scene_data::material::gpu_data & material_data = material_ref.staging;