diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-06-19 13:18:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-06-19 13:18:04 +0300 |
commit | b4d053efc75424fca4b413ac1bc7a7e826fac629 (patch) | |
tree | 80647d9ca9109e997fce9911f202f98d7f8577d4 /source/blender/editors/space_outliner | |
parent | 349946bd010b1112b13c8594aabfb318c330bc0d (diff) |
Gawain API naming refactor
Use consistent prefix for gawain API names as well as
some abbreviations to avoid over-long names, see: D2678
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index b6a2e6f60fb..7a1eca0f179 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -652,11 +652,11 @@ static void outliner_draw_rnacols(ARegion *ar, int sizex) glLineWidth(1.0f); - unsigned int pos = VertexFormat_add_attrib(immVertexFormat(), "pos", COMP_F32, 2, KEEP_FLOAT); + unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); immUniformThemeColorShadeAlpha(TH_BACK, -15, -200); - immBegin(PRIM_LINES, 4); + immBegin(GWN_PRIM_LINES, 4); immVertex2f(pos, sizex, v2d->cur.ymax); immVertex2f(pos, sizex, miny); @@ -1455,8 +1455,8 @@ static void outliner_draw_tree_element( /* divider */ { - VertexFormat *format = immVertexFormat(); - unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_I32, 2, CONVERT_INT_TO_FLOAT); + Gwn_VertFormat *format = immVertexFormat(); + unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_I32, 2, GWN_FETCH_INT_TO_FLOAT); unsigned char col[4]; immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); @@ -1510,7 +1510,7 @@ static void outliner_draw_tree_element_floating( const TreeElement *te_insert = te_floating->drag_data->insert_handle; const int line_width = 2; - unsigned int pos = VertexFormat_add_attrib(immVertexFormat(), "pos", COMP_F32, 2, KEEP_FLOAT); + unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); int coord_y = te_insert->ys; int coord_x = te_insert->xs; float col[4]; @@ -1531,7 +1531,7 @@ static void outliner_draw_tree_element_floating( immUniformColor4fv(col); glLineWidth(line_width); - immBegin(PRIM_LINE_STRIP, 2); + immBegin(GWN_PRIM_LINE_STRIP, 2); immVertex2f(pos, coord_x, coord_y); immVertex2f(pos, ar->v2d.cur.xmax, coord_y); immEnd(); @@ -1540,7 +1540,7 @@ static void outliner_draw_tree_element_floating( BLI_assert(te_floating->drag_data->insert_type == TE_INSERT_INTO); immUniformColor3fvAlpha(col, col[3] * 0.5f); - immBegin(PRIM_TRIANGLE_STRIP, 4); + immBegin(GWN_PRIM_TRI_STRIP, 4); immVertex2f(pos, coord_x, coord_y + UI_UNIT_Y); immVertex2f(pos, coord_x, coord_y); immVertex2f(pos, ar->v2d.cur.xmax, coord_y + UI_UNIT_Y); @@ -1608,8 +1608,8 @@ static void outliner_draw_hierarchy_lines_recursive(unsigned pos, SpaceOops *soo static void outliner_draw_hierarchy_lines(SpaceOops *soops, ListBase *lb, int startx, int *starty) { - VertexFormat *format = immVertexFormat(); - unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_I32, 2, CONVERT_INT_TO_FLOAT); + Gwn_VertFormat *format = immVertexFormat(); + unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_I32, 2, GWN_FETCH_INT_TO_FLOAT); unsigned char col[4]; immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); @@ -1634,8 +1634,8 @@ static void outliner_draw_struct_marks(ARegion *ar, SpaceOops *soops, ListBase * /* selection status */ if (TSELEM_OPEN(tselem, soops)) if (tselem->type == TSE_RNA_STRUCT) { - VertexFormat *format = immVertexFormat(); - unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_I32, 2, CONVERT_INT_TO_FLOAT); + Gwn_VertFormat *format = immVertexFormat(); + unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_I32, 2, GWN_FETCH_INT_TO_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); immThemeColorShadeAlpha(TH_BACK, -15, -200); immRecti(pos, 0, *starty + 1, (int)ar->v2d.cur.xmax, *starty + UI_UNIT_Y - 1); @@ -1646,12 +1646,12 @@ static void outliner_draw_struct_marks(ARegion *ar, SpaceOops *soops, ListBase * if (TSELEM_OPEN(tselem, soops)) { outliner_draw_struct_marks(ar, soops, &te->subtree, starty); if (tselem->type == TSE_RNA_STRUCT) { - VertexFormat *format = immVertexFormat(); - unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT); + Gwn_VertFormat *format = immVertexFormat(); + unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); immThemeColorShadeAlpha(TH_BACK, -15, -200); - immBegin(PRIM_LINES, 2); + immBegin(GWN_PRIM_LINES, 2); immVertex2f(pos, 0, (float)*starty + UI_UNIT_Y); immVertex2f(pos, ar->v2d.cur.xmax, (float)*starty + UI_UNIT_Y); immEnd(); @@ -1714,8 +1714,8 @@ static void outliner_draw_highlights(ARegion *ar, SpaceOops *soops, int startx, col_searchmatch[3] = 0.5f; glEnable(GL_BLEND); - VertexFormat *format = immVertexFormat(); - unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_I32, 2, CONVERT_INT_TO_FLOAT); + Gwn_VertFormat *format = immVertexFormat(); + unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_I32, 2, GWN_FETCH_INT_TO_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); outliner_draw_highlights_recursive(pos, ar, soops, &soops->tree, col_selection, col_highlight, col_searchmatch, startx, starty); @@ -1786,8 +1786,8 @@ static void outliner_back(ARegion *ar) ystart = (int)ar->v2d.tot.ymax; ystart = UI_UNIT_Y * (ystart / (UI_UNIT_Y)) - OL_Y_OFFSET; - VertexFormat *format = immVertexFormat(); - unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT); + Gwn_VertFormat *format = immVertexFormat(); + unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); immUniformThemeColorShade(TH_BACK, 6); @@ -1797,7 +1797,7 @@ static void outliner_back(ARegion *ar) int tot = (int)floor(ystart - ar->v2d.cur.ymin + 2 * UI_UNIT_Y) / (2 * UI_UNIT_Y); if (tot > 0) { - immBegin(PRIM_TRIANGLES, 6 * tot); + immBegin(GWN_PRIM_TRIS, 6 * tot); while (tot--) { y1 -= 2 * UI_UNIT_Y; y2 = y1 + UI_UNIT_Y; @@ -1818,10 +1818,10 @@ static void outliner_draw_restrictcols(ARegion *ar) { glLineWidth(1.0f); - unsigned int pos = VertexFormat_add_attrib(immVertexFormat(), "pos", COMP_I32, 2, CONVERT_INT_TO_FLOAT); + unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_I32, 2, GWN_FETCH_INT_TO_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); immUniformThemeColorShadeAlpha(TH_BACK, -15, -200); - immBegin(PRIM_LINES, 6); + immBegin(GWN_PRIM_LINES, 6); /* view */ immVertex2i(pos, (int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX), (int)ar->v2d.cur.ymax); |