playcanvas / playcanvas/engine

Context option xrCompatible should not be `true` by default.

Open
#2,047 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: xr
Dominant language
JavaScript
Stars
16.8k
Forks
2k
Avg merge
4h 32m
Merged PRs (30d)
222

Description

Based on discussions here: https://github.com/immersive-web/webxr/issues/1014#issuecomment-623176189

By default xrCompatible should not be true when getting webgl context. As it may lead to not desirable GPU be selected on complex systems with multiple GPUs and plugged in XR device.

Two things are required:

  1. Editor - we should provide an option in project settings under Input tab. Which will provide xr: true option when creating pc.Application.
  2. In DEBUG version of engine, we should print warning, if WebXR is used, without provided xr: true option on application creation.

If that warning fired in Editor, we should somehow have a reasonable message, so developer will understand to go to project settings and toggle the flag. For engine-only user, warning should be self explanatory.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing WebGL context creation, pc.Application options, WebXR initialization, and the Editor's Input project settings. Done means xrCompatible is not enabled by default, the Input setting supplies xr: true, and DEBUG builds provide clear warnings for WebXR use without that option, including Editor guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.