Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_extra.cc
| Show First 20 Lines • Show All 189 Lines • ▼ Show 20 Lines | #define BUF_LINE(grp, format) DRW_shgroup_call_buffer(grp, format, GPU_PRIM_LINES) | ||||
| { | { | ||||
| format = formats->pos; | format = formats->pos; | ||||
| sh = OVERLAY_shader_extra_point(); | sh = OVERLAY_shader_extra_point(); | ||||
| grp = DRW_shgroup_create(sh, psl->extra_centers_ps); /* NOTE: not the same pass! */ | grp = DRW_shgroup_create(sh, psl->extra_centers_ps); /* NOTE: not the same pass! */ | ||||
| DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo); | DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo); | ||||
| grp_sub = DRW_shgroup_create_sub(grp); | grp_sub = DRW_shgroup_create_sub(grp); | ||||
| DRW_shgroup_uniform_vec4_copy(grp_sub, "color", G_draw.block.color_active); | DRW_shgroup_uniform_vec4_copy(grp_sub, "ucolor", G_draw.block.color_active); | ||||
| cb->center_active = BUF_POINT(grp_sub, format); | cb->center_active = BUF_POINT(grp_sub, format); | ||||
| grp_sub = DRW_shgroup_create_sub(grp); | grp_sub = DRW_shgroup_create_sub(grp); | ||||
| DRW_shgroup_uniform_vec4_copy(grp_sub, "color", G_draw.block.color_select); | DRW_shgroup_uniform_vec4_copy(grp_sub, "ucolor", G_draw.block.color_select); | ||||
| cb->center_selected = BUF_POINT(grp_sub, format); | cb->center_selected = BUF_POINT(grp_sub, format); | ||||
| grp_sub = DRW_shgroup_create_sub(grp); | grp_sub = DRW_shgroup_create_sub(grp); | ||||
| DRW_shgroup_uniform_vec4_copy(grp_sub, "color", G_draw.block.color_deselect); | DRW_shgroup_uniform_vec4_copy(grp_sub, "ucolor", G_draw.block.color_deselect); | ||||
| cb->center_deselected = BUF_POINT(grp_sub, format); | cb->center_deselected = BUF_POINT(grp_sub, format); | ||||
| grp_sub = DRW_shgroup_create_sub(grp); | grp_sub = DRW_shgroup_create_sub(grp); | ||||
| DRW_shgroup_uniform_vec4_copy(grp_sub, "color", G_draw.block.color_library_select); | DRW_shgroup_uniform_vec4_copy(grp_sub, "ucolor", G_draw.block.color_library_select); | ||||
| cb->center_selected_lib = BUF_POINT(grp_sub, format); | cb->center_selected_lib = BUF_POINT(grp_sub, format); | ||||
| grp_sub = DRW_shgroup_create_sub(grp); | grp_sub = DRW_shgroup_create_sub(grp); | ||||
| DRW_shgroup_uniform_vec4_copy(grp_sub, "color", G_draw.block.color_library); | DRW_shgroup_uniform_vec4_copy(grp_sub, "ucolor", G_draw.block.color_library); | ||||
| cb->center_deselected_lib = BUF_POINT(grp_sub, format); | cb->center_deselected_lib = BUF_POINT(grp_sub, format); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void OVERLAY_extra_point(OVERLAY_ExtraCallBuffers *cb, const float point[3], const float color[4]) | void OVERLAY_extra_point(OVERLAY_ExtraCallBuffers *cb, const float point[3], const float color[4]) | ||||
| { | { | ||||
| DRW_buffer_add_entry(cb->extra_points, point, color); | DRW_buffer_add_entry(cb->extra_points, point, color); | ||||
| ▲ Show 20 Lines • Show All 1,401 Lines • Show Last 20 Lines | |||||