From 3b1c2546b9f7739c6f672a02c8bd1dc93a3e2976 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Tue, 26 Aug 2014 22:29:19 +0100 Subject: glretrace: Skip incomplete framebuffers when dumping state. Issue #284. --- retrace/glstate_images.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'retrace') 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); -- cgit v1.2.3