web-dom 0.1.1

Simple bindings to the DOM using wasm-module
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
#[allow(unused_imports)]
use crate::*;
pub const DEPTH_BUFFER_BIT: f32 = 0x00000100 as f32;
pub const STENCIL_BUFFER_BIT: f32 = 0x00000400 as f32;
pub const COLOR_BUFFER_BIT: f32 = 0x00004000 as f32;
pub const POINTS: f32 = 0x0000 as f32;
pub const LINES: f32 = 0x0001 as f32;
pub const LINE_LOOP: f32 = 0x0002 as f32;
pub const LINE_STRIP: f32 = 0x0003 as f32;
pub const TRIANGLES: f32 = 0x0004 as f32;
pub const TRIANGLE_STRIP: f32 = 0x0005 as f32;
pub const TRIANGLE_FAN: f32 = 0x0006 as f32;
pub const ZERO: f32 = 0 as f32;
pub const ONE: f32 = 1 as f32;
pub const SRC_COLOR: f32 = 0x0300 as f32;
pub const ONE_MINUS_SRC_COLOR: f32 = 0x0301 as f32;
pub const SRC_ALPHA: f32 = 0x0302 as f32;
pub const ONE_MINUS_SRC_ALPHA: f32 = 0x0303 as f32;
pub const DST_ALPHA: f32 = 0x0304 as f32;
pub const ONE_MINUS_DST_ALPHA: f32 = 0x0305 as f32;
pub const DST_COLOR: f32 = 0x0306 as f32;
pub const ONE_MINUS_DST_COLOR: f32 = 0x0307 as f32;
pub const SRC_ALPHA_SATURATE: f32 = 0x0308 as f32;
pub const FUNC_ADD: f32 = 0x8006 as f32;
pub const BLEND_EQUATION: f32 = 0x8009 as f32;
pub const BLEND_EQUATION_RGB: f32 = 0x8009 as f32;
pub const BLEND_EQUATION_ALPHA: f32 = 0x883D as f32;
pub const FUNC_SUBTRACT: f32 = 0x800A as f32;
pub const FUNC_REVERSE_SUBTRACT: f32 = 0x800B as f32;
pub const BLEND_DST_RGB: f32 = 0x80C8 as f32;
pub const BLEND_SRC_RGB: f32 = 0x80C9 as f32;
pub const BLEND_DST_ALPHA: f32 = 0x80CA as f32;
pub const BLEND_SRC_ALPHA: f32 = 0x80CB as f32;
pub const CONSTANT_COLOR: f32 = 0x8001 as f32;
pub const ONE_MINUS_CONSTANT_COLOR: f32 = 0x8002 as f32;
pub const CONSTANT_ALPHA: f32 = 0x8003 as f32;
pub const ONE_MINUS_CONSTANT_ALPHA: f32 = 0x8004 as f32;
pub const BLEND_COLOR: f32 = 0x8005 as f32;
pub const ARRAY_BUFFER: f32 = 0x8892 as f32;
pub const ELEMENT_ARRAY_BUFFER: f32 = 0x8893 as f32;
pub const ARRAY_BUFFER_BINDING: f32 = 0x8894 as f32;
pub const ELEMENT_ARRAY_BUFFER_BINDING: f32 = 0x8895 as f32;
pub const STREAM_DRAW: f32 = 0x88E0 as f32;
pub const STATIC_DRAW: f32 = 0x88E4 as f32;
pub const DYNAMIC_DRAW: f32 = 0x88E8 as f32;
pub const BUFFER_SIZE: f32 = 0x8764 as f32;
pub const BUFFER_USAGE: f32 = 0x8765 as f32;
pub const CURRENT_VERTEX_ATTRIB: f32 = 0x8626 as f32;
pub const FRONT: f32 = 0x0404 as f32;
pub const BACK: f32 = 0x0405 as f32;
pub const FRONT_AND_BACK: f32 = 0x0408 as f32;
pub const CULL_FACE: f32 = 0x0B44 as f32;
pub const BLEND: f32 = 0x0BE2 as f32;
pub const DITHER: f32 = 0x0BD0 as f32;
pub const STENCIL_TEST: f32 = 0x0B90 as f32;
pub const DEPTH_TEST: f32 = 0x0B71 as f32;
pub const SCISSOR_TEST: f32 = 0x0C11 as f32;
pub const POLYGON_OFFSET_FILL: f32 = 0x8037 as f32;
pub const SAMPLE_ALPHA_TO_COVERAGE: f32 = 0x809E as f32;
pub const SAMPLE_COVERAGE: f32 = 0x80A0 as f32;
pub const NO_ERROR: f32 = 0 as f32;
pub const INVALID_ENUM: f32 = 0x0500 as f32;
pub const INVALID_VALUE: f32 = 0x0501 as f32;
pub const INVALID_OPERATION: f32 = 0x0502 as f32;
pub const OUT_OF_MEMORY: f32 = 0x0505 as f32;
pub const CW: f32 = 0x0900 as f32;
pub const CCW: f32 = 0x0901 as f32;
pub const LINE_WIDTH: f32 = 0x0B21 as f32;
pub const ALIASED_POINT_SIZE_RANGE: f32 = 0x846D as f32;
pub const ALIASED_LINE_WIDTH_RANGE: f32 = 0x846E as f32;
pub const CULL_FACE_MODE: f32 = 0x0B45 as f32;
pub const FRONT_FACE: f32 = 0x0B46 as f32;
pub const DEPTH_RANGE: f32 = 0x0B70 as f32;
pub const DEPTH_WRITEMASK: f32 = 0x0B72 as f32;
pub const DEPTH_CLEAR_VALUE: f32 = 0x0B73 as f32;
pub const DEPTH_FUNC: f32 = 0x0B74 as f32;
pub const STENCIL_CLEAR_VALUE: f32 = 0x0B91 as f32;
pub const STENCIL_FUNC: f32 = 0x0B92 as f32;
pub const STENCIL_FAIL: f32 = 0x0B94 as f32;
pub const STENCIL_PASS_DEPTH_FAIL: f32 = 0x0B95 as f32;
pub const STENCIL_PASS_DEPTH_PASS: f32 = 0x0B96 as f32;
pub const STENCIL_REF: f32 = 0x0B97 as f32;
pub const STENCIL_VALUE_MASK: f32 = 0x0B93 as f32;
pub const STENCIL_WRITEMASK: f32 = 0x0B98 as f32;
pub const STENCIL_BACK_FUNC: f32 = 0x8800 as f32;
pub const STENCIL_BACK_FAIL: f32 = 0x8801 as f32;
pub const STENCIL_BACK_PASS_DEPTH_FAIL: f32 = 0x8802 as f32;
pub const STENCIL_BACK_PASS_DEPTH_PASS: f32 = 0x8803 as f32;
pub const STENCIL_BACK_REF: f32 = 0x8CA3 as f32;
pub const STENCIL_BACK_VALUE_MASK: f32 = 0x8CA4 as f32;
pub const STENCIL_BACK_WRITEMASK: f32 = 0x8CA5 as f32;
pub const VIEWPORT: f32 = 0x0BA2 as f32;
pub const SCISSOR_BOX: f32 = 0x0C10 as f32;
pub const COLOR_CLEAR_VALUE: f32 = 0x0C22 as f32;
pub const COLOR_WRITEMASK: f32 = 0x0C23 as f32;
pub const UNPACK_ALIGNMENT: f32 = 0x0CF5 as f32;
pub const PACK_ALIGNMENT: f32 = 0x0D05 as f32;
pub const MAX_TEXTURE_SIZE: f32 = 0x0D33 as f32;
pub const MAX_VIEWPORT_DIMS: f32 = 0x0D3A as f32;
pub const SUBPIXEL_BITS: f32 = 0x0D50 as f32;
pub const RED_BITS: f32 = 0x0D52 as f32;
pub const GREEN_BITS: f32 = 0x0D53 as f32;
pub const BLUE_BITS: f32 = 0x0D54 as f32;
pub const ALPHA_BITS: f32 = 0x0D55 as f32;
pub const DEPTH_BITS: f32 = 0x0D56 as f32;
pub const STENCIL_BITS: f32 = 0x0D57 as f32;
pub const POLYGON_OFFSET_UNITS: f32 = 0x2A00 as f32;
pub const POLYGON_OFFSET_FACTOR: f32 = 0x8038 as f32;
pub const TEXTURE_BINDING_2D: f32 = 0x8069 as f32;
pub const SAMPLE_BUFFERS: f32 = 0x80A8 as f32;
pub const SAMPLES: f32 = 0x80A9 as f32;
pub const SAMPLE_COVERAGE_VALUE: f32 = 0x80AA as f32;
pub const SAMPLE_COVERAGE_INVERT: f32 = 0x80AB as f32;
pub const COMPRESSED_TEXTURE_FORMATS: f32 = 0x86A3 as f32;
pub const DONT_CARE: f32 = 0x1100 as f32;
pub const FASTEST: f32 = 0x1101 as f32;
pub const NICEST: f32 = 0x1102 as f32;
pub const GENERATE_MIPMAP_HINT: f32 = 0x8192 as f32;
pub const BYTE: f32 = 0x1400 as f32;
pub const UNSIGNED_BYTE: f32 = 0x1401 as f32;
pub const SHORT: f32 = 0x1402 as f32;
pub const UNSIGNED_SHORT: f32 = 0x1403 as f32;
pub const INT: f32 = 0x1404 as f32;
pub const UNSIGNED_INT: f32 = 0x1405 as f32;
pub const FLOAT: f32 = 0x1406 as f32;
pub const DEPTH_COMPONENT: f32 = 0x1902 as f32;
pub const ALPHA: f32 = 0x1906 as f32;
pub const RGB: f32 = 0x1907 as f32;
pub const RGBA: f32 = 0x1908 as f32;
pub const LUMINANCE: f32 = 0x1909 as f32;
pub const LUMINANCE_ALPHA: f32 = 0x190A as f32;
pub const UNSIGNED_SHORT_4_4_4_4: f32 = 0x8033 as f32;
pub const UNSIGNED_SHORT_5_5_5_1: f32 = 0x8034 as f32;
pub const UNSIGNED_SHORT_5_6_5: f32 = 0x8363 as f32;
pub const FRAGMENT_SHADER: f32 = 0x8B30 as f32;
pub const VERTEX_SHADER: f32 = 0x8B31 as f32;
pub const MAX_VERTEX_ATTRIBS: f32 = 0x8869 as f32;
pub const MAX_VERTEX_UNIFORM_VECTORS: f32 = 0x8DFB as f32;
pub const MAX_VARYING_VECTORS: f32 = 0x8DFC as f32;
pub const MAX_COMBINED_TEXTURE_IMAGE_UNITS: f32 = 0x8B4D as f32;
pub const MAX_VERTEX_TEXTURE_IMAGE_UNITS: f32 = 0x8B4C as f32;
pub const MAX_TEXTURE_IMAGE_UNITS: f32 = 0x8872 as f32;
pub const MAX_FRAGMENT_UNIFORM_VECTORS: f32 = 0x8DFD as f32;
pub const SHADER_TYPE: f32 = 0x8B4F as f32;
pub const DELETE_STATUS: f32 = 0x8B80 as f32;
pub const LINK_STATUS: f32 = 0x8B82 as f32;
pub const VALIDATE_STATUS: f32 = 0x8B83 as f32;
pub const ATTACHED_SHADERS: f32 = 0x8B85 as f32;
pub const ACTIVE_UNIFORMS: f32 = 0x8B86 as f32;
pub const ACTIVE_ATTRIBUTES: f32 = 0x8B89 as f32;
pub const SHADING_LANGUAGE_VERSION: f32 = 0x8B8C as f32;
pub const CURRENT_PROGRAM: f32 = 0x8B8D as f32;
pub const NEVER: f32 = 0x0200 as f32;
pub const LESS: f32 = 0x0201 as f32;
pub const EQUAL: f32 = 0x0202 as f32;
pub const LEQUAL: f32 = 0x0203 as f32;
pub const GREATER: f32 = 0x0204 as f32;
pub const NOTEQUAL: f32 = 0x0205 as f32;
pub const GEQUAL: f32 = 0x0206 as f32;
pub const ALWAYS: f32 = 0x0207 as f32;
pub const KEEP: f32 = 0x1E00 as f32;
pub const REPLACE: f32 = 0x1E01 as f32;
pub const INCR: f32 = 0x1E02 as f32;
pub const DECR: f32 = 0x1E03 as f32;
pub const INVERT: f32 = 0x150A as f32;
pub const INCR_WRAP: f32 = 0x8507 as f32;
pub const DECR_WRAP: f32 = 0x8508 as f32;
pub const VENDOR: f32 = 0x1F00 as f32;
pub const RENDERER: f32 = 0x1F01 as f32;
pub const VERSION: f32 = 0x1F02 as f32;
pub const NEAREST: f32 = 0x2600 as f32;
pub const LINEAR: f32 = 0x2601 as f32;
pub const NEAREST_MIPMAP_NEAREST: f32 = 0x2700 as f32;
pub const LINEAR_MIPMAP_NEAREST: f32 = 0x2701 as f32;
pub const NEAREST_MIPMAP_LINEAR: f32 = 0x2702 as f32;
pub const LINEAR_MIPMAP_LINEAR: f32 = 0x2703 as f32;
pub const TEXTURE_MAG_FILTER: f32 = 0x2800 as f32;
pub const TEXTURE_MIN_FILTER: f32 = 0x2801 as f32;
pub const TEXTURE_WRAP_S: f32 = 0x2802 as f32;
pub const TEXTURE_WRAP_T: f32 = 0x2803 as f32;
pub const TEXTURE_2D: f32 = 0x0DE1 as f32;
pub const TEXTURE: f32 = 0x1702 as f32;
pub const TEXTURE_CUBE_MAP: f32 = 0x8513 as f32;
pub const TEXTURE_BINDING_CUBE_MAP: f32 = 0x8514 as f32;
pub const TEXTURE_CUBE_MAP_POSITIVE_X: f32 = 0x8515 as f32;
pub const TEXTURE_CUBE_MAP_NEGATIVE_X: f32 = 0x8516 as f32;
pub const TEXTURE_CUBE_MAP_POSITIVE_Y: f32 = 0x8517 as f32;
pub const TEXTURE_CUBE_MAP_NEGATIVE_Y: f32 = 0x8518 as f32;
pub const TEXTURE_CUBE_MAP_POSITIVE_Z: f32 = 0x8519 as f32;
pub const TEXTURE_CUBE_MAP_NEGATIVE_Z: f32 = 0x851A as f32;
pub const MAX_CUBE_MAP_TEXTURE_SIZE: f32 = 0x851C as f32;
pub const TEXTURE0: f32 = 0x84C0 as f32;
pub const TEXTURE1: f32 = 0x84C1 as f32;
pub const TEXTURE2: f32 = 0x84C2 as f32;
pub const TEXTURE3: f32 = 0x84C3 as f32;
pub const TEXTURE4: f32 = 0x84C4 as f32;
pub const TEXTURE5: f32 = 0x84C5 as f32;
pub const TEXTURE6: f32 = 0x84C6 as f32;
pub const TEXTURE7: f32 = 0x84C7 as f32;
pub const TEXTURE8: f32 = 0x84C8 as f32;
pub const TEXTURE9: f32 = 0x84C9 as f32;
pub const TEXTURE10: f32 = 0x84CA as f32;
pub const TEXTURE11: f32 = 0x84CB as f32;
pub const TEXTURE12: f32 = 0x84CC as f32;
pub const TEXTURE13: f32 = 0x84CD as f32;
pub const TEXTURE14: f32 = 0x84CE as f32;
pub const TEXTURE15: f32 = 0x84CF as f32;
pub const TEXTURE16: f32 = 0x84D0 as f32;
pub const TEXTURE17: f32 = 0x84D1 as f32;
pub const TEXTURE18: f32 = 0x84D2 as f32;
pub const TEXTURE19: f32 = 0x84D3 as f32;
pub const TEXTURE20: f32 = 0x84D4 as f32;
pub const TEXTURE21: f32 = 0x84D5 as f32;
pub const TEXTURE22: f32 = 0x84D6 as f32;
pub const TEXTURE23: f32 = 0x84D7 as f32;
pub const TEXTURE24: f32 = 0x84D8 as f32;
pub const TEXTURE25: f32 = 0x84D9 as f32;
pub const TEXTURE26: f32 = 0x84DA as f32;
pub const TEXTURE27: f32 = 0x84DB as f32;
pub const TEXTURE28: f32 = 0x84DC as f32;
pub const TEXTURE29: f32 = 0x84DD as f32;
pub const TEXTURE30: f32 = 0x84DE as f32;
pub const TEXTURE31: f32 = 0x84DF as f32;
pub const ACTIVE_TEXTURE: f32 = 0x84E0 as f32;
pub const REPEAT: f32 = 0x2901 as f32;
pub const CLAMP_TO_EDGE: f32 = 0x812F as f32;
pub const MIRRORED_REPEAT: f32 = 0x8370 as f32;
pub const FLOAT_VEC2: f32 = 0x8B50 as f32;
pub const FLOAT_VEC3: f32 = 0x8B51 as f32;
pub const FLOAT_VEC4: f32 = 0x8B52 as f32;
pub const INT_VEC2: f32 = 0x8B53 as f32;
pub const INT_VEC3: f32 = 0x8B54 as f32;
pub const INT_VEC4: f32 = 0x8B55 as f32;
pub const BOOL: f32 = 0x8B56 as f32;
pub const BOOL_VEC2: f32 = 0x8B57 as f32;
pub const BOOL_VEC3: f32 = 0x8B58 as f32;
pub const BOOL_VEC4: f32 = 0x8B59 as f32;
pub const FLOAT_MAT2: f32 = 0x8B5A as f32;
pub const FLOAT_MAT3: f32 = 0x8B5B as f32;
pub const FLOAT_MAT4: f32 = 0x8B5C as f32;
pub const SAMPLER_2D: f32 = 0x8B5E as f32;
pub const SAMPLER_CUBE: f32 = 0x8B60 as f32;
pub const VERTEX_ATTRIB_ARRAY_ENABLED: f32 = 0x8622 as f32;
pub const VERTEX_ATTRIB_ARRAY_SIZE: f32 = 0x8623 as f32;
pub const VERTEX_ATTRIB_ARRAY_STRIDE: f32 = 0x8624 as f32;
pub const VERTEX_ATTRIB_ARRAY_TYPE: f32 = 0x8625 as f32;
pub const VERTEX_ATTRIB_ARRAY_NORMALIZED: f32 = 0x886A as f32;
pub const VERTEX_ATTRIB_ARRAY_POINTER: f32 = 0x8645 as f32;
pub const VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: f32 = 0x889F as f32;
pub const IMPLEMENTATION_COLOR_READ_TYPE: f32 = 0x8B9A as f32;
pub const IMPLEMENTATION_COLOR_READ_FORMAT: f32 = 0x8B9B as f32;
pub const COMPILE_STATUS: f32 = 0x8B81 as f32;
pub const LOW_FLOAT: f32 = 0x8DF0 as f32;
pub const MEDIUM_FLOAT: f32 = 0x8DF1 as f32;
pub const HIGH_FLOAT: f32 = 0x8DF2 as f32;
pub const LOW_INT: f32 = 0x8DF3 as f32;
pub const MEDIUM_INT: f32 = 0x8DF4 as f32;
pub const HIGH_INT: f32 = 0x8DF5 as f32;
pub const FRAMEBUFFER: f32 = 0x8D40 as f32;
pub const RENDERBUFFER: f32 = 0x8D41 as f32;
pub const RGBA4: f32 = 0x8056 as f32;
pub const RGB5_A1: f32 = 0x8057 as f32;
pub const RGB565: f32 = 0x8D62 as f32;
pub const DEPTH_COMPONENT16: f32 = 0x81A5 as f32;
pub const STENCIL_INDEX8: f32 = 0x8D48 as f32;
pub const DEPTH_STENCIL: f32 = 0x84F9 as f32;
pub const RENDERBUFFER_WIDTH: f32 = 0x8D42 as f32;
pub const RENDERBUFFER_HEIGHT: f32 = 0x8D43 as f32;
pub const RENDERBUFFER_INTERNAL_FORMAT: f32 = 0x8D44 as f32;
pub const RENDERBUFFER_RED_SIZE: f32 = 0x8D50 as f32;
pub const RENDERBUFFER_GREEN_SIZE: f32 = 0x8D51 as f32;
pub const RENDERBUFFER_BLUE_SIZE: f32 = 0x8D52 as f32;
pub const RENDERBUFFER_ALPHA_SIZE: f32 = 0x8D53 as f32;
pub const RENDERBUFFER_DEPTH_SIZE: f32 = 0x8D54 as f32;
pub const RENDERBUFFER_STENCIL_SIZE: f32 = 0x8D55 as f32;
pub const FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: f32 = 0x8CD0 as f32;
pub const FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: f32 = 0x8CD1 as f32;
pub const FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: f32 = 0x8CD2 as f32;
pub const FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: f32 = 0x8CD3 as f32;
pub const COLOR_ATTACHMENT0: f32 = 0x8CE0 as f32;
pub const DEPTH_ATTACHMENT: f32 = 0x8D00 as f32;
pub const STENCIL_ATTACHMENT: f32 = 0x8D20 as f32;
pub const DEPTH_STENCIL_ATTACHMENT: f32 = 0x821A as f32;
pub const NONE: f32 = 0 as f32;
pub const FRAMEBUFFER_COMPLETE: f32 = 0x8CD5 as f32;
pub const FRAMEBUFFER_INCOMPLETE_ATTACHMENT: f32 = 0x8CD6 as f32;
pub const FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: f32 = 0x8CD7 as f32;
pub const FRAMEBUFFER_INCOMPLETE_DIMENSIONS: f32 = 0x8CD9 as f32;
pub const FRAMEBUFFER_UNSUPPORTED: f32 = 0x8CDD as f32;
pub const FRAMEBUFFER_BINDING: f32 = 0x8CA6 as f32;
pub const RENDERBUFFER_BINDING: f32 = 0x8CA7 as f32;
pub const MAX_RENDERBUFFER_SIZE: f32 = 0x84E8 as f32;
pub const INVALID_FRAMEBUFFER_OPERATION: f32 = 0x0506 as f32;
pub const UNPACK_FLIP_Y_WEBGL: f32 = 0x9240 as f32;
pub const UNPACK_PREMULTIPLY_ALPHA_WEBGL: f32 = 0x9241 as f32;
pub const CONTEXT_LOST_WEBGL: f32 = 0x9242 as f32;
pub const UNPACK_COLORSPACE_CONVERSION_WEBGL: f32 = 0x9243 as f32;
pub const BROWSER_DEFAULT_WEBGL: f32 = 0x9244 as f32;
extern "C" {
    fn webgl_get_canvas(instance: DOMReference) -> DOMReference;
    fn webgl_set_canvas(instance: DOMReference, value: DOMReference);
}

