ContextVulkan

Trait ContextVulkan 

Source
pub trait ContextVulkan:
    Context
    + Send
    + Sync
    + Clone
    + 'static {
    type VulkanSwapchain: VulkanSwapchain;

    // Required methods
    unsafe fn new_vulkan<F>(
        enable_validation: bool,
        proc_address_callback: F,
    ) -> Result<Self, &'static str>
       where F: FnMut(*mut c_void, *const c_char) -> *mut c_void;
    fn get_vulkan_info(&self) -> Result<ContextVulkanInfo, &'static str>;
    unsafe fn create_new_vulkan_swapchain(
        &self,
        vulkan_surface_khr: *mut c_void,
    ) -> Result<Self::VulkanSwapchain, &'static str>;
}

Required Associated Types§

Required Methods§

Source

unsafe fn new_vulkan<F>( enable_validation: bool, proc_address_callback: F, ) -> Result<Self, &'static str>

Creates a Vulkan context.

Source

fn get_vulkan_info(&self) -> Result<ContextVulkanInfo, &'static str>

Gets internal Vulkan handles managed by the given Vulkan context.

Source

unsafe fn create_new_vulkan_swapchain( &self, vulkan_surface_khr: *mut c_void, ) -> Result<Self::VulkanSwapchain, &'static str>

Create a new Vulkan swapchain using a VkSurfaceKHR instance.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§