pub trait IVulkanDevice:
IOptionalFeatureProvider
+ Send
+ Sync {
// Required methods
fn handle(&self) -> isize;
fn physical_device_handle(&self) -> isize;
fn main_queue_handle(&self) -> isize;
fn graphics_queue_family_index(&self) -> u32;
fn instance(&self) -> Arc<dyn IVulkanInstance> ⓘ;
fn is_lost(&self) -> bool;
fn lock(&self) -> Rc<dyn IDisposable>;
fn enabled_extensions(&self) -> Vec<String>;
fn dispose(&self);
}Expand description
A Vulkan device with the queue the framework renders with.
A device is shared by threads (an application may hand one device to the
platform graphics, which every render thread then uses), so it is held in
an Arc; its queue is only used while the device is locked.
Required Methods§
Sourcefn physical_device_handle(&self) -> isize
fn physical_device_handle(&self) -> isize
The VkPhysicalDevice the device was created for.
Sourcefn main_queue_handle(&self) -> isize
fn main_queue_handle(&self) -> isize
The VkQueue commands are submitted to. Only valid while the device
is locked by the calling thread.
Sourcefn graphics_queue_family_index(&self) -> u32
fn graphics_queue_family_index(&self) -> u32
The index of the queue family of the main queue.
Sourcefn instance(&self) -> Arc<dyn IVulkanInstance> ⓘ
fn instance(&self) -> Arc<dyn IVulkanInstance> ⓘ
The instance the device belongs to.
Sourcefn lock(&self) -> Rc<dyn IDisposable>
fn lock(&self) -> Rc<dyn IDisposable>
Takes the device for the calling thread until the result is disposed. A thread may lock a device it has locked already.
Sourcefn enabled_extensions(&self) -> Vec<String>
fn enabled_extensions(&self) -> Vec<String>
The names of the device extensions that were enabled.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".