/// Create an image that can be used as an input or output attachment
Create an image that can be used as an input or output attachment
Create an image that can be used as an input or output attachment
pub fn attachment(
        allocator: &Rc<RefCell<vk_mem::Allocator>>,
        width: u32,
        height: u32,
        format: vk::Format,
    ) -> Self {
        let usage = if Image::is_depth_format(format) {
            vk::ImageUsageFlags::DEPTH_STENCIL_ATTACHMENT | vk::ImageUsageFlags::INPUT_ATTACHMENT
        } else {
            vk::ImageUsageFlags::COLOR_ATTACHMENT | vk::ImageUsageFlags::INPUT_ATTACHMENT
        };
        Self::new(allocator, width, height, format, usage)
    }
pub fn attachment ( allocator : & Rc < RefCell < vk_mem :: Allocator > > , width : u32 , height : u32 , format : vk :: Format , ) -> Self { let usage = if Image :: is_depth_format ( format ) { vk :: ImageUsageFlags :: DEPTH_STENCIL_ATTACHMENT | vk :: ImageUsageFlags :: INPUT_ATTACHMENT } else { vk :: ImageUsageFlags :: COLOR_ATTACHMENT | vk :: ImageUsageFlags :: INPUT_ATTACHMENT } ; Self :: new ( allocator , width , height , format , usage ) }
Create an image that can be used as an input or output attachment
Create an image that can be used as an input or output attachment
allocator
&Rc<RefCell<vk_mem::Allocator>>
width
u32
height
u32
format
vk::Format