refactor(render): TextBackend owns its atlas, and staged glyphs carry a rotation basis
This commit is contained in:
1 parent
90e17a0a11
commit
e074f57ddf
23 files changed
+1073
-227
No files matched your search
@@ -48,8 +48,14 @@ class TextProgram {
|
||||
|
||||
/// `u_viewport`: render target size in pixels.
|
||||
void set_viewport(Vec2 px) const noexcept;
|
||||
/// `u_px_range`: pixels per glyph cell, i.e. the on-screen size of one glyph.
|
||||
/// `u_px_range`: the glyph cell's size on screen, in pixels (width and
|
||||
/// height -- a cell need not be square).
|
||||
void set_px_range(Vec2 px) const noexcept;
|
||||
/// `u_glyph_uv`: the glyph cell's size in the atlas, normalised. It is the
|
||||
/// rect every staged glyph is read through, so it is one size per draw: a
|
||||
/// batch stages glyphs from one atlas, and `TextBatch::glyph_cell_uv()` is
|
||||
/// where it comes from.
|
||||
void set_glyph_uv(Vec2 uv) const noexcept;
|
||||
/// `u_tex_size`: atlas size in texels.
|
||||
void set_texture_size(Vec2 texels) const noexcept;
|
||||
/// `u_color`: tint colour, alpha included.
|
||||
|
||||
Reference in new issue
Block a user