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-30 21:59:45 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-03-30 21:59:45 +0300
commit963e48e1dfb09520369b9a3a31b4f57663651c21 (patch)
tree52644c734ae20c4a011da3bc146bd438b8a9a56f /source/blender/blenfont/BLF_api.h
parentfb1463ff2bc707b00223c913c6a9e4f35ba94fd4 (diff)
BLF: Add Batching capabilities.
You can now use BLF_batching_start and BLF_batching_end to batch every drawcall to BLF together minimizing the overhead introduced by BLF and the opengl driver. These calls cannot be nested (for now). If the modelview matrix changes, previously batched calls are issued and a the process resume with the new matrix. However the projection matrix MUST not change and gl scissors as well.
Diffstat (limited to 'source/blender/blenfont/BLF_api.h')
-rw-r--r--source/blender/blenfont/BLF_api.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h
index fd0c0362300..f9841c83163 100644
--- a/source/blender/blenfont/BLF_api.h
+++ b/source/blender/blenfont/BLF_api.h
@@ -95,6 +95,11 @@ void BLF_color3fv_alpha(int fontid, const float rgb[3], float alpha);
*/
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_batching_start(void);
+void BLF_batching_end(void);
+
/* Draw the string using the default font, size and dpi. */
void BLF_draw_default(float x, float y, float z, const char *str, size_t len) ATTR_NONNULL();
void BLF_draw_default_ascii(float x, float y, float z, const char *str, size_t len) ATTR_NONNULL();