Drop pragmas.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Sat, 24 Nov 2012 09:31:11 +0000 (09:31 +0000)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sat, 24 Nov 2012 09:32:14 +0000 (09:32 +0000)
17 files changed:
app_driver.py
apps/gl/default.ref.0.json [new file with mode: 0644]
apps/gl/default.ref.json [deleted file]
apps/gl/default.ref.txt
apps/gl/default_db.ref.0.json [new file with mode: 0644]
apps/gl/default_db.ref.json [deleted file]
apps/gl/default_db.ref.txt
apps/gl/default_sb.ref.0.json [new file with mode: 0644]
apps/gl/default_sb.ref.json [deleted file]
apps/gl/default_sb.ref.txt
apps/gl/tri.ref.flush.json [new file with mode: 0644]
apps/gl/tri.ref.flush.png [new file with mode: 0644]
apps/gl/tri.ref.json [deleted file]
apps/gl/tri.ref.png [deleted file]
apps/gl/tri.ref.txt
base_driver.py
tracematch.py

index e5536b83729ffc4bbc8e84478295def6146e48ca..3589fd009f8548d1b2b0698396dee038b7840bc8 100755 (executable)
@@ -46,42 +46,6 @@ import tracematch
 from base_driver import *
 
 
-class RefTraceParser(tracematch.RefTraceParser):
-
-    def __init__(self, fileName):
-        tracematch.RefTraceParser.__init__(self, open(fileName, 'rt'))
-        self.fileName = fileName
-        self.images = []
-        self.states = []
-        self.pragmaNo = 0
-
-    def handlePragma(self, line):
-        if self.calls:
-            lastCall = self.calls[-1]
-            if lastCall.callNo is None:
-                paramName = 'pragma%u' % self.pragmaNo
-                lastCall.callNo = tracematch.WildcardMatcher(paramName)
-            else:
-                paramName = lastCall.callNo.name
-        else:
-            paramName = 0
-            self.pragmaNo += 1
-
-        pragma, rest = line.split(None, 1)
-        if pragma == '#image':
-            imageFileName = self.getAbsPath(rest)
-            self.images.append((paramName, imageFileName))
-        elif pragma == '#state':
-            stateFileName = self.getAbsPath(rest)
-            self.states.append((paramName, stateFileName))
-        else:
-            assert False
-
-    def getAbsPath(self, path):
-        '''Get the absolute from a path relative to the reference filename'''
-        return os.path.abspath(os.path.join(os.path.dirname(self.fileName), path))
-
-
 class SrcTraceParser(tracematch.SrcTraceParser):
 
     def __init__(self, stream):
@@ -96,44 +60,6 @@ class SrcTraceParser(tracematch.SrcTraceParser):
             self.swapbuffers += 1
 
 
-class TraceChecker:
-
-    def __init__(self, srcStream, refFileName):
-        self.srcStream = srcStream
-        self.refFileName = refFileName
-        self.doubleBuffer = False
-        self.callNo = 0
-        self.images = []
-        self.states = []
-
-    def check(self):
-        srcParser = SrcTraceParser(self.srcStream)
-        srcTrace = srcParser.parse()
-        self.doubleBuffer = srcParser.swapbuffers > 0
-
-        if self.refFileName:
-            refParser = RefTraceParser(self.refFileName)
-            refTrace = refParser.parse()
-
-            try:
-                mo = refTrace.match(srcTrace)
-            except tracematch.TraceMismatch, ex:
-                self.fail(str(ex))
-
-            for paramName, imageFileName in refParser.images:
-                if isinstance(paramName, int):
-                    callNo = paramName
-                else:
-                    callNo = mo.params[paramName]
-                self.images.append((callNo, imageFileName))
-            for paramName, stateFileName in refParser.states:
-                if isinstance(paramName, int):
-                    callNo = paramName
-                else:
-                    callNo = mo.params[paramName]
-                self.states.append((callNo, stateFileName))
-
-
 class AppDriver(Driver):
 
     cmd = None
@@ -162,11 +88,16 @@ class AppDriver(Driver):
         if not self.cmd:
             return
 
+        sys.stderr.write('Run application...\n')
+
         p = popen(self.cmd, cwd=self.cwd)
         p.wait()
         if p.returncode != 0:
             skip('application returned code %i' % p.returncode)
 
