Skip to main content

euv_core/game/surface/
enum.rs

1use super::*;
2
3/// Pixel storage format of a shared GPU render target texture composited with the EUV HUD.
4#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
5pub enum GpuTextureFormat {
6    /// 8-bit linear RGBA unsigned normalized texture.
7    #[default]
8    Rgba8Unorm,
9    /// 8-bit sRGB-encoded RGBA texture.
10    Rgba8UnormSrgb,
11    /// 8-bit BGRA unsigned normalized swapchain/Metal/DXGI texture.
12    Bgra8Unorm,
13    /// 16-bit half-float linear HDR render target texture.
14    Rgba16Float,
15    /// 10-bit RGB + 2-bit alpha HDR10/wide-gamut render target texture.
16    Rgb10A2Unorm,
17}
18
19/// Active presentation transport selected for a 2D or 3D `GameViewport`.
20#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
21pub enum ViewportPresentPath {
22    /// Direct same-device GPU texture compositing with EUV HUD in a single present pass (zero CPU readback).
23    #[default]
24    GpuDirectComposite,
25    /// Bounded zero-allocation CPU output buffer pool fallback uploaded once per changed frame.
26    CpuPooledFallback,
27}