Skip to main content

Module gpu

Module gpu 

Source
Expand description

Real (non-stub) headless GPU rendering for OxiUI, built on wgpu.

This module implements oxiui_core::paint::RenderBackend on a GPU target that is created headlessly — there is no window or swap-chain surface. Draw commands are rasterised into an offscreen colour texture which can be read back to CPU memory for testing or off-screen export.

Sub-modules:

  • device — headless Instance/adapter/device/queue + offscreen texture.
  • pipelinesolid.wgsl and gradient.wgsl compiled pipelines.
  • buffer#[repr(C)] Pod vertex / uniform layouts + quad emitters.
  • tessellator — CPU path flattening and stroke/fill tessellation.
  • rendererWgpuBackend and the RenderBackend implementation.

Re-exports§

pub use buffer::Globals;
pub use buffer::GradientVertex;
pub use buffer::Vertex;
pub use device::GpuContext;
pub use device::TARGET_FORMAT;
pub use pipeline::GradientPipeline;
pub use pipeline::SolidPipeline;
pub use renderer::WgpuBackend;

Modules§

buffer
Vertex / uniform data layouts for the headless solid-fill + gradient pipelines.
device
Headless wgpu device acquisition and the offscreen colour target.
pipeline
Render-pipeline construction for the solid-fill / SDF shader and the gradient pipeline.
renderer
WgpuBackend: headless GPU RenderBackend implementing Tier 1 primitives and gradient fills.
tessellator
CPU-side path tessellator for DrawCommand::FillPath and DrawCommand::StrokePath.