Renderer · interface

GpuIdentity

What part this machine has, as far as the browser will say. See describeGpu.

Explained in Hello world.

interface GpuIdentity
import type { GpuIdentity } from '@driftengine/core';

Properties

NameTypeDescription
rendererNamereadonlystringThe part's own string, or '' where the browser declined to name it.
More

The same string RendererApi.rendererName carries once a renderer exists, from the same two derivations — this is that answer, moved earlier.

weakreadonlybooleanisWeakGpuFamily(rendererName), so a caller does not have to remember to ask.
sourcereadonly'webgpu' | 'webgl2' | 'none'Which API answered, and never a prediction of the backend createRenderer will build on.
More

Naming the part and choosing a backend are different questions with different costs: this asks an adapter for its name, and the selection asks for a device, compiles what it was given and reads back a pixel. A machine can name a WebGPU adapter and still end up on WebGL2. The field is here so a bug report can say where the string came from, not so a caller can branch on it.