You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
401B

  1. use crate::render::Swapchain;
  2. use ash::vk;
  3. use std::rc::Rc;
  4. pub struct OwnedImage {
  5. handle: vk::Image,
  6. pub swapchain: Rc<Swapchain>,
  7. }
  8. impl OwnedImage {
  9. pub fn own(swapchain: Rc<Swapchain>, handle: vk::Image) -> Rc<Self> {
  10. Rc::new(Self { handle, swapchain })
  11. }
  12. }
  13. impl std::ops::Deref for OwnedImage {
  14. type Target = vk::Image;
  15. fn deref(&self) -> &Self::Target {
  16. &self.handle
  17. }
  18. }
  19. // EOF