Skip to main content

Crate pite_render

Crate pite_render 

Source
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§

NoopRenderer
OffscreenRenderer
WgpuRenderer

Traits§

Renderer2D

Functions§

fit_scale
Uniform “contain” scale that fits design inside actual keeping aspect: the game renders the design resolution through zoom * fit_scale so 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