Extract stroke destination dispatch helper
This commit is contained in:
@@ -564,17 +564,17 @@ glm::vec4 Canvas::stroke_draw_samples(
|
||||
.slot = 1,
|
||||
},
|
||||
};
|
||||
const pp::panopainter::LegacyCanvasStrokeTextureInputDispatch destination_texture_dispatch {
|
||||
.activate_texture_unit = [&](int texture_slot) {
|
||||
set_active_texture_unit(texture_slot);
|
||||
},
|
||||
.bind_stroke_destination = [&] {
|
||||
m_tex[i].bind(); // bg, copy of framebuffer (copied before drawing)
|
||||
},
|
||||
.unbind_stroke_destination = [&] {
|
||||
m_tex[i].unbind();
|
||||
},
|
||||
};
|
||||
const auto destination_texture_dispatch =
|
||||
pp::panopainter::make_legacy_canvas_stroke_destination_texture_dispatch(
|
||||
[&](int texture_slot) {
|
||||
set_active_texture_unit(texture_slot);
|
||||
},
|
||||
[&] {
|
||||
m_tex[i].bind(); // bg, copy of framebuffer (copied before drawing)
|
||||
},
|
||||
[&] {
|
||||
m_tex[i].unbind();
|
||||
});
|
||||
const auto result = pp::panopainter::execute_legacy_canvas_stroke_face_sample_polygon(
|
||||
pp::panopainter::LegacyStrokeFaceSamplePolygonExecutionRequest {
|
||||
.context = "Canvas::stroke_draw_samples",
|
||||
|
||||
Reference in New Issue
Block a user