diff options
author | José Fonseca <jfonseca@vmware.com> | 2014-08-26 22:29:19 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2014-08-26 22:29:19 +0100 |
commit | 3b1c2546b9f7739c6f672a02c8bd1dc93a3e2976 (patch) | |
tree | c60d10eee0c05c7a0b0d9b7c419d5fa471d19b55 /retrace | |
parent | 480ffb5c335c1db05c4d453eda833c8ee0f8086b (diff) |
glretrace: Skip incomplete framebuffers when dumping state.
Issue #284.
Diffstat (limited to 'retrace')
-rw-r--r-- | retrace/glstate_images.cpp | 8 |
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); |