diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/apitracecall.cpp | 7 | ||||
-rw-r--r-- | gui/apitracecall.h | 2 | ||||
-rw-r--r-- | gui/mainwindow.cpp | 5 | ||||
-rw-r--r-- | gui/ui/mainwindow.ui | 33 |
4 files changed, 47 insertions, 0 deletions
diff --git a/gui/apitracecall.cpp b/gui/apitracecall.cpp index fe30947b..a48b4782 100644 --- a/gui/apitracecall.cpp +++ b/gui/apitracecall.cpp @@ -492,6 +492,8 @@ ApiTraceState::ApiTraceState(const QVariantMap &parsedJson) m_uniforms = parsedJson[QLatin1String("uniforms")].toMap(); + m_buffers = parsedJson[QLatin1String("buffers")].toMap(); + QVariantMap textures = parsedJson[QLatin1String("textures")].toMap(); for (itr = textures.constBegin(); itr != textures.constEnd(); ++itr) { @@ -555,6 +557,11 @@ const QVariantMap & ApiTraceState::uniforms() const return m_uniforms; } +const QVariantMap & ApiTraceState::buffers() const +{ + return m_buffers; +} + bool ApiTraceState::isEmpty() const { return m_parameters.isEmpty() && diff --git a/gui/apitracecall.h b/gui/apitracecall.h index 5c2b20dd..1534107c 100644 --- a/gui/apitracecall.h +++ b/gui/apitracecall.h @@ -166,6 +166,7 @@ public: const QVariantMap & parameters() const; const QMap<QString, QString> & shaderSources() const; const QVariantMap & uniforms() const; + const QVariantMap & buffers() const; const QList<ApiTexture> & textures() const; const QList<ApiFramebuffer> & framebuffers() const; @@ -174,6 +175,7 @@ private: QVariantMap m_parameters; QMap<QString, QString> m_shaderSources; QVariantMap m_uniforms; + QVariantMap m_buffers; QList<ApiTexture> m_textures; QList<ApiFramebuffer> m_framebuffers; }; diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 378d2334..90cf6363 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -626,6 +626,11 @@ void MainWindow::fillStateForFrame() variantMapToItems(state.uniforms(), QVariantMap(), uniformsItems); m_ui.uniformsTreeWidget->insertTopLevelItems(0, uniformsItems); + m_ui.buffersTreeWidget->clear(); + QList<QTreeWidgetItem *> buffersItems; + variantMapToItems(state.buffers(), QVariantMap(), buffersItems); + m_ui.buffersTreeWidget->insertTopLevelItems(0, buffersItems); + const QList<ApiTexture> &textures = state.textures(); const QList<ApiFramebuffer> &fbos = diff --git a/gui/ui/mainwindow.ui b/gui/ui/mainwindow.ui index e09be079..45deb6ed 100644 --- a/gui/ui/mainwindow.ui +++ b/gui/ui/mainwindow.ui @@ -250,6 +250,39 @@ </item> </layout> </widget> + <widget class="QWidget" name="buffersTab"> + <attribute name="title"> + <string>Buffers</string> + </attribute> + <layout class="QVBoxLayout" name="verticalLayout_7"> + <item> + <widget class="QTreeWidget" name="buffersTreeWidget"> + <property name="editTriggers"> + <set>QAbstractItemView::NoEditTriggers</set> + </property> + <property name="alternatingRowColors"> + <bool>true</bool> + </property> + <property name="sortingEnabled"> + <bool>false</bool> + </property> + <property name="allColumnsShowFocus"> + <bool>true</bool> + </property> + <column> + <property name="text"> + <string>Name</string> + </property> + </column> + <column> + <property name="text"> + <string>Value</string> + </property> + </column> + </widget> + </item> + </layout> + </widget> </widget> </item> </layout> |