backendId property

  1. @override
BackendId get backendId

The backend's id: the one name a material compiler, a plugin manifest and RuntimeShaders know this backend by, compared exactly.

backendName is for people ("WebGL2", "the software rasteriser"); this is for matching, so it is short, lower case and fixed for good once a backend ships: the constants of BackendId for the engine's own. A MaterialCompiler for this backend answers the same string as its backend. backendName in lower case by default, so a backend that names itself "Vulkan" is vulkan unless it says otherwise.

Override it with a constant. The default follows backendName, so a backend that renames itself for people would silently change the id every compiler and manifest matches; the engine's backends, wgpu, the null example and the backend template all say theirs outright.

Implementation

@override
BackendId get backendId => BackendId.webgpu;