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-04-08 15:29:49 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-04-08 16:57:24 +0300
commit0c9bc69f4288fdee22cc546f56bc2f75ecfdebbb (patch)
treeb7a907b0d744c353aab7cd692ce3598090341758 /source/blender/draw
parent6b109da1141adae8a9360fc1cae3bdfc1e8c6841 (diff)
DRW: Profiling: Batch BLF strings and add shadowing
Shadows makes it more readable and are relatively cheap now.
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/intern/draw_manager_profiling.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_manager_profiling.c b/source/blender/draw/intern/draw_manager_profiling.c
index 47769b1fb18..d2ed22c57b7 100644
--- a/source/blender/draw/intern/draw_manager_profiling.c
+++ b/source/blender/draw/intern/draw_manager_profiling.c
@@ -225,7 +225,13 @@ void DRW_stats_draw(rcti *rect)
double init_tot_time = 0.0, background_tot_time = 0.0, render_tot_time = 0.0, tot_time = 0.0;
- UI_FontThemeColor(BLF_default(), TH_TEXT_HI);
+ int fontid = BLF_default();
+ UI_FontThemeColor(fontid, TH_TEXT_HI);
+ BLF_enable(fontid, BLF_SHADOW);
+ BLF_shadow(fontid, 5, (const float[4]){0.0f, 0.0f, 0.0f, 0.75f});
+ BLF_shadow_offset(fontid, 0, -1);
+
+ BLF_batch_draw_begin();
/* ------------------------------------------ */
/* ---------------- CPU stats --------------- */
@@ -351,4 +357,7 @@ void DRW_stats_draw(rcti *rect)
draw_stat(rect, 16 + timer->lvl, v, stat_string, sizeof(stat_string));
v++;
}
+
+ BLF_batch_draw_end();
+ BLF_disable(fontid, BLF_SHADOW);
}