[−][src]Trait rendy_core::hal::window::PresentationSurface
A surface trait that exposes the ability to present images on the associtated swap chain.
Associated Types
type SwapchainImage: Borrow<<B as Backend>::ImageView> + Send + Sync + Debug
An opaque type wrapping the swapchain image.
Required methods
unsafe fn configure_swapchain(
&mut self,
device: &<B as Backend>::Device,
config: SwapchainConfig
) -> Result<(), CreationError>
&mut self,
device: &<B as Backend>::Device,
config: SwapchainConfig
) -> Result<(), CreationError>
Set up the swapchain associated with the surface to have the given format.
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.
unsafe fn acquire_image(
&mut self,
timeout_ns: u64
) -> Result<(Self::SwapchainImage, Option<Suboptimal>), AcquireError>
&mut self,
timeout_ns: u64
) -> Result<(Self::SwapchainImage, Option<Suboptimal>), AcquireError>
Acquire a new swapchain image for rendering.
May fail according to one of the reasons indicated in AcquireError
enum.
Synchronization
The acquired image is available to render. No synchronization is required.