Skip to content

Fix aquarium in Firefox. Only enable multiview when VR is supported - #45

Merged
toji merged 1 commit into
WebGLSamples:masterfrom
brianpeiris:fix-firefox-aquarium
Jun 13, 2024
Merged

toji merged 1 commit into
WebGLSamples:masterfrom
brianpeiris:fix-firefox-aquarium

Conversation

@brianpeiris

Copy link
Copy Markdown
Contributor

The Aquarium sample is currently broken in Firefox on Ubuntu using Nvidia drivers with the following error.

Error compiling shader:
0(3) : error C0210: extension GL_OVR_multiview2 not supported for version 150
[log.js:69:22](https://webglsamples.org/tdl/log.js)

Apparently Firefox thinks OVR_multiview2 is available to use on Ubuntu since gl.getExtension('OVR_multiview2') returns with an extension object.

This PR changes the sample code to use multiview only if VR support is detected. Tested with Firefox and Chrome on Ubuntu, Windows, Vive Browser on Vive XR Elite, and Cardboard. Would appreciate help testing on a Quest device.

@kenrussell
kenrussell requested a review from toji June 13, 2024 06:16
@kenrussell

Copy link
Copy Markdown
Member

Thanks for this fix Brian. It looks good to me but Brandon, could you double-check?

@toji

toji commented Jun 13, 2024

Copy link
Copy Markdown
Contributor

LGTM as well, thanks! It's unfortunate that Firefox is reporting OVR_multiview2 as supported when it's not.

@toji
toji merged commit b1bef2d into WebGLSamples:master Jun 13, 2024
@brianpeiris

Copy link
Copy Markdown
Contributor Author

Thanks for the merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants