Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Supporting devices that require code to run on the main thread #52

Closed
asajeffrey opened this issue Feb 7, 2019 · 2 comments
Closed

Comments

@asajeffrey
Copy link
Member

Currently the API has no concept of the "main thread" of an application, and assumes that VRServiceManager::new() and VRServiceManager::register_defaults() can be safely called from any thread (in servo, they're called from the WebVRThread). This has a mismatch with devices (such as MagicLeap) which have a main thread, and where the APIs to access the device capabilities aren't thread-safe.

@asajeffrey asajeffrey changed the title Supporting devices that require initialization on the main thread Supporting devices that require code to run on the main thread Feb 25, 2019
@asajeffrey
Copy link
Member Author

@asajeffrey
Copy link
Member Author

This is also needed when rendering to a window on MacOS, which requires windows to live on the main thread. https://github.com/asajeffrey/rust-webvr/blob/glwindow/rust-webvr/src/api/glwindow/heartbeat.rs

bors-servo pushed a commit that referenced this issue Mar 5, 2019
 Add glwindow implementation, that renders to a GlWindow

Add glwindow implementation, that renders to a GlWindow, mainly for testing, but also this forms a basis for VRDisplays that have code that needs to run in the main thread.

Fixes #52 and #65.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant