pub trait PresentationSurface<B>: Surface<B>where
B: Backend,{
type SwapchainImage: Borrow<<B as Backend>::ImageView> + Debug + Send + Sync;
// Required methods
unsafe fn configure_swapchain(
&mut self,
device: &<B as Backend>::Device,
config: SwapchainConfig,
) -> Result<(), CreationError>;
unsafe fn unconfigure_swapchain(&mut self, device: &<B as Backend>::Device);
unsafe fn acquire_image(
&mut self,
timeout_ns: u64,
) -> Result<(Self::SwapchainImage, Option<Suboptimal>), AcquireError>;
}
Expand description
A surface trait that exposes the ability to present images on the associtated swap chain.
Required Associated Types§
Required Methods§
Sourceunsafe fn configure_swapchain(
&mut self,
device: &<B as Backend>::Device,
config: SwapchainConfig,
) -> Result<(), CreationError>
unsafe fn configure_swapchain( &mut self, device: &<B as Backend>::Device, config: SwapchainConfig, ) -> Result<(), CreationError>
Set up the swapchain associated with the surface to have the given format.
Sourceunsafe fn unconfigure_swapchain(&mut self, device: &<B as Backend>::Device)
unsafe fn unconfigure_swapchain(&mut self, device: &<B as Backend>::Device)
Remove the associated swapchain from this surface.
This has to be done before the surface is dropped.