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-26 08:21:01 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-09-26 08:21:01 +0300
commit63dfb5bb97b1a320a0f5e51eaca51d7b25902aa4 (patch)
treec378ff70a431d4954c7e842af46a5642194efd23 /source/blender/editors
parent86b81d25ea1ed696adc82ec39088e24f7a6422f0 (diff)
Cleanup: naming (GPU immediate util)
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_draw.c6
-rw-r--r--source/blender/editors/interface/interface_widgets.c2
-rw-r--r--source/blender/editors/screen/area.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c4
-rw-r--r--source/blender/editors/space_clip/clip_draw.c8
-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.c10
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c14
-rw-r--r--source/blender/editors/space_view3d/view3d_draw_legacy.c2
13 files changed, 34 insertions, 34 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 25a7fbd09ef..0cb8b9211ae 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_2d(pos, minx, miny, maxx, maxy);
+ imm_draw_box_wire_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_2d(position, x1, y1, x1 + sizex, rect->ymax);
+ imm_draw_box_wire_2d(position, x1, y1, x1 + sizex, rect->ymax);
/* layer: box outline */
glEnable(GL_BLEND);
@@ -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_2d(pos, rect->xmin, rect->ymin, rect->xmax, rect->ymax);
+ imm_draw_box_wire_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 74ea8c60427..e3977219eda 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -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_2d(pos, (rect->xmin), (rect->ymin), (rect->xmax), (rect->ymax));
+ imm_draw_box_wire_2d(pos, (rect->xmin), (rect->ymin), (rect->xmax), (rect->ymax));
immUnbindProgram();
}
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 8fa6a363230..0c8ca2a5b87 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_2d(pos, click_rect.xmin, click_rect.ymin, click_rect.xmax, click_rect.ymax);
+ imm_draw_box_wire_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/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 36f7eadea1e..04c7e6e2a62 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_2d(pos, minx, miny, maxx, maxy);
+ imm_draw_box_wire_2d(pos, minx, miny, maxx, maxy);
immUniformColor4f(1.0f, 1.0f, 1.0f, 0.5f);
glLineWidth(1.0f);
- imm_draw_line_box_2d(pos, minx, miny, maxx, maxy);
+ imm_draw_box_wire_2d(pos, minx, miny, maxx, maxy);
}
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index fd716770218..09d225fc1b8 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_2d(x, y, x + zoomx * ibuf->x, y + zoomy * ibuf->y);
+ imm_draw_box_checker_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_2d(shdr_pos, 0.0f, 0.0f, width, height);
+ imm_draw_box_wire_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_2d(position, marker->search_min[0],
+ imm_draw_box_wire_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_2d(shdr_pos, marker->search_min[0], marker->search_min[1],
+ imm_draw_box_wire_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_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 833c490de67..bc218a3594d 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_2d(pos, (float)xco, (float)yco, (float)(xco + ex), (float)(yco + ey));
+ imm_draw_box_wire_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 8ef9e24c6d4..23c4fbbe45e 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_2d(pos, color_rect.xmin, color_rect.ymin, color_rect.xmax, color_rect.ymax);
+ imm_draw_box_wire_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_2d(x, y, x + ibuf->x * zoomx, y + ibuf->y * zoomy);
+ imm_draw_box_checker_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 a91ec0aeb43..cb20b76a3ee 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_2d(shdr_pos, strip->start, yminc, strip->end, ymaxc);
+ imm_draw_box_wire_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 09380977705..4549809d481 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_2d(pos, draw_rect.xmin, draw_rect.ymin, draw_rect.xmax, draw_rect.ymax);
+ imm_draw_box_wire_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 62ba8f314a1..c14e427b133 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_2d(pos, (float)(seq->start), y1 - SEQ_STRIP_OFSBOTTOM, x1, y1); /* outline */
+ imm_draw_box_wire_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_2d(pos, x2, y2, (float)(seq->start + seq->len), y2 + SEQ_STRIP_OFSBOTTOM); /* outline */
+ imm_draw_box_wire_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_2d(pos, x1, y1, x2, y2); /* outline */
+ imm_draw_box_wire_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_2d(shdr_pos, x1 - 0.5f, y1 - 0.5f, x2 + 0.5f, y2 + 0.5f);
+ imm_draw_box_wire_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_2d(v2d->tot.xmin, v2d->tot.ymin, v2d->tot.xmax, v2d->tot.ymax);
+ imm_draw_box_checker_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 4df7f6762bc..953eda42373 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_2d(pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
+ imm_draw_box_wire_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_2d(pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
+ imm_draw_box_wire_2d(pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
@@ -1478,7 +1478,7 @@ void drawlamp(View3D *v3d, RegionView3D *rv3d, Base *base,
* previously it adjusted to always to show it but that seems
* confusing because it doesn't show the actual blend size */
if (blend != 0.0f && blend != z_abs) {
- imm_draw_line_box_3d(pos, blend, -blend, -blend, blend);
+ imm_draw_box_wire_3d(pos, blend, -blend, -blend, blend);
}
}
}
@@ -1588,9 +1588,9 @@ void drawlamp(View3D *v3d, RegionView3D *rv3d, Base *base,
else if (la->type == LA_AREA) {
setlinestyle(3);
if (la->area_shape == LA_AREA_SQUARE)
- imm_draw_line_box_3d(pos, -la->area_size * 0.5f, -la->area_size * 0.5f, la->area_size * 0.5f, la->area_size * 0.5f);
+ imm_draw_box_wire_3d(pos, -la->area_size * 0.5f, -la->area_size * 0.5f, la->area_size * 0.5f, la->area_size * 0.5f);
else if (la->area_shape == LA_AREA_RECT)
- imm_draw_line_box_3d(pos, -la->area_size * 0.5f, -la->area_sizey * 0.5f, la->area_size * 0.5f, la->area_sizey * 0.5f);
+ imm_draw_box_wire_3d(pos, -la->area_size * 0.5f, -la->area_sizey * 0.5f, la->area_size * 0.5f, la->area_sizey * 0.5f);
immBegin(GWN_PRIM_LINES, 2);
immVertex3f(pos, 0.0f, 0.0f, -circrad);
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 9af0be79a42..b01c8a7ac8a 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_2d(shdr_pos, x1i, y1i, x2i, y2i);
+ imm_draw_box_wire_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_2d(shdr_pos, x1i + 1, y1i + 1, x2i - 1, y2i - 1);
+ imm_draw_box_wire_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_2d(shdr_pos, x1i - 1, y1i - 1, x2i + 1, y2i + 1);
+ imm_draw_box_wire_2d(shdr_pos, x1i - 1, y1i - 1, x2i + 1, y2i + 1);
}
immUniformThemeColor(TH_VIEW_OVERLAY);
- imm_draw_line_box_2d(shdr_pos, x1i, y1i, x2i, y2i);
+ imm_draw_box_wire_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_2d(shdr_pos, x3, y3, x4, y4);
+ imm_draw_box_wire_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_2d(shdr_pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
+ imm_draw_box_wire_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_2d(shdr_pos,
+ imm_draw_box_wire_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 a9e4da67b65..b3b5beb54fe 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_2d(0, 0, ar->winx, ar->winy);
+ imm_draw_box_checker_2d(0, 0, ar->winx, ar->winy);
/* render result draw */
type = rv3d->render_engine->type;