PistonDevelopers / conrod

An easy-to-use, 2D GUI library written entirely in Rust.
Other
3.35k stars 297 forks source link

Change glyph caching to do between frames update #308

Closed bvssvni closed 9 years ago

bvssvni commented 9 years ago

From the comment http://www.reddit.com/r/rust_gamedev/comments/2u6op6/conrod_the_immediate_mode_ui_for_piston_is_now/co9wop8

I can think of another workaround:

  1. a text field wants to draw some text
  2. you decompose it to glyphs and find some of them to be missing from the cache
  3. you queue these and use a blank glyph to fill in for this frame
  4. you create missing glyphs with the device available between frames
  5. you draw the text correctly next frame and the following
bvssvni commented 9 years ago

This is how gfx_graphics solves the problem, but no need to build abstraction for this in Conrod.