diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-03-30 21:59:45 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-03-30 21:59:45 +0300 |
commit | 963e48e1dfb09520369b9a3a31b4f57663651c21 (patch) | |
tree | 52644c734ae20c4a011da3bc146bd438b8a9a56f /source/blender/blenfont/intern/blf_internal_types.h | |
parent | fb1463ff2bc707b00223c913c6a9e4f35ba94fd4 (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/intern/blf_internal_types.h')
-rw-r--r-- | source/blender/blenfont/intern/blf_internal_types.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h index 360aae47dd0..91d7917b0b5 100644 --- a/source/blender/blenfont/intern/blf_internal_types.h +++ b/source/blender/blenfont/intern/blf_internal_types.h @@ -43,8 +43,8 @@ typedef struct BatchBLF{ unsigned int pos_loc, tex_loc, col_loc; unsigned int glyph_ct; float ofs[2]; /* copy of font->pos */ - float mat[4][4]; /* to catch bad usage */ - bool enabled; + float mat[4][4]; /* previous call modelmatrix. */ + bool enabled, active; } BatchBLF; extern BatchBLF g_batch; |