Curves: cage overlay for sculpt mode #104467
|
@ -288,7 +288,8 @@ typedef struct OVERLAY_PrivateData {
|
|||
DRWShadingGroup *pointcloud_dots_grp;
|
||||
DRWShadingGroup *sculpt_mask_grp;
|
||||
DRWShadingGroup *sculpt_curves_selection_grp;
|
||||
DRWShadingGroup *sculpt_curves_edit_grp;
|
||||
DRWShadingGroup *sculpt_curves_edit_points_grp;
|
||||
DRWShadingGroup *sculpt_curves_edit_lines_grp;
|
||||
DRWShadingGroup *viewer_attribute_curve_grp;
|
||||
DRWShadingGroup *viewer_attribute_curves_grp;
|
||||
DRWShadingGroup *viewer_attribute_mesh_grp;
|
||||
|
|
|
@ -39,9 +39,19 @@ 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_grp = DRW_shgroup_create(sh, psl->sculpt_curves_edit_ps);
|
||||
DRW_shgroup_uniform_block(pd->sculpt_curves_edit_grp, "globalsBlock", G_draw.block_ubo);
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,7 +107,10 @@ static void populate_edit_overlay(OVERLAY_Data *vedata, Object *object)
|
|||
}
|
||||
|
||||
GPUBatch *geom_points = DRW_curves_batch_cache_get_edit_points(curves_id_cage);
|
||||
DRW_shgroup_call_no_cull(pd->sculpt_curves_edit_grp, geom_points, object);
|
||||
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);
|
||||
}
|
||||
|
||||
void OVERLAY_sculpt_curves_cache_populate(OVERLAY_Data *vedata, Object *object)
|
||||
|
|
Loading…
Reference in New Issue