Fix T62555 Viewport borders flicker when splitting said viewport
authorClément Foucault <foucault.clem@gmail.com>
Sat, 16 Mar 2019 02:57:51 +0000 (03:57 +0100)
committerClément Foucault <foucault.clem@gmail.com>
Sat, 16 Mar 2019 02:58:00 +0000 (03:58 +0100)
source/blender/editors/screen/screen_draw.c

index a5d0bba..6a03327 100644 (file)
@@ -412,6 +412,7 @@ void ED_screen_draw_edges(wmWindow *win)
        edge_thickness = corner_scale * 0.21f;
 
        GPU_blend(true);
+       GPU_blend_set_func_separate(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
 
        GPUBatch *batch = batch_screen_edges_get(&verts_per_corner);
        GPU_batch_program_set_builtin(batch, GPU_SHADER_2D_AREA_EDGES);
@@ -484,6 +485,8 @@ void ED_screen_draw_split_preview(ScrArea *sa, const int dir, const float fac)
 
        /* splitpoint */
        GPU_blend(true);
+       GPU_blend_set_func_separate(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
+
        immUniformColor4ub(255, 255, 255, 100);
 
        immBegin(GPU_PRIM_LINES, 2);