Closed Bug 1640912 Opened 4 years ago Closed 4 years ago

makeXRCompatible not recognized

Categories

(Core :: WebVR, defect)

defect

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: mortimergoro, Assigned: mortimergoro)

Details

Attachments

(1 file)

Reported here: https://github.com/MozillaReality/FirefoxReality/issues/3420

STR:

  • Create a canvas
  • Make the context xr compatible using makeXRCompatible()
  • Wait for the promise to fulfill.
  • start a session
  • Create a new XR Layer using the session and ths created context

Current Behavior:

The XRLayer's creation fails, stating XRWebGLLayer constructor: Can not create an XRWebGLLayer without first calling makeXRCompatible on the WebGLRenderingContext or WebGL2RenderingContext.

Assignee: nobody → imanol

Currently WebGL xrCompatible option is only set when enabling the xrCompatible attribute in the canvas.getContext() call. We also need to set it to true after succesfull makeXRCompatible() calls

Attachment #9151763 - Attachment description: Bug 1640912 - update options.xrCompatible value when WebGLContext::makeXRCompatible call succeeds → Bug 1640912 - Update options.xrCompatible value when WebGLContext::makeXRCompatible call succeeds

fwiw three.js just stopped creating the context with "xrCompatible" by default and instead uses "makeXRCompatible()" when XR session is requested so it means currently FxR is broken for the current release of three.js
commit with the change: https://github.com/mrdoob/three.js/commit/97144ea3e7ef0697f6243a639cb62158386e0849
discussion about the decision: https://github.com/mrdoob/three.js/issues/19275

Attachment #9151763 - Attachment description: Bug 1640912 - Update options.xrCompatible value when WebGLContext::makeXRCompatible call succeeds → Bug 1640912 - Update xrCompatible flag when WebGLContext::makeXRCompatible call succeeds
Pushed by rbarker@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7e89a7274770
Update xrCompatible flag when WebGLContext::makeXRCompatible call succeeds r=jgilbert,kip,daoshengmu
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: