Reuse stroke sampler dispatch helper
This commit is contained in:
@@ -731,32 +731,32 @@ void Canvas::stroke_draw()
|
||||
.slot = 0,
|
||||
},
|
||||
};
|
||||
const pp::panopainter::LegacyCanvasStrokeSamplerDispatch live_pass_sampler_dispatch {
|
||||
.bind_brush_tip_sampler = [&](int slot) {
|
||||
m_sampler_brush.bind(slot);
|
||||
},
|
||||
.unbind_brush_tip_sampler = [&] {
|
||||
m_sampler_brush.unbind();
|
||||
},
|
||||
.bind_stroke_destination_sampler = [&](int slot) {
|
||||
m_sampler_nearest.bind(slot);
|
||||
},
|
||||
.unbind_stroke_destination_sampler = [&] {
|
||||
m_sampler_nearest.unbind();
|
||||
},
|
||||
.bind_pattern_sampler = [&](int slot) {
|
||||
m_sampler_stencil.bind(slot);
|
||||
},
|
||||
.unbind_pattern_sampler = [&] {
|
||||
m_sampler_stencil.unbind();
|
||||
},
|
||||
.bind_mixer_sampler = [&](int slot) {
|
||||
m_sampler.bind(slot);
|
||||
},
|
||||
.unbind_mixer_sampler = [&] {
|
||||
m_sampler.unbind();
|
||||
},
|
||||
};
|
||||
const pp::panopainter::LegacyCanvasStrokeSamplerDispatch live_pass_sampler_dispatch =
|
||||
pp::panopainter::make_legacy_canvas_stroke_sampler_dispatch(
|
||||
[&](int slot) {
|
||||
m_sampler_brush.bind(slot);
|
||||
},
|
||||
[&] {
|
||||
m_sampler_brush.unbind();
|
||||
},
|
||||
[&](int slot) {
|
||||
m_sampler_nearest.bind(slot);
|
||||
},
|
||||
[&] {
|
||||
m_sampler_nearest.unbind();
|
||||
},
|
||||
[&](int slot) {
|
||||
m_sampler_stencil.bind(slot);
|
||||
},
|
||||
[&] {
|
||||
m_sampler_stencil.unbind();
|
||||
},
|
||||
[&](int slot) {
|
||||
m_sampler.bind(slot);
|
||||
},
|
||||
[&] {
|
||||
m_sampler.unbind();
|
||||
});
|
||||
const pp::panopainter::LegacyCanvasStrokeTextureInputDispatch main_pass_texture_dispatch {
|
||||
pp::panopainter::make_legacy_canvas_stroke_main_pass_texture_dispatch(
|
||||
[&](int texture_slot) {
|
||||
|
||||
Reference in New Issue
Block a user