Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-06-21 01:24:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-06-21 01:29:08 +0300
commit2cad07176178b5acc20091416dd80d4791950062 (patch)
treef77e126b658760c15fcd122f9e4fae3ea73607d8 /source/blender/editors/space_view3d/view3d_gizmo_ruler.c
parentb30f3f6c19c9a791c8899d97d376df08baa3889e (diff)
Fix dashed line drawing
The dash_factor wasn't being set in many places, having the graph editor open for eg, caused box-select in the 3D view not to show dashes.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_gizmo_ruler.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_ruler.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
index 566a15cc7b7..ebfd66008f7 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
@@ -563,6 +563,7 @@ static void gizmo_ruler_draw(const bContext *C, wmGizmo *gz)
(float *)(float[][4]){{0.67f, 0.67f, 0.67f, 1.0f}, {col[0], col[1], col[2], col[3]}},
2);
immUniform1f("dash_width", 6.0f);
+ immUniform1f("dash_factor", 0.5f);
immBegin(GPU_PRIM_LINE_STRIP, 3);
@@ -725,6 +726,7 @@ static void gizmo_ruler_draw(const bContext *C, wmGizmo *gz)
(float *)(float[][4]){{0.67f, 0.67f, 0.67f, 1.0f}, {col[0], col[1], col[2], col[3]}},
2);
immUniform1f("dash_width", 6.0f);
+ immUniform1f("dash_factor", 0.5f);
immBegin(GPU_PRIM_LINES, 2);