Skip to main content

IVulkanDeviceFactory

Trait IVulkanDeviceFactory 

Source
pub trait IVulkanDeviceFactory: Send + Sync {
    // Required methods
    fn uses_shaded_device(&self) -> bool;
    fn get_shared_device(
        &self,
        platform_options: &VulkanPlatformSpecificOptions,
    ) -> Arc<dyn IVulkanDevice> ⓘ;
    fn create_device(
        &self,
        platform_options: &VulkanPlatformSpecificOptions,
    ) -> Result<Arc<dyn IVulkanDevice>, VulkanException>;
}
Expand description

Where the devices of the contexts come from.

Required Methods§

Source

fn uses_shaded_device(&self) -> bool

Whether all contexts share one device.

Source

fn get_shared_device( &self, platform_options: &VulkanPlatformSpecificOptions, ) -> Arc<dyn IVulkanDevice> ⓘ

The device all contexts share.

§Panics

Panics when the factory creates a device per context.

Source

fn create_device( &self, platform_options: &VulkanPlatformSpecificOptions, ) -> Result<Arc<dyn IVulkanDevice>, VulkanException>

Creates the device of a context.

§Panics

Panics when the contexts share one device.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§