A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/XRWebGLLayer/framebuffer below:

XRWebGLLayer: framebuffer property - Web APIs

XRWebGLLayer: framebuffer property

Limited availability

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The read-only XRWebGLLayer property framebuffer is an opaque WebGLFramebuffer which is used to buffer the rendered image if the XR compositor is being used. Otherwise, this property's value is null. The opaque framebuffer is functionally nearly the same as a standard WebGL framebuffer, except for the differences covered in the section How opaque framebuffers are special below.

Value

A WebGLFramebuffer object representing the framebuffer into which the 3D scene is being rendered, or null if the XR compositor is disabled for the session.

Usage notes How opaque framebuffers are special

The framebuffer represented by the framebuffer property is opaque. As such, its behavior is different in several ways from a standard WebGL context. These differences cause the opaque framebuffer to behave more like the default WebGL framebuffer:

Note: The depth and stencil properties are not required to be supported in order for a browser to be construed as having full WebGL support.

The default configuration of a new framebuffer

Upon creating a new XRWebGLLayer, its new framebuffer is initialized just like the default framebuffer for any WebGL interface:

Examples

This example gets the XRWebGLLayer for a session and then passes its framebuffer into the WebGL context's bindFramebuffer() function.

let glLayer = xrSession.renderState.baseLayer;
gl.bindFramebuffer(gl.FRAMEBUFFER, glLayer.framebuffer);
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4