Struct ash::EntryCustom [−][src]
pub struct EntryCustom<L> { /* fields omitted */ }
Expand description
Function loader
Implementations
pub fn new_custom<Load>(lib: L, load: Load) -> Self where
Load: FnMut(&mut L, &CStr) -> *const c_void,
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
unsafe fn create_instance(
&self,
create_info: &InstanceCreateInfo,
allocation_callbacks: Option<&AllocationCallbacks>
) -> Result<Self::Instance, InstanceError>
unsafe fn create_instance(
&self,
create_info: &InstanceCreateInfo,
allocation_callbacks: Option<&AllocationCallbacks>
) -> Result<Self::Instance, InstanceError>
https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateInstance.html
Safety
In order for the created Instance
to be valid for the duration of its
usage, the Entry
this was called on must be dropped later than the
resulting Instance
.
unsafe fn get_instance_proc_addr(
&self,
instance: Instance,
p_name: *const c_char
) -> PFN_vkVoidFunction
unsafe fn get_instance_proc_addr(
&self,
instance: Instance,
p_name: *const c_char
) -> PFN_vkVoidFunction
👎 Deprecated:
This function is unavailable and therefore panics on Vulkan 1.0, please use try_enumerate_instance_version
instead
Auto Trait Implementations
impl<L> RefUnwindSafe for EntryCustom<L> where
L: RefUnwindSafe,
impl<L> Send for EntryCustom<L> where
L: Send,
impl<L> Sync for EntryCustom<L> where
L: Sync,
impl<L> Unpin for EntryCustom<L> where
L: Unpin,
impl<L> UnwindSafe for EntryCustom<L> where
L: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more