diff options
author | José Fonseca <jose.r.fonseca@gmail.com> | 2011-05-07 00:23:30 +0100 |
---|---|---|
committer | José Fonseca <jose.r.fonseca@gmail.com> | 2011-05-07 00:23:30 +0100 |
commit | 721dbc01b92f0f5b5e2ecb9154e1246aa75bc827 (patch) | |
tree | d0cccf3e8f4e1fae18f566ca71a382be02043bd8 /glstate.py | |
parent | 18081d51fb0a0a5b1b7cb9fa2923339fae58de7b (diff) |
Dump all cube faces.
Diffstat (limited to 'glstate.py')
-rw-r--r-- | glstate.py | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -410,11 +410,6 @@ writeTextureImage(JSONWriter &json, GLenum target, GLint level) GLubyte *pixels = new GLubyte[depth*width*height*4]; - if (target == GL_TEXTURE_CUBE_MAP) { - // TODO: dump other faces too - target = GL_TEXTURE_CUBE_MAP_POSITIVE_X; - } - glGetTexImage(target, level, GL_RGBA, GL_UNSIGNED_BYTE, pixels); json.beginMember("__data__"); @@ -638,7 +633,13 @@ writeDrawBuffers(JSONWriter &json, GLboolean writeDepth, GLboolean writeStencil) print ' break;' print ' }' print - print ' writeTextureImage(json, target, level);' + print ' if (target == GL_TEXTURE_CUBE_MAP) {' + print ' for (int face = 0; face < 6; ++face) {' + print ' writeTextureImage(json, GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, level);' + print ' }' + print ' } else {' + print ' writeTextureImage(json, target, level);' + print ' }' print print ' ++level;' print ' } while(true);' |