diff options
Diffstat (limited to 'source/blender/editors/mask/mask_draw.c')
-rw-r--r-- | source/blender/editors/mask/mask_draw.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c index b3e6a369d90..72bc61139c6 100644 --- a/source/blender/editors/mask/mask_draw.c +++ b/source/blender/editors/mask/mask_draw.c @@ -123,8 +123,8 @@ static void draw_single_handle(const MaskLayer *mask_layer, const MaskSplinePoin return; } - 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); const unsigned char rgb_gray[4] = {0x60, 0x60, 0x60, 0xff}; immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); @@ -133,7 +133,7 @@ static void draw_single_handle(const MaskLayer *mask_layer, const MaskSplinePoin /* this could be split into its own loop */ if (draw_type == MASK_DT_OUTLINE) { glLineWidth(3.0f); - immBegin(PRIM_LINES, 2); + immBegin(GWN_PRIM_LINES, 2); immVertex2fv(pos, point_pos); immVertex2fv(pos, handle_pos); immEnd(); @@ -153,7 +153,7 @@ static void draw_single_handle(const MaskLayer *mask_layer, const MaskSplinePoin } glLineWidth(1.0f); - immBegin(PRIM_LINES, 2); + immBegin(GWN_PRIM_LINES, 2); immVertex2fv(pos, point_pos); immVertex2fv(pos, handle_pos); immEnd(); @@ -177,7 +177,7 @@ static void draw_single_handle(const MaskLayer *mask_layer, const MaskSplinePoin immUniform4fv("outlineColor", point_color); immUniformColor3fvAlpha(point_color, 0.25f); - immBegin(PRIM_POINTS, 1); + immBegin(GWN_PRIM_POINTS, 1); immVertex2fv(pos, handle_pos); immEnd(); @@ -211,8 +211,8 @@ static void draw_spline_points(const bContext *C, MaskLayer *masklay, MaskSpline mask_spline_color_get(masklay, spline, is_spline_sel, rgb_spline); - 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_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA); immUniform1f("size", 0.7f * handle_size); @@ -250,7 +250,7 @@ static void draw_spline_points(const bContext *C, MaskLayer *masklay, MaskSpline immUniformThemeColor(TH_HANDLE_VERTEX); } - immBegin(PRIM_POINTS, 1); + immBegin(GWN_PRIM_POINTS, 1); immVertex2fv(pos, feather_point); immEnd(); @@ -319,7 +319,7 @@ static void draw_spline_points(const bContext *C, MaskLayer *masklay, MaskSpline else immUniformThemeColor(TH_HANDLE_VERTEX); - immBegin(PRIM_POINTS, 1); + immBegin(GWN_PRIM_POINTS, 1); immVertex2fv(pos, vert); immEnd(); @@ -349,7 +349,7 @@ static void draw_spline_points(const bContext *C, MaskLayer *masklay, MaskSpline immUniform4f("outlineColor", 0.0f, 0.0f, 0.0f, 1.0f); immUniform1f("size", 12.0f); - immBegin(PRIM_POINTS, 1); + immBegin(GWN_PRIM_POINTS, 1); immVertex2f(pos, x, y); immEnd(); @@ -370,7 +370,7 @@ static void mask_color_active_tint(unsigned char r_rgb[4], const unsigned char r } } -static void mask_draw_array(unsigned int pos, PrimitiveType prim_type, const float (*points)[2], unsigned int vertex_ct) +static void mask_draw_array(unsigned int pos, Gwn_PrimType prim_type, const float (*points)[2], unsigned int vertex_ct) { immBegin(prim_type, vertex_ct); for (unsigned int i = 0; i < vertex_ct; ++i) { @@ -383,7 +383,7 @@ static void mask_draw_curve_type(const bContext *C, MaskSpline *spline, float (* const bool is_feather, const bool is_active, const unsigned char rgb_spline[4], const char draw_type) { - const PrimitiveType draw_method = (spline->flag & MASK_SPLINE_CYCLIC) ? PRIM_LINE_LOOP : PRIM_LINE_STRIP; + const Gwn_PrimType draw_method = (spline->flag & MASK_SPLINE_CYCLIC) ? GWN_PRIM_LINE_LOOP : GWN_PRIM_LINE_STRIP; const unsigned char rgb_black[4] = {0x00, 0x00, 0x00, 0xff}; unsigned char rgb_tmp[4]; SpaceClip *sc = CTX_wm_space_clip(C); @@ -401,8 +401,8 @@ static void mask_draw_curve_type(const bContext *C, MaskSpline *spline, float (* } } - 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); switch (draw_type) { @@ -815,12 +815,12 @@ void ED_mask_draw_frames(Mask *mask, ARegion *ar, const int cfra, const int sfra unsigned int num_lines = BLI_listbase_count(&masklay->splines_shapes); if (num_lines > 0) { - 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); immUniformColor4ub(255, 175, 0, 255); - immBegin(PRIM_LINES, 2 * num_lines); + immBegin(GWN_PRIM_LINES, 2 * num_lines); for (MaskLayerShape *masklay_shape = masklay->splines_shapes.first; masklay_shape; |