A fork of glow_glyph which strives for compatibility with old OpenGL (ES) versions. Tested to work on OpenGL ES 2.0 (GLSL 1.20).
Olivier 'reivilibre' 13ce059bdf | ||
---|---|---|
.github/workflows | ||
examples | ||
src | ||
.gitignore | ||
CHANGELOG.md | ||
Cargo.toml | ||
README.md | ||
rustfmt.toml |
README.md
glow_glyph
A fast text renderer for glow, powered by glyph_brush
use glow_glyph::{Section, GlyphBrushBuilder};
let font: &[u8] = include_bytes!("SomeFont.ttf");
let mut glyph_brush = GlyphBrushBuilder::using_font_bytes(font)
.expect("Load font")
.build(&glow_context);
let section = Section {
text: "Hello glow_glyph",
..Section::default() // color, position, etc
};
glyph_brush.queue(section);
glyph_brush.queue(some_other_section);
glyph_brush.draw_queued(
&glow_context,
window_width,
window_height,
);
Examples
Have a look at
cargo run --example hello
cargo run --example clipping