diff options
author | José Fonseca <jose.r.fonseca@gmail.com> | 2011-04-15 09:24:38 +0100 |
---|---|---|
committer | José Fonseca <jose.r.fonseca@gmail.com> | 2011-04-15 09:45:51 +0100 |
commit | 4ea3f91ea629856373bd0a9a2b1efb2f6757e326 (patch) | |
tree | 2a63e2854a50c8d0b109e2fc1fc808781f24a167 /glstate.py | |
parent | cefdd197f2f20d8afdbcac6e93680ac9aa8c0351 (diff) |
Dump vertex attribs in a more GL-like manner.
Diffstat (limited to 'glstate.py')
-rw-r--r-- | glstate.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -2958,6 +2958,7 @@ glGet = StateGetter('glGet', { glGetVertexAttrib = StateGetter('glGetVertexAttrib', {I: 'iv', F: 'fv', D: 'dv', P: 'Pointerv'}) glGetTexParameter = StateGetter('glGetTexParameter', {I: 'iv', F: 'fv'}) +glGetTexLevelParameter = StateGetter('glGetTexLevelParameter', {I: 'iv', F: 'fv'}) class JsonWriter(Visitor): @@ -3336,18 +3337,18 @@ writeDrawBufferImage(JSONWriter &json, GLenum format) print def dump_vertex_attribs(self): - print ' json.beginMember("GL_VERTEX_ATTRIB");' - print ' json.beginArray();' print ' GLint max_vertex_attribs = 0;' print ' __glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &max_vertex_attribs);' print ' for (GLint index = 0; index < max_vertex_attribs; ++index) {' + print ' char name[32];' + print ' snprintf(name, sizeof name, "GL_VERTEX_ATTRIB_ARRAY%i", index);' + print ' json.beginMember(name);' print ' json.beginObject();' self.dump_atoms(glGetVertexAttrib, 'index') print ' json.endObject();' + print ' json.endMember(); // GL_VERTEX_ATTRIB_ARRAYi' print ' }' print - print ' json.endArray();' - print ' json.endMember(); // GL_VERTEX_ATTRIB' print def dump_current_program(self): |