summaryrefslogtreecommitdiff
path: root/glstate.py
diff options
context:
space:
mode:
authorJosé Fonseca <jose.r.fonseca@gmail.com>2011-04-15 09:24:38 +0100
committerJosé Fonseca <jose.r.fonseca@gmail.com>2011-04-15 09:45:51 +0100
commit4ea3f91ea629856373bd0a9a2b1efb2f6757e326 (patch)
tree2a63e2854a50c8d0b109e2fc1fc808781f24a167 /glstate.py
parentcefdd197f2f20d8afdbcac6e93680ac9aa8c0351 (diff)
Dump vertex attribs in a more GL-like manner.
Diffstat (limited to 'glstate.py')
-rw-r--r--glstate.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/glstate.py b/glstate.py
index b54634e..db227ff 100644
--- a/glstate.py
+++ b/glstate.py
@@ -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):