Open tareksander opened 10 months ago
Or do I have to do my own thing with glyph_brush_layout
and glyph_brush_draw_cache
instead?
GlyphBrush
is designed to render all vertices in a single draw.
If you need to do multiple draws one option is multiple GlyphBrush
instances, one for each draw. See https://github.com/alexheretic/glyph-brush/issues/157.
Is there an option to share the cache between instances?
Currently it isn't possible to share a single texture between GlyphBrush
instances.
Is there a way to get the number of GlyphVertex instances that will be generated by the Section on the next process_queued call? I need to order the section drawing with other drawing operations, and for that I need to know which GlyphVertex instances came from which Section. I want to implement Skia-like SaveLayer functionality, which means I can't draw all the text at once, but have to switch rendering targets in between.