[][src]Trait ash_tray::WindowExt

pub trait WindowExt {
    fn is_presentation_supported(
        &self,
        entry: &Entry,
        instance: &Instance,
        physical_device: PhysicalDevice,
        queue_family_indices: u32
    ) -> VkResult<bool>;
fn get_required_extensions(&self) -> VkResult<Vec<*const c_char>>;
fn create_surface(
        &self,
        entry: &Entry,
        instance: &Instance,
        flags: Flags,
        allocator: Option<&AllocationCallbacks>
    ) -> VkResult<SurfaceKHR>; }

Extension trait for Vulkan surface creation.

Required methods

fn is_presentation_supported(
    &self,
    entry: &Entry,
    instance: &Instance,
    physical_device: PhysicalDevice,
    queue_family_indices: u32
) -> VkResult<bool>

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.

fn get_required_extensions(&self) -> VkResult<Vec<*const c_char>>

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.

fn create_surface(
    &self,
    entry: &Entry,
    instance: &Instance,
    flags: Flags,
    allocator: Option<&AllocationCallbacks>
) -> VkResult<SurfaceKHR>

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.

Loading content...

Implementations on Foreign Types

impl WindowExt for Window[src]

Loading content...

Implementors

Loading content...