+        sys.stdout.flush()
+        sys.stderr.write('\n')
+
     api_trace_map = {
         'gl': 'gl',
         'egl_gl': 'egl',
@@ -198,6 +129,8 @@ class AppDriver(Driver):
         if not self.cmd:
             return
 
+        sys.stderr.write('Capturing trace...\n')
+
         if self.trace_file is None:
             if self.ref_dump is not None:
                 name = self.ref_dump
@@ -233,31 +166,74 @@ class AppDriver(Driver):
 
         if not os.path.exists(self.trace_file):
             fail('no trace file generated\n')
+
+        sys.stdout.flush()
+        sys.stderr.write('\n')
     
     def checkTrace(self):
+        sys.stderr.write('Comparing trace %s against %s...\n' % (self.trace_file, self.ref_dump))
+
         cmd = [options.apitrace, 'dump', '--color=never', self.trace_file]
         p = popen(cmd, stdout=subprocess.PIPE)
 
-        checker = TraceChecker(p.stdout, self.ref_dump)
-        checker.check()
+        srcParser = SrcTraceParser(p.stdout)
+        srcTrace = srcParser.parse()
+        self.doubleBuffer = srcParser.swapbuffers > 0
+
+        images = []
+        states = []
+
+        if self.ref_dump:
+            refParser = tracematch.RefTraceParser(self.ref_dump)
+            refTrace = refParser.parse()
+
+            try:
+                mo = refTrace.match(srcTrace)
+            except tracematch.TraceMismatch, ex:
+                fail(str(ex))
+
+            dirName, baseName = os.path.split(os.path.abspath(self.ref_dump))
+            prefix, _ = os.path.splitext(baseName)
+            prefix += '.'
+            fileNames = os.listdir(dirName)
+            for fileName in fileNames:
+                if fileName.startswith(prefix) and fileName != self.ref_dump:
+                    rest = fileName[len(prefix):]
+                    paramName, ext = os.path.splitext(rest)
+                    if ext in ('.json', '.png'):
+                        if paramName.isdigit():
+                            callNo = int(paramName)
+                        else:
+                            try:
+                                callNo = mo.params[paramName]
+                            except KeyError:
+                                fail('could not find parameter %s for %s' % (paramName, fileName))
+                        filePath = os.path.join(dirName, fileName)
+                        if ext == '.png':
+                            images.append((callNo, filePath))
+                        if ext == '.json':
+                            states.append((callNo, filePath))
         p.wait()
         if p.returncode != 0:
             fail('`apitrace dump` returned code %i' % p.returncode)
 
-        self.doubleBuffer = checker.doubleBuffer
+        sys.stdout.flush()
+        sys.stderr.write('\n')
 
         if self.api not in self.api_retrace_map:
             return
 
-        for callNo, refImageFileName in checker.images:
+        for callNo, refImageFileName in images:
             self.checkImage(callNo, refImageFileName)
-        for callNo, refStateFileName in checker.states:
+        for callNo, refStateFileName in states:
             self.checkState(callNo, refStateFileName)
 
     def checkImage(self, callNo, refImageFileName):
+        sys.stderr.write('Comparing snapshot from call %u against %s...\n' % (callNo, refImageFileName))
         try:
             from PIL import Image
         except ImportError:
+            sys.stderr.write('warning: PIL not found, skipping image comparison\n');
             return
 
         srcImage = self.getImage(callNo)
@@ -275,7 +251,12 @@ class AppDriver(Driver):
             comparer.write_diff(diffImageFileName)
             fail('snapshot from call %u does not match %s' % (callNo, refImageFileName))
 
+        sys.stdout.flush()
+        sys.stderr.write('\n')
+
     def checkState(self, callNo, refStateFileName):
+        sys.stderr.write('Comparing state dump from call %u against %s...\n' % (callNo, refStateFileName))
+
         srcState = self.getState(callNo)
         refState = self.getRefState(refStateFileName)
 
@@ -293,6 +274,9 @@ class AppDriver(Driver):
             differ.visit(refState, srcState)
             fail('state from call %u does not match %s' % (callNo, refStateFileName))
 
+        sys.stdout.flush()
+        sys.stderr.write('\n')
+
     def getRefState(self, refStateFileName):
         stream = open(refStateFileName, 'rt')
         from jsondiff import load
@@ -318,11 +302,16 @@ class AppDriver(Driver):
         if self.api not in self.api_retrace_map:
             return
 
+        sys.stderr.write('Retracing %s...\n' % (self.trace_file,))
+
         p = self._retrace()
         p.wait()
         if p.returncode != 0:
             fail('retrace failed with code %i' % (p.returncode))
 
+        sys.stdout.flush()
+        sys.stderr.write('\n')
+
     def getImage(self, callNo):
         from PIL import Image
         state = self.getState(callNo)
diff --git a/apps/gl/default.ref.0.json b/apps/gl/default.ref.0.json
new file mode 100644 (file)
index 0000000..497e201
--- /dev/null
@@ -0,0 +1,848 @@
+{
+  "parameters": {
+    "GL_CURRENT_COLOR": [1, 1, 1, 1],
+    "GL_CURRENT_INDEX": 1,
+    "GL_CURRENT_NORMAL": [0, 0, 1],
+    "GL_CURRENT_TEXTURE_COORDS": [0, 0, 0, 1],
+    "GL_CURRENT_RASTER_COLOR": [1, 1, 1, 1],
+    "GL_CURRENT_RASTER_INDEX": 1,
+    "GL_CURRENT_RASTER_TEXTURE_COORDS": [0, 0, 0, 1],
+    "GL_CURRENT_RASTER_POSITION": [0, 0, 0, 1],
+    "GL_CURRENT_RASTER_POSITION_VALID": 1,
+    "GL_CURRENT_RASTER_DISTANCE": 0,
+    "GL_POINT_SMOOTH": "GL_FALSE",
+    "GL_POINT_SIZE": 1,
+    "GL_LINE_SMOOTH": "GL_FALSE",
+    "GL_LINE_WIDTH": 1,
+    "GL_LINE_STIPPLE": "GL_FALSE",
+    "GL_LINE_STIPPLE_PATTERN": 65535,
+    "GL_LINE_STIPPLE_REPEAT": 1,
+    "GL_LIST_MODE": "GL_ZERO",
+    "GL_LIST_BASE": 0,
+    "GL_LIST_INDEX": 0,
+    "GL_POLYGON_MODE": ["GL_FILL", "GL_FILL"],
+    "GL_POLYGON_SMOOTH": "GL_FALSE",
+    "GL_POLYGON_STIPPLE": "GL_FALSE",
+    "GL_EDGE_FLAG": "GL_TRUE",
+    "GL_CULL_FACE": "GL_FALSE",
+    "GL_CULL_FACE_MODE": "GL_BACK",
+    "GL_FRONT_FACE": "GL_CCW",
+    "GL_LIGHTING": "GL_FALSE",
+    "GL_LIGHT_MODEL_LOCAL_VIEWER": "GL_FALSE",
+    "GL_LIGHT_MODEL_TWO_SIDE": "GL_FALSE",
+    "GL_LIGHT_MODEL_AMBIENT": [0.2, 0.2, 0.2, 1],
+    "GL_SHADE_MODEL": "GL_SMOOTH",
+    "GL_COLOR_MATERIAL_FACE": "GL_FRONT_AND_BACK",
+    "GL_COLOR_MATERIAL_PARAMETER": "GL_AMBIENT_AND_DIFFUSE",
+    "GL_COLOR_MATERIAL": "GL_FALSE",
+    "GL_FOG": "GL_FALSE",
+    "GL_FOG_INDEX": 0,
+    "GL_FOG_DENSITY": 1,
+    "GL_FOG_START": 0,
+    "GL_FOG_END": 1,
+    "GL_FOG_MODE": "GL_EXP",
+    "GL_FOG_COLOR": [0, 0, 0, 0],
+    "GL_DEPTH_RANGE": [0, 1],
+    "GL_DEPTH_TEST": "GL_FALSE",
+    "GL_DEPTH_WRITEMASK": "GL_TRUE",
+    "GL_DEPTH_CLEAR_VALUE": 1,
+    "GL_DEPTH_FUNC": "GL_LESS",
+    "GL_ACCUM_CLEAR_VALUE": [0, 0, 0, 0],
+    "GL_STENCIL_TEST": "GL_FALSE",
+    "GL_STENCIL_CLEAR_VALUE": 0,
+    "GL_STENCIL_FUNC": "GL_ALWAYS",
+    "GL_STENCIL_VALUE_MASK": -1,
+    "GL_STENCIL_FAIL": "GL_KEEP",
+    "GL_STENCIL_PASS_DEPTH_FAIL": "GL_KEEP",
+    "GL_STENCIL_PASS_DEPTH_PASS": "GL_KEEP",
+    "GL_STENCIL_REF": 0,
+    "GL_STENCIL_WRITEMASK": -1,
+    "GL_MATRIX_MODE": "GL_MODELVIEW",
+    "GL_NORMALIZE": "GL_FALSE",
+    // GL_VIEWPORT depends on the drawable
+    "GL_MODELVIEW_STACK_DEPTH": 1,
+    "GL_PROJECTION_STACK_DEPTH": 1,
+    "GL_TEXTURE_STACK_DEPTH": 1,
+    "GL_MODELVIEW_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
+    "GL_PROJECTION_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
+    "GL_TEXTURE_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
+    "GL_ATTRIB_STACK_DEPTH": 0,
+    "GL_CLIENT_ATTRIB_STACK_DEPTH": 0,
+    "GL_ALPHA_TEST": "GL_FALSE",
+    "GL_ALPHA_TEST_FUNC": "GL_ALWAYS",
+    "GL_ALPHA_TEST_REF": 0,
+    "GL_DITHER": "GL_TRUE",
+    "GL_BLEND_DST": "GL_ZERO",
+    "GL_BLEND_SRC": "GL_ONE",
+    "GL_BLEND": "GL_FALSE",
+    "GL_LOGIC_OP_MODE": "GL_COPY",
+    "GL_INDEX_LOGIC_OP": "GL_FALSE",
+    "GL_COLOR_LOGIC_OP": "GL_FALSE",
+    // Some implementations return more GL_AUX_BUFFERS than requested
+    // GL_DRAW_BUFFER and GL_READ_BUFFER vary with visual
+    // GL_SCISSOR_BOX depends on the drawable
+    "GL_SCISSOR_TEST": "GL_FALSE",
+    "GL_INDEX_CLEAR_VALUE": 0,
+    "GL_INDEX_WRITEMASK": -1,
+    "GL_COLOR_CLEAR_VALUE": [0, 0, 0, 0],
+    "GL_COLOR_WRITEMASK": ["GL_TRUE", "GL_TRUE", "GL_TRUE", "GL_TRUE"],
+    "GL_INDEX_MODE": "GL_FALSE",
+    "GL_RGBA_MODE": "GL_TRUE",
+    // GL_DOUBLEBUFFER varies with visual
+    "GL_STEREO": "GL_FALSE",
+    "GL_RENDER_MODE": "GL_RENDER",
+    "GL_PERSPECTIVE_CORRECTION_HINT": "GL_DONT_CARE",
+    "GL_POINT_SMOOTH_HINT": "GL_DONT_CARE",
+    "GL_LINE_SMOOTH_HINT": "GL_DONT_CARE",
+    "GL_POLYGON_SMOOTH_HINT": "GL_DONT_CARE",
+    "GL_FOG_HINT": "GL_DONT_CARE",
+    "GL_TEXTURE_GEN_S": "GL_FALSE",
+    "GL_TEXTURE_GEN_T": "GL_FALSE",
+    "GL_TEXTURE_GEN_R": "GL_FALSE",
+    "GL_TEXTURE_GEN_Q": "GL_FALSE",
+    "GL_PIXEL_MAP_I_TO_I_SIZE": 1,
+    "GL_PIXEL_MAP_S_TO_S_SIZE": 1,
+    "GL_PIXEL_MAP_I_TO_R_SIZE": 1,
+    "GL_PIXEL_MAP_I_TO_G_SIZE": 1,
+    "GL_PIXEL_MAP_I_TO_B_SIZE": 1,
+    "GL_PIXEL_MAP_I_TO_A_SIZE": 1,
+    "GL_PIXEL_MAP_R_TO_R_SIZE": 1,
+    "GL_PIXEL_MAP_G_TO_G_SIZE": 1,
+    "GL_PIXEL_MAP_B_TO_B_SIZE": 1,
+    "GL_PIXEL_MAP_A_TO_A_SIZE": 1,
+    "GL_UNPACK_SWAP_BYTES": "GL_FALSE",
+    "GL_UNPACK_LSB_FIRST": "GL_FALSE",
+    "GL_UNPACK_ROW_LENGTH": 0,
+    "GL_UNPACK_SKIP_ROWS": 0,
+    "GL_UNPACK_SKIP_PIXELS": 0,
+    "GL_UNPACK_ALIGNMENT": 4,
+    "GL_PACK_SWAP_BYTES": "GL_FALSE",
+    "GL_PACK_LSB_FIRST": "GL_FALSE",
+    "GL_PACK_ROW_LENGTH": 0,
+    "GL_PACK_SKIP_ROWS": 0,
+    "GL_PACK_SKIP_PIXELS": 0,
+    "GL_PACK_ALIGNMENT": 4,
+    "GL_MAP_COLOR": "GL_FALSE",
+    "GL_MAP_STENCIL": "GL_FALSE",
+    "GL_INDEX_SHIFT": 0,
+    "GL_INDEX_OFFSET": 0,
+    "GL_RED_SCALE": 1,
+    "GL_RED_BIAS": 0,
+    "GL_ZOOM_X": 1,
+    "GL_ZOOM_Y": 1,
+    "GL_GREEN_SCALE": 1,
+    "GL_GREEN_BIAS": 0,
+    "GL_BLUE_SCALE": 1,
+    "GL_BLUE_BIAS": 0,
+    "GL_ALPHA_SCALE": 1,
+    "GL_ALPHA_BIAS": 0,
+    "GL_DEPTH_SCALE": 1,
+    "GL_DEPTH_BIAS": 0,
+    "GL_INDEX_BITS": 0,
+    // GL_xxx_BITS state can often vary
+    "GL_NAME_STACK_DEPTH": 0,
+    "GL_AUTO_NORMAL": "GL_FALSE",
+    "GL_MAP1_COLOR_4": "GL_FALSE",
+    "GL_MAP1_INDEX": "GL_FALSE",
+    "GL_MAP1_NORMAL": "GL_FALSE",
+    "GL_MAP1_TEXTURE_COORD_1": "GL_FALSE",
+    "GL_MAP1_TEXTURE_COORD_2": "GL_FALSE",
+    "GL_MAP1_TEXTURE_COORD_3": "GL_FALSE",
+    "GL_MAP1_TEXTURE_COORD_4": "GL_FALSE",
+    "GL_MAP1_VERTEX_3": "GL_FALSE",
+    "GL_MAP1_VERTEX_4": "GL_FALSE",
+    "GL_MAP2_COLOR_4": "GL_FALSE",
+    "GL_MAP2_INDEX": "GL_FALSE",
+    "GL_MAP2_NORMAL": "GL_FALSE",
+    "GL_MAP2_TEXTURE_COORD_1": "GL_FALSE",
+    "GL_MAP2_TEXTURE_COORD_2": "GL_FALSE",
+    "GL_MAP2_TEXTURE_COORD_3": "GL_FALSE",
+    "GL_MAP2_TEXTURE_COORD_4": "GL_FALSE",
+    "GL_MAP2_VERTEX_3": "GL_FALSE",
+    "GL_MAP2_VERTEX_4": "GL_FALSE",
+    "GL_MAP1_GRID_DOMAIN": [0, 1],
+    "GL_MAP1_GRID_SEGMENTS": 1,
+    "GL_MAP2_GRID_DOMAIN": [0, 1, 0, 1],
+    "GL_MAP2_GRID_SEGMENTS": [1, 1],
+    "GL_FEEDBACK_BUFFER_POINTER": 0,
+    "GL_FEEDBACK_BUFFER_SIZE": 0,
+    "GL_FEEDBACK_BUFFER_TYPE": "GL_2D",
+    "GL_SELECTION_BUFFER_POINTER": 0,
+    "GL_SELECTION_BUFFER_SIZE": 0,
+    "GL_POLYGON_OFFSET_UNITS": 0,
+    "GL_POLYGON_OFFSET_POINT": "GL_FALSE",
+    "GL_POLYGON_OFFSET_LINE": "GL_FALSE",
+    "GL_CLIP_DISTANCE0": "GL_FALSE",
+    "GL_CLIP_DISTANCE1": "GL_FALSE",
+    "GL_CLIP_DISTANCE2": "GL_FALSE",
+    "GL_CLIP_DISTANCE3": "GL_FALSE",
+    "GL_CLIP_DISTANCE4": "GL_FALSE",
+    "GL_CLIP_DISTANCE5": "GL_FALSE",
+    "GL_BLEND_COLOR": [0, 0, 0, 0],
+    "GL_BLEND_EQUATION": "GL_FUNC_ADD",
+    "GL_POLYGON_OFFSET_FILL": "GL_FALSE",
+    "GL_POLYGON_OFFSET_FACTOR": 0,
+    "GL_RESCALE_NORMAL": "GL_FALSE",
+    "GL_PACK_SKIP_IMAGES": 0,
+    "GL_PACK_IMAGE_HEIGHT": 0,
+    "GL_UNPACK_SKIP_IMAGES": 0,
+    "GL_UNPACK_IMAGE_HEIGHT": 0,
+    "GL_TEXTURE_3D": "GL_FALSE",
+    "GL_VERTEX_ARRAY": "GL_FALSE",
+    "GL_NORMAL_ARRAY": "GL_FALSE",
+    "GL_COLOR_ARRAY": "GL_FALSE",
+    "GL_INDEX_ARRAY": "GL_FALSE",
+    "GL_TEXTURE_COORD_ARRAY": "GL_FALSE",
+    "GL_EDGE_FLAG_ARRAY": "GL_FALSE",
+    "GL_VERTEX_ARRAY_SIZE": 4,
+    "GL_VERTEX_ARRAY_TYPE": "GL_FLOAT",
+    "GL_VERTEX_ARRAY_STRIDE": 0,
+    "GL_NORMAL_ARRAY_TYPE": "GL_FLOAT",
+    "GL_NORMAL_ARRAY_STRIDE": 0,
+    "GL_COLOR_ARRAY_SIZE": 4,
+    "GL_COLOR_ARRAY_TYPE": "GL_FLOAT",
+    "GL_COLOR_ARRAY_STRIDE": 0,
+    "GL_INDEX_ARRAY_TYPE": "GL_FLOAT",
+    "GL_INDEX_ARRAY_STRIDE": 0,
+    "GL_TEXTURE_COORD_ARRAY_SIZE": 4,
+    "GL_TEXTURE_COORD_ARRAY_TYPE": "GL_FLOAT",
+    "GL_TEXTURE_COORD_ARRAY_STRIDE": 0,
+    "GL_EDGE_FLAG_ARRAY_STRIDE": 0,
+    "GL_VERTEX_ARRAY_POINTER": 0,
+    "GL_NORMAL_ARRAY_POINTER": 0,
+    "GL_COLOR_ARRAY_POINTER": 0,
+    "GL_INDEX_ARRAY_POINTER": 0,
+    "GL_TEXTURE_COORD_ARRAY_POINTER": 0,
+    "GL_EDGE_FLAG_ARRAY_POINTER": 0,
+    "GL_MULTISAMPLE": 1,
+    "GL_SAMPLE_ALPHA_TO_COVERAGE": 0,
+    "GL_SAMPLE_ALPHA_TO_ONE": 0,
+    "GL_SAMPLE_COVERAGE": 0,
+    "GL_SAMPLE_BUFFERS": 0,
+    "GL_SAMPLES": 0,
+    "GL_SAMPLE_COVERAGE_VALUE": 1,
+    "GL_SAMPLE_COVERAGE_INVERT": 0,
+    "GL_BLEND_DST_RGB": "GL_ZERO",
+    "GL_BLEND_SRC_RGB": "GL_ONE",
+    "GL_BLEND_DST_ALPHA": "GL_ZERO",
+    "GL_BLEND_SRC_ALPHA": "GL_ONE",
+    "GL_POINT_FADE_THRESHOLD_SIZE": 1,
+    "GL_POINT_DISTANCE_ATTENUATION": [1, 0, 0],
+    "GL_GENERATE_MIPMAP_HINT": "GL_DONT_CARE",
+    "GL_LIGHT_MODEL_COLOR_CONTROL": "GL_SINGLE_COLOR",
+    "GL_FOG_COORD_SRC": "GL_FRAGMENT_DEPTH",
+    "GL_CURRENT_FOG_COORD": 0,
+    "GL_FOG_COORD_ARRAY_TYPE": "GL_FLOAT",
+    "GL_FOG_COORD_ARRAY_STRIDE": 0,
+    "GL_FOG_COORD_ARRAY": "GL_FALSE",
+    "GL_COLOR_SUM": "GL_FALSE",
+    "GL_CURRENT_SECONDARY_COLOR": [0, 0, 0, 1],
+    "GL_SECONDARY_COLOR_ARRAY_SIZE": 3,
+    "GL_SECONDARY_COLOR_ARRAY_TYPE": "GL_FLOAT",
+    "GL_SECONDARY_COLOR_ARRAY_STRIDE": 0,
+    "GL_SECONDARY_COLOR_ARRAY": "GL_FALSE",
+    "GL_ACTIVE_TEXTURE": "GL_TEXTURE0",
+    "GL_CLIENT_ACTIVE_TEXTURE": "GL_TEXTURE0",
+    "GL_TRANSPOSE_MODELVIEW_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
+    "GL_TRANSPOSE_PROJECTION_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
+    "GL_TRANSPOSE_TEXTURE_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
+    "GL_TEXTURE_COMPRESSION_HINT": "GL_DONT_CARE",
+    "GL_VERTEX_ARRAY_BINDING": 0,
+    "GL_PROGRAM_POINT_SIZE": "GL_FALSE",
+    "GL_VERTEX_PROGRAM_TWO_SIDE": "GL_FALSE",
+    "GL_STENCIL_BACK_FUNC": "GL_ALWAYS",
+    "GL_STENCIL_BACK_FAIL": "GL_KEEP",
+    "GL_STENCIL_BACK_PASS_DEPTH_FAIL": "GL_KEEP",
+    "GL_STENCIL_BACK_PASS_DEPTH_PASS": "GL_KEEP",
+    // GL_DRAW_BUFFER0 varies with visual
+    "GL_DRAW_BUFFER1": "GL_ZERO",
+    "GL_DRAW_BUFFER2": "GL_ZERO",
+    "GL_DRAW_BUFFER3": "GL_ZERO",
+    "GL_DRAW_BUFFER4": "GL_ZERO",
+    "GL_DRAW_BUFFER5": "GL_ZERO",
+    "GL_DRAW_BUFFER6": "GL_ZERO",
+    "GL_DRAW_BUFFER7": "GL_ZERO",
+    "GL_BLEND_EQUATION_ALPHA": "GL_FUNC_ADD",
+    "GL_ARRAY_BUFFER_BINDING": 0,
+    "GL_ELEMENT_ARRAY_BUFFER_BINDING": 0,
+    "GL_VERTEX_ARRAY_BUFFER_BINDING": 0,
+    "GL_NORMAL_ARRAY_BUFFER_BINDING": 0,
+    "GL_COLOR_ARRAY_BUFFER_BINDING": 0,
+    "GL_INDEX_ARRAY_BUFFER_BINDING": 0,
+    "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING": 0,
+    "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING": 0,
+    "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING": 0,
+    "GL_FOG_COORD_ARRAY_BUFFER_BINDING": 0,
+    "GL_PIXEL_PACK_BUFFER_BINDING": 0,
+    "GL_PIXEL_UNPACK_BUFFER_BINDING": 0,
+    "GL_CURRENT_PROGRAM": 0,
+    "GL_POINT_SPRITE_COORD_ORIGIN": "GL_UPPER_LEFT",
+    "GL_DRAW_FRAMEBUFFER_BINDING": 0,
+    "GL_RENDERBUFFER_BINDING": 0,
+    "GL_READ_FRAMEBUFFER_BINDING": 0,
+    "GL_FRONT": {
+      "GL_AMBIENT": [0.2, 0.2, 0.2, 1],
+      "GL_DIFFUSE": [0.8, 0.8, 0.8, 1],
+      "GL_SPECULAR": [0, 0, 0, 1],
+      "GL_EMISSION": [0, 0, 0, 1],
+      "GL_SHININESS": 0,
+      "GL_COLOR_INDEXES": [0, 1, 1]
+    },
+    "GL_BACK": {
+      "GL_AMBIENT": [0.2, 0.2, 0.2, 1],
+      "GL_DIFFUSE": [0.8, 0.8, 0.8, 1],
+      "GL_SPECULAR": [0, 0, 0, 1],
+      "GL_EMISSION": [0, 0, 0, 1],
+      "GL_SHININESS": 0,
+      "GL_COLOR_INDEXES": [0, 1, 1]
+    },
+    "GL_VERTEX_ATTRIB_ARRAY0": {
+      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
+      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
+      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
+    },
+    "GL_VERTEX_ATTRIB_ARRAY1": {
+      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
+      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
+      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
+    },
+    "GL_VERTEX_ATTRIB_ARRAY2": {
+      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
+      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
+      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
+    },
+    "GL_VERTEX_ATTRIB_ARRAY3": {
+      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
+      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
+      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
+    },
+    "GL_VERTEX_ATTRIB_ARRAY4": {
+      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
+      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
+      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
+    },
+    "GL_VERTEX_ATTRIB_ARRAY5": {
+      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
+      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
+      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
+    },
+    "GL_VERTEX_ATTRIB_ARRAY6": {
+      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
+      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
+      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
+    },
+    "GL_VERTEX_ATTRIB_ARRAY7": {
+      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
+      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
+      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
+    },
+    "GL_VERTEX_ATTRIB_ARRAY8": {
+      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
+      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
+      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
+    },
+    "GL_VERTEX_ATTRIB_ARRAY9": {
+      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
+      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
+      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
+    },
+    "GL_VERTEX_ATTRIB_ARRAY10": {
+      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
+      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
+      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
+    },
+    "GL_VERTEX_ATTRIB_ARRAY11": {
+      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
+      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
+      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
+    },
+    "GL_VERTEX_ATTRIB_ARRAY12": {
+      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
+      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
+      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
+    },
+    "GL_VERTEX_ATTRIB_ARRAY13": {
+      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
+      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
+      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
+    },
+    "GL_VERTEX_ATTRIB_ARRAY14": {
+      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
+      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
+      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
+    },
+    "GL_VERTEX_ATTRIB_ARRAY15": {
+      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
+      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
+      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
+      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
+      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
+    },
+    "GL_TEXTURE0": {
+      "GL_TEXTURE_1D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_1D": 0,
+      "GL_TEXTURE_2D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_2D": 0,
+      "GL_TEXTURE_3D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_3D": 0,
+      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
+      "GL_TEXTURE_BINDING_RECTANGLE": 0,
+      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
+      "GL_TEXTURE_BINDING_CUBE_MAP": 0,
+      "GL_TEXTURE_ENV": {
+        "GL_ALPHA_SCALE": 1,
+        "GL_TEXTURE_ENV_MODE": "GL_MODULATE",
+        "GL_TEXTURE_ENV_COLOR": [0, 0, 0, 0],
+        "GL_COMBINE_RGB": "GL_MODULATE",
+        "GL_COMBINE_ALPHA": "GL_MODULATE",
+        "GL_RGB_SCALE": 1,
+        "GL_SRC0_RGB": "GL_TEXTURE",
+        "GL_SRC1_RGB": "GL_PREVIOUS",
+        "GL_SRC2_RGB": "GL_CONSTANT",
+        "GL_SRC0_ALPHA": "GL_TEXTURE",
+        "GL_SRC1_ALPHA": "GL_PREVIOUS",
+        "GL_SRC2_ALPHA": "GL_CONSTANT",
+        "GL_OPERAND0_RGB": "GL_SRC_COLOR",
+        "GL_OPERAND1_RGB": "GL_SRC_COLOR",
+        "GL_OPERAND2_RGB": "GL_SRC_ALPHA",
+        "GL_OPERAND0_ALPHA": "GL_SRC_ALPHA",
+        "GL_OPERAND1_ALPHA": "GL_SRC_ALPHA",
+        "GL_OPERAND2_ALPHA": "GL_SRC_ALPHA"
+      },
+      "GL_TEXTURE_FILTER_CONTROL": {
+        "GL_TEXTURE_LOD_BIAS": 0
+      },
+      "GL_POINT_SPRITE": {
+        "GL_COORD_REPLACE": "GL_FALSE"
+      }
+    },
+    "GL_TEXTURE1": {
+      "GL_TEXTURE_1D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_1D": 0,
+      "GL_TEXTURE_2D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_2D": 0,
+      "GL_TEXTURE_3D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_3D": 0,
+      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
+      "GL_TEXTURE_BINDING_RECTANGLE": 0,
+      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
+      "GL_TEXTURE_BINDING_CUBE_MAP": 0,
+      "GL_TEXTURE_ENV": {
+        "GL_ALPHA_SCALE": 1,
+        "GL_TEXTURE_ENV_MODE": "GL_MODULATE",
+        "GL_TEXTURE_ENV_COLOR": [0, 0, 0, 0],
+        "GL_COMBINE_RGB": "GL_MODULATE",
+        "GL_COMBINE_ALPHA": "GL_MODULATE",
+        "GL_RGB_SCALE": 1,
+        "GL_SRC0_RGB": "GL_TEXTURE",
+        "GL_SRC1_RGB": "GL_PREVIOUS",
+        "GL_SRC2_RGB": "GL_CONSTANT",
+        "GL_SRC0_ALPHA": "GL_TEXTURE",
+        "GL_SRC1_ALPHA": "GL_PREVIOUS",
+        "GL_SRC2_ALPHA": "GL_CONSTANT",
+        "GL_OPERAND0_RGB": "GL_SRC_COLOR",
+        "GL_OPERAND1_RGB": "GL_SRC_COLOR",
+        "GL_OPERAND2_RGB": "GL_SRC_ALPHA",
+        "GL_OPERAND0_ALPHA": "GL_SRC_ALPHA",
+        "GL_OPERAND1_ALPHA": "GL_SRC_ALPHA",
+        "GL_OPERAND2_ALPHA": "GL_SRC_ALPHA"
+      },
+      "GL_TEXTURE_FILTER_CONTROL": {
+        "GL_TEXTURE_LOD_BIAS": 0
+      },
+      "GL_POINT_SPRITE": {
+        "GL_COORD_REPLACE": "GL_FALSE"
+      }
+    },
+    "GL_TEXTURE2": {
+      "GL_TEXTURE_1D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_1D": 0,
+      "GL_TEXTURE_2D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_2D": 0,
+      "GL_TEXTURE_3D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_3D": 0,
+      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
+      "GL_TEXTURE_BINDING_RECTANGLE": 0,
+      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
+      "GL_TEXTURE_BINDING_CUBE_MAP": 0,
+      "GL_TEXTURE_ENV": {
+        "GL_ALPHA_SCALE": 1,
+        "GL_TEXTURE_ENV_MODE": "GL_MODULATE",
+        "GL_TEXTURE_ENV_COLOR": [0, 0, 0, 0],
+        "GL_COMBINE_RGB": "GL_MODULATE",
+        "GL_COMBINE_ALPHA": "GL_MODULATE",
+        "GL_RGB_SCALE": 1,
+        "GL_SRC0_RGB": "GL_TEXTURE",
+        "GL_SRC1_RGB": "GL_PREVIOUS",
+        "GL_SRC2_RGB": "GL_CONSTANT",
+        "GL_SRC0_ALPHA": "GL_TEXTURE",
+        "GL_SRC1_ALPHA": "GL_PREVIOUS",
+        "GL_SRC2_ALPHA": "GL_CONSTANT",
+        "GL_OPERAND0_RGB": "GL_SRC_COLOR",
+        "GL_OPERAND1_RGB": "GL_SRC_COLOR",
+        "GL_OPERAND2_RGB": "GL_SRC_ALPHA",
+        "GL_OPERAND0_ALPHA": "GL_SRC_ALPHA",
+        "GL_OPERAND1_ALPHA": "GL_SRC_ALPHA",
+        "GL_OPERAND2_ALPHA": "GL_SRC_ALPHA"
+      },
+      "GL_TEXTURE_FILTER_CONTROL": {
+        "GL_TEXTURE_LOD_BIAS": 0
+      },
+      "GL_POINT_SPRITE": {
+        "GL_COORD_REPLACE": "GL_FALSE"
+      }
+    },
+    "GL_TEXTURE3": {
+      "GL_TEXTURE_1D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_1D": 0,
+      "GL_TEXTURE_2D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_2D": 0,
+      "GL_TEXTURE_3D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_3D": 0,
+      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
+      "GL_TEXTURE_BINDING_RECTANGLE": 0,
+      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
+      "GL_TEXTURE_BINDING_CUBE_MAP": 0,
+      "GL_TEXTURE_ENV": {
+        "GL_ALPHA_SCALE": 1,
+        "GL_TEXTURE_ENV_MODE": "GL_MODULATE",
+        "GL_TEXTURE_ENV_COLOR": [0, 0, 0, 0],
+        "GL_COMBINE_RGB": "GL_MODULATE",
+        "GL_COMBINE_ALPHA": "GL_MODULATE",
+        "GL_RGB_SCALE": 1,
+        "GL_SRC0_RGB": "GL_TEXTURE",
+        "GL_SRC1_RGB": "GL_PREVIOUS",
+        "GL_SRC2_RGB": "GL_CONSTANT",
+        "GL_SRC0_ALPHA": "GL_TEXTURE",
+        "GL_SRC1_ALPHA": "GL_PREVIOUS",
+        "GL_SRC2_ALPHA": "GL_CONSTANT",
+        "GL_OPERAND0_RGB": "GL_SRC_COLOR",
+        "GL_OPERAND1_RGB": "GL_SRC_COLOR",
+        "GL_OPERAND2_RGB": "GL_SRC_ALPHA",
+        "GL_OPERAND0_ALPHA": "GL_SRC_ALPHA",
+        "GL_OPERAND1_ALPHA": "GL_SRC_ALPHA",
+        "GL_OPERAND2_ALPHA": "GL_SRC_ALPHA"
+      },
+      "GL_TEXTURE_FILTER_CONTROL": {
+        "GL_TEXTURE_LOD_BIAS": 0
+      },
+      "GL_POINT_SPRITE": {
+        "GL_COORD_REPLACE": "GL_FALSE"
+      }
+    },
+    "GL_TEXTURE4": {
+      "GL_TEXTURE_1D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_1D": 0,
+      "GL_TEXTURE_2D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_2D": 0,
+      "GL_TEXTURE_3D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_3D": 0,
+      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
+      "GL_TEXTURE_BINDING_RECTANGLE": 0,
+      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
+      "GL_TEXTURE_BINDING_CUBE_MAP": 0,
+      "GL_TEXTURE_ENV": {
+        "GL_ALPHA_SCALE": 1,
+        "GL_TEXTURE_ENV_MODE": "GL_MODULATE",
+        "GL_TEXTURE_ENV_COLOR": [0, 0, 0, 0],
+        "GL_COMBINE_RGB": "GL_MODULATE",
+        "GL_COMBINE_ALPHA": "GL_MODULATE",
+        "GL_RGB_SCALE": 1,
+        "GL_SRC0_RGB": "GL_TEXTURE",
+        "GL_SRC1_RGB": "GL_PREVIOUS",
+        "GL_SRC2_RGB": "GL_CONSTANT",
+        "GL_SRC0_ALPHA": "GL_TEXTURE",
+        "GL_SRC1_ALPHA": "GL_PREVIOUS",
+        "GL_SRC2_ALPHA": "GL_CONSTANT",
+        "GL_OPERAND0_RGB": "GL_SRC_COLOR",
+        "GL_OPERAND1_RGB": "GL_SRC_COLOR",
+        "GL_OPERAND2_RGB": "GL_SRC_ALPHA",
+        "GL_OPERAND0_ALPHA": "GL_SRC_ALPHA",
+        "GL_OPERAND1_ALPHA": "GL_SRC_ALPHA",
+        "GL_OPERAND2_ALPHA": "GL_SRC_ALPHA"
+      },
+      "GL_TEXTURE_FILTER_CONTROL": {
+        "GL_TEXTURE_LOD_BIAS": 0
+      },
+      "GL_POINT_SPRITE": {
+        "GL_COORD_REPLACE": "GL_FALSE"
+      }
+    },
+    "GL_TEXTURE5": {
+      "GL_TEXTURE_1D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_1D": 0,
+      "GL_TEXTURE_2D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_2D": 0,
+      "GL_TEXTURE_3D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_3D": 0,
+      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
+      "GL_TEXTURE_BINDING_RECTANGLE": 0,
+      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
+      "GL_TEXTURE_BINDING_CUBE_MAP": 0,
+      "GL_TEXTURE_ENV": {
+        "GL_ALPHA_SCALE": 1,
+        "GL_TEXTURE_ENV_MODE": "GL_MODULATE",
+        "GL_TEXTURE_ENV_COLOR": [0, 0, 0, 0],
+        "GL_COMBINE_RGB": "GL_MODULATE",
+        "GL_COMBINE_ALPHA": "GL_MODULATE",
+        "GL_RGB_SCALE": 1,
+        "GL_SRC0_RGB": "GL_TEXTURE",
+        "GL_SRC1_RGB": "GL_PREVIOUS",
+        "GL_SRC2_RGB": "GL_CONSTANT",
+        "GL_SRC0_ALPHA": "GL_TEXTURE",
+        "GL_SRC1_ALPHA": "GL_PREVIOUS",
+        "GL_SRC2_ALPHA": "GL_CONSTANT",
+        "GL_OPERAND0_RGB": "GL_SRC_COLOR",
+        "GL_OPERAND1_RGB": "GL_SRC_COLOR",
+        "GL_OPERAND2_RGB": "GL_SRC_ALPHA",
+        "GL_OPERAND0_ALPHA": "GL_SRC_ALPHA",
+        "GL_OPERAND1_ALPHA": "GL_SRC_ALPHA",
+        "GL_OPERAND2_ALPHA": "GL_SRC_ALPHA"
+      },
+      "GL_TEXTURE_FILTER_CONTROL": {
+        "GL_TEXTURE_LOD_BIAS": 0
+      },
+      "GL_POINT_SPRITE": {
+        "GL_COORD_REPLACE": "GL_FALSE"
+      }
+    },
+    "GL_TEXTURE6": {
+      "GL_TEXTURE_1D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_1D": 0,
+      "GL_TEXTURE_2D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_2D": 0,
+      "GL_TEXTURE_3D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_3D": 0,
+      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
+      "GL_TEXTURE_BINDING_RECTANGLE": 0,
+      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
+      "GL_TEXTURE_BINDING_CUBE_MAP": 0,
+      "GL_TEXTURE_ENV": {
+        "GL_ALPHA_SCALE": 1,
+        "GL_TEXTURE_ENV_MODE": "GL_MODULATE",
+        "GL_TEXTURE_ENV_COLOR": [0, 0, 0, 0],
+        "GL_COMBINE_RGB": "GL_MODULATE",
+        "GL_COMBINE_ALPHA": "GL_MODULATE",
+        "GL_RGB_SCALE": 1,
+        "GL_SRC0_RGB": "GL_TEXTURE",
+        "GL_SRC1_RGB": "GL_PREVIOUS",
+        "GL_SRC2_RGB": "GL_CONSTANT",
+        "GL_SRC0_ALPHA": "GL_TEXTURE",
+        "GL_SRC1_ALPHA": "GL_PREVIOUS",
+        "GL_SRC2_ALPHA": "GL_CONSTANT",
+        "GL_OPERAND0_RGB": "GL_SRC_COLOR",
+        "GL_OPERAND1_RGB": "GL_SRC_COLOR",
+        "GL_OPERAND2_RGB": "GL_SRC_ALPHA",
+        "GL_OPERAND0_ALPHA": "GL_SRC_ALPHA",
+        "GL_OPERAND1_ALPHA": "GL_SRC_ALPHA",
+        "GL_OPERAND2_ALPHA": "GL_SRC_ALPHA"
+      },
+      "GL_TEXTURE_FILTER_CONTROL": {
+        "GL_TEXTURE_LOD_BIAS": 0
+      },
+      "GL_POINT_SPRITE": {
+        "GL_COORD_REPLACE": "GL_FALSE"
+      }
+    },
+    "GL_TEXTURE7": {
+      "GL_TEXTURE_1D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_1D": 0,
+      "GL_TEXTURE_2D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_2D": 0,
+      "GL_TEXTURE_3D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_3D": 0,
+      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
+      "GL_TEXTURE_BINDING_RECTANGLE": 0,
+      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
+      "GL_TEXTURE_BINDING_CUBE_MAP": 0,
+      "GL_TEXTURE_ENV": {
+        "GL_ALPHA_SCALE": 1,
+        "GL_TEXTURE_ENV_MODE": "GL_MODULATE",
+        "GL_TEXTURE_ENV_COLOR": [0, 0, 0, 0],
+        "GL_COMBINE_RGB": "GL_MODULATE",
+        "GL_COMBINE_ALPHA": "GL_MODULATE",
+        "GL_RGB_SCALE": 1,
+        "GL_SRC0_RGB": "GL_TEXTURE",
+        "GL_SRC1_RGB": "GL_PREVIOUS",
+        "GL_SRC2_RGB": "GL_CONSTANT",
+        "GL_SRC0_ALPHA": "GL_TEXTURE",
+        "GL_SRC1_ALPHA": "GL_PREVIOUS",
+        "GL_SRC2_ALPHA": "GL_CONSTANT",
+        "GL_OPERAND0_RGB": "GL_SRC_COLOR",
+        "GL_OPERAND1_RGB": "GL_SRC_COLOR",
+        "GL_OPERAND2_RGB": "GL_SRC_ALPHA",
+        "GL_OPERAND0_ALPHA": "GL_SRC_ALPHA",
+        "GL_OPERAND1_ALPHA": "GL_SRC_ALPHA",
+        "GL_OPERAND2_ALPHA": "GL_SRC_ALPHA"
+      },
+      "GL_TEXTURE_FILTER_CONTROL": {
+        "GL_TEXTURE_LOD_BIAS": 0
+      },
+      "GL_POINT_SPRITE": {
+        "GL_COORD_REPLACE": "GL_FALSE"
+      }
+    },
+    "GL_TEXTURE8": {
+      "GL_TEXTURE_1D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_1D": 0,
+      "GL_TEXTURE_2D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_2D": 0,
+      "GL_TEXTURE_3D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_3D": 0,
+      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
+      "GL_TEXTURE_BINDING_RECTANGLE": 0,
+      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
+      "GL_TEXTURE_BINDING_CUBE_MAP": 0
+    },
+    "GL_TEXTURE9": {
+      "GL_TEXTURE_1D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_1D": 0,
+      "GL_TEXTURE_2D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_2D": 0,
+      "GL_TEXTURE_3D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_3D": 0,
+      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
+      "GL_TEXTURE_BINDING_RECTANGLE": 0,
+      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
+      "GL_TEXTURE_BINDING_CUBE_MAP": 0
+    },
+    "GL_TEXTURE10": {
+      "GL_TEXTURE_1D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_1D": 0,
+      "GL_TEXTURE_2D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_2D": 0,
+      "GL_TEXTURE_3D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_3D": 0,
+      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
+      "GL_TEXTURE_BINDING_RECTANGLE": 0,
+      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
+      "GL_TEXTURE_BINDING_CUBE_MAP": 0
+    },
+    "GL_TEXTURE11": {
+      "GL_TEXTURE_1D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_1D": 0,
+      "GL_TEXTURE_2D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_2D": 0,
+      "GL_TEXTURE_3D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_3D": 0,
+      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
+      "GL_TEXTURE_BINDING_RECTANGLE": 0,
+      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
+      "GL_TEXTURE_BINDING_CUBE_MAP": 0
+    },
+    "GL_TEXTURE12": {
+      "GL_TEXTURE_1D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_1D": 0,
+      "GL_TEXTURE_2D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_2D": 0,
+      "GL_TEXTURE_3D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_3D": 0,
+      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
+      "GL_TEXTURE_BINDING_RECTANGLE": 0,
+      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
+      "GL_TEXTURE_BINDING_CUBE_MAP": 0
+    },
+    "GL_TEXTURE13": {
+      "GL_TEXTURE_1D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_1D": 0,
+      "GL_TEXTURE_2D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_2D": 0,
+      "GL_TEXTURE_3D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_3D": 0,
+      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
+      "GL_TEXTURE_BINDING_RECTANGLE": 0,
+      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
+      "GL_TEXTURE_BINDING_CUBE_MAP": 0
+    },
+    "GL_TEXTURE14": {
+      "GL_TEXTURE_1D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_1D": 0,
+      "GL_TEXTURE_2D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_2D": 0,
+      "GL_TEXTURE_3D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_3D": 0,
+      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
+      "GL_TEXTURE_BINDING_RECTANGLE": 0,
+      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
+      "GL_TEXTURE_BINDING_CUBE_MAP": 0
+    },
+    "GL_TEXTURE15": {
+      "GL_TEXTURE_1D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_1D": 0,
+      "GL_TEXTURE_2D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_2D": 0,
+      "GL_TEXTURE_3D": "GL_FALSE",
+      "GL_TEXTURE_BINDING_3D": 0,
+      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
+      "GL_TEXTURE_BINDING_RECTANGLE": 0,
+      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
+      "GL_TEXTURE_BINDING_CUBE_MAP": 0
+    }
+  },
+  "shaders": {},
+  "uniforms": {},
+  "textures": {},
+  "framebuffer": {}
+}
diff --git a/apps/gl/default.ref.json b/apps/gl/default.ref.json
deleted file mode 100644 (file)
index 497e201..0000000
+++ /dev/null
@@ -1,848 +0,0 @@
-{
-  "parameters": {
-    "GL_CURRENT_COLOR": [1, 1, 1, 1],
-    "GL_CURRENT_INDEX": 1,
-    "GL_CURRENT_NORMAL": [0, 0, 1],
-    "GL_CURRENT_TEXTURE_COORDS": [0, 0, 0, 1],
-    "GL_CURRENT_RASTER_COLOR": [1, 1, 1, 1],
-    "GL_CURRENT_RASTER_INDEX": 1,
-    "GL_CURRENT_RASTER_TEXTURE_COORDS": [0, 0, 0, 1],
-    "GL_CURRENT_RASTER_POSITION": [0, 0, 0, 1],
-    "GL_CURRENT_RASTER_POSITION_VALID": 1,
-    "GL_CURRENT_RASTER_DISTANCE": 0,
-    "GL_POINT_SMOOTH": "GL_FALSE",
-    "GL_POINT_SIZE": 1,
-    "GL_LINE_SMOOTH": "GL_FALSE",
-    "GL_LINE_WIDTH": 1,
-    "GL_LINE_STIPPLE": "GL_FALSE",
-    "GL_LINE_STIPPLE_PATTERN": 65535,
-    "GL_LINE_STIPPLE_REPEAT": 1,
-    "GL_LIST_MODE": "GL_ZERO",
-    "GL_LIST_BASE": 0,
-    "GL_LIST_INDEX": 0,
-    "GL_POLYGON_MODE": ["GL_FILL", "GL_FILL"],
-    "GL_POLYGON_SMOOTH": "GL_FALSE",
-    "GL_POLYGON_STIPPLE": "GL_FALSE",
-    "GL_EDGE_FLAG": "GL_TRUE",
-    "GL_CULL_FACE": "GL_FALSE",
-    "GL_CULL_FACE_MODE": "GL_BACK",
-    "GL_FRONT_FACE": "GL_CCW",
-    "GL_LIGHTING": "GL_FALSE",
-    "GL_LIGHT_MODEL_LOCAL_VIEWER": "GL_FALSE",
-    "GL_LIGHT_MODEL_TWO_SIDE": "GL_FALSE",
-    "GL_LIGHT_MODEL_AMBIENT": [0.2, 0.2, 0.2, 1],
-    "GL_SHADE_MODEL": "GL_SMOOTH",
-    "GL_COLOR_MATERIAL_FACE": "GL_FRONT_AND_BACK",
-    "GL_COLOR_MATERIAL_PARAMETER": "GL_AMBIENT_AND_DIFFUSE",
-    "GL_COLOR_MATERIAL": "GL_FALSE",
-    "GL_FOG": "GL_FALSE",
-    "GL_FOG_INDEX": 0,
-    "GL_FOG_DENSITY": 1,
-    "GL_FOG_START": 0,
-    "GL_FOG_END": 1,
-    "GL_FOG_MODE": "GL_EXP",
-    "GL_FOG_COLOR": [0, 0, 0, 0],
-    "GL_DEPTH_RANGE": [0, 1],
-    "GL_DEPTH_TEST": "GL_FALSE",
-    "GL_DEPTH_WRITEMASK": "GL_TRUE",
-    "GL_DEPTH_CLEAR_VALUE": 1,
-    "GL_DEPTH_FUNC": "GL_LESS",
-    "GL_ACCUM_CLEAR_VALUE": [0, 0, 0, 0],
-    "GL_STENCIL_TEST": "GL_FALSE",
-    "GL_STENCIL_CLEAR_VALUE": 0,
-    "GL_STENCIL_FUNC": "GL_ALWAYS",
-    "GL_STENCIL_VALUE_MASK": -1,
-    "GL_STENCIL_FAIL": "GL_KEEP",
-    "GL_STENCIL_PASS_DEPTH_FAIL": "GL_KEEP",
-    "GL_STENCIL_PASS_DEPTH_PASS": "GL_KEEP",
-    "GL_STENCIL_REF": 0,
-    "GL_STENCIL_WRITEMASK": -1,
-    "GL_MATRIX_MODE": "GL_MODELVIEW",
-    "GL_NORMALIZE": "GL_FALSE",
-    // GL_VIEWPORT depends on the drawable
-    "GL_MODELVIEW_STACK_DEPTH": 1,
-    "GL_PROJECTION_STACK_DEPTH": 1,
-    "GL_TEXTURE_STACK_DEPTH": 1,
-    "GL_MODELVIEW_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
-    "GL_PROJECTION_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
-    "GL_TEXTURE_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
-    "GL_ATTRIB_STACK_DEPTH": 0,
-    "GL_CLIENT_ATTRIB_STACK_DEPTH": 0,
-    "GL_ALPHA_TEST": "GL_FALSE",
-    "GL_ALPHA_TEST_FUNC": "GL_ALWAYS",
-    "GL_ALPHA_TEST_REF": 0,
-    "GL_DITHER": "GL_TRUE",
-    "GL_BLEND_DST": "GL_ZERO",
-    "GL_BLEND_SRC": "GL_ONE",
-    "GL_BLEND": "GL_FALSE",
-    "GL_LOGIC_OP_MODE": "GL_COPY",
-    "GL_INDEX_LOGIC_OP": "GL_FALSE",
-    "GL_COLOR_LOGIC_OP": "GL_FALSE",
-    // Some implementations return more GL_AUX_BUFFERS than requested
-    // GL_DRAW_BUFFER and GL_READ_BUFFER vary with visual
-    // GL_SCISSOR_BOX depends on the drawable
-    "GL_SCISSOR_TEST": "GL_FALSE",
-    "GL_INDEX_CLEAR_VALUE": 0,
-    "GL_INDEX_WRITEMASK": -1,
-    "GL_COLOR_CLEAR_VALUE": [0, 0, 0, 0],
-    "GL_COLOR_WRITEMASK": ["GL_TRUE", "GL_TRUE", "GL_TRUE", "GL_TRUE"],
-    "GL_INDEX_MODE": "GL_FALSE",
-    "GL_RGBA_MODE": "GL_TRUE",
-    // GL_DOUBLEBUFFER varies with visual
-    "GL_STEREO": "GL_FALSE",
-    "GL_RENDER_MODE": "GL_RENDER",
-    "GL_PERSPECTIVE_CORRECTION_HINT": "GL_DONT_CARE",
-    "GL_POINT_SMOOTH_HINT": "GL_DONT_CARE",
-    "GL_LINE_SMOOTH_HINT": "GL_DONT_CARE",
-    "GL_POLYGON_SMOOTH_HINT": "GL_DONT_CARE",
-    "GL_FOG_HINT": "GL_DONT_CARE",
-    "GL_TEXTURE_GEN_S": "GL_FALSE",
-    "GL_TEXTURE_GEN_T": "GL_FALSE",
-    "GL_TEXTURE_GEN_R": "GL_FALSE",
-    "GL_TEXTURE_GEN_Q": "GL_FALSE",
-    "GL_PIXEL_MAP_I_TO_I_SIZE": 1,
-    "GL_PIXEL_MAP_S_TO_S_SIZE": 1,
-    "GL_PIXEL_MAP_I_TO_R_SIZE": 1,
-    "GL_PIXEL_MAP_I_TO_G_SIZE": 1,
-    "GL_PIXEL_MAP_I_TO_B_SIZE": 1,
-    "GL_PIXEL_MAP_I_TO_A_SIZE": 1,
-    "GL_PIXEL_MAP_R_TO_R_SIZE": 1,
-    "GL_PIXEL_MAP_G_TO_G_SIZE": 1,
-    "GL_PIXEL_MAP_B_TO_B_SIZE": 1,
-    "GL_PIXEL_MAP_A_TO_A_SIZE": 1,
-    "GL_UNPACK_SWAP_BYTES": "GL_FALSE",
-    "GL_UNPACK_LSB_FIRST": "GL_FALSE",
-    "GL_UNPACK_ROW_LENGTH": 0,
-    "GL_UNPACK_SKIP_ROWS": 0,
-    "GL_UNPACK_SKIP_PIXELS": 0,
-    "GL_UNPACK_ALIGNMENT": 4,
-    "GL_PACK_SWAP_BYTES": "GL_FALSE",
-    "GL_PACK_LSB_FIRST": "GL_FALSE",
-    "GL_PACK_ROW_LENGTH": 0,
-    "GL_PACK_SKIP_ROWS": 0,
-    "GL_PACK_SKIP_PIXELS": 0,
-    "GL_PACK_ALIGNMENT": 4,
-    "GL_MAP_COLOR": "GL_FALSE",
-    "GL_MAP_STENCIL": "GL_FALSE",
-    "GL_INDEX_SHIFT": 0,
-    "GL_INDEX_OFFSET": 0,
-    "GL_RED_SCALE": 1,
-    "GL_RED_BIAS": 0,
-    "GL_ZOOM_X": 1,
-    "GL_ZOOM_Y": 1,
-    "GL_GREEN_SCALE": 1,
-    "GL_GREEN_BIAS": 0,
-    "GL_BLUE_SCALE": 1,
-    "GL_BLUE_BIAS": 0,
-    "GL_ALPHA_SCALE": 1,
-    "GL_ALPHA_BIAS": 0,
-    "GL_DEPTH_SCALE": 1,
-    "GL_DEPTH_BIAS": 0,
-    "GL_INDEX_BITS": 0,
-    // GL_xxx_BITS state can often vary
-    "GL_NAME_STACK_DEPTH": 0,
-    "GL_AUTO_NORMAL": "GL_FALSE",
-    "GL_MAP1_COLOR_4": "GL_FALSE",
-    "GL_MAP1_INDEX": "GL_FALSE",
-    "GL_MAP1_NORMAL": "GL_FALSE",
-    "GL_MAP1_TEXTURE_COORD_1": "GL_FALSE",
-    "GL_MAP1_TEXTURE_COORD_2": "GL_FALSE",
-    "GL_MAP1_TEXTURE_COORD_3": "GL_FALSE",
-    "GL_MAP1_TEXTURE_COORD_4": "GL_FALSE",
-    "GL_MAP1_VERTEX_3": "GL_FALSE",
-    "GL_MAP1_VERTEX_4": "GL_FALSE",
-    "GL_MAP2_COLOR_4": "GL_FALSE",
-    "GL_MAP2_INDEX": "GL_FALSE",
-    "GL_MAP2_NORMAL": "GL_FALSE",
-    "GL_MAP2_TEXTURE_COORD_1": "GL_FALSE",
-    "GL_MAP2_TEXTURE_COORD_2": "GL_FALSE",
-    "GL_MAP2_TEXTURE_COORD_3": "GL_FALSE",
-    "GL_MAP2_TEXTURE_COORD_4": "GL_FALSE",
-    "GL_MAP2_VERTEX_3": "GL_FALSE",
-    "GL_MAP2_VERTEX_4": "GL_FALSE",
-    "GL_MAP1_GRID_DOMAIN": [0, 1],
-    "GL_MAP1_GRID_SEGMENTS": 1,
-    "GL_MAP2_GRID_DOMAIN": [0, 1, 0, 1],
-    "GL_MAP2_GRID_SEGMENTS": [1, 1],
-    "GL_FEEDBACK_BUFFER_POINTER": 0,
-    "GL_FEEDBACK_BUFFER_SIZE": 0,
-    "GL_FEEDBACK_BUFFER_TYPE": "GL_2D",
-    "GL_SELECTION_BUFFER_POINTER": 0,
-    "GL_SELECTION_BUFFER_SIZE": 0,
-    "GL_POLYGON_OFFSET_UNITS": 0,
-    "GL_POLYGON_OFFSET_POINT": "GL_FALSE",
-    "GL_POLYGON_OFFSET_LINE": "GL_FALSE",
-    "GL_CLIP_DISTANCE0": "GL_FALSE",
-    "GL_CLIP_DISTANCE1": "GL_FALSE",
-    "GL_CLIP_DISTANCE2": "GL_FALSE",
-    "GL_CLIP_DISTANCE3": "GL_FALSE",
-    "GL_CLIP_DISTANCE4": "GL_FALSE",
-    "GL_CLIP_DISTANCE5": "GL_FALSE",
-    "GL_BLEND_COLOR": [0, 0, 0, 0],
-    "GL_BLEND_EQUATION": "GL_FUNC_ADD",
-    "GL_POLYGON_OFFSET_FILL": "GL_FALSE",
-    "GL_POLYGON_OFFSET_FACTOR": 0,
-    "GL_RESCALE_NORMAL": "GL_FALSE",
-    "GL_PACK_SKIP_IMAGES": 0,
-    "GL_PACK_IMAGE_HEIGHT": 0,
-    "GL_UNPACK_SKIP_IMAGES": 0,
-    "GL_UNPACK_IMAGE_HEIGHT": 0,
-    "GL_TEXTURE_3D": "GL_FALSE",
-    "GL_VERTEX_ARRAY": "GL_FALSE",
-    "GL_NORMAL_ARRAY": "GL_FALSE",
-    "GL_COLOR_ARRAY": "GL_FALSE",
-    "GL_INDEX_ARRAY": "GL_FALSE",
-    "GL_TEXTURE_COORD_ARRAY": "GL_FALSE",
-    "GL_EDGE_FLAG_ARRAY": "GL_FALSE",
-    "GL_VERTEX_ARRAY_SIZE": 4,
-    "GL_VERTEX_ARRAY_TYPE": "GL_FLOAT",
-    "GL_VERTEX_ARRAY_STRIDE": 0,
-    "GL_NORMAL_ARRAY_TYPE": "GL_FLOAT",
-    "GL_NORMAL_ARRAY_STRIDE": 0,
-    "GL_COLOR_ARRAY_SIZE": 4,
-    "GL_COLOR_ARRAY_TYPE": "GL_FLOAT",
-    "GL_COLOR_ARRAY_STRIDE": 0,
-    "GL_INDEX_ARRAY_TYPE": "GL_FLOAT",
-    "GL_INDEX_ARRAY_STRIDE": 0,
-    "GL_TEXTURE_COORD_ARRAY_SIZE": 4,
-    "GL_TEXTURE_COORD_ARRAY_TYPE": "GL_FLOAT",
-    "GL_TEXTURE_COORD_ARRAY_STRIDE": 0,
-    "GL_EDGE_FLAG_ARRAY_STRIDE": 0,
-    "GL_VERTEX_ARRAY_POINTER": 0,
-    "GL_NORMAL_ARRAY_POINTER": 0,
-    "GL_COLOR_ARRAY_POINTER": 0,
-    "GL_INDEX_ARRAY_POINTER": 0,
-    "GL_TEXTURE_COORD_ARRAY_POINTER": 0,
-    "GL_EDGE_FLAG_ARRAY_POINTER": 0,
-    "GL_MULTISAMPLE": 1,
-    "GL_SAMPLE_ALPHA_TO_COVERAGE": 0,
-    "GL_SAMPLE_ALPHA_TO_ONE": 0,
-    "GL_SAMPLE_COVERAGE": 0,
-    "GL_SAMPLE_BUFFERS": 0,
-    "GL_SAMPLES": 0,
-    "GL_SAMPLE_COVERAGE_VALUE": 1,
-    "GL_SAMPLE_COVERAGE_INVERT": 0,
-    "GL_BLEND_DST_RGB": "GL_ZERO",
-    "GL_BLEND_SRC_RGB": "GL_ONE",
-    "GL_BLEND_DST_ALPHA": "GL_ZERO",
-    "GL_BLEND_SRC_ALPHA": "GL_ONE",
-    "GL_POINT_FADE_THRESHOLD_SIZE": 1,
-    "GL_POINT_DISTANCE_ATTENUATION": [1, 0, 0],
-    "GL_GENERATE_MIPMAP_HINT": "GL_DONT_CARE",
-    "GL_LIGHT_MODEL_COLOR_CONTROL": "GL_SINGLE_COLOR",
-    "GL_FOG_COORD_SRC": "GL_FRAGMENT_DEPTH",
-    "GL_CURRENT_FOG_COORD": 0,
-    "GL_FOG_COORD_ARRAY_TYPE": "GL_FLOAT",
-    "GL_FOG_COORD_ARRAY_STRIDE": 0,
-    "GL_FOG_COORD_ARRAY": "GL_FALSE",
-    "GL_COLOR_SUM": "GL_FALSE",
-    "GL_CURRENT_SECONDARY_COLOR": [0, 0, 0, 1],
-    "GL_SECONDARY_COLOR_ARRAY_SIZE": 3,
-    "GL_SECONDARY_COLOR_ARRAY_TYPE": "GL_FLOAT",
-    "GL_SECONDARY_COLOR_ARRAY_STRIDE": 0,
-    "GL_SECONDARY_COLOR_ARRAY": "GL_FALSE",
-    "GL_ACTIVE_TEXTURE": "GL_TEXTURE0",
-    "GL_CLIENT_ACTIVE_TEXTURE": "GL_TEXTURE0",
-    "GL_TRANSPOSE_MODELVIEW_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
-    "GL_TRANSPOSE_PROJECTION_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
-    "GL_TRANSPOSE_TEXTURE_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
-    "GL_TEXTURE_COMPRESSION_HINT": "GL_DONT_CARE",
-    "GL_VERTEX_ARRAY_BINDING": 0,
-    "GL_PROGRAM_POINT_SIZE": "GL_FALSE",
-    "GL_VERTEX_PROGRAM_TWO_SIDE": "GL_FALSE",
-    "GL_STENCIL_BACK_FUNC": "GL_ALWAYS",
-    "GL_STENCIL_BACK_FAIL": "GL_KEEP",
-    "GL_STENCIL_BACK_PASS_DEPTH_FAIL": "GL_KEEP",
-    "GL_STENCIL_BACK_PASS_DEPTH_PASS": "GL_KEEP",
-    // GL_DRAW_BUFFER0 varies with visual
-    "GL_DRAW_BUFFER1": "GL_ZERO",
-    "GL_DRAW_BUFFER2": "GL_ZERO",
-    "GL_DRAW_BUFFER3": "GL_ZERO",
-    "GL_DRAW_BUFFER4": "GL_ZERO",
-    "GL_DRAW_BUFFER5": "GL_ZERO",
-    "GL_DRAW_BUFFER6": "GL_ZERO",
-    "GL_DRAW_BUFFER7": "GL_ZERO",
-    "GL_BLEND_EQUATION_ALPHA": "GL_FUNC_ADD",
-    "GL_ARRAY_BUFFER_BINDING": 0,
-    "GL_ELEMENT_ARRAY_BUFFER_BINDING": 0,
-    "GL_VERTEX_ARRAY_BUFFER_BINDING": 0,
-    "GL_NORMAL_ARRAY_BUFFER_BINDING": 0,
-    "GL_COLOR_ARRAY_BUFFER_BINDING": 0,
-    "GL_INDEX_ARRAY_BUFFER_BINDING": 0,
-    "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING": 0,
-    "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING": 0,
-    "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING": 0,
-    "GL_FOG_COORD_ARRAY_BUFFER_BINDING": 0,
-    "GL_PIXEL_PACK_BUFFER_BINDING": 0,
-    "GL_PIXEL_UNPACK_BUFFER_BINDING": 0,
-    "GL_CURRENT_PROGRAM": 0,
-    "GL_POINT_SPRITE_COORD_ORIGIN": "GL_UPPER_LEFT",
-    "GL_DRAW_FRAMEBUFFER_BINDING": 0,
-    "GL_RENDERBUFFER_BINDING": 0,
-    "GL_READ_FRAMEBUFFER_BINDING": 0,
-    "GL_FRONT": {
-      "GL_AMBIENT": [0.2, 0.2, 0.2, 1],
-      "GL_DIFFUSE": [0.8, 0.8, 0.8, 1],
-      "GL_SPECULAR": [0, 0, 0, 1],
-      "GL_EMISSION": [0, 0, 0, 1],
-      "GL_SHININESS": 0,
-      "GL_COLOR_INDEXES": [0, 1, 1]
-    },
-    "GL_BACK": {
-      "GL_AMBIENT": [0.2, 0.2, 0.2, 1],
-      "GL_DIFFUSE": [0.8, 0.8, 0.8, 1],
-      "GL_SPECULAR": [0, 0, 0, 1],
-      "GL_EMISSION": [0, 0, 0, 1],
-      "GL_SHININESS": 0,
-      "GL_COLOR_INDEXES": [0, 1, 1]
-    },
-    "GL_VERTEX_ATTRIB_ARRAY0": {
-      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
-      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
-      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
-    },
-    "GL_VERTEX_ATTRIB_ARRAY1": {
-      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
-      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
-      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
-    },
-    "GL_VERTEX_ATTRIB_ARRAY2": {
-      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
-      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
-      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
-    },
-    "GL_VERTEX_ATTRIB_ARRAY3": {
-      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
-      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
-      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
-    },
-    "GL_VERTEX_ATTRIB_ARRAY4": {
-      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
-      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
-      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
-    },
-    "GL_VERTEX_ATTRIB_ARRAY5": {
-      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
-      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
-      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
-    },
-    "GL_VERTEX_ATTRIB_ARRAY6": {
-      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
-      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
-      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
-    },
-    "GL_VERTEX_ATTRIB_ARRAY7": {
-      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
-      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
-      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
-    },
-    "GL_VERTEX_ATTRIB_ARRAY8": {
-      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
-      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
-      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
-    },
-    "GL_VERTEX_ATTRIB_ARRAY9": {
-      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
-      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
-      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
-    },
-    "GL_VERTEX_ATTRIB_ARRAY10": {
-      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
-      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
-      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
-    },
-    "GL_VERTEX_ATTRIB_ARRAY11": {
-      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
-      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
-      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
-    },
-    "GL_VERTEX_ATTRIB_ARRAY12": {
-      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
-      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
-      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
-    },
-    "GL_VERTEX_ATTRIB_ARRAY13": {
-      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
-      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
-      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
-    },
-    "GL_VERTEX_ATTRIB_ARRAY14": {
-      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
-      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
-      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
-    },
-    "GL_VERTEX_ATTRIB_ARRAY15": {
-      "GL_VERTEX_ATTRIB_ARRAY_ENABLED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_SIZE": 4,
-      "GL_VERTEX_ATTRIB_ARRAY_STRIDE": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_TYPE": "GL_FLOAT",
-      "GL_VERTEX_ATTRIB_ARRAY_POINTER": 0,
-      "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED": "GL_FALSE",
-      "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 0
-    },
-    "GL_TEXTURE0": {
-      "GL_TEXTURE_1D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_1D": 0,
-      "GL_TEXTURE_2D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_2D": 0,
-      "GL_TEXTURE_3D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_3D": 0,
-      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
-      "GL_TEXTURE_BINDING_RECTANGLE": 0,
-      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
-      "GL_TEXTURE_BINDING_CUBE_MAP": 0,
-      "GL_TEXTURE_ENV": {
-        "GL_ALPHA_SCALE": 1,
-        "GL_TEXTURE_ENV_MODE": "GL_MODULATE",
-        "GL_TEXTURE_ENV_COLOR": [0, 0, 0, 0],
-        "GL_COMBINE_RGB": "GL_MODULATE",
-        "GL_COMBINE_ALPHA": "GL_MODULATE",
-        "GL_RGB_SCALE": 1,
-        "GL_SRC0_RGB": "GL_TEXTURE",
-        "GL_SRC1_RGB": "GL_PREVIOUS",
-        "GL_SRC2_RGB": "GL_CONSTANT",
-        "GL_SRC0_ALPHA": "GL_TEXTURE",
-        "GL_SRC1_ALPHA": "GL_PREVIOUS",
-        "GL_SRC2_ALPHA": "GL_CONSTANT",
-        "GL_OPERAND0_RGB": "GL_SRC_COLOR",
-        "GL_OPERAND1_RGB": "GL_SRC_COLOR",
-        "GL_OPERAND2_RGB": "GL_SRC_ALPHA",
-        "GL_OPERAND0_ALPHA": "GL_SRC_ALPHA",
-        "GL_OPERAND1_ALPHA": "GL_SRC_ALPHA",
-        "GL_OPERAND2_ALPHA": "GL_SRC_ALPHA"
-      },
-      "GL_TEXTURE_FILTER_CONTROL": {
-        "GL_TEXTURE_LOD_BIAS": 0
-      },
-      "GL_POINT_SPRITE": {
-        "GL_COORD_REPLACE": "GL_FALSE"
-      }
-    },
-    "GL_TEXTURE1": {
-      "GL_TEXTURE_1D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_1D": 0,
-      "GL_TEXTURE_2D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_2D": 0,
-      "GL_TEXTURE_3D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_3D": 0,
-      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
-      "GL_TEXTURE_BINDING_RECTANGLE": 0,
-      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
-      "GL_TEXTURE_BINDING_CUBE_MAP": 0,
-      "GL_TEXTURE_ENV": {
-        "GL_ALPHA_SCALE": 1,
-        "GL_TEXTURE_ENV_MODE": "GL_MODULATE",
-        "GL_TEXTURE_ENV_COLOR": [0, 0, 0, 0],
-        "GL_COMBINE_RGB": "GL_MODULATE",
-        "GL_COMBINE_ALPHA": "GL_MODULATE",
-        "GL_RGB_SCALE": 1,
-        "GL_SRC0_RGB": "GL_TEXTURE",
-        "GL_SRC1_RGB": "GL_PREVIOUS",
-        "GL_SRC2_RGB": "GL_CONSTANT",
-        "GL_SRC0_ALPHA": "GL_TEXTURE",
-        "GL_SRC1_ALPHA": "GL_PREVIOUS",
-        "GL_SRC2_ALPHA": "GL_CONSTANT",
-        "GL_OPERAND0_RGB": "GL_SRC_COLOR",
-        "GL_OPERAND1_RGB": "GL_SRC_COLOR",
-        "GL_OPERAND2_RGB": "GL_SRC_ALPHA",
-        "GL_OPERAND0_ALPHA": "GL_SRC_ALPHA",
-        "GL_OPERAND1_ALPHA": "GL_SRC_ALPHA",
-        "GL_OPERAND2_ALPHA": "GL_SRC_ALPHA"
-      },
-      "GL_TEXTURE_FILTER_CONTROL": {
-        "GL_TEXTURE_LOD_BIAS": 0
-      },
-      "GL_POINT_SPRITE": {
-        "GL_COORD_REPLACE": "GL_FALSE"
-      }
-    },
-    "GL_TEXTURE2": {
-      "GL_TEXTURE_1D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_1D": 0,
-      "GL_TEXTURE_2D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_2D": 0,
-      "GL_TEXTURE_3D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_3D": 0,
-      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
-      "GL_TEXTURE_BINDING_RECTANGLE": 0,
-      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
-      "GL_TEXTURE_BINDING_CUBE_MAP": 0,
-      "GL_TEXTURE_ENV": {
-        "GL_ALPHA_SCALE": 1,
-        "GL_TEXTURE_ENV_MODE": "GL_MODULATE",
-        "GL_TEXTURE_ENV_COLOR": [0, 0, 0, 0],
-        "GL_COMBINE_RGB": "GL_MODULATE",
-        "GL_COMBINE_ALPHA": "GL_MODULATE",
-        "GL_RGB_SCALE": 1,
-        "GL_SRC0_RGB": "GL_TEXTURE",
-        "GL_SRC1_RGB": "GL_PREVIOUS",
-        "GL_SRC2_RGB": "GL_CONSTANT",
-        "GL_SRC0_ALPHA": "GL_TEXTURE",
-        "GL_SRC1_ALPHA": "GL_PREVIOUS",
-        "GL_SRC2_ALPHA": "GL_CONSTANT",
-        "GL_OPERAND0_RGB": "GL_SRC_COLOR",
-        "GL_OPERAND1_RGB": "GL_SRC_COLOR",
-        "GL_OPERAND2_RGB": "GL_SRC_ALPHA",
-        "GL_OPERAND0_ALPHA": "GL_SRC_ALPHA",
-        "GL_OPERAND1_ALPHA": "GL_SRC_ALPHA",
-        "GL_OPERAND2_ALPHA": "GL_SRC_ALPHA"
-      },
-      "GL_TEXTURE_FILTER_CONTROL": {
-        "GL_TEXTURE_LOD_BIAS": 0
-      },
-      "GL_POINT_SPRITE": {
-        "GL_COORD_REPLACE": "GL_FALSE"
-      }
-    },
-    "GL_TEXTURE3": {
-      "GL_TEXTURE_1D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_1D": 0,
-      "GL_TEXTURE_2D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_2D": 0,
-      "GL_TEXTURE_3D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_3D": 0,
-      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
-      "GL_TEXTURE_BINDING_RECTANGLE": 0,
-      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
-      "GL_TEXTURE_BINDING_CUBE_MAP": 0,
-      "GL_TEXTURE_ENV": {
-        "GL_ALPHA_SCALE": 1,
-        "GL_TEXTURE_ENV_MODE": "GL_MODULATE",
-        "GL_TEXTURE_ENV_COLOR": [0, 0, 0, 0],
-        "GL_COMBINE_RGB": "GL_MODULATE",
-        "GL_COMBINE_ALPHA": "GL_MODULATE",
-        "GL_RGB_SCALE": 1,
-        "GL_SRC0_RGB": "GL_TEXTURE",
-        "GL_SRC1_RGB": "GL_PREVIOUS",
-        "GL_SRC2_RGB": "GL_CONSTANT",
-        "GL_SRC0_ALPHA": "GL_TEXTURE",
-        "GL_SRC1_ALPHA": "GL_PREVIOUS",
-        "GL_SRC2_ALPHA": "GL_CONSTANT",
-        "GL_OPERAND0_RGB": "GL_SRC_COLOR",
-        "GL_OPERAND1_RGB": "GL_SRC_COLOR",
-        "GL_OPERAND2_RGB": "GL_SRC_ALPHA",
-        "GL_OPERAND0_ALPHA": "GL_SRC_ALPHA",
-        "GL_OPERAND1_ALPHA": "GL_SRC_ALPHA",
-        "GL_OPERAND2_ALPHA": "GL_SRC_ALPHA"
-      },
-      "GL_TEXTURE_FILTER_CONTROL": {
-        "GL_TEXTURE_LOD_BIAS": 0
-      },
-      "GL_POINT_SPRITE": {
-        "GL_COORD_REPLACE": "GL_FALSE"
-      }
-    },
-    "GL_TEXTURE4": {
-      "GL_TEXTURE_1D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_1D": 0,
-      "GL_TEXTURE_2D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_2D": 0,
-      "GL_TEXTURE_3D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_3D": 0,
-      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
-      "GL_TEXTURE_BINDING_RECTANGLE": 0,
-      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
-      "GL_TEXTURE_BINDING_CUBE_MAP": 0,
-      "GL_TEXTURE_ENV": {
-        "GL_ALPHA_SCALE": 1,
-        "GL_TEXTURE_ENV_MODE": "GL_MODULATE",
-        "GL_TEXTURE_ENV_COLOR": [0, 0, 0, 0],
-        "GL_COMBINE_RGB": "GL_MODULATE",
-        "GL_COMBINE_ALPHA": "GL_MODULATE",
-        "GL_RGB_SCALE": 1,
-        "GL_SRC0_RGB": "GL_TEXTURE",
-        "GL_SRC1_RGB": "GL_PREVIOUS",
-        "GL_SRC2_RGB": "GL_CONSTANT",
-        "GL_SRC0_ALPHA": "GL_TEXTURE",
-        "GL_SRC1_ALPHA": "GL_PREVIOUS",
-        "GL_SRC2_ALPHA": "GL_CONSTANT",
-        "GL_OPERAND0_RGB": "GL_SRC_COLOR",
-        "GL_OPERAND1_RGB": "GL_SRC_COLOR",
-        "GL_OPERAND2_RGB": "GL_SRC_ALPHA",
-        "GL_OPERAND0_ALPHA": "GL_SRC_ALPHA",
-        "GL_OPERAND1_ALPHA": "GL_SRC_ALPHA",
-        "GL_OPERAND2_ALPHA": "GL_SRC_ALPHA"
-      },
-      "GL_TEXTURE_FILTER_CONTROL": {
-        "GL_TEXTURE_LOD_BIAS": 0
-      },
-      "GL_POINT_SPRITE": {
-        "GL_COORD_REPLACE": "GL_FALSE"
-      }
-    },
-    "GL_TEXTURE5": {
-      "GL_TEXTURE_1D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_1D": 0,
-      "GL_TEXTURE_2D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_2D": 0,
-      "GL_TEXTURE_3D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_3D": 0,
-      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
-      "GL_TEXTURE_BINDING_RECTANGLE": 0,
-      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
-      "GL_TEXTURE_BINDING_CUBE_MAP": 0,
-      "GL_TEXTURE_ENV": {
-        "GL_ALPHA_SCALE": 1,
-        "GL_TEXTURE_ENV_MODE": "GL_MODULATE",
-        "GL_TEXTURE_ENV_COLOR": [0, 0, 0, 0],
-        "GL_COMBINE_RGB": "GL_MODULATE",
-        "GL_COMBINE_ALPHA": "GL_MODULATE",
-        "GL_RGB_SCALE": 1,
-        "GL_SRC0_RGB": "GL_TEXTURE",
-        "GL_SRC1_RGB": "GL_PREVIOUS",
-        "GL_SRC2_RGB": "GL_CONSTANT",
-        "GL_SRC0_ALPHA": "GL_TEXTURE",
-        "GL_SRC1_ALPHA": "GL_PREVIOUS",
-        "GL_SRC2_ALPHA": "GL_CONSTANT",
-        "GL_OPERAND0_RGB": "GL_SRC_COLOR",
-        "GL_OPERAND1_RGB": "GL_SRC_COLOR",
-        "GL_OPERAND2_RGB": "GL_SRC_ALPHA",
-        "GL_OPERAND0_ALPHA": "GL_SRC_ALPHA",
-        "GL_OPERAND1_ALPHA": "GL_SRC_ALPHA",
-        "GL_OPERAND2_ALPHA": "GL_SRC_ALPHA"
-      },
-      "GL_TEXTURE_FILTER_CONTROL": {
-        "GL_TEXTURE_LOD_BIAS": 0
-      },
-      "GL_POINT_SPRITE": {
-        "GL_COORD_REPLACE": "GL_FALSE"
-      }
-    },
-    "GL_TEXTURE6": {
-      "GL_TEXTURE_1D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_1D": 0,
-      "GL_TEXTURE_2D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_2D": 0,
-      "GL_TEXTURE_3D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_3D": 0,
-      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
-      "GL_TEXTURE_BINDING_RECTANGLE": 0,
-      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
-      "GL_TEXTURE_BINDING_CUBE_MAP": 0,
-      "GL_TEXTURE_ENV": {
-        "GL_ALPHA_SCALE": 1,
-        "GL_TEXTURE_ENV_MODE": "GL_MODULATE",
-        "GL_TEXTURE_ENV_COLOR": [0, 0, 0, 0],
-        "GL_COMBINE_RGB": "GL_MODULATE",
-        "GL_COMBINE_ALPHA": "GL_MODULATE",
-        "GL_RGB_SCALE": 1,
-        "GL_SRC0_RGB": "GL_TEXTURE",
-        "GL_SRC1_RGB": "GL_PREVIOUS",
-        "GL_SRC2_RGB": "GL_CONSTANT",
-        "GL_SRC0_ALPHA": "GL_TEXTURE",
-        "GL_SRC1_ALPHA": "GL_PREVIOUS",
-        "GL_SRC2_ALPHA": "GL_CONSTANT",
-        "GL_OPERAND0_RGB": "GL_SRC_COLOR",
-        "GL_OPERAND1_RGB": "GL_SRC_COLOR",
-        "GL_OPERAND2_RGB": "GL_SRC_ALPHA",
-        "GL_OPERAND0_ALPHA": "GL_SRC_ALPHA",
-        "GL_OPERAND1_ALPHA": "GL_SRC_ALPHA",
-        "GL_OPERAND2_ALPHA": "GL_SRC_ALPHA"
-      },
-      "GL_TEXTURE_FILTER_CONTROL": {
-        "GL_TEXTURE_LOD_BIAS": 0
-      },
-      "GL_POINT_SPRITE": {
-        "GL_COORD_REPLACE": "GL_FALSE"
-      }
-    },
-    "GL_TEXTURE7": {
-      "GL_TEXTURE_1D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_1D": 0,
-      "GL_TEXTURE_2D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_2D": 0,
-      "GL_TEXTURE_3D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_3D": 0,
-      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
-      "GL_TEXTURE_BINDING_RECTANGLE": 0,
-      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
-      "GL_TEXTURE_BINDING_CUBE_MAP": 0,
-      "GL_TEXTURE_ENV": {
-        "GL_ALPHA_SCALE": 1,
-        "GL_TEXTURE_ENV_MODE": "GL_MODULATE",
-        "GL_TEXTURE_ENV_COLOR": [0, 0, 0, 0],
-        "GL_COMBINE_RGB": "GL_MODULATE",
-        "GL_COMBINE_ALPHA": "GL_MODULATE",
-        "GL_RGB_SCALE": 1,
-        "GL_SRC0_RGB": "GL_TEXTURE",
-        "GL_SRC1_RGB": "GL_PREVIOUS",
-        "GL_SRC2_RGB": "GL_CONSTANT",
-        "GL_SRC0_ALPHA": "GL_TEXTURE",
-        "GL_SRC1_ALPHA": "GL_PREVIOUS",
-        "GL_SRC2_ALPHA": "GL_CONSTANT",
-        "GL_OPERAND0_RGB": "GL_SRC_COLOR",
-        "GL_OPERAND1_RGB": "GL_SRC_COLOR",
-        "GL_OPERAND2_RGB": "GL_SRC_ALPHA",
-        "GL_OPERAND0_ALPHA": "GL_SRC_ALPHA",
-        "GL_OPERAND1_ALPHA": "GL_SRC_ALPHA",
-        "GL_OPERAND2_ALPHA": "GL_SRC_ALPHA"
-      },
-      "GL_TEXTURE_FILTER_CONTROL": {
-        "GL_TEXTURE_LOD_BIAS": 0
-      },
-      "GL_POINT_SPRITE": {
-        "GL_COORD_REPLACE": "GL_FALSE"
-      }
-    },
-    "GL_TEXTURE8": {
-      "GL_TEXTURE_1D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_1D": 0,
-      "GL_TEXTURE_2D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_2D": 0,
-      "GL_TEXTURE_3D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_3D": 0,
-      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
-      "GL_TEXTURE_BINDING_RECTANGLE": 0,
-      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
-      "GL_TEXTURE_BINDING_CUBE_MAP": 0
-    },
-    "GL_TEXTURE9": {
-      "GL_TEXTURE_1D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_1D": 0,
-      "GL_TEXTURE_2D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_2D": 0,
-      "GL_TEXTURE_3D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_3D": 0,
-      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
-      "GL_TEXTURE_BINDING_RECTANGLE": 0,
-      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
-      "GL_TEXTURE_BINDING_CUBE_MAP": 0
-    },
-    "GL_TEXTURE10": {
-      "GL_TEXTURE_1D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_1D": 0,
-      "GL_TEXTURE_2D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_2D": 0,
-      "GL_TEXTURE_3D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_3D": 0,
-      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
-      "GL_TEXTURE_BINDING_RECTANGLE": 0,
-      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
-      "GL_TEXTURE_BINDING_CUBE_MAP": 0
-    },
-    "GL_TEXTURE11": {
-      "GL_TEXTURE_1D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_1D": 0,
-      "GL_TEXTURE_2D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_2D": 0,
-      "GL_TEXTURE_3D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_3D": 0,
-      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
-      "GL_TEXTURE_BINDING_RECTANGLE": 0,
-      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
-      "GL_TEXTURE_BINDING_CUBE_MAP": 0
-    },
-    "GL_TEXTURE12": {
-      "GL_TEXTURE_1D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_1D": 0,
-      "GL_TEXTURE_2D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_2D": 0,
-      "GL_TEXTURE_3D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_3D": 0,
-      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
-      "GL_TEXTURE_BINDING_RECTANGLE": 0,
-      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
-      "GL_TEXTURE_BINDING_CUBE_MAP": 0
-    },
-    "GL_TEXTURE13": {
-      "GL_TEXTURE_1D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_1D": 0,
-      "GL_TEXTURE_2D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_2D": 0,
-      "GL_TEXTURE_3D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_3D": 0,
-      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
-      "GL_TEXTURE_BINDING_RECTANGLE": 0,
-      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
-      "GL_TEXTURE_BINDING_CUBE_MAP": 0
-    },
-    "GL_TEXTURE14": {
-      "GL_TEXTURE_1D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_1D": 0,
-      "GL_TEXTURE_2D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_2D": 0,
-      "GL_TEXTURE_3D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_3D": 0,
-      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
-      "GL_TEXTURE_BINDING_RECTANGLE": 0,
-      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
-      "GL_TEXTURE_BINDING_CUBE_MAP": 0
-    },
-    "GL_TEXTURE15": {
-      "GL_TEXTURE_1D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_1D": 0,
-      "GL_TEXTURE_2D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_2D": 0,
-      "GL_TEXTURE_3D": "GL_FALSE",
-      "GL_TEXTURE_BINDING_3D": 0,
-      "GL_TEXTURE_RECTANGLE": "GL_FALSE",
-      "GL_TEXTURE_BINDING_RECTANGLE": 0,
-      "GL_TEXTURE_CUBE_MAP": "GL_FALSE",
-      "GL_TEXTURE_BINDING_CUBE_MAP": 0
-    }
-  },
-  "shaders": {},
-  "uniforms": {},
-  "textures": {},
-  "framebuffer": {}
-}
index cb3cedf6302ba94028952b918f1b9edead4642a6..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1 +0,0 @@
-#state default.ref.json
diff --git a/apps/gl/default_db.ref.0.json b/apps/gl/default_db.ref.0.json
new file mode 100644 (file)
index 0000000..772db7b
--- /dev/null
@@ -0,0 +1,8 @@
+{
+  "parameters": {
+    "GL_DRAW_BUFFER": "GL_BACK",
+    "GL_DRAW_BUFFER0": "GL_BACK",
+    "GL_READ_BUFFER": "GL_BACK",
+    "GL_DOUBLEBUFFER": "GL_TRUE"
+  }
+}
diff --git a/apps/gl/default_db.ref.json b/apps/gl/default_db.ref.json
deleted file mode 100644 (file)
index 772db7b..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "parameters": {
-    "GL_DRAW_BUFFER": "GL_BACK",
-    "GL_DRAW_BUFFER0": "GL_BACK",
-    "GL_READ_BUFFER": "GL_BACK",
-    "GL_DOUBLEBUFFER": "GL_TRUE"
-  }
-}
index 17281f8a8ed4033d2977d42a38f0ef5d942341ff..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1 +0,0 @@
-#state default_db.ref.json
diff --git a/apps/gl/default_sb.ref.0.json b/apps/gl/default_sb.ref.0.json
new file mode 100644 (file)
index 0000000..6ac5992
--- /dev/null
@@ -0,0 +1,8 @@
+{
+  "parameters": {
+    "GL_DRAW_BUFFER": "GL_FRONT",
+    "GL_DRAW_BUFFER0": "GL_FRONT",
+    "GL_READ_BUFFER": "GL_FRONT",
+    "GL_DOUBLEBUFFER": "GL_FALSE"
+  }
+}
diff --git a/apps/gl/default_sb.ref.json b/apps/gl/default_sb.ref.json
deleted file mode 100644 (file)
index 6ac5992..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "parameters": {
-    "GL_DRAW_BUFFER": "GL_FRONT",
-    "GL_DRAW_BUFFER0": "GL_FRONT",
-    "GL_READ_BUFFER": "GL_FRONT",
-    "GL_DOUBLEBUFFER": "GL_FALSE"
-  }
-}
index 48c62240f3ba927349758d0d9eacb6ea3a1ab41c..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1 +0,0 @@
-#state default_sb.ref.json
diff --git a/apps/gl/tri.ref.flush.json b/apps/gl/tri.ref.flush.json
new file mode 100644 (file)
index 0000000..228a83a
--- /dev/null
@@ -0,0 +1,10 @@
+{
+  "parameters": {
+    "GL_CURRENT_COLOR": [0, 0, 0.7, 1],
+    "GL_VIEWPORT": [0, 0, 250, 250],
+    "GL_PROJECTION_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -0.001999001, 0, 0, 0, -0.9990005, 1],
+    "GL_SCISSOR_BOX": [0, 0, 250, 250],
+    "GL_COLOR_CLEAR_VALUE": [0.3, 0.1, 0.3, 1],
+    "GL_TRANSPOSE_PROJECTION_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -0.001999001, -0.9990005, 0, 0, 0, 1]
+  }
+}
diff --git a/apps/gl/tri.ref.flush.png b/apps/gl/tri.ref.flush.png
new file mode 100644 (file)
index 0000000..c89183b
Binary files /dev/null and b/apps/gl/tri.ref.flush.png differ
diff --git a/apps/gl/tri.ref.json b/apps/gl/tri.ref.json
deleted file mode 100644 (file)
index 228a83a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  "parameters": {
-    "GL_CURRENT_COLOR": [0, 0, 0.7, 1],
-    "GL_VIEWPORT": [0, 0, 250, 250],
-    "GL_PROJECTION_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -0.001999001, 0, 0, 0, -0.9990005, 1],
-    "GL_SCISSOR_BOX": [0, 0, 250, 250],
-    "GL_COLOR_CLEAR_VALUE": [0.3, 0.1, 0.3, 1],
-    "GL_TRANSPOSE_PROJECTION_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -0.001999001, -0.9990005, 0, 0, 0, 1]
-  }
-}
diff --git a/apps/gl/tri.ref.png b/apps/gl/tri.ref.png
deleted file mode 100644 (file)
index c89183b..0000000
Binary files a/apps/gl/tri.ref.png and /dev/null differ
index 90dd8aa6bd96b12e95586757d4b85094b29ea513..1288d924bc0e67d1dc1167375cbce59fac93cd5d 100644 (file)
@@ -13,6 +13,4 @@ glVertex3f(x = 0.9, y = -0.9, z = -30)
 glColor3f(red = 0, green = 0, blue = 0.7)
 glVertex3f(x = 0, y = 0.9, z = -30)
 glEnd()
-glFlush()
-#image tri.ref.png
-#state tri.ref.json
+<flush> glFlush()
index 1971fce5a88d616608c918fd16b6152ceadd0673..d71cab10ff3cff21e2555f6aad4f5f743b7fc7ff 100644 (file)
@@ -169,8 +169,6 @@ class Driver:
         if not args:
             optparser.error('an argument must be specified')
         
-        print get_scripts_path()
-
         sys.path.insert(0, get_scripts_path())
 
         self.options = options
index 68949b16ce35fad0d6ee37c1ee0ad94125255ede..41320c17f27112fa7c6f9d6e091a4c08720cf328 100755 (executable)
@@ -430,7 +430,7 @@ class Parser:
 
 #######################################################################
 
-ID, NUMBER, HEXNUM, STRING, WILDCARD, PRAGMA, LPAREN, RPAREN, LCURLY, RCURLY, COMMA, AMP, EQUAL, PLUS, VERT, BLOB = xrange(16)
+ID, NUMBER, HEXNUM, STRING, WILDCARD, LPAREN, RPAREN, LCURLY, RCURLY, COMMA, AMP, EQUAL, PLUS, VERT, BLOB = xrange(15)
 
 
 class CallScanner(Scanner):
@@ -454,9 +454,6 @@ class CallScanner(Scanner):
         
         # Wildcard
         (WILDCARD, r'<[^>]*>', False),
