Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw/engines/basic/basic_engine.c')
-rw-r--r--source/blender/draw/engines/basic/basic_engine.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/draw/engines/basic/basic_engine.c b/source/blender/draw/engines/basic/basic_engine.c
index dd7f4683ce0..f548bd15bf4 100644
--- a/source/blender/draw/engines/basic/basic_engine.c
+++ b/source/blender/draw/engines/basic/basic_engine.c
@@ -25,6 +25,7 @@
#include "DRW_render.h"
+#include "BKE_paint.h"
#include "BKE_particle.h"
#include "DNA_particle_types.h"
@@ -161,13 +162,19 @@ 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->shading.flag & V3D_SHADING_BACKFACE_CULLING));
- /* Depth Prepass */
- DRW_shgroup_call(
- (do_cull) ? stl->g_data->depth_shgrp_cull : stl->g_data->depth_shgrp, geom, ob);
+ const bool use_sculpt_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->v3d);
+ const bool do_cull = (draw_ctx->v3d &&
+ (draw_ctx->v3d->shading.flag & V3D_SHADING_BACKFACE_CULLING));
+ DRWShadingGroup *shgrp = (do_cull) ? stl->g_data->depth_shgrp_cull : stl->g_data->depth_shgrp;
+
+ if (use_sculpt_pbvh) {
+ DRW_shgroup_call_sculpt(shgrp, ob, false, false, false);
+ }
+ else {
+ struct GPUBatch *geom = DRW_cache_object_surface_get(ob);
+ if (geom) {
+ DRW_shgroup_call(shgrp, geom, ob);
+ }
}
}