pub struct SwapchainBuilder<'n, Surface: Surface>(/* private fields */);
Expand description
Builder object to construct a Swapchain
, backed with a surface
Implementations§
Source§impl<'n, Surface: Surface> SwapchainBuilder<'n, Surface>
impl<'n, Surface: Surface> SwapchainBuilder<'n, Surface>
pub fn new( surface: Surface, min_image_count: u32, format: VkSurfaceFormatKHR, extent: VkExtent2D, usage: ImageUsageFlags, ) -> Self
pub const fn with_next(self, next: &'n (impl VulkanStructure + ?Sized)) -> Self
pub const fn array_layers(self, layers: u32) -> Self
pub const fn exclusive(self) -> Self
Sourcepub const fn pre_transform(self, tf: VkSurfaceTransformFlagsKHR) -> Self
pub const fn pre_transform(self, tf: VkSurfaceTransformFlagsKHR) -> Self
Default: Inherit
Sourcepub const fn composite_alpha(self, a: VkCompositeAlphaFlagsKHR) -> Self
pub const fn composite_alpha(self, a: VkCompositeAlphaFlagsKHR) -> Self
Default: Inherit
Sourcepub const fn present_mode(self, mode: PresentMode) -> Self
pub const fn present_mode(self, mode: PresentMode) -> Self
Default: FIFO
Sourcepub const fn enable_clip(self) -> Self
pub const fn enable_clip(self) -> Self
Enables whether the Vulkan implementation is allowed to discard rendering operations that affect regions of the surface which aren’t visible
Sourcepub fn create<Device: Device>(
self,
device: Device,
) -> Result<SurfaceSwapchainObject<Device, Surface>>
Available on crate feature Implements
only.
pub fn create<Device: Device>( self, device: Device, ) -> Result<SurfaceSwapchainObject<Device, Surface>>
Implements
only.Create a swapchain
§Failures
On failure, this command returns
VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_DEVICE_LOST
VK_ERROR_SURFACE_LOST_KHR
VK_ERROR_NATIVE_WINDOW_IN_USE_KHR
Trait Implementations§
Source§impl<Surface: Surface> TransferSurfaceObject for SwapchainBuilder<'_, Surface>
impl<Surface: Surface> TransferSurfaceObject for SwapchainBuilder<'_, Surface>
type ConcreteSurface = Surface
fn transfer_surface(self) -> Self::ConcreteSurface
Source§impl<Surface: Surface> VulkanStructureProvider for SwapchainBuilder<'_, Surface>
impl<Surface: Surface> VulkanStructureProvider for SwapchainBuilder<'_, Surface>
type RootStructure = VkSwapchainCreateInfoKHR
fn build<'r, 's: 'r>( &'s mut self, root: &'s mut VkSwapchainCreateInfoKHR, ) -> &'r mut GenericVulkanStructure
Auto Trait Implementations§
impl<'n, Surface> Freeze for SwapchainBuilder<'n, Surface>where
Surface: Freeze,
impl<'n, Surface> !RefUnwindSafe for SwapchainBuilder<'n, Surface>
impl<'n, Surface> !Send for SwapchainBuilder<'n, Surface>
impl<'n, Surface> !Sync for SwapchainBuilder<'n, Surface>
impl<'n, Surface> Unpin for SwapchainBuilder<'n, Surface>where
Surface: Unpin,
impl<'n, Surface> !UnwindSafe for SwapchainBuilder<'n, Surface>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more