forCurrentPlatform static method
The backends the running platform can use, most likely first. The engine picks among them at startup and does not report its choice, so a caller wanting one backend's source takes the first that the bundle holds.
Implementation
static List<ShaderBackend> forCurrentPlatform() {
final os = runtimeOperatingSystem;
if (os == null) return const [ShaderBackend.openglEs];
return [
for (final backend in shaderBundleBackendsForOS(os))
switch (backend) {
ShaderBundleBackend.metalIos => ShaderBackend.metalIos,
ShaderBundleBackend.metalDesktop => ShaderBackend.metalDesktop,
ShaderBundleBackend.openglEs => ShaderBackend.openglEs,
ShaderBundleBackend.vulkan => ShaderBackend.vulkan,
},
];
}