diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-06-21 01:24:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-06-21 01:29:08 +0300 |
commit | 2cad07176178b5acc20091416dd80d4791950062 (patch) | |
tree | f77e126b658760c15fcd122f9e4fae3ea73607d8 /source/blender/editors/uvedit/uvedit_draw.c | |
parent | b30f3f6c19c9a791c8899d97d376df08baa3889e (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/uvedit/uvedit_draw.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_draw.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index fa2a7eb9812..b1d22e12b10 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -117,6 +117,7 @@ void ED_image_draw_cursor(ARegion *ar, const float cursor[2]) immUniformArray4fv( "colors", (float *)(float[][4]){{1.0f, 0.0f, 0.0f, 1.0f}, {1.0f, 1.0f, 1.0f, 1.0f}}, 2); immUniform1f("dash_width", 8.0f); + immUniform1f("dash_factor", 0.5f); immBegin(GPU_PRIM_LINES, 8); @@ -137,6 +138,7 @@ void ED_image_draw_cursor(ARegion *ar, const float cursor[2]) immUniformArray4fv( "colors", (float *)(float[][4]){{1.0f, 1.0f, 1.0f, 1.0f}, {0.0f, 0.0f, 0.0f, 1.0f}}, 2); immUniform1f("dash_width", 2.0f); + immUniform1f("dash_factor", 0.5f); immBegin(GPU_PRIM_LINES, 8); @@ -360,6 +362,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit, Depsgraph * edges, "viewport_size", viewport_size[2] / UI_DPI_FAC, viewport_size[3] / UI_DPI_FAC); GPU_batch_uniform_1i(edges, "colors_len", 2); /* "advanced" mode */ GPU_batch_uniform_1f(edges, "dash_width", 4.0f); + GPU_batch_uniform_1f(edges, "dash_factor", 0.5f); GPU_batch_draw(edges); break; } |