pub fn get_canvas(instance: DOMReference) -> DOMReference {
    unsafe { webgl_get_canvas(instance) }
}

pub fn set_canvas(instance: DOMReference, value: DOMReference) {
    unsafe {
        webgl_set_canvas(instance, value);
    }
}
extern "C" {
    fn webgl_get_drawing_buffer_width(instance: DOMReference) -> f32;
    fn webgl_set_drawing_buffer_width(instance: DOMReference, value: f32);
}

pub fn get_drawing_buffer_width(instance: DOMReference) -> f32 {
    unsafe { webgl_get_drawing_buffer_width(instance) }
}

pub fn set_drawing_buffer_width(instance: DOMReference, value: f32) {
    unsafe {
        webgl_set_drawing_buffer_width(instance, value);
    }
}
extern "C" {
    fn webgl_get_drawing_buffer_height(instance: DOMReference) -> f32;
    fn webgl_set_drawing_buffer_height(instance: DOMReference, value: f32);
}

pub fn get_drawing_buffer_height(instance: DOMReference) -> f32 {
    unsafe { webgl_get_drawing_buffer_height(instance) }
}

pub fn set_drawing_buffer_height(instance: DOMReference, value: f32) {
    unsafe {
        webgl_set_drawing_buffer_height(instance, value);
    }
}
extern "C" {
    fn webgl_get_context_attributes(instance: DOMReference) -> DOMReference;
}

