Skip to main content

Function: layerCapability()

layerCapability(session, binding, preferWebGL): LayerCapability

Defined in: src/layers/LayerCapability.ts:26

Works out how this platform can back a quad layer.

Parameters​

session​

The active XR session, if any.

XRSession | null | undefined

binding​

The WebGL binding, if one exists.

XRWebGLBinding | null | undefined

preferWebGL​

boolean = false

Take the WebGL path even where a media binding exists. Quest ships both, so without this the WebGL path has no hardware to run on: every device that can take it would take the media path instead.

Returns​

LayerCapability

Which layer path is available.