[Bf-blender-cvs] [e58285dc1dc] blender-v2.91-release: Fix T73793 Walk navigation crosshair gets hidden behind objects
Clément Foucault
noreply at git.blender.org
Fri Oct 23 02:03:02 CEST 2020
Commit: e58285dc1dc41312e9514963320648a0422c2ecb
Author: Clément Foucault
Date: Thu Oct 22 21:09:11 2020 +0200
Branches: blender-v2.91-release
https://developer.blender.org/rBe58285dc1dc41312e9514963320648a0422c2ecb
Fix T73793 Walk navigation crosshair gets hidden behind objects
This was reintroduced by the wide line emulation workaround.
===================================================================
M source/blender/editors/space_view3d/view3d_walk.c
M source/blender/gpu/intern/gpu_state.cc
===================================================================
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index 1d89b040b85..3c9e4fa49b9 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -337,7 +337,7 @@ static void drawWalkPixel(const struct bContext *UNUSED(C), ARegion *region, voi
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
- immUniformThemeColor3(TH_VIEW_OVERLAY);
+ immUniformThemeColorAlpha(TH_VIEW_OVERLAY, 1.0f);
immBegin(GPU_PRIM_LINES, 8);
diff --git a/source/blender/gpu/intern/gpu_state.cc b/source/blender/gpu/intern/gpu_state.cc
index d0048ab9b87..fae196b202a 100644
--- a/source/blender/gpu/intern/gpu_state.cc
+++ b/source/blender/gpu/intern/gpu_state.cc
@@ -167,7 +167,8 @@ void GPU_depth_range(float near, float far)
void GPU_line_width(float width)
{
- SET_MUTABLE_STATE(line_width, width * PIXELSIZE);
+ width = max_ff(1.0f, width * PIXELSIZE);
+ SET_MUTABLE_STATE(line_width, width);
}
void GPU_point_size(float size)
More information about the Bf-blender-cvs
mailing list