pub fn get_context_attributes(instance: DOMReference) -> DOMReference {
    unsafe { webgl_get_context_attributes(instance) }
}
extern "C" {
    fn webgl_is_context_lost(instance: DOMReference) -> i32;
}

pub fn is_context_lost(instance: DOMReference) -> bool {
    unsafe { 0 != webgl_is_context_lost(instance) }
}
extern "C" {
    fn webgl_get_supported_extensions(instance: DOMReference) -> DOMReference;
}

pub fn get_supported_extensions(instance: DOMReference) -> DOMReference {
    unsafe { webgl_get_supported_extensions(instance) }
}
extern "C" {
    fn webgl_get_extension(instance: DOMReference, get_extension: CString) -> DOMReference;
}

pub fn get_extension(instance: DOMReference, name: &str) -> DOMReference {
    unsafe { webgl_get_extension(instance, to_cstring(name)) }
}
extern "C" {
    fn webgl_active_texture(instance: DOMReference, active_texture: f32);
}

pub fn active_texture(instance: DOMReference, texture: f32) {
    unsafe { webgl_active_texture(instance, texture) }
}
extern "C" {
    fn webgl_attach_shader(
        instance: DOMReference,
        attach_shader: DOMReference,
        attach_shader: DOMReference,
    );
}

pub fn attach_shader(instance: DOMReference, program: DOMReference, shader: DOMReference) {
    unsafe { webgl_attach_shader(instance, program, shader) }
}
extern "C" {
    fn webgl_bind_attrib_location(
        instance: DOMReference,
        bind_attrib_location: DOMReference,
        bind_attrib_location: f32,
        bind_attrib_location: CString,
    );
}

pub fn bind_attrib_location(instance: DOMReference, program: DOMReference, index: f32, name: &str) {
    unsafe { webgl_bind_attrib_location(instance, program, index, to_cstring(name)) }
}
extern "C" {
    fn webgl_bind_buffer(instance: DOMReference, bind_buffer: f32, bind_buffer: DOMReference);
}

pub fn bind_buffer(instance: DOMReference, target: f32, buffer: DOMReference) {
    unsafe { webgl_bind_buffer(instance, target, buffer) }
}
extern "C" {
    fn webgl_bind_framebuffer(
        instance: DOMReference,
        bind_framebuffer: f32,
        bind_framebuffer: DOMReference,
    );
}

pub fn bind_framebuffer(instance: DOMReference, target: f32, framebuffer: DOMReference) {
    unsafe { webgl_bind_framebuffer(instance, target, framebuffer) }
}
extern "C" {
    fn webgl_bind_renderbuffer(
        instance: DOMReference,
        bind_renderbuffer: f32,
        bind_renderbuffer: DOMReference,
    );
}

pub fn bind_renderbuffer(instance: DOMReference, target: f32, renderbuffer: DOMReference) {
    unsafe { webgl_bind_renderbuffer(instance, target, renderbuffer) }
}
extern "C" {
    fn webgl_bind_texture(instance: DOMReference, bind_texture: f32, bind_texture: DOMReference);
}

pub fn bind_texture(instance: DOMReference, target: f32, texture: DOMReference) {
    unsafe { webgl_bind_texture(instance, target, texture) }
}
extern "C" {
    fn webgl_blend_color(
        instance: DOMReference,
        blend_color: f32,
        blend_color: f32,
        blend_color: f32,
        blend_color: f32,
    );
}

pub fn blend_color(instance: DOMReference, red: f32, green: f32, blue: f32, alpha: f32) {
    unsafe { webgl_blend_color(instance, red, green, blue, alpha) }
}
extern "C" {
    fn webgl_blend_equation(instance: DOMReference, blend_equation: f32);
}

pub fn blend_equation(instance: DOMReference, mode: f32) {
    unsafe { webgl_blend_equation(instance, mode) }
}
extern "C" {
    fn webgl_blend_equation_separate(
        instance: DOMReference,
        blend_equation_separate: f32,
        blend_equation_separate: f32,
    );
}

pub fn blend_equation_separate(instance: DOMReference, mode_r_g_b: f32, mode_alpha: f32) {
    unsafe { webgl_blend_equation_separate(instance, mode_r_g_b, mode_alpha) }
}
extern "C" {
    fn webgl_blend_func(instance: DOMReference, blend_func: f32, blend_func: f32);
}

pub fn blend_func(instance: DOMReference, sfactor: f32, dfactor: f32) {
    unsafe { webgl_blend_func(instance, sfactor, dfactor) }
}
extern "C" {
    fn webgl_blend_func_separate(
        instance: DOMReference,
        blend_func_separate: f32,
        blend_func_separate: f32,
        blend_func_separate: f32,
        blend_func_separate: f32,
    );
}

pub fn blend_func_separate(
    instance: DOMReference,
    src_r_g_b: f32,
    dst_r_g_b: f32,
    src_alpha: f32,
    dst_alpha: f32,
) {
    unsafe { webgl_blend_func_separate(instance, src_r_g_b, dst_r_g_b, src_alpha, dst_alpha) }
}
extern "C" {
    fn webgl_check_framebuffer_status(instance: DOMReference, check_framebuffer_status: f32)
        -> f32;
}

pub fn check_framebuffer_status(instance: DOMReference, target: f32) -> f32 {
    unsafe { webgl_check_framebuffer_status(instance, target) }
}
extern "C" {
    fn webgl_clear(instance: DOMReference, clear: f32);
}

pub fn clear(instance: DOMReference, mask: f32) {
    unsafe { webgl_clear(instance, mask) }
}
extern "C" {
    fn webgl_clear_color(
        instance: DOMReference,
        clear_color: f32,
        clear_color: f32,
        clear_color: f32,
        clear_color: f32,
    );
}

pub fn clear_color(instance: DOMReference, red: f32, green: f32, blue: f32, alpha: f32) {
    unsafe { webgl_clear_color(instance, red, green, blue, alpha) }
}
extern "C" {
    fn webgl_clear_depth(instance: DOMReference, clear_depth: f32);
}

pub fn clear_depth(instance: DOMReference, depth: f32) {
    unsafe { webgl_clear_depth(instance, depth) }
}
extern "C" {
    fn webgl_clear_stencil(instance: DOMReference, clear_stencil: f32);
}

