Move stroke commit input binding behind service helper
This commit is contained in:
@@ -543,7 +543,7 @@ static auto make_canvas_stroke_commit_callbacks(
|
||||
{
|
||||
const auto& b = current_stroke->m_brush;
|
||||
auto bind_commit_inputs = [&](int i) {
|
||||
pp::panopainter::bind_legacy_canvas_stroke_commit_inputs(
|
||||
pp::panopainter::bind_legacy_canvas_stroke_commit_face_inputs(
|
||||
sequence,
|
||||
[&](int texture_slot) {
|
||||
set_active_texture_unit(texture_slot);
|
||||
|
||||
@@ -151,6 +151,20 @@ inline void bind_legacy_canvas_stroke_commit_inputs(
|
||||
}
|
||||
}
|
||||
|
||||
template <typename SetActiveTextureUnit, typename BindFaceTextureRole, typename BindFaceSamplerRole>
|
||||
inline void bind_legacy_canvas_stroke_commit_face_inputs(
|
||||
const pp::paint_renderer::CanvasStrokeCommitSequencePlan& sequence,
|
||||
SetActiveTextureUnit&& set_active_texture_unit,
|
||||
BindFaceTextureRole&& bind_face_texture_role,
|
||||
BindFaceSamplerRole&& bind_face_sampler_role)
|
||||
{
|
||||
bind_legacy_canvas_stroke_commit_inputs(
|
||||
sequence,
|
||||
std::forward<SetActiveTextureUnit>(set_active_texture_unit),
|
||||
std::forward<BindFaceTextureRole>(bind_face_texture_role),
|
||||
std::forward<BindFaceSamplerRole>(bind_face_sampler_role));
|
||||
}
|
||||
|
||||
template <typename SetupShader, typename DrawPlane>
|
||||
inline void execute_legacy_canvas_stroke_commit_erase(
|
||||
SetupShader&& setup_shader,
|
||||
|
||||
Reference in New Issue
Block a user