normalize static method

BackendId? normalize(
  1. String? backend
)

backend as a backend id, by BackendId.normalize: one of the engine's own by its id or its device's name in any case (WebGL2, webgl2 and webgl are one backend), and any other name exactly as written. Null stays null.

Exact, not by prefix. A backend from outside is matched by its own id (GraphicsDevice.backendId), the one its MaterialCompiler gives: webgpu-dawn is not the engine's WebGPU, and Vulkan finds the compiler registered as Vulkan.

Implementation

static BackendId? normalize(String? backend) =>
    backend == null ? null : BackendId.normalize(backend);