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:
authorCampbell Barton <ideasman42@gmail.com>2017-09-13 17:39:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-09-13 18:24:50 +0300
commit6d359e4498848d795b8043e923850d0a0da7f4ed (patch)
treed46262708081379039f41d7c33f14028d4ef84de /source/blender
parent2a01fb61f8402b31b9f85039e28acf310b1da332 (diff)
Cleanup: use explicit 2d suffix for imm utils
Avoid ambiguity between 2d/3d (which were already named).
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/gpencil/gpencil_brush.c4
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c4
-rw-r--r--source/blender/editors/interface/interface_draw.c8
-rw-r--r--source/blender/editors/interface/interface_widgets.c12
-rw-r--r--source/blender/editors/manipulator_library/manipulator_types/dial3d_manipulator.c6
-rw-r--r--source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c4
-rw-r--r--source/blender/editors/physics/particle_edit.c2
-rw-r--r--source/blender/editors/screen/area.c2
-rw-r--r--source/blender/editors/screen/screendump.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c8
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_uv.c2
-rw-r--r--source/blender/editors/space_clip/clip_draw.c8
-rw-r--r--source/blender/editors/space_clip/clip_graph_draw.c2
-rw-r--r--source/blender/editors/space_file/file_draw.c2
-rw-r--r--source/blender/editors/space_image/image_draw.c4
-rw-r--r--source/blender/editors/space_nla/nla_draw.c2
-rw-r--r--source/blender/editors/space_node/node_draw.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c10
-rw-r--r--source/blender/editors/space_view3d/drawobject.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c14
-rw-r--r--source/blender/editors/space_view3d/view3d_draw_legacy.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_ruler.c2
-rw-r--r--source/blender/gpu/GPU_immediate_util.h26
-rw-r--r--source/blender/gpu/intern/gpu_immediate_util.c10
-rw-r--r--source/blender/windowmanager/intern/wm_gesture.c6
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c8
-rw-r--r--source/blender/windowmanager/intern/wm_playanim.c2
27 files changed, 80 insertions, 80 deletions
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index ea21aa81d3d..1cee8db792a 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -991,11 +991,11 @@ static void gp_brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customda
/* Inner Ring: Light color for action of the brush */
/* TODO: toggle between add and remove? */
immUniformColor4ub(255, 255, 255, 200);
- imm_draw_circle_wire(pos, x, y, brush->size, 40);
+ imm_draw_circle_wire_2d(pos, x, y, brush->size, 40);
/* Outer Ring: Dark color for contrast on light backgrounds (e.g. gray on white) */
immUniformColor3ub(30, 30, 30);
- imm_draw_circle_wire(pos, x, y, brush->size + 1, 40);
+ imm_draw_circle_wire_2d(pos, x, y, brush->size + 1, 40);
immUnbindProgram();
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index ffad8da84ff..e0751985bcd 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1865,7 +1865,7 @@ static void gpencil_draw_eraser(bContext *UNUSED(C), int x, int y, void *p_ptr)
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
immUniformColor4ub(255, 100, 100, 20);
- imm_draw_circle_fill(shdr_pos, x, y, p->radius, 40);
+ imm_draw_circle_fill_2d(shdr_pos, x, y, p->radius, 40);
immUnbindProgram();
@@ -1880,7 +1880,7 @@ static void gpencil_draw_eraser(bContext *UNUSED(C), int x, int y, void *p_ptr)
immUniform1f("dash_width", 12.0f);
immUniform1f("dash_factor", 0.5f);
- imm_draw_circle_wire(shdr_pos, x, y, p->radius,
+ imm_draw_circle_wire_2d(shdr_pos, x, y, p->radius,
/* XXX Dashed shader gives bad results with sets of small segments currently,
* temp hack around the issue. :( */
max_ii(8, p->radius / 2)); /* was fixed 40 */
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index bdedb265d73..25a7fbd09ef 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -604,7 +604,7 @@ void UI_draw_safe_areas(
float maxx = x2 - margin_x;
float maxy = y2 - margin_y;
- imm_draw_line_box(pos, minx, miny, maxx, maxy);
+ imm_draw_line_box_2d(pos, minx, miny, maxx, maxy);
}
}
}
@@ -1377,7 +1377,7 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), const rcti
/* layer: box outline */
immUniformColor4f(0.0f, 0.0f, 0.0f, 1.0f);
- imm_draw_line_box(position, x1, y1, x1 + sizex, rect->ymax);
+ imm_draw_line_box_2d(position, x1, y1, x1 + sizex, rect->ymax);
/* layer: box outline */
glEnable(GL_BLEND);
@@ -1460,7 +1460,7 @@ void ui_draw_but_UNITVEC(uiBut *but, uiWidgetColors *wcol, const rcti *rect)
glEnable(GL_BLEND);
glEnable(GL_LINE_SMOOTH);
- imm_draw_circle_wire(pos, 0.0f, 0.0f, 1.0f, 32);
+ imm_draw_circle_wire_2d(pos, 0.0f, 0.0f, 1.0f, 32);
glDisable(GL_BLEND);
glDisable(GL_LINE_SMOOTH);
@@ -1717,7 +1717,7 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, const rcti
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor3ubv((unsigned char *)wcol->outline);
- imm_draw_line_box(pos, rect->xmin, rect->ymin, rect->xmax, rect->ymax);
+ imm_draw_line_box_2d(pos, rect->xmin, rect->ymin, rect->xmax, rect->ymax);
immUnbindProgram();
}
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 73e549e703b..74ea8c60427 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -2272,12 +2272,12 @@ static void ui_hsv_cursor(float x, float y)
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor3f(1.0f, 1.0f, 1.0f);
- imm_draw_circle_fill(pos, x, y, 3.0f * U.pixelsize, 8);
+ imm_draw_circle_fill_2d(pos, x, y, 3.0f * U.pixelsize, 8);
glEnable(GL_BLEND);
glEnable(GL_LINE_SMOOTH);
immUniformColor3f(0.0f, 0.0f, 0.0f);
- imm_draw_circle_wire(pos, x, y, 3.0f * U.pixelsize, 12);
+ imm_draw_circle_wire_2d(pos, x, y, 3.0f * U.pixelsize, 12);
glDisable(GL_BLEND);
glDisable(GL_LINE_SMOOTH);
@@ -2397,7 +2397,7 @@ static void ui_draw_but_HSVCIRCLE(uiBut *but, uiWidgetColors *wcol, const rcti *
glEnable(GL_LINE_SMOOTH);
immUniformColor3ubv((unsigned char *)wcol->outline);
- imm_draw_circle_wire(pos, centx, centy, radius, tot);
+ imm_draw_circle_wire_2d(pos, centx, centy, radius, tot);
immUnbindProgram();
@@ -2637,7 +2637,7 @@ static void ui_draw_but_HSVCUBE(uiBut *but, const rcti *rect)
unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor3ub(0, 0, 0);
- imm_draw_line_box(pos, (rect->xmin), (rect->ymin), (rect->xmax), (rect->ymax));
+ imm_draw_line_box_2d(pos, (rect->xmin), (rect->ymin), (rect->xmax), (rect->ymax));
immUnbindProgram();
}
@@ -4172,8 +4172,8 @@ void ui_draw_pie_center(uiBlock *block)
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor4ubv((unsigned char *)btheme->tui.wcol_pie_menu.outline);
- imm_draw_circle_wire(pos, 0.0f, 0.0f, pie_radius_internal, subd);
- imm_draw_circle_wire(pos, 0.0f, 0.0f, pie_radius_external, subd);
+ imm_draw_circle_wire_2d(pos, 0.0f, 0.0f, pie_radius_internal, subd);
+ imm_draw_circle_wire_2d(pos, 0.0f, 0.0f, pie_radius_external, subd);
immUnbindProgram();
diff --git a/source/blender/editors/manipulator_library/manipulator_types/dial3d_manipulator.c b/source/blender/editors/manipulator_library/manipulator_types/dial3d_manipulator.c
index f637b098cca..0769d128b4d 100644
--- a/source/blender/editors/manipulator_library/manipulator_types/dial3d_manipulator.c
+++ b/source/blender/editors/manipulator_library/manipulator_types/dial3d_manipulator.c
@@ -140,10 +140,10 @@ static void dial_geom_draw(
immUniformColor4fv(color);
if (filled) {
- imm_draw_circle_fill(pos, 0, 0, 1.0, DIAL_RESOLUTION);
+ imm_draw_circle_fill_2d(pos, 0, 0, 1.0, DIAL_RESOLUTION);
}
else {
- imm_draw_circle_wire(pos, 0, 0, 1.0, DIAL_RESOLUTION);
+ imm_draw_circle_wire_2d(pos, 0, 0, 1.0, DIAL_RESOLUTION);
}
immUnbindProgram();
@@ -187,7 +187,7 @@ static void dial_ghostarc_draw(
uint pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
immUniformColor4fv(color);
- imm_draw_disk_partial_fill(
+ imm_draw_disk_partial_fill_2d(
pos, 0, 0, 0.0, width_inner, DIAL_RESOLUTION, RAD2DEGF(angle_ofs), RAD2DEGF(angle_delta));
immUnbindProgram();
}
diff --git a/source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c b/source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c
index fd1f5a0cf25..5353104a1fd 100644
--- a/source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c
+++ b/source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c
@@ -115,10 +115,10 @@ static void grab_geom_draw(
if (draw_style == ED_MANIPULATOR_GRAB_STYLE_RING_2D) {
if (filled) {
- imm_draw_circle_fill(pos, 0, 0, 1.0f, DIAL_RESOLUTION);
+ imm_draw_circle_fill_2d(pos, 0, 0, 1.0f, DIAL_RESOLUTION);
}
else {
- imm_draw_circle_wire(pos, 0, 0, 1.0f, DIAL_RESOLUTION);
+ imm_draw_circle_wire_2d(pos, 0, 0, 1.0f, DIAL_RESOLUTION);
}
}
else if (draw_style == ED_MANIPULATOR_GRAB_STYLE_CROSS_2D) {
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 171c5f4ed30..6a5a3c73f81 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -2746,7 +2746,7 @@ static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata)
glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);
- imm_draw_circle_wire(pos, (float)x, (float)y, pe_brush_size_get(scene, brush), 40);
+ imm_draw_circle_wire_2d(pos, (float)x, (float)y, pe_brush_size_get(scene, brush), 40);
glDisable(GL_BLEND);
glDisable(GL_LINE_SMOOTH);
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 5eb51667988..8fa6a363230 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -228,7 +228,7 @@ static void area_draw_azone_fullscreen(short x1, short y1, short x2, short y2, f
immAttrib4ub(color, 255, 0, 0, alpha_debug);
immBindBuiltinProgram(GPU_SHADER_2D_FLAT_COLOR);
- imm_draw_line_box(pos, click_rect.xmin, click_rect.ymin, click_rect.xmax, click_rect.ymax);
+ imm_draw_line_box_2d(pos, click_rect.xmin, click_rect.ymin, click_rect.xmax, click_rect.ymax);
immAttrib4ub(color, 0, 255, 255, alpha_debug);
immBegin(GWN_PRIM_LINES, 4);
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c
index 6fa8905293c..69891a727d4 100644
--- a/source/blender/editors/screen/screendump.c
+++ b/source/blender/editors/screen/screendump.c
@@ -462,10 +462,10 @@ static void screencast_draw_cursor(bContext *UNUSED(C), int x, int y, void *UNUS
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor4ub(0, 0, 0, 32);
- imm_draw_circle_fill(pos, (float)x, (float)y, 20, 40);
+ imm_draw_circle_fill_2d(pos, (float)x, (float)y, 20, 40);
immUniformColor4ub(255, 255, 255, 128);
- imm_draw_circle_wire(pos, (float)x, (float)y, 20, 40);
+ imm_draw_circle_wire_2d(pos, (float)x, (float)y, 20, 40);
immUnbindProgram();
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index a9b4df81277..36f7eadea1e 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -849,12 +849,12 @@ BLI_INLINE void draw_rect_point(
float maxx = co[0] + w;
float maxy = co[1] + w;
- imm_draw_line_box(pos, minx, miny, maxx, maxy);
+ imm_draw_line_box_2d(pos, minx, miny, maxx, maxy);
immUniformColor4f(1.0f, 1.0f, 1.0f, 0.5f);
glLineWidth(1.0f);
- imm_draw_line_box(pos, minx, miny, maxx, maxy);
+ imm_draw_line_box_2d(pos, minx, miny, maxx, maxy);
}
@@ -1098,11 +1098,11 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
/* draw brush outline */
if (ups->stroke_active && BKE_brush_use_size_pressure(scene, brush)) {
/* inner at full alpha */
- imm_draw_circle_wire(pos, translation[0], translation[1], final_radius * ups->size_pressure_value, 40);
+ imm_draw_circle_wire_2d(pos, translation[0], translation[1], final_radius * ups->size_pressure_value, 40);
/* outer at half alpha */
immUniformColor3fvAlpha(outline_col, outline_alpha * 0.5f);
}
- imm_draw_circle_wire(pos, translation[0], translation[1], final_radius, 40);
+ imm_draw_circle_wire_2d(pos, translation[0], translation[1], final_radius, 40);
immUnbindProgram();
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index ee6f25ee44e..14e82e94d30 100644
--- a/source/blender/editors/sculpt_paint/sculpt_uv.c
+++ b/source/blender/editors/sculpt_paint/sculpt_uv.c
@@ -219,7 +219,7 @@ static void brush_drawcursor_uvsculpt(bContext *C, int x, int y, void *UNUSED(cu
glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);
- imm_draw_circle_wire(pos, (float)x, (float)y, size, 40);
+ imm_draw_circle_wire_2d(pos, (float)x, (float)y, size, 40);
glDisable(GL_BLEND);
glDisable(GL_LINE_SMOOTH);
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index f5680bf2265..fd716770218 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -316,7 +316,7 @@ static void draw_movieclip_buffer(const bContext *C, SpaceClip *sc, ARegion *ar,
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- imm_draw_checker_box(x, y, x + zoomx * ibuf->x, y + zoomy * ibuf->y);
+ imm_draw_checker_box_2d(x, y, x + zoomx * ibuf->x, y + zoomy * ibuf->y);
}
/* non-scaled proxy shouldn't use filtering */
@@ -372,7 +372,7 @@ static void draw_stabilization_border(SpaceClip *sc, ARegion *ar, int width, int
immUniform1f("dash_width", 6.0f);
immUniform1f("dash_factor", 0.5f);
- imm_draw_line_box(shdr_pos, 0.0f, 0.0f, width, height);
+ imm_draw_line_box_2d(shdr_pos, 0.0f, 0.0f, width, height);
immUnbindProgram();
@@ -618,7 +618,7 @@ static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieT
((marker->flag & MARKER_DISABLED) == 0 || (sc->flag & SC_SHOW_MARKER_PATTERN) == 0)) != 0;
if (sc->flag & SC_SHOW_MARKER_SEARCH && show_search) {
- imm_draw_line_box(position, marker->search_min[0],
+ imm_draw_line_box_2d(position, marker->search_min[0],
marker->search_min[1],
marker->search_max[0],
marker->search_max[1]);
@@ -795,7 +795,7 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
((marker->flag & MARKER_DISABLED) == 0 || (sc->flag & SC_SHOW_MARKER_PATTERN) == 0)) != 0;
if ((track->search_flag & SELECT) == sel && (sc->flag & SC_SHOW_MARKER_SEARCH) && show_search) {
- imm_draw_line_box(shdr_pos, marker->search_min[0], marker->search_min[1],
+ imm_draw_line_box_2d(shdr_pos, marker->search_min[0], marker->search_min[1],
marker->search_max[0], marker->search_max[1]);
}
diff --git a/source/blender/editors/space_clip/clip_graph_draw.c b/source/blender/editors/space_clip/clip_graph_draw.c
index 5c2782dc26d..1bd1ad69d64 100644
--- a/source/blender/editors/space_clip/clip_graph_draw.c
+++ b/source/blender/editors/space_clip/clip_graph_draw.c
@@ -122,7 +122,7 @@ static void tracking_segment_knot_cb(void *userdata, MovieTrackingTrack *track,
gpuTranslate2f(scene_framenr, val);
gpuScale2f(1.0f / data->xscale * data->hsize, 1.0f / data->yscale * data->hsize);
- imm_draw_circle_wire(data->pos, 0, 0, 0.7, 8);
+ imm_draw_circle_wire_2d(data->pos, 0, 0, 0.7, 8);
gpuPopMatrix();
}
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index be873358931..833c490de67 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -404,7 +404,7 @@ static void file_draw_preview(
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor4f(0.0f, 0.0f, 0.0f, 0.4f);
- imm_draw_line_box(pos, (float)xco, (float)yco, (float)(xco + ex), (float)(yco + ey));
+ imm_draw_line_box_2d(pos, (float)xco, (float)yco, (float)(xco + ex), (float)(yco + ey));
immUnbindProgram();
}
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 1af717fd7f8..fed1d3ce38c 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -369,7 +369,7 @@ void ED_image_draw_info(Scene *scene, ARegion *ar, bool color_manage, bool use_d
pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor3ub(128, 128, 128);
- imm_draw_line_box(pos, color_rect.xmin, color_rect.ymin, color_rect.xmax, color_rect.ymax);
+ imm_draw_line_box_2d(pos, color_rect.xmin, color_rect.ymin, color_rect.xmax, color_rect.ymax);
immUnbindProgram();
dx += 1.75f * UI_UNIT_X;
@@ -503,7 +503,7 @@ static void draw_image_buffer(const bContext *C, SpaceImage *sima, ARegion *ar,
&clip_max_x, &clip_max_y);
if (sima->flag & SI_USE_ALPHA) {
- imm_draw_checker_box(x, y, x + ibuf->x * zoomx, y + ibuf->y * zoomy);
+ imm_draw_checker_box_2d(x, y, x + ibuf->x * zoomx, y + ibuf->y * zoomy);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index fe846666894..a91ec0aeb43 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -498,7 +498,7 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri
if (muted) {
/* muted - draw dotted, squarish outline (for simplicity) */
shdr_pos = nla_draw_use_dashed_outlines(color, muted);
- imm_draw_line_box(shdr_pos, strip->start, yminc, strip->end, ymaxc);
+ imm_draw_line_box_2d(shdr_pos, strip->start, yminc, strip->end, ymaxc);
}
else {
/* non-muted - draw solid, rounded outline */
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index d99d1c97653..09380977705 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -716,7 +716,7 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv)
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, +100);
- imm_draw_line_box(pos, draw_rect.xmin, draw_rect.ymin, draw_rect.xmax, draw_rect.ymax);
+ imm_draw_line_box_2d(pos, draw_rect.xmin, draw_rect.ymin, draw_rect.xmax, draw_rect.ymax);
immUnbindProgram();
}
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index beb252eb149..62ba8f314a1 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -644,7 +644,7 @@ static void draw_sequence_extensions(Scene *scene, ARegion *ar, Sequence *seq, u
immUniformColor3ubvAlpha(col, col[3] + 50);
- imm_draw_line_box(pos, (float)(seq->start), y1 - SEQ_STRIP_OFSBOTTOM, x1, y1); /* outline */
+ imm_draw_line_box_2d(pos, (float)(seq->start), y1 - SEQ_STRIP_OFSBOTTOM, x1, y1); /* outline */
}
if (seq->endofs) {
immUniformColor4ubv(col);
@@ -652,7 +652,7 @@ static void draw_sequence_extensions(Scene *scene, ARegion *ar, Sequence *seq, u
immUniformColor3ubvAlpha(col, col[3] + 50);
- imm_draw_line_box(pos, x2, y2, (float)(seq->start + seq->len), y2 + SEQ_STRIP_OFSBOTTOM); /* outline */
+ imm_draw_line_box_2d(pos, x2, y2, (float)(seq->start + seq->len), y2 + SEQ_STRIP_OFSBOTTOM); /* outline */
}
if (seq->startofs || seq->endofs) {
@@ -847,7 +847,7 @@ static void draw_seq_strip(const bContext *C, SpaceSeq *sseq, Scene *scene, AReg
immUniformColor3ubv(col);
}
- imm_draw_line_box(pos, x1, y1, x2, y2); /* outline */
+ imm_draw_line_box_2d(pos, x1, y1, x2, y2); /* outline */
immUnbindProgram();
@@ -1047,7 +1047,7 @@ static void sequencer_draw_borders(const SpaceSeq *sseq, const View2D *v2d, cons
immUniform1f("dash_width", 6.0f);
immUniform1f("dash_factor", 0.5f);
- imm_draw_line_box(shdr_pos, x1 - 0.5f, y1 - 0.5f, x2 + 0.5f, y2 + 0.5f);
+ imm_draw_line_box_2d(shdr_pos, x1 - 0.5f, y1 - 0.5f, x2 + 0.5f, y2 + 0.5f);
/* safety border */
if (sseq->flag & SEQ_SHOW_SAFE_MARGINS) {
@@ -1081,7 +1081,7 @@ static void sequencer_draw_background(
/* only draw alpha for main buffer */
if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
if ((sseq->flag & SEQ_USE_ALPHA) && !draw_overlay) {
- imm_draw_checker_box(v2d->tot.xmin, v2d->tot.ymin, v2d->tot.xmax, v2d->tot.ymax);
+ imm_draw_checker_box_2d(v2d->tot.xmin, v2d->tot.ymin, v2d->tot.xmax, v2d->tot.ymax);
}
}
}
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index ce206e9de0c..2fce8783aa2 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -768,7 +768,7 @@ static void draw_empty_image(Object *ob, const short dflag, const unsigned char
glDisable(GL_BLEND);
}
- imm_draw_line_box(pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
+ imm_draw_line_box_2d(pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
}
else {
immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
@@ -780,7 +780,7 @@ static void draw_empty_image(Object *ob, const short dflag, const unsigned char
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
- imm_draw_line_box(pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
+ imm_draw_line_box_2d(pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 688bee4760b..9af0be79a42 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -504,12 +504,12 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
}
immUniformThemeColor(TH_BACK);
- imm_draw_line_box(shdr_pos, x1i, y1i, x2i, y2i);
+ imm_draw_line_box_2d(shdr_pos, x1i, y1i, x2i, y2i);
#ifdef VIEW3D_CAMERA_BORDER_HACK
if (view3d_camera_border_hack_test == true) {
immUniformColor3ubv(view3d_camera_border_hack_col);
- imm_draw_line_box(shdr_pos, x1i + 1, y1i + 1, x2i - 1, y2i - 1);
+ imm_draw_line_box_2d(shdr_pos, x1i + 1, y1i + 1, x2i - 1, y2i - 1);
view3d_camera_border_hack_test = false;
}
#endif
@@ -532,11 +532,11 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
/* outer line not to confuse with object selection */
if (v3d->flag2 & V3D_LOCK_CAMERA) {
immUniformThemeColor(TH_REDALERT);
- imm_draw_line_box(shdr_pos, x1i - 1, y1i - 1, x2i + 1, y2i + 1);
+ imm_draw_line_box_2d(shdr_pos, x1i - 1, y1i - 1, x2i + 1, y2i + 1);
}
immUniformThemeColor(TH_VIEW_OVERLAY);
- imm_draw_line_box(shdr_pos, x1i, y1i, x2i, y2i);
+ imm_draw_line_box_2d(shdr_pos, x1i, y1i, x2i, y2i);
}
/* border */
@@ -549,7 +549,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
y4 = floorf(y1 + (scene->r.border.ymax * (y2 - y1))) + (U.pixelsize - 1);
immUniformColor3f(1.0f, 0.25f, 0.25f);
- imm_draw_line_box(shdr_pos, x3, y3, x4, y4);
+ imm_draw_line_box_2d(shdr_pos, x3, y3, x4, y4);
}
/* safety border */
@@ -658,7 +658,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
/* TODO Was using UI_draw_roundbox_4fv(false, rect.xmin, rect.ymin, rect.xmax, rect.ymax, 2.0f, color).
* We'll probably need a new imm_draw_line_roundbox_dashed dor that - though in practice the
* 2.0f round corner effect was nearly not visible anyway... */
- imm_draw_line_box(shdr_pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
+ imm_draw_line_box_2d(shdr_pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
}
}
@@ -692,7 +692,7 @@ static void drawrenderborder(ARegion *ar, View3D *v3d)
immUniform1f("dash_width", 6.0f);
immUniform1f("dash_factor", 0.5f);
- imm_draw_line_box(shdr_pos,
+ imm_draw_line_box_2d(shdr_pos,
v3d->render_border.xmin * ar->winx, v3d->render_border.ymin * ar->winy,
v3d->render_border.xmax * ar->winx, v3d->render_border.ymax * ar->winy);
diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c
index 73ffe949823..a9e4da67b65 100644
--- a/source/blender/editors/space_view3d/view3d_draw_legacy.c
+++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c
@@ -1891,7 +1891,7 @@ static bool view3d_main_region_draw_engine(
if (v3d->flag & V3D_DISPBGPICS)
view3d_draw_bgpic_test(scene, ar, v3d, false, true);
else
- imm_draw_checker_box(0, 0, ar->winx, ar->winy);
+ imm_draw_checker_box_2d(0, 0, ar->winx, ar->winy);
/* render result draw */
type = rv3d->render_engine->type;
diff --git a/source/blender/editors/space_view3d/view3d_ruler.c b/source/blender/editors/space_view3d/view3d_ruler.c
index 9aaa766be74..7b7d996c77e 100644
--- a/source/blender/editors/space_view3d/view3d_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_ruler.c
@@ -704,7 +704,7 @@ static void ruler_info_draw_pixel(const struct bContext *C, ARegion *ar, void *a
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor4fv(color_act);
- imm_draw_circle_wire(pos, co_ss[0], co_ss[1], size * U.pixelsize, 32);
+ imm_draw_circle_wire_2d(pos, co_ss[0], co_ss[1], size * U.pixelsize, 32);
immUnbindProgram();
}
diff --git a/source/blender/gpu/GPU_immediate_util.h b/source/blender/gpu/GPU_immediate_util.h
index f91dd6147a0..e3a697fd229 100644
--- a/source/blender/gpu/GPU_immediate_util.h
+++ b/source/blender/gpu/GPU_immediate_util.h
@@ -27,33 +27,33 @@
#ifndef __GPU_IMMEDIATE_UTIL_H__
#define __GPU_IMMEDIATE_UTIL_H__
-void imm_cpack(unsigned int x);
+void imm_cpack(uint x);
-void imm_draw_circle_wire(uint shdr_pos, float x, float y, float radius, int nsegments);
-void imm_draw_circle_fill(uint shdr_pos, float x, float y, float radius, int nsegments);
+void imm_draw_circle_wire_2d(uint shdr_pos, float x, float y, float radius, int nsegments);
+void imm_draw_circle_fill_2d(uint shdr_pos, float x, float y, float radius, int nsegments);
/* use this version when Gwn_VertFormat has a vec3 position */
-void imm_draw_circle_wire_3d(unsigned pos, float x, float y, float radius, int nsegments);
-void imm_draw_circle_fill_3d(unsigned pos, float x, float y, float radius, int nsegments);
+void imm_draw_circle_wire_3d(uint pos, float x, float y, float radius, int nsegments);
+void imm_draw_circle_fill_3d(uint pos, float x, float y, float radius, int nsegments);
-void imm_draw_disk_partial_fill(
- unsigned pos, float x, float y,
+void imm_draw_disk_partial_fill_2d(
+ uint pos, float x, float y,
float radius_inner, float radius_outer, int nsegments, float start, float sweep);
-void imm_draw_line_box(unsigned pos, float x1, float y1, float x2, float y2);
+void imm_draw_line_box_2d(uint pos, float x1, float y1, float x2, float y2);
-void imm_draw_line_box_3d(unsigned pos, float x1, float y1, float x2, float y2);
+void imm_draw_line_box_3d(uint pos, float x1, float y1, float x2, float y2);
-void imm_draw_checker_box(float x1, float y1, float x2, float y2);
+void imm_draw_checker_box_2d(float x1, float y1, float x2, float y2);
void imm_draw_cylinder_fill_normal_3d(
- unsigned int pos, unsigned int nor, float base, float top, float height,
+ uint pos, uint nor, float base, float top, float height,
int slices, int stacks);
void imm_draw_cylinder_wire_3d(
- unsigned int pos, float base, float top, float height,
+ uint pos, float base, float top, float height,
int slices, int stacks);
void imm_draw_cylinder_fill_3d(
- unsigned int pos, float base, float top, float height,
+ uint pos, float base, float top, float height,
int slices, int stacks);
#endif /* __GPU_IMMEDIATE_UTIL_H__ */
diff --git a/source/blender/gpu/intern/gpu_immediate_util.c b/source/blender/gpu/intern/gpu_immediate_util.c
index e6923d38110..4f68bbef4d7 100644
--- a/source/blender/gpu/intern/gpu_immediate_util.c
+++ b/source/blender/gpu/intern/gpu_immediate_util.c
@@ -71,7 +71,7 @@ static void imm_draw_circle(Gwn_PrimType prim_type, const uint shdr_pos, float x
* \param radius The circle's radius.
* \param nsegments The number of segments to use in drawing (more = smoother).
*/
-void imm_draw_circle_wire(uint shdr_pos, float x, float y, float rad, int nsegments)
+void imm_draw_circle_wire_2d(uint shdr_pos, float x, float y, float rad, int nsegments)
{
imm_draw_circle(GWN_PRIM_LINE_LOOP, shdr_pos, x, y, rad, nsegments);
}
@@ -86,7 +86,7 @@ void imm_draw_circle_wire(uint shdr_pos, float x, float y, float rad, int nsegme
* \param radius The circle's radius.
* \param nsegments The number of segments to use in drawing (more = smoother).
*/
-void imm_draw_circle_fill(uint shdr_pos, float x, float y, float rad, int nsegments)
+void imm_draw_circle_fill_2d(uint shdr_pos, float x, float y, float rad, int nsegments)
{
imm_draw_circle(GWN_PRIM_TRI_FAN, shdr_pos, x, y, rad, nsegments);
}
@@ -128,7 +128,7 @@ static void imm_draw_disk_partial(
* \param start: Specifies the starting angle, in degrees, of the disk portion.
* \param sweep: Specifies the sweep angle, in degrees, of the disk portion.
*/
-void imm_draw_disk_partial_fill(
+void imm_draw_disk_partial_fill_2d(
unsigned pos, float x, float y,
float rad_inner, float rad_outer, int nsegments, float start, float sweep)
{
@@ -166,7 +166,7 @@ void imm_draw_circle_fill_3d(unsigned pos, float x, float y, float rad, int nseg
* \param x2 right.
* \param y2 top.
*/
-void imm_draw_line_box(unsigned pos, float x1, float y1, float x2, float y2)
+void imm_draw_line_box_2d(unsigned pos, float x1, float y1, float x2, float y2)
{
immBegin(GWN_PRIM_LINE_LOOP, 4);
immVertex2f(pos, x1, y1);
@@ -190,7 +190,7 @@ void imm_draw_line_box_3d(unsigned pos, float x1, float y1, float x2, float y2)
/**
* Draw a standard checkerboard to indicate transparent backgrounds.
*/
-void imm_draw_checker_box(float x1, float y1, float x2, float y2)
+void imm_draw_checker_box_2d(float x1, float y1, float x2, float y2)
{
unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_CHECKER);
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c
index 73694295fef..486d3397c7e 100644
--- a/source/blender/windowmanager/intern/wm_gesture.c
+++ b/source/blender/windowmanager/intern/wm_gesture.c
@@ -224,7 +224,7 @@ static void wm_gesture_draw_rect(wmGesture *gt)
immUniformArray4fv("colors", (float *)(float[][4]){{0.4f, 0.4f, 0.4f, 1.0f}, {1.0f, 1.0f, 1.0f, 1.0f}}, 2);
immUniform1f("dash_width", 8.0f);
- imm_draw_line_box(shdr_pos, (float)rect->xmin, (float)rect->ymin, (float)rect->xmax, (float)rect->ymax);
+ imm_draw_line_box_2d(shdr_pos, (float)rect->xmin, (float)rect->ymin, (float)rect->xmax, (float)rect->ymax);
immUnbindProgram();
@@ -242,7 +242,7 @@ static void wm_gesture_draw_circle(wmGesture *gt)
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor4f(1.0f, 1.0f, 1.0f, 0.05f);
- imm_draw_circle_fill(shdr_pos, (float)rect->xmin, (float)rect->ymin, (float)rect->xmax, 40);
+ imm_draw_circle_fill_2d(shdr_pos, (float)rect->xmin, (float)rect->ymin, (float)rect->xmax, 40);
immUnbindProgram();
@@ -258,7 +258,7 @@ static void wm_gesture_draw_circle(wmGesture *gt)
immUniformArray4fv("colors", (float *)(float[][4]){{0.4f, 0.4f, 0.4f, 1.0f}, {1.0f, 1.0f, 1.0f, 1.0f}}, 2);
immUniform1f("dash_width", 4.0f);
- imm_draw_circle_wire(shdr_pos, (float)rect->xmin, (float)rect->ymin, (float)rect->xmax, 40);
+ imm_draw_circle_wire_2d(shdr_pos, (float)rect->xmin, (float)rect->ymin, (float)rect->xmax, 40);
immUnbindProgram();
}
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index c1a24bd35b9..d8df198ecbb 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -3184,7 +3184,7 @@ static void radial_control_paint_tex(RadialControl *rc, float radius, float alph
/* flat color if no texture available */
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor3fvAlpha(col, alpha);
- imm_draw_circle_fill(pos, 0.0f, 0.0f, radius, 40);
+ imm_draw_circle_fill_2d(pos, 0.0f, 0.0f, radius, 40);
}
immUnbindProgram();
@@ -3291,10 +3291,10 @@ static void radial_control_paint_cursor(bContext *C, int x, int y, void *customd
}
/* draw circles on top */
- imm_draw_circle_wire(pos, 0.0f, 0.0f, r1, 40);
- imm_draw_circle_wire(pos, 0.0f, 0.0f, r2, 40);
+ imm_draw_circle_wire_2d(pos, 0.0f, 0.0f, r1, 40);
+ imm_draw_circle_wire_2d(pos, 0.0f, 0.0f, r2, 40);
if (rmin > 0.0f)
- imm_draw_circle_wire(pos, 0.0, 0.0f, rmin, 40);
+ imm_draw_circle_wire_2d(pos, 0.0, 0.0f, rmin, 40);
immUnbindProgram();
BLF_size(fontid, 1.5 * fstyle_points * U.pixelsize, U.dpi);
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c
index 2c766efc6a2..00237f2809b 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -319,7 +319,7 @@ static void playanim_toscreen(PlayState *ps, PlayAnimPict *picture, struct ImBuf
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- imm_draw_checker_box(offs_x, offs_y, offs_x + span_x, offs_y + span_y);
+ imm_draw_checker_box_2d(offs_x, offs_y, offs_x + span_x, offs_y + span_y);
}
IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR);