blob: 18a9ef9576a4bcd5ed128930773b2b5d06bf0e25 [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
typedef (WebGLRenderingContext or WebGL2RenderingContext) XRWebGLRenderingContext;
// https://immersive-web.github.io/webxr/spec/latest/#xrwebgllayer-interface
[
SecureContext,
OriginTrialEnabled=WebXR,
Constructor(XRSession session, XRWebGLRenderingContext context, optional XRWebGLLayerInit layerInit),
RaisesException=Constructor
] interface XRWebGLLayer : XRLayer {
[ImplementedAs=getXRWebGLRenderingContext] readonly attribute XRWebGLRenderingContext context;
readonly attribute boolean antialias;
readonly attribute boolean depth;
readonly attribute boolean stencil;
readonly attribute boolean alpha;
readonly attribute boolean multiview;
readonly attribute unsigned long framebufferWidth;
readonly attribute unsigned long framebufferHeight;
readonly attribute WebGLFramebuffer framebuffer;
XRViewport? getViewport(XRView view);
void requestViewportScaling(double viewportScaleFactor);
};