Cleanup: move clipping shader lib & define into struct
[blender.git] / source / blender / draw / modes / edit_metaball_mode.c
index 0af1ab9ecd8511b8b5aaff493c93aeedd287cb17..4e4e1806ae27e28b231a5a7a5a64029e8070f849 100644 (file)
@@ -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);
        }
 }