Skip to main content

lgui_render_api/
preference.rs

1#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
2pub enum GraphicsPreference {
3    #[default]
4    Auto,
5    OpenGl,
6    Vulkan,
7    Metal,
8    Software,
9}
10
11impl GraphicsPreference {
12    pub const fn as_str(self) -> &'static str {
13        match self {
14            Self::Auto => "auto",
15            Self::OpenGl => "opengl",
16            Self::Vulkan => "vulkan",
17            Self::Metal => "metal",
18            Self::Software => "software",
19        }
20    }
21}