Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/basic/basic_engine.c
| Show First 20 Lines • Show All 196 Lines • ▼ Show 20 Lines | static void basic_cache_populate(void *vedata, Object *ob) | ||||
| 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 do_cull = (draw_ctx->v3d && | const bool do_cull = (draw_ctx->v3d && | ||||
| (draw_ctx->v3d->shading.flag & V3D_SHADING_BACKFACE_CULLING)); | (draw_ctx->v3d->shading.flag & V3D_SHADING_BACKFACE_CULLING)); | ||||
| DRWShadingGroup *shgrp = (do_cull) ? stl->g_data->depth_shgrp_cull[do_in_front] : | DRWShadingGroup *shgrp = (do_cull) ? stl->g_data->depth_shgrp_cull[do_in_front] : | ||||
| stl->g_data->depth_shgrp[do_in_front]; | stl->g_data->depth_shgrp[do_in_front]; | ||||
| if (use_sculpt_pbvh) { | if (use_sculpt_pbvh) { | ||||
| DRW_shgroup_call_sculpt(shgrp, ob, false, false, false); | DRW_shgroup_call_sculpt(shgrp, ob, 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(shgrp, geom, ob); | DRW_shgroup_call(shgrp, geom, ob); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines | |||||