Join GitHub today
Parallel reality tabs #760
This PR implements the last step of parallelizing all user windows (reality tabs). This means they render at the same time in their own context before being composited into the display/headset/what have you. Previously this was done synchronously, one window at a time, switching GL contexts to the correct one.
There are some major wins with the new approach; it's not so much the parallelization (though that is a win), but the avoidance of GL context switching and use of completely separate contexts for user code.
This means, among other things, we can run (and GC!) our render loop/compositor at the same time as user code (a small parallelization), and we don't have to switch GL contexts or suffer a flush in the main code path -- a major performance win.
Another huge improvement is that we no longer need to run any custom threading code (we just piggy-back on node's
Not to mention, this makes the codebase simpler.
Overall user code should see no change here, other than that everything becomes faster for free, especially -- but not only -- when using reality tabs in XR.
referenced this pull request
Mar 7, 2019
Tested each example as reality tab on new
Works as a reality tab:
Blank as a reality tab, no errors or hard crash:
Crashes with the following error: