BLF: Fix problem with drawing with fonts with multiple size.

Fix T54838 : Text display glitch w/ fonts at different sizes.

This was cause by the cache not being flushed when changing font texture.
This commit is contained in:
Clément Foucault 2018-04-26 14:20:58 +02:00
parent df3ea82b84
commit 2ebcde701a
Notes: blender-bot 2023-02-14 05:57:08 +01:00
Referenced by issue #54838, Text display glitch w/ fonts at different sizes
1 changed files with 1 additions and 0 deletions

View File

@ -519,6 +519,7 @@ void blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y)
}
if (font->tex_bind_state != g->tex) {
blf_batch_draw();
glBindTexture(GL_TEXTURE_2D, (font->tex_bind_state = g->tex));
}