oxiui_render_wgpu/gpu.rs
1//! Real (non-stub) headless GPU rendering for OxiUI, built on [`wgpu`].
2//!
3//! This module implements [`oxiui_core::paint::RenderBackend`] on a GPU target
4//! that is created *headlessly* — there is no window or swap-chain surface.
5//! Draw commands are rasterised into an offscreen colour texture which can be
6//! read back to CPU memory for testing or off-screen export.
7//!
8//! Sub-modules:
9//!
10//! - [`device`] — headless `Instance`/adapter/device/queue + offscreen texture.
11//! - [`pipeline`] — `solid.wgsl` and `gradient.wgsl` compiled pipelines.
12//! - [`buffer`] — `#[repr(C)]` `Pod` vertex / uniform layouts + quad emitters.
13//! - [`tessellator`] — CPU path flattening and stroke/fill tessellation.
14//! - [`renderer`] — [`WgpuBackend`] and the `RenderBackend` implementation.
15
16pub mod buffer;
17pub mod device;
18pub mod pipeline;
19pub mod renderer;
20pub mod tessellator;
21
22pub use buffer::{Globals, GradientVertex, Vertex};
23pub use device::{GpuContext, TARGET_FORMAT};
24pub use pipeline::{GradientPipeline, SolidPipeline};
25pub use renderer::WgpuBackend;