diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-26 02:42:36 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-27 13:58:14 +0300 |
commit | f3fc872171203e51109b6500bbaa969933997209 (patch) | |
tree | 158a8fe5565428686f0629ef2d77853d1edcea2a /source/blender/draw/modes/overlay_mode.c | |
parent | 01f5ef82afddcdb078644ce6b63ce370784b2a84 (diff) |
Cleanup: Paint Overlays: Remove DRW_STATE_OFFSET_*
Diffstat (limited to 'source/blender/draw/modes/overlay_mode.c')
-rw-r--r-- | source/blender/draw/modes/overlay_mode.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/draw/modes/overlay_mode.c b/source/blender/draw/modes/overlay_mode.c index 8e50d08be23..e202dcf01ee 100644 --- a/source/blender/draw/modes/overlay_mode.c +++ b/source/blender/draw/modes/overlay_mode.c @@ -71,6 +71,7 @@ typedef struct OVERLAY_Data { typedef struct OVERLAY_PrivateData { DRWShadingGroup *face_orientation_shgrp; DRWShadingGroup *face_wires_shgrp; + DRWView *view_wires; BLI_mempool *wire_color_mempool; View3DOverlay overlay; float wire_step_param; @@ -163,6 +164,8 @@ static void overlay_engine_init(void *vedata) }); #endif } + + stl->g_data->view_wires = DRW_view_create_with_zoffset(draw_ctx->rv3d, 1.0f); } static void overlay_cache_init(void *vedata) @@ -214,7 +217,7 @@ static void overlay_cache_init(void *vedata) { /* Wireframe */ DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS | - DRW_STATE_FIRST_VERTEX_CONVENTION | DRW_STATE_OFFSET_NEGATIVE; + DRW_STATE_FIRST_VERTEX_CONVENTION; float wire_size = U.pixelsize * 0.5f; float winmat[4][4]; @@ -489,8 +492,11 @@ static void overlay_draw_scene(void *vedata) DRW_stats_query_end(); } + DRW_view_set_active(stl->g_data->view_wires); DRW_draw_pass(psl->face_wireframe_pass); + DRW_view_set_active(NULL); + /* TODO(fclem): find a way to unify the multisample pass together * (non meshes + armature + wireframe) */ MULTISAMPLE_SYNC_DISABLE(dfbl, dtxl); |