pub trait RafxSwapchainEventListener {
    // Required methods
    fn swapchain_created(
        &mut self,
        device_context: &RafxDeviceContext,
        swapchain: &RafxSwapchain
    ) -> RafxResult<()>;
    fn swapchain_destroyed(
        &mut self,
        device_context: &RafxDeviceContext,
        swapchain: &RafxSwapchain
    ) -> RafxResult<()>;
}
Expand description

May be implemented to get callbacks related to the swapchain being created/destroyed. This is optional.

Required Methods§

source

fn swapchain_created( &mut self, device_context: &RafxDeviceContext, swapchain: &RafxSwapchain ) -> RafxResult<()>

Called whenever the swapchain needs to be created (the first time, and in cases where the swapchain needs to be recreated)

source

fn swapchain_destroyed( &mut self, device_context: &RafxDeviceContext, swapchain: &RafxSwapchain ) -> RafxResult<()>

Called whenever the swapchain will be destroyed (when VkSurface is dropped, and also in cases where the swapchain needs to be recreated)

Implementors§