Curves: cage overlay for sculpt mode #104467

Merged
Jacques Lucke merged 44 commits from JacquesLucke/blender:sculpt-edit-overlay into main 2023-02-14 18:10:24 +01:00
2 changed files with 4 additions and 17 deletions
Showing only changes of commit 3b6a8929cd - Show all commits

View File

@ -288,7 +288,6 @@ typedef struct OVERLAY_PrivateData {
DRWShadingGroup *pointcloud_dots_grp;
DRWShadingGroup *sculpt_mask_grp;
DRWShadingGroup *sculpt_curves_selection_grp;
DRWShadingGroup *sculpt_curves_edit_points_grp;
DRWShadingGroup *sculpt_curves_edit_lines_grp;
DRWShadingGroup *viewer_attribute_curve_grp;
DRWShadingGroup *viewer_attribute_curves_grp;

View File

@ -39,19 +39,10 @@ void OVERLAY_sculpt_curves_cache_init(OVERLAY_Data *vedata)
const DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_ALWAYS | DRW_STATE_BLEND_ALPHA;
DRW_PASS_CREATE(psl->sculpt_curves_edit_ps, state | pd->clipping_state);
{
GPUShader *sh = OVERLAY_shader_edit_particle_point();
pd->sculpt_curves_edit_points_grp = DRW_shgroup_create(sh, psl->sculpt_curves_edit_ps);
DRW_shgroup_uniform_block(
pd->sculpt_curves_edit_points_grp, "globalsBlock", G_draw.block_ubo);
}
{
GPUShader *sh = OVERLAY_shader_edit_particle_strand();
pd->sculpt_curves_edit_lines_grp = DRW_shgroup_create(sh, psl->sculpt_curves_edit_ps);
DRW_shgroup_uniform_block(
pd->sculpt_curves_edit_lines_grp, "globalsBlock", G_draw.block_ubo);
DRW_shgroup_uniform_bool_copy(pd->sculpt_curves_edit_lines_grp, "useWeight", false);
}
GPUShader *sh = OVERLAY_shader_edit_particle_strand();
pd->sculpt_curves_edit_lines_grp = DRW_shgroup_create(sh, psl->sculpt_curves_edit_ps);
DRW_shgroup_uniform_block(pd->sculpt_curves_edit_lines_grp, "globalsBlock", G_draw.block_ubo);
DRW_shgroup_uniform_bool_copy(pd->sculpt_curves_edit_lines_grp, "useWeight", false);
}
}
@ -106,9 +97,6 @@ static void populate_edit_overlay(OVERLAY_Data *vedata, Object *object)
return;
}
GPUBatch *geom_points = DRW_curves_batch_cache_get_edit_points(curves_id_cage);
DRW_shgroup_call_no_cull(pd->sculpt_curves_edit_points_grp, geom_points, object);
struct GPUBatch *geom_lines = DRW_curves_batch_cache_get_edit_lines(curves_id_cage);
DRW_shgroup_call_no_cull(pd->sculpt_curves_edit_lines_grp, geom_lines, object);
}