]> git.cworth.org Git - apitrace/blobdiff - glstate.py
Cleanup Literal class.
[apitrace] / glstate.py
index c348d2b99b69dd2273ca30067f6a5c1fe237f7c6..79cf2de12dc0bab07a7466833e00ff507f4ed008 100644 (file)
 '''Generate code to dump most GL state into JSON.'''
 
 
-from stdapi import *
+from specs.stdapi import *
 
-from gltypes import *
-from glparams import *
+from specs.gltypes import *
+from specs.glparams import *
 
 
 texture_targets = [
@@ -189,9 +189,9 @@ class JsonWriter(Visitor):
     It expects a previously declared JSONWriter instance named "json".'''
 
     def visit_literal(self, literal, instance):
-        if literal.format == 'Bool':
+        if literal.kind == 'Bool':
             print '    json.writeBool(%s);' % instance
-        elif literal.format in ('SInt', 'Uint', 'Float', 'Double'):
+        elif literal.kind in ('SInt', 'Uint', 'Float', 'Double'):
             print '    json.writeNumber(%s);' % instance
         else:
             raise NotImplementedError