Point the backend-dependent rendering paths at renderer. Every renderer
Luxar draws through needs this — the app's own (both create*Renderer
below) and a host's in layer mode (core/layer/luxar-layer.ts) — because
each switch is a module default tuned for classic WebGL:
element textures are laid out against the device's maxTextureSize;
both WebGPU backends ignore texture update ranges, so element textures
upload only their dirty rows there (#2944) — a no-op on classic WebGL;
the backend policy (rendering/renderer-backend-policy.ts) derives the
rest from backendKind in one place: how depth-sort orderings upload
(chunked with back-pressure on classic WebGL only), whether a pool
rebuild evicts three's cached RenderObject (WebGPU only), and whether
WebGPU compute is available (native WebGPU only).
Call after the renderer is initialised (WebGPU's backend exists only after
init()).
The switches are page-wide and the last call wins, so every Luxar host on a
page (a LuxarApp, LuxarLayers) must render through ONE backend. Not enforced
— a page may re-init on another backend once the first host is gone — but a
call that switches the backend warns once.
Point the backend-dependent rendering paths at
renderer. Every renderer Luxar draws through needs this — the app's own (bothcreate*Rendererbelow) and a host's in layer mode (core/layer/luxar-layer.ts) — because each switch is a module default tuned for classic WebGL:maxTextureSize;rendering/renderer-backend-policy.ts) derives the rest frombackendKindin one place: how depth-sort orderings upload (chunked with back-pressure on classic WebGL only), whether a pool rebuild evicts three's cached RenderObject (WebGPU only), and whether WebGPU compute is available (native WebGPU only).Call after the renderer is initialised (WebGPU's backend exists only after
init()).The switches are page-wide and the last call wins, so every Luxar host on a page (a LuxarApp, LuxarLayers) must render through ONE backend. Not enforced — a page may re-init on another backend once the first host is gone — but a call that switches the backend warns once.