-        
-        # Pragma
-        (PRAGMA, r'#[^\r\n]*', False),
     ]
 
     # symbol table
@@ -510,15 +507,8 @@ class TraceParser(Parser):
 
     def parse(self):
         while not self.eof():
-            self.parse_element()
-        return TraceMatcher(self.calls)
-
-    def parse_element(self):
-        if self.lookahead.type == PRAGMA:
-            token = self.consume()
-            self.handlePragma(token.text)
-        else:
             self.parse_call()
+        return TraceMatcher(self.calls)
 
     def parse_call(self):
         if self.lookahead.type == NUMBER:
@@ -686,14 +676,11 @@ class TraceParser(Parser):
     def handleCall(self, callNo, functionName, args, ret):
         raise NotImplementedError
 
-    def handlePragma(self, line):
-        raise NotImplementedError
-
 
 class RefTraceParser(TraceParser):
 
-    def __init__(self, stream):
-        TraceParser.__init__(self, stream)
+    def __init__(self, fileName):
+        TraceParser.__init__(self, open(fileName, 'rt'))
         self.calls = []
 
     def parse(self):
@@ -730,9 +717,6 @@ class RefTraceParser(TraceParser):
     def handleCall(self, callNo, functionName, args, ret):
         call = CallMatcher(callNo, functionName, args, ret)
         self.calls.append(call)
-    
-    def handlePragma(self, line):
-        pass
 
 
 class SrcTraceParser(TraceParser):
@@ -792,8 +776,7 @@ def main():
 
     refFileName, srcFileName = args
 
-    refStream = open(refFileName, 'rt')
-    refParser = RefTraceParser(refStream)
+    refParser = RefTraceParser(refFileName)
     refTrace = refParser.parse()
     if options.verbose:
         sys.stdout.write('// Reference\n')