layers icon indicating copy to clipboard operation
layers copied to clipboard

Should XRRenderState layers be optional?

Open rgerd opened this issue 3 years ago • 1 comments

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.

rgerd avatar Oct 31 '22 20:10 rgerd

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

cabanier avatar Oct 31 '22 20:10 cabanier