Extract dual stroke tip dispatch overload

This commit is contained in:
2026-06-13 18:48:25 +02:00
parent 819b0f31db
commit 6b12c520f0
5 changed files with 55 additions and 6 deletions

View File

@@ -946,16 +946,17 @@ void Canvas::stroke_draw()
[&](int texture_slot) {
set_active_texture_unit(texture_slot);
},
[&] {
[&](int) {
dual_brush->m_tip_texture ?
dual_brush->m_tip_texture->bind() :
unbind_texture_2d();
},
[&] {
[&](int) {
dual_brush->m_tip_texture ?
dual_brush->m_tip_texture->unbind() :
unbind_texture_2d();
}));
},
0));
},
.unbind_brush_tip = [&] {
pp::panopainter::unbind_legacy_canvas_stroke_texture_inputs(
@@ -964,16 +965,17 @@ void Canvas::stroke_draw()
[&](int texture_slot) {
set_active_texture_unit(texture_slot);
},
[&] {
[&](int) {
dual_brush->m_tip_texture ?
dual_brush->m_tip_texture->bind() :
unbind_texture_2d();
},
[&] {
[&](int) {
dual_brush->m_tip_texture ?
dual_brush->m_tip_texture->unbind() :
unbind_texture_2d();
}));
},
0));
},
.setup_dual_shader = [&] {
pp::panopainter::setup_legacy_stroke_dual_shader(