diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-12-02 16:35:43 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-12-02 16:35:49 +0300 |
commit | 014eb69cf858036816d12a4b92ffe6681978b683 (patch) | |
tree | 05fc4a16f57c6855d5ad209a009a09aa1f8b55d1 /source/blender/draw/intern/draw_manager_exec.c | |
parent | 3e241af3aec2bf03b0b558ca419ceb08d394a239 (diff) |
Overlay Engine: Make thickwires (linesize > 1.0) using the Wire AA pass
This fixes the limitation of OSX not allowing glLineWidth with size > 1.0.
This however only fix the viewport wire drawing.
Diffstat (limited to 'source/blender/draw/intern/draw_manager_exec.c')
-rw-r--r-- | source/blender/draw/intern/draw_manager_exec.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c index 02667ad9d4a..9d14b77119f 100644 --- a/source/blender/draw/intern/draw_manager_exec.c +++ b/source/blender/draw/intern/draw_manager_exec.c @@ -230,21 +230,6 @@ void drw_state_set(DRWState state) } } - /* Wire Width */ - { - int test; - if ((test = CHANGED_TO(DRW_STATE_WIRE_SMOOTH))) { - if (test == 1) { - GPU_line_width(2.0f); - GPU_line_smooth(true); - } - else { - GPU_line_width(1.0f); - GPU_line_smooth(false); - } - } - } - /* Blending (all buffer) */ { int test; @@ -453,7 +438,11 @@ void DRW_state_reset(void) { DRW_state_reset_ex(DRW_STATE_DEFAULT); + /* Should stay constant during the whole rendering. */ GPU_point_size(5); + GPU_line_smooth(false); + /* Bypass U.pixelsize factor. */ + glLineWidth(1.0f); /* Reset blending function */ glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); |