DNA: move back-face culling to shading popover

Overlay options shouldn't be used when overlays are disabled.

Move to shading popover, reported as T58070.
This commit is contained in:
2018-12-19 10:55:53 +11:00
parent d46d8e831c
commit a72220ecf0
8 changed files with 35 additions and 17 deletions

View File

@@ -160,7 +160,7 @@ static void basic_cache_populate(void *vedata, Object *ob)
struct GPUBatch *geom = DRW_cache_object_surface_get(ob);
if (geom) {
const bool do_cull = (draw_ctx->v3d && (draw_ctx->v3d->flag2 & V3D_BACKFACE_CULLING));
const bool do_cull = (draw_ctx->v3d && (draw_ctx->v3d->shading.flag & V3D_SHADING_BACKFACE_CULLING));
/* Depth Prepass */
DRW_shgroup_call_add((do_cull) ? stl->g_data->depth_shgrp_cull : stl->g_data->depth_shgrp, geom, ob->obmat);
}