Definition
WebXR/WebGPU Binding Module - Level 1 defines XRGPUBinding
[Exposed=(Window), SecureContext]
interface XRGPUBinding {
constructor(XRSession session, GPUDevice device);
readonly attribute double nativeProjectionScaleFactor;
readonly attribute boolean usesDepthValues;
XRProjectionLayer createProjectionLayer(optional XRGPUProjectionLayerInit init = {});
XRQuadLayer createQuadLayer(optional XRGPUQuadLayerInit init = {});
XRCylinderLayer createCylinderLayer(optional XRGPUCylinderLayerInit init = {});
XREquirectLayer createEquirectLayer(optional XRGPUEquirectLayerInit init = {});
XRCubeLayer createCubeLayer(optional XRGPUCubeLayerInit init = {});
XRGPUSubImage getSubImage(XRCompositionLayer layer, XRFrame frame, optional XREye eye = "none");
XRGPUSubImage getViewSubImage(XRProjectionLayer layer, XRView view);
GPUTextureFormat getPreferredColorFormat();
};
This interface is extended in the following specifications:
- WebXR Depth Sensing Module
partial interface XRGPUBinding { XRGPUDepthInformation? getDepthInformation(XRView view); };
Consolidated IDL (across mixin and partials)
[Exposed=(Window), SecureContext]
interface XRGPUBinding {
constructor(XRSession session, GPUDevice device);
readonly attribute double nativeProjectionScaleFactor;
readonly attribute boolean usesDepthValues;
XRProjectionLayer createProjectionLayer(optional XRGPUProjectionLayerInit init = {});
XRQuadLayer createQuadLayer(optional XRGPUQuadLayerInit init = {});
XRCylinderLayer createCylinderLayer(optional XRGPUCylinderLayerInit init = {});
XREquirectLayer createEquirectLayer(optional XRGPUEquirectLayerInit init = {});
XRCubeLayer createCubeLayer(optional XRGPUCubeLayerInit init = {});
XRGPUSubImage getSubImage(XRCompositionLayer layer, XRFrame frame, optional XREye eye = "none");
XRGPUSubImage getViewSubImage(XRProjectionLayer layer, XRView view);
GPUTextureFormat getPreferredColorFormat();
XRGPUDepthInformation? getDepthInformation(XRView view);
};Methods and attributes that return objects implementing XRGPUBinding
Referring specifications
- WebXR Depth Sensing Module refers to
XRGPUBinding