Extract canvas object draw and brush panel services

This commit is contained in:
2026-06-16 18:43:14 +02:00
parent b56a46a82c
commit a5002a4e3e
10 changed files with 504 additions and 279 deletions

View File

@@ -443,6 +443,26 @@ void execute_node_canvas_draw_unmerged_pass(
},
[&](const char* message) {
LOG("NodeCanvas onion frame range failed: %s", message);
});
}
void execute_node_canvas_draw_merged_pass(
NodeCanvas& node_canvas,
const glm::mat4& proj,
const glm::mat4& camera)
{
pp::panopainter::execute_legacy_canvas_draw_merged_pass(
node_canvas,
proj,
camera,
[&](auto state, bool enabled) {
apply_node_canvas_capability(state, enabled);
},
[](int unit) {
set_active_texture_unit(unit);
},
[&] {
node_canvas.m_face_plane.draw_fill();
});
}
@@ -662,19 +682,7 @@ void NodeCanvas::draw()
apply_node_canvas_viewport(c.x + App::I->off_x, c.y + App::I->off_y, c.z, c.w);
},
[&] {
pp::panopainter::execute_legacy_canvas_draw_merged_pass(
*this,
proj,
camera,
[&](auto state, bool enabled) {
apply_node_canvas_capability(state, enabled);
},
[](int unit) {
set_active_texture_unit(unit);
},
[&] {
m_face_plane.draw_fill();
});
execute_node_canvas_draw_merged_pass(*this, proj, camera);
},
[&] {
execute_node_canvas_draw_unmerged_pass(*this, proj, camera, c, yaw, pitch, roll);