pub fn new(device: Arc<Device>, swapchain: Arc<Swapchain>) -> Result<Self> {
        Ok(Self {
            frames_in_flight: Frame::create_n_frames(
                &device,
                &swapchain.framebuffers,
            )?,
            swapchain_state: SwapchainState::Ok,
            current_image_acquired_semaphore: vk::Semaphore::null(),
            current_frame_index: 0,
            swapchain,
            device,
        })
    }
/// Create a new Frame context.
Create a new Frame context.
Create a new Frame context .
pub fn new(device: Arc<Device>, swapchain: Arc<Swapchain>) -> Result<Self> {
        Ok(Self {
            frames_in_flight: Frame::create_n_frames(
                &device,
                &swapchain.framebuffers,
            )?,
            swapchain_state: SwapchainState::Ok,
            current_image_acquired_semaphore: vk::Semaphore::null(),
            current_frame_index: 0,
            swapchain,
            device,
        })
    }
pub fn new ( device : Arc < Device > , swapchain : Arc < Swapchain > ) -> Result < Self > { Ok ( Self { frames_in_flight : Frame :: create_n_frames ( & device , & swapchain . framebuffers , ) ? , swapchain_state : SwapchainState :: Ok , current_image_acquired_semaphore : vk :: Semaphore :: null ( ) , current_frame_index : 0 , swapchain , device , } ) }
Create a new Frame context.
Create a new Frame context .
device
Arc<Device>
swapchain
Arc<Swapchain>