euv_core/render/config/enum.rs
1/// Top-level rendering strategy selectable at startup or dynamically at runtime.
2#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
3pub enum RenderMode {
4 /// Automatically chooses Hardware GPU when available, falling back to Hybrid then Software.
5 #[default]
6 Auto,
7 /// Pure CPU tile/dirty-rect analytical SDF software rasterizer with zero GPU requirement.
8 Software,
9 /// Full hardware GPU instanced quad/SDF/glyph batch rendering.
10 Hardware,
11 /// CPU-rasterized dirty texture tiles composited via GPU textured quads.
12 Hybrid,
13}
14
15/// Concrete low-level graphics backend driving frame presentation.
16#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
17pub enum GraphicsBackend {
18 /// Portable SIMD-friendly CPU software rasterizer.
19 #[default]
20 SoftwareCpu,
21 /// Apple Metal (macOS, iOS, iPadOS).
22 Metal,
23 /// Khronos Vulkan (Windows, Linux, Android).
24 Vulkan,
25 /// Microsoft Direct3D 12 (Windows).
26 Direct3D12,
27 /// Microsoft Direct3D 11 (Windows fallback).
28 Direct3D11,
29 /// OpenGL ES 3.0 (Android / embedded Linux fallback).
30 OpenGlEs,
31 /// Browser WebGPU API.
32 WebGpu,
33 /// Browser WebGL 2 API.
34 WebGl2,
35 /// Browser HTML5 Canvas 2D software surface blit.
36 Canvas2d,
37 /// Deterministic offscreen headless backend for automated pixel tests.
38 Headless,
39}
40
41/// Swapchain presentation synchronization mode.
42#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
43pub enum PresentMode {
44 /// Synchronized to display VBlank (tear-free, energy efficient).
45 #[default]
46 VSync,
47 /// Immediate unsynchronized presentation for lowest latency.
48 Immediate,
49 /// Triple-buffered mailbox presentation for tear-free low latency.
50 Mailbox,
51}
52
53/// Anti-aliasing quality policy for shapes, borders, and rounded corners.
54#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
55pub enum AntialiasingMode {
56 /// Hard pixel edges for maximum throughput.
57 None,
58 /// Analytical signed-distance-field coverage anti-aliasing (default, crisp and fast).
59 #[default]
60 AnalyticalSdf,
61 /// 4x hardware multi-sample anti-aliasing.
62 Msaa4x,
63 /// 2x supersampled anti-aliasing.
64 Ssaa2x,
65}
66
67/// Output framebuffer color gamut.
68#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
69pub enum ColorSpace {
70 /// Standard sRGB gamut.
71 #[default]
72 Srgb,
73 /// Wide-gamut Apple Display P3.
74 DisplayP3,
75 /// Linear HDR-ready color space.
76 Linear,
77}