Skip to content

[DRAFT] WebXR: Allow creating the initial WebGL context as XR compatible - #125801

Draft
dsnopek wants to merge 1 commit into
godotengine:masterfrom
dsnopek:webxr-create-xr-compatible-context-not-a-hack
Draft

dsnopek wants to merge 1 commit into
godotengine:masterfrom
dsnopek:webxr-create-xr-compatible-context-not-a-hack

Conversation

@dsnopek

@dsnopek dsnopek commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

This is an attempt to fix #109051 in a potentially merge-able way (as opposed to the hack I posted in the comments)

This PR allows requesting that the initial WebGL context is created as XR compatible via two mechanisms:

  • An "XR Compatible by Default" export option, which will enable this by default
  • An ?xr_compatible=1 or ?xr_compatible=0 GET argument to override this

It's marked as DRAFT primarily because I can't personally reproduce this issue, so we'll need to get someone who can to verify that this actually fixes anything. However, I'd also like to see if we can figure out a user-friendly way to have a "reload the page with XR-compatible flag" flow, so that apps that may or may not use WebXR aren't forced to always use this option (which can potentially have a negative impact on loading time and/or battery usage)

UPDATE (2026-11-26): It was confirmed by someone who can reproduce the problem that this does fix the issue!

@dsnopek
dsnopek force-pushed the webxr-create-xr-compatible-context-not-a-hack branch from 41ff94c to 9e52182 Compare November 25, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebXR failing to start on PC with Unable to make WebGL context compatible with WebXR

1 participant