Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_facing.cc
| Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | void OVERLAY_facing_cache_populate(OVERLAY_Data *vedata, Object *ob) | ||||
| } | } | ||||
| const DRWContextState *draw_ctx = DRW_context_state_get(); | const DRWContextState *draw_ctx = DRW_context_state_get(); | ||||
| const bool use_sculpt_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->v3d) && | const bool use_sculpt_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->v3d) && | ||||
| !DRW_state_is_image_render(); | !DRW_state_is_image_render(); | ||||
| const bool is_xray = (ob->dtx & OB_DRAW_IN_FRONT) != 0; | const bool is_xray = (ob->dtx & OB_DRAW_IN_FRONT) != 0; | ||||
| if (use_sculpt_pbvh) { | if (use_sculpt_pbvh) { | ||||
| DRW_shgroup_call_sculpt(pd->facing_grp[is_xray], ob, false, false); | DRW_shgroup_call_sculpt(pd->facing_grp[is_xray], ob, false, false, false, false, false); | ||||
| } | } | ||||
| else { | else { | ||||
| struct GPUBatch *geom = DRW_cache_object_surface_get(ob); | struct GPUBatch *geom = DRW_cache_object_surface_get(ob); | ||||
| if (geom) { | if (geom) { | ||||
| DRW_shgroup_call(pd->facing_grp[is_xray], geom, ob); | DRW_shgroup_call(pd->facing_grp[is_xray], geom, ob); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| Show All 14 Lines | |||||