[Bf-blender-cvs] [b117b8e8182] master: Fix T73793 Walk navigation crosshair gets hidden behind objects

Clément Foucault noreply at git.blender.org
Mon Feb 17 22:39:43 CET 2020


Commit: b117b8e81829fa8e807159e2a5899d0896ea09c6
Author: Clément Foucault
Date:   Mon Feb 17 22:39:33 2020 +0100
Branches: master
https://developer.blender.org/rBb117b8e81829fa8e807159e2a5899d0896ea09c6

Fix T73793 Walk navigation crosshair gets hidden behind objects

This is a bug that the recent refactor exposed. Some widgets were drawing
with alpha set to 0.

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

M	source/blender/editors/mesh/editmesh_knife.c
M	source/blender/editors/space_view3d/view3d_draw.c
M	source/blender/editors/space_view3d/view3d_fly.c
M	source/blender/editors/space_view3d/view3d_walk.c
M	source/blender/editors/util/ed_util.c

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

diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index bad24eaa47c..93850abafea 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1031,7 +1031,7 @@ static void knifetool_draw_angle_snapping(const KnifeTool_OpData *kcd)
   uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
 
   immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
-  immUniformThemeColor(TH_TRANSFORM);
+  immUniformThemeColor3(TH_TRANSFORM);
   GPU_line_width(2.0);
 
   immBegin(GPU_PRIM_LINES, 2);
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index f767d56de62..06a4147e34d 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -570,7 +570,7 @@ static void drawviewborder(Scene *scene, Depsgraph *depsgraph, ARegion *ar, View
       GPU_blend(false);
     }
 
-    immUniformThemeColor(TH_BACK);
+    immUniformThemeColor3(TH_BACK);
     imm_draw_box_wire_2d(shdr_pos, x1i, y1i, x2i, y2i);
 
 #ifdef VIEW3D_CAMERA_BORDER_HACK
@@ -607,7 +607,7 @@ static void drawviewborder(Scene *scene, Depsgraph *depsgraph, ARegion *ar, View
       imm_draw_box_wire_2d(shdr_pos, x1i - 1, y1i - 1, x2i + 1, y2i + 1);
     }
 
-    immUniformThemeColor(TH_VIEW_OVERLAY);
+    immUniformThemeColor3(TH_VIEW_OVERLAY);
     imm_draw_box_wire_2d(shdr_pos, x1i, y1i, x2i, y2i);
   }
 
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index 903d6231b22..165e4c7c6a3 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -242,7 +242,7 @@ static void drawFlyPixel(const struct bContext *UNUSED(C), ARegion *UNUSED(ar),
 
   immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 
-  immUniformThemeColor(TH_VIEW_OVERLAY);
+  immUniformThemeColor3(TH_VIEW_OVERLAY);
 
   immBegin(GPU_PRIM_LINES, 16);
 
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index 34470896fb9..846bf11ee9d 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -316,7 +316,7 @@ static void drawWalkPixel(const struct bContext *UNUSED(C), ARegion *ar, void *a
 
   immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 
-  immUniformThemeColor(TH_VIEW_OVERLAY);
+  immUniformThemeColor3(TH_VIEW_OVERLAY);
 
   immBegin(GPU_PRIM_LINES, 8);
 
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index b4b89c31414..43ccc1a8250 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -458,7 +458,7 @@ void ED_region_draw_mouse_line_cb(const bContext *C, ARegion *ar, void *arg_info
   immUniform2f("viewport_size", viewport_size[2] / UI_DPI_FAC, viewport_size[3] / UI_DPI_FAC);
 
   immUniform1i("colors_len", 0); /* "simple" mode */
-  immUniformThemeColor(TH_VIEW_OVERLAY);
+  immUniformThemeColor3(TH_VIEW_OVERLAY);
   immUniform1f("dash_width", 6.0f);
   immUniform1f("dash_factor", 0.5f);



More information about the Bf-blender-cvs mailing list