Trait dacite_winit::WindowExt [] [src]

pub trait WindowExt {
    fn is_presentation_supported(
        &self,
        physical_device: &PhysicalDevice,
        queue_family_indices: u32
    ) -> Result<bool, Error>;
fn get_required_extensions(
        &self
    ) -> Result<InstanceExtensionsProperties, Error>;
fn create_surface(
        &self,
        instance: &Instance,
        flags: SurfaceCreateFlags,
        allocator: Option<Box<Allocator>>
    ) -> Result<SurfaceKhr, Error>; }

Extension trait for Vulkan surface creation.

Required Methods

Test whether presentation is supported on a physical device.

This function first determines the correct Vulkan WSI extension for this window and then calls one of the get_*_presentation_support_* family of functions on the PhysicalDevice.

Determine required Vulkan instance extensions.

This will always include VK_KHR_surface. One of the platform-dependent WSI extensions, that corresponds to this window, will also be added.

Please note, that the device extension VK_KHR_swapchain is also required for presentation.

Create a surface for this window.

Instance must have been created with required extensions, as determined by get_required_extensions(). The flags parameter is currently just a place holder. You should specify SurfaceCreateFlags::empty() here.

Implementors