Skip to main content

SwapChainAPI

Trait SwapChainAPI 

Source
pub trait SwapChainAPI:
    'static
    + Clone
    + Send {
    type Surface;

    // Required methods
    fn take_surface(&self) -> Option<Self::Surface>;
    fn recycle_surface(&self, surface: Self::Surface);
}
Expand description

The consumer’s view of a swap chain

Required Associated Types§

Required Methods§

Source

fn take_surface(&self) -> Option<Self::Surface>

Take the current front buffer.

Source

fn recycle_surface(&self, surface: Self::Surface)

Recycle the current front buffer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Device> SwapChainAPI for SwapChain<Device>
where Device: 'static + DeviceAPI, Device::Surface: Send,

Source§

type Surface = <Device as Device>::Surface