glyph_brush
Fast caching text render library using ab_glyph. Provides render API agnostic rasterization & draw caching logic.
Makes extensive use of caching to optimise frame performance.
- GPU texture cache logic to dynamically maintain a GPU texture of rendered glyphs.
- Caching of glyph layout output to avoid repeated cost of identical text rendering on sequential frames.
- Layouts are re-used to optimise similar layout calculation after a change.
- Vertex generation is cached per section and re-assembled into the total vertex array on change.
- Avoids any layout or vertex calculations when identical text is rendered on sequential frames.
The crate is designed to be easily wrapped to create a convenient render API specific version, for example gfx-glyph.
use ;
let dejavu = try_from_slice?;
let mut glyph_brush = using_font.build;
glyph_brush.queue;
glyph_brush.queue;
match glyph_brush.process_queued
Examples
Have a look at
cargo run --example opengl --release