Struct erupt::DeviceLoaderBuilder
source · pub struct DeviceLoaderBuilder<'a> { /* private fields */ }
Expand description
Builder for an device loader.
Implementations
sourceimpl<'a> DeviceLoaderBuilder<'a>
impl<'a> DeviceLoaderBuilder<'a>
sourcepub fn create_device_fn(
self,
create_device: &'a mut dyn FnMut(PhysicalDevice, &DeviceCreateInfo, Option<&AllocationCallbacks>) -> VulkanResult<Device>
) -> Self
pub fn create_device_fn(
self,
create_device: &'a mut dyn FnMut(PhysicalDevice, &DeviceCreateInfo, Option<&AllocationCallbacks>) -> VulkanResult<Device>
) -> Self
Specify a custom device creation function, to use in place of the default.
This may be useful when creating the device using e.g. OpenXR.
sourcepub fn symbol_fn(
self,
symbol: &'a mut impl FnMut(Device, *const c_char) -> Option<PFN_vkVoidFunction>
) -> Self
pub fn symbol_fn(
self,
symbol: &'a mut impl FnMut(Device, *const c_char) -> Option<PFN_vkVoidFunction>
) -> Self
Specify a custom symbol function, called to get device function pointers, to use in place of the default.
sourcepub fn allocation_callbacks(self, allocator: &'a AllocationCallbacks) -> Self
pub fn allocation_callbacks(self, allocator: &'a AllocationCallbacks) -> Self
Specify custom allocation callback functions.
sourcepub unsafe fn build_with_existing_device(
self,
instance_loader: &'a InstanceLoader,
device: Device,
create_info: &DeviceCreateInfo
) -> Result<DeviceLoader, LoaderError>
pub unsafe fn build_with_existing_device(
self,
instance_loader: &'a InstanceLoader,
device: Device,
create_info: &DeviceCreateInfo
) -> Result<DeviceLoader, LoaderError>
Build the device loader. Ensure create_info
is the same as used in the
creation of device
.
sourcepub unsafe fn build(
self,
instance_loader: &'a InstanceLoader,
physical_device: PhysicalDevice,
create_info: &DeviceCreateInfo
) -> Result<DeviceLoader, LoaderError>
pub unsafe fn build(
self,
instance_loader: &'a InstanceLoader,
physical_device: PhysicalDevice,
create_info: &DeviceCreateInfo
) -> Result<DeviceLoader, LoaderError>
Build the device loader. If you want to entirely create the device
yourself, use DeviceLoaderBuilder::build_with_existing_device
.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for DeviceLoaderBuilder<'a>
impl<'a> !Send for DeviceLoaderBuilder<'a>
impl<'a> !Sync for DeviceLoaderBuilder<'a>
impl<'a> Unpin for DeviceLoaderBuilder<'a>
impl<'a> !UnwindSafe for DeviceLoaderBuilder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more