| 62 | |
| 63 | impl GraphicsBackend { |
| 64 | pub fn is_supported(&self) -> bool { |
| 65 | match self { |
| 66 | GraphicsBackend::Auto => true, |
| 67 | GraphicsBackend::Vulkan => { |
| 68 | cfg!(all(feature = "wgpu", any(target_os = "windows", target_os = "linux"))) |
| 69 | } |
| 70 | GraphicsBackend::Metal => cfg!(all(feature = "wgpu", target_os = "macos")), |
| 71 | GraphicsBackend::Dx12 => cfg!(all(feature = "wgpu", target_os = "windows")), |
| 72 | GraphicsBackend::OpenGL => cfg!(feature = "glow"), |
| 73 | GraphicsBackend::OpenGLES => cfg!(all(feature = "wgpu", target_os = "windows")), |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | pub fn display_name(self) -> &'static str { |
| 78 | match self { |