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/intern/blf_font.c')
-rw-r--r--source/blender/blenfont/intern/blf_font.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index 3a736473f57..4d7c180a488 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -188,7 +188,7 @@ static unsigned verts_needed(const FontBLF *font, const char *str, size_t len)
quad_ct += 25; /* 5x5 kernel */
}
- return length * quad_ct * 4;
+ return length * quad_ct * 6;
}
static void blf_font_draw_ex(
@@ -206,8 +206,7 @@ static void blf_font_draw_ex(
blf_font_ensure_ascii_table(font);
-#ifdef WITH_GL_PROFILE_COMPAT
- immBeginAtMost(PRIM_QUADS_XXX, verts_needed(font, str, len));
+ immBeginAtMost(PRIM_TRIANGLES, verts_needed(font, str, len));
/* at most because some glyphs might be clipped & not drawn */
while ((i < len) && str[i]) {
@@ -228,7 +227,6 @@ static void blf_font_draw_ex(
}
immEnd();
-#endif
if (r_info) {
r_info->lines = 1;
@@ -255,8 +253,7 @@ static void blf_font_draw_ascii_ex(
blf_font_ensure_ascii_table(font);
-#ifdef WITH_GL_PROFILE_COMPAT
- immBeginAtMost(PRIM_QUADS_XXX, verts_needed(font, str, len));
+ immBeginAtMost(PRIM_TRIANGLES, verts_needed(font, str, len));
while ((c = *(str++)) && len--) {
BLI_assert(c < 128);
@@ -273,7 +270,6 @@ static void blf_font_draw_ascii_ex(
}
immEnd();
-#endif
if (r_info) {
r_info->lines = 1;
@@ -297,8 +293,7 @@ int blf_font_draw_mono(FontBLF *font, const char *str, size_t len, int cwidth)
blf_font_ensure_ascii_table(font);
-#ifdef WITH_GL_PROFILE_COMPAT
- immBeginAtMost(PRIM_QUADS_XXX, verts_needed(font, str, len));
+ immBeginAtMost(PRIM_TRIANGLES, verts_needed(font, str, len));
while ((i < len) && str[i]) {
BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
@@ -320,7 +315,6 @@ int blf_font_draw_mono(FontBLF *font, const char *str, size_t len, int cwidth)
}
immEnd();
-#endif
return columns;
}