pub struct Swapchain<G: Graphics> { /* private fields */ }
Expand description
A set of images to be rendered to using a particular graphics API G
Implementations§
source§impl<G: Graphics> Swapchain<G>
impl<G: Graphics> Swapchain<G>
sourcepub unsafe fn from_raw(session: Session<G>, handle: Swapchain) -> Self
pub unsafe fn from_raw(session: Session<G>, handle: Swapchain) -> Self
Take ownership of an existing swapchain handle
§Safety
handle
must be a valid swapchain handle associated with session
and created with flags
.
sourcepub fn set_name(&mut self, name: &str) -> Result<()>
pub fn set_name(&mut self, name: &str) -> Result<()>
Set the debug name of this Swapchain
, if XR_EXT_debug_utils
is loaded
pub fn enumerate_images(&self) -> Result<Vec<G::SwapchainImage>>
sourcepub fn acquire_image(&mut self) -> Result<u32>
pub fn acquire_image(&mut self) -> Result<u32>
Determine the index of the next image to render to in the swapchain image array
sourcepub fn wait_image(&mut self, timeout: Duration) -> Result<()>
pub fn wait_image(&mut self, timeout: Duration) -> Result<()>
Wait for the compositor to finish reading from the oldest unwaited acquired image
sourcepub fn release_image(&mut self) -> Result<()>
pub fn release_image(&mut self) -> Result<()>
Release the oldest acquired image
Trait Implementations§
Auto Trait Implementations§
impl<G> !RefUnwindSafe for Swapchain<G>
impl<G> Send for Swapchain<G>where
G: Send,
impl<G> Sync for Swapchain<G>where
G: Sync,
impl<G> Unpin for Swapchain<G>where
G: Unpin,
impl<G> !UnwindSafe for Swapchain<G>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more