gfx_glyph
Fast GPU cached text rendering using gfx-rs & rusttype.
Makes use of three kinds of caching to optimise frame performance.
- Caching of glyph positioning output to avoid repeated cost of identical text rendering on sequential frames.
- Caches draw calculations to avoid repeated cost of identical text rendering on sequential frames.
- GPU cache logic to dynamically maintain a GPU texture of rendered glyphs.
extern crate gfx_glyph;
use ;
let garamond: & = include_bytes!;
let mut glyph_brush = using_font_bytes
.build;
let section = Section ;
glyph_brush.queue;
glyph_brush.queue;
glyph_brush.draw_queued.unwrap;
Examples
Have a look at
cargo run --example paragraph --release
cargo run --example performance --release
cargo run --example varied --release
cargo run --example depth --release
Limitations
The current implementation supports OpenGL (3.0 or later). However, other rendering languages (that are supported by gfx) should be easy enough to add. Send in your PRs!