diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-16 16:38:34 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-18 22:30:10 +0300 |
commit | bf1b622dd962416fef94ccb2f47878eced31e20d (patch) | |
tree | 8622462ebdfbc6e347975d1b875b817356e4e84a /source/blender/editors/space_view3d/view3d_draw.c | |
parent | 10558d6973be8fc461a4b8aad734ba0881d18e85 (diff) |
GPUState: GPU_blend final API renaming
We now use GPU_blend for enabling / disabling blending and explicitly
set the blend equation.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 20 |
1 files changed, 10 insertions, 10 deletions
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 */ |