pub struct Swapchain<I> {
pub width: u32,
pub height: u32,
pub presentable_images: [PresentableImage<I>; 2],
}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§
§width: u32§height: u32§presentable_images: [PresentableImage<I>; 2]Implementations§
§impl<I> Swapchain<I>
impl<I> Swapchain<I>
pub fn images_as_ref(&self) -> Swapchain<&I>
pub fn images_map<I2>( self, f: impl FnMut(PresentableImageId, I) -> I2 ) -> Swapchain<I2>
Trait Implementations§
§impl<I> PartialEq<Swapchain<I>> for Swapchain<I>where
I: PartialEq<I>,
impl<I> PartialEq<Swapchain<I>> for Swapchain<I>where I: PartialEq<I>,
§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> 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