pub unsafe fn recreate_semaphores(&mut self) -> SarektResult<()> {
    let semaphore_ci = vk::SemaphoreCreateInfo::default();
    for i in 0..MAX_FRAMES_IN_FLIGHT {
      let to_destroy = self.image_available_semaphores[i];
      self.image_available_semaphores[i] =
        self.logical_device.create_semaphore(&semaphore_ci, None)?;
      self.logical_device.destroy_semaphore(to_destroy, None);

      let to_destroy = self.render_finished_semaphores[i];
      self.render_finished_semaphores[i] =
        self.logical_device.create_semaphore(&semaphore_ci, None)?;
      self.logical_device.destroy_semaphore(to_destroy, None);
    }

    Ok(())
  }
/// Makes new semaphores for draw synchronization.  Useful for swapchain
/// recreation.
///
/// Unsafe because they must not be in use.
Makes new semaphores for draw synchronization.  Useful for swapchain
recreation.

Unsafe because they must not be in use.
Makes new semaphores for draw synchronization . Useful for swapchain recreation . Unsafe because they must not be in use .
pub unsafe fn recreate_semaphores(&mut self) -> SarektResult<()> {
    let semaphore_ci = vk::SemaphoreCreateInfo::default();
    for i in 0..MAX_FRAMES_IN_FLIGHT {
      let to_destroy = self.image_available_semaphores[i];
      self.image_available_semaphores[i] =
        self.logical_device.create_semaphore(&semaphore_ci, None)?;
      self.logical_device.destroy_semaphore(to_destroy, None);
      let to_destroy = self.render_finished_semaphores[i];
      self.render_finished_semaphores[i] =
        self.logical_device.create_semaphore(&semaphore_ci, None)?;
      self.logical_device.destroy_semaphore(to_destroy, None);
    }
    Ok(())
  }
pub unsafe fn recreate_semaphores ( & mut self ) -> SarektResult < ( ) > { let semaphore_ci = vk :: SemaphoreCreateInfo :: default ( ) ; for i in 0 .. MAX_FRAMES_IN_FLIGHT { let to_destroy = self . image_available_semaphores [ i ] ; self . image_available_semaphores [ i ] = self . logical_device . create_semaphore ( & semaphore_ci , None ) ? ; self . logical_device . destroy_semaphore ( to_destroy , None ) ; let to_destroy = self . render_finished_semaphores [ i ] ; self . render_finished_semaphores [ i ] = self . logical_device . create_semaphore ( & semaphore_ci , None ) ? ; self . logical_device . destroy_semaphore ( to_destroy , None ) ; } Ok ( ( ) ) }
Makes new semaphores for draw synchronization.
Makes new semaphores for draw synchronization .
&mut self
&mut self