Fix: Overlay: Missing Alt-B clipping frustum overlay

Detected thanks to a GL error.
This commit is contained in:
Clément Foucault
2025-01-23 17:30:25 +01:00
parent 436eace765
commit dcfd87f01c

View File

@@ -79,10 +79,12 @@ class Background : Overlay {
bg_ps_.framebuffer_set(&framebuffer_ref_);
if ((state.clipping_plane_count != 0) && (state.rv3d) && (state.rv3d->clipbb)) {
Span<float3> bbox(reinterpret_cast<float3 *>(state.rv3d->clipbb->vec[0]), 8);
bg_ps_.state_set(DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA | DRW_STATE_CULL_BACK);
bg_ps_.shader_set(res.shaders.background_clip_bound.get());
bg_ps_.push_constant("ucolor", res.theme_settings.color_clipping_border);
bg_ps_.push_constant("boundbox", &state.rv3d->clipbb->vec[0][0], 8);
bg_ps_.push_constant("boundbox", bbox.data(), 8);
bg_ps_.draw(DRW_cache_cube_get());
}