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:
authorLukas Tönne <lukas.toenne@gmail.com>2022-07-26 00:43:48 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2022-07-26 00:43:48 +0300
commitf081e76037432cb926be45e980eac201d337032c (patch)
treedd1225521c12ea21c0b0c3d51ec1ae3f8730755f /source/blender/draw/engines/basic/basic_engine.c
parentfa2084ae58a77b1201289b6bedac427f73c762d1 (diff)
parent462f99bf38648a08226b1fba423315aec2bc577b (diff)
Merge branch 'master' into geometry-nodes-iterative-cachegeometry-nodes-rigid-body-integration
Diffstat (limited to 'source/blender/draw/engines/basic/basic_engine.c')
-rw-r--r--source/blender/draw/engines/basic/basic_engine.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/draw/engines/basic/basic_engine.c b/source/blender/draw/engines/basic/basic_engine.c
index 04a3c27959d..975d9e299bf 100644
--- a/source/blender/draw/engines/basic/basic_engine.c
+++ b/source/blender/draw/engines/basic/basic_engine.c
@@ -53,6 +53,7 @@ typedef struct BASIC_PrivateData {
DRWShadingGroup *depth_shgrp[2];
DRWShadingGroup *depth_shgrp_cull[2];
DRWShadingGroup *depth_hair_shgrp[2];
+ DRWShadingGroup *depth_curves_shgrp[2];
DRWShadingGroup *depth_pointcloud_shgrp[2];
bool use_material_slot_selection;
} BASIC_PrivateData; /* Transient data */
@@ -99,6 +100,9 @@ static void basic_cache_init(void *vedata)
stl->g_data->depth_hair_shgrp[i] = grp = DRW_shgroup_create(
BASIC_shaders_depth_sh_get(draw_ctx->sh_cfg), psl->depth_pass[i]);
+ stl->g_data->depth_curves_shgrp[i] = grp = DRW_shgroup_create(
+ BASIC_shaders_curves_depth_sh_get(draw_ctx->sh_cfg), psl->depth_pass[i]);
+
sh = DRW_state_is_select() ? BASIC_shaders_depth_conservative_sh_get(draw_ctx->sh_cfg) :
BASIC_shaders_depth_sh_get(draw_ctx->sh_cfg);
state |= DRW_STATE_CULL_BACK;
@@ -156,8 +160,12 @@ static void basic_cache_populate(void *vedata, Object *ob)
basic_cache_populate_particles(vedata, ob);
}
- /* Make flat object selectable in ortho view if wireframe is enabled. */
const bool do_in_front = (ob->dtx & OB_DRAW_IN_FRONT) != 0;
+ if (ob->type == OB_CURVES) {
+ DRW_shgroup_curves_create_sub(ob, stl->g_data->depth_curves_shgrp[do_in_front], NULL);
+ }
+
+ /* Make flat object selectable in ortho view if wireframe is enabled. */
if ((draw_ctx->v3d->overlay.flag & V3D_OVERLAY_WIREFRAMES) ||
(draw_ctx->v3d->shading.type == OB_WIRE) || (ob->dtx & OB_DRAWWIRE) || (ob->dt == OB_WIRE)) {
int flat_axis = 0;