renderbase impl

This commit is contained in:
2026-08-13 13:32:23 +08:00
parent 4a48e62aea
commit 65cf786e2d
30 changed files with 920 additions and 632 deletions
+9 -9
View File
@@ -147,9 +147,9 @@ public:
[[nodiscard]] nlohmann::json controls() const {
return {
{"resources", controls_.resources()},
{"observers", controls_.observers(root_->scene())},
{"render_plan", controls_.render_plan(root_->scene())},
{"performance_capture", gallery_performance_capture_json(root_->scene())}
{"observers", controls_.observers(plot_)},
{"render_plan", controls_.render_plan(plot_)},
{"performance_capture", gallery_performance_capture_json(plot_)}
};
}
[[nodiscard]] Gallery_Frame_Mode frame_mode() const noexcept {
@@ -271,10 +271,10 @@ public:
last_action_result_.clear();
recognized = true;
if (request.id == "capture_next_frame") {
const auto state = root_->scene().capture_state();
const auto state = plot_.capture_state();
if (state.enabled())
return "A performance capture session is already active";
const auto session_id = root_->scene().capture_next_frame();
const auto session_id = plot_.capture_next_frame();
last_action_result_ = "capture session=" + std::to_string(session_id);
return "Capture next render frame requested";
}
@@ -284,10 +284,10 @@ public:
return invalid_argument(recognized);
const std::size_t count = static_cast<std::size_t>(
std::clamp(std::llround(*argument), 1LL, 1000LL));
const auto state = root_->scene().capture_state();
const auto state = plot_.capture_state();
if (state.enabled())
return "A performance capture session is already active";
const auto session_id = root_->scene().capture_frames(count);
const auto session_id = plot_.capture_frames(count);
last_action_result_ = "capture session=" + std::to_string(session_id) +
", frames=" + std::to_string(count);
return "Consecutive render frame capture requested";
@@ -561,8 +561,8 @@ public:
{"kernel_observer", std::move(observer_data)},
{"consumer_feedback", std::move(consumer_feedback_data)},
{"client_performance", std::move(client_performance_data)},
{"renderable_observers", controls_.observers(root_->scene())},
{"performance_capture", gallery_performance_capture_json(root_->scene())},
{"renderable_observers", controls_.observers(plot_)},
{"performance_capture", gallery_performance_capture_json(plot_)},
{"last_action_result", last_action_result_}
};
if (primary_) {