File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ namespace vsg
5050 {
5151 VkImageView imageView = VK_NULL_HANDLE ;
5252 ref_ptr<Device> device;
53+ ref_ptr<Image> image;
5354
54- ~VulkanData () { release (); }
5555 void release ();
5656 };
5757
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ void ImageView::VulkanData::release()
4040 vkDestroyImageView (*device, imageView, device->getAllocationCallbacks ());
4141 imageView = VK_NULL_HANDLE ;
4242 device = {};
43+ image = {};
44+
4345 }
4446}
4547
@@ -137,6 +139,8 @@ void ImageView::compile(Device* device)
137139 {
138140 throw Exception{" Error: Failed to create VkImageView." , result};
139141 }
142+
143+ vd.image = image;
140144}
141145
142146void ImageView::compile (Context& context)
@@ -166,6 +170,8 @@ void ImageView::compile(Context& context)
166170 {
167171 throw Exception{" Error: Failed to create VkImageView." , result};
168172 }
173+
174+ vd.image = image;
169175}
170176
171177ref_ptr<ImageView> vsg::createImageView (vsg::Context& context, ref_ptr<Image> image, VkImageAspectFlags aspectFlags)
You can’t perform that action at this time.
0 commit comments