Struct ash::EntryCustom[][src]

pub struct EntryCustom<L> { /* fields omitted */ }
Expand description

Function loader

Implementations

https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumerateInstanceVersion.html

let entry = Entry::new()?;
match entry.try_enumerate_instance_version()? {
    // Vulkan 1.1+
    Some(version) => {
        let major = vk::version_major(version);
        let minor = vk::version_minor(version);
        let patch = vk::version_patch(version);
    },
    // Vulkan 1.0
    None => {},
}
use ash::{vk, Entry, version::EntryV1_0};
let entry = Entry::new()?;
let app_info = vk::ApplicationInfo {
    api_version: vk::make_version(1, 0, 0),
    ..Default::default()
};
let create_info = vk::InstanceCreateInfo {
    p_application_info: &app_info,
    ..Default::default()
};
let instance = unsafe { entry.create_instance(&create_info, None)? };

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

👎 Deprecated:

This function is unavailable and therefore panics on Vulkan 1.0, please use try_enumerate_instance_version instead

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.