Expand description
2D hardware-accelerated rendering subsystem for the Pite game engine.
Defines the Renderer2D trait and provides a pure-Rust wgpu implementation
supporting batched sprite quad rendering, texture atlas sampling, font
rasterization, and viewport projections.
Re-exports§
pub use atlas::Atlas;pub use atlas::AtlasAnimation;pub use atlas::AtlasFrame;
Modules§
- atlas
- Sprite-sheet atlases: frame metadata from a JSON sidecar plus the UV math the sprite pipeline needs.
- text
- Font loading and software rasterization into CPU/GPU pixel buffers.
Structs§
Traits§
Functions§
- fit_
scale - Uniform “contain” scale that fits
designinsideactualkeeping aspect: the game renders the design resolution throughzoom * fit_scaleso content grows and shrinks with the window instead of showing more world. Zero sizes fall back to 1.0 (a minimized window must not divide). - screen_
to_ ndc - screen_
to_ world - world_
to_ screen