summaryrefslogtreecommitdiff
path: root/retrace/glstate_params.py
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2013-05-30 19:16:51 +0100
committerJosé Fonseca <jfonseca@vmware.com>2013-05-30 19:16:51 +0100
commit06e495aaa6693dd618f01d311a436b0b9831efbb (patch)
tree28103b8f53bd6efcab9ee4e4e4d3bd80751dbb9f /retrace/glstate_params.py
parent3487b700e0bedfe3031fc27e53f9351cf40a56a2 (diff)
glstate: Pick a face when dumping cube map level parameters.
glGetTexLevelParameter(GL_TEXTURE_CUBE_MAP) is invalid.
Diffstat (limited to 'retrace/glstate_params.py')
-rw-r--r--retrace/glstate_params.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/retrace/glstate_params.py b/retrace/glstate_params.py
index e1bffb36..d0e611ec 100644
--- a/retrace/glstate_params.py
+++ b/retrace/glstate_params.py
@@ -455,8 +455,13 @@ class StateDumper:
print ' json.beginObject();'
self.dump_atoms(glGetTexParameter, target)
print ' if (!context.ES) {'
+ if target.startswith('GL_TEXTURE_CUBE_MAP'):
+ # Must pick a face
+ levelTarget = 'GL_TEXTURE_CUBE_MAP_POSITIVE_X'
+ else:
+ levelTarget = target
# We only dump the first level parameters
- self.dump_atoms(glGetTexLevelParameter, target, "0")
+ self.dump_atoms(glGetTexLevelParameter, levelTarget, "0")
print ' }'
print ' json.endObject();'
print ' json.endMember(); // %s' % target