Move canvas async work into app runtime

This commit is contained in:
2026-06-16 08:33:16 +02:00
parent 3e4eb89499
commit 52f0d32612
9 changed files with 151 additions and 119 deletions

View File

@@ -263,6 +263,19 @@ template <typename ModesT>
};
}
template <typename ModesT>
[[nodiscard]] inline auto make_legacy_canvas_draw_merge_grid_modes_draw(
ModesT* modes,
const glm::mat4& ortho_proj,
const glm::mat4& proj,
const glm::mat4& camera)
{
return [modes, ortho_proj, proj, camera] {
for (auto& mode : *modes)
mode->on_Draw(ortho_proj, proj, camera);
};
}
struct LegacyCanvasDrawMergeSmaskFacesExecution {
std::function<void()> set_active_texture_unit;
std::function<void()> enable_blend;