pub fn clear_stencil(instance: DOMReference, s: f32) {
    unsafe { webgl_clear_stencil(instance, s) }
}
extern "C" {
    fn webgl_color_mask(
        instance: DOMReference,
        color_mask: i32,
        color_mask: i32,
        color_mask: i32,
        color_mask: i32,
    );
}

pub fn color_mask(instance: DOMReference, red: bool, green: bool, blue: bool, alpha: bool) {
    unsafe {
        webgl_color_mask(
            instance,
            if red { 1 } else { 0 },
            if green { 1 } else { 0 },
            if blue { 1 } else { 0 },
            if alpha { 1 } else { 0 },
        )
    }
}
extern "C" {
    fn webgl_compile_shader(instance: DOMReference, compile_shader: DOMReference);
}

pub fn compile_shader(instance: DOMReference, shader: DOMReference) {
    unsafe { webgl_compile_shader(instance, shader) }
}
extern "C" {
    fn webgl_copy_tex_image2_d(
        instance: DOMReference,
        copy_tex_image2_d: f32,
        copy_tex_image2_d: f32,
        copy_tex_image2_d: f32,
        copy_tex_image2_d: f32,
        copy_tex_image2_d: f32,
        copy_tex_image2_d: f32,
        copy_tex_image2_d: f32,
        copy_tex_image2_d: f32,
    );
}

pub fn copy_tex_image2_d(
    instance: DOMReference,
    target: f32,
    level: f32,
    internalformat: f32,
    x: f32,
    y: f32,
    width: f32,
    height: f32,
    border: f32,
) {
    unsafe {
        webgl_copy_tex_image2_d(
            instance,
            target,
            level,
            internalformat,
            x,
            y,
            width,
            height,
            border,
        )
    }
}
extern "C" {
    fn webgl_copy_tex_sub_image2_d(
        instance: DOMReference,
        copy_tex_sub_image2_d: f32,
        copy_tex_sub_image2_d: f32,
        copy_tex_sub_image2_d: f32,
        copy_tex_sub_image2_d: f32,
        copy_tex_sub_image2_d: f32,
        copy_tex_sub_image2_d: f32,
        copy_tex_sub_image2_d: f32,
        copy_tex_sub_image2_d: f32,
    );
}

pub fn copy_tex_sub_image2_d(
    instance: DOMReference,
    target: f32,
    level: f32,
    xoffset: f32,
    yoffset: f32,
    x: f32,
    y: f32,
    width: f32,
    height: f32,
) {
    unsafe {
        webgl_copy_tex_sub_image2_d(
            instance, target, level, xoffset, yoffset, x, y, width, height,
        )
    }
}
extern "C" {
    fn webgl_create_buffer(instance: DOMReference) -> DOMReference;
}

pub fn create_buffer(instance: DOMReference) -> DOMReference {
    unsafe { webgl_create_buffer(instance) }
}
extern "C" {
    fn webgl_create_framebuffer(instance: DOMReference) -> DOMReference;
}

pub fn create_framebuffer(instance: DOMReference) -> DOMReference {
    unsafe { webgl_create_framebuffer(instance) }
}
extern "C" {
    fn webgl_create_program(instance: DOMReference) -> DOMReference;
}

pub fn create_program(instance: DOMReference) -> DOMReference {
    unsafe { webgl_create_program(instance) }
}
extern "C" {
    fn webgl_create_renderbuffer(instance: DOMReference) -> DOMReference;
}

pub fn create_renderbuffer(instance: DOMReference) -> DOMReference {
    unsafe { webgl_create_renderbuffer(instance) }
}
extern "C" {
    fn webgl_create_shader(instance: DOMReference, create_shader: f32) -> DOMReference;
}

pub fn create_shader(instance: DOMReference, shader_type: f32) -> DOMReference {
    unsafe { webgl_create_shader(instance, shader_type) }
}
extern "C" {
    fn webgl_create_texture(instance: DOMReference) -> DOMReference;
}

pub fn create_texture(instance: DOMReference) -> DOMReference {
    unsafe { webgl_create_texture(instance) }
}
extern "C" {
    fn webgl_cull_face(instance: DOMReference, cull_face: f32);
}

pub fn cull_face(instance: DOMReference, mode: f32) {
    unsafe { webgl_cull_face(instance, mode) }
}
extern "C" {
    fn webgl_delete_buffer(instance: DOMReference, delete_buffer: DOMReference);
}

pub fn delete_buffer(instance: DOMReference, buffer: DOMReference) {
    unsafe { webgl_delete_buffer(instance, buffer) }
}
extern "C" {
    fn webgl_delete_framebuffer(instance: DOMReference, delete_framebuffer: DOMReference);
}

pub fn delete_framebuffer(instance: DOMReference, framebuffer: DOMReference) {
    unsafe { webgl_delete_framebuffer(instance, framebuffer) }
}
extern "C" {
    fn webgl_delete_program(instance: DOMReference, delete_program: DOMReference);
}

pub fn delete_program(instance: DOMReference, program: DOMReference) {
    unsafe { webgl_delete_program(instance, program) }
}
extern "C" {
    fn webgl_delete_renderbuffer(instance: DOMReference, delete_renderbuffer: DOMReference);
}

pub fn delete_renderbuffer(instance: DOMReference, renderbuffer: DOMReference) {
    unsafe { webgl_delete_renderbuffer(instance, renderbuffer) }
}
extern "C" {
    fn webgl_delete_shader(instance: DOMReference, delete_shader: DOMReference);
}

pub fn delete_shader(instance: DOMReference, shader: DOMReference) {
    unsafe { webgl_delete_shader(instance, shader) }
}
extern "C" {
    fn webgl_delete_texture(instance: DOMReference, delete_texture: DOMReference);
}

pub fn delete_texture(instance: DOMReference, texture: DOMReference) {
    unsafe { webgl_delete_texture(instance, texture) }
}
extern "C" {
    fn webgl_depth_func(instance: DOMReference, depth_func: f32);
}

pub fn depth_func(instance: DOMReference, func: f32) {
    unsafe { webgl_depth_func(instance, func) }
}
extern "C" {
    fn webgl_depth_mask(instance: DOMReference, depth_mask: i32);
}

pub fn depth_mask(instance: DOMReference, flag: bool) {
    unsafe { webgl_depth_mask(instance, if flag { 1 } else { 0 }) }
}
extern "C" {
    fn webgl_depth_range(instance: DOMReference, depth_range: f32, depth_range: f32);
}

pub fn depth_range(instance: DOMReference, z_near: f32, z_far: f32) {
    unsafe { webgl_depth_range(instance, z_near, z_far) }
}
extern "C" {
    fn webgl_detach_shader(
        instance: DOMReference,
        detach_shader: DOMReference,
        detach_shader: DOMReference,
    );
}

pub fn detach_shader(instance: DOMReference, program: DOMReference, shader: DOMReference) {
    unsafe { webgl_detach_shader(instance, program, shader) }
}
extern "C" {
    fn webgl_disable(instance: DOMReference, disable: f32);
}

pub fn disable(instance: DOMReference, cap: f32) {
    unsafe { webgl_disable(instance, cap) }
}
extern "C" {
    fn webgl_disable_vertex_attrib_array(instance: DOMReference, disable_vertex_attrib_array: f32);
}

pub fn disable_vertex_attrib_array(instance: DOMReference, index: f32) {
    unsafe { webgl_disable_vertex_attrib_array(instance, index) }
}
extern "C" {
    fn webgl_draw_arrays(
        instance: DOMReference,
        draw_arrays: f32,
        draw_arrays: f32,
        draw_arrays: f32,
    );
}

pub fn draw_arrays(instance: DOMReference, mode: f32, first: f32, count: f32) {
    unsafe { webgl_draw_arrays(instance, mode, first, count) }
}
extern "C" {
    fn webgl_draw_elements(
        instance: DOMReference,
        draw_elements: f32,
        draw_elements: f32,
        draw_elements: f32,
        draw_elements: f32,
    );
}

pub fn draw_elements(
    instance: DOMReference,
    mode: f32,
    count: f32,
    element_type: f32,
    offset: f32,
) {
    unsafe { webgl_draw_elements(instance, mode, count, element_type, offset) }
}
extern "C" {
    fn webgl_enable(instance: DOMReference, enable: f32);
}

pub fn enable(instance: DOMReference, cap: f32) {
    unsafe { webgl_enable(instance, cap) }
}
extern "C" {
    fn webgl_enable_vertex_attrib_array(instance: DOMReference, enable_vertex_attrib_array: f32);
}

pub fn enable_vertex_attrib_array(instance: DOMReference, index: f32) {
    unsafe { webgl_enable_vertex_attrib_array(instance, index) }
}
extern "C" {
    fn webgl_finish(instance: DOMReference);
}

pub fn finish(instance: DOMReference) {
    unsafe { webgl_finish(instance) }
}
extern "C" {
    fn webgl_flush(instance: DOMReference);
}

pub fn flush(instance: DOMReference) {
    unsafe { webgl_flush(instance) }
}
extern "C" {
    fn webgl_framebuffer_renderbuffer(
        instance: DOMReference,
        framebuffer_renderbuffer: f32,
        framebuffer_renderbuffer: f32,
        framebuffer_renderbuffer: f32,
        framebuffer_renderbuffer: DOMReference,
    );
}

pub fn framebuffer_renderbuffer(
    instance: DOMReference,
    target: f32,
    attachment: f32,
    renderbuffertarget: f32,
    renderbuffer: DOMReference,
) {
    unsafe {
        webgl_framebuffer_renderbuffer(
            instance,
            target,
            attachment,
            renderbuffertarget,
            renderbuffer,
        )
    }
}
extern "C" {
    fn webgl_framebuffer_texture2_d(
        instance: DOMReference,
        framebuffer_texture2_d: f32,
        framebuffer_texture2_d: f32,
        framebuffer_texture2_d: f32,
        framebuffer_texture2_d: DOMReference,
        framebuffer_texture2_d: f32,
    );
}

