The texture has a life cycle.
Follow the lower-level WebXR Layers upload path: source canvas, texture update, binding sub-image, and GPU upload. Desktop emulation exercises the WebGL calls; a real XR session is the only place where an XR layer owns the destination texture.
Preparing a source canvas, CanvasTexture preview, raw texSubImage2D mirror, and guarded XR layer path...
- session
- -
- layers
- -
- native
- -
- source frames
- -
- raw uploads
- -
- native uploads
- -
- readbacks
- -
- draw calls
- -
The raw WebGL lane mirrors the official `bindTexture` → `texSubImage2D` sequence. It is a desktop diagnostic texture, not a native XR layer.
A physical session adds `XRWebGLBinding.getSubImage(layer, frame)` and replaces the raw texture destination with the returned layer color texture.
Outside XR, binding, frame, and native layer destination are unavailable by design; the desktop mirror still exercises texture upload and readback.
This route intentionally stays on WebGL2. It teaches the source/update/destination boundary without claiming that a desktop raw texture is an XR layer.