diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-10 03:06:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-10 03:16:31 +0300 |
commit | 0b6dbbc306b0a7e60abe36968d154241bb90c1df (patch) | |
tree | d22a40e3e73f80bc1150cffe1fde866f1f602865 /source/blender/draw/modes/edit_metaball_mode.c | |
parent | 16d7967c2b404cbe6719192e073c7685376f6ab1 (diff) |
Cleanup: move clipping shader lib & define into struct
Also compare clipping with the draw context instead of
accessing the RegionView3D, currently they're matching
but this might not always be the case.
Diffstat (limited to 'source/blender/draw/modes/edit_metaball_mode.c')
-rw-r--r-- | source/blender/draw/modes/edit_metaball_mode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/draw/modes/edit_metaball_mode.c b/source/blender/draw/modes/edit_metaball_mode.c index 0af1ab9ecd8..4e4e1806ae2 100644 --- a/source/blender/draw/modes/edit_metaball_mode.c +++ b/source/blender/draw/modes/edit_metaball_mode.c @@ -93,8 +93,7 @@ typedef struct EDIT_METABALL_PrivateData { static void EDIT_METABALL_engine_init(void *UNUSED(vedata)) { const DRWContextState *draw_ctx = DRW_context_state_get(); - const bool is_clip = (draw_ctx->rv3d->rflag & RV3D_CLIPPING) != 0; - if (is_clip) { + if (draw_ctx->sh_cfg == GPU_SHADER_CFG_CLIPPED) { DRW_state_clip_planes_set_from_rv3d(draw_ctx->rv3d); } } |