From b0a4a363e547f70063833b7975a97e09cf9e5f20 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Tue, 7 Jun 2011 15:50:49 +0100 Subject: Dump framebuffer images with their true size. --- glstate.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'glstate.py') diff --git a/glstate.py b/glstate.py index c09e4fc9..fb3e090b 100644 --- a/glstate.py +++ b/glstate.py @@ -259,6 +259,13 @@ class StateDumper: print '}' print + print 'static void' + print 'dumpFramebufferAttachementParameters(JSONWriter &json, GLenum target, GLenum attachment)' + print '{' + self.dump_attachment_parameters('target', 'attachment') + print '}' + print + print 'void' print 'dumpEnum(JSONWriter &json, GLenum pname)' print '{' @@ -410,11 +417,10 @@ class StateDumper: print ' json.beginObject();' print ' for (GLint i = 0; i < max_color_attachments; ++i) {' print ' GLint color_attachment = GL_COLOR_ATTACHMENT0 + i;' - self.dump_attachment_parameters(target, 'color_attachment') + print ' dumpFramebufferAttachementParameters(json, %s, color_attachment);' % target print ' }' - self.dump_attachment_parameters(target, 'GL_DEPTH_ATTACHMENT') - self.dump_attachment_parameters(target, 'GL_STENCIL_ATTACHMENT') - #self.dump_attachment_parameters(target, 'GL_DEPTH_STENCIL_ATTACHMENT') + print ' dumpFramebufferAttachementParameters(json, %s, GL_DEPTH_ATTACHMENT);' % target + print ' dumpFramebufferAttachementParameters(json, %s, GL_STENCIL_ATTACHMENT);' % target print ' json.endObject();' print ' json.endMember(); // %s' % target print ' }' -- cgit v1.2.3