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.
 
 
 

24 lines
401 B

use crate::render::Swapchain;
use ash::vk;
use std::rc::Rc;
pub struct OwnedImage {
handle: vk::Image,
pub swapchain: Rc<Swapchain>,
}
impl OwnedImage {
pub fn own(swapchain: Rc<Swapchain>, handle: vk::Image) -> Rc<Self> {
Rc::new(Self { handle, swapchain })
}
}
impl std::ops::Deref for OwnedImage {
type Target = vk::Image;
fn deref(&self) -> &Self::Target {
&self.handle
}
}
// EOF