summaryrefslogtreecommitdiff
path: root/retrace
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2014-08-26 22:29:19 +0100
committerJosé Fonseca <jfonseca@vmware.com>2014-08-26 22:29:19 +0100
commit3b1c2546b9f7739c6f672a02c8bd1dc93a3e2976 (patch)
treec60d10eee0c05c7a0b0d9b7c419d5fa471d19b55 /retrace
parent480ffb5c335c1db05c4d453eda833c8ee0f8086b (diff)
glretrace: Skip incomplete framebuffers when dumping state.
Issue #284.
Diffstat (limited to 'retrace')
-rw-r--r--retrace/glstate_images.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/retrace/glstate_images.cpp b/retrace/glstate_images.cpp
index 319065c5..55daabd7 100644
--- a/retrace/glstate_images.cpp
+++ b/retrace/glstate_images.cpp
@@ -1377,6 +1377,14 @@ dumpFramebufferAttachment(JSONWriter &json, Context &context, GLenum target, GLe
static void
dumpFramebufferAttachments(JSONWriter &json, Context &context, GLenum target)
{
+ GLenum status = glCheckFramebufferStatus(target);
+ if (status != GL_FRAMEBUFFER_COMPLETE) {
+ std::cerr
+ << "warning: incomplete " << enumToString(target)
+ << " (" << enumToString(status) << ")\n";
+ return;
+ }
+
GLint read_framebuffer = 0;
glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING, &read_framebuffer);