exokitxr / exokit

Native VR/AR/XR engine for JavaScript 🦖
MIT License
997 stars 117 forks source link

Magic Leap: Creating more than 1 WebGL context causes graphics not to render #372

Open michaeltheory opened 6 years ago

michaeltheory commented 6 years ago

Use case: Creating a WebGL context to poll for features (and trying to determine if WebGL is even supported on a browser) prior to creating the WebGL context that actually does the rendering.

On ML, creating more than 1 context prevents graphics from being rendered.

avaer commented 6 years ago

Entry point for creating a context: https://github.com/webmixedreality/exokit/blob/59666c39860ba000f293ceef2723e97297bf3d29/index.js#L107

It could be a problem tracking "current context" in the EGL case: https://github.com/webmixedreality/exokit/blob/59666c39860ba000f293ceef2723e97297bf3d29/index.js#L211