Only expose the image view for textures in the scene data

This commit is contained in:
Guillaume Meunier
2024-01-28 11:33:34 +01:00
parent 9132e3040e
commit 11b5d501b8
3 changed files with 11 additions and 5 deletions
+4 -1
View File
@@ -557,7 +557,10 @@ public:
if (gltf_texture.imageIndex)
{
texture_ref.image_ = images.at(*gltf_texture.imageIndex);
std::shared_ptr<scene_data::image> image = images.at(*gltf_texture.imageIndex);
// Use the aliasing constructor so that the image_view has the same lifetime as the image
texture_ref.image_view = std::shared_ptr<vk::raii::ImageView>(image, &image->image_view);
}
// else if (gltf_texture.basisuImageIndex)
// {