Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_background.cc
| Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | void OVERLAY_background_cache_init(OVERLAY_Data *vedata) | ||||
| } | } | ||||
| if (draw_clipping_bounds) { | if (draw_clipping_bounds) { | ||||
| DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA | DRW_STATE_CULL_BACK; | DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA | DRW_STATE_CULL_BACK; | ||||
| DRW_PASS_CREATE(psl->clipping_frustum_ps, state); | DRW_PASS_CREATE(psl->clipping_frustum_ps, state); | ||||
| GPUShader *sh = OVERLAY_shader_clipbound(); | GPUShader *sh = OVERLAY_shader_clipbound(); | ||||
| DRWShadingGroup *grp = DRW_shgroup_create(sh, psl->clipping_frustum_ps); | DRWShadingGroup *grp = DRW_shgroup_create(sh, psl->clipping_frustum_ps); | ||||
| DRW_shgroup_uniform_vec4_copy(grp, "color", G_draw.block.color_clipping_border); | DRW_shgroup_uniform_vec4_copy(grp, "ucolor", G_draw.block.color_clipping_border); | ||||
| DRW_shgroup_uniform_vec3(grp, "boundbox", &bb->vec[0][0], 8); | DRW_shgroup_uniform_vec3(grp, "boundbox", &bb->vec[0][0], 8); | ||||
| struct GPUBatch *cube = DRW_cache_cube_get(); | struct GPUBatch *cube = DRW_cache_cube_get(); | ||||
| DRW_shgroup_call(grp, cube, nullptr); | DRW_shgroup_call(grp, cube, nullptr); | ||||
| } | } | ||||
| else { | else { | ||||
| psl->clipping_frustum_ps = nullptr; | psl->clipping_frustum_ps = nullptr; | ||||
| } | } | ||||
| Show All 14 Lines | |||||