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/editors/mesh/editmesh_knife.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'source/blender/editors/mesh/editmesh_knife.c') diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 530faffdac1..3c974e4b3b9 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -1002,13 +1002,13 @@ static void knifetool_draw_angle_snapping(const KnifeTool_OpData *kcd) copy_v3_v3(v2, ray_hit_best[1]); } - unsigned int pos = VertexFormat_add_attrib(immVertexFormat(), "pos", COMP_F32, 3, KEEP_FLOAT); + unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); immUniformThemeColor(TH_TRANSFORM); glLineWidth(2.0); - immBegin(PRIM_LINES, 2); + immBegin(GWN_PRIM_LINES, 2); immVertex3fv(pos, v1); immVertex3fv(pos, v2); immEnd(); @@ -1044,7 +1044,7 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg) gpuPushMatrix(); gpuMultMatrix(kcd->ob->obmat); - unsigned int pos = VertexFormat_add_attrib(immVertexFormat(), "pos", COMP_F32, 3, KEEP_FLOAT); + unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); @@ -1055,7 +1055,7 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg) immUniformColor3ubv(kcd->colors.line); glLineWidth(2.0); - immBegin(PRIM_LINES, 2); + immBegin(GWN_PRIM_LINES, 2); immVertex3fv(pos, kcd->prev.cage); immVertex3fv(pos, kcd->curr.cage); immEnd(); @@ -1065,7 +1065,7 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg) immUniformColor3ubv(kcd->colors.point); glPointSize(11); - immBegin(PRIM_POINTS, 1); + immBegin(GWN_PRIM_POINTS, 1); immVertex3fv(pos, kcd->prev.cage); immEnd(); } @@ -1074,7 +1074,7 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg) immUniformColor3ubv(kcd->colors.curpoint); glPointSize(9); - immBegin(PRIM_POINTS, 1); + immBegin(GWN_PRIM_POINTS, 1); immVertex3fv(pos, kcd->prev.cage); immEnd(); } @@ -1083,7 +1083,7 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg) immUniformColor3ubv(kcd->colors.edge); glLineWidth(2.0); - immBegin(PRIM_LINES, 2); + immBegin(GWN_PRIM_LINES, 2); immVertex3fv(pos, kcd->curr.edge->v1->cageco); immVertex3fv(pos, kcd->curr.edge->v2->cageco); immEnd(); @@ -1092,7 +1092,7 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg) immUniformColor3ubv(kcd->colors.point); glPointSize(11); - immBegin(PRIM_POINTS, 1); + immBegin(GWN_PRIM_POINTS, 1); immVertex3fv(pos, kcd->curr.cage); immEnd(); } @@ -1101,7 +1101,7 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg) immUniformColor3ubv(kcd->colors.curpoint); glPointSize(9); - immBegin(PRIM_POINTS, 1); + immBegin(GWN_PRIM_POINTS, 1); immVertex3fv(pos, kcd->curr.cage); immEnd(); } @@ -1117,7 +1117,7 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg) immUniformColor4ubv(kcd->colors.point_a); glPointSize(11); - immBeginAtMost(PRIM_POINTS, kcd->totlinehit); + immBeginAtMost(GWN_PRIM_POINTS, kcd->totlinehit); lh = kcd->linehits; for (i = 0; i < kcd->totlinehit; i++, lh++) { @@ -1132,7 +1132,7 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg) immUniformColor4ubv(kcd->colors.curpoint_a); glPointSize(7); - immBeginAtMost(PRIM_POINTS, kcd->totlinehit); + immBeginAtMost(GWN_PRIM_POINTS, kcd->totlinehit); lh = kcd->linehits; for (i = 0; i < kcd->totlinehit; i++, lh++) { @@ -1153,7 +1153,7 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg) immUniformColor3ubv(kcd->colors.line); glLineWidth(1.0); - immBeginAtMost(PRIM_LINES, BLI_mempool_count(kcd->kedges) * 2); + immBeginAtMost(GWN_PRIM_LINES, BLI_mempool_count(kcd->kedges) * 2); BLI_mempool_iternew(kcd->kedges, &iter); for (kfe = BLI_mempool_iterstep(&iter); kfe; kfe = BLI_mempool_iterstep(&iter)) { @@ -1174,7 +1174,7 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg) immUniformColor3ubv(kcd->colors.point); glPointSize(5.0); - immBeginAtMost(PRIM_POINTS, BLI_mempool_count(kcd->kverts)); + immBeginAtMost(GWN_PRIM_POINTS, BLI_mempool_count(kcd->kverts)); BLI_mempool_iternew(kcd->kverts, &iter); for (kfv = BLI_mempool_iterstep(&iter); kfv; kfv = BLI_mempool_iterstep(&iter)) { -- cgit v1.2.3