| // 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/#xrwebgllayer-interface |
| [ |
| SecureContext, |
| Exposed=Window, |
| RuntimeEnabled=WebXR |
| ] interface XRWebGLLayer { |
| [RaisesException, Measure] constructor(XRSession session, XRWebGLRenderingContext context, optional XRWebGLLayerInit layerInit = {}); |
| readonly attribute boolean antialias; |
| readonly attribute boolean ignoreDepthValues; |
| |
| readonly attribute unsigned long framebufferWidth; |
| readonly attribute unsigned long framebufferHeight; |
| [SameObject] readonly attribute WebGLFramebuffer framebuffer; |
| |
| XRViewport? getViewport(XRView view); |
| |
| static double getNativeFramebufferScaleFactor(XRSession session); |
| }; |