pub trait Surface<B: Backend>: Any + Send + Sync {
fn kind(&self) -> Kind;
fn supports_queue_family(&self, family: &B::QueueFamily) -> bool;
fn compatibility(
&self,
physical_device: &B::PhysicalDevice
) -> (SurfaceCapabilities, Option<Vec<Format>>, Vec<PresentMode>, Vec<CompositeAlpha>);
}
Expand description
A Surface
abstracts the surface of a native window, which will be presented
on the display.
Required Methods
sourcefn supports_queue_family(&self, family: &B::QueueFamily) -> bool
fn supports_queue_family(&self, family: &B::QueueFamily) -> bool
sourcefn compatibility(
&self,
physical_device: &B::PhysicalDevice
) -> (SurfaceCapabilities, Option<Vec<Format>>, Vec<PresentMode>, Vec<CompositeAlpha>)
fn compatibility(
&self,
physical_device: &B::PhysicalDevice
) -> (SurfaceCapabilities, Option<Vec<Format>>, Vec<PresentMode>, Vec<CompositeAlpha>)
Query surface capabilities, formats, and present modes for this physical device.
Use this function for configuring swapchain creation.
Returns a tuple of surface capabilities and formats.
If formats is None
than the surface has no preferred format and the
application may use any desired format.