[Bf-blender-cvs] [63dfb5bb97b] blender2.8: Cleanup: naming (GPU immediate util)

Campbell Barton noreply at git.blender.org
Tue Sep 26 07:10:13 CEST 2017


Commit: 63dfb5bb97b1a320a0f5e51eaca51d7b25902aa4
Author: Campbell Barton
Date:   Tue Sep 26 15:21:01 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB63dfb5bb97b1a320a0f5e51eaca51d7b25902aa4

Cleanup: naming (GPU immediate util)

===================================================================

M	source/blender/editors/interface/interface_draw.c
M	source/blender/editors/interface/interface_widgets.c
M	source/blender/editors/screen/area.c
M	source/blender/editors/sculpt_paint/paint_cursor.c
M	source/blender/editors/space_clip/clip_draw.c
M	source/blender/editors/space_file/file_draw.c
M	source/blender/editors/space_image/image_draw.c
M	source/blender/editors/space_nla/nla_draw.c
M	source/blender/editors/space_node/node_draw.c
M	source/blender/editors/space_sequencer/sequencer_draw.c
M	source/blender/editors/space_view3d/drawobject.c
M	source/blender/editors/space_view3d/view3d_draw.c
M	source/blender/editors/space_view3d/view3d_draw_legacy.c
M	source/blender/gpu/GPU_immediate_util.h
M	source/blender/gpu/intern/gpu_immediate_util.c
M	source/blender/windowmanager/intern/wm_gesture.c
M	source/blender/windowmanager/intern/wm_playanim.c

===================================================================

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);


@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list