pub struct OpenXrExternalHostFrame<'a> {
pub context: OpenXrExternalVulkanContext<'a>,
pub target: VulkanFrameTarget,
pub pointer_frame: Option<&'a OpenXrPointerFrame>,
pub frame_time_ms: u128,
}Expand description
Vulkan render target and optional UI input for one layer render.
Pointer input is omitted with None; frame time defaults to zero milliseconds.
§Examples
use ailloli_ui_openxr::OpenXrExternalHostFrame;
fn elapsed(frame: &OpenXrExternalHostFrame<'_>) -> u128 { frame.frame_time_ms }Fields§
§context: OpenXrExternalVulkanContext<'a>Vulkan device/queue context for this target.
target: VulkanFrameTargetAcquired Vulkan image and layout contract.
pointer_frame: Option<&'a OpenXrPointerFrame>Optional complete pointer frame to route before painting.
frame_time_ms: u128Runtime animation/paint time in milliseconds.
Implementations§
Source§impl<'a> OpenXrExternalHostFrame<'a>
impl<'a> OpenXrExternalHostFrame<'a>
Sourcepub fn new(
context: OpenXrExternalVulkanContext<'a>,
target: VulkanFrameTarget,
) -> Self
pub fn new( context: OpenXrExternalVulkanContext<'a>, target: VulkanFrameTarget, ) -> Self
Creates a frame without pointer input at time zero.
§Examples
use ailloli_ui_openxr::{OpenXrExternalHostFrame, OpenXrExternalVulkanContext};
use ailloli_ui_render_vulkan::VulkanFrameTarget;
fn make<'a>(context: OpenXrExternalVulkanContext<'a>, target: VulkanFrameTarget) -> OpenXrExternalHostFrame<'a> { OpenXrExternalHostFrame::new(context, target) }Sourcepub fn with_pointer_frame(
self,
pointer_frame: Option<&'a OpenXrPointerFrame>,
) -> Self
pub fn with_pointer_frame( self, pointer_frame: Option<&'a OpenXrPointerFrame>, ) -> Self
Replaces the optional pointer frame.
None means no new events; it does not clear retained input state.
§Examples
use ailloli_ui_openxr::{OpenXrExternalHostFrame, OpenXrPointerFrame};
fn input<'a>(frame: OpenXrExternalHostFrame<'a>, pointers: &'a OpenXrPointerFrame) -> OpenXrExternalHostFrame<'a> { frame.with_pointer_frame(Some(pointers)) }Sourcepub fn with_frame_time_ms(self, frame_time_ms: u128) -> Self
pub fn with_frame_time_ms(self, frame_time_ms: u128) -> Self
Replaces runtime frame time in milliseconds.
§Examples
use ailloli_ui_openxr::OpenXrExternalHostFrame;
fn timed<'a>(frame: OpenXrExternalHostFrame<'a>) -> OpenXrExternalHostFrame<'a> { frame.with_frame_time_ms(16) }Auto Trait Implementations§
impl<'a> Freeze for OpenXrExternalHostFrame<'a>
impl<'a> RefUnwindSafe for OpenXrExternalHostFrame<'a>
impl<'a> Send for OpenXrExternalHostFrame<'a>
impl<'a> Sync for OpenXrExternalHostFrame<'a>
impl<'a> Unpin for OpenXrExternalHostFrame<'a>
impl<'a> UnwindSafe for OpenXrExternalHostFrame<'a>
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