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 5 months ago
.github/workflows Enable GitHub CI 2 years ago
examples Update `glow` dependency 1 year ago
src Downgrade shaders further 5 months ago
.gitignore Initial plumbing 2 years ago
CHANGELOG.md Update `CHANGELOG` 1 year ago
Cargo.toml Make compatible with GLES 2.0 (GLSL 1.20) 5 months ago
README.md Add a project `README` 2 years ago
rustfmt.toml Initial plumbing 2 years 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