[][src]Struct nobs_vk::device::PhysicalDevice

pub struct PhysicalDevice {
    pub instance: Instance,
    pub handle: PhysicalDevice,
    pub supported_layers: Vec<String>,
    pub supported_extensions: Vec<String>,
    pub features: PhysicalDeviceFeatures,
    pub properties: PhysicalDeviceProperties,
}

Description and properties of a physical device

Used for Device creation.

Fields

instance: Instancehandle: PhysicalDevicesupported_layers: Vec<String>supported_extensions: Vec<String>features: PhysicalDeviceFeaturesproperties: PhysicalDeviceProperties

Methods

impl PhysicalDevice[src]

pub fn enumerate_all(inst: Instance) -> Vec<PhysicalDevice>[src]

Lists all devices in the specified instance

Example

Prints out the device names of all physical devices.

#[macro_use]
extern crate nobs_vk as vk;
// Create instance ...
let devices = vk::device::PhysicalDevice::enumerate_all(inst.handle);
for d in devices.iter() {
  println!("{}", unsafe { std::ffi::CStr::from_ptr(d.properties.deviceName.as_ptr()).to_str().unwrap() });
}

pub fn into_device(self) -> Builder[src]

Consumes the Physical device and converts it into a device::Builder

See here to filter devices from enumerate_all for asserting requirements. See Device for how to create a logical device.

pub fn is_layer_supported(&self, name: &str) -> bool[src]

Check if the specified name is a supported layer

pub fn is_extension_supported(&self, name: &str) -> bool[src]

Check if the specified name is a supported extension

Trait Implementations

impl Clone for PhysicalDevice[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]