pub fn framebuffer_texture2_d(
    instance: DOMReference,
    target: f32,
    attachment: f32,
    textarget: f32,
    texture: DOMReference,
    level: f32,
) {
    unsafe { webgl_framebuffer_texture2_d(instance, target, attachment, textarget, texture, level) }
}
extern "C" {
    fn webgl_front_face(instance: DOMReference, front_face: f32);
}

pub fn front_face(instance: DOMReference, mode: f32) {
    unsafe { webgl_front_face(instance, mode) }
}
extern "C" {
    fn webgl_generate_mipmap(instance: DOMReference, generate_mipmap: f32);
}

pub fn generate_mipmap(instance: DOMReference, target: f32) {
    unsafe { webgl_generate_mipmap(instance, target) }
}
extern "C" {
    fn webgl_get_active_attrib(
        instance: DOMReference,
        get_active_attrib: DOMReference,
        get_active_attrib: f32,
    ) -> DOMReference;
}

pub fn get_active_attrib(
    instance: DOMReference,
    program: DOMReference,
    index: f32,
) -> DOMReference {
    unsafe { webgl_get_active_attrib(instance, program, index) }
}
extern "C" {
    fn webgl_get_active_uniform(
        instance: DOMReference,
        get_active_uniform: DOMReference,
        get_active_uniform: f32,
    ) -> DOMReference;
}

pub fn get_active_uniform(
    instance: DOMReference,
    program: DOMReference,
    index: f32,
) -> DOMReference {
    unsafe { webgl_get_active_uniform(instance, program, index) }
}
extern "C" {
    fn webgl_get_attached_shaders(
        instance: DOMReference,
        get_attached_shaders: DOMReference,
    ) -> DOMReference;
}

pub fn get_attached_shaders(instance: DOMReference, program: DOMReference) -> DOMReference {
    unsafe { webgl_get_attached_shaders(instance, program) }
}
extern "C" {
    fn webgl_get_attrib_location(
        instance: DOMReference,
        get_attrib_location: DOMReference,
        get_attrib_location: CString,
    ) -> f32;
}

pub fn get_attrib_location(instance: DOMReference, program: DOMReference, name: &str) -> f32 {
    unsafe { webgl_get_attrib_location(instance, program, to_cstring(name)) }
}
extern "C" {
    fn webgl_get_buffer_parameter(
        instance: DOMReference,
        get_buffer_parameter: f32,
        get_buffer_parameter: f32,
    ) -> DOMReference;
}

pub fn get_buffer_parameter(instance: DOMReference, target: f32, pname: f32) -> DOMReference {
    unsafe { webgl_get_buffer_parameter(instance, target, pname) }
}
extern "C" {
    fn webgl_get_parameter(instance: DOMReference, get_parameter: f32) -> DOMReference;
}

pub fn get_parameter(instance: DOMReference, pname: f32) -> DOMReference {
    unsafe { webgl_get_parameter(instance, pname) }
}
extern "C" {
    fn webgl_get_error(instance: DOMReference) -> f32;
}

pub fn get_error(instance: DOMReference) -> f32 {
    unsafe { webgl_get_error(instance) }
}
extern "C" {
    fn webgl_get_framebuffer_attachment_parameter(
        instance: DOMReference,
        get_framebuffer_attachment_parameter: f32,
        get_framebuffer_attachment_parameter: f32,
        get_framebuffer_attachment_parameter: f32,
    ) -> DOMReference;
}

pub fn get_framebuffer_attachment_parameter(
    instance: DOMReference,
    target: f32,
    attachment: f32,
    pname: f32,
) -> DOMReference {
    unsafe { webgl_get_framebuffer_attachment_parameter(instance, target, attachment, pname) }
}
extern "C" {
    fn webgl_get_program_parameter(
        instance: DOMReference,
        get_program_parameter: DOMReference,
        get_program_parameter: f32,
    ) -> DOMReference;
}

pub fn get_program_parameter(
    instance: DOMReference,
    program: DOMReference,
    pname: f32,
) -> DOMReference {
    unsafe { webgl_get_program_parameter(instance, program, pname) }
}
extern "C" {
    fn webgl_get_program_info_log(
        instance: DOMReference,
        get_program_info_log: DOMReference,
    ) -> DOMReference;
}

pub fn get_program_info_log(instance: DOMReference, program: DOMReference) -> DOMReference {
    unsafe { webgl_get_program_info_log(instance, program) }
}
extern "C" {
    fn webgl_get_renderbuffer_parameter(
        instance: DOMReference,
        get_renderbuffer_parameter: f32,
        get_renderbuffer_parameter: f32,
    ) -> DOMReference;
}

pub fn get_renderbuffer_parameter(instance: DOMReference, target: f32, pname: f32) -> DOMReference {
    unsafe { webgl_get_renderbuffer_parameter(instance, target, pname) }
}
extern "C" {
    fn webgl_get_shader_parameter(
        instance: DOMReference,
        get_shader_parameter: DOMReference,
        get_shader_parameter: f32,
    ) -> DOMReference;
}

pub fn get_shader_parameter(
    instance: DOMReference,
    shader: DOMReference,
    pname: f32,
) -> DOMReference {
    unsafe { webgl_get_shader_parameter(instance, shader, pname) }
}
extern "C" {
    fn webgl_get_shader_precision_format(
        instance: DOMReference,
        get_shader_precision_format: f32,
        get_shader_precision_format: f32,
    ) -> DOMReference;
}

pub fn get_shader_precision_format(
    instance: DOMReference,
    shadertype: f32,
    precisiontype: f32,
) -> DOMReference {
    unsafe { webgl_get_shader_precision_format(instance, shadertype, precisiontype) }
}
extern "C" {
    fn webgl_get_shader_info_log(
        instance: DOMReference,
        get_shader_info_log: DOMReference,
    ) -> DOMReference;
}

pub fn get_shader_info_log(instance: DOMReference, shader: DOMReference) -> DOMReference {
    unsafe { webgl_get_shader_info_log(instance, shader) }
}
extern "C" {
    fn webgl_get_shader_source(
        instance: DOMReference,
        get_shader_source: DOMReference,
    ) -> DOMReference;
}

pub fn get_shader_source(instance: DOMReference, shader: DOMReference) -> DOMReference {
    unsafe { webgl_get_shader_source(instance, shader) }
}
extern "C" {
    fn webgl_get_tex_parameter(
        instance: DOMReference,
        get_tex_parameter: f32,
        get_tex_parameter: f32,
    ) -> DOMReference;
}

pub fn get_tex_parameter(instance: DOMReference, target: f32, pname: f32) -> DOMReference {
    unsafe { webgl_get_tex_parameter(instance, target, pname) }
}
extern "C" {
    fn webgl_get_uniform(
        instance: DOMReference,
        get_uniform: DOMReference,
        get_uniform: DOMReference,
    ) -> DOMReference;
}

pub fn get_uniform(
    instance: DOMReference,
    program: DOMReference,
    location: DOMReference,
) -> DOMReference {
    unsafe { webgl_get_uniform(instance, program, location) }
}
extern "C" {
    fn webgl_get_uniform_location(
        instance: DOMReference,
        get_uniform_location: DOMReference,
        get_uniform_location: CString,
    ) -> DOMReference;
}

pub fn get_uniform_location(
    instance: DOMReference,
    program: DOMReference,
    name: &str,
) -> DOMReference {
    unsafe { webgl_get_uniform_location(instance, program, to_cstring(name)) }
}
extern "C" {
    fn webgl_get_vertex_attrib(
        instance: DOMReference,
        get_vertex_attrib: f32,
        get_vertex_attrib: f32,
    ) -> DOMReference;
}

pub fn get_vertex_attrib(instance: DOMReference, index: f32, pname: f32) -> DOMReference {
    unsafe { webgl_get_vertex_attrib(instance, index, pname) }
}
extern "C" {
    fn webgl_get_vertex_attrib_offset(
        instance: DOMReference,
        get_vertex_attrib_offset: f32,
        get_vertex_attrib_offset: f32,
    ) -> f32;
}

pub fn get_vertex_attrib_offset(instance: DOMReference, index: f32, pname: f32) -> f32 {
    unsafe { webgl_get_vertex_attrib_offset(instance, index, pname) }
}
extern "C" {
    fn webgl_hint(instance: DOMReference, hint: f32, hint: f32);
}

pub fn hint(instance: DOMReference, target: f32, mode: f32) {
    unsafe { webgl_hint(instance, target, mode) }
}
extern "C" {
    fn webgl_is_buffer(instance: DOMReference, is_buffer: DOMReference) -> i32;
}

pub fn is_buffer(instance: DOMReference, buffer: DOMReference) -> bool {
    unsafe { 0 != webgl_is_buffer(instance, buffer) }
}
extern "C" {
    fn webgl_is_enabled(instance: DOMReference, is_enabled: f32) -> i32;
}

pub fn is_enabled(instance: DOMReference, cap: f32) -> bool {
    unsafe { 0 != webgl_is_enabled(instance, cap) }
}
extern "C" {
    fn webgl_is_framebuffer(instance: DOMReference, is_framebuffer: DOMReference) -> i32;
}

pub fn is_framebuffer(instance: DOMReference, framebuffer: DOMReference) -> bool {
    unsafe { 0 != webgl_is_framebuffer(instance, framebuffer) }
}
extern "C" {
    fn webgl_is_program(instance: DOMReference, is_program: DOMReference) -> i32;
}

pub fn is_program(instance: DOMReference, program: DOMReference) -> bool {
    unsafe { 0 != webgl_is_program(instance, program) }
}
extern "C" {
    fn webgl_is_renderbuffer(instance: DOMReference, is_renderbuffer: DOMReference) -> i32;
}

pub fn is_renderbuffer(instance: DOMReference, renderbuffer: DOMReference) -> bool {
    unsafe { 0 != webgl_is_renderbuffer(instance, renderbuffer) }
}
extern "C" {
    fn webgl_is_shader(instance: DOMReference, is_shader: DOMReference) -> i32;
}

pub fn is_shader(instance: DOMReference, shader: DOMReference) -> bool {
    unsafe { 0 != webgl_is_shader(instance, shader) }
}
extern "C" {
    fn webgl_is_texture(instance: DOMReference, is_texture: DOMReference) -> i32;
}

pub fn is_texture(instance: DOMReference, texture: DOMReference) -> bool {
    unsafe { 0 != webgl_is_texture(instance, texture) }
}
extern "C" {
    fn webgl_line_width(instance: DOMReference, line_width: f32);
}

