diff options
Diffstat (limited to 'source/blender/editors/space_view3d')
5 files changed, 33 insertions, 33 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index c102b4ff758..3c5b5abdefc 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -131,8 +131,8 @@ void ED_draw_object_facemap(Depsgraph *depsgraph, /* Just to create the data to pass to immediate mode, grr! */ const int *facemap_data = CustomData_get_layer(&me->pdata, CD_FACEMAP); if (facemap_data) { - GPU_blend_set_func_separate(GPU_BLEND_ALPHA); - GPU_blend(true); + GPU_blend(GPU_BLEND_ALPHA); + GPU_blend(GPU_BLEND_ALPHA); const MVert *mvert = me->mvert; const MPoly *mpoly = me->mpoly; @@ -208,6 +208,6 @@ void ED_draw_object_facemap(Depsgraph *depsgraph, GPU_batch_discard(draw_batch); GPU_vertbuf_discard(vbo_pos); - GPU_blend(false); + GPU_blend(GPU_BLEND_NONE); } } diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 6fecf80650d..6973e55e5ea 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -588,8 +588,8 @@ static void drawviewborder(Scene *scene, Depsgraph *depsgraph, ARegion *region, float alpha = 1.0f; if (ca->passepartalpha != 1.0f) { - GPU_blend_set_func_separate(GPU_BLEND_ALPHA); - GPU_blend(true); + GPU_blend(GPU_BLEND_ALPHA); + GPU_blend(GPU_BLEND_ALPHA); alpha = ca->passepartalpha; } @@ -608,7 +608,7 @@ static void drawviewborder(Scene *scene, Depsgraph *depsgraph, ARegion *region, immRectf(shdr_pos, x1i, y1i, x2i, 0.0f); } - GPU_blend(false); + GPU_blend(GPU_BLEND_NONE); } immUniformThemeColor3(TH_BACK); @@ -667,7 +667,7 @@ static void drawviewborder(Scene *scene, Depsgraph *depsgraph, ARegion *region, /* safety border */ if (ca) { - GPU_blend(true); + GPU_blend(GPU_BLEND_ALPHA); immUniformThemeColorAlpha(TH_VIEW_OVERLAY, 0.75f); if (ca->dtx & CAM_DTX_CENTER) { @@ -779,7 +779,7 @@ static void drawviewborder(Scene *scene, Depsgraph *depsgraph, ARegion *region, imm_draw_box_wire_2d(shdr_pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax); } - GPU_blend(false); + GPU_blend(GPU_BLEND_NONE); } immUnbindProgram(); @@ -1026,8 +1026,8 @@ static void draw_view_axis(RegionView3D *rv3d, const rcti *rect) /* draw axis lines */ GPU_line_width(2.0f); GPU_line_smooth(true); - GPU_blend(true); - GPU_blend_set_func_separate(GPU_BLEND_ALPHA); + GPU_blend(GPU_BLEND_ALPHA); + GPU_blend(GPU_BLEND_ALPHA); GPUVertFormat *format = immVertexFormat(); uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); @@ -1070,8 +1070,8 @@ static void draw_rotation_guide(const RegionView3D *rv3d) negate_v3_v3(o, rv3d->ofs); - GPU_blend(true); - GPU_blend_set_func_separate(GPU_BLEND_ALPHA); + GPU_blend(GPU_BLEND_ALPHA); + GPU_blend(GPU_BLEND_ALPHA); GPU_depth_mask(false); /* don't overwrite zbuf */ GPUVertFormat *format = immVertexFormat(); @@ -1161,7 +1161,7 @@ static void draw_rotation_guide(const RegionView3D *rv3d) immEnd(); immUnbindProgram(); - GPU_blend(false); + GPU_blend(GPU_BLEND_NONE); GPU_depth_mask(true); } #endif /* WITH_INPUT_NDOF */ diff --git a/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c b/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c index 3ce4c8dc9a8..5f8ffc5f3f9 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c @@ -407,7 +407,7 @@ static void axis_geom_draw(const wmGizmo *gz, BLF_width_and_height(font.id, axis_str, 2, &offset[0], &offset[1]); BLF_position(font.id, roundf(offset[0] * -0.5f), roundf(offset[1] * -0.5f), 0); BLF_draw_ascii(font.id, axis_str, 2); - GPU_blend(true); /* XXX, blf disables */ + GPU_blend(GPU_BLEND_ALPHA); /* XXX, blf disables */ GPU_matrix_pop(); immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); @@ -465,9 +465,9 @@ static void axis3d_draw_intern(const bContext *C, UNUSED_VARS(C); #endif - GPU_blend(true); + GPU_blend(GPU_BLEND_ALPHA); axis_geom_draw(gz, color, select, &draw_info); - GPU_blend(false); + GPU_blend(GPU_BLEND_NONE); GPU_matrix_pop(); } @@ -478,9 +478,9 @@ static void gizmo_axis_draw(const bContext *C, wmGizmo *gz) (void)is_modal; - GPU_blend(true); + GPU_blend(GPU_BLEND_ALPHA); axis3d_draw_intern(C, gz, false, is_highlight); - GPU_blend(false); + GPU_blend(GPU_BLEND_NONE); } static int gizmo_axis_test_select(bContext *UNUSED(C), wmGizmo *gz, const int mval[2]) diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c index 7799aba5c19..5aba1fecc53 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c @@ -607,7 +607,7 @@ static void gizmo_ruler_draw(const bContext *C, wmGizmo *gz) GPU_matrix_projection_set(rv3d->winmat); GPU_matrix_set(rv3d->viewmat); - GPU_blend(true); + GPU_blend(GPU_BLEND_ALPHA); const uint shdr_pos_3d = GPU_vertformat_attr_add( immVertexFormat(), "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT); @@ -735,7 +735,7 @@ static void gizmo_ruler_draw(const bContext *C, wmGizmo *gz) rot_90_vec_b[1] = dir_ruler[0]; normalize_v2(rot_90_vec_b); - GPU_blend(true); + GPU_blend(GPU_BLEND_ALPHA); if (proj_ok[1] && is_act && (ruler_item->flag & RULERITEM_USE_ANGLE_ACTIVE)) { GPU_line_width(3.0f); @@ -781,7 +781,7 @@ static void gizmo_ruler_draw(const bContext *C, wmGizmo *gz) immEnd(); } - GPU_blend(false); + GPU_blend(GPU_BLEND_NONE); } /* text */ @@ -800,13 +800,13 @@ static void gizmo_ruler_draw(const bContext *C, wmGizmo *gz) /* draw text (bg) */ if (proj_ok[1]) { immUniformColor4fv(color_back); - GPU_blend(true); + GPU_blend(GPU_BLEND_ALPHA); immRectf(shdr_pos_2d, posit[0] - bg_margin, posit[1] - bg_margin, posit[0] + bg_margin + numstr_size[0], posit[1] + bg_margin + numstr_size[1]); - GPU_blend(false); + GPU_blend(GPU_BLEND_NONE); } immUnbindProgram(); @@ -831,7 +831,7 @@ static void gizmo_ruler_draw(const bContext *C, wmGizmo *gz) normalize_v2(rot_90_vec); - GPU_blend(true); + GPU_blend(GPU_BLEND_ALPHA); immUniformColor3ubv(color_wire); @@ -855,7 +855,7 @@ static void gizmo_ruler_draw(const bContext *C, wmGizmo *gz) immEnd(); } - GPU_blend(false); + GPU_blend(GPU_BLEND_NONE); } /* text */ @@ -877,13 +877,13 @@ static void gizmo_ruler_draw(const bContext *C, wmGizmo *gz) /* draw text (bg) */ if (proj_ok[0] && proj_ok[2]) { immUniformColor4fv(color_back); - GPU_blend(true); + GPU_blend(GPU_BLEND_ALPHA); immRectf(shdr_pos_2d, posit[0] - bg_margin, posit[1] - bg_margin, posit[0] + bg_margin + numstr_size[0], posit[1] + bg_margin + numstr_size[1]); - GPU_blend(false); + GPU_blend(GPU_BLEND_NONE); } immUnbindProgram(); diff --git a/source/blender/editors/space_view3d/view3d_placement.c b/source/blender/editors/space_view3d/view3d_placement.c index a21c1458286..6c61c83731d 100644 --- a/source/blender/editors/space_view3d/view3d_placement.c +++ b/source/blender/editors/space_view3d/view3d_placement.c @@ -258,7 +258,7 @@ static void draw_line_loop(const float coords[][3], int coords_len, const float GPU_vertbuf_attr_set(vert, pos, i, coords[i]); } - GPU_blend(true); + GPU_blend(GPU_BLEND_ALPHA); GPUBatch *batch = GPU_batch_create_ex(GPU_PRIM_LINE_LOOP, vert, NULL, GPU_BATCH_OWNS_VBO); GPU_batch_program_set_builtin(batch, GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR); @@ -272,7 +272,7 @@ static void draw_line_loop(const float coords[][3], int coords_len, const float GPU_batch_draw(batch); GPU_batch_discard(batch); - GPU_blend(false); + GPU_blend(GPU_BLEND_NONE); } static void draw_line_pairs(const float coords_a[][3], @@ -291,7 +291,7 @@ static void draw_line_pairs(const float coords_a[][3], GPU_vertbuf_attr_set(vert, pos, (i * 2) + 1, coords_b[i]); } - GPU_blend(true); + GPU_blend(GPU_BLEND_ALPHA); GPUBatch *batch = GPU_batch_create_ex(GPU_PRIM_LINES, vert, NULL, GPU_BATCH_OWNS_VBO); GPU_batch_program_set_builtin(batch, GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR); @@ -305,7 +305,7 @@ static void draw_line_pairs(const float coords_a[][3], GPU_batch_draw(batch); GPU_batch_discard(batch); - GPU_blend(false); + GPU_blend(GPU_BLEND_NONE); } static void draw_line_bounds(const BoundBox *bounds, const float color[4]) @@ -339,7 +339,7 @@ static void draw_line_bounds(const BoundBox *bounds, const float color[4]) GPU_vertbuf_attr_set(vert, pos, j++, bounds->vec[edges[i][1]]); } - GPU_blend(true); + GPU_blend(GPU_BLEND_ALPHA); GPUBatch *batch = GPU_batch_create_ex(GPU_PRIM_LINES, vert, NULL, GPU_BATCH_OWNS_VBO); GPU_batch_program_set_builtin(batch, GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR); @@ -353,7 +353,7 @@ static void draw_line_bounds(const BoundBox *bounds, const float color[4]) GPU_batch_draw(batch); GPU_batch_discard(batch); - GPU_blend(false); + GPU_blend(GPU_BLEND_NONE); } static bool calc_bbox(struct InteractivePlaceData *ipd, BoundBox *bounds) |