Struct canvas::webxr::WebXRBridge
source · pub(crate) struct WebXRBridge {
factory_receiver: Receiver<LayerManagerFactory<SurfmanGL>>,
managers: HashMap<WebXRLayerManagerId, Box<dyn WebXRLayerManagerAPI<SurfmanGL>>>,
next_manager_id: u32,
}
Expand description
Bridge between WebGL and WebXR
Fields§
§factory_receiver: Receiver<LayerManagerFactory<SurfmanGL>>
§managers: HashMap<WebXRLayerManagerId, Box<dyn WebXRLayerManagerAPI<SurfmanGL>>>
§next_manager_id: u32
Implementations§
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, device: &mut Device, 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, device: &mut Device, contexts: &mut dyn WebXRContexts<WebXRSurfman>, context_id: WebXRContextId, layer_init: WebXRLayerInit, ) -> Result<WebXRLayerId, WebXRError>
pub(crate) fn destroy_layer( &mut self, manager_id: WebXRLayerManagerId, device: &mut Device, contexts: &mut dyn WebXRContexts<WebXRSurfman>, context_id: WebXRContextId, layer_id: WebXRLayerId, )
pub(crate) fn destroy_all_layers( &mut self, device: &mut Device, contexts: &mut dyn WebXRContexts<WebXRSurfman>, context_id: WebXRContextId, )
pub(crate) fn begin_frame( &mut self, manager_id: WebXRLayerManagerId, device: &mut Device, contexts: &mut dyn WebXRContexts<WebXRSurfman>, layers: &[(WebXRContextId, WebXRLayerId)], ) -> Result<Vec<WebXRSubImages>, WebXRError>
pub(crate) fn end_frame( &mut self, manager_id: WebXRLayerManagerId, device: &mut Device, 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 !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