XRWebGLSubImage

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

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

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

The XRWebGLSubImage interface is used during rendering of WebGL layers.

XRSubImage XRWebGLSubImage

Instance properties

Inherits properties from its parent, XRSubImage.

XRWebGLSubImage.colorTexture Read only Experimental

A color WebGLTexture object for the XRCompositionLayer to render.

XRWebGLSubImage.depthStencilTexture Read only Experimental

A depth/stencil WebGLTexture object for the XRCompositionLayer to render.

XRWebGLSubImage.imageIndex Read only Experimental

A number representing the offset into the texture array if the layer was requested with texture-array; null otherwise.

XRWebGLSubImage.colorTextureWidth Read only Experimental

A number representing the width in pixels of the GL attachment.

XRWebGLSubImage.colorTextureHeight Read only Experimental

A number representing the height in pixels of the GL attachment.

Specifications

Specification
WebXR Layers API Level 1
# xrwebglsubimagetype

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
XRWebGLSubImage
Experimental
colorTexture
Experimental
colorTextureHeight
Experimental
colorTextureWidth
Experimental
depthStencilTexture
Experimental
imageIndex
Experimental

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.

See also