diff options
author | José Fonseca <jose.r.fonseca@gmail.com> | 2011-06-07 15:50:49 +0100 |
---|---|---|
committer | José Fonseca <jose.r.fonseca@gmail.com> | 2011-06-07 15:50:49 +0100 |
commit | b0a4a363e547f70063833b7975a97e09cf9e5f20 (patch) | |
tree | a7919258abb9c36f39ff746d4e5a8f293b5229a1 /glstate.py | |
parent | e8fec0f0799ea8f5c223578ba181675bb903bf38 (diff) |
Dump framebuffer images with their true size.
Diffstat (limited to 'glstate.py')
-rw-r--r-- | glstate.py | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -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 ' }' |