pub fn line_width(instance: DOMReference, width: f32) {
    unsafe { webgl_line_width(instance, width) }
}
extern "C" {
    fn webgl_link_program(instance: DOMReference, link_program: DOMReference);
}

pub fn link_program(instance: DOMReference, program: DOMReference) {
    unsafe { webgl_link_program(instance, program) }
}
extern "C" {
    fn webgl_pixel_storei(instance: DOMReference, pixel_storei: f32, pixel_storei: f32);
}

pub fn pixel_storei(instance: DOMReference, pname: f32, param: f32) {
    unsafe { webgl_pixel_storei(instance, pname, param) }
}
extern "C" {
    fn webgl_polygon_offset(instance: DOMReference, polygon_offset: f32, polygon_offset: f32);
}

pub fn polygon_offset(instance: DOMReference, factor: f32, units: f32) {
    unsafe { webgl_polygon_offset(instance, factor, units) }
}
extern "C" {
    fn webgl_renderbuffer_storage(
        instance: DOMReference,
        renderbuffer_storage: f32,
        renderbuffer_storage: f32,
        renderbuffer_storage: f32,
        renderbuffer_storage: f32,
    );
}

pub fn renderbuffer_storage(
    instance: DOMReference,
    target: f32,
    internalformat: f32,
    width: f32,
    height: f32,
) {
    unsafe { webgl_renderbuffer_storage(instance, target, internalformat, width, height) }
}
extern "C" {
    fn webgl_sample_coverage(instance: DOMReference, sample_coverage: f32, sample_coverage: i32);
}

pub fn sample_coverage(instance: DOMReference, value: f32, invert: bool) {
    unsafe { webgl_sample_coverage(instance, value, if invert { 1 } else { 0 }) }
}
extern "C" {
    fn webgl_scissor(
        instance: DOMReference,
        scissor: f32,
        scissor: f32,
        scissor: f32,
        scissor: f32,
    );
}

pub fn scissor(instance: DOMReference, x: f32, y: f32, width: f32, height: f32) {
    unsafe { webgl_scissor(instance, x, y, width, height) }
}
extern "C" {
    fn webgl_shader_source(
        instance: DOMReference,
        shader_source: DOMReference,
        shader_source: CString,
    );
}

pub fn shader_source(instance: DOMReference, shader: DOMReference, source: &str) {
    unsafe { webgl_shader_source(instance, shader, to_cstring(source)) }
}
extern "C" {
    fn webgl_stencil_func(
        instance: DOMReference,
        stencil_func: f32,
        stencil_func: f32,
        stencil_func: f32,
    );
}

pub fn stencil_func(instance: DOMReference, func: f32, setencel_ref: f32, mask: f32) {
    unsafe { webgl_stencil_func(instance, func, setencel_ref, mask) }
}
extern "C" {
    fn webgl_stencil_func_separate(
        instance: DOMReference,
        stencil_func_separate: f32,
        stencil_func_separate: f32,
        stencil_func_separate: f32,
        stencil_func_separate: f32,
    );
}

pub fn stencil_func_separate(
    instance: DOMReference,
    face: f32,
    func: f32,
    setencel_ref: f32,
    mask: f32,
) {
    unsafe { webgl_stencil_func_separate(instance, face, func, setencel_ref, mask) }
}
extern "C" {
    fn webgl_stencil_mask(instance: DOMReference, stencil_mask: f32);
}

pub fn stencil_mask(instance: DOMReference, mask: f32) {
    unsafe { webgl_stencil_mask(instance, mask) }
}
extern "C" {
    fn webgl_stencil_mask_separate(
        instance: DOMReference,
        stencil_mask_separate: f32,
        stencil_mask_separate: f32,
    );
}

pub fn stencil_mask_separate(instance: DOMReference, face: f32, mask: f32) {
    unsafe { webgl_stencil_mask_separate(instance, face, mask) }
}
extern "C" {
    fn webgl_stencil_op(instance: DOMReference, stencil_op: f32, stencil_op: f32, stencil_op: f32);
}

pub fn stencil_op(instance: DOMReference, fail: f32, zfail: f32, zpass: f32) {
    unsafe { webgl_stencil_op(instance, fail, zfail, zpass) }
}
extern "C" {
    fn webgl_stencil_op_separate(
        instance: DOMReference,
        stencil_op_separate: f32,
        stencil_op_separate: f32,
        stencil_op_separate: f32,
        stencil_op_separate: f32,
    );
}

pub fn stencil_op_separate(instance: DOMReference, face: f32, fail: f32, zfail: f32, zpass: f32) {
    unsafe { webgl_stencil_op_separate(instance, face, fail, zfail, zpass) }
}
extern "C" {
    fn webgl_tex_parameterf(
        instance: DOMReference,
        tex_parameterf: f32,
        tex_parameterf: f32,
        tex_parameterf: f32,
    );
}

pub fn tex_parameterf(instance: DOMReference, target: f32, pname: f32, param: f32) {
    unsafe { webgl_tex_parameterf(instance, target, pname, param) }
}
extern "C" {
    fn webgl_tex_parameteri(
        instance: DOMReference,
        tex_parameteri: f32,
        tex_parameteri: f32,
        tex_parameteri: f32,
    );
}

pub fn tex_parameteri(instance: DOMReference, target: f32, pname: f32, param: f32) {
    unsafe { webgl_tex_parameteri(instance, target, pname, param) }
}
extern "C" {
    fn webgl_uniform1f(instance: DOMReference, uniform1f: DOMReference, uniform1f: f32);
}

pub fn uniform1f(instance: DOMReference, location: DOMReference, x: f32) {
    unsafe { webgl_uniform1f(instance, location, x) }
}
extern "C" {
    fn webgl_uniform2f(
        instance: DOMReference,
        uniform2f: DOMReference,
        uniform2f: f32,
        uniform2f: f32,
    );
}

pub fn uniform2f(instance: DOMReference, location: DOMReference, x: f32, y: f32) {
    unsafe { webgl_uniform2f(instance, location, x, y) }
}
extern "C" {
    fn webgl_uniform3f(
        instance: DOMReference,
        uniform3f: DOMReference,
        uniform3f: f32,
        uniform3f: f32,
        uniform3f: f32,
    );
}

pub fn uniform3f(instance: DOMReference, location: DOMReference, x: f32, y: f32, z: f32) {
    unsafe { webgl_uniform3f(instance, location, x, y, z) }
}
extern "C" {
    fn webgl_uniform4f(
        instance: DOMReference,
        uniform4f: DOMReference,
        uniform4f: f32,
        uniform4f: f32,
        uniform4f: f32,
        uniform4f: f32,
    );
}

pub fn uniform4f(instance: DOMReference, location: DOMReference, x: f32, y: f32, z: f32, w: f32) {
    unsafe { webgl_uniform4f(instance, location, x, y, z, w) }
}
extern "C" {
    fn webgl_uniform1i(instance: DOMReference, uniform1i: DOMReference, uniform1i: f32);
}

pub fn uniform1i(instance: DOMReference, location: DOMReference, x: f32) {
    unsafe { webgl_uniform1i(instance, location, x) }
}
extern "C" {
    fn webgl_uniform2i(
        instance: DOMReference,
        uniform2i: DOMReference,
        uniform2i: f32,
        uniform2i: f32,
    );
}

pub fn uniform2i(instance: DOMReference, location: DOMReference, x: f32, y: f32) {
    unsafe { webgl_uniform2i(instance, location, x, y) }
}
extern "C" {
    fn webgl_uniform3i(
        instance: DOMReference,
        uniform3i: DOMReference,
        uniform3i: f32,
        uniform3i: f32,
        uniform3i: f32,
    );
}

pub fn uniform3i(instance: DOMReference, location: DOMReference, x: f32, y: f32, z: f32) {
    unsafe { webgl_uniform3i(instance, location, x, y, z) }
}
extern "C" {
    fn webgl_uniform4i(
        instance: DOMReference,
        uniform4i: DOMReference,
        uniform4i: f32,
        uniform4i: f32,
        uniform4i: f32,
        uniform4i: f32,
    );
}

pub fn uniform4i(instance: DOMReference, location: DOMReference, x: f32, y: f32, z: f32, w: f32) {
    unsafe { webgl_uniform4i(instance, location, x, y, z, w) }
}
extern "C" {
    fn webgl_use_program(instance: DOMReference, use_program: DOMReference);
}

pub fn use_program(instance: DOMReference, program: DOMReference) {
    unsafe { webgl_use_program(instance, program) }
}
extern "C" {
    fn webgl_validate_program(instance: DOMReference, validate_program: DOMReference);
}

pub fn validate_program(instance: DOMReference, program: DOMReference) {
    unsafe { webgl_validate_program(instance, program) }
}
extern "C" {
    fn webgl_vertex_attrib1f(instance: DOMReference, vertex_attrib1f: f32, vertex_attrib1f: f32);
}

pub fn vertex_attrib1f(instance: DOMReference, indx: f32, x: f32) {
    unsafe { webgl_vertex_attrib1f(instance, indx, x) }
}
extern "C" {
    fn webgl_vertex_attrib1fv(
        instance: DOMReference,
        vertex_attrib1fv: f32,
        vertex_attrib1fv: DOMReference,
    );
}

pub fn vertex_attrib1fv(instance: DOMReference, indx: f32, values: DOMReference) {
    unsafe { webgl_vertex_attrib1fv(instance, indx, values) }
}
extern "C" {
    fn webgl_vertex_attrib2f(
        instance: DOMReference,
        vertex_attrib2f: f32,
        vertex_attrib2f: f32,
        vertex_attrib2f: f32,
    );
}

pub fn vertex_attrib2f(instance: DOMReference, indx: f32, x: f32, y: f32) {
    unsafe { webgl_vertex_attrib2f(instance, indx, x, y) }
}
extern "C" {
    fn webgl_vertex_attrib2fv(
        instance: DOMReference,
        vertex_attrib2fv: f32,
        vertex_attrib2fv: DOMReference,
    );
}

pub fn vertex_attrib2fv(instance: DOMReference, indx: f32, values: DOMReference) {
    unsafe { webgl_vertex_attrib2fv(instance, indx, values) }
}
extern "C" {
    fn webgl_vertex_attrib3f(
        instance: DOMReference,
        vertex_attrib3f: f32,
        vertex_attrib3f: f32,
        vertex_attrib3f: f32,
        vertex_attrib3f: f32,
    );
}

pub fn vertex_attrib3f(instance: DOMReference, indx: f32, x: f32, y: f32, z: f32) {
    unsafe { webgl_vertex_attrib3f(instance, indx, x, y, z) }
}
extern "C" {
    fn webgl_vertex_attrib3fv(
        instance: DOMReference,
        vertex_attrib3fv: f32,
        vertex_attrib3fv: DOMReference,
    );
}

pub fn vertex_attrib3fv(instance: DOMReference, indx: f32, values: DOMReference) {
    unsafe { webgl_vertex_attrib3fv(instance, indx, values) }
}
extern "C" {
    fn webgl_vertex_attrib4f(
        instance: DOMReference,
        vertex_attrib4f: f32,
        vertex_attrib4f: f32,
        vertex_attrib4f: f32,
        vertex_attrib4f: f32,
        vertex_attrib4f: f32,
    );
}

pub fn vertex_attrib4f(instance: DOMReference, indx: f32, x: f32, y: f32, z: f32, w: f32) {
    unsafe { webgl_vertex_attrib4f(instance, indx, x, y, z, w) }
}
extern "C" {
    fn webgl_vertex_attrib4fv(
        instance: DOMReference,
        vertex_attrib4fv: f32,
        vertex_attrib4fv: DOMReference,
    );
}

pub fn vertex_attrib4fv(instance: DOMReference, indx: f32, values: DOMReference) {
    unsafe { webgl_vertex_attrib4fv(instance, indx, values) }
}
extern "C" {
    fn webgl_vertex_attrib_pointer(
        instance: DOMReference,
        vertex_attrib_pointer: f32,
        vertex_attrib_pointer: f32,
        vertex_attrib_pointer: f32,
        vertex_attrib_pointer: i32,
        vertex_attrib_pointer: f32,
        vertex_attrib_pointer: f32,
    );
}

pub fn vertex_attrib_pointer(
    instance: DOMReference,
    indx: f32,
    size: f32,
    pointer_type: f32,
    normalized: bool,
    stride: f32,
    offset: f32,
) {
    unsafe {
        webgl_vertex_attrib_pointer(
            instance,
            indx,
            size,
            pointer_type,
            if normalized { 1 } else { 0 },
            stride,
            offset,
        )
    }
}
extern "C" {
    fn webgl_viewport(
        instance: DOMReference,
        viewport: f32,
        viewport: f32,
        viewport: f32,
        viewport: f32,
    );
}

pub fn viewport(instance: DOMReference, x: f32, y: f32, width: f32, height: f32) {
    unsafe { webgl_viewport(instance, x, y, width, height) }
}
extern "C" {
    fn webgl_buffer_data(
        instance: DOMReference,
        buffer_data: f32,
        buffer_data: DOMReference,
        buffer_data: f32,
    );
}

pub fn buffer_data(instance: DOMReference, target: f32, data: DOMReference, usage: f32) {
    unsafe { webgl_buffer_data(instance, target, data, usage) }
}
extern "C" {
    fn webgl_buffer_data_1(
        instance: DOMReference,
        buffer_data_1: f32,
        buffer_data_1: DOMReference,
        buffer_data_1: f32,
    );
}

pub fn buffer_data_1(instance: DOMReference, target: f32, size: DOMReference, usage: f32) {
    unsafe { webgl_buffer_data_1(instance, target, size, usage) }
}
extern "C" {
    fn webgl_buffer_data_2(
        instance: DOMReference,
        buffer_data_2: f32,
        buffer_data_2: DOMReference,
        buffer_data_2: f32,
    );
}

pub fn buffer_data_2(instance: DOMReference, target: f32, data: DOMReference, usage: f32) {
    unsafe { webgl_buffer_data_2(instance, target, data, usage) }
}
extern "C" {
    fn webgl_buffer_sub_data(
        instance: DOMReference,
        buffer_sub_data: f32,
        buffer_sub_data: f32,
        buffer_sub_data: DOMReference,
    );
}

pub fn buffer_sub_data(instance: DOMReference, target: f32, offset: f32, data: DOMReference) {
    unsafe { webgl_buffer_sub_data(instance, target, offset, data) }
}
extern "C" {
    fn webgl_buffer_sub_data_1(
        instance: DOMReference,
        buffer_sub_data_1: f32,
        buffer_sub_data_1: f32,
        buffer_sub_data_1: DOMReference,
    );
}

pub fn buffer_sub_data_1(instance: DOMReference, target: f32, offset: f32, data: DOMReference) {
    unsafe { webgl_buffer_sub_data_1(instance, target, offset, data) }
}
extern "C" {
    fn webgl_compressed_tex_image2_d(
        instance: DOMReference,
        compressed_tex_image2_d: f32,
        compressed_tex_image2_d: f32,
        compressed_tex_image2_d: f32,
        compressed_tex_image2_d: f32,
        compressed_tex_image2_d: f32,
        compressed_tex_image2_d: f32,
        compressed_tex_image2_d: DOMReference,
    );
}

pub fn compressed_tex_image2_d(
    instance: DOMReference,
    target: f32,
    level: f32,
    internalformat: f32,
    width: f32,
    height: f32,
    border: f32,
    data: DOMReference,
) {
    unsafe {
        webgl_compressed_tex_image2_d(
            instance,
            target,
            level,
            internalformat,
            width,
            height,
            border,
            data,
        )
    }
}
extern "C" {
    fn webgl_compressed_tex_sub_image2_d(
        instance: DOMReference,
        compressed_tex_sub_image2_d: f32,
        compressed_tex_sub_image2_d: f32,
        compressed_tex_sub_image2_d: f32,
        compressed_tex_sub_image2_d: f32,
        compressed_tex_sub_image2_d: f32,
        compressed_tex_sub_image2_d: f32,
        compressed_tex_sub_image2_d: f32,
        compressed_tex_sub_image2_d: DOMReference,
    );
}

pub fn compressed_tex_sub_image2_d(
    instance: DOMReference,
    target: f32,
    level: f32,
    xoffset: f32,
    yoffset: f32,
    width: f32,
    height: f32,
    format: f32,
    data: DOMReference,
) {
    unsafe {
        webgl_compressed_tex_sub_image2_d(
            instance, target, level, xoffset, yoffset, width, height, format, data,
        )
    }
}
extern "C" {
    fn webgl_read_pixels(
        instance: DOMReference,
        read_pixels: f32,
        read_pixels: f32,
        read_pixels: f32,
        read_pixels: f32,
        read_pixels: f32,
        read_pixels: f32,
        read_pixels: DOMReference,
    );
}

pub fn read_pixels(
    instance: DOMReference,
    x: f32,
    y: f32,
    width: f32,
    height: f32,
    format: f32,
    pixel_type: f32,
    pixels: DOMReference,
) {
    unsafe { webgl_read_pixels(instance, x, y, width, height, format, pixel_type, pixels) }
}
extern "C" {
    fn webgl_tex_image2_d(
        instance: DOMReference,
        tex_image2_d: f32,
        tex_image2_d: f32,
        tex_image2_d: f32,
        tex_image2_d: f32,
        tex_image2_d: f32,
        tex_image2_d: f32,
        tex_image2_d: f32,
        tex_image2_d: f32,
        tex_image2_d: DOMReference,
    );
}

pub fn tex_image2_d(
    instance: DOMReference,
    target: f32,
    level: f32,
    internalformat: f32,
    width: f32,
    height: f32,
    border: f32,
    format: f32,
    image_type: f32,
    pixels: DOMReference,
) {
    unsafe {
        webgl_tex_image2_d(
            instance,
            target,
            level,
            internalformat,
            width,
            height,
            border,
            format,
            image_type,
            pixels,
        )
    }
}
extern "C" {
    fn webgl_tex_image2_d_1(
        instance: DOMReference,
        tex_image2_d_1: f32,
        tex_image2_d_1: f32,
        tex_image2_d_1: f32,
        tex_image2_d_1: f32,
        tex_image2_d_1: f32,
        tex_image2_d_1: DOMReference,
    );
}

pub fn tex_image2_d_1(
    instance: DOMReference,
    target: f32,
    level: f32,
    internalformat: f32,
    format: f32,
    image_type: f32,
    pixels: DOMReference,
) {
    unsafe {
        webgl_tex_image2_d_1(
            instance,
            target,
            level,
            internalformat,
            format,
            image_type,
            pixels,
        )
    }
}
extern "C" {
    fn webgl_tex_image2_d_2(
        instance: DOMReference,
        tex_image2_d_2: f32,
        tex_image2_d_2: f32,
        tex_image2_d_2: f32,
        tex_image2_d_2: f32,
        tex_image2_d_2: f32,
        tex_image2_d_2: DOMReference,
    );
}

pub fn tex_image2_d_2(
    instance: DOMReference,
    target: f32,
    level: f32,
    internalformat: f32,
    format: f32,
    image_type: f32,
    pixels: DOMReference,
) {
    unsafe {
        webgl_tex_image2_d_2(
            instance,
            target,
            level,
            internalformat,
            format,
            image_type,
            pixels,
        )
    }
}
extern "C" {
    fn webgl_tex_image2_d_3(
        instance: DOMReference,
        tex_image2_d_3: f32,
        tex_image2_d_3: f32,
        tex_image2_d_3: f32,
        tex_image2_d_3: f32,
        tex_image2_d_3: f32,
        tex_image2_d_3: DOMReference,
    );
}

pub fn tex_image2_d_3(
    instance: DOMReference,
    target: f32,
    level: f32,
    internalformat: f32,
    format: f32,
    image_type: f32,
    image: DOMReference,
) {
    unsafe {
        webgl_tex_image2_d_3(
            instance,
            target,
            level,
            internalformat,
            format,
            image_type,
            image,
        )
    }
}
extern "C" {
    fn webgl_tex_image2_d_4(
        instance: DOMReference,
        tex_image2_d_4: f32,
        tex_image2_d_4: f32,
        tex_image2_d_4: f32,
        tex_image2_d_4: f32,
        tex_image2_d_4: f32,
        tex_image2_d_4: DOMReference,
    );
}

pub fn tex_image2_d_4(
    instance: DOMReference,
    target: f32,
    level: f32,
    internalformat: f32,
    format: f32,
    image_type: f32,
    canvas: DOMReference,
) {
    unsafe {
        webgl_tex_image2_d_4(
            instance,
            target,
            level,
            internalformat,
            format,
            image_type,
            canvas,
        )
    }
}
extern "C" {
    fn webgl_tex_image2_d_5(
        instance: DOMReference,
        tex_image2_d_5: f32,
        tex_image2_d_5: f32,
        tex_image2_d_5: f32,
        tex_image2_d_5: f32,
        tex_image2_d_5: f32,
        tex_image2_d_5: DOMReference,
    );
}

pub fn tex_image2_d_5(
    instance: DOMReference,
    target: f32,
    level: f32,
    internalformat: f32,
    format: f32,
    image_type: f32,
    video: DOMReference,
) {
    unsafe {
        webgl_tex_image2_d_5(
            instance,
            target,
            level,
            internalformat,
            format,
            image_type,
            video,
        )
    }
}
extern "C" {
    fn webgl_tex_sub_image2_d(
        instance: DOMReference,
        tex_sub_image2_d: f32,
        tex_sub_image2_d: f32,
        tex_sub_image2_d: f32,
        tex_sub_image2_d: f32,
        tex_sub_image2_d: f32,
        tex_sub_image2_d: f32,
        tex_sub_image2_d: f32,
        tex_sub_image2_d: f32,
        tex_sub_image2_d: DOMReference,
    );
}

pub fn tex_sub_image2_d(
    instance: DOMReference,
    target: f32,
    level: f32,
    xoffset: f32,
    yoffset: f32,
    width: f32,
    height: f32,
    format: f32,
    image_type: f32,
    pixels: DOMReference,
) {
    unsafe {
        webgl_tex_sub_image2_d(
            instance, target, level, xoffset, yoffset, width, height, format, image_type, pixels,
        )
    }
}
extern "C" {
    fn webgl_tex_sub_image2_d_1(
        instance: DOMReference,
        tex_sub_image2_d_1: f32,
        tex_sub_image2_d_1: f32,
        tex_sub_image2_d_1: f32,
        tex_sub_image2_d_1: f32,
        tex_sub_image2_d_1: f32,
        tex_sub_image2_d_1: f32,
        tex_sub_image2_d_1: DOMReference,
    );
}

pub fn tex_sub_image2_d_1(
    instance: DOMReference,
    target: f32,
    level: f32,
    xoffset: f32,
    yoffset: f32,
    format: f32,
    image_type: f32,
    pixels: DOMReference,
) {
    unsafe {
        webgl_tex_sub_image2_d_1(
            instance, target, level, xoffset, yoffset, format, image_type, pixels,
        )
    }
}
extern "C" {
    fn webgl_tex_sub_image2_d_2(
        instance: DOMReference,
        tex_sub_image2_d_2: f32,
        tex_sub_image2_d_2: f32,
        tex_sub_image2_d_2: f32,
        tex_sub_image2_d_2: f32,
        tex_sub_image2_d_2: f32,
        tex_sub_image2_d_2: f32,
        tex_sub_image2_d_2: DOMReference,
    );
}

pub fn tex_sub_image2_d_2(
    instance: DOMReference,
    target: f32,
    level: f32,
    xoffset: f32,
    yoffset: f32,
    format: f32,
    image_type: f32,
    pixels: DOMReference,
) {
    unsafe {
        webgl_tex_sub_image2_d_2(
            instance, target, level, xoffset, yoffset, format, image_type, pixels,
        )
    }
}
extern "C" {
    fn webgl_tex_sub_image2_d_3(
        instance: DOMReference,
        tex_sub_image2_d_3: f32,
        tex_sub_image2_d_3: f32,
        tex_sub_image2_d_3: f32,
        tex_sub_image2_d_3: f32,
        tex_sub_image2_d_3: f32,
        tex_sub_image2_d_3: f32,
        tex_sub_image2_d_3: DOMReference,
    );
}

pub fn tex_sub_image2_d_3(
    instance: DOMReference,
    target: f32,
    level: f32,
    xoffset: f32,
    yoffset: f32,
    format: f32,
    image_type: f32,
    image: DOMReference,
) {
    unsafe {
        webgl_tex_sub_image2_d_3(
            instance, target, level, xoffset, yoffset, format, image_type, image,
        )
    }
}
extern "C" {
    fn webgl_tex_sub_image2_d_4(
        instance: DOMReference,
        tex_sub_image2_d_4: f32,
        tex_sub_image2_d_4: f32,
        tex_sub_image2_d_4: f32,
        tex_sub_image2_d_4: f32,
        tex_sub_image2_d_4: f32,
        tex_sub_image2_d_4: f32,
        tex_sub_image2_d_4: DOMReference,
    );
}

pub fn tex_sub_image2_d_4(
    instance: DOMReference,
    target: f32,
    level: f32,
    xoffset: f32,
    yoffset: f32,
    format: f32,
    image_type: f32,
    canvas: DOMReference,
) {
    unsafe {
        webgl_tex_sub_image2_d_4(
            instance, target, level, xoffset, yoffset, format, image_type, canvas,
        )
    }
}
extern "C" {
    fn webgl_tex_sub_image2_d_5(
        instance: DOMReference,
        tex_sub_image2_d_5: f32,
        tex_sub_image2_d_5: f32,
        tex_sub_image2_d_5: f32,
        tex_sub_image2_d_5: f32,
        tex_sub_image2_d_5: f32,
        tex_sub_image2_d_5: f32,
        tex_sub_image2_d_5: DOMReference,
    );
}

pub fn tex_sub_image2_d_5(
    instance: DOMReference,
    target: f32,
    level: f32,
    xoffset: f32,
    yoffset: f32,
    format: f32,
    image_type: f32,
    video: DOMReference,
) {
    unsafe {
        webgl_tex_sub_image2_d_5(
            instance, target, level, xoffset, yoffset, format, image_type, video,
        )
    }
}
extern "C" {
    fn webgl_uniform1fv(instance: DOMReference, uniform1fv: DOMReference, uniform1fv: DOMReference);
}

pub fn uniform1fv(instance: DOMReference, location: DOMReference, data: DOMReference) {
    unsafe { webgl_uniform1fv(instance, location, data) }
}
extern "C" {
    fn webgl_uniform2fv(instance: DOMReference, uniform2fv: DOMReference, uniform2fv: DOMReference);
}

pub fn uniform2fv(instance: DOMReference, location: DOMReference, data: DOMReference) {
    unsafe { webgl_uniform2fv(instance, location, data) }
}
extern "C" {
    fn webgl_uniform3fv(instance: DOMReference, uniform3fv: DOMReference, uniform3fv: DOMReference);
}

pub fn uniform3fv(instance: DOMReference, location: DOMReference, data: DOMReference) {
    unsafe { webgl_uniform3fv(instance, location, data) }
}
extern "C" {
    fn webgl_uniform4fv(instance: DOMReference, uniform4fv: DOMReference, uniform4fv: DOMReference);
}

pub fn uniform4fv(instance: DOMReference, location: DOMReference, data: DOMReference) {
    unsafe { webgl_uniform4fv(instance, location, data) }
}
extern "C" {
    fn webgl_uniform1iv(instance: DOMReference, uniform1iv: DOMReference, uniform1iv: DOMReference);
}

pub fn uniform1iv(instance: DOMReference, location: DOMReference, data: DOMReference) {
    unsafe { webgl_uniform1iv(instance, location, data) }
}
extern "C" {
    fn webgl_uniform2iv(instance: DOMReference, uniform2iv: DOMReference, uniform2iv: DOMReference);
}

pub fn uniform2iv(instance: DOMReference, location: DOMReference, data: DOMReference) {
    unsafe { webgl_uniform2iv(instance, location, data) }
}
extern "C" {
    fn webgl_uniform3iv(instance: DOMReference, uniform3iv: DOMReference, uniform3iv: DOMReference);
}

pub fn uniform3iv(instance: DOMReference, location: DOMReference, data: DOMReference) {
    unsafe { webgl_uniform3iv(instance, location, data) }
}
extern "C" {
    fn webgl_uniform4iv(instance: DOMReference, uniform4iv: DOMReference, uniform4iv: DOMReference);
}

pub fn uniform4iv(instance: DOMReference, location: DOMReference, data: DOMReference) {
    unsafe { webgl_uniform4iv(instance, location, data) }
}
extern "C" {
    fn webgl_uniform_matrix2fv(
        instance: DOMReference,
        uniform_matrix2fv: DOMReference,
        uniform_matrix2fv: i32,
        uniform_matrix2fv: DOMReference,
    );
}

pub fn uniform_matrix2fv(
    instance: DOMReference,
    location: DOMReference,
    transpose: bool,
    data: DOMReference,
) {
    unsafe { webgl_uniform_matrix2fv(instance, location, if transpose { 1 } else { 0 }, data) }
}
extern "C" {
    fn webgl_uniform_matrix3fv(
        instance: DOMReference,
        uniform_matrix3fv: DOMReference,
        uniform_matrix3fv: i32,
        uniform_matrix3fv: DOMReference,
    );
}

pub fn uniform_matrix3fv(
    instance: DOMReference,
    location: DOMReference,
    transpose: bool,
    data: DOMReference,
) {
    unsafe { webgl_uniform_matrix3fv(instance, location, if transpose { 1 } else { 0 }, data) }
}
extern "C" {
    fn webgl_uniform_matrix4fv(
        instance: DOMReference,
        uniform_matrix4fv: DOMReference,
        uniform_matrix4fv: i32,
        uniform_matrix4fv: DOMReference,
    );
}

pub fn uniform_matrix4fv(
    instance: DOMReference,
    location: DOMReference,
    transpose: bool,
    data: DOMReference,
) {
    unsafe { webgl_uniform_matrix4fv(instance, location, if transpose { 1 } else { 0 }, data) }
}
extern "C" {
    fn webgl_commit(instance: DOMReference);
}

pub fn commit(instance: DOMReference) {
    unsafe { webgl_commit(instance) }
}