summaryrefslogtreecommitdiff
path: root/retrace/daemon/ui/glframe_retrace_model.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'retrace/daemon/ui/glframe_retrace_model.cpp')
-rw-r--r--retrace/daemon/ui/glframe_retrace_model.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/retrace/daemon/ui/glframe_retrace_model.cpp b/retrace/daemon/ui/glframe_retrace_model.cpp
index 48841e34..7da82b3c 100644
--- a/retrace/daemon/ui/glframe_retrace_model.cpp
+++ b/retrace/daemon/ui/glframe_retrace_model.cpp
@@ -435,6 +435,8 @@ FrameRetraceModel::onSelect(SelectionId id, QList<int> selection) {
retrace_uniforms();
if (m_current_tab == kMetrics)
m_metrics_table.onSelect(id, selection);
+ if (m_current_tab == kState)
+ retrace_state();
// refresh other tabs
if (m_current_tab != kRenderTarget)
@@ -449,6 +451,8 @@ FrameRetraceModel::onSelect(SelectionId id, QList<int> selection) {
retrace_uniforms();
if (m_current_tab != kMetrics)
m_metrics_table.onSelect(id, selection);
+ if (m_current_tab != kState)
+ retrace_state();
}
void
@@ -564,6 +568,8 @@ FrameRetraceModel::onExperiment(ExperimentId experiment_count) {
retrace_uniforms();
if (m_current_tab == kMetrics)
m_metrics_table.onExperiment(experiment_count);
+ if (m_current_tab == kState)
+ retrace_state();
// refresh the rest of the tabs
if (m_current_tab != kRenderTarget)
@@ -576,6 +582,8 @@ FrameRetraceModel::onExperiment(ExperimentId experiment_count) {
retrace_uniforms();
if (m_current_tab != kMetrics)
m_metrics_table.onExperiment(experiment_count);
+ if (m_current_tab != kState)
+ retrace_state();
}
void
@@ -604,3 +612,22 @@ void
FrameRetraceModel::setTab(const int index) {
m_current_tab = static_cast<TabIndex>(index);
}
+
+
+void
+FrameRetraceModel::onState(SelectionId selectionCount,
+ ExperimentId experimentCount,
+ RenderId renderId,
+ StateKey item,
+ const std::string &value) {
+ std::cout << value << "\n";
+}
+
+void
+FrameRetraceModel::retrace_state() {
+ RenderSelection sel;
+ glretrace::renderSelectionFromList(m_selection_count,
+ m_cached_selection,
+ &sel);
+ m_retrace.retraceState(sel, m_experiment_count, this);
+}