pub fn new<Name>(
        device: Arc<Device>,
        framebuffer: vk::Framebuffer,
        name: Name,
    ) -> Result<Self>
    where
        Name: Into<String> + Clone,
    {
        Ok(Self {
            sync: FrameSync::new(&device, name.clone())?,
            descriptor: FrameDescriptor::new(device.clone(), name.clone())?,
            vertex_buffer: CpuBuffer::new(
                device.clone(),
                vk::BufferUsageFlags::VERTEX_BUFFER,
            )?,
            command_pool: ReusableCommandPool::new(
                device.clone(),
                name.clone(),
            )?,
            framebuffer,
            command_buffers: vec![],
            device,
        })
    }
/// Create a new frame.
///
/// Frames do not own framebuffers, it is the responsibility of the
/// application to ensure no Frame instances are used after the swapchain
/// has been dropped.
Create a new frame.
Frames do not own framebuffers, it is the responsibility of the
application to ensure no Frame instances are used after the swapchain
has been dropped.
Create a new frame . Frames do not own framebuffers it is the responsibility of the application to ensure no Frame instances are used after the swapchain has been dropped .
pub fn new<Name>(
        device: Arc<Device>,
        framebuffer: vk::Framebuffer,
        name: Name,
    ) -> Result<Self>
    where
        Name: Into<String> + Clone,
    {
        Ok(Self {
            sync: FrameSync::new(&device, name.clone())?,
            descriptor: FrameDescriptor::new(device.clone(), name.clone())?,
            vertex_buffer: CpuBuffer::new(
                device.clone(),
                vk::BufferUsageFlags::VERTEX_BUFFER,
            )?,
            command_pool: ReusableCommandPool::new(
                device.clone(),
                name.clone(),
            )?,
            framebuffer,
            command_buffers: vec![],
            device,
        })
    }
pub fn new < Name > ( device : Arc < Device > , framebuffer : vk :: Framebuffer , name : Name , ) -> Result < Self > where Name : Into < String > + Clone , { Ok ( Self { sync : FrameSync :: new ( & device , name . clone ( ) ) ? , descriptor : FrameDescriptor :: new ( device . clone ( ) , name . clone ( ) ) ? , vertex_buffer : CpuBuffer :: new ( device . clone ( ) , vk :: BufferUsageFlags :: VERTEX_BUFFER , ) ? , command_pool : ReusableCommandPool :: new ( device . clone ( ) , name . clone ( ) , ) ? , framebuffer , command_buffers : vec ! [ ] , device , } ) }
Create a new frame.
Create a new frame .
device
Arc<Device>
framebuffer
vk::Framebuffer
name
Name