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).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Olivier 'reivilibre' 13ce059bdf Downgrade shaders further 3 months ago
.github/workflows Enable GitHub CI 1 year ago
examples Update `glow` dependency 11 months ago
src Downgrade shaders further 3 months ago
.gitignore Initial plumbing 1 year ago
CHANGELOG.md Update `CHANGELOG` 11 months ago
Cargo.toml Make compatible with GLES 2.0 (GLSL 1.20) 3 months ago
README.md Add a project `README` 1 year ago
rustfmt.toml Initial plumbing 1 year ago

README.md

glow_glyph

Integration status crates.io Documentation License

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