pub struct OpenXrVulkanContext {
pub vk_entry: Entry,
pub vk_instance: Instance,
pub vk_device: Device,
pub physical_device: PhysicalDevice,
pub memory_properties: PhysicalDeviceMemoryProperties,
pub queue: Queue,
pub queue_family_index: u32,
pub command_pool: CommandPool,
}Expand description
Vulkan instance/device and graphics submission resources owned by OpenXR host.
Drop destroys the command pool, logical device, then Vulkan instance. The selected physical device and queue are dictated by the OpenXR runtime.
§Examples
use ailloli_ui_openxr::OpenXrVulkanContext;
fn family(context: &OpenXrVulkanContext) -> u32 { context.queue_family_index }Fields§
§vk_entry: EntryDynamically loaded Vulkan entry table.
vk_instance: InstanceVulkan instance created through OpenXR.
vk_device: DeviceVulkan logical device created through OpenXR.
physical_device: PhysicalDeviceRuntime-selected Vulkan physical device.
memory_properties: PhysicalDeviceMemoryPropertiesMemory properties queried from the selected physical device.
queue: QueueGraphics queue at index zero of queue_family_index.
queue_family_index: u32First physical-device queue family advertising graphics capability.
command_pool: CommandPoolResettable command pool for the selected graphics family.
Implementations§
Source§impl OpenXrVulkanContext
impl OpenXrVulkanContext
Sourcepub fn render_context(&self) -> VulkanRenderContext<'_>
pub fn render_context(&self) -> VulkanRenderContext<'_>
Borrows device, queue, pool, and memory properties for the Vulkan renderer.
§Examples
use ailloli_ui_openxr::OpenXrVulkanContext;
use ailloli_ui_render_vulkan::VulkanRenderContext;
fn render_context(context: &OpenXrVulkanContext) -> VulkanRenderContext<'_> { context.render_context() }Trait Implementations§
Source§impl Drop for OpenXrVulkanContext
impl Drop for OpenXrVulkanContext
Source§impl<'a> From<&'a OpenXrVulkanContext> for OpenXrExternalVulkanContext<'a>
impl<'a> From<&'a OpenXrVulkanContext> for OpenXrExternalVulkanContext<'a>
Source§fn from(context: &'a OpenXrVulkanContext) -> Self
fn from(context: &'a OpenXrVulkanContext) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OpenXrVulkanContext
impl RefUnwindSafe for OpenXrVulkanContext
impl Send for OpenXrVulkanContext
impl Sync for OpenXrVulkanContext
impl Unpin for OpenXrVulkanContext
impl UnwindSafe for OpenXrVulkanContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more