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:
authorBastien Montagne <montagne29@wanadoo.fr>2017-04-10 22:21:38 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-04-10 22:21:38 +0300
commitf0404c3382f36554ed52b7765029c1b8dc6cacb3 (patch)
tree7a0f55e31d98a0096acbea544519d39b3ddaddfa /source/blender/blenfont/intern/blf_glyph.c
parentc9685a148f6a323af748ecd45b14ae2d07f2425c (diff)
Get rid of last PRIM_QUAD usage, in blf_font.c/blf_glyph.c.
Diffstat (limited to 'source/blender/blenfont/intern/blf_glyph.c')
-rw-r--r--source/blender/blenfont/intern/blf_glyph.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c
index fa37f88d91f..b4d29b5d61e 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -317,6 +317,7 @@ void blf_glyph_free(GlyphBLF *g)
static void blf_texture_draw(const unsigned char color[4], float uv[2][2], float dx, float y1, float dx1, float y2)
{
+ /* First triangle. */
immAttrib2f(BLF_COORD_ID, uv[0][0], uv[0][1]);
immSkipAttrib(BLF_COLOR_ID); /* skip color of most vertices */
immVertex2f(BLF_POS_ID, dx, y1);
@@ -326,6 +327,15 @@ static void blf_texture_draw(const unsigned char color[4], float uv[2][2], float
immVertex2f(BLF_POS_ID, dx, y2);
immAttrib2f(BLF_COORD_ID, uv[1][0], uv[1][1]);
+ immAttrib4ubv(BLF_COLOR_ID, color); /* set color of provoking vertex */
+ immVertex2f(BLF_POS_ID, dx1, y2);
+
+ /* Second triangle. */
+ immAttrib2f(BLF_COORD_ID, uv[0][0], uv[0][1]);
+ immSkipAttrib(BLF_COLOR_ID); /* skip color of most vertices */
+ immVertex2f(BLF_POS_ID, dx, y1);
+
+ immAttrib2f(BLF_COORD_ID, uv[1][0], uv[1][1]);
immSkipAttrib(BLF_COLOR_ID);
immVertex2f(BLF_POS_ID, dx1, y2);