Crate piet_wgpu

Source
Expand description

A GPU-accelerated 2D graphics backend for piet that uses the wgpu crate.

This crate follows the wgpu middleware pattern, but in a somewhat unique way.

  • The user creates the WgpuContext by calling new() with a device and expected texture format.
  • Before rendering, the user creates a RenderContext by calling prepare() on the WgpuContext with a Device and a Queue. prepare() returns the context, which is expected to be written to.
  • Finally, by calling render on the WgpuContext, the user renders all of the material that was written to the RenderContext using the piet API.

Re-exports§

pub use piet_hardware::piet;
pub use wgpu;

Structs§

Brush
The brush type.
Image
The image type.
RenderContext
The whole point.
Text
The text engine type.
TextLayout
The text layout type.
TextLayoutBuilder
The text layout builder type.
WgpuContext
A wrapper around internal cached state.