From b4d053efc75424fca4b413ac1bc7a7e826fac629 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 19 Jun 2017 20:18:04 +1000 Subject: Gawain API naming refactor Use consistent prefix for gawain API names as well as some abbreviations to avoid over-long names, see: D2678 --- source/blender/blenfont/intern/blf.c | 8 ++++---- source/blender/blenfont/intern/blf_font.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'source/blender/blenfont') diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index 43060870449..55c08361a47 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -566,10 +566,10 @@ static void blf_draw_gl__start(FontBLF *font) gpuRotate2D(RAD2DEG(font->angle)); #ifndef BLF_STANDALONE - VertexFormat *format = immVertexFormat(); - unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT); - unsigned int texCoord = VertexFormat_add_attrib(format, "texCoord", COMP_F32, 2, KEEP_FLOAT); - unsigned int color = VertexFormat_add_attrib(format, "color", COMP_U8, 4, NORMALIZE_INT_TO_FLOAT); + Gwn_VertFormat *format = immVertexFormat(); + unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); + unsigned int texCoord = GWN_vertformat_attr_add(format, "texCoord", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); + unsigned int color = GWN_vertformat_attr_add(format, "color", GWN_COMP_U8, 4, GWN_FETCH_INT_TO_FLOAT_UNIT); BLI_assert(pos == BLF_POS_ID); BLI_assert(texCoord == BLF_COORD_ID); diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 3ba75517581..03f62cbb6ea 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -206,7 +206,7 @@ static void blf_font_draw_ex( blf_font_ensure_ascii_table(font); - immBeginAtMost(PRIM_TRIANGLES, verts_needed(font, str, len)); + immBeginAtMost(GWN_PRIM_TRIS, verts_needed(font, str, len)); /* at most because some glyphs might be clipped & not drawn */ while ((i < len) && str[i]) { @@ -253,7 +253,7 @@ static void blf_font_draw_ascii_ex( blf_font_ensure_ascii_table(font); - immBeginAtMost(PRIM_TRIANGLES, verts_needed(font, str, len)); + immBeginAtMost(GWN_PRIM_TRIS, verts_needed(font, str, len)); while ((c = *(str++)) && len--) { BLI_assert(c < 128); @@ -293,7 +293,7 @@ int blf_font_draw_mono(FontBLF *font, const char *str, size_t len, int cwidth) blf_font_ensure_ascii_table(font); - immBeginAtMost(PRIM_TRIANGLES, verts_needed(font, str, len)); + immBeginAtMost(GWN_PRIM_TRIS, verts_needed(font, str, len)); while ((i < len) && str[i]) { BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table); -- cgit v1.2.3