Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-03-31 21:26:09 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-03-31 21:26:09 +0300
commit4ae7235637c28f8b5e35825b0052a851b9afe1ae (patch)
tree4b4eaf3b5b9aeaf6464fdb8efa405a0774c3a90c /source/blender/blenfont
parentc77870fc78f594411c9831ee77eba2167a702fd7 (diff)
BLF: Fix Vertical/Horizontal layout switch.
This was breaking the first drawcall after a simple/non-simple shader switch.
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r--source/blender/blenfont/intern/blf_font.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index b029fbe5eeb..e90c2436fd0 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -129,7 +129,7 @@ void blf_batch_draw_begin(FontBLF *font)
g_batch.active = g_batch.enabled && simple_shader;
- if (g_batch.simple_shader) {
+ if (simple_shader) {
/* Offset is applied to each glyph. */
copy_v2_v2(g_batch.ofs, font->pos);
}
@@ -156,8 +156,6 @@ void blf_batch_draw_begin(FontBLF *font)
blf_batch_draw();
g_batch.simple_shader = simple_shader;
g_batch.font = font;
- /* Save for next memcmp. */
- memcpy(g_batch.mat, gpumat, sizeof(g_batch.mat));
}
else {
/* Nothing changed continue batching. */
@@ -166,6 +164,8 @@ void blf_batch_draw_begin(FontBLF *font)
if (mat_changed) {
gpuPopMatrix();
+ /* Save for next memcmp. */
+ memcpy(g_batch.mat, gpumat, sizeof(g_batch.mat));
}
}
else {
@@ -378,6 +378,9 @@ static void blf_font_draw_ex(
blf_font_ensure_ascii_table(font);
blf_font_ensure_ascii_kerning(font, kern_mode);
+ if (strcmp(str, "Tools") == 0)
+ printf("AAAA\n");
+
blf_batch_draw_begin(font);
while ((i < len) && str[i]) {