pub(crate) struct WebXRBridge {
factory_receiver: Receiver<LayerManagerFactory<SurfmanGL>>,
managers: FxHashMap<WebXRLayerManagerId, Box<dyn WebXRLayerManagerAPI<SurfmanGL>>>,
next_manager_id: NonZeroU32,
}Expand description
Bridge between WebGL and WebXR
Fields§
§factory_receiver: Receiver<LayerManagerFactory<SurfmanGL>>§managers: FxHashMap<WebXRLayerManagerId, Box<dyn WebXRLayerManagerAPI<SurfmanGL>>>§next_manager_id: NonZeroU32Implementations§
Source§impl WebXRBridge
impl WebXRBridge
pub(crate) fn new(init: WebXRBridgeInit) -> WebXRBridge
Source§impl WebXRBridge
impl WebXRBridge
pub(crate) fn create_layer_manager( &mut self, contexts: &mut dyn WebXRContexts<WebXRSurfman>, ) -> Result<WebXRLayerManagerId, WebXRError>
pub(crate) fn destroy_layer_manager(&mut self, manager_id: WebXRLayerManagerId)
pub(crate) fn create_layer( &mut self, manager_id: WebXRLayerManagerId, contexts: &mut dyn WebXRContexts<WebXRSurfman>, context_id: WebXRContextId, layer_init: WebXRLayerInit, ) -> Result<WebXRLayerId, WebXRError>
pub(crate) fn destroy_layer( &mut self, manager_id: WebXRLayerManagerId, contexts: &mut dyn WebXRContexts<WebXRSurfman>, context_id: WebXRContextId, layer_id: WebXRLayerId, )
pub(crate) fn destroy_all_layers( &mut self, contexts: &mut dyn WebXRContexts<WebXRSurfman>, context_id: WebXRContextId, )
pub(crate) fn begin_frame( &mut self, manager_id: WebXRLayerManagerId, contexts: &mut dyn WebXRContexts<WebXRSurfman>, layers: &[(WebXRContextId, WebXRLayerId)], ) -> Result<Vec<WebXRSubImages>, WebXRError>
pub(crate) fn end_frame( &mut self, manager_id: WebXRLayerManagerId, contexts: &mut dyn WebXRContexts<WebXRSurfman>, layers: &[(WebXRContextId, WebXRLayerId)], ) -> Result<(), WebXRError>
Auto Trait Implementations§
impl Freeze for WebXRBridge
impl !RefUnwindSafe for WebXRBridge
impl !Send for WebXRBridge
impl !Sync for WebXRBridge
impl Unpin for WebXRBridge
impl UnsafeUnpin for WebXRBridge
impl !UnwindSafe for WebXRBridge
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