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:
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r--source/blender/blenfont/BLF_api.h1
-rw-r--r--source/blender/blenfont/intern/blf.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h
index 3466f1665c6..668588435b4 100644
--- a/source/blender/blenfont/BLF_api.h
+++ b/source/blender/blenfont/BLF_api.h
@@ -98,6 +98,7 @@ void BLF_matrix(int fontid, const float m[16]);
/* Batch drawcalls together as long as
* the modelview matrix and the font remain unchanged. */
void BLF_batch_draw_begin(void);
+void BLF_batch_draw_flush(void);
void BLF_batch_draw_end(void);
/* Draw the string using the default font, size and dpi. */
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index b94c6e35823..fafee125264 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -548,6 +548,13 @@ void BLF_batch_draw_begin(void)
g_batch.enabled = true;
}
+void BLF_batch_draw_flush(void)
+{
+ if (g_batch.enabled) {
+ blf_batch_draw();
+ }
+}
+
void BLF_batch_draw_end(void)
{
BLI_assert(g_batch.enabled == true);