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).
Go to file
Olivier 'reivilibre' 13ce059bdf Downgrade shaders further 2021-06-26 19:31:46 +01:00
.github/workflows Enable GitHub CI 2020-05-19 14:17:37 +02:00
examples Update `glow` dependency 2020-11-10 19:23:10 +01:00
src Downgrade shaders further 2021-06-26 19:31:46 +01:00
.gitignore Initial plumbing 2020-05-18 15:46:14 +02:00
CHANGELOG.md Update `CHANGELOG` 2020-11-10 19:28:58 +01:00
Cargo.toml Make compatible with GLES 2.0 (GLSL 1.20) 2021-06-26 19:15:19 +01:00
README.md Add a project `README` 2020-05-22 02:03:33 +02:00
rustfmt.toml Initial plumbing 2020-05-18 15:46:14 +02:00

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