Struct lambda_platform::gfx::surface::Surface
source · pub struct Surface<RenderBackend: Backend> { /* private fields */ }
Expand description
Defines a surface that can be rendered on to.
Implementations§
source§impl<RenderBackend: Backend> Surface<RenderBackend>
impl<RenderBackend: Backend> Surface<RenderBackend>
sourcepub fn apply_swapchain<'surface>(
&mut self,
gpu: &Gpu<RenderBackend>,
swapchain: Swapchain,
timeout_in_nanoseconds: u64
) -> Result<(), &'surface str>
pub fn apply_swapchain<'surface>(
&mut self,
gpu: &Gpu<RenderBackend>,
swapchain: Swapchain,
timeout_in_nanoseconds: u64
) -> Result<(), &'surface str>
Apply a swapchain to the current surface. This is required whenever a swapchain has been invalidated (I.E. by window resizing)
pub fn needs_swapchain(&self) -> bool
sourcepub fn remove_swapchain(&mut self, gpu: &Gpu<RenderBackend>)
pub fn remove_swapchain(&mut self, gpu: &Gpu<RenderBackend>)
Remove the swapchain configuration that this surface used on this given GPU.