pub struct SessionThread<Device> {
receiver: WebXrReceiver<SessionMsg>,
sender: WebXrSender<SessionMsg>,
layers: Vec<(ContextId, LayerId)>,
pending_layers: Option<Vec<(ContextId, LayerId)>>,
frame_count: u64,
frame_sender: WebXrSender<Frame>,
running: bool,
device: Device,
id: SessionId,
render_state: RenderState,
}Expand description
For devices that want to do their own thread management, the SessionThread type is exposed.
Fields§
§receiver: WebXrReceiver<SessionMsg>§sender: WebXrSender<SessionMsg>§layers: Vec<(ContextId, LayerId)>§pending_layers: Option<Vec<(ContextId, LayerId)>>§frame_count: u64§frame_sender: WebXrSender<Frame>§running: bool§device: Device§id: SessionId§render_state: RenderStateImplementations§
Source§impl<Device> SessionThread<Device>where
Device: DeviceAPI,
impl<Device> SessionThread<Device>where
Device: DeviceAPI,
pub fn new( device: Device, frame_sender: WebXrSender<Frame>, id: SessionId, ) -> Result<Self, Error>
pub fn new_session(&mut self) -> Session
pub fn run(&mut self)
fn handle_msg(&mut self, msg: SessionMsg) -> bool
fn quit(&mut self)
Trait Implementations§
Source§impl<Device> MainThreadSession for SessionThread<Device>where
Device: DeviceAPI,
impl<Device> MainThreadSession for SessionThread<Device>where
Device: DeviceAPI,
Auto Trait Implementations§
impl<Device> !Freeze for SessionThread<Device>
impl<Device> !RefUnwindSafe for SessionThread<Device>
impl<Device> Send for SessionThread<Device>where
Device: Send,
impl<Device> !Sync for SessionThread<Device>
impl<Device> Unpin for SessionThread<Device>where
Device: Unpin,
impl<Device> UnwindSafe for SessionThread<Device>where
Device: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert