Renderer · interface
GpuIdentity
What part this machine has, as far as the browser will say. See describeGpu.
Explained in Hello world.
interface GpuIdentityimport type { GpuIdentity } from '@driftengine/core';Properties
| Name | Type | Description |
|---|---|---|
rendererNamereadonly | string | The part's own string, or '' where the browser declined to name it.MoreThe same string |
weakreadonly | boolean | isWeakGpuFamily(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.MoreNaming 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. |