]> git.cworth.org Git - apitrace/blobdiff - gui/apitracecall.cpp
Show thumbnail of the color buffer in tooltips.
[apitrace] / gui / apitracecall.cpp
index 5ac88292399cf225212e9db95dbbe484b87f1bfa..9a6a32e967a0a027bcf07eb7ad467e3a9c34278f 100644 (file)
@@ -537,6 +537,22 @@ const QList<ApiFramebuffer> & ApiTraceState::framebuffers() const
     return m_framebuffers;
 }
 
+ApiFramebuffer ApiTraceState::colorBuffer() const
+{
+    foreach (ApiFramebuffer fbo, m_framebuffers) {
+        if (fbo.type() == QLatin1String("GL_BACK")) {
+            return fbo;
+        }
+    }
+    foreach (ApiFramebuffer fbo, m_framebuffers) {
+        if (fbo.type() == QLatin1String("GL_FRONT")) {
+            return fbo;
+        }
+    }
+    return ApiFramebuffer();
+}
+
+
 ApiTraceCallSignature::ApiTraceCallSignature(const QString &name,
                                              const QStringList &argNames)
     : m_name(name),