Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should XRRenderState layers be optional? #297

Open
rgerd opened this issue Oct 31, 2022 · 1 comment
Open

Should XRRenderState layers be optional? #297

rgerd opened this issue Oct 31, 2022 · 1 comment

Comments

@rgerd
Copy link

rgerd commented Oct 31, 2022

Reading the spec, I see the following:

11.1. XRRenderState changes
This module extends the XRRenderStateInit and XRRenderState interfaces with a new optional array layers containing instances of XRLayer.

11.2. updateRenderState changes
"If newState’s baseLayer is set ... Set session’s pending render state's layers to null."

But then the IDL for XRRenderState is specified with a non-optional layers array:

[SecureContext, Exposed=Window] partial interface XRRenderState {
  readonly attribute FrozenArray<XRLayer> layers;
};

Seems like the layers array should either be defined as optional or the algorithm should recommend clearing the layers array.

@cabanier
Copy link
Member

Thanks for catching!
the algorithm should clear the array, not set it to null

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

No branches or pull requests

2 participants