pub struct Swapchain<I> {
pub alloc_width: u32,
pub alloc_height: u32,
pub presentable_images: [PresentableImage<I>; 3],
}Expand description
“Swapchains” group together some number (i.e. SWAPCHAIN_IMAGE_COUNT here)
of “presentable images”, to form a queue of render targets which can be
“presented” (to a surface, like a display, window, etc.) independently of
rendering being done onto other “presentable images” in the “swapchain”.
Certain configurations of swapchains often have older/more specific names,
e.g. “double buffering” for SWAPCHAIN_IMAGE_COUNT == 2 (or “triple” etc.).
Fields§
§alloc_width: u32§alloc_height: u32§presentable_images: [PresentableImage<I>; 3]Implementations§
Source§impl<I> Swapchain<I>
impl<I> Swapchain<I>
pub fn get_image(&self, id: PresentableImageId) -> Option<&PresentableImage<I>>
pub fn images_as_ref(&self) -> Swapchain<&I>
pub fn images_map<I2>( self, f: impl FnMut(PresentableImage<I>) -> I2, ) -> Swapchain<I2>
Trait Implementations§
Source§impl<I> SerJson for Swapchain<I>where
I: SerJson,
impl<I> SerJson for Swapchain<I>where
I: SerJson,
fn ser_json(&self, d: usize, s: &mut SerJsonState)
fn serialize_json(&self) -> String
impl<I> Copy for Swapchain<I>where
I: Copy,
impl<I> StructuralPartialEq for Swapchain<I>
Auto Trait Implementations§
impl<I> Freeze for Swapchain<I>where
I: Freeze,
impl<I> RefUnwindSafe for Swapchain<I>where
I: RefUnwindSafe,
impl<I> Send for Swapchain<I>where
I: Send,
impl<I> Sync for Swapchain<I>where
I: Sync,
impl<I> Unpin for Swapchain<I>where
I: Unpin,
impl<I> UnwindSafe for Swapchain<I>where
I: UnwindSafe,
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