aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/obscuren/qml/gl/4.1core/gl.go
blob: e5579001a12dca479764e95ea01f5e25c93e0b6f (plain) (blame)
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
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
// ** file automatically generated by glgen -- do not edit manually **

package GL

// #cgo CXXFLAGS: -std=c++0x -pedantic-errors -Wall -fno-strict-aliasing
// #cgo LDFLAGS: -lstdc++
// #cgo pkg-config: Qt5Core Qt5OpenGL
//
// #include "funcs.h"
//
// void free(void*);
//
import "C"

import (
    "fmt"
    "reflect"
    "unsafe"

    "gopkg.in/qml.v1/gl/glbase"
)

// API returns a value that offers methods matching the OpenGL version 4.1 API.
//
// The returned API must not be used after the provided OpenGL context becomes invalid.
func API(context glbase.Contexter) *GL {
    gl := &GL{}
    gl.funcs = C.gl4_1core_funcs()
    if gl.funcs == nil {
        panic(fmt.Errorf("OpenGL version 4.1 is not available"))
    }
    return gl
}

// GL implements the OpenGL version 4.1 API. Values of this
// type must be created via the API function, and it must not be used after
// the associated OpenGL context becomes invalid.
type GL struct {
    funcs unsafe.Pointer
}

const (
    FALSE = 0
    TRUE  = 1
    NONE  = 0

    BYTE           = 0x1400
    UNSIGNED_BYTE  = 0x1401
    SHORT          = 0x1402
    UNSIGNED_SHORT = 0x1403
    INT            = 0x1404
    UNSIGNED_INT   = 0x1405
    FLOAT          = 0x1406
    N2_BYTES       = 0x1407
    N3_BYTES       = 0x1408
    N4_BYTES       = 0x1409
    DOUBLE         = 0x140A
    HALF_FLOAT     = 0x140B
    FIXED          = 0x140C

    ACCUM  = 0x0100
    LOAD   = 0x0101
    RETURN = 0x0102
    MULT   = 0x0103
    ADD    = 0x0104

    ACCUM_BUFFER_BIT    = 0x00000200
    ALL_ATTRIB_BITS     = 0xFFFFFFFF
    COLOR_BUFFER_BIT    = 0x00004000
    CURRENT_BIT         = 0x00000001
    DEPTH_BUFFER_BIT    = 0x00000100
    ENABLE_BIT          = 0x00002000
    EVAL_BIT            = 0x00010000
    FOG_BIT             = 0x00000080
    HINT_BIT            = 0x00008000
    LIGHTING_BIT        = 0x00000040
    LINE_BIT            = 0x00000004
    LIST_BIT            = 0x00020000
    MULTISAMPLE_BIT     = 0x20000000
    PIXEL_MODE_BIT      = 0x00000020
    POINT_BIT           = 0x00000002
    POLYGON_BIT         = 0x00000008
    POLYGON_STIPPLE_BIT = 0x00000010
    SCISSOR_BIT         = 0x00080000
    STENCIL_BUFFER_BIT  = 0x00000400
    TEXTURE_BIT         = 0x00040000
    TRANSFORM_BIT       = 0x00001000
    VIEWPORT_BIT        = 0x00000800

    ALWAYS   = 0x0207
    EQUAL    = 0x0202
    GEQUAL   = 0x0206
    GREATER  = 0x0204
    LEQUAL   = 0x0203
    LESS     = 0x0201
    NEVER    = 0x0200
    NOTEQUAL = 0x0205

    LOGIC_OP = 0x0BF1

    DST_ALPHA           = 0x0304
    ONE                 = 1
    ONE_MINUS_DST_ALPHA = 0x0305
    ONE_MINUS_SRC_ALPHA = 0x0303
    ONE_MINUS_SRC_COLOR = 0x0301
    SRC_ALPHA           = 0x0302
    SRC_COLOR           = 0x0300
    ZERO                = 0

    DST_COLOR           = 0x0306
    ONE_MINUS_DST_COLOR = 0x0307
    SRC_ALPHA_SATURATE  = 0x0308

    CLIENT_ALL_ATTRIB_BITS  = 0xFFFFFFFF
    CLIENT_PIXEL_STORE_BIT  = 0x00000001
    CLIENT_VERTEX_ARRAY_BIT = 0x00000002

    CLIP_DISTANCE0 = 0x3000
    CLIP_DISTANCE1 = 0x3001
    CLIP_DISTANCE2 = 0x3002
    CLIP_DISTANCE3 = 0x3003
    CLIP_DISTANCE4 = 0x3004
    CLIP_DISTANCE5 = 0x3005
    CLIP_DISTANCE6 = 0x3006
    CLIP_DISTANCE7 = 0x3007
    CLIP_PLANE0    = 0x3000
    CLIP_PLANE1    = 0x3001
    CLIP_PLANE2    = 0x3002
    CLIP_PLANE3    = 0x3003
    CLIP_PLANE4    = 0x3004
    CLIP_PLANE5    = 0x3005

    BACK           = 0x0405
    FRONT          = 0x0404
    FRONT_AND_BACK = 0x0408

    AMBIENT             = 0x1200
    AMBIENT_AND_DIFFUSE = 0x1602
    DIFFUSE             = 0x1201
    EMISSION            = 0x1600
    SPECULAR            = 0x1202

    CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = 0x00000001

    CONTEXT_COMPATIBILITY_PROFILE_BIT = 0x00000002
    CONTEXT_CORE_PROFILE_BIT          = 0x00000001

    AUX0        = 0x0409
    AUX1        = 0x040A
    AUX2        = 0x040B
    AUX3        = 0x040C
    BACK_LEFT   = 0x0402
    BACK_RIGHT  = 0x0403
    FRONT_LEFT  = 0x0400
    FRONT_RIGHT = 0x0401
    LEFT        = 0x0406
    RIGHT       = 0x0407

    ALPHA_TEST           = 0x0BC0
    AUTO_NORMAL          = 0x0D80
    BLEND                = 0x0BE2
    COLOR_ARRAY          = 0x8076
    COLOR_LOGIC_OP       = 0x0BF2
    COLOR_MATERIAL       = 0x0B57
    CULL_FACE            = 0x0B44
    DEPTH_TEST           = 0x0B71
    DITHER               = 0x0BD0
    EDGE_FLAG_ARRAY      = 0x8079
    FOG                  = 0x0B60
    INDEX_ARRAY          = 0x8077
    INDEX_LOGIC_OP       = 0x0BF1
    LIGHT0               = 0x4000
    LIGHT1               = 0x4001
    LIGHT2               = 0x4002
    LIGHT3               = 0x4003
    LIGHT4               = 0x4004
    LIGHT5               = 0x4005
    LIGHT6               = 0x4006
    LIGHT7               = 0x4007
    LIGHTING             = 0x0B50
    LINE_SMOOTH          = 0x0B20
    LINE_STIPPLE         = 0x0B24
    MAP1_COLOR_4         = 0x0D90
    MAP1_INDEX           = 0x0D91
    MAP1_NORMAL          = 0x0D92
    MAP1_TEXTURE_COORD_1 = 0x0D93
    MAP1_TEXTURE_COORD_2 = 0x0D94
    MAP1_TEXTURE_COORD_3 = 0x0D95
    MAP1_TEXTURE_COORD_4 = 0x0D96
    MAP1_VERTEX_3        = 0x0D97
    MAP1_VERTEX_4        = 0x0D98
    MAP2_COLOR_4         = 0x0DB0
    MAP2_INDEX           = 0x0DB1
    MAP2_NORMAL          = 0x0DB2
    MAP2_TEXTURE_COORD_1 = 0x0DB3
    MAP2_TEXTURE_COORD_2 = 0x0DB4
    MAP2_TEXTURE_COORD_3 = 0x0DB5
    MAP2_TEXTURE_COORD_4 = 0x0DB6
    MAP2_VERTEX_3        = 0x0DB7
    MAP2_VERTEX_4        = 0x0DB8
    NORMALIZE            = 0x0BA1
    NORMAL_ARRAY         = 0x8075
    POINT_SMOOTH         = 0x0B10
    POLYGON_OFFSET_FILL  = 0x8037
    POLYGON_OFFSET_LINE  = 0x2A02
    POLYGON_OFFSET_POINT = 0x2A01
    POLYGON_SMOOTH       = 0x0B41
    POLYGON_STIPPLE      = 0x0B42
    SCISSOR_TEST         = 0x0C11
    STENCIL_TEST         = 0x0B90
    TEXTURE_1D           = 0x0DE0
    TEXTURE_2D           = 0x0DE1
    TEXTURE_COORD_ARRAY  = 0x8078
    TEXTURE_GEN_Q        = 0x0C63
    TEXTURE_GEN_R        = 0x0C62
    TEXTURE_GEN_S        = 0x0C60
    TEXTURE_GEN_T        = 0x0C61
    VERTEX_ARRAY         = 0x8074

    INVALID_ENUM                  = 0x0500
    INVALID_FRAMEBUFFER_OPERATION = 0x0506
    INVALID_OPERATION             = 0x0502
    INVALID_VALUE                 = 0x0501
    NO_ERROR                      = 0
    OUT_OF_MEMORY                 = 0x0505
    STACK_OVERFLOW                = 0x0503
    STACK_UNDERFLOW               = 0x0504

    N2D               = 0x0600
    N3D               = 0x0601
    N3D_COLOR         = 0x0602
    N3D_COLOR_TEXTURE = 0x0603
    N4D_COLOR_TEXTURE = 0x0604

    BITMAP_TOKEN       = 0x0704
    COPY_PIXEL_TOKEN   = 0x0706
    DRAW_PIXEL_TOKEN   = 0x0705
    LINE_RESET_TOKEN   = 0x0707
    LINE_TOKEN         = 0x0702
    PASS_THROUGH_TOKEN = 0x0700
    POINT_TOKEN        = 0x0701
    POLYGON_TOKEN      = 0x0703

    EXP    = 0x0800
    EXP2   = 0x0801
    LINEAR = 0x2601

    FOG_COLOR   = 0x0B66
    FOG_DENSITY = 0x0B62
    FOG_END     = 0x0B64
    FOG_INDEX   = 0x0B61
    FOG_MODE    = 0x0B65
    FOG_START   = 0x0B63

    CCW = 0x0901
    CW  = 0x0900

    COEFF  = 0x0A00
    DOMAIN = 0x0A02
    ORDER  = 0x0A01

    PIXEL_MAP_A_TO_A = 0x0C79
    PIXEL_MAP_B_TO_B = 0x0C78
    PIXEL_MAP_G_TO_G = 0x0C77
    PIXEL_MAP_I_TO_A = 0x0C75
    PIXEL_MAP_I_TO_B = 0x0C74
    PIXEL_MAP_I_TO_G = 0x0C73
    PIXEL_MAP_I_TO_I = 0x0C70
    PIXEL_MAP_I_TO_R = 0x0C72
    PIXEL_MAP_R_TO_R = 0x0C76
    PIXEL_MAP_S_TO_S = 0x0C71

    ACCUM_ALPHA_BITS              = 0x0D5B
    ACCUM_BLUE_BITS               = 0x0D5A
    ACCUM_CLEAR_VALUE             = 0x0B80
    ACCUM_GREEN_BITS              = 0x0D59
    ACCUM_RED_BITS                = 0x0D58
    ALIASED_LINE_WIDTH_RANGE      = 0x846E
    ALIASED_POINT_SIZE_RANGE      = 0x846D
    ALPHA_BIAS                    = 0x0D1D
    ALPHA_BITS                    = 0x0D55
    ALPHA_SCALE                   = 0x0D1C
    ALPHA_TEST_FUNC               = 0x0BC1
    ALPHA_TEST_REF                = 0x0BC2
    ATTRIB_STACK_DEPTH            = 0x0BB0
    AUX_BUFFERS                   = 0x0C00
    BLEND_DST                     = 0x0BE0
    BLEND_SRC                     = 0x0BE1
    BLUE_BIAS                     = 0x0D1B
    BLUE_BITS                     = 0x0D54
    BLUE_SCALE                    = 0x0D1A
    CLIENT_ATTRIB_STACK_DEPTH     = 0x0BB1
    COLOR_ARRAY_SIZE              = 0x8081
    COLOR_ARRAY_STRIDE            = 0x8083
    COLOR_ARRAY_TYPE              = 0x8082
    COLOR_CLEAR_VALUE             = 0x0C22
    COLOR_MATERIAL_FACE           = 0x0B55
    COLOR_MATERIAL_PARAMETER      = 0x0B56
    COLOR_WRITEMASK               = 0x0C23
    CULL_FACE_MODE                = 0x0B45
    CURRENT_COLOR                 = 0x0B00
    CURRENT_INDEX                 = 0x0B01
    CURRENT_NORMAL                = 0x0B02
    CURRENT_RASTER_COLOR          = 0x0B04
    CURRENT_RASTER_DISTANCE       = 0x0B09
    CURRENT_RASTER_INDEX          = 0x0B05
    CURRENT_RASTER_POSITION       = 0x0B07
    CURRENT_RASTER_POSITION_VALID = 0x0B08
    CURRENT_RASTER_TEXTURE_COORDS = 0x0B06
    CURRENT_TEXTURE_COORDS        = 0x0B03
    DEPTH_BIAS                    = 0x0D1F
    DEPTH_BITS                    = 0x0D56
    DEPTH_CLEAR_VALUE             = 0x0B73
    DEPTH_FUNC                    = 0x0B74
    DEPTH_RANGE                   = 0x0B70
    DEPTH_SCALE                   = 0x0D1E
    DEPTH_WRITEMASK               = 0x0B72
    DOUBLEBUFFER                  = 0x0C32
    DRAW_BUFFER                   = 0x0C01
    EDGE_FLAG                     = 0x0B43
    EDGE_FLAG_ARRAY_STRIDE        = 0x808C
    FEEDBACK_BUFFER_SIZE          = 0x0DF1
    FEEDBACK_BUFFER_TYPE          = 0x0DF2
    FOG_HINT                      = 0x0C54
    FRONT_FACE                    = 0x0B46
    GREEN_BIAS                    = 0x0D19
    GREEN_BITS                    = 0x0D53
    GREEN_SCALE                   = 0x0D18
    INDEX_ARRAY_STRIDE            = 0x8086
    INDEX_ARRAY_TYPE              = 0x8085
    INDEX_BITS                    = 0x0D51
    INDEX_CLEAR_VALUE             = 0x0C20
    INDEX_MODE                    = 0x0C30
    INDEX_OFFSET                  = 0x0D13
    INDEX_SHIFT                   = 0x0D12
    INDEX_WRITEMASK               = 0x0C21
    LIGHT_MODEL_AMBIENT           = 0x0B53
    LIGHT_MODEL_COLOR_CONTROL     = 0x81F8
    LIGHT_MODEL_LOCAL_VIEWER      = 0x0B51
    LIGHT_MODEL_TWO_SIDE          = 0x0B52
    LINE_SMOOTH_HINT              = 0x0C52
    LINE_STIPPLE_PATTERN          = 0x0B25
    LINE_STIPPLE_REPEAT           = 0x0B26
    LINE_WIDTH                    = 0x0B21
    LINE_WIDTH_GRANULARITY        = 0x0B23
    LINE_WIDTH_RANGE              = 0x0B22
    LIST_BASE                     = 0x0B32
    LIST_INDEX                    = 0x0B33
    LIST_MODE                     = 0x0B30
    LOGIC_OP_MODE                 = 0x0BF0
    MAP1_GRID_DOMAIN              = 0x0DD0
    MAP1_GRID_SEGMENTS            = 0x0DD1
    MAP2_GRID_DOMAIN              = 0x0DD2
    MAP2_GRID_SEGMENTS            = 0x0DD3
    MAP_COLOR                     = 0x0D10
    MAP_STENCIL                   = 0x0D11
    MATRIX_MODE                   = 0x0BA0
    MAX_ATTRIB_STACK_DEPTH        = 0x0D35
    MAX_CLIENT_ATTRIB_STACK_DEPTH = 0x0D3B
    MAX_CLIP_DISTANCES            = 0x0D32
    MAX_CLIP_PLANES               = 0x0D32
    MAX_EVAL_ORDER                = 0x0D30
    MAX_LIGHTS                    = 0x0D31
    MAX_LIST_NESTING              = 0x0B31
    MAX_MODELVIEW_STACK_DEPTH     = 0x0D36
    MAX_NAME_STACK_DEPTH          = 0x0D37
    MAX_PIXEL_MAP_TABLE           = 0x0D34
    MAX_PROJECTION_STACK_DEPTH    = 0x0D38
    MAX_TEXTURE_SIZE              = 0x0D33
    MAX_TEXTURE_STACK_DEPTH       = 0x0D39
    MAX_VIEWPORT_DIMS             = 0x0D3A
    MODELVIEW_MATRIX              = 0x0BA6
    MODELVIEW_STACK_DEPTH         = 0x0BA3
    NAME_STACK_DEPTH              = 0x0D70
    NORMAL_ARRAY_STRIDE           = 0x807F
    NORMAL_ARRAY_TYPE             = 0x807E
    PACK_ALIGNMENT                = 0x0D05
    PACK_LSB_FIRST                = 0x0D01
    PACK_ROW_LENGTH               = 0x0D02
    PACK_SKIP_PIXELS              = 0x0D04
    PACK_SKIP_ROWS                = 0x0D03
    PACK_SWAP_BYTES               = 0x0D00
    PERSPECTIVE_CORRECTION_HINT   = 0x0C50
    PIXEL_MAP_A_TO_A_SIZE         = 0x0CB9
    PIXEL_MAP_B_TO_B_SIZE         = 0x0CB8
    PIXEL_MAP_G_TO_G_SIZE         = 0x0CB7
    PIXEL_MAP_I_TO_A_SIZE         = 0x0CB5
    PIXEL_MAP_I_TO_B_SIZE         = 0x0CB4
    PIXEL_MAP_I_TO_G_SIZE         = 0x0CB3
    PIXEL_MAP_I_TO_I_SIZE         = 0x0CB0
    PIXEL_MAP_I_TO_R_SIZE         = 0x0CB2
    PIXEL_MAP_R_TO_R_SIZE         = 0x0CB6
    PIXEL_MAP_S_TO_S_SIZE         = 0x0CB1
    POINT_SIZE                    = 0x0B11
    POINT_SIZE_GRANULARITY        = 0x0B13
    POINT_SIZE_RANGE              = 0x0B12
    POINT_SMOOTH_HINT             = 0x0C51
    POLYGON_MODE                  = 0x0B40
    POLYGON_OFFSET_FACTOR         = 0x8038
    POLYGON_OFFSET_UNITS          = 0x2A00
    POLYGON_SMOOTH_HINT           = 0x0C53
    PROJECTION_MATRIX             = 0x0BA7
    PROJECTION_STACK_DEPTH        = 0x0BA4
    READ_BUFFER                   = 0x0C02
    RED_BIAS                      = 0x0D15
    RED_BITS                      = 0x0D52
    RED_SCALE                     = 0x0D14
    RENDER_MODE                   = 0x0C40
    RGBA_MODE                     = 0x0C31
    SCISSOR_BOX                   = 0x0C10
    SELECTION_BUFFER_SIZE         = 0x0DF4
    SHADE_MODEL                   = 0x0B54
    SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23
    SMOOTH_LINE_WIDTH_RANGE       = 0x0B22
    SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13
    SMOOTH_POINT_SIZE_RANGE       = 0x0B12
    STENCIL_BITS                  = 0x0D57
    STENCIL_CLEAR_VALUE           = 0x0B91
    STENCIL_FAIL                  = 0x0B94
    STENCIL_FUNC                  = 0x0B92
    STENCIL_PASS_DEPTH_FAIL       = 0x0B95
    STENCIL_PASS_DEPTH_PASS       = 0x0B96
    STENCIL_REF                   = 0x0B97
    STENCIL_VALUE_MASK            = 0x0B93
    STENCIL_WRITEMASK             = 0x0B98
    STEREO                        = 0x0C33
    SUBPIXEL_BITS                 = 0x0D50
    TEXTURE_BINDING_1D            = 0x8068
    TEXTURE_BINDING_2D            = 0x8069
    TEXTURE_BINDING_3D            = 0x806A
    TEXTURE_COORD_ARRAY_SIZE      = 0x8088
    TEXTURE_COORD_ARRAY_STRIDE    = 0x808A
    TEXTURE_COORD_ARRAY_TYPE      = 0x8089
    TEXTURE_MATRIX                = 0x0BA8
    TEXTURE_STACK_DEPTH           = 0x0BA5
    UNPACK_ALIGNMENT              = 0x0CF5
    UNPACK_LSB_FIRST              = 0x0CF1
    UNPACK_ROW_LENGTH             = 0x0CF2
    UNPACK_SKIP_PIXELS            = 0x0CF4
    UNPACK_SKIP_ROWS              = 0x0CF3
    UNPACK_SWAP_BYTES             = 0x0CF0
    VERTEX_ARRAY_SIZE             = 0x807A
    VERTEX_ARRAY_STRIDE           = 0x807C
    VERTEX_ARRAY_TYPE             = 0x807B
    VIEWPORT                      = 0x0BA2
    ZOOM_X                        = 0x0D16
    ZOOM_Y                        = 0x0D17

    COLOR_ARRAY_POINTER         = 0x8090
    EDGE_FLAG_ARRAY_POINTER     = 0x8093
    FEEDBACK_BUFFER_POINTER     = 0x0DF0
    INDEX_ARRAY_POINTER         = 0x8091
    NORMAL_ARRAY_POINTER        = 0x808F
    SELECTION_BUFFER_POINTER    = 0x0DF3
    TEXTURE_COORD_ARRAY_POINTER = 0x8092
    VERTEX_ARRAY_POINTER        = 0x808E

    TEXTURE_ALPHA_SIZE      = 0x805F
    TEXTURE_BLUE_SIZE       = 0x805E
    TEXTURE_BORDER          = 0x1005
    TEXTURE_BORDER_COLOR    = 0x1004
    TEXTURE_COMPONENTS      = 0x1003
    TEXTURE_GREEN_SIZE      = 0x805D
    TEXTURE_HEIGHT          = 0x1001
    TEXTURE_INTENSITY_SIZE  = 0x8061
    TEXTURE_INTERNAL_FORMAT = 0x1003
    TEXTURE_LUMINANCE_SIZE  = 0x8060
    TEXTURE_MAG_FILTER      = 0x2800
    TEXTURE_MIN_FILTER      = 0x2801
    TEXTURE_PRIORITY        = 0x8066
    TEXTURE_RED_SIZE        = 0x805C
    TEXTURE_RESIDENT        = 0x8067
    TEXTURE_WIDTH           = 0x1000
    TEXTURE_WRAP_S          = 0x2802
    TEXTURE_WRAP_T          = 0x2803

    DONT_CARE = 0x1100
    FASTEST   = 0x1101
    NICEST    = 0x1102

    FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B
    GENERATE_MIPMAP_HINT            = 0x8192
    PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257
    TEXTURE_COMPRESSION_HINT        = 0x84EF

    C3F_V3F         = 0x2A24
    C4F_N3F_V3F     = 0x2A26
    C4UB_V2F        = 0x2A22
    C4UB_V3F        = 0x2A23
    N3F_V3F         = 0x2A25
    T2F_C3F_V3F     = 0x2A2A
    T2F_C4F_N3F_V3F = 0x2A2C
    T2F_C4UB_V3F    = 0x2A29
    T2F_N3F_V3F     = 0x2A2B
    T2F_V3F         = 0x2A27
    T4F_C4F_N3F_V4F = 0x2A2D
    T4F_V4F         = 0x2A28
    V2F             = 0x2A20
    V3F             = 0x2A21

    MODULATE = 0x2100
    REPLACE  = 0x1E01

    SEPARATE_SPECULAR_COLOR = 0x81FA
    SINGLE_COLOR            = 0x81F9

    CONSTANT_ATTENUATION  = 0x1207
    LINEAR_ATTENUATION    = 0x1208
    POSITION              = 0x1203
    QUADRATIC_ATTENUATION = 0x1209
    SPOT_CUTOFF           = 0x1206
    SPOT_DIRECTION        = 0x1204
    SPOT_EXPONENT         = 0x1205

    COMPILE             = 0x1300
    COMPILE_AND_EXECUTE = 0x1301

    AND           = 0x1501
    AND_INVERTED  = 0x1504
    AND_REVERSE   = 0x1502
    CLEAR         = 0x1500
    COPY          = 0x1503
    COPY_INVERTED = 0x150C
    EQUIV         = 0x1509
    INVERT        = 0x150A
    NAND          = 0x150E
    NOOP          = 0x1505
    NOR           = 0x1508
    OR            = 0x1507
    OR_INVERTED   = 0x150D
    OR_REVERSE    = 0x150B
    SET           = 0x150F
    XOR           = 0x1506

    MAP_FLUSH_EXPLICIT_BIT    = 0x0010
    MAP_INVALIDATE_BUFFER_BIT = 0x0008
    MAP_INVALIDATE_RANGE_BIT  = 0x0004
    MAP_READ_BIT              = 0x0001
    MAP_UNSYNCHRONIZED_BIT    = 0x0020
    MAP_WRITE_BIT             = 0x0002

    COLOR_INDEXES = 0x1603
    SHININESS     = 0x1601

    MODELVIEW  = 0x1700
    PROJECTION = 0x1701
    TEXTURE    = 0x1702

    LINE  = 0x1B01
    POINT = 0x1B00

    FILL = 0x1B02

    COLOR   = 0x1800
    DEPTH   = 0x1801
    STENCIL = 0x1802

    ALPHA           = 0x1906
    BLUE            = 0x1905
    COLOR_INDEX     = 0x1900
    DEPTH_COMPONENT = 0x1902
    GREEN           = 0x1904
    LUMINANCE       = 0x1909
    LUMINANCE_ALPHA = 0x190A
    RED             = 0x1903
    RGB             = 0x1907
    RGBA            = 0x1908
    STENCIL_INDEX   = 0x1901

    ALPHA12             = 0x803D
    ALPHA16             = 0x803E
    ALPHA4              = 0x803B
    ALPHA8              = 0x803C
    INTENSITY           = 0x8049
    INTENSITY12         = 0x804C
    INTENSITY16         = 0x804D
    INTENSITY4          = 0x804A
    INTENSITY8          = 0x804B
    LUMINANCE12         = 0x8041
    LUMINANCE12_ALPHA12 = 0x8047
    LUMINANCE12_ALPHA4  = 0x8046
    LUMINANCE16         = 0x8042
    LUMINANCE16_ALPHA16 = 0x8048
    LUMINANCE4          = 0x803F
    LUMINANCE4_ALPHA4   = 0x8043
    LUMINANCE6_ALPHA2   = 0x8044
    LUMINANCE8          = 0x8040
    LUMINANCE8_ALPHA8   = 0x8045
    R3_G3_B2            = 0x2A10
    RGB10               = 0x8052
    RGB10_A2            = 0x8059
    RGB12               = 0x8053
    RGB16               = 0x8054
    RGB4                = 0x804F
    RGB5                = 0x8050
    RGB5_A1             = 0x8057
    RGB8                = 0x8051
    RGBA12              = 0x805A
    RGBA16              = 0x805B
    RGBA2               = 0x8055
    RGBA4               = 0x8056
    RGBA8               = 0x8058

    PACK_IMAGE_HEIGHT   = 0x806C
    PACK_SKIP_IMAGES    = 0x806B
    UNPACK_IMAGE_HEIGHT = 0x806E
    UNPACK_SKIP_IMAGES  = 0x806D

    BITMAP                  = 0x1A00
    UNSIGNED_BYTE_3_3_2     = 0x8032
    UNSIGNED_INT_10_10_10_2 = 0x8036
    UNSIGNED_INT_8_8_8_8    = 0x8035
    UNSIGNED_SHORT_4_4_4_4  = 0x8033
    UNSIGNED_SHORT_5_5_5_1  = 0x8034

    POINT_DISTANCE_ATTENUATION = 0x8129
    POINT_FADE_THRESHOLD_SIZE  = 0x8128
    POINT_SIZE_MAX             = 0x8127
    POINT_SIZE_MIN             = 0x8126

    LINES                    = 0x0001
    LINES_ADJACENCY          = 0x000A
    LINE_LOOP                = 0x0002
    LINE_STRIP               = 0x0003
    LINE_STRIP_ADJACENCY     = 0x000B
    PATCHES                  = 0x000E
    POINTS                   = 0x0000
    POLYGON                  = 0x0009
    QUADS                    = 0x0007
    QUAD_STRIP               = 0x0008
    TRIANGLES                = 0x0004
    TRIANGLES_ADJACENCY      = 0x000C
    TRIANGLE_FAN             = 0x0006
    TRIANGLE_STRIP           = 0x0005
    TRIANGLE_STRIP_ADJACENCY = 0x000D

    FEEDBACK = 0x1C01
    RENDER   = 0x1C00
    SELECT   = 0x1C02

    FLAT   = 0x1D00
    SMOOTH = 0x1D01

    DECR = 0x1E03
    INCR = 0x1E02
    KEEP = 0x1E00

    EXTENSIONS = 0x1F03
    RENDERER   = 0x1F01
    VENDOR     = 0x1F00
    VERSION    = 0x1F02

    S = 0x2000
    T = 0x2001
    R = 0x2002
    Q = 0x2003

    DECAL = 0x2101

    TEXTURE_ENV_COLOR = 0x2201
    TEXTURE_ENV_MODE  = 0x2200

    TEXTURE_ENV = 0x2300

    EYE_LINEAR    = 0x2400
    OBJECT_LINEAR = 0x2401
    SPHERE_MAP    = 0x2402

    EYE_PLANE        = 0x2502
    OBJECT_PLANE     = 0x2501
    TEXTURE_GEN_MODE = 0x2500

    NEAREST = 0x2600

    LINEAR_MIPMAP_LINEAR   = 0x2703
    LINEAR_MIPMAP_NEAREST  = 0x2701
    NEAREST_MIPMAP_LINEAR  = 0x2702
    NEAREST_MIPMAP_NEAREST = 0x2700

    GENERATE_MIPMAP = 0x8191
    TEXTURE_WRAP_R  = 0x8072

    PROXY_TEXTURE_1D   = 0x8063
    PROXY_TEXTURE_2D   = 0x8064
    PROXY_TEXTURE_3D   = 0x8070
    TEXTURE_3D         = 0x806F
    TEXTURE_BASE_LEVEL = 0x813C
    TEXTURE_MAX_LEVEL  = 0x813D
    TEXTURE_MAX_LOD    = 0x813B
    TEXTURE_MIN_LOD    = 0x813A

    CLAMP           = 0x2900
    CLAMP_TO_BORDER = 0x812D
    CLAMP_TO_EDGE   = 0x812F
    REPEAT          = 0x2901

    VERTEX_SHADER_BIT          = 0x00000001
    FRAGMENT_SHADER_BIT        = 0x00000002
    GEOMETRY_SHADER_BIT        = 0x00000004
    TESS_CONTROL_SHADER_BIT    = 0x00000008
    TESS_EVALUATION_SHADER_BIT = 0x00000010
    ALL_SHADER_BITS            = 0xFFFFFFFF

    SYNC_FLUSH_COMMANDS_BIT                            = 0x00000001
    INVALID_INDEX                                      = 0xFFFFFFFF
    TIMEOUT_IGNORED                                    = 0xFFFFFFFFFFFFFFFF
    CONSTANT_COLOR                                     = 0x8001
    ONE_MINUS_CONSTANT_COLOR                           = 0x8002
    CONSTANT_ALPHA                                     = 0x8003
    ONE_MINUS_CONSTANT_ALPHA                           = 0x8004
    FUNC_ADD                                           = 0x8006
    MIN                                                = 0x8007
    MAX                                                = 0x8008
    BLEND_EQUATION_RGB                                 = 0x8009
    FUNC_SUBTRACT                                      = 0x800A
    FUNC_REVERSE_SUBTRACT                              = 0x800B
    RESCALE_NORMAL                                     = 0x803A
    TEXTURE_DEPTH                                      = 0x8071
    MAX_3D_TEXTURE_SIZE                                = 0x8073
    MULTISAMPLE                                        = 0x809D
    SAMPLE_ALPHA_TO_COVERAGE                           = 0x809E
    SAMPLE_ALPHA_TO_ONE                                = 0x809F
    SAMPLE_COVERAGE                                    = 0x80A0
    SAMPLE_BUFFERS                                     = 0x80A8
    SAMPLES                                            = 0x80A9
    SAMPLE_COVERAGE_VALUE                              = 0x80AA
    SAMPLE_COVERAGE_INVERT                             = 0x80AB
    BLEND_DST_RGB                                      = 0x80C8
    BLEND_SRC_RGB                                      = 0x80C9
    BLEND_DST_ALPHA                                    = 0x80CA
    BLEND_SRC_ALPHA                                    = 0x80CB
    BGR                                                = 0x80E0
    BGRA                                               = 0x80E1
    MAX_ELEMENTS_VERTICES                              = 0x80E8
    MAX_ELEMENTS_INDICES                               = 0x80E9
    DEPTH_COMPONENT16                                  = 0x81A5
    DEPTH_COMPONENT24                                  = 0x81A6
    DEPTH_COMPONENT32                                  = 0x81A7
    FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING              = 0x8210
    FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE              = 0x8211
    FRAMEBUFFER_ATTACHMENT_RED_SIZE                    = 0x8212
    FRAMEBUFFER_ATTACHMENT_GREEN_SIZE                  = 0x8213
    FRAMEBUFFER_ATTACHMENT_BLUE_SIZE                   = 0x8214
    FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE                  = 0x8215
    FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE                  = 0x8216
    FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE                = 0x8217
    FRAMEBUFFER_DEFAULT                                = 0x8218
    FRAMEBUFFER_UNDEFINED                              = 0x8219
    DEPTH_STENCIL_ATTACHMENT                           = 0x821A
    MAJOR_VERSION                                      = 0x821B
    MINOR_VERSION                                      = 0x821C
    NUM_EXTENSIONS                                     = 0x821D
    CONTEXT_FLAGS                                      = 0x821E
    COMPRESSED_RED                                     = 0x8225
    COMPRESSED_RG                                      = 0x8226
    RG                                                 = 0x8227
    RG_INTEGER                                         = 0x8228
    R8                                                 = 0x8229
    R16                                                = 0x822A
    RG8                                                = 0x822B
    RG16                                               = 0x822C
    R16F                                               = 0x822D
    R32F                                               = 0x822E
    RG16F                                              = 0x822F
    RG32F                                              = 0x8230
    R8I                                                = 0x8231
    R8UI                                               = 0x8232
    R16I                                               = 0x8233
    R16UI                                              = 0x8234
    R32I                                               = 0x8235
    R32UI                                              = 0x8236
    RG8I                                               = 0x8237
    RG8UI                                              = 0x8238
    RG16I                                              = 0x8239
    RG16UI                                             = 0x823A
    RG32I                                              = 0x823B
    RG32UI                                             = 0x823C
    PROGRAM_SEPARABLE                                  = 0x8258
    ACTIVE_PROGRAM                                     = 0x8259
    PROGRAM_PIPELINE_BINDING                           = 0x825A
    MAX_VIEWPORTS                                      = 0x825B
    VIEWPORT_SUBPIXEL_BITS                             = 0x825C
    VIEWPORT_BOUNDS_RANGE                              = 0x825D
    LAYER_PROVOKING_VERTEX                             = 0x825E
    VIEWPORT_INDEX_PROVOKING_VERTEX                    = 0x825F
    UNDEFINED_VERTEX                                   = 0x8260
    UNSIGNED_BYTE_2_3_3_REV                            = 0x8362
    UNSIGNED_SHORT_5_6_5                               = 0x8363
    UNSIGNED_SHORT_5_6_5_REV                           = 0x8364
    UNSIGNED_SHORT_4_4_4_4_REV                         = 0x8365
    UNSIGNED_SHORT_1_5_5_5_REV                         = 0x8366
    UNSIGNED_INT_8_8_8_8_REV                           = 0x8367
    UNSIGNED_INT_2_10_10_10_REV                        = 0x8368
    MIRRORED_REPEAT                                    = 0x8370
    FOG_COORDINATE_SOURCE                              = 0x8450
    FOG_COORD_SRC                                      = 0x8450
    FOG_COORDINATE                                     = 0x8451
    FOG_COORD                                          = 0x8451
    FRAGMENT_DEPTH                                     = 0x8452
    CURRENT_FOG_COORDINATE                             = 0x8453
    CURRENT_FOG_COORD                                  = 0x8453
    FOG_COORDINATE_ARRAY_TYPE                          = 0x8454
    FOG_COORD_ARRAY_TYPE                               = 0x8454
    FOG_COORDINATE_ARRAY_STRIDE                        = 0x8455
    FOG_COORD_ARRAY_STRIDE                             = 0x8455
    FOG_COORDINATE_ARRAY_POINTER                       = 0x8456
    FOG_COORD_ARRAY_POINTER                            = 0x8456
    FOG_COORDINATE_ARRAY                               = 0x8457
    FOG_COORD_ARRAY                                    = 0x8457
    COLOR_SUM                                          = 0x8458
    CURRENT_SECONDARY_COLOR                            = 0x8459
    SECONDARY_COLOR_ARRAY_SIZE                         = 0x845A
    SECONDARY_COLOR_ARRAY_TYPE                         = 0x845B
    SECONDARY_COLOR_ARRAY_STRIDE                       = 0x845C
    SECONDARY_COLOR_ARRAY_POINTER                      = 0x845D
    SECONDARY_COLOR_ARRAY                              = 0x845E
    CURRENT_RASTER_SECONDARY_COLOR                     = 0x845F
    TEXTURE0                                           = 0x84C0
    TEXTURE1                                           = 0x84C1
    TEXTURE2                                           = 0x84C2
    TEXTURE3                                           = 0x84C3
    TEXTURE4                                           = 0x84C4
    TEXTURE5                                           = 0x84C5
    TEXTURE6                                           = 0x84C6
    TEXTURE7                                           = 0x84C7
    TEXTURE8                                           = 0x84C8
    TEXTURE9                                           = 0x84C9
    TEXTURE10                                          = 0x84CA
    TEXTURE11                                          = 0x84CB
    TEXTURE12                                          = 0x84CC
    TEXTURE13                                          = 0x84CD
    TEXTURE14                                          = 0x84CE
    TEXTURE15                                          = 0x84CF
    TEXTURE16                                          = 0x84D0
    TEXTURE17                                          = 0x84D1
    TEXTURE18                                          = 0x84D2
    TEXTURE19                                          = 0x84D3
    TEXTURE20                                          = 0x84D4
    TEXTURE21                                          = 0x84D5
    TEXTURE22                                          = 0x84D6
    TEXTURE23                                          = 0x84D7
    TEXTURE24                                          = 0x84D8
    TEXTURE25                                          = 0x84D9
    TEXTURE26                                          = 0x84DA
    TEXTURE27                                          = 0x84DB
    TEXTURE28                                          = 0x84DC
    TEXTURE29                                          = 0x84DD
    TEXTURE30                                          = 0x84DE
    TEXTURE31                                          = 0x84DF
    ACTIVE_TEXTURE                                     = 0x84E0
    CLIENT_ACTIVE_TEXTURE                              = 0x84E1
    MAX_TEXTURE_UNITS                                  = 0x84E2
    TRANSPOSE_MODELVIEW_MATRIX                         = 0x84E3
    TRANSPOSE_PROJECTION_MATRIX                        = 0x84E4
    TRANSPOSE_TEXTURE_MATRIX                           = 0x84E5
    TRANSPOSE_COLOR_MATRIX                             = 0x84E6
    SUBTRACT                                           = 0x84E7
    MAX_RENDERBUFFER_SIZE                              = 0x84E8
    COMPRESSED_ALPHA                                   = 0x84E9
    COMPRESSED_LUMINANCE                               = 0x84EA
    COMPRESSED_LUMINANCE_ALPHA                         = 0x84EB
    COMPRESSED_INTENSITY                               = 0x84EC
    COMPRESSED_RGB                                     = 0x84ED
    COMPRESSED_RGBA                                    = 0x84EE
    UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER    = 0x84F0
    UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x84F1
    TEXTURE_RECTANGLE                                  = 0x84F5
    TEXTURE_BINDING_RECTANGLE                          = 0x84F6
    PROXY_TEXTURE_RECTANGLE                            = 0x84F7
    MAX_RECTANGLE_TEXTURE_SIZE                         = 0x84F8
    DEPTH_STENCIL                                      = 0x84F9
    UNSIGNED_INT_24_8                                  = 0x84FA
    MAX_TEXTURE_LOD_BIAS                               = 0x84FD
    TEXTURE_FILTER_CONTROL                             = 0x8500
    TEXTURE_LOD_BIAS                                   = 0x8501
    INCR_WRAP                                          = 0x8507
    DECR_WRAP                                          = 0x8508
    NORMAL_MAP                                         = 0x8511
    REFLECTION_MAP                                     = 0x8512
    TEXTURE_CUBE_MAP                                   = 0x8513
    TEXTURE_BINDING_CUBE_MAP                           = 0x8514
    TEXTURE_CUBE_MAP_POSITIVE_X                        = 0x8515
    TEXTURE_CUBE_MAP_NEGATIVE_X                        = 0x8516
    TEXTURE_CUBE_MAP_POSITIVE_Y                        = 0x8517
    TEXTURE_CUBE_MAP_NEGATIVE_Y                        = 0x8518
    TEXTURE_CUBE_MAP_POSITIVE_Z                        = 0x8519
    TEXTURE_CUBE_MAP_NEGATIVE_Z                        = 0x851A
    PROXY_TEXTURE_CUBE_MAP                             = 0x851B
    MAX_CUBE_MAP_TEXTURE_SIZE                          = 0x851C
    COMBINE                                            = 0x8570
    COMBINE_RGB                                        = 0x8571
    COMBINE_ALPHA                                      = 0x8572
    RGB_SCALE                                          = 0x8573
    ADD_SIGNED                                         = 0x8574
    INTERPOLATE                                        = 0x8575
    CONSTANT                                           = 0x8576
    PRIMARY_COLOR                                      = 0x8577
    PREVIOUS                                           = 0x8578
    SOURCE0_RGB                                        = 0x8580
    SRC0_RGB                                           = 0x8580
    SOURCE1_RGB                                        = 0x8581
    SRC1_RGB                                           = 0x8581
    SOURCE2_RGB                                        = 0x8582
    SRC2_RGB                                           = 0x8582
    SOURCE0_ALPHA                                      = 0x8588
    SRC0_ALPHA                                         = 0x8588
    SOURCE1_ALPHA                                      = 0x8589
    SRC1_ALPHA                                         = 0x8589
    SOURCE2_ALPHA                                      = 0x858A
    SRC2_ALPHA                                         = 0x858A
    OPERAND0_RGB                                       = 0x8590
    OPERAND1_RGB                                       = 0x8591
    OPERAND2_RGB                                       = 0x8592
    OPERAND0_ALPHA                                     = 0x8598
    OPERAND1_ALPHA                                     = 0x8599
    OPERAND2_ALPHA                                     = 0x859A
    VERTEX_ARRAY_BINDING                               = 0x85B5
    VERTEX_ATTRIB_ARRAY_ENABLED                        = 0x8622
    VERTEX_ATTRIB_ARRAY_SIZE                           = 0x8623
    VERTEX_ATTRIB_ARRAY_STRIDE                         = 0x8624
    VERTEX_ATTRIB_ARRAY_TYPE                           = 0x8625
    CURRENT_VERTEX_ATTRIB                              = 0x8626
    VERTEX_PROGRAM_POINT_SIZE                          = 0x8642
    PROGRAM_POINT_SIZE                                 = 0x8642
    VERTEX_PROGRAM_TWO_SIDE                            = 0x8643
    VERTEX_ATTRIB_ARRAY_POINTER                        = 0x8645
    DEPTH_CLAMP                                        = 0x864F
    TEXTURE_COMPRESSED_IMAGE_SIZE                      = 0x86A0
    TEXTURE_COMPRESSED                                 = 0x86A1
    NUM_COMPRESSED_TEXTURE_FORMATS                     = 0x86A2
    COMPRESSED_TEXTURE_FORMATS                         = 0x86A3
    DOT3_RGB                                           = 0x86AE
    DOT3_RGBA                                          = 0x86AF
    PROGRAM_BINARY_LENGTH                              = 0x8741
    BUFFER_SIZE                                        = 0x8764
    BUFFER_USAGE                                       = 0x8765
    NUM_PROGRAM_BINARY_FORMATS                         = 0x87FE
    PROGRAM_BINARY_FORMATS                             = 0x87FF
    STENCIL_BACK_FUNC                                  = 0x8800
    STENCIL_BACK_FAIL                                  = 0x8801
    STENCIL_BACK_PASS_DEPTH_FAIL                       = 0x8802
    STENCIL_BACK_PASS_DEPTH_PASS                       = 0x8803
    RGBA32F                                            = 0x8814
    RGB32F                                             = 0x8815
    RGBA16F                                            = 0x881A
    RGB16F                                             = 0x881B
    MAX_DRAW_BUFFERS                                   = 0x8824
    DRAW_BUFFER0                                       = 0x8825
    DRAW_BUFFER1                                       = 0x8826
    DRAW_BUFFER2                                       = 0x8827
    DRAW_BUFFER3                                       = 0x8828
    DRAW_BUFFER4                                       = 0x8829
    DRAW_BUFFER5                                       = 0x882A
    DRAW_BUFFER6                                       = 0x882B
    DRAW_BUFFER7                                       = 0x882C
    DRAW_BUFFER8                                       = 0x882D
    DRAW_BUFFER9                                       = 0x882E
    DRAW_BUFFER10                                      = 0x882F
    DRAW_BUFFER11                                      = 0x8830
    DRAW_BUFFER12                                      = 0x8831
    DRAW_BUFFER13                                      = 0x8832
    DRAW_BUFFER14                                      = 0x8833
    DRAW_BUFFER15                                      = 0x8834
    BLEND_EQUATION_ALPHA                               = 0x883D
    TEXTURE_DEPTH_SIZE                                 = 0x884A
    DEPTH_TEXTURE_MODE                                 = 0x884B
    TEXTURE_COMPARE_MODE                               = 0x884C
    TEXTURE_COMPARE_FUNC                               = 0x884D
    COMPARE_R_TO_TEXTURE                               = 0x884E
    COMPARE_REF_TO_TEXTURE                             = 0x884E
    TEXTURE_CUBE_MAP_SEAMLESS                          = 0x884F
    POINT_SPRITE                                       = 0x8861
    COORD_REPLACE                                      = 0x8862
    QUERY_COUNTER_BITS                                 = 0x8864
    CURRENT_QUERY                                      = 0x8865
    QUERY_RESULT                                       = 0x8866
    QUERY_RESULT_AVAILABLE                             = 0x8867
    MAX_VERTEX_ATTRIBS                                 = 0x8869
    VERTEX_ATTRIB_ARRAY_NORMALIZED                     = 0x886A
    MAX_TESS_CONTROL_INPUT_COMPONENTS                  = 0x886C
    MAX_TESS_EVALUATION_INPUT_COMPONENTS               = 0x886D
    MAX_TEXTURE_COORDS                                 = 0x8871
    MAX_TEXTURE_IMAGE_UNITS                            = 0x8872
    GEOMETRY_SHADER_INVOCATIONS                        = 0x887F
    ARRAY_BUFFER                                       = 0x8892
    ELEMENT_ARRAY_BUFFER                               = 0x8893
    ARRAY_BUFFER_BINDING                               = 0x8894
    ELEMENT_ARRAY_BUFFER_BINDING                       = 0x8895
    VERTEX_ARRAY_BUFFER_BINDING                        = 0x8896
    NORMAL_ARRAY_BUFFER_BINDING                        = 0x8897
    COLOR_ARRAY_BUFFER_BINDING                         = 0x8898
    INDEX_ARRAY_BUFFER_BINDING                         = 0x8899
    TEXTURE_COORD_ARRAY_BUFFER_BINDING                 = 0x889A
    EDGE_FLAG_ARRAY_BUFFER_BINDING                     = 0x889B
    SECONDARY_COLOR_ARRAY_BUFFER_BINDING               = 0x889C
    FOG_COORDINATE_ARRAY_BUFFER_BINDING                = 0x889D
    FOG_COORD_ARRAY_BUFFER_BINDING                     = 0x889D
    WEIGHT_ARRAY_BUFFER_BINDING                        = 0x889E
    VERTEX_ATTRIB_ARRAY_BUFFER_BINDING                 = 0x889F
    READ_ONLY                                          = 0x88B8
    WRITE_ONLY                                         = 0x88B9
    READ_WRITE                                         = 0x88BA
    BUFFER_ACCESS                                      = 0x88BB
    BUFFER_MAPPED                                      = 0x88BC
    BUFFER_MAP_POINTER                                 = 0x88BD
    TIME_ELAPSED                                       = 0x88BF
    STREAM_DRAW                                        = 0x88E0
    STREAM_READ                                        = 0x88E1
    STREAM_COPY                                        = 0x88E2
    STATIC_DRAW                                        = 0x88E4
    STATIC_READ                                        = 0x88E5
    STATIC_COPY                                        = 0x88E6
    DYNAMIC_DRAW                                       = 0x88E8
    DYNAMIC_READ                                       = 0x88E9
    DYNAMIC_COPY                                       = 0x88EA
    PIXEL_PACK_BUFFER                                  = 0x88EB
    PIXEL_UNPACK_BUFFER                                = 0x88EC
    PIXEL_PACK_BUFFER_BINDING                          = 0x88ED
    PIXEL_UNPACK_BUFFER_BINDING                        = 0x88EF
    DEPTH24_STENCIL8                                   = 0x88F0
    TEXTURE_STENCIL_SIZE                               = 0x88F1
    SRC1_COLOR                                         = 0x88F9
    ONE_MINUS_SRC1_COLOR                               = 0x88FA
    ONE_MINUS_SRC1_ALPHA                               = 0x88FB
    MAX_DUAL_SOURCE_DRAW_BUFFERS                       = 0x88FC
    VERTEX_ATTRIB_ARRAY_INTEGER                        = 0x88FD
    VERTEX_ATTRIB_ARRAY_DIVISOR                        = 0x88FE
    MAX_ARRAY_TEXTURE_LAYERS                           = 0x88FF
    MIN_PROGRAM_TEXEL_OFFSET                           = 0x8904
    MAX_PROGRAM_TEXEL_OFFSET                           = 0x8905
    SAMPLES_PASSED                                     = 0x8914
    GEOMETRY_VERTICES_OUT                              = 0x8916
    GEOMETRY_INPUT_TYPE                                = 0x8917
    GEOMETRY_OUTPUT_TYPE                               = 0x8918
    SAMPLER_BINDING                                    = 0x8919
    CLAMP_VERTEX_COLOR                                 = 0x891A
    CLAMP_FRAGMENT_COLOR                               = 0x891B
    CLAMP_READ_COLOR                                   = 0x891C
    FIXED_ONLY                                         = 0x891D
    UNIFORM_BUFFER                                     = 0x8A11
    UNIFORM_BUFFER_BINDING                             = 0x8A28
    UNIFORM_BUFFER_START                               = 0x8A29
    UNIFORM_BUFFER_SIZE                                = 0x8A2A
    MAX_VERTEX_UNIFORM_BLOCKS                          = 0x8A2B
    MAX_GEOMETRY_UNIFORM_BLOCKS                        = 0x8A2C
    MAX_FRAGMENT_UNIFORM_BLOCKS                        = 0x8A2D
    MAX_COMBINED_UNIFORM_BLOCKS                        = 0x8A2E
    MAX_UNIFORM_BUFFER_BINDINGS                        = 0x8A2F
    MAX_UNIFORM_BLOCK_SIZE                             = 0x8A30
    MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS             = 0x8A31
    MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS           = 0x8A32
    MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS           = 0x8A33
    UNIFORM_BUFFER_OFFSET_ALIGNMENT                    = 0x8A34
    ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH               = 0x8A35
    ACTIVE_UNIFORM_BLOCKS                              = 0x8A36
    UNIFORM_TYPE                                       = 0x8A37
    UNIFORM_SIZE                                       = 0x8A38
    UNIFORM_NAME_LENGTH                                = 0x8A39
    UNIFORM_BLOCK_INDEX                                = 0x8A3A
    UNIFORM_OFFSET                                     = 0x8A3B
    UNIFORM_ARRAY_STRIDE                               = 0x8A3C
    UNIFORM_MATRIX_STRIDE                              = 0x8A3D
    UNIFORM_IS_ROW_MAJOR                               = 0x8A3E
    UNIFORM_BLOCK_BINDING                              = 0x8A3F
    UNIFORM_BLOCK_DATA_SIZE                            = 0x8A40
    UNIFORM_BLOCK_NAME_LENGTH                          = 0x8A41
    UNIFORM_BLOCK_ACTIVE_UNIFORMS                      = 0x8A42
    UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES               = 0x8A43
    UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER          = 0x8A44
    UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER        = 0x8A45
    UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER        = 0x8A46
    FRAGMENT_SHADER                                    = 0x8B30
    VERTEX_SHADER                                      = 0x8B31
    MAX_FRAGMENT_UNIFORM_COMPONENTS                    = 0x8B49
    MAX_VERTEX_UNIFORM_COMPONENTS                      = 0x8B4A
    MAX_VARYING_FLOATS                                 = 0x8B4B
    MAX_VARYING_COMPONENTS                             = 0x8B4B
    MAX_VERTEX_TEXTURE_IMAGE_UNITS                     = 0x8B4C
    MAX_COMBINED_TEXTURE_IMAGE_UNITS                   = 0x8B4D
    SHADER_TYPE                                        = 0x8B4F
    FLOAT_VEC2                                         = 0x8B50
    FLOAT_VEC3                                         = 0x8B51
    FLOAT_VEC4                                         = 0x8B52
    INT_VEC2                                           = 0x8B53
    INT_VEC3                                           = 0x8B54
    INT_VEC4                                           = 0x8B55
    BOOL                                               = 0x8B56
    BOOL_VEC2                                          = 0x8B57
    BOOL_VEC3                                          = 0x8B58
    BOOL_VEC4                                          = 0x8B59
    FLOAT_MAT2                                         = 0x8B5A
    FLOAT_MAT3                                         = 0x8B5B
    FLOAT_MAT4                                         = 0x8B5C
    SAMPLER_1D                                         = 0x8B5D
    SAMPLER_2D                                         = 0x8B5E
    SAMPLER_3D                                         = 0x8B5F
    SAMPLER_CUBE                                       = 0x8B60
    SAMPLER_1D_SHADOW                                  = 0x8B61
    SAMPLER_2D_SHADOW                                  = 0x8B62
    SAMPLER_2D_RECT                                    = 0x8B63
    SAMPLER_2D_RECT_SHADOW                             = 0x8B64
    FLOAT_MAT2x3                                       = 0x8B65
    FLOAT_MAT2x4                                       = 0x8B66
    FLOAT_MAT3x2                                       = 0x8B67
    FLOAT_MAT3x4                                       = 0x8B68
    FLOAT_MAT4x2                                       = 0x8B69
    FLOAT_MAT4x3                                       = 0x8B6A
    DELETE_STATUS                                      = 0x8B80
    COMPILE_STATUS                                     = 0x8B81
    LINK_STATUS                                        = 0x8B82
    VALIDATE_STATUS                                    = 0x8B83
    INFO_LOG_LENGTH                                    = 0x8B84
    ATTACHED_SHADERS                                   = 0x8B85
    ACTIVE_UNIFORMS                                    = 0x8B86
    ACTIVE_UNIFORM_MAX_LENGTH                          = 0x8B87
    SHADER_SOURCE_LENGTH                               = 0x8B88
    ACTIVE_ATTRIBUTES                                  = 0x8B89
    ACTIVE_ATTRIBUTE_MAX_LENGTH                        = 0x8B8A
    SHADING_LANGUAGE_VERSION                           = 0x8B8C
    CURRENT_PROGRAM                                    = 0x8B8D
    IMPLEMENTATION_COLOR_READ_TYPE                     = 0x8B9A
    IMPLEMENTATION_COLOR_READ_FORMAT                   = 0x8B9B
    TEXTURE_RED_TYPE                                   = 0x8C10
    TEXTURE_GREEN_TYPE                                 = 0x8C11
    TEXTURE_BLUE_TYPE                                  = 0x8C12
    TEXTURE_ALPHA_TYPE                                 = 0x8C13
    TEXTURE_DEPTH_TYPE                                 = 0x8C16
    UNSIGNED_NORMALIZED                                = 0x8C17
    TEXTURE_1D_ARRAY                                   = 0x8C18
    PROXY_TEXTURE_1D_ARRAY                             = 0x8C19
    TEXTURE_2D_ARRAY                                   = 0x8C1A
    PROXY_TEXTURE_2D_ARRAY                             = 0x8C1B
    TEXTURE_BINDING_1D_ARRAY                           = 0x8C1C
    TEXTURE_BINDING_2D_ARRAY                           = 0x8C1D
    MAX_GEOMETRY_TEXTURE_IMAGE_UNITS                   = 0x8C29
    TEXTURE_BUFFER                                     = 0x8C2A
    MAX_TEXTURE_BUFFER_SIZE                            = 0x8C2B
    TEXTURE_BINDING_BUFFER                             = 0x8C2C
    TEXTURE_BUFFER_DATA_STORE_BINDING                  = 0x8C2D
    ANY_SAMPLES_PASSED                                 = 0x8C2F
    SAMPLE_SHADING                                     = 0x8C36
    MIN_SAMPLE_SHADING_VALUE                           = 0x8C37
    R11F_G11F_B10F                                     = 0x8C3A
    UNSIGNED_INT_10F_11F_11F_REV                       = 0x8C3B
    RGB9_E5                                            = 0x8C3D
    UNSIGNED_INT_5_9_9_9_REV                           = 0x8C3E
    TEXTURE_SHARED_SIZE                                = 0x8C3F
    SRGB                                               = 0x8C40
    SRGB8                                              = 0x8C41
    SRGB_ALPHA                                         = 0x8C42
    SRGB8_ALPHA8                                       = 0x8C43
    SLUMINANCE_ALPHA                                   = 0x8C44
    SLUMINANCE8_ALPHA8                                 = 0x8C45
    SLUMINANCE                                         = 0x8C46
    SLUMINANCE8                                        = 0x8C47
    COMPRESSED_SRGB                                    = 0x8C48
    COMPRESSED_SRGB_ALPHA                              = 0x8C49
    COMPRESSED_SLUMINANCE                              = 0x8C4A
    COMPRESSED_SLUMINANCE_ALPHA                        = 0x8C4B
    TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH              = 0x8C76
    TRANSFORM_FEEDBACK_BUFFER_MODE                     = 0x8C7F
    MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS         = 0x8C80
    TRANSFORM_FEEDBACK_VARYINGS                        = 0x8C83
    TRANSFORM_FEEDBACK_BUFFER_START                    = 0x8C84
    TRANSFORM_FEEDBACK_BUFFER_SIZE                     = 0x8C85
    PRIMITIVES_GENERATED                               = 0x8C87
    TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN              = 0x8C88
    RASTERIZER_DISCARD                                 = 0x8C89
    MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS      = 0x8C8A
    MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS            = 0x8C8B
    INTERLEAVED_ATTRIBS                                = 0x8C8C
    SEPARATE_ATTRIBS                                   = 0x8C8D
    TRANSFORM_FEEDBACK_BUFFER                          = 0x8C8E
    TRANSFORM_FEEDBACK_BUFFER_BINDING                  = 0x8C8F
    POINT_SPRITE_COORD_ORIGIN                          = 0x8CA0
    LOWER_LEFT                                         = 0x8CA1
    UPPER_LEFT                                         = 0x8CA2
    STENCIL_BACK_REF                                   = 0x8CA3
    STENCIL_BACK_VALUE_MASK                            = 0x8CA4
    STENCIL_BACK_WRITEMASK                             = 0x8CA5
    DRAW_FRAMEBUFFER_BINDING                           = 0x8CA6
    FRAMEBUFFER_BINDING                                = 0x8CA6
    RENDERBUFFER_BINDING                               = 0x8CA7
    READ_FRAMEBUFFER                                   = 0x8CA8
    DRAW_FRAMEBUFFER                                   = 0x8CA9
    READ_FRAMEBUFFER_BINDING                           = 0x8CAA
    RENDERBUFFER_SAMPLES                               = 0x8CAB
    DEPTH_COMPONENT32F                                 = 0x8CAC
    DEPTH32F_STENCIL8                                  = 0x8CAD
    FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE                 = 0x8CD0
    FRAMEBUFFER_ATTACHMENT_OBJECT_NAME                 = 0x8CD1
    FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL               = 0x8CD2
    FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE       = 0x8CD3
    FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER               = 0x8CD4
    FRAMEBUFFER_COMPLETE                               = 0x8CD5
    FRAMEBUFFER_INCOMPLETE_ATTACHMENT                  = 0x8CD6
    FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT          = 0x8CD7
    FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER                 = 0x8CDB
    FRAMEBUFFER_INCOMPLETE_READ_BUFFER                 = 0x8CDC
    FRAMEBUFFER_UNSUPPORTED                            = 0x8CDD
    MAX_COLOR_ATTACHMENTS                              = 0x8CDF
    COLOR_ATTACHMENT0                                  = 0x8CE0
    COLOR_ATTACHMENT1                                  = 0x8CE1
    COLOR_ATTACHMENT2                                  = 0x8CE2
    COLOR_ATTACHMENT3                                  = 0x8CE3
    COLOR_ATTACHMENT4                                  = 0x8CE4
    COLOR_ATTACHMENT5                                  = 0x8CE5
    COLOR_ATTACHMENT6                                  = 0x8CE6
    COLOR_ATTACHMENT7                                  = 0x8CE7
    COLOR_ATTACHMENT8                                  = 0x8CE8
    COLOR_ATTACHMENT9                                  = 0x8CE9
    COLOR_ATTACHMENT10                                 = 0x8CEA
    COLOR_ATTACHMENT11                                 = 0x8CEB
    COLOR_ATTACHMENT12                                 = 0x8CEC
    COLOR_ATTACHMENT13                                 = 0x8CED
    COLOR_ATTACHMENT14                                 = 0x8CEE
    COLOR_ATTACHMENT15                                 = 0x8CEF
    DEPTH_ATTACHMENT                                   = 0x8D00
    STENCIL_ATTACHMENT                                 = 0x8D20
    FRAMEBUFFER                                        = 0x8D40
    RENDERBUFFER                                       = 0x8D41
    RENDERBUFFER_WIDTH                                 = 0x8D42
    RENDERBUFFER_HEIGHT                                = 0x8D43
    RENDERBUFFER_INTERNAL_FORMAT                       = 0x8D44
    STENCIL_INDEX1                                     = 0x8D46
    STENCIL_INDEX4                                     = 0x8D47
    STENCIL_INDEX8                                     = 0x8D48
    STENCIL_INDEX16                                    = 0x8D49
    RENDERBUFFER_RED_SIZE                              = 0x8D50
    RENDERBUFFER_GREEN_SIZE                            = 0x8D51
    RENDERBUFFER_BLUE_SIZE                             = 0x8D52
    RENDERBUFFER_ALPHA_SIZE                            = 0x8D53
    RENDERBUFFER_DEPTH_SIZE                            = 0x8D54
    RENDERBUFFER_STENCIL_SIZE                          = 0x8D55
    FRAMEBUFFER_INCOMPLETE_MULTISAMPLE                 = 0x8D56
    MAX_SAMPLES                                        = 0x8D57
    RGB565                                             = 0x8D62
    RGBA32UI                                           = 0x8D70
    RGB32UI                                            = 0x8D71
    RGBA16UI                                           = 0x8D76
    RGB16UI                                            = 0x8D77
    RGBA8UI                                            = 0x8D7C
    RGB8UI                                             = 0x8D7D
    RGBA32I                                            = 0x8D82
    RGB32I                                             = 0x8D83
    RGBA16I                                            = 0x8D88
    RGB16I                                             = 0x8D89
    RGBA8I                                             = 0x8D8E
    RGB8I                                              = 0x8D8F
    RED_INTEGER                                        = 0x8D94
    GREEN_INTEGER                                      = 0x8D95
    BLUE_INTEGER                                       = 0x8D96
    ALPHA_INTEGER                                      = 0x8D97
    RGB_INTEGER                                        = 0x8D98
    RGBA_INTEGER                                       = 0x8D99
    BGR_INTEGER                                        = 0x8D9A
    BGRA_INTEGER                                       = 0x8D9B
    INT_2_10_10_10_REV                                 = 0x8D9F
    FRAMEBUFFER_ATTACHMENT_LAYERED                     = 0x8DA7
    FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS               = 0x8DA8
    FLOAT_32_UNSIGNED_INT_24_8_REV                     = 0x8DAD
    FRAMEBUFFER_SRGB                                   = 0x8DB9
    COMPRESSED_RED_RGTC1                               = 0x8DBB
    COMPRESSED_SIGNED_RED_RGTC1                        = 0x8DBC
    COMPRESSED_RG_RGTC2                                = 0x8DBD
    COMPRESSED_SIGNED_RG_RGTC2                         = 0x8DBE
    SAMPLER_1D_ARRAY                                   = 0x8DC0
    SAMPLER_2D_ARRAY                                   = 0x8DC1
    SAMPLER_BUFFER                                     = 0x8DC2
    SAMPLER_1D_ARRAY_SHADOW                            = 0x8DC3
    SAMPLER_2D_ARRAY_SHADOW                            = 0x8DC4
    SAMPLER_CUBE_SHADOW                                = 0x8DC5
    UNSIGNED_INT_VEC2                                  = 0x8DC6
    UNSIGNED_INT_VEC3                                  = 0x8DC7
    UNSIGNED_INT_VEC4                                  = 0x8DC8
    INT_SAMPLER_1D                                     = 0x8DC9
    INT_SAMPLER_2D                                     = 0x8DCA
    INT_SAMPLER_3D                                     = 0x8DCB
    INT_SAMPLER_CUBE                                   = 0x8DCC
    INT_SAMPLER_2D_RECT                                = 0x8DCD
    INT_SAMPLER_1D_ARRAY                               = 0x8DCE
    INT_SAMPLER_2D_ARRAY                               = 0x8DCF
    INT_SAMPLER_BUFFER                                 = 0x8DD0
    UNSIGNED_INT_SAMPLER_1D                            = 0x8DD1
    UNSIGNED_INT_SAMPLER_2D                            = 0x8DD2
    UNSIGNED_INT_SAMPLER_3D                            = 0x8DD3
    UNSIGNED_INT_SAMPLER_CUBE                          = 0x8DD4
    UNSIGNED_INT_SAMPLER_2D_RECT                       = 0x8DD5
    UNSIGNED_INT_SAMPLER_1D_ARRAY                      = 0x8DD6
    UNSIGNED_INT_SAMPLER_2D_ARRAY                      = 0x8DD7
    UNSIGNED_INT_SAMPLER_BUFFER                        = 0x8DD8
    GEOMETRY_SHADER                                    = 0x8DD9
    MAX_GEOMETRY_UNIFORM_COMPONENTS                    = 0x8DDF
    MAX_GEOMETRY_OUTPUT_VERTICES                       = 0x8DE0
    MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS               = 0x8DE1
    ACTIVE_SUBROUTINES                                 = 0x8DE5
    ACTIVE_SUBROUTINE_UNIFORMS                         = 0x8DE6
    MAX_SUBROUTINES                                    = 0x8DE7
    MAX_SUBROUTINE_UNIFORM_LOCATIONS                   = 0x8DE8
    LOW_FLOAT                                          = 0x8DF0
    MEDIUM_FLOAT                                       = 0x8DF1
    HIGH_FLOAT                                         = 0x8DF2
    LOW_INT                                            = 0x8DF3
    MEDIUM_INT                                         = 0x8DF4
    HIGH_INT                                           = 0x8DF5
    SHADER_BINARY_FORMATS                              = 0x8DF8
    NUM_SHADER_BINARY_FORMATS                          = 0x8DF9
    SHADER_COMPILER                                    = 0x8DFA
    MAX_VERTEX_UNIFORM_VECTORS                         = 0x8DFB
    MAX_VARYING_VECTORS                                = 0x8DFC
    MAX_FRAGMENT_UNIFORM_VECTORS                       = 0x8DFD
    QUERY_WAIT                                         = 0x8E13
    QUERY_NO_WAIT                                      = 0x8E14
    QUERY_BY_REGION_WAIT                               = 0x8E15
    QUERY_BY_REGION_NO_WAIT                            = 0x8E16
    MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS       = 0x8E1E
    MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS    = 0x8E1F
    TRANSFORM_FEEDBACK                                 = 0x8E22
    TRANSFORM_FEEDBACK_BUFFER_PAUSED                   = 0x8E23
    TRANSFORM_FEEDBACK_BUFFER_ACTIVE                   = 0x8E24
    TRANSFORM_FEEDBACK_BINDING                         = 0x8E25
    TIMESTAMP                                          = 0x8E28
    TEXTURE_SWIZZLE_R                                  = 0x8E42
    TEXTURE_SWIZZLE_G                                  = 0x8E43
    TEXTURE_SWIZZLE_B                                  = 0x8E44
    TEXTURE_SWIZZLE_A                                  = 0x8E45
    TEXTURE_SWIZZLE_RGBA                               = 0x8E46
    ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS                = 0x8E47
    ACTIVE_SUBROUTINE_MAX_LENGTH                       = 0x8E48
    ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH               = 0x8E49
    NUM_COMPATIBLE_SUBROUTINES                         = 0x8E4A
    COMPATIBLE_SUBROUTINES                             = 0x8E4B
    QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION           = 0x8E4C
    FIRST_VERTEX_CONVENTION                            = 0x8E4D
    LAST_VERTEX_CONVENTION                             = 0x8E4E
    PROVOKING_VERTEX                                   = 0x8E4F
    SAMPLE_POSITION                                    = 0x8E50
    SAMPLE_MASK                                        = 0x8E51
    SAMPLE_MASK_VALUE                                  = 0x8E52
    MAX_SAMPLE_MASK_WORDS                              = 0x8E59
    MAX_GEOMETRY_SHADER_INVOCATIONS                    = 0x8E5A
    MIN_FRAGMENT_INTERPOLATION_OFFSET                  = 0x8E5B
    MAX_FRAGMENT_INTERPOLATION_OFFSET                  = 0x8E5C
    FRAGMENT_INTERPOLATION_OFFSET_BITS                 = 0x8E5D
    MIN_PROGRAM_TEXTURE_GATHER_OFFSET                  = 0x8E5E
    MAX_PROGRAM_TEXTURE_GATHER_OFFSET                  = 0x8E5F
    MAX_TRANSFORM_FEEDBACK_BUFFERS                     = 0x8E70
    MAX_VERTEX_STREAMS                                 = 0x8E71
    PATCH_VERTICES                                     = 0x8E72
    PATCH_DEFAULT_INNER_LEVEL                          = 0x8E73
    PATCH_DEFAULT_OUTER_LEVEL                          = 0x8E74
    TESS_CONTROL_OUTPUT_VERTICES                       = 0x8E75
    TESS_GEN_MODE                                      = 0x8E76
    TESS_GEN_SPACING                                   = 0x8E77
    TESS_GEN_VERTEX_ORDER                              = 0x8E78
    TESS_GEN_POINT_MODE                                = 0x8E79
    ISOLINES                                           = 0x8E7A
    FRACTIONAL_ODD                                     = 0x8E7B
    FRACTIONAL_EVEN                                    = 0x8E7C
    MAX_PATCH_VERTICES                                 = 0x8E7D
    MAX_TESS_GEN_LEVEL                                 = 0x8E7E
    MAX_TESS_CONTROL_UNIFORM_COMPONENTS                = 0x8E7F
    MAX_TESS_EVALUATION_UNIFORM_COMPONENTS             = 0x8E80
    MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS               = 0x8E81
    MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS            = 0x8E82
    MAX_TESS_CONTROL_OUTPUT_COMPONENTS                 = 0x8E83
    MAX_TESS_PATCH_COMPONENTS                          = 0x8E84
    MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS           = 0x8E85
    MAX_TESS_EVALUATION_OUTPUT_COMPONENTS              = 0x8E86
    TESS_EVALUATION_SHADER                             = 0x8E87
    TESS_CONTROL_SHADER                                = 0x8E88
    MAX_TESS_CONTROL_UNIFORM_BLOCKS                    = 0x8E89
    MAX_TESS_EVALUATION_UNIFORM_BLOCKS                 = 0x8E8A
    COPY_READ_BUFFER                                   = 0x8F36
    COPY_WRITE_BUFFER                                  = 0x8F37
    DRAW_INDIRECT_BUFFER                               = 0x8F3F
    DRAW_INDIRECT_BUFFER_BINDING                       = 0x8F43
    DOUBLE_MAT2                                        = 0x8F46
    DOUBLE_MAT3                                        = 0x8F47
    DOUBLE_MAT4                                        = 0x8F48
    DOUBLE_MAT2x3                                      = 0x8F49
    DOUBLE_MAT2x4                                      = 0x8F4A
    DOUBLE_MAT3x2                                      = 0x8F4B
    DOUBLE_MAT3x4                                      = 0x8F4C
    DOUBLE_MAT4x2                                      = 0x8F4D
    DOUBLE_MAT4x3                                      = 0x8F4E
    R8_SNORM                                           = 0x8F94
    RG8_SNORM                                          = 0x8F95
    RGB8_SNORM                                         = 0x8F96
    RGBA8_SNORM                                        = 0x8F97
    R16_SNORM                                          = 0x8F98
    RG16_SNORM                                         = 0x8F99
    RGB16_SNORM                                        = 0x8F9A
    RGBA16_SNORM                                       = 0x8F9B
    SIGNED_NORMALIZED                                  = 0x8F9C
    PRIMITIVE_RESTART                                  = 0x8F9D
    PRIMITIVE_RESTART_INDEX                            = 0x8F9E
    DOUBLE_VEC2                                        = 0x8FFC
    DOUBLE_VEC3                                        = 0x8FFD
    DOUBLE_VEC4                                        = 0x8FFE
    TEXTURE_CUBE_MAP_ARRAY                             = 0x9009
    TEXTURE_BINDING_CUBE_MAP_ARRAY                     = 0x900A
    PROXY_TEXTURE_CUBE_MAP_ARRAY                       = 0x900B
    SAMPLER_CUBE_MAP_ARRAY                             = 0x900C
    SAMPLER_CUBE_MAP_ARRAY_SHADOW                      = 0x900D
    INT_SAMPLER_CUBE_MAP_ARRAY                         = 0x900E
    UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY                = 0x900F
    RGB10_A2UI                                         = 0x906F
    TEXTURE_2D_MULTISAMPLE                             = 0x9100
    PROXY_TEXTURE_2D_MULTISAMPLE                       = 0x9101
    TEXTURE_2D_MULTISAMPLE_ARRAY                       = 0x9102
    PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY                 = 0x9103
    TEXTURE_BINDING_2D_MULTISAMPLE                     = 0x9104
    TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY               = 0x9105
    TEXTURE_SAMPLES                                    = 0x9106
    TEXTURE_FIXED_SAMPLE_LOCATIONS                     = 0x9107
    SAMPLER_2D_MULTISAMPLE                             = 0x9108
    INT_SAMPLER_2D_MULTISAMPLE                         = 0x9109
    UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE                = 0x910A
    SAMPLER_2D_MULTISAMPLE_ARRAY                       = 0x910B
    INT_SAMPLER_2D_MULTISAMPLE_ARRAY                   = 0x910C
    UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY          = 0x910D
    MAX_COLOR_TEXTURE_SAMPLES                          = 0x910E
    MAX_DEPTH_TEXTURE_SAMPLES                          = 0x910F
    MAX_INTEGER_SAMPLES                                = 0x9110
    MAX_SERVER_WAIT_TIMEOUT                            = 0x9111
    OBJECT_TYPE                                        = 0x9112
    SYNC_CONDITION                                     = 0x9113
    SYNC_STATUS                                        = 0x9114
    SYNC_FLAGS                                         = 0x9115
    SYNC_FENCE                                         = 0x9116
    SYNC_GPU_COMMANDS_COMPLETE                         = 0x9117
    UNSIGNALED                                         = 0x9118
    SIGNALED                                           = 0x9119
    ALREADY_SIGNALED                                   = 0x911A
    TIMEOUT_EXPIRED                                    = 0x911B
    CONDITION_SATISFIED                                = 0x911C
    WAIT_FAILED                                        = 0x911D
    BUFFER_ACCESS_FLAGS                                = 0x911F
    BUFFER_MAP_LENGTH                                  = 0x9120
    BUFFER_MAP_OFFSET                                  = 0x9121
    MAX_VERTEX_OUTPUT_COMPONENTS                       = 0x9122
    MAX_GEOMETRY_INPUT_COMPONENTS                      = 0x9123
    MAX_GEOMETRY_OUTPUT_COMPONENTS                     = 0x9124
    MAX_FRAGMENT_INPUT_COMPONENTS                      = 0x9125
    CONTEXT_PROFILE_MASK                               = 0x9126
)

// https://www.opengl.org/sdk/docs/man4/xhtml/glViewport.xml
func (gl *GL) Viewport(x, y, width, height int) {
    C.gl4_1core_glViewport(gl.funcs, C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height))
}

// DepthRange specifies the mapping of depth values from normalized device
// coordinates to window coordinates.
//
// Parameter nearVal specifies the mapping of the near clipping plane to window
// coordinates (defaults to 0), while farVal specifies the mapping of the far
// clipping plane to window coordinates (defaults to 1).
//
// After clipping and division by w, depth coordinates range from -1 to 1,
// corresponding to the near and far clipping planes. DepthRange specifies a
// linear mapping of the normalized depth coordinates in this range to window
// depth coordinates. Regardless of the actual depth buffer implementation,
// window coordinate depth values are treated as though they range from 0 through 1
// (like color components). Thus, the values accepted by DepthRange are both
// clamped to this range before they are accepted.
//
// The default setting of (0, 1) maps the near plane to 0 and the far plane to 1.
// With this mapping, the depth buffer range is fully utilized.
//
// It is not necessary that nearVal be less than farVal. Reverse mappings such as
// nearVal 1, and farVal 0 are acceptable.
//
// GL.INVALID_OPERATION is generated if DepthRange is executed between the
// execution of Begin and the corresponding execution of End.
func (gl *GL) DepthRange(nearVal, farVal float64) {
    C.gl4_1core_glDepthRange(gl.funcs, C.GLdouble(nearVal), C.GLdouble(farVal))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glIsEnabled.xml
func (gl *GL) IsEnabled(cap glbase.Enum) bool {
    glresult := C.gl4_1core_glIsEnabled(gl.funcs, C.GLenum(cap))
    return *(*bool)(unsafe.Pointer(&glresult))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetTexLevelParameteriv.xml
func (gl *GL) GetTexLevelParameteriv(target glbase.Enum, level int, pname glbase.Enum, params []int32) {
    C.gl4_1core_glGetTexLevelParameteriv(gl.funcs, C.GLenum(target), C.GLint(level), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetTexLevelParameterfv.xml
func (gl *GL) GetTexLevelParameterfv(target glbase.Enum, level int, pname glbase.Enum, params []float32) {
    C.gl4_1core_glGetTexLevelParameterfv(gl.funcs, C.GLenum(target), C.GLint(level), C.GLenum(pname), (*C.GLfloat)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetTexParameteriv.xml
func (gl *GL) GetTexParameteriv(target, pname glbase.Enum, params []int32) {
    C.gl4_1core_glGetTexParameteriv(gl.funcs, C.GLenum(target), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetTexParameterfv.xml
func (gl *GL) GetTexParameterfv(target, pname glbase.Enum, params []float32) {
    C.gl4_1core_glGetTexParameterfv(gl.funcs, C.GLenum(target), C.GLenum(pname), (*C.GLfloat)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetTexImage.xml
func (gl *GL) GetTexImage(target glbase.Enum, level int, format, gltype glbase.Enum, pixels interface{}) {
    var pixels_ptr unsafe.Pointer
    var pixels_v = reflect.ValueOf(pixels)
    if pixels != nil && pixels_v.Kind() != reflect.Slice {
        panic("parameter pixels must be a slice")
    }
    if pixels != nil {
        pixels_ptr = unsafe.Pointer(pixels_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glGetTexImage(gl.funcs, C.GLenum(target), C.GLint(level), C.GLenum(format), C.GLenum(gltype), pixels_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetIntegerv.xml
func (gl *GL) GetIntegerv(pname glbase.Enum, params []int32) {
    C.gl4_1core_glGetIntegerv(gl.funcs, C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetFloatv.xml
func (gl *GL) GetFloatv(pname glbase.Enum, params []float32) {
    C.gl4_1core_glGetFloatv(gl.funcs, C.GLenum(pname), (*C.GLfloat)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetError.xml
func (gl *GL) GetError() glbase.Enum {
    glresult := C.gl4_1core_glGetError(gl.funcs)
    return glbase.Enum(glresult)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetDoublev.xml
func (gl *GL) GetDoublev(pname glbase.Enum, params []float64) {
    C.gl4_1core_glGetDoublev(gl.funcs, C.GLenum(pname), (*C.GLdouble)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetBooleanv.xml
func (gl *GL) GetBooleanv(pname glbase.Enum, params []bool) {
    C.gl4_1core_glGetBooleanv(gl.funcs, C.GLenum(pname), (*C.GLboolean)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glReadPixels.xml
func (gl *GL) ReadPixels(x, y, width, height int, format, gltype glbase.Enum, pixels interface{}) {
    var pixels_ptr unsafe.Pointer
    var pixels_v = reflect.ValueOf(pixels)
    if pixels != nil && pixels_v.Kind() != reflect.Slice {
        panic("parameter pixels must be a slice")
    }
    if pixels != nil {
        pixels_ptr = unsafe.Pointer(pixels_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glReadPixels(gl.funcs, C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height), C.GLenum(format), C.GLenum(gltype), pixels_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glReadBuffer.xml
func (gl *GL) ReadBuffer(mode glbase.Enum) {
    C.gl4_1core_glReadBuffer(gl.funcs, C.GLenum(mode))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glPixelStorei.xml
func (gl *GL) PixelStorei(pname glbase.Enum, param int32) {
    C.gl4_1core_glPixelStorei(gl.funcs, C.GLenum(pname), C.GLint(param))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glPixelStoref.xml
func (gl *GL) PixelStoref(pname glbase.Enum, param float32) {
    C.gl4_1core_glPixelStoref(gl.funcs, C.GLenum(pname), C.GLfloat(param))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDepthFunc.xml
func (gl *GL) DepthFunc(glfunc glbase.Enum) {
    C.gl4_1core_glDepthFunc(gl.funcs, C.GLenum(glfunc))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glStencilOp.xml
func (gl *GL) StencilOp(fail, zfail, zpass glbase.Enum) {
    C.gl4_1core_glStencilOp(gl.funcs, C.GLenum(fail), C.GLenum(zfail), C.GLenum(zpass))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glStencilFunc.xml
func (gl *GL) StencilFunc(glfunc glbase.Enum, ref int32, mask uint32) {
    C.gl4_1core_glStencilFunc(gl.funcs, C.GLenum(glfunc), C.GLint(ref), C.GLuint(mask))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glLogicOp.xml
func (gl *GL) LogicOp(opcode glbase.Enum) {
    C.gl4_1core_glLogicOp(gl.funcs, C.GLenum(opcode))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBlendFunc.xml
func (gl *GL) BlendFunc(sfactor, dfactor glbase.Enum) {
    C.gl4_1core_glBlendFunc(gl.funcs, C.GLenum(sfactor), C.GLenum(dfactor))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glFlush.xml
func (gl *GL) Flush() {
    C.gl4_1core_glFlush(gl.funcs)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glFinish.xml
func (gl *GL) Finish() {
    C.gl4_1core_glFinish(gl.funcs)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glEnable.xml
func (gl *GL) Enable(cap glbase.Enum) {
    C.gl4_1core_glEnable(gl.funcs, C.GLenum(cap))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDisable.xml
func (gl *GL) Disable(cap glbase.Enum) {
    C.gl4_1core_glDisable(gl.funcs, C.GLenum(cap))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDepthMask.xml
func (gl *GL) DepthMask(flag bool) {
    C.gl4_1core_glDepthMask(gl.funcs, *(*C.GLboolean)(unsafe.Pointer(&flag)))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glColorMask.xml
func (gl *GL) ColorMask(red, green, blue, alpha bool) {
    C.gl4_1core_glColorMask(gl.funcs, *(*C.GLboolean)(unsafe.Pointer(&red)), *(*C.GLboolean)(unsafe.Pointer(&green)), *(*C.GLboolean)(unsafe.Pointer(&blue)), *(*C.GLboolean)(unsafe.Pointer(&alpha)))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glStencilMask.xml
func (gl *GL) StencilMask(mask uint32) {
    C.gl4_1core_glStencilMask(gl.funcs, C.GLuint(mask))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glClearDepth.xml
func (gl *GL) ClearDepth(depth float64) {
    C.gl4_1core_glClearDepth(gl.funcs, C.GLdouble(depth))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glClearStencil.xml
func (gl *GL) ClearStencil(s int32) {
    C.gl4_1core_glClearStencil(gl.funcs, C.GLint(s))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glClearColor.xml
func (gl *GL) ClearColor(red, green, blue, alpha float32) {
    C.gl4_1core_glClearColor(gl.funcs, C.GLfloat(red), C.GLfloat(green), C.GLfloat(blue), C.GLfloat(alpha))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glClear.xml
func (gl *GL) Clear(mask glbase.Bitfield) {
    C.gl4_1core_glClear(gl.funcs, C.GLbitfield(mask))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDrawBuffer.xml
func (gl *GL) DrawBuffer(mode glbase.Enum) {
    C.gl4_1core_glDrawBuffer(gl.funcs, C.GLenum(mode))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexImage2D.xml
func (gl *GL) TexImage2D(target glbase.Enum, level int, internalFormat int32, width, height, border int, format, gltype glbase.Enum, pixels interface{}) {
    var pixels_ptr unsafe.Pointer
    var pixels_v = reflect.ValueOf(pixels)
    if pixels != nil && pixels_v.Kind() != reflect.Slice {
        panic("parameter pixels must be a slice")
    }
    if pixels != nil {
        pixels_ptr = unsafe.Pointer(pixels_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glTexImage2D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLint(internalFormat), C.GLsizei(width), C.GLsizei(height), C.GLint(border), C.GLenum(format), C.GLenum(gltype), pixels_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexImage1D.xml
func (gl *GL) TexImage1D(target glbase.Enum, level int, internalFormat int32, width, border int, format, gltype glbase.Enum, pixels interface{}) {
    var pixels_ptr unsafe.Pointer
    var pixels_v = reflect.ValueOf(pixels)
    if pixels != nil && pixels_v.Kind() != reflect.Slice {
        panic("parameter pixels must be a slice")
    }
    if pixels != nil {
        pixels_ptr = unsafe.Pointer(pixels_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glTexImage1D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLint(internalFormat), C.GLsizei(width), C.GLint(border), C.GLenum(format), C.GLenum(gltype), pixels_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexParameteriv.xml
func (gl *GL) TexParameteriv(target, pname glbase.Enum, params []int32) {
    C.gl4_1core_glTexParameteriv(gl.funcs, C.GLenum(target), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexParameteri.xml
func (gl *GL) TexParameteri(target, pname glbase.Enum, param int32) {
    C.gl4_1core_glTexParameteri(gl.funcs, C.GLenum(target), C.GLenum(pname), C.GLint(param))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexParameterfv.xml
func (gl *GL) TexParameterfv(target, pname glbase.Enum, params []float32) {
    C.gl4_1core_glTexParameterfv(gl.funcs, C.GLenum(target), C.GLenum(pname), (*C.GLfloat)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexParameterf.xml
func (gl *GL) TexParameterf(target, pname glbase.Enum, param float32) {
    C.gl4_1core_glTexParameterf(gl.funcs, C.GLenum(target), C.GLenum(pname), C.GLfloat(param))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glScissor.xml
func (gl *GL) Scissor(x, y, width, height int) {
    C.gl4_1core_glScissor(gl.funcs, C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glPolygonMode.xml
func (gl *GL) PolygonMode(face, mode glbase.Enum) {
    C.gl4_1core_glPolygonMode(gl.funcs, C.GLenum(face), C.GLenum(mode))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glPointSize.xml
func (gl *GL) PointSize(size float32) {
    C.gl4_1core_glPointSize(gl.funcs, C.GLfloat(size))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glLineWidth.xml
func (gl *GL) LineWidth(width float32) {
    C.gl4_1core_glLineWidth(gl.funcs, C.GLfloat(width))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glHint.xml
func (gl *GL) Hint(target, mode glbase.Enum) {
    C.gl4_1core_glHint(gl.funcs, C.GLenum(target), C.GLenum(mode))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glFrontFace.xml
func (gl *GL) FrontFace(mode glbase.Enum) {
    C.gl4_1core_glFrontFace(gl.funcs, C.GLenum(mode))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glCullFace.xml
func (gl *GL) CullFace(mode glbase.Enum) {
    C.gl4_1core_glCullFace(gl.funcs, C.GLenum(mode))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glIndexubv.xml
func (gl *GL) Indexubv(c []uint8) {
    C.gl4_1core_glIndexubv(gl.funcs, (*C.GLubyte)(unsafe.Pointer(&c[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glIndexub.xml
func (gl *GL) Indexub(c uint8) {
    C.gl4_1core_glIndexub(gl.funcs, C.GLubyte(c))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glIsTexture.xml
func (gl *GL) IsTexture(texture glbase.Texture) bool {
    glresult := C.gl4_1core_glIsTexture(gl.funcs, C.GLuint(texture))
    return *(*bool)(unsafe.Pointer(&glresult))
}

// GenTextures returns n texture names in textures. There is no guarantee
// that the names form a contiguous set of integers; however, it is
// guaranteed that none of the returned names was in use immediately before
// the call to GenTextures.
//
// The generated textures have no dimensionality; they assume the
// dimensionality of the texture target to which they are first bound (see
// BindTexture).
//
// Texture names returned by a call to GenTextures are not returned by
// subsequent calls, unless they are first deleted with DeleteTextures.
//
// Error GL.INVALID_VALUE is generated if n is negative.
//
// GenTextures is available in GL version 2.0 or greater.
func (gl *GL) GenTextures(n int) []glbase.Texture {
    if n == 0 {
        return nil
    }
    textures := make([]glbase.Texture, n)
    C.gl4_1core_glGenTextures(gl.funcs, C.GLsizei(n), (*C.GLuint)(unsafe.Pointer(&textures[0])))
    return textures
}

// DeleteTextures deletes the textures objects whose names are stored
// in the textures slice. After a texture is deleted, it has no contents or
// dimensionality, and its name is free for reuse (for example by
// GenTextures). If a texture that is currently bound is deleted, the binding
// reverts to 0 (the default texture).
//
// DeleteTextures silently ignores 0's and names that do not correspond to
// existing textures.
//
// Error GL.INVALID_VALUE is generated if n is negative.
//
// DeleteTextures is available in GL version 2.0 or greater.
func (gl *GL) DeleteTextures(textures []glbase.Texture) {
    n := len(textures)
    if n == 0 {
        return
    }
    C.gl4_1core_glDeleteTextures(gl.funcs, C.GLsizei(n), (*C.GLuint)(unsafe.Pointer(&textures[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBindTexture.xml
func (gl *GL) BindTexture(target glbase.Enum, texture glbase.Texture) {
    C.gl4_1core_glBindTexture(gl.funcs, C.GLenum(target), C.GLuint(texture))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexSubImage2D.xml
func (gl *GL) TexSubImage2D(target glbase.Enum, level, xoffset, yoffset, width, height int, format, gltype glbase.Enum, pixels interface{}) {
    var pixels_ptr unsafe.Pointer
    var pixels_v = reflect.ValueOf(pixels)
    if pixels != nil && pixels_v.Kind() != reflect.Slice {
        panic("parameter pixels must be a slice")
    }
    if pixels != nil {
        pixels_ptr = unsafe.Pointer(pixels_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glTexSubImage2D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLint(xoffset), C.GLint(yoffset), C.GLsizei(width), C.GLsizei(height), C.GLenum(format), C.GLenum(gltype), pixels_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexSubImage1D.xml
func (gl *GL) TexSubImage1D(target glbase.Enum, level, xoffset, width int, format, gltype glbase.Enum, pixels interface{}) {
    var pixels_ptr unsafe.Pointer
    var pixels_v = reflect.ValueOf(pixels)
    if pixels != nil && pixels_v.Kind() != reflect.Slice {
        panic("parameter pixels must be a slice")
    }
    if pixels != nil {
        pixels_ptr = unsafe.Pointer(pixels_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glTexSubImage1D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLint(xoffset), C.GLsizei(width), C.GLenum(format), C.GLenum(gltype), pixels_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glCopyTexSubImage2D.xml
func (gl *GL) CopyTexSubImage2D(target glbase.Enum, level, xoffset, yoffset, x, y, width, height int) {
    C.gl4_1core_glCopyTexSubImage2D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLint(xoffset), C.GLint(yoffset), C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glCopyTexSubImage1D.xml
func (gl *GL) CopyTexSubImage1D(target glbase.Enum, level, xoffset, x, y, width int) {
    C.gl4_1core_glCopyTexSubImage1D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLint(xoffset), C.GLint(x), C.GLint(y), C.GLsizei(width))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glCopyTexImage2D.xml
func (gl *GL) CopyTexImage2D(target glbase.Enum, level int, internalFormat glbase.Enum, x, y, width, height, border int) {
    C.gl4_1core_glCopyTexImage2D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLenum(internalFormat), C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height), C.GLint(border))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glCopyTexImage1D.xml
func (gl *GL) CopyTexImage1D(target glbase.Enum, level int, internalFormat glbase.Enum, x, y, width, border int) {
    C.gl4_1core_glCopyTexImage1D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLenum(internalFormat), C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLint(border))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glPolygonOffset.xml
func (gl *GL) PolygonOffset(factor, units float32) {
    C.gl4_1core_glPolygonOffset(gl.funcs, C.GLfloat(factor), C.GLfloat(units))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDrawElements.xml
func (gl *GL) DrawElements(mode glbase.Enum, count int, gltype glbase.Enum, indices interface{}) {
    var indices_ptr unsafe.Pointer
    var indices_v = reflect.ValueOf(indices)
    if indices != nil && indices_v.Kind() != reflect.Slice {
        panic("parameter indices must be a slice")
    }
    if indices != nil {
        indices_ptr = unsafe.Pointer(indices_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glDrawElements(gl.funcs, C.GLenum(mode), C.GLsizei(count), C.GLenum(gltype), indices_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDrawArrays.xml
func (gl *GL) DrawArrays(mode glbase.Enum, first, count int) {
    C.gl4_1core_glDrawArrays(gl.funcs, C.GLenum(mode), C.GLint(first), C.GLsizei(count))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glCopyTexSubImage3D.xml
func (gl *GL) CopyTexSubImage3D(target glbase.Enum, level, xoffset, yoffset int, zoffset int32, x, y, width, height int) {
    C.gl4_1core_glCopyTexSubImage3D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLint(xoffset), C.GLint(yoffset), C.GLint(zoffset), C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexSubImage3D.xml
func (gl *GL) TexSubImage3D(target glbase.Enum, level, xoffset, yoffset int, zoffset int32, width, height int, depth int32, format, gltype glbase.Enum, pixels interface{}) {
    var pixels_ptr unsafe.Pointer
    var pixels_v = reflect.ValueOf(pixels)
    if pixels != nil && pixels_v.Kind() != reflect.Slice {
        panic("parameter pixels must be a slice")
    }
    if pixels != nil {
        pixels_ptr = unsafe.Pointer(pixels_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glTexSubImage3D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLint(xoffset), C.GLint(yoffset), C.GLint(zoffset), C.GLsizei(width), C.GLsizei(height), C.GLsizei(depth), C.GLenum(format), C.GLenum(gltype), pixels_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexImage3D.xml
func (gl *GL) TexImage3D(target glbase.Enum, level int, internalFormat int32, width, height int, depth int32, border int, format, gltype glbase.Enum, pixels interface{}) {
    var pixels_ptr unsafe.Pointer
    var pixels_v = reflect.ValueOf(pixels)
    if pixels != nil && pixels_v.Kind() != reflect.Slice {
        panic("parameter pixels must be a slice")
    }
    if pixels != nil {
        pixels_ptr = unsafe.Pointer(pixels_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glTexImage3D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLint(internalFormat), C.GLsizei(width), C.GLsizei(height), C.GLsizei(depth), C.GLint(border), C.GLenum(format), C.GLenum(gltype), pixels_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDrawRangeElements.xml
func (gl *GL) DrawRangeElements(mode glbase.Enum, start, end uint32, count int, gltype glbase.Enum, indices interface{}) {
    var indices_ptr unsafe.Pointer
    var indices_v = reflect.ValueOf(indices)
    if indices != nil && indices_v.Kind() != reflect.Slice {
        panic("parameter indices must be a slice")
    }
    if indices != nil {
        indices_ptr = unsafe.Pointer(indices_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glDrawRangeElements(gl.funcs, C.GLenum(mode), C.GLuint(start), C.GLuint(end), C.GLsizei(count), C.GLenum(gltype), indices_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBlendEquation.xml
func (gl *GL) BlendEquation(mode glbase.Enum) {
    C.gl4_1core_glBlendEquation(gl.funcs, C.GLenum(mode))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBlendColor.xml
func (gl *GL) BlendColor(red, green, blue, alpha float32) {
    C.gl4_1core_glBlendColor(gl.funcs, C.GLfloat(red), C.GLfloat(green), C.GLfloat(blue), C.GLfloat(alpha))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetCompressedTexImage.xml
func (gl *GL) GetCompressedTexImage(target glbase.Enum, level int, img interface{}) {
    var img_ptr unsafe.Pointer
    var img_v = reflect.ValueOf(img)
    if img != nil && img_v.Kind() != reflect.Slice {
        panic("parameter img must be a slice")
    }
    if img != nil {
        img_ptr = unsafe.Pointer(img_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glGetCompressedTexImage(gl.funcs, C.GLenum(target), C.GLint(level), img_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glCompressedTexSubImage1D.xml
func (gl *GL) CompressedTexSubImage1D(target glbase.Enum, level, xoffset, width int, format glbase.Enum, imageSize int, data interface{}) {
    var data_ptr unsafe.Pointer
    var data_v = reflect.ValueOf(data)
    if data != nil && data_v.Kind() != reflect.Slice {
        panic("parameter data must be a slice")
    }
    if data != nil {
        data_ptr = unsafe.Pointer(data_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glCompressedTexSubImage1D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLint(xoffset), C.GLsizei(width), C.GLenum(format), C.GLsizei(imageSize), data_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glCompressedTexSubImage2D.xml
func (gl *GL) CompressedTexSubImage2D(target glbase.Enum, level, xoffset, yoffset, width, height int, format glbase.Enum, imageSize int, data interface{}) {
    var data_ptr unsafe.Pointer
    var data_v = reflect.ValueOf(data)
    if data != nil && data_v.Kind() != reflect.Slice {
        panic("parameter data must be a slice")
    }
    if data != nil {
        data_ptr = unsafe.Pointer(data_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glCompressedTexSubImage2D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLint(xoffset), C.GLint(yoffset), C.GLsizei(width), C.GLsizei(height), C.GLenum(format), C.GLsizei(imageSize), data_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glCompressedTexSubImage3D.xml
func (gl *GL) CompressedTexSubImage3D(target glbase.Enum, level, xoffset, yoffset int, zoffset int32, width, height int, depth int32, format glbase.Enum, imageSize int, data interface{}) {
    var data_ptr unsafe.Pointer
    var data_v = reflect.ValueOf(data)
    if data != nil && data_v.Kind() != reflect.Slice {
        panic("parameter data must be a slice")
    }
    if data != nil {
        data_ptr = unsafe.Pointer(data_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glCompressedTexSubImage3D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLint(xoffset), C.GLint(yoffset), C.GLint(zoffset), C.GLsizei(width), C.GLsizei(height), C.GLsizei(depth), C.GLenum(format), C.GLsizei(imageSize), data_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glCompressedTexImage1D.xml
func (gl *GL) CompressedTexImage1D(target glbase.Enum, level int, internalFormat glbase.Enum, width, border, imageSize int, data interface{}) {
    var data_ptr unsafe.Pointer
    var data_v = reflect.ValueOf(data)
    if data != nil && data_v.Kind() != reflect.Slice {
        panic("parameter data must be a slice")
    }
    if data != nil {
        data_ptr = unsafe.Pointer(data_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glCompressedTexImage1D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLenum(internalFormat), C.GLsizei(width), C.GLint(border), C.GLsizei(imageSize), data_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glCompressedTexImage2D.xml
func (gl *GL) CompressedTexImage2D(target glbase.Enum, level int, internalFormat glbase.Enum, width, height, border, imageSize int, data interface{}) {
    var data_ptr unsafe.Pointer
    var data_v = reflect.ValueOf(data)
    if data != nil && data_v.Kind() != reflect.Slice {
        panic("parameter data must be a slice")
    }
    if data != nil {
        data_ptr = unsafe.Pointer(data_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glCompressedTexImage2D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLenum(internalFormat), C.GLsizei(width), C.GLsizei(height), C.GLint(border), C.GLsizei(imageSize), data_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glCompressedTexImage3D.xml
func (gl *GL) CompressedTexImage3D(target glbase.Enum, level int, internalFormat glbase.Enum, width, height int, depth int32, border, imageSize int, data interface{}) {
    var data_ptr unsafe.Pointer
    var data_v = reflect.ValueOf(data)
    if data != nil && data_v.Kind() != reflect.Slice {
        panic("parameter data must be a slice")
    }
    if data != nil {
        data_ptr = unsafe.Pointer(data_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glCompressedTexImage3D(gl.funcs, C.GLenum(target), C.GLint(level), C.GLenum(internalFormat), C.GLsizei(width), C.GLsizei(height), C.GLsizei(depth), C.GLint(border), C.GLsizei(imageSize), data_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glSampleCoverage.xml
func (gl *GL) SampleCoverage(value float32, invert bool) {
    C.gl4_1core_glSampleCoverage(gl.funcs, C.GLfloat(value), *(*C.GLboolean)(unsafe.Pointer(&invert)))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glActiveTexture.xml
func (gl *GL) ActiveTexture(texture glbase.Enum) {
    C.gl4_1core_glActiveTexture(gl.funcs, C.GLenum(texture))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glPointParameteriv.xml
func (gl *GL) PointParameteriv(pname glbase.Enum, params []int32) {
    C.gl4_1core_glPointParameteriv(gl.funcs, C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glPointParameteri.xml
func (gl *GL) PointParameteri(pname glbase.Enum, param int32) {
    C.gl4_1core_glPointParameteri(gl.funcs, C.GLenum(pname), C.GLint(param))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glPointParameterfv.xml
func (gl *GL) PointParameterfv(pname glbase.Enum, params []float32) {
    C.gl4_1core_glPointParameterfv(gl.funcs, C.GLenum(pname), (*C.GLfloat)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glPointParameterf.xml
func (gl *GL) PointParameterf(pname glbase.Enum, param float32) {
    C.gl4_1core_glPointParameterf(gl.funcs, C.GLenum(pname), C.GLfloat(param))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glMultiDrawArrays.xml
func (gl *GL) MultiDrawArrays(mode glbase.Enum, first, count []int, drawcount int32) {
    C.gl4_1core_glMultiDrawArrays(gl.funcs, C.GLenum(mode), (*C.GLint)(unsafe.Pointer(&first[0])), (*C.GLsizei)(unsafe.Pointer(&count[0])), C.GLsizei(drawcount))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBlendFuncSeparate.xml
func (gl *GL) BlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha glbase.Enum) {
    C.gl4_1core_glBlendFuncSeparate(gl.funcs, C.GLenum(sfactorRGB), C.GLenum(dfactorRGB), C.GLenum(sfactorAlpha), C.GLenum(dfactorAlpha))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetBufferParameteriv.xml
func (gl *GL) GetBufferParameteriv(target, pname glbase.Enum, params []int32) {
    C.gl4_1core_glGetBufferParameteriv(gl.funcs, C.GLenum(target), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUnmapBuffer.xml
func (gl *GL) UnmapBuffer(target glbase.Enum) bool {
    glresult := C.gl4_1core_glUnmapBuffer(gl.funcs, C.GLenum(target))
    return *(*bool)(unsafe.Pointer(&glresult))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetBufferSubData.xml
func (gl *GL) GetBufferSubData(target glbase.Enum, offset, size int, data interface{}) {
    var data_ptr unsafe.Pointer
    var data_v = reflect.ValueOf(data)
    if data != nil && data_v.Kind() != reflect.Slice {
        panic("parameter data must be a slice")
    }
    if data != nil {
        data_ptr = unsafe.Pointer(data_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glGetBufferSubData(gl.funcs, C.GLenum(target), C.GLintptr(offset), C.GLsizeiptr(size), data_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBufferSubData.xml
func (gl *GL) BufferSubData(target glbase.Enum, offset, size int, data interface{}) {
    var data_ptr unsafe.Pointer
    var data_v = reflect.ValueOf(data)
    if data != nil && data_v.Kind() != reflect.Slice {
        panic("parameter data must be a slice")
    }
    if data != nil {
        data_ptr = unsafe.Pointer(data_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glBufferSubData(gl.funcs, C.GLenum(target), C.GLintptr(offset), C.GLsizeiptr(size), data_ptr)
}

// BufferData creates a new data store for the buffer object currently
// bound to target. Any pre-existing data store is deleted. The new data
// store is created with the specified size in bytes and usage. If data is
// not nil, it must be a slice that is used to initialize the data store.
// In that case the size parameter is ignored and the store size will match
// the slice data size.
//
// In its initial state, the new data store is not mapped, it has a NULL
// mapped pointer, and its mapped access is GL.READ_WRITE.
//
// The target constant must be one of GL.ARRAY_BUFFER, GL.COPY_READ_BUFFER,
// GL.COPY_WRITE_BUFFER, GL.ELEMENT_ARRAY_BUFFER, GL.PIXEL_PACK_BUFFER,
// GL.PIXEL_UNPACK_BUFFER, GL.TEXTURE_BUFFER, GL.TRANSFORM_FEEDBACK_BUFFER,
// or GL.UNIFORM_BUFFER.
//
// The usage parameter is a hint to the GL implementation as to how a buffer
// object's data store will be accessed. This enables the GL implementation
// to make more intelligent decisions that may significantly impact buffer
// object performance. It does not, however, constrain the actual usage of
// the data store. usage can be broken down into two parts: first, the
// frequency of access (modification and usage), and second, the nature of
// that access.
//
// A usage frequency of STREAM and nature of DRAW is specified via the
// constant GL.STREAM_DRAW, for example.
//
// The usage frequency of access may be one of:
//
//   STREAM
//       The data store contents will be modified once and used at most a few times.
//
//   STATIC
//       The data store contents will be modified once and used many times.
//
//   DYNAMIC
//       The data store contents will be modified repeatedly and used many times.
//
// The usage nature of access may be one of:
//
//   DRAW
//       The data store contents are modified by the application, and used as
//       the source for GL drawing and image specification commands.
//
//   READ
//       The data store contents are modified by reading data from the GL,
//       and used to return that data when queried by the application.
//
//   COPY
//       The data store contents are modified by reading data from the GL,
//       and used as the source for GL drawing and image specification
//       commands.
//
// Clients must align data elements consistent with the requirements of the
// client platform, with an additional base-level requirement that an offset
// within a buffer to a datum comprising N bytes be a multiple of N.
//
// Error GL.INVALID_ENUM is generated if target is not one of the accepted
// buffer targets.  GL.INVALID_ENUM is generated if usage is not
// GL.STREAM_DRAW, GL.STREAM_READ, GL.STREAM_COPY, GL.STATIC_DRAW,
// GL.STATIC_READ, GL.STATIC_COPY, GL.DYNAMIC_DRAW, GL.DYNAMIC_READ, or
// GL.DYNAMIC_COPY.  GL.INVALID_VALUE is generated if size is negative.
// GL.INVALID_OPERATION is generated if the reserved buffer object name 0 is
// bound to target.  GL.OUT_OF_MEMORY is generated if the GL is unable to
// create a data store with the specified size.
func (gl *GL) BufferData(target glbase.Enum, size int, data interface{}, usage glbase.Enum) {
    var data_ptr unsafe.Pointer
    var data_v = reflect.ValueOf(data)
    if data != nil && data_v.Kind() != reflect.Slice {
        panic("parameter data must be a slice")
    }
    if data != nil {
        data_ptr = unsafe.Pointer(data_v.Index(0).Addr().Pointer())
    }
    if data != nil {
        size = int(data_v.Type().Size()) * data_v.Len()
    }
    C.gl4_1core_glBufferData(gl.funcs, C.GLenum(target), C.GLsizeiptr(size), data_ptr, C.GLenum(usage))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glIsBuffer.xml
func (gl *GL) IsBuffer(buffer glbase.Buffer) bool {
    glresult := C.gl4_1core_glIsBuffer(gl.funcs, C.GLuint(buffer))
    return *(*bool)(unsafe.Pointer(&glresult))
}

// GenBuffers returns n buffer object names. There is no guarantee that
// the names form a contiguous set of integers; however, it is guaranteed
// that none of the returned names was in use immediately before the call to
// GenBuffers.
//
// Buffer object names returned by a call to GenBuffers are not returned by
// subsequent calls, unless they are first deleted with DeleteBuffers.
//
// No buffer objects are associated with the returned buffer object names
// until they are first bound by calling BindBuffer.
//
// Error GL.INVALID_VALUE is generated if n is negative. GL.INVALID_OPERATION
// is generated if GenBuffers is executed between the execution of Begin
// and the corresponding execution of End.
//
// GenBuffers is available in GL version 1.5 or greater.
func (gl *GL) GenBuffers(n int) []glbase.Buffer {
    if n == 0 {
        return nil
    }
    buffers := make([]glbase.Buffer, n)
    C.gl4_1core_glGenBuffers(gl.funcs, C.GLsizei(n), (*C.GLuint)(unsafe.Pointer(&buffers[0])))
    return buffers
}

// DeleteBuffers deletes the buffer objects whose names are stored in the
// buffers slice.
//
// After a buffer object is deleted, it has no contents, and its name is free
// for reuse (for example by GenBuffers). If a buffer object that is
// currently bound is deleted, the binding reverts to 0 (the absence of any
// buffer object, which reverts to client memory usage).
//
// DeleteBuffers silently ignores 0's and names that do not correspond to
// existing buffer objects.
//
// Error GL.INVALID_VALUE is generated if n is negative. GL.INVALID_OPERATION
// is generated if DeleteBuffers is executed between the execution of Begin
// and the corresponding execution of End.
//
// DeleteBuffers is available in GL version 1.5 or greater.
func (gl *GL) DeleteBuffers(buffers []glbase.Buffer) {
    n := len(buffers)
    if n == 0 {
        return
    }
    C.gl4_1core_glDeleteBuffers(gl.funcs, C.GLsizei(n), (*C.GLuint)(unsafe.Pointer(&buffers[0])))
}

// BindBuffer creates or puts in use a named buffer object.
// Calling BindBuffer with target set to GL.ARRAY_BUFFER,
// GL.ELEMENT_ARRAY_BUFFER, GL.PIXEL_PACK_BUFFER or GL.PIXEL_UNPACK_BUFFER
// and buffer set to the name of the new buffer object binds the buffer
// object name to the target. When a buffer object is bound to a target, the
// previous binding for that target is automatically broken.
//
// Buffer object names are unsigned integers. The value zero is reserved, but
// there is no default buffer object for each buffer object target. Instead,
// buffer set to zero effectively unbinds any buffer object previously bound,
// and restores client memory usage for that buffer object target. Buffer
// object names and the corresponding buffer object contents are local to the
// shared display-list space (see XCreateContext) of the current GL rendering
// context; two rendering contexts share buffer object names only if they
// also share display lists.
//
// GenBuffers may be called to generate a set of new buffer object names.
//
// The state of a buffer object immediately after it is first bound is an
// unmapped zero-sized memory buffer with GL.READ_WRITE access and
// GL.STATIC_DRAW usage.
//
// While a non-zero buffer object name is bound, GL operations on the target
// to which it is bound affect the bound buffer object, and queries of the
// target to which it is bound return state from the bound buffer object.
// While buffer object name zero is bound, as in the initial state, attempts
// to modify or query state on the target to which it is bound generates an
// GL.INVALID_OPERATION error.
//
// When vertex array pointer state is changed, for example by a call to
// NormalPointer, the current buffer object binding (GL.ARRAY_BUFFER_BINDING)
// is copied into the corresponding client state for the vertex array type
// being changed, for example GL.NORMAL_ARRAY_BUFFER_BINDING. While a
// non-zero buffer object is bound to the GL.ARRAY_BUFFER target, the vertex
// array pointer parameter that is traditionally interpreted as a pointer to
// client-side memory is instead interpreted as an offset within the buffer
// object measured in basic machine units.
//
// While a non-zero buffer object is bound to the GL.ELEMENT_ARRAY_BUFFER
// target, the indices parameter of DrawElements, DrawRangeElements, or
// MultiDrawElements that is traditionally interpreted as a pointer to
// client-side memory is instead interpreted as an offset within the buffer
// object measured in basic machine units.
//
// While a non-zero buffer object is bound to the GL.PIXEL_PACK_BUFFER
// target, the following commands are affected: GetCompressedTexImage,
// GetConvolutionFilter, GetHistogram, GetMinmax, GetPixelMap,
// GetPolygonStipple, GetSeparableFilter, GetTexImage, and ReadPixels. The
// pointer parameter that is traditionally interpreted as a pointer to
// client-side memory where the pixels are to be packed is instead
// interpreted as an offset within the buffer object measured in basic
// machine units.
//
// While a non-zero buffer object is bound to the GL.PIXEL_UNPACK_BUFFER
// target, the following commands are affected: Bitmap, ColorSubTable,
// ColorTable, CompressedTexImage1D, CompressedTexImage2D,
// CompressedTexImage3D, CompressedTexSubImage1D, CompressedTexSubImage2D,
// CompressedTexSubImage3D, ConvolutionFilter1D, ConvolutionFilter2D,
// DrawPixels, PixelMap, PolygonStipple, SeparableFilter2D, TexImage1D,
// TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, and TexSubImage3D.
// The pointer parameter that is traditionally interpreted as a pointer to
// client-side memory from which the pixels are to be unpacked is instead
// interpreted as an offset within the buffer object measured in basic
// machine units.
//
// A buffer object binding created with BindBuffer remains active until a
// different buffer object name is bound to the same target, or until the
// bound buffer object is deleted with DeleteBuffers.
//
// Once created, a named buffer object may be re-bound to any target as often
// as needed. However, the GL implementation may make choices about how to
// optimize the storage of a buffer object based on its initial binding
// target.
//
// Error GL.INVALID_ENUM is generated if target is not one of the allowable
// values.  GL.INVALID_OPERATION is generated if BindBuffer is executed
// between the execution of Begin and the corresponding execution of End.
//
// BindBuffer is available in GL version 1.5 or greater.
func (gl *GL) BindBuffer(target glbase.Enum, buffer glbase.Buffer) {
    C.gl4_1core_glBindBuffer(gl.funcs, C.GLenum(target), C.GLuint(buffer))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetQueryObjectuiv.xml
func (gl *GL) GetQueryObjectuiv(id uint32, pname glbase.Enum, params []uint32) {
    C.gl4_1core_glGetQueryObjectuiv(gl.funcs, C.GLuint(id), C.GLenum(pname), (*C.GLuint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetQueryObjectiv.xml
func (gl *GL) GetQueryObjectiv(id uint32, pname glbase.Enum, params []int32) {
    C.gl4_1core_glGetQueryObjectiv(gl.funcs, C.GLuint(id), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetQueryiv.xml
func (gl *GL) GetQueryiv(target, pname glbase.Enum, params []int32) {
    C.gl4_1core_glGetQueryiv(gl.funcs, C.GLenum(target), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glEndQuery.xml
func (gl *GL) EndQuery(target glbase.Enum) {
    C.gl4_1core_glEndQuery(gl.funcs, C.GLenum(target))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBeginQuery.xml
func (gl *GL) BeginQuery(target glbase.Enum, id uint32) {
    C.gl4_1core_glBeginQuery(gl.funcs, C.GLenum(target), C.GLuint(id))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glIsQuery.xml
func (gl *GL) IsQuery(id uint32) bool {
    glresult := C.gl4_1core_glIsQuery(gl.funcs, C.GLuint(id))
    return *(*bool)(unsafe.Pointer(&glresult))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDeleteQueries.xml
func (gl *GL) DeleteQueries(n int, ids []uint32) {
    C.gl4_1core_glDeleteQueries(gl.funcs, C.GLsizei(n), (*C.GLuint)(unsafe.Pointer(&ids[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGenQueries.xml
func (gl *GL) GenQueries(n int, ids []uint32) {
    C.gl4_1core_glGenQueries(gl.funcs, C.GLsizei(n), (*C.GLuint)(unsafe.Pointer(&ids[0])))
}

// VertexAttribPointer specifies the location and data format of the array
// of generic vertex attributes at index to use when rendering. size
// specifies the number of components per attribute and must be 1, 2, 3, or
// 4. type specifies the data type of each component, and stride specifies
// the byte stride from one attribute to the next, allowing vertices and
// attributes to be packed into a single array or stored in separate arrays.
// normalized indicates whether the values stored in an integer format are
// to be mapped to the range [-1,1] (for signed values) or [0,1]
// (for unsigned values) when they are accessed and converted to floating
// point; otherwise, values will be converted to floats directly without
// normalization. offset is a byte offset into the buffer object's data
// store, which must be bound to the GL.ARRAY_BUFFER target with BindBuffer.
//
// The buffer object binding (GL.ARRAY_BUFFER_BINDING) is saved as
// generic vertex attribute array client-side state
// (GL.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING) for the provided index.
//
// To enable and disable a generic vertex attribute array, call
// EnableVertexAttribArray and DisableVertexAttribArray with index. If
// enabled, the generic vertex attribute array is used when DrawArrays or
// DrawElements is called. Each generic vertex attribute array is initially
// disabled.
//
// VertexAttribPointer is typically implemented on the client side.
//
// Error GL.INVALID_ENUM is generated if type is not an accepted value.
// GL.INVALID_VALUE is generated if index is greater than or equal to
// GL.MAX_VERTEX_ATTRIBS. GL.INVALID_VALUE is generated if size is not 1, 2,
// 3, or 4. GL.INVALID_VALUE is generated if stride is negative.
func (gl *GL) VertexAttribPointer(index glbase.Attrib, size int, gltype glbase.Enum, normalized bool, stride int, offset uintptr) {
    offset_ptr := unsafe.Pointer(offset)
    C.gl4_1core_glVertexAttribPointer(gl.funcs, C.GLuint(index), C.GLint(size), C.GLenum(gltype), *(*C.GLboolean)(unsafe.Pointer(&normalized)), C.GLsizei(stride), offset_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glValidateProgram.xml
func (gl *GL) ValidateProgram(program glbase.Program) {
    C.gl4_1core_glValidateProgram(gl.funcs, C.GLuint(program))
}

// UniformMatrix4fv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// UniformMatrix4fv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions UniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv are used to
// modify a matrix or an array of matrices. The numbers in the function name
// are interpreted as the dimensionality of the matrix. The number 2
// indicates a 2x2 matrix (4 values), the number 3 indicates a 3x3 matrix (9
// values), and the number 4 indicates a 4x4 matrix (16 values). Non-square
// matrix dimensionality is explicit, with the first number representing the
// number of columns and the second number representing the number of rows.
// For example, 2x4 indicates a 2x4 matrix with 2 columns and 4 rows (8
// values). The length of the provided slice must be a multiple of the number
// of values per matrix, to update one or more consecutive matrices.
//
// If transpose is false, each matrix is assumed to be supplied in column
// major order. If transpose is true, each matrix is assumed to be supplied
// in row major order.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) UniformMatrix4fv(location glbase.Uniform, transpose bool, value []float32) {
    if len(value) == 0 {
        return
    }
    if len(value)%(4*4) != 0 {
        panic("invalid value length for UniformMatrix4fv")
    }
    count := len(value) / (4 * 4)
    C.gl4_1core_glUniformMatrix4fv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// UniformMatrix3fv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// UniformMatrix3fv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions UniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv are used to
// modify a matrix or an array of matrices. The numbers in the function name
// are interpreted as the dimensionality of the matrix. The number 2
// indicates a 2x2 matrix (4 values), the number 3 indicates a 3x3 matrix (9
// values), and the number 4 indicates a 4x4 matrix (16 values). Non-square
// matrix dimensionality is explicit, with the first number representing the
// number of columns and the second number representing the number of rows.
// For example, 2x4 indicates a 2x4 matrix with 2 columns and 4 rows (8
// values). The length of the provided slice must be a multiple of the number
// of values per matrix, to update one or more consecutive matrices.
//
// If transpose is false, each matrix is assumed to be supplied in column
// major order. If transpose is true, each matrix is assumed to be supplied
// in row major order.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) UniformMatrix3fv(location glbase.Uniform, transpose bool, value []float32) {
    if len(value) == 0 {
        return
    }
    if len(value)%(3*3) != 0 {
        panic("invalid value length for UniformMatrix3fv")
    }
    count := len(value) / (3 * 3)
    C.gl4_1core_glUniformMatrix3fv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// UniformMatrix2fv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// UniformMatrix2fv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions UniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv are used to
// modify a matrix or an array of matrices. The numbers in the function name
// are interpreted as the dimensionality of the matrix. The number 2
// indicates a 2x2 matrix (4 values), the number 3 indicates a 3x3 matrix (9
// values), and the number 4 indicates a 4x4 matrix (16 values). Non-square
// matrix dimensionality is explicit, with the first number representing the
// number of columns and the second number representing the number of rows.
// For example, 2x4 indicates a 2x4 matrix with 2 columns and 4 rows (8
// values). The length of the provided slice must be a multiple of the number
// of values per matrix, to update one or more consecutive matrices.
//
// If transpose is false, each matrix is assumed to be supplied in column
// major order. If transpose is true, each matrix is assumed to be supplied
// in row major order.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) UniformMatrix2fv(location glbase.Uniform, transpose bool, value []float32) {
    if len(value) == 0 {
        return
    }
    if len(value)%(2*2) != 0 {
        panic("invalid value length for UniformMatrix2fv")
    }
    count := len(value) / (2 * 2)
    C.gl4_1core_glUniformMatrix2fv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// Uniform4iv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// Uniform4iv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui}v can be used to modify a single
// uniform variable or a uniform variable array. These functions receive a
// slice with the values to be loaded into a uniform variable or a uniform
// variable array. A slice with length 1 should be used if modifying the value
// of a single uniform variable, and a length of 1 or greater can be used to
// modify an entire array or part of an array. When loading n elements
// starting at an arbitrary position m in a uniform variable array, elements
// m + n - 1 in the array will be replaced with the new values. If m + n - 1
// is larger than the size of the uniform variable array, values for all
// array elements beyond the end of the array will be ignored. The number
// specified in the name of the command indicates the number of components
// for each element in value, and it should match the number of components in
// the data type of the specified uniform variable (1 for float, int, bool;
// 2 for vec2, ivec2, bvec2, etc.). The data type specified in the name
// of the command must match the data type for the specified uniform variable
// as described for Uniform{1|2|3|4}{f|i|ui}.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform4iv(location glbase.Uniform, value []int32) {
    if len(value) == 0 {
        return
    }
    if len(value)%4 != 0 {
        panic("invalid value length for Uniform4iv")
    }
    count := len(value) / 4
    C.gl4_1core_glUniform4iv(gl.funcs, C.GLint(location), C.GLsizei(count), (*C.GLint)(unsafe.Pointer(&value[0])))
}

// Uniform3iv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// Uniform3iv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui}v can be used to modify a single
// uniform variable or a uniform variable array. These functions receive a
// slice with the values to be loaded into a uniform variable or a uniform
// variable array. A slice with length 1 should be used if modifying the value
// of a single uniform variable, and a length of 1 or greater can be used to
// modify an entire array or part of an array. When loading n elements
// starting at an arbitrary position m in a uniform variable array, elements
// m + n - 1 in the array will be replaced with the new values. If m + n - 1
// is larger than the size of the uniform variable array, values for all
// array elements beyond the end of the array will be ignored. The number
// specified in the name of the command indicates the number of components
// for each element in value, and it should match the number of components in
// the data type of the specified uniform variable (1 for float, int, bool;
// 2 for vec2, ivec2, bvec2, etc.). The data type specified in the name
// of the command must match the data type for the specified uniform variable
// as described for Uniform{1|2|3|4}{f|i|ui}.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform3iv(location glbase.Uniform, value []int32) {
    if len(value) == 0 {
        return
    }
    if len(value)%3 != 0 {
        panic("invalid value length for Uniform3iv")
    }
    count := len(value) / 3
    C.gl4_1core_glUniform3iv(gl.funcs, C.GLint(location), C.GLsizei(count), (*C.GLint)(unsafe.Pointer(&value[0])))
}

// Uniform2iv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// Uniform2iv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui}v can be used to modify a single
// uniform variable or a uniform variable array. These functions receive a
// slice with the values to be loaded into a uniform variable or a uniform
// variable array. A slice with length 1 should be used if modifying the value
// of a single uniform variable, and a length of 1 or greater can be used to
// modify an entire array or part of an array. When loading n elements
// starting at an arbitrary position m in a uniform variable array, elements
// m + n - 1 in the array will be replaced with the new values. If m + n - 1
// is larger than the size of the uniform variable array, values for all
// array elements beyond the end of the array will be ignored. The number
// specified in the name of the command indicates the number of components
// for each element in value, and it should match the number of components in
// the data type of the specified uniform variable (1 for float, int, bool;
// 2 for vec2, ivec2, bvec2, etc.). The data type specified in the name
// of the command must match the data type for the specified uniform variable
// as described for Uniform{1|2|3|4}{f|i|ui}.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform2iv(location glbase.Uniform, value []int32) {
    if len(value) == 0 {
        return
    }
    if len(value)%2 != 0 {
        panic("invalid value length for Uniform2iv")
    }
    count := len(value) / 2
    C.gl4_1core_glUniform2iv(gl.funcs, C.GLint(location), C.GLsizei(count), (*C.GLint)(unsafe.Pointer(&value[0])))
}

// Uniform1iv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// Uniform1iv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui}v can be used to modify a single
// uniform variable or a uniform variable array. These functions receive a
// slice with the values to be loaded into a uniform variable or a uniform
// variable array. A slice with length 1 should be used if modifying the value
// of a single uniform variable, and a length of 1 or greater can be used to
// modify an entire array or part of an array. When loading n elements
// starting at an arbitrary position m in a uniform variable array, elements
// m + n - 1 in the array will be replaced with the new values. If m + n - 1
// is larger than the size of the uniform variable array, values for all
// array elements beyond the end of the array will be ignored. The number
// specified in the name of the command indicates the number of components
// for each element in value, and it should match the number of components in
// the data type of the specified uniform variable (1 for float, int, bool;
// 2 for vec2, ivec2, bvec2, etc.). The data type specified in the name
// of the command must match the data type for the specified uniform variable
// as described for Uniform{1|2|3|4}{f|i|ui}.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform1iv(location glbase.Uniform, value []int32) {
    if len(value) == 0 {
        return
    }
    count := len(value)
    C.gl4_1core_glUniform1iv(gl.funcs, C.GLint(location), C.GLsizei(count), (*C.GLint)(unsafe.Pointer(&value[0])))
}

// Uniform4fv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// Uniform4fv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui}v can be used to modify a single
// uniform variable or a uniform variable array. These functions receive a
// slice with the values to be loaded into a uniform variable or a uniform
// variable array. A slice with length 1 should be used if modifying the value
// of a single uniform variable, and a length of 1 or greater can be used to
// modify an entire array or part of an array. When loading n elements
// starting at an arbitrary position m in a uniform variable array, elements
// m + n - 1 in the array will be replaced with the new values. If m + n - 1
// is larger than the size of the uniform variable array, values for all
// array elements beyond the end of the array will be ignored. The number
// specified in the name of the command indicates the number of components
// for each element in value, and it should match the number of components in
// the data type of the specified uniform variable (1 for float, int, bool;
// 2 for vec2, ivec2, bvec2, etc.). The data type specified in the name
// of the command must match the data type for the specified uniform variable
// as described for Uniform{1|2|3|4}{f|i|ui}.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform4fv(location glbase.Uniform, value []float32) {
    if len(value) == 0 {
        return
    }
    if len(value)%4 != 0 {
        panic("invalid value length for Uniform4fv")
    }
    count := len(value) / 4
    C.gl4_1core_glUniform4fv(gl.funcs, C.GLint(location), C.GLsizei(count), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// Uniform3fv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// Uniform3fv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui}v can be used to modify a single
// uniform variable or a uniform variable array. These functions receive a
// slice with the values to be loaded into a uniform variable or a uniform
// variable array. A slice with length 1 should be used if modifying the value
// of a single uniform variable, and a length of 1 or greater can be used to
// modify an entire array or part of an array. When loading n elements
// starting at an arbitrary position m in a uniform variable array, elements
// m + n - 1 in the array will be replaced with the new values. If m + n - 1
// is larger than the size of the uniform variable array, values for all
// array elements beyond the end of the array will be ignored. The number
// specified in the name of the command indicates the number of components
// for each element in value, and it should match the number of components in
// the data type of the specified uniform variable (1 for float, int, bool;
// 2 for vec2, ivec2, bvec2, etc.). The data type specified in the name
// of the command must match the data type for the specified uniform variable
// as described for Uniform{1|2|3|4}{f|i|ui}.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform3fv(location glbase.Uniform, value []float32) {
    if len(value) == 0 {
        return
    }
    if len(value)%3 != 0 {
        panic("invalid value length for Uniform3fv")
    }
    count := len(value) / 3
    C.gl4_1core_glUniform3fv(gl.funcs, C.GLint(location), C.GLsizei(count), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// Uniform2fv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// Uniform2fv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui}v can be used to modify a single
// uniform variable or a uniform variable array. These functions receive a
// slice with the values to be loaded into a uniform variable or a uniform
// variable array. A slice with length 1 should be used if modifying the value
// of a single uniform variable, and a length of 1 or greater can be used to
// modify an entire array or part of an array. When loading n elements
// starting at an arbitrary position m in a uniform variable array, elements
// m + n - 1 in the array will be replaced with the new values. If m + n - 1
// is larger than the size of the uniform variable array, values for all
// array elements beyond the end of the array will be ignored. The number
// specified in the name of the command indicates the number of components
// for each element in value, and it should match the number of components in
// the data type of the specified uniform variable (1 for float, int, bool;
// 2 for vec2, ivec2, bvec2, etc.). The data type specified in the name
// of the command must match the data type for the specified uniform variable
// as described for Uniform{1|2|3|4}{f|i|ui}.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform2fv(location glbase.Uniform, value []float32) {
    if len(value) == 0 {
        return
    }
    if len(value)%2 != 0 {
        panic("invalid value length for Uniform2fv")
    }
    count := len(value) / 2
    C.gl4_1core_glUniform2fv(gl.funcs, C.GLint(location), C.GLsizei(count), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// Uniform1fv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// Uniform1fv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui}v can be used to modify a single
// uniform variable or a uniform variable array. These functions receive a
// slice with the values to be loaded into a uniform variable or a uniform
// variable array. A slice with length 1 should be used if modifying the value
// of a single uniform variable, and a length of 1 or greater can be used to
// modify an entire array or part of an array. When loading n elements
// starting at an arbitrary position m in a uniform variable array, elements
// m + n - 1 in the array will be replaced with the new values. If m + n - 1
// is larger than the size of the uniform variable array, values for all
// array elements beyond the end of the array will be ignored. The number
// specified in the name of the command indicates the number of components
// for each element in value, and it should match the number of components in
// the data type of the specified uniform variable (1 for float, int, bool;
// 2 for vec2, ivec2, bvec2, etc.). The data type specified in the name
// of the command must match the data type for the specified uniform variable
// as described for Uniform{1|2|3|4}{f|i|ui}.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform1fv(location glbase.Uniform, value []float32) {
    if len(value) == 0 {
        return
    }
    count := len(value)
    C.gl4_1core_glUniform1fv(gl.funcs, C.GLint(location), C.GLsizei(count), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// Uniform4i modifies the value of a single uniform variable.
// The location of the uniform variable to be modified is specified by
// location, which should be a value returned by GetUniformLocation.
// Uniform4i operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui} are used to change the value of the
// uniform variable specified by location using the values passed as
// arguments. The number specified in the function should match the number of
// components in the data type of the specified uniform variable (1 for
// float, int, unsigned int, bool; 2 for vec2, ivec2, uvec2, bvec2, etc.).
// The suffix f indicates that floating-point values are being passed; the
// suffix i indicates that integer values are being passed; the suffix ui
// indicates that unsigned integer values are being passed, and this type
// should also match the data type of the specified uniform variable. The i
// variants of this function should be used to provide values for uniform
// variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The ui
// variants of this function should be used to provide values for uniform
// variables defined as unsigned int, uvec2, uvec3, uvec4, or arrays of
// these. The f variants should be used to provide values for uniform
// variables of type float, vec2, vec3, vec4, or arrays of these. Either the
// i, ui or f variants may be used to provide values for uniform variables of
// type bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable
// will be set to false if the input value is 0 or 0.0f, and it will be set
// to true otherwise.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform4i(location glbase.Uniform, v0, v1, v2, v3 int32) {
    C.gl4_1core_glUniform4i(gl.funcs, C.GLint(location), C.GLint(v0), C.GLint(v1), C.GLint(v2), C.GLint(v3))
}

// Uniform3i modifies the value of a single uniform variable.
// The location of the uniform variable to be modified is specified by
// location, which should be a value returned by GetUniformLocation.
// Uniform3i operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui} are used to change the value of the
// uniform variable specified by location using the values passed as
// arguments. The number specified in the function should match the number of
// components in the data type of the specified uniform variable (1 for
// float, int, unsigned int, bool; 2 for vec2, ivec2, uvec2, bvec2, etc.).
// The suffix f indicates that floating-point values are being passed; the
// suffix i indicates that integer values are being passed; the suffix ui
// indicates that unsigned integer values are being passed, and this type
// should also match the data type of the specified uniform variable. The i
// variants of this function should be used to provide values for uniform
// variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The ui
// variants of this function should be used to provide values for uniform
// variables defined as unsigned int, uvec2, uvec3, uvec4, or arrays of
// these. The f variants should be used to provide values for uniform
// variables of type float, vec2, vec3, vec4, or arrays of these. Either the
// i, ui or f variants may be used to provide values for uniform variables of
// type bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable
// will be set to false if the input value is 0 or 0.0f, and it will be set
// to true otherwise.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform3i(location glbase.Uniform, v0, v1, v2 int32) {
    C.gl4_1core_glUniform3i(gl.funcs, C.GLint(location), C.GLint(v0), C.GLint(v1), C.GLint(v2))
}

// Uniform2i modifies the value of a single uniform variable.
// The location of the uniform variable to be modified is specified by
// location, which should be a value returned by GetUniformLocation.
// Uniform2i operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui} are used to change the value of the
// uniform variable specified by location using the values passed as
// arguments. The number specified in the function should match the number of
// components in the data type of the specified uniform variable (1 for
// float, int, unsigned int, bool; 2 for vec2, ivec2, uvec2, bvec2, etc.).
// The suffix f indicates that floating-point values are being passed; the
// suffix i indicates that integer values are being passed; the suffix ui
// indicates that unsigned integer values are being passed, and this type
// should also match the data type of the specified uniform variable. The i
// variants of this function should be used to provide values for uniform
// variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The ui
// variants of this function should be used to provide values for uniform
// variables defined as unsigned int, uvec2, uvec3, uvec4, or arrays of
// these. The f variants should be used to provide values for uniform
// variables of type float, vec2, vec3, vec4, or arrays of these. Either the
// i, ui or f variants may be used to provide values for uniform variables of
// type bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable
// will be set to false if the input value is 0 or 0.0f, and it will be set
// to true otherwise.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform2i(location glbase.Uniform, v0, v1 int32) {
    C.gl4_1core_glUniform2i(gl.funcs, C.GLint(location), C.GLint(v0), C.GLint(v1))
}

// Uniform1i modifies the value of a single uniform variable.
// The location of the uniform variable to be modified is specified by
// location, which should be a value returned by GetUniformLocation.
// Uniform1i operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui} are used to change the value of the
// uniform variable specified by location using the values passed as
// arguments. The number specified in the function should match the number of
// components in the data type of the specified uniform variable (1 for
// float, int, unsigned int, bool; 2 for vec2, ivec2, uvec2, bvec2, etc.).
// The suffix f indicates that floating-point values are being passed; the
// suffix i indicates that integer values are being passed; the suffix ui
// indicates that unsigned integer values are being passed, and this type
// should also match the data type of the specified uniform variable. The i
// variants of this function should be used to provide values for uniform
// variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The ui
// variants of this function should be used to provide values for uniform
// variables defined as unsigned int, uvec2, uvec3, uvec4, or arrays of
// these. The f variants should be used to provide values for uniform
// variables of type float, vec2, vec3, vec4, or arrays of these. Either the
// i, ui or f variants may be used to provide values for uniform variables of
// type bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable
// will be set to false if the input value is 0 or 0.0f, and it will be set
// to true otherwise.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform1i(location glbase.Uniform, v0 int32) {
    C.gl4_1core_glUniform1i(gl.funcs, C.GLint(location), C.GLint(v0))
}

// Uniform4f modifies the value of a single uniform variable.
// The location of the uniform variable to be modified is specified by
// location, which should be a value returned by GetUniformLocation.
// Uniform4f operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui} are used to change the value of the
// uniform variable specified by location using the values passed as
// arguments. The number specified in the function should match the number of
// components in the data type of the specified uniform variable (1 for
// float, int, unsigned int, bool; 2 for vec2, ivec2, uvec2, bvec2, etc.).
// The suffix f indicates that floating-point values are being passed; the
// suffix i indicates that integer values are being passed; the suffix ui
// indicates that unsigned integer values are being passed, and this type
// should also match the data type of the specified uniform variable. The i
// variants of this function should be used to provide values for uniform
// variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The ui
// variants of this function should be used to provide values for uniform
// variables defined as unsigned int, uvec2, uvec3, uvec4, or arrays of
// these. The f variants should be used to provide values for uniform
// variables of type float, vec2, vec3, vec4, or arrays of these. Either the
// i, ui or f variants may be used to provide values for uniform variables of
// type bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable
// will be set to false if the input value is 0 or 0.0f, and it will be set
// to true otherwise.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform4f(location glbase.Uniform, v0, v1, v2, v3 float32) {
    C.gl4_1core_glUniform4f(gl.funcs, C.GLint(location), C.GLfloat(v0), C.GLfloat(v1), C.GLfloat(v2), C.GLfloat(v3))
}

// Uniform3f modifies the value of a single uniform variable.
// The location of the uniform variable to be modified is specified by
// location, which should be a value returned by GetUniformLocation.
// Uniform3f operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui} are used to change the value of the
// uniform variable specified by location using the values passed as
// arguments. The number specified in the function should match the number of
// components in the data type of the specified uniform variable (1 for
// float, int, unsigned int, bool; 2 for vec2, ivec2, uvec2, bvec2, etc.).
// The suffix f indicates that floating-point values are being passed; the
// suffix i indicates that integer values are being passed; the suffix ui
// indicates that unsigned integer values are being passed, and this type
// should also match the data type of the specified uniform variable. The i
// variants of this function should be used to provide values for uniform
// variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The ui
// variants of this function should be used to provide values for uniform
// variables defined as unsigned int, uvec2, uvec3, uvec4, or arrays of
// these. The f variants should be used to provide values for uniform
// variables of type float, vec2, vec3, vec4, or arrays of these. Either the
// i, ui or f variants may be used to provide values for uniform variables of
// type bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable
// will be set to false if the input value is 0 or 0.0f, and it will be set
// to true otherwise.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform3f(location glbase.Uniform, v0, v1, v2 float32) {
    C.gl4_1core_glUniform3f(gl.funcs, C.GLint(location), C.GLfloat(v0), C.GLfloat(v1), C.GLfloat(v2))
}

// Uniform2f modifies the value of a single uniform variable.
// The location of the uniform variable to be modified is specified by
// location, which should be a value returned by GetUniformLocation.
// Uniform2f operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui} are used to change the value of the
// uniform variable specified by location using the values passed as
// arguments. The number specified in the function should match the number of
// components in the data type of the specified uniform variable (1 for
// float, int, unsigned int, bool; 2 for vec2, ivec2, uvec2, bvec2, etc.).
// The suffix f indicates that floating-point values are being passed; the
// suffix i indicates that integer values are being passed; the suffix ui
// indicates that unsigned integer values are being passed, and this type
// should also match the data type of the specified uniform variable. The i
// variants of this function should be used to provide values for uniform
// variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The ui
// variants of this function should be used to provide values for uniform
// variables defined as unsigned int, uvec2, uvec3, uvec4, or arrays of
// these. The f variants should be used to provide values for uniform
// variables of type float, vec2, vec3, vec4, or arrays of these. Either the
// i, ui or f variants may be used to provide values for uniform variables of
// type bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable
// will be set to false if the input value is 0 or 0.0f, and it will be set
// to true otherwise.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform2f(location glbase.Uniform, v0, v1 float32) {
    C.gl4_1core_glUniform2f(gl.funcs, C.GLint(location), C.GLfloat(v0), C.GLfloat(v1))
}

// Uniform1f modifies the value of a single uniform variable.
// The location of the uniform variable to be modified is specified by
// location, which should be a value returned by GetUniformLocation.
// Uniform1f operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui} are used to change the value of the
// uniform variable specified by location using the values passed as
// arguments. The number specified in the function should match the number of
// components in the data type of the specified uniform variable (1 for
// float, int, unsigned int, bool; 2 for vec2, ivec2, uvec2, bvec2, etc.).
// The suffix f indicates that floating-point values are being passed; the
// suffix i indicates that integer values are being passed; the suffix ui
// indicates that unsigned integer values are being passed, and this type
// should also match the data type of the specified uniform variable. The i
// variants of this function should be used to provide values for uniform
// variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The ui
// variants of this function should be used to provide values for uniform
// variables defined as unsigned int, uvec2, uvec3, uvec4, or arrays of
// these. The f variants should be used to provide values for uniform
// variables of type float, vec2, vec3, vec4, or arrays of these. Either the
// i, ui or f variants may be used to provide values for uniform variables of
// type bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable
// will be set to false if the input value is 0 or 0.0f, and it will be set
// to true otherwise.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform1f(location glbase.Uniform, v0 float32) {
    C.gl4_1core_glUniform1f(gl.funcs, C.GLint(location), C.GLfloat(v0))
}

// UseProgram installs the program object specified by program as part of
// current rendering state. One or more executables are created in a program
// object by successfully attaching shader objects to it with AttachShader,
// successfully compiling the shader objects with CompileShader, and
// successfully linking the program object with LinkProgram.
//
// A program object will contain an executable that will run on the vertex
// processor if it contains one or more shader objects of type
// GL.VERTEX_SHADER that have been successfully compiled and linked.
// Similarly, a program object will contain an executable that will run on
// the fragment processor if it contains one or more shader objects of type
// GL.FRAGMENT_SHADER that have been successfully compiled and linked.
//
// Successfully installing an executable on a programmable processor will
// cause the corresponding fixed functionality of OpenGL to be disabled.
// Specifically, if an executable is installed on the vertex processor, the
// OpenGL fixed functionality will be disabled as follows.
//
//   - The modelview matrix is not applied to vertex coordinates.
//
//   - The projection matrix is not applied to vertex coordinates.
//
//   - The texture matrices are not applied to texture coordinates.
//
//   - Normals are not transformed to eye coordinates.
//
//   - Normals are not rescaled or normalized.
//
//   - Normalization of GL.AUTO_NORMAL evaluated normals is not performed.
//
//   - Texture coordinates are not generated automatically.
//
//   - Per-vertex lighting is not performed.
//
//   - Color material computations are not performed.
//
//   - Color index lighting is not performed.
//
//   - This list also applies when setting the current raster position.
//
// The executable that is installed on the vertex processor is expected to
// implement any or all of the desired functionality from the preceding list.
// Similarly, if an executable is installed on the fragment processor, the
// OpenGL fixed functionality will be disabled as follows.
//
//   - Texture environment and texture functions are not applied.
//
//   - Texture application is not applied.
//
//   - Color sum is not applied.
//
//   - Fog is not applied.
//
// Again, the fragment shader that is installed is expected to implement any
// or all of the desired functionality from the preceding list.
//
// While a program object is in use, applications are free to modify attached
// shader objects, compile attached shader objects, attach additional shader
// objects, and detach or delete shader objects. None of these operations
// will affect the executables that are part of the current state. However,
// relinking the program object that is currently in use will install the
// program object as part of the current rendering state if the link
// operation was successful (see LinkProgram). If the program object
// currently in use is relinked unsuccessfully, its link status will be set
// to GL.FALSE, but the executables and associated state will remain part of
// the current state until a subsequent call to UseProgram removes it from
// use. After it is removed from use, it cannot be made part of current state
// until it has been successfully relinked.
//
// If program contains shader objects of type GL.VERTEX_SHADER but it does
// not contain shader objects of type GL.FRAGMENT_SHADER, an executable will
// be installed on the vertex processor, but fixed functionality will be used
// for fragment processing. Similarly, if program contains shader objects of
// type GL.FRAGMENT_SHADER but it does not contain shader objects of type
// GL.VERTEX_SHADER, an executable will be installed on the fragment
// processor, but fixed functionality will be used for vertex processing. If
// program is 0, the programmable processors will be disabled, and fixed
// functionality will be used for both vertex and fragment processing.
//
// While a program object is in use, the state that controls the disabled
// fixed functionality may also be updated using the normal OpenGL calls.
//
// Like display lists and texture objects, the name space for program objects
// may be shared across a set of contexts, as long as the server sides of the
// contexts share the same address space. If the name space is shared across
// contexts, any attached objects and the data associated with those attached
// objects are shared as well.
//
// Applications are responsible for providing the synchronization across API
// calls when objects are accessed from different execution threads.
//
// Error GL.INVALID_VALUE is generated if program is neither 0 nor a value
// generated by OpenGL.  GL.INVALID_OPERATION is generated if program is not
// a program object.  GL.INVALID_OPERATION is generated if program could not
// be made part of current state.  GL.INVALID_OPERATION is generated if
// UseProgram is executed between the execution of Begin and the
// corresponding execution of End.
//
// UseProgram is available in GL version 2.0 or greater.
func (gl *GL) UseProgram(program glbase.Program) {
    C.gl4_1core_glUseProgram(gl.funcs, C.GLuint(program))
}

// ShaderSource sets the source code in shader to the provided source code. Any source
// code previously stored in the shader object is completely replaced.
//
// Error GL.INVALID_VALUE is generated if shader is not a value generated by
// OpenGL. GL.INVALID_OPERATION is generated if shader is not a shader
// object. GL.INVALID_VALUE is generated if count is less than 0.
// GL.INVALID_OPERATION is generated if ShaderSource is executed between the
// execution of Begin and the corresponding execution of End.
//
// ShaderSource is available in GL version 2.0 or greater.
func (gl *GL) ShaderSource(shader glbase.Shader, source ...string) {
    count := len(source)
    length := make([]int32, count)
    source_c := make([]unsafe.Pointer, count)
    for i, src := range source {
        length[i] = int32(len(src))
        if len(src) > 0 {
            source_c[i] = *(*unsafe.Pointer)(unsafe.Pointer(&src))
        } else {
            source_c[i] = unsafe.Pointer(uintptr(0))
        }
    }
    C.gl4_1core_glShaderSource(gl.funcs, C.GLuint(shader), C.GLsizei(count), (**C.GLchar)(unsafe.Pointer(&source_c[0])), (*C.GLint)(unsafe.Pointer(&length[0])))
}

// LinkProgram links the program object specified by program. If any shader
// objects of type GL.VERTEX_SHADER are attached to program, they will be
// used to create an executable that will run on the programmable vertex
// processor. If any shader objects of type GL.FRAGMENT_SHADER are attached
// to program, they will be used to create an executable that will run on the
// programmable fragment processor.
//
// The status of the link operation will be stored as part of the program
// object's state. This value will be set to GL.TRUE if the program object
// was linked without errors and is ready for use, and GL.FALSE otherwise. It
// can be queried by calling GetProgramiv with arguments program and
// GL.LINK_STATUS.
//
// As a result of a successful link operation, all active user-defined
// uniform variables belonging to program will be initialized to 0, and each
// of the program object's active uniform variables will be assigned a
// location that can be queried by calling GetUniformLocation. Also, any
// active user-defined attribute variables that have not been bound to a
// generic vertex attribute index will be bound to one at this time.
//
// Linking of a program object can fail for a number of reasons as specified
// in the OpenGL Shading Language Specification. The following lists some of
// the conditions that will cause a link error.
//
//   - The number of active attribute variables supported by the
//     implementation has been exceeded.
//
//   - The storage limit for uniform variables has been exceeded.
//
//   - The number of active uniform variables supported by the implementation
//     has been exceeded.
//
//   - The main function is missing for the vertex shader or the fragment
//     shader.
//
//   - A varying variable actually used in the fragment shader is not
//     declared in the same way (or is not declared at all) in the vertex
//     shader.
//
//   - A reference to a function or variable name is unresolved.
//
//   - A shared global is declared with two different types or two different
//     initial values.
//
//   - One or more of the attached shader objects has not been successfully
//     compiled.
//
//   - Binding a generic attribute matrix caused some rows of the matrix to
//     fall outside the allowed maximum of GL.MAX_VERTEX_ATTRIBS.
//
//   - Not enough contiguous vertex attribute slots could be found to bind
//     attribute matrices.
//
// When a program object has been successfully linked, the program object can
// be made part of current state by calling UseProgram. Whether or not the
// link operation was successful, the program object's information log will
// be overwritten. The information log can be retrieved by calling
// GetProgramInfoLog.
//
// LinkProgram will also install the generated executables as part of the
// current rendering state if the link operation was successful and the
// specified program object is already currently in use as a result of a
// previous call to UseProgram. If the program object currently in use is
// relinked unsuccessfully, its link status will be set to GL.FALSE , but the
// executables and associated state will remain part of the current state
// until a subsequent call to UseProgram removes it from use. After it is
// removed from use, it cannot be made part of current state until it has
// been successfully relinked.
//
// If program contains shader objects of type GL.VERTEX_SHADER but does not
// contain shader objects of type GL.FRAGMENT_SHADER, the vertex shader will
// be linked against the implicit interface for fixed functionality fragment
// processing. Similarly, if program contains shader objects of type
// GL.FRAGMENT_SHADER but it does not contain shader objects of type
// GL.VERTEX_SHADER, the fragment shader will be linked against the implicit
// interface for fixed functionality vertex processing.
//
// The program object's information log is updated and the program is
// generated at the time of the link operation. After the link operation,
// applications are free to modify attached shader objects, compile attached
// shader objects, detach shader objects, delete shader objects, and attach
// additional shader objects. None of these operations affects the
// information log or the program that is part of the program object.
//
// If the link operation is unsuccessful, any information about a previous
// link operation on program is lost (a failed link does not restore the
// old state of program). Certain information can still be retrieved
// from program even after an unsuccessful link operation. See for instance
// GetActiveAttrib and GetActiveUniform.
//
// Error GL.INVALID_VALUE is generated if program is not a value generated by
// OpenGL. GL.INVALID_OPERATION is generated if program is not a program
// object. GL.INVALID_OPERATION is generated if LinkProgram is executed
// between the execution of Begin and the corresponding execution of End.
//
// LinkProgram is available in GL version 2.0 or greater.
func (gl *GL) LinkProgram(program glbase.Program) {
    C.gl4_1core_glLinkProgram(gl.funcs, C.GLuint(program))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glIsShader.xml
func (gl *GL) IsShader(shader glbase.Shader) bool {
    glresult := C.gl4_1core_glIsShader(gl.funcs, C.GLuint(shader))
    return *(*bool)(unsafe.Pointer(&glresult))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glIsProgram.xml
func (gl *GL) IsProgram(program glbase.Program) bool {
    glresult := C.gl4_1core_glIsProgram(gl.funcs, C.GLuint(program))
    return *(*bool)(unsafe.Pointer(&glresult))
}

// GetVertexAttribiv returns in params the value of a generic vertex attribute
// parameter. The generic vertex attribute to be queried is specified by
// index, and the parameter to be queried is specified by pname.
//
// The accepted parameter names are as follows:
//
//   GL.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
//       params returns a single value, the name of the buffer object
//       currently bound to the binding point corresponding to generic vertex
//       attribute array index. If no buffer object is bound, 0 is returned.
//       The initial value is 0.
//
//   GL.VERTEX_ATTRIB_ARRAY_ENABLED
//       params returns a single value that is non-zero (true) if the vertex
//       attribute array for index is enabled and 0 (false) if it is
//       disabled. The initial value is 0.
//
//   GL.VERTEX_ATTRIB_ARRAY_SIZE
//       params returns a single value, the size of the vertex attribute
//       array for index. The size is the number of values for each element
//       of the vertex attribute array, and it will be 1, 2, 3, or 4. The
//       initial value is 4.
//
//   GL.VERTEX_ATTRIB_ARRAY_STRIDE
//       params returns a single value, the array stride for (number of bytes
//       between successive elements in) the vertex attribute array for
//       index. A value of 0 indicates that the array elements are stored
//       sequentially in memory. The initial value is 0.
//
//   GL.VERTEX_ATTRIB_ARRAY_TYPE
//       params returns a single value, a symbolic constant indicating the
//       array type for the vertex attribute array for index. Possible values
//       are GL.BYTE, GL.UNSIGNED_BYTE, GL.SHORT, GL.UNSIGNED_SHORT, GL.INT,
//       GL.UNSIGNED_INT, GL.FLOAT, and GL.DOUBLE. The initial value is
//       GL.FLOAT.
//
//   GL.VERTEX_ATTRIB_ARRAY_NORMALIZED
//       params returns a single value that is non-zero (true) if fixed-point
//       data types for the vertex attribute array indicated by index are
//       normalized when they are converted to floating point, and 0 (false)
//       otherwise. The initial value is 0.
//
//   GL.CURRENT_VERTEX_ATTRIB
//       params returns four values that represent the current value for the
//       generic vertex attribute specified by index. Generic vertex
//       attribute 0 is unique in that it has no current state, so an error
//       will be generated if index is 0. The initial value for all other
//       generic vertex attributes is (0,0,0,1).
//
// All of the parameters except GL.CURRENT_VERTEX_ATTRIB represent
// client-side state.
//
// Error GL.INVALID_VALUE is generated if index is greater than or equal to
// GL.MAX_VERTEX_ATTRIBS. GL.INVALID_ENUM is generated if pname is not an
// accepted value.  GL.INVALID_OPERATION is generated if index is 0 and pname
// is GL.CURRENT_VERTEX_ATTRIB.
//
// GetVertexAttribiv is available in GL version 2.0 or greater.
func (gl *GL) GetVertexAttribiv(index glbase.Attrib, pname glbase.Enum, params []int32) {
    var params_c [4]int32
    C.gl4_1core_glGetVertexAttribiv(gl.funcs, C.GLuint(index), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params_c[0])))
    copy(params, params_c[:])
}

// GetVertexAttribfv returns in params the value of a generic vertex attribute
// parameter. The generic vertex attribute to be queried is specified by
// index, and the parameter to be queried is specified by pname.
//
// The accepted parameter names are as follows:
//
//   GL.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
//       params returns a single value, the name of the buffer object
//       currently bound to the binding point corresponding to generic vertex
//       attribute array index. If no buffer object is bound, 0 is returned.
//       The initial value is 0.
//
//   GL.VERTEX_ATTRIB_ARRAY_ENABLED
//       params returns a single value that is non-zero (true) if the vertex
//       attribute array for index is enabled and 0 (false) if it is
//       disabled. The initial value is 0.
//
//   GL.VERTEX_ATTRIB_ARRAY_SIZE
//       params returns a single value, the size of the vertex attribute
//       array for index. The size is the number of values for each element
//       of the vertex attribute array, and it will be 1, 2, 3, or 4. The
//       initial value is 4.
//
//   GL.VERTEX_ATTRIB_ARRAY_STRIDE
//       params returns a single value, the array stride for (number of bytes
//       between successive elements in) the vertex attribute array for
//       index. A value of 0 indicates that the array elements are stored
//       sequentially in memory. The initial value is 0.
//
//   GL.VERTEX_ATTRIB_ARRAY_TYPE
//       params returns a single value, a symbolic constant indicating the
//       array type for the vertex attribute array for index. Possible values
//       are GL.BYTE, GL.UNSIGNED_BYTE, GL.SHORT, GL.UNSIGNED_SHORT, GL.INT,
//       GL.UNSIGNED_INT, GL.FLOAT, and GL.DOUBLE. The initial value is
//       GL.FLOAT.
//
//   GL.VERTEX_ATTRIB_ARRAY_NORMALIZED
//       params returns a single value that is non-zero (true) if fixed-point
//       data types for the vertex attribute array indicated by index are
//       normalized when they are converted to floating point, and 0 (false)
//       otherwise. The initial value is 0.
//
//   GL.CURRENT_VERTEX_ATTRIB
//       params returns four values that represent the current value for the
//       generic vertex attribute specified by index. Generic vertex
//       attribute 0 is unique in that it has no current state, so an error
//       will be generated if index is 0. The initial value for all other
//       generic vertex attributes is (0,0,0,1).
//
// All of the parameters except GL.CURRENT_VERTEX_ATTRIB represent
// client-side state.
//
// Error GL.INVALID_VALUE is generated if index is greater than or equal to
// GL.MAX_VERTEX_ATTRIBS. GL.INVALID_ENUM is generated if pname is not an
// accepted value.  GL.INVALID_OPERATION is generated if index is 0 and pname
// is GL.CURRENT_VERTEX_ATTRIB.
//
// GetVertexAttribfv is available in GL version 2.0 or greater.
func (gl *GL) GetVertexAttribfv(index glbase.Attrib, pname glbase.Enum, params []float32) {
    var params_c [4]float32
    C.gl4_1core_glGetVertexAttribfv(gl.funcs, C.GLuint(index), C.GLenum(pname), (*C.GLfloat)(unsafe.Pointer(&params_c[0])))
    copy(params, params_c[:])
}

// GetVertexAttribdv returns in params the value of a generic vertex attribute
// parameter. The generic vertex attribute to be queried is specified by
// index, and the parameter to be queried is specified by pname.
//
// The accepted parameter names are as follows:
//
//   GL.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
//       params returns a single value, the name of the buffer object
//       currently bound to the binding point corresponding to generic vertex
//       attribute array index. If no buffer object is bound, 0 is returned.
//       The initial value is 0.
//
//   GL.VERTEX_ATTRIB_ARRAY_ENABLED
//       params returns a single value that is non-zero (true) if the vertex
//       attribute array for index is enabled and 0 (false) if it is
//       disabled. The initial value is 0.
//
//   GL.VERTEX_ATTRIB_ARRAY_SIZE
//       params returns a single value, the size of the vertex attribute
//       array for index. The size is the number of values for each element
//       of the vertex attribute array, and it will be 1, 2, 3, or 4. The
//       initial value is 4.
//
//   GL.VERTEX_ATTRIB_ARRAY_STRIDE
//       params returns a single value, the array stride for (number of bytes
//       between successive elements in) the vertex attribute array for
//       index. A value of 0 indicates that the array elements are stored
//       sequentially in memory. The initial value is 0.
//
//   GL.VERTEX_ATTRIB_ARRAY_TYPE
//       params returns a single value, a symbolic constant indicating the
//       array type for the vertex attribute array for index. Possible values
//       are GL.BYTE, GL.UNSIGNED_BYTE, GL.SHORT, GL.UNSIGNED_SHORT, GL.INT,
//       GL.UNSIGNED_INT, GL.FLOAT, and GL.DOUBLE. The initial value is
//       GL.FLOAT.
//
//   GL.VERTEX_ATTRIB_ARRAY_NORMALIZED
//       params returns a single value that is non-zero (true) if fixed-point
//       data types for the vertex attribute array indicated by index are
//       normalized when they are converted to floating point, and 0 (false)
//       otherwise. The initial value is 0.
//
//   GL.CURRENT_VERTEX_ATTRIB
//       params returns four values that represent the current value for the
//       generic vertex attribute specified by index. Generic vertex
//       attribute 0 is unique in that it has no current state, so an error
//       will be generated if index is 0. The initial value for all other
//       generic vertex attributes is (0,0,0,1).
//
// All of the parameters except GL.CURRENT_VERTEX_ATTRIB represent
// client-side state.
//
// Error GL.INVALID_VALUE is generated if index is greater than or equal to
// GL.MAX_VERTEX_ATTRIBS. GL.INVALID_ENUM is generated if pname is not an
// accepted value.  GL.INVALID_OPERATION is generated if index is 0 and pname
// is GL.CURRENT_VERTEX_ATTRIB.
//
// GetVertexAttribdv is available in GL version 2.0 or greater.
func (gl *GL) GetVertexAttribdv(index glbase.Attrib, pname glbase.Enum, params []float64) {
    var params_c [4]float64
    C.gl4_1core_glGetVertexAttribdv(gl.funcs, C.GLuint(index), C.GLenum(pname), (*C.GLdouble)(unsafe.Pointer(&params_c[0])))
    copy(params, params_c[:])
}

// GetUniformiv returns in params the value of the specified uniform
// variable. The type of the uniform variable specified by location
// determines the number of values returned. If the uniform variable is
// defined in the shader as a boolean, int, or float, a single value will be
// returned. If it is defined as a vec2, ivec2, or bvec2, two values will be
// returned. If it is defined as a vec3, ivec3, or bvec3, three values will
// be returned, and so on. To query values stored in uniform variables
// declared as arrays, call GetUniformiv for each element of the array. To
// query values stored in uniform variables declared as structures, call
// GetUniformiv for each field in the structure. The values for uniform
// variables declared as a matrix will be returned in column major order.
//
// The locations assigned to uniform variables are not known until the
// program object is linked. After linking has occurred, the command
// GetUniformLocation can be used to obtain the location of a uniform
// variable. This location value can then be passed to GetUniformiv in order
// to query the current value of the uniform variable. After a program object
// has been linked successfully, the index values for uniform variables
// remain fixed until the next link command occurs. The uniform variable
// values can only be queried after a link if the link was successful.
//
// Error GL.INVALID_VALUE is generated if program is not a value generated by
// OpenGL. GL.INVALID_OPERATION is generated if program is not a program
// object. GL.INVALID_OPERATION is generated if program has not been
// successfully linked. GL.INVALID_OPERATION is generated if location does
// not correspond to a valid uniform variable location for the specified
// program object. GL.INVALID_OPERATION is generated if GetUniformiv is
// executed between the execution of Begin and the corresponding execution of
// End.
//
// GetUniformiv is available in GL version 2.0 or greater.
func (gl *GL) GetUniformiv(program glbase.Program, location glbase.Uniform, params []int32) {
    var params_c [4]int32
    C.gl4_1core_glGetUniformiv(gl.funcs, C.GLuint(program), C.GLint(location), (*C.GLint)(unsafe.Pointer(&params_c[0])))
    copy(params, params_c[:])
}

// GetUniformfv returns in params the value of the specified uniform
// variable. The type of the uniform variable specified by location
// determines the number of values returned. If the uniform variable is
// defined in the shader as a boolean, int, or float, a single value will be
// returned. If it is defined as a vec2, ivec2, or bvec2, two values will be
// returned. If it is defined as a vec3, ivec3, or bvec3, three values will
// be returned, and so on. To query values stored in uniform variables
// declared as arrays, call GetUniformfv for each element of the array. To
// query values stored in uniform variables declared as structures, call
// GetUniformfv for each field in the structure. The values for uniform
// variables declared as a matrix will be returned in column major order.
//
// The locations assigned to uniform variables are not known until the
// program object is linked. After linking has occurred, the command
// GetUniformLocation can be used to obtain the location of a uniform
// variable. This location value can then be passed to GetUniformfv in order
// to query the current value of the uniform variable. After a program object
// has been linked successfully, the index values for uniform variables
// remain fixed until the next link command occurs. The uniform variable
// values can only be queried after a link if the link was successful.
//
// Error GL.INVALID_VALUE is generated if program is not a value generated by
// OpenGL. GL.INVALID_OPERATION is generated if program is not a program
// object. GL.INVALID_OPERATION is generated if program has not been
// successfully linked. GL.INVALID_OPERATION is generated if location does
// not correspond to a valid uniform variable location for the specified
// program object. GL.INVALID_OPERATION is generated if GetUniformfv is
// executed between the execution of Begin and the corresponding execution of
// End.
//
// GetUniformfv is available in GL version 2.0 or greater.
func (gl *GL) GetUniformfv(program glbase.Program, location glbase.Uniform, params []float32) {
    var params_c [4]float32
    C.gl4_1core_glGetUniformfv(gl.funcs, C.GLuint(program), C.GLint(location), (*C.GLfloat)(unsafe.Pointer(&params_c[0])))
    copy(params, params_c[:])
}

// GetUniformLocation returns an integer that represents the location of a
// specific uniform variable within a program object. name must be an active
// uniform variable name in program that is not a structure, an array of
// structures, or a subcomponent of a vector or a matrix. This function
// returns -1 if name does not correspond to an active uniform variable in
// program or if name starts with the reserved prefix "gl_".
//
// Uniform variables that are structures or arrays of structures may be
// queried by calling GetUniformLocation for each field within the
// structure. The array element operator "[]" and the structure field
// operator "." may be used in name in order to select elements within an
// array or fields within a structure. The result of using these operators is
// not allowed to be another structure, an array of structures, or a
// subcomponent of a vector or a matrix. Except if the last part of name
// indicates a uniform variable array, the location of the first element of
// an array can be retrieved by using the name of the array, or by using the
// name appended by "[0]".
//
// The actual locations assigned to uniform variables are not known until the
// program object is linked successfully. After linking has occurred, the
// command GetUniformLocation can be used to obtain the location of a
// uniform variable. This location value can then be passed to Uniform to
// set the value of the uniform variable or to GetUniform in order to query
// the current value of the uniform variable. After a program object has been
// linked successfully, the index values for uniform variables remain fixed
// until the next link command occurs. Uniform variable locations and values
// can only be queried after a link if the link was successful.
//
// Error GL.INVALID_VALUE is generated if program is not a value generated by
// OpenGL. GL.INVALID_OPERATION is generated if program is not a program object.
// GL.INVALID_OPERATION is generated if program has not been successfully
// linked. GL.INVALID_OPERATION is generated if GetUniformLocation is executed
// between the execution of Begin and the corresponding execution of End.
//
// GetUniformLocation is available in GL version 2.0 or greater.
func (gl *GL) GetUniformLocation(program glbase.Program, name string) glbase.Uniform {
    name_cstr := C.CString(name)
    glresult := C.gl4_1core_glGetUniformLocation(gl.funcs, C.GLuint(program), (*C.GLchar)(name_cstr))
    C.free(unsafe.Pointer(name_cstr))
    return glbase.Uniform(glresult)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetShaderSource.xml
func (gl *GL) GetShaderSource(shader glbase.Shader, bufSize int32, length []int32, source []byte) {
    C.gl4_1core_glGetShaderSource(gl.funcs, C.GLuint(shader), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLchar)(unsafe.Pointer(&source[0])))
}

// GetShaderInfoLog returns the information log for the specified shader
// object. The information log for a shader object is modified when the
// shader is compiled.
//
// The information log for a shader object is a string that may contain
// diagnostic messages, warning messages, and other information about the
// last compile operation. When a shader object is created, its information
// log will be a string of length 0, and the size of the current log can be
// obtained by calling GetShaderiv with the value GL.INFO_LOG_LENGTH.
//
// The information log for a shader object is the OpenGL implementer's
// primary mechanism for conveying information about the compilation process.
// Therefore, the information log can be helpful to application developers
// during the development process, even when compilation is successful.
// Application developers should not expect different OpenGL implementations
// to produce identical information logs.
//
// Error GL.INVALID_VALUE is generated if shader is not a value generated by
// OpenGL. GL.INVALID_OPERATION is generated if shader is not a shader
// object. GL.INVALID_VALUE is generated if maxLength is less than 0.
// GL.INVALID_OPERATION is generated if GetShaderInfoLog is executed
// between the execution of Begin and the corresponding execution of End.
//
// GetShaderInfoLog is available in GL version 2.0 or greater.
func (gl *GL) GetShaderInfoLog(shader glbase.Shader) []byte {
    var params [1]int32
    var length int32
    gl.GetShaderiv(shader, INFO_LOG_LENGTH, params[:])
    bufSize := params[0]
    infoLog := make([]byte, int(bufSize))
    C.gl4_1core_glGetShaderInfoLog(gl.funcs, C.GLuint(shader), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length)), (*C.GLchar)(unsafe.Pointer(&infoLog[0])))
    return infoLog
}

// GetShaderiv GetShader returns in params the value of a parameter for a specific
// shader object. The following parameters are defined:
//
//   GL.SHADER_TYPE
//     params returns GL.VERTEX_SHADER if shader is a vertex shader object,
//     and GL.FRAGMENT_SHADER if shader is a fragment shader object.
//
//   GL.DELETE_STATUS
//     params returns GL.TRUE if shader is currently flagged for deletion,
//     and GL.FALSE otherwise.
//
//   GL.COMPILE_STATUS
//     params returns GL.TRUE if the last compile operation on shader was
//     successful, and GL.FALSE otherwise.
//
//   GL.INFO_LOG_LENGTH
//     params returns the number of characters in the information log for
//     shader including the null termination character (the size of the
//     character buffer required to store the information log). If shader has
//     no information log, a value of 0 is returned.
//
//   GL.SHADER_SOURCE_LENGTH
//     params returns the length of the concatenation of the source strings
//     that make up the shader source for the shader, including the null
//     termination character. (the size of the character buffer
//     required to store the shader source). If no source code exists, 0 is
//     returned.
//
// Error GL.INVALID_VALUE is generated if shader is not a value generated by
// OpenGL. GL.INVALID_OPERATION is generated if shader does not refer to a
// shader object. GL.INVALID_ENUM is generated if pname is not an accepted
// value. GL.INVALID_OPERATION is generated if GetShader is executed
// between the execution of Begin and the corresponding execution of End.
//
// GetShaderiv is available in GL version 2.0 or greater.
func (gl *GL) GetShaderiv(shader glbase.Shader, pname glbase.Enum, params []int32) {
    var params_c [4]int32
    C.gl4_1core_glGetShaderiv(gl.funcs, C.GLuint(shader), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params_c[0])))
    copy(params, params_c[:])
}

// GetProgramInfoLog returns the information log for the specified program
// object. The information log for a program object is modified when the
// program object is linked or validated.
//
// The information log for a program object is either an empty string, or a
// string containing information about the last link operation, or a string
// containing information about the last validation operation. It may contain
// diagnostic messages, warning messages, and other information. When a
// program object is created, its information log will be a string of length
// 0, and the size of the current log can be obtained by calling GetProgramiv
// with the value GL.INFO_LOG_LENGTH.
//
// Error GL.INVALID_VALUE is generated if program is not a value generated
// by OpenGL. GL.INVALID_OPERATION is generated if program is not a
// program object.
func (gl *GL) GetProgramInfoLog(program glbase.Program) []byte {
    var params [1]int32
    var length int32
    gl.GetProgramiv(program, INFO_LOG_LENGTH, params[:])
    bufSize := params[0]
    infoLog := make([]byte, int(bufSize))
    C.gl4_1core_glGetProgramInfoLog(gl.funcs, C.GLuint(program), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length)), (*C.GLchar)(unsafe.Pointer(&infoLog[0])))
    return infoLog
}

// GetProgramiv returns in params the value of a parameter for a specific
// program object. The following parameters are defined:
//
//   GL.DELETE_STATUS
//       params returns GL.TRUE if program is currently flagged for deletion,
//       and GL.FALSE otherwise.
//
//   GL.LINK_STATUS
//       params returns GL.TRUE if the last link operation on program was
//       successful, and GL.FALSE otherwise.
//
//   GL.VALIDATE_STATUS
//       params returns GL.TRUE or if the last validation operation on
//       program was successful, and GL.FALSE otherwise.
//
//   GL.INFO_LOG_LENGTH
//       params returns the number of characters in the information log for
//       program including the null termination character (the size of
//       the character buffer required to store the information log). If
//       program has no information log, a value of 0 is returned.
//
//   GL.ATTACHED_SHADERS
//       params returns the number of shader objects attached to program.
//
//   GL.ACTIVE_ATTRIBUTES
//       params returns the number of active attribute variables for program.
//
//   GL.ACTIVE_ATTRIBUTE_MAX_LENGTH
//       params returns the length of the longest active attribute name for
//       program, including the null termination character (the size of
//       the character buffer required to store the longest attribute name).
//       If no active attributes exist, 0 is returned.
//
//   GL.ACTIVE_UNIFORMS
//       params returns the number of active uniform variables for program.
//
//   GL.ACTIVE_UNIFORM_MAX_LENGTH
//       params returns the length of the longest active uniform variable
//       name for program, including the null termination character (i.e.,
//       the size of the character buffer required to store the longest
//       uniform variable name). If no active uniform variables exist, 0 is
//       returned.
//
//   GL.TRANSFORM_FEEDBACK_BUFFER_MODE
//       params returns a symbolic constant indicating the buffer mode used
//       when transform feedback is active. This may be GL.SEPARATE_ATTRIBS
//       or GL.INTERLEAVED_ATTRIBS.
//
//   GL.TRANSFORM_FEEDBACK_VARYINGS
//       params returns the number of varying variables to capture in transform
//       feedback mode for the program.
//
//   GL.TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH
//       params returns the length of the longest variable name to be used for
//       transform feedback, including the null-terminator.
//
//   GL.GEOMETRY_VERTICES_OUT
//       params returns the maximum number of vertices that the geometry shader in
//       program will output.
//
//   GL.GEOMETRY_INPUT_TYPE
//       params returns a symbolic constant indicating the primitive type accepted
//       as input to the geometry shader contained in program.
//
//   GL.GEOMETRY_OUTPUT_TYPE
//       params returns a symbolic constant indicating the primitive type that will
//       be output by the geometry shader contained in program.
//
// GL.ACTIVE_UNIFORM_BLOCKS and GL.ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH are
// available only if the GL version 3.1 or greater.
//
// GL.GEOMETRY_VERTICES_OUT, GL.GEOMETRY_INPUT_TYPE and
// GL.GEOMETRY_OUTPUT_TYPE are accepted only if the GL version is 3.2 or
// greater.
//
// Error GL.INVALID_VALUE is generated if program is not a value generated by
// OpenGL. GL.INVALID_OPERATION is generated if program does not refer to a
// program object.  GL.INVALID_OPERATION is generated if pname is
// GL.GEOMETRY_VERTICES_OUT, GL.GEOMETRY_INPUT_TYPE, or
// GL.GEOMETRY_OUTPUT_TYPE, and program does not contain a geometry shader.
// GL.INVALID_ENUM is generated if pname is not an accepted value.
func (gl *GL) GetProgramiv(program glbase.Program, pname glbase.Enum, params []int32) {
    var params_c [4]int32
    C.gl4_1core_glGetProgramiv(gl.funcs, C.GLuint(program), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params_c[0])))
    copy(params, params_c[:])
}

// GetAttribLocation queries the previously linked program object specified
// by program for the attribute variable specified by name and returns the
// index of the generic vertex attribute that is bound to that attribute
// variable. If name is a matrix attribute variable, the index of the first
// column of the matrix is returned. If the named attribute variable is not
// an active attribute in the specified program object or if name starts with
// the reserved prefix "gl_", a value of -1 is returned.
//
// The association between an attribute variable name and a generic attribute
// index can be specified at any time by calling BindAttribLocation.
// Attribute bindings do not go into effect until LinkProgram is called.
// After a program object has been linked successfully, the index values for
// attribute variables remain fixed until the next link command occurs. The
// attribute values can only be queried after a link if the link was
// successful. GetAttribLocation returns the binding that actually went
// into effect the last time LinkProgram was called for the specified
// program object. Attribute bindings that have been specified since the last
// link operation are not returned by GetAttribLocation.
//
// Error GL_INVALID_OPERATION is generated if program is not a value
// generated by OpenGL. GL_INVALID_OPERATION is generated if program is not
// a program object. GL_INVALID_OPERATION is generated if program has not
// been successfully linked.  GL_INVALID_OPERATION is generated if
// GetAttribLocation is executed between the execution of Begin and the
// corresponding execution of End.
//
// GetAttribLocation is available in GL version 2.0 or greater.
func (gl *GL) GetAttribLocation(program glbase.Program, name string) glbase.Attrib {
    name_cstr := C.CString(name)
    glresult := C.gl4_1core_glGetAttribLocation(gl.funcs, C.GLuint(program), (*C.GLchar)(name_cstr))
    C.free(unsafe.Pointer(name_cstr))
    return glbase.Attrib(glresult)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetAttachedShaders.xml
func (gl *GL) GetAttachedShaders(program glbase.Program, maxCount int32, count []int, obj []uint32) {
    C.gl4_1core_glGetAttachedShaders(gl.funcs, C.GLuint(program), C.GLsizei(maxCount), (*C.GLsizei)(unsafe.Pointer(&count[0])), (*C.GLuint)(unsafe.Pointer(&obj[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniform.xml
func (gl *GL) GetActiveUniform(program glbase.Program, index uint32, bufSize int32, length []int32, size []int, gltype []glbase.Enum, name []byte) {
    C.gl4_1core_glGetActiveUniform(gl.funcs, C.GLuint(program), C.GLuint(index), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&size[0])), (*C.GLenum)(unsafe.Pointer(&gltype[0])), (*C.GLchar)(unsafe.Pointer(&name[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveAttrib.xml
func (gl *GL) GetActiveAttrib(program glbase.Program, index glbase.Attrib, bufSize int32, length []int32, size []int, gltype []glbase.Enum, name []byte) {
    C.gl4_1core_glGetActiveAttrib(gl.funcs, C.GLuint(program), C.GLuint(index), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&size[0])), (*C.GLenum)(unsafe.Pointer(&gltype[0])), (*C.GLchar)(unsafe.Pointer(&name[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glEnableVertexAttribArray.xml
func (gl *GL) EnableVertexAttribArray(index glbase.Attrib) {
    C.gl4_1core_glEnableVertexAttribArray(gl.funcs, C.GLuint(index))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDisableVertexAttribArray.xml
func (gl *GL) DisableVertexAttribArray(index glbase.Attrib) {
    C.gl4_1core_glDisableVertexAttribArray(gl.funcs, C.GLuint(index))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDetachShader.xml
func (gl *GL) DetachShader(program glbase.Program, shader glbase.Shader) {
    C.gl4_1core_glDetachShader(gl.funcs, C.GLuint(program), C.GLuint(shader))
}

// DeleteShader frees the memory and invalidates the name associated with
// the shader object specified by shader. This command effectively undoes the
// effects of a call to CreateShader.
//
// If a shader object to be deleted is attached to a program object, it will
// be flagged for deletion, but it will not be deleted until it is no longer
// attached to any program object, for any rendering context (it must
// be detached from wherever it was attached before it will be deleted). A
// value of 0 for shader will be silently ignored.
//
// To determine whether an object has been flagged for deletion, call
// GetShader with arguments shader and GL.DELETE_STATUS.
//
// Error GL.INVALID_VALUE is generated if shader is not a value generated by
// OpenGL.
//
// DeleteShader is available in GL version 2.0 or greater.
func (gl *GL) DeleteShader(shader glbase.Shader) {
    C.gl4_1core_glDeleteShader(gl.funcs, C.GLuint(shader))
}

// DeleteProgram frees the memory and invalidates the name associated with
// the program object specified by program. This command effectively undoes
// the effects of a call to CreateProgram.
//
// If a program object is in use as part of current rendering state, it will
// be flagged for deletion, but it will not be deleted until it is no longer
// part of current state for any rendering context. If a program object to be
// deleted has shader objects attached to it, those shader objects will be
// automatically detached but not deleted unless they have already been
// flagged for deletion by a previous call to DeleteShader. A value of 0
// for program will be silently ignored.
//
// To determine whether a program object has been flagged for deletion, call
// GetProgram with arguments program and GL.DELETE_STATUS.
//
// Error GL.INVALID_VALUE is generated if program is not a value generated by
// OpenGL.
//
// DeleteProgram is available in GL version 2.0 or greater.
func (gl *GL) DeleteProgram(program glbase.Program) {
    C.gl4_1core_glDeleteProgram(gl.funcs, C.GLuint(program))
}

// CreateShader creates an empty shader object and returns a non-zero value
// by which it can be referenced. A shader object is used to maintain the
// source code strings that define a shader. shaderType indicates the type of
// shader to be created.
//
// Two types of shaders are supported. A shader of type GL.VERTEX_SHADER is a
// shader that is intended to run on the programmable vertex processor and
// replace the fixed functionality vertex processing in OpenGL. A shader of
// type GL.FRAGMENT_SHADER is a shader that is intended to run on the
// programmable fragment processor and replace the fixed functionality
// fragment processing in OpenGL.
//
// When created, a shader object's GL.SHADER_TYPE parameter is set to either
// GL.VERTEX_SHADER or GL.FRAGMENT_SHADER, depending on the value of
// shaderType.
//
// Like display lists and texture objects, the name space for shader objects
// may be shared across a set of contexts, as long as the server sides of the
// contexts share the same address space. If the name space is shared across
// contexts, any attached objects and the data associated with those attached
// objects are shared as well.
//
// This function returns 0 if an error occurs creating the shader object.
//
// Error GL.INVALID_ENUM is generated if shaderType is not an accepted value.
// GL.INVALID_OPERATION is generated if CreateShader is executed between the
// execution of Begin and the corresponding execution of End.
//
// CreateShader is available in GL version 2.0 or greater.
func (gl *GL) CreateShader(gltype glbase.Enum) glbase.Shader {
    glresult := C.gl4_1core_glCreateShader(gl.funcs, C.GLenum(gltype))
    return glbase.Shader(glresult)
}

// CreateProgram creates an empty program object and returns a non-zero
// value by which it can be referenced. A program object is an object to
// which shader objects can be attached. This provides a mechanism to specify
// the shader objects that will be linked to create a program. It also
// provides a means for checking the compatibility of the shaders that will
// be used to create a program (for instance, checking the compatibility
// between a vertex shader and a fragment shader). When no longer needed as
// part of a program object, shader objects can be detached.
//
// One or more executables are created in a program object by successfully
// attaching shader objects to it with AttachShader, successfully compiling
// the shader objects with CompileShader, and successfully linking the
// program object with LinkProgram. These executables are made part of
// current state when UseProgram is called. Program objects can be deleted
// by calling DeleteProgram. The memory associated with the program object
// will be deleted when it is no longer part of current rendering state for
// any context.
//
// Like display lists and texture objects, the name space for program objects
// may be shared across a set of contexts, as long as the server sides of the
// contexts share the same address space. If the name space is shared across
// contexts, any attached objects and the data associated with those attached
// objects are shared as well.
//
// Applications are responsible for providing the synchronization across API
// calls when objects are accessed from different execution threads.
//
// This function returns 0 if an error occurs creating the program object.
//
// Error GL.INVALID_OPERATION is generated if CreateProgram is executed
// between the execution of Begin and the corresponding execution of End.
//
// CreateProgram is available in GL version 2.0 or greater.
func (gl *GL) CreateProgram() glbase.Program {
    glresult := C.gl4_1core_glCreateProgram(gl.funcs)
    return glbase.Program(glresult)
}

// CompileShader compiles the source code strings that have been stored in
// the shader object specified by shader.
//
// The compilation status will be stored as part of the shader object's
// state. This value will be set to GL.TRUE if the shader was compiled without
// errors and is ready for use, and GL.FALSE otherwise. It can be queried by
// calling GetShaderiv with arguments shader and GL.COMPILE_STATUS.
//
// Compilation of a shader can fail for a number of reasons as specified by
// the OpenGL Shading Language Specification. Whether or not the compilation
// was successful, information about the compilation can be obtained from the
// shader object's information log by calling GetShaderInfoLog.
//
// Error GL.INVALID_VALUE is generated if shader is not a value generated by
// OpenGL.  GL.INVALID_OPERATION is generated if shader is not a shader
// object.  GL.INVALID_OPERATION is generated if CompileShader is executed
// between the execution of Begin and the corresponding execution of End.
//
// CompileShader is available in GL version 2.0 or greater.
func (gl *GL) CompileShader(shader glbase.Shader) {
    C.gl4_1core_glCompileShader(gl.funcs, C.GLuint(shader))
}

// BindAttribLocation associates a user-defined attribute variable in the program
// object specified by program with a generic vertex attribute index. The name
// parameter specifies the name of the vertex shader attribute variable to
// which index is to be bound. When program is made part of the current state,
// values provided via the generic vertex attribute index will modify the
// value of the user-defined attribute variable specified by name.
//
// If name refers to a matrix attribute variable, index refers to the first
// column of the matrix. Other matrix columns are then automatically bound to
// locations index+1 for a matrix of type mat2; index+1 and index+2 for a
// matrix of type mat3; and index+1, index+2, and index+3 for a matrix of
// type mat4.
//
// This command makes it possible for vertex shaders to use descriptive names
// for attribute variables rather than generic variables that are numbered
// from 0 to GL.MAX_VERTEX_ATTRIBS-1. The values sent to each generic
// attribute index are part of current state, just like standard vertex
// attributes such as color, normal, and vertex position. If a different
// program object is made current by calling UseProgram, the generic vertex
// attributes are tracked in such a way that the same values will be observed
// by attributes in the new program object that are also bound to index.
//
// Attribute variable name-to-generic attribute index bindings for a program
// object can be explicitly assigned at any time by calling
// BindAttribLocation. Attribute bindings do not go into effect until
// LinkProgram is called. After a program object has been linked
// successfully, the index values for generic attributes remain fixed (and
// their values can be queried) until the next link command occurs.
//
// Applications are not allowed to bind any of the standard OpenGL vertex
// attributes using this command, as they are bound automatically when
// needed. Any attribute binding that occurs after the program object has
// been linked will not take effect until the next time the program object is
// linked.
//
// If name was bound previously, that information is lost. Thus you cannot
// bind one user-defined attribute variable to multiple indices, but you can
// bind multiple user-defined attribute variables to the same index.
//
// Applications are allowed to bind more than one user-defined attribute
// variable to the same generic vertex attribute index. This is called
// aliasing, and it is allowed only if just one of the aliased attributes is
// active in the executable program, or if no path through the shader
// consumes more than one attribute of a set of attributes aliased to the
// same location. The compiler and linker are allowed to assume that no
// aliasing is done and are free to employ optimizations that work only in
// the absence of aliasing. OpenGL implementations are not required to do
// error checking to detect aliasing. Because there is no way to bind
// standard attributes, it is not possible to alias generic attributes with
// conventional ones (except for generic attribute 0).
//
// BindAttribLocation can be called before any vertex shader objects are
// bound to the specified program object. It is also permissible to bind a
// generic attribute index to an attribute variable name that is never used
// in a vertex shader.
//
// Active attributes that are not explicitly bound will be bound by the
// linker when LinkProgram is called. The locations assigned can be queried
// by calling GetAttribLocation.
//
// Error GL.INVALID_VALUE is generated if index is greater than or equal to
// GL.MAX_VERTEX_ATTRIBS.
// GL.INVALID_OPERATION is generated if name starts with the reserved prefix "gl_".
// GL.INVALID_VALUE is generated if program is not a value generated by OpenGL.
// GL.INVALID_OPERATION is generated if program is not a program object.
// GL.INVALID_OPERATION is generated if BindAttribLocation is executed
// between the execution of Begin and the corresponding execution of End.
//
// BindAttribLocation is available in GL version 2.0 or greater.
func (gl *GL) BindAttribLocation(program glbase.Program, index glbase.Attrib, name string) {
    name_cstr := C.CString(name)
    C.gl4_1core_glBindAttribLocation(gl.funcs, C.GLuint(program), C.GLuint(index), (*C.GLchar)(name_cstr))
    C.free(unsafe.Pointer(name_cstr))
}

// AttachShader attaches a shader object to a program object.
//
// In order to create an executable, there must be a way to specify the list
// of things that will be linked together. Program objects provide this
// mechanism. Shaders that are to be linked together in a program object must
// first be attached to that program object. This indicates that shader will
// be included in link operations that will be performed on program.
//
// All operations that can be performed on a shader object are valid whether
// or not the shader object is attached to a program object. It is
// permissible to attach a shader object to a program object before source
// code has been loaded into the shader object or before the shader object
// has been compiled. It is permissible to attach multiple shader objects of
// the same type because each may contain a portion of the complete shader.
// It is also permissible to attach a shader object to more than one program
// object. If a shader object is deleted while it is attached to a program
// object, it will be flagged for deletion, and deletion will not occur until
// DetachShader is called to detach it from all program objects to which it
// is attached.
//
// Error GL.INVALID_VALUE is generated if either program or shader is not a
// value generated by OpenGL. GL.INVALID_OPERATION is generated if program
// is not a program object. GL.INVALID_OPERATION is generated if shader is
// not a shader object. GL.INVALID_OPERATION is generated if shader is
// already attached to program. GL.INVALID_OPERATION is generated if
// AttachShader is executed between the execution of Begin and the
// corresponding execution of End.
//
// AttachShader is available in GL version 2.0 or greater.
func (gl *GL) AttachShader(program glbase.Program, shader glbase.Shader) {
    C.gl4_1core_glAttachShader(gl.funcs, C.GLuint(program), C.GLuint(shader))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glStencilMaskSeparate.xml
func (gl *GL) StencilMaskSeparate(face glbase.Enum, mask uint32) {
    C.gl4_1core_glStencilMaskSeparate(gl.funcs, C.GLenum(face), C.GLuint(mask))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glStencilFuncSeparate.xml
func (gl *GL) StencilFuncSeparate(face, glfunc glbase.Enum, ref int32, mask uint32) {
    C.gl4_1core_glStencilFuncSeparate(gl.funcs, C.GLenum(face), C.GLenum(glfunc), C.GLint(ref), C.GLuint(mask))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glStencilOpSeparate.xml
func (gl *GL) StencilOpSeparate(face, sfail, dpfail, dppass glbase.Enum) {
    C.gl4_1core_glStencilOpSeparate(gl.funcs, C.GLenum(face), C.GLenum(sfail), C.GLenum(dpfail), C.GLenum(dppass))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDrawBuffers.xml
func (gl *GL) DrawBuffers(n int, bufs []glbase.Enum) {
    C.gl4_1core_glDrawBuffers(gl.funcs, C.GLsizei(n), (*C.GLenum)(unsafe.Pointer(&bufs[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBlendEquationSeparate.xml
func (gl *GL) BlendEquationSeparate(modeRGB, modeAlpha glbase.Enum) {
    C.gl4_1core_glBlendEquationSeparate(gl.funcs, C.GLenum(modeRGB), C.GLenum(modeAlpha))
}

// UniformMatrix4x3fv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// UniformMatrix4x3fv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions UniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv are used to
// modify a matrix or an array of matrices. The numbers in the function name
// are interpreted as the dimensionality of the matrix. The number 2
// indicates a 2x2 matrix (4 values), the number 3 indicates a 3x3 matrix (9
// values), and the number 4 indicates a 4x4 matrix (16 values). Non-square
// matrix dimensionality is explicit, with the first number representing the
// number of columns and the second number representing the number of rows.
// For example, 2x4 indicates a 2x4 matrix with 2 columns and 4 rows (8
// values). The length of the provided slice must be a multiple of the number
// of values per matrix, to update one or more consecutive matrices.
//
// If transpose is false, each matrix is assumed to be supplied in column
// major order. If transpose is true, each matrix is assumed to be supplied
// in row major order.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) UniformMatrix4x3fv(location glbase.Uniform, transpose bool, value []float32) {
    if len(value) == 0 {
        return
    }
    if len(value)%(4*3) != 0 {
        panic("invalid value length for UniformMatrix4x3fv")
    }
    count := len(value) / (4 * 3)
    C.gl4_1core_glUniformMatrix4x3fv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// UniformMatrix3x4fv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// UniformMatrix3x4fv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions UniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv are used to
// modify a matrix or an array of matrices. The numbers in the function name
// are interpreted as the dimensionality of the matrix. The number 2
// indicates a 2x2 matrix (4 values), the number 3 indicates a 3x3 matrix (9
// values), and the number 4 indicates a 4x4 matrix (16 values). Non-square
// matrix dimensionality is explicit, with the first number representing the
// number of columns and the second number representing the number of rows.
// For example, 2x4 indicates a 2x4 matrix with 2 columns and 4 rows (8
// values). The length of the provided slice must be a multiple of the number
// of values per matrix, to update one or more consecutive matrices.
//
// If transpose is false, each matrix is assumed to be supplied in column
// major order. If transpose is true, each matrix is assumed to be supplied
// in row major order.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) UniformMatrix3x4fv(location glbase.Uniform, transpose bool, value []float32) {
    if len(value) == 0 {
        return
    }
    if len(value)%(3*4) != 0 {
        panic("invalid value length for UniformMatrix3x4fv")
    }
    count := len(value) / (3 * 4)
    C.gl4_1core_glUniformMatrix3x4fv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// UniformMatrix4x2fv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// UniformMatrix4x2fv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions UniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv are used to
// modify a matrix or an array of matrices. The numbers in the function name
// are interpreted as the dimensionality of the matrix. The number 2
// indicates a 2x2 matrix (4 values), the number 3 indicates a 3x3 matrix (9
// values), and the number 4 indicates a 4x4 matrix (16 values). Non-square
// matrix dimensionality is explicit, with the first number representing the
// number of columns and the second number representing the number of rows.
// For example, 2x4 indicates a 2x4 matrix with 2 columns and 4 rows (8
// values). The length of the provided slice must be a multiple of the number
// of values per matrix, to update one or more consecutive matrices.
//
// If transpose is false, each matrix is assumed to be supplied in column
// major order. If transpose is true, each matrix is assumed to be supplied
// in row major order.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) UniformMatrix4x2fv(location glbase.Uniform, transpose bool, value []float32) {
    if len(value) == 0 {
        return
    }
    if len(value)%(4*2) != 0 {
        panic("invalid value length for UniformMatrix4x2fv")
    }
    count := len(value) / (4 * 2)
    C.gl4_1core_glUniformMatrix4x2fv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// UniformMatrix2x4fv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// UniformMatrix2x4fv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions UniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv are used to
// modify a matrix or an array of matrices. The numbers in the function name
// are interpreted as the dimensionality of the matrix. The number 2
// indicates a 2x2 matrix (4 values), the number 3 indicates a 3x3 matrix (9
// values), and the number 4 indicates a 4x4 matrix (16 values). Non-square
// matrix dimensionality is explicit, with the first number representing the
// number of columns and the second number representing the number of rows.
// For example, 2x4 indicates a 2x4 matrix with 2 columns and 4 rows (8
// values). The length of the provided slice must be a multiple of the number
// of values per matrix, to update one or more consecutive matrices.
//
// If transpose is false, each matrix is assumed to be supplied in column
// major order. If transpose is true, each matrix is assumed to be supplied
// in row major order.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) UniformMatrix2x4fv(location glbase.Uniform, transpose bool, value []float32) {
    if len(value) == 0 {
        return
    }
    if len(value)%(2*4) != 0 {
        panic("invalid value length for UniformMatrix2x4fv")
    }
    count := len(value) / (2 * 4)
    C.gl4_1core_glUniformMatrix2x4fv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// UniformMatrix3x2fv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// UniformMatrix3x2fv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions UniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv are used to
// modify a matrix or an array of matrices. The numbers in the function name
// are interpreted as the dimensionality of the matrix. The number 2
// indicates a 2x2 matrix (4 values), the number 3 indicates a 3x3 matrix (9
// values), and the number 4 indicates a 4x4 matrix (16 values). Non-square
// matrix dimensionality is explicit, with the first number representing the
// number of columns and the second number representing the number of rows.
// For example, 2x4 indicates a 2x4 matrix with 2 columns and 4 rows (8
// values). The length of the provided slice must be a multiple of the number
// of values per matrix, to update one or more consecutive matrices.
//
// If transpose is false, each matrix is assumed to be supplied in column
// major order. If transpose is true, each matrix is assumed to be supplied
// in row major order.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) UniformMatrix3x2fv(location glbase.Uniform, transpose bool, value []float32) {
    if len(value) == 0 {
        return
    }
    if len(value)%(3*2) != 0 {
        panic("invalid value length for UniformMatrix3x2fv")
    }
    count := len(value) / (3 * 2)
    C.gl4_1core_glUniformMatrix3x2fv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// UniformMatrix2x3fv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// UniformMatrix2x3fv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions UniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv are used to
// modify a matrix or an array of matrices. The numbers in the function name
// are interpreted as the dimensionality of the matrix. The number 2
// indicates a 2x2 matrix (4 values), the number 3 indicates a 3x3 matrix (9
// values), and the number 4 indicates a 4x4 matrix (16 values). Non-square
// matrix dimensionality is explicit, with the first number representing the
// number of columns and the second number representing the number of rows.
// For example, 2x4 indicates a 2x4 matrix with 2 columns and 4 rows (8
// values). The length of the provided slice must be a multiple of the number
// of values per matrix, to update one or more consecutive matrices.
//
// If transpose is false, each matrix is assumed to be supplied in column
// major order. If transpose is true, each matrix is assumed to be supplied
// in row major order.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) UniformMatrix2x3fv(location glbase.Uniform, transpose bool, value []float32) {
    if len(value) == 0 {
        return
    }
    if len(value)%(2*3) != 0 {
        panic("invalid value length for UniformMatrix2x3fv")
    }
    count := len(value) / (2 * 3)
    C.gl4_1core_glUniformMatrix2x3fv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glIsVertexArray.xml
func (gl *GL) IsVertexArray(array uint32) bool {
    glresult := C.gl4_1core_glIsVertexArray(gl.funcs, C.GLuint(array))
    return *(*bool)(unsafe.Pointer(&glresult))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGenVertexArrays.xml
func (gl *GL) GenVertexArrays(n int, arrays []uint32) {
    C.gl4_1core_glGenVertexArrays(gl.funcs, C.GLsizei(n), (*C.GLuint)(unsafe.Pointer(&arrays[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDeleteVertexArrays.xml
func (gl *GL) DeleteVertexArrays(n int, arrays []uint32) {
    C.gl4_1core_glDeleteVertexArrays(gl.funcs, C.GLsizei(n), (*C.GLuint)(unsafe.Pointer(&arrays[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBindVertexArray.xml
func (gl *GL) BindVertexArray(array uint32) {
    C.gl4_1core_glBindVertexArray(gl.funcs, C.GLuint(array))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glFlushMappedBufferRange.xml
func (gl *GL) FlushMappedBufferRange(target glbase.Enum, offset, length int) {
    C.gl4_1core_glFlushMappedBufferRange(gl.funcs, C.GLenum(target), C.GLintptr(offset), C.GLsizeiptr(length))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glFramebufferTextureLayer.xml
func (gl *GL) FramebufferTextureLayer(target, attachment glbase.Enum, texture glbase.Texture, level int, layer int32) {
    C.gl4_1core_glFramebufferTextureLayer(gl.funcs, C.GLenum(target), C.GLenum(attachment), C.GLuint(texture), C.GLint(level), C.GLint(layer))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glRenderbufferStorageMultisample.xml
func (gl *GL) RenderbufferStorageMultisample(target glbase.Enum, samples int32, internalFormat glbase.Enum, width, height int) {
    C.gl4_1core_glRenderbufferStorageMultisample(gl.funcs, C.GLenum(target), C.GLsizei(samples), C.GLenum(internalFormat), C.GLsizei(width), C.GLsizei(height))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBlitFramebuffer.xml
func (gl *GL) BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1 int32, mask glbase.Bitfield, filter glbase.Enum) {
    C.gl4_1core_glBlitFramebuffer(gl.funcs, C.GLint(srcX0), C.GLint(srcY0), C.GLint(srcX1), C.GLint(srcY1), C.GLint(dstX0), C.GLint(dstY0), C.GLint(dstX1), C.GLint(dstY1), C.GLbitfield(mask), C.GLenum(filter))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGenerateMipmap.xml
func (gl *GL) GenerateMipmap(target glbase.Enum) {
    C.gl4_1core_glGenerateMipmap(gl.funcs, C.GLenum(target))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetFramebufferAttachmentParameteriv.xml
func (gl *GL) GetFramebufferAttachmentParameteriv(target, attachment, pname glbase.Enum, params []int32) {
    C.gl4_1core_glGetFramebufferAttachmentParameteriv(gl.funcs, C.GLenum(target), C.GLenum(attachment), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glFramebufferRenderbuffer.xml
func (gl *GL) FramebufferRenderbuffer(target, attachment, renderbuffertarget glbase.Enum, renderbuffer glbase.Renderbuffer) {
    C.gl4_1core_glFramebufferRenderbuffer(gl.funcs, C.GLenum(target), C.GLenum(attachment), C.GLenum(renderbuffertarget), C.GLuint(renderbuffer))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glFramebufferTexture3D.xml
func (gl *GL) FramebufferTexture3D(target, attachment, textarget glbase.Enum, texture glbase.Texture, level int, zoffset int32) {
    C.gl4_1core_glFramebufferTexture3D(gl.funcs, C.GLenum(target), C.GLenum(attachment), C.GLenum(textarget), C.GLuint(texture), C.GLint(level), C.GLint(zoffset))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glFramebufferTexture2D.xml
func (gl *GL) FramebufferTexture2D(target, attachment, textarget glbase.Enum, texture glbase.Texture, level int) {
    C.gl4_1core_glFramebufferTexture2D(gl.funcs, C.GLenum(target), C.GLenum(attachment), C.GLenum(textarget), C.GLuint(texture), C.GLint(level))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glFramebufferTexture1D.xml
func (gl *GL) FramebufferTexture1D(target, attachment, textarget glbase.Enum, texture glbase.Texture, level int) {
    C.gl4_1core_glFramebufferTexture1D(gl.funcs, C.GLenum(target), C.GLenum(attachment), C.GLenum(textarget), C.GLuint(texture), C.GLint(level))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glCheckFramebufferStatus.xml
func (gl *GL) CheckFramebufferStatus(target glbase.Enum) glbase.Enum {
    glresult := C.gl4_1core_glCheckFramebufferStatus(gl.funcs, C.GLenum(target))
    return glbase.Enum(glresult)
}

// GenFramebuffers returns n framebuffer object names in ids. There is no
// guarantee that the names form a contiguous set of integers; however, it is
// guaranteed that none of the returned names was in use immediately before
// the call to GenFramebuffers.
//
// Framebuffer object names returned by a call to GenFramebuffers are not
// returned by subsequent calls, unless they are first deleted with
// DeleteFramebuffers.
//
// The names returned in ids are marked as used, for the purposes of
// GenFramebuffers only, but they acquire state and type only when they are
// first bound.
//
// Error GL.INVALID_VALUE is generated if n is negative.
func (gl *GL) GenFramebuffers(n int) []glbase.Framebuffer {
    if n == 0 {
        return nil
    }
    framebuffers := make([]glbase.Framebuffer, n)
    C.gl4_1core_glGenFramebuffers(gl.funcs, C.GLsizei(n), (*C.GLuint)(unsafe.Pointer(&framebuffers[0])))
    return framebuffers
}

// DeleteFramebuffers deletes the framebuffer objects whose names are
// stored in the framebuffers slice. The name zero is reserved by the GL and
// is silently ignored, should it occur in framebuffers, as are other unused
// names. Once a framebuffer object is deleted, its name is again unused and
// it has no attachments. If a framebuffer that is currently bound to one or
// more of the targets GL.DRAW_FRAMEBUFFER or GL.READ_FRAMEBUFFER is deleted,
// it is as though BindFramebuffer had been executed with the corresponding
// target and framebuffer zero.
//
// Error GL.INVALID_VALUE is generated if n is negative.
//
// DeleteFramebuffers is available in GL version 3.0 or greater.
func (gl *GL) DeleteFramebuffers(framebuffers []glbase.Framebuffer) {
    n := len(framebuffers)
    if n == 0 {
        return
    }
    C.gl4_1core_glDeleteFramebuffers(gl.funcs, C.GLsizei(n), (*C.GLuint)(unsafe.Pointer(&framebuffers[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBindFramebuffer.xml
func (gl *GL) BindFramebuffer(target glbase.Enum, framebuffer glbase.Framebuffer) {
    C.gl4_1core_glBindFramebuffer(gl.funcs, C.GLenum(target), C.GLuint(framebuffer))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glIsFramebuffer.xml
func (gl *GL) IsFramebuffer(framebuffer glbase.Framebuffer) bool {
    glresult := C.gl4_1core_glIsFramebuffer(gl.funcs, C.GLuint(framebuffer))
    return *(*bool)(unsafe.Pointer(&glresult))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetRenderbufferParameteriv.xml
func (gl *GL) GetRenderbufferParameteriv(target, pname glbase.Enum, params []int32) {
    C.gl4_1core_glGetRenderbufferParameteriv(gl.funcs, C.GLenum(target), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glRenderbufferStorage.xml
func (gl *GL) RenderbufferStorage(target, internalFormat glbase.Enum, width, height int) {
    C.gl4_1core_glRenderbufferStorage(gl.funcs, C.GLenum(target), C.GLenum(internalFormat), C.GLsizei(width), C.GLsizei(height))
}

// GenRenderbuffers returns n renderbuffer object names in renderbuffers.
// There is no guarantee that the names form a contiguous set of integers;
// however, it is guaranteed that none of the returned names was in use
// immediately before the call to GenRenderbuffers.
//
// Renderbuffer object names returned by a call to GenRenderbuffers are not
// returned by subsequent calls, unless they are first deleted with
// DeleteRenderbuffers.
//
// The names returned in renderbuffers are marked as used, for the purposes
// of GenRenderbuffers only, but they acquire state and type only when they
// are first bound.
//
// Error GL.INVALID_VALUE is generated if n is negative.
//
// GenRenderbuffers is available in GL version 3.0 or greater.
func (gl *GL) GenRenderbuffers(n int) []glbase.Renderbuffer {
    if n == 0 {
        return nil
    }
    renderbuffers := make([]glbase.Renderbuffer, n)
    C.gl4_1core_glGenRenderbuffers(gl.funcs, C.GLsizei(n), (*C.GLuint)(unsafe.Pointer(&renderbuffers[0])))
    return renderbuffers
}

// DeleteRenderbuffers deletes the renderbuffer objects whose names are stored
// in the renderbuffers slice. The name zero is reserved by the GL and
// is silently ignored, should it occur in renderbuffers, as are other unused
// names. Once a renderbuffer object is deleted, its name is again unused and
// it has no contents. If a renderbuffer that is currently bound to the
// target GL.RENDERBUFFER is deleted, it is as though BindRenderbuffer had
// been executed with a target of GL.RENDERBUFFER and a name of zero.
//
// If a renderbuffer object is attached to one or more attachment points in
// the currently bound framebuffer, then it as if FramebufferRenderbuffer
// had been called, with a renderbuffer of zero for each attachment point to
// which this image was attached in the currently bound framebuffer. In other
// words, this renderbuffer object is first detached from all attachment
// ponits in the currently bound framebuffer. Note that the renderbuffer
// image is specifically not detached from any non-bound framebuffers.
//
// Error GL.INVALID_VALUE is generated if n is negative.
//
// DeleteRenderbuffers is available in GL version 3.0 or greater.
func (gl *GL) DeleteRenderbuffers(renderbuffers []glbase.Renderbuffer) {
    n := len(renderbuffers)
    if n == 0 {
        return
    }
    C.gl4_1core_glDeleteRenderbuffers(gl.funcs, C.GLsizei(n), (*C.GLuint)(unsafe.Pointer(&renderbuffers[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBindRenderbuffer.xml
func (gl *GL) BindRenderbuffer(target glbase.Enum, renderbuffer glbase.Renderbuffer) {
    C.gl4_1core_glBindRenderbuffer(gl.funcs, C.GLenum(target), C.GLuint(renderbuffer))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glIsRenderbuffer.xml
func (gl *GL) IsRenderbuffer(renderbuffer glbase.Renderbuffer) bool {
    glresult := C.gl4_1core_glIsRenderbuffer(gl.funcs, C.GLuint(renderbuffer))
    return *(*bool)(unsafe.Pointer(&glresult))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glClearBufferfi.xml
func (gl *GL) ClearBufferfi(buffer glbase.Enum, drawbuffer int32, depth float32, stencil int32) {
    C.gl4_1core_glClearBufferfi(gl.funcs, C.GLenum(buffer), C.GLint(drawbuffer), C.GLfloat(depth), C.GLint(stencil))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glClearBufferfv.xml
func (gl *GL) ClearBufferfv(buffer glbase.Enum, drawbuffer int32, value []float32) {
    C.gl4_1core_glClearBufferfv(gl.funcs, C.GLenum(buffer), C.GLint(drawbuffer), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glClearBufferuiv.xml
func (gl *GL) ClearBufferuiv(buffer glbase.Enum, drawbuffer int32, value []uint32) {
    C.gl4_1core_glClearBufferuiv(gl.funcs, C.GLenum(buffer), C.GLint(drawbuffer), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glClearBufferiv.xml
func (gl *GL) ClearBufferiv(buffer glbase.Enum, drawbuffer int32, value []int32) {
    C.gl4_1core_glClearBufferiv(gl.funcs, C.GLenum(buffer), C.GLint(drawbuffer), (*C.GLint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetTexParameterIuiv.xml
func (gl *GL) GetTexParameterIuiv(target, pname glbase.Enum, params []uint32) {
    C.gl4_1core_glGetTexParameterIuiv(gl.funcs, C.GLenum(target), C.GLenum(pname), (*C.GLuint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetTexParameterIiv.xml
func (gl *GL) GetTexParameterIiv(target, pname glbase.Enum, params []int32) {
    C.gl4_1core_glGetTexParameterIiv(gl.funcs, C.GLenum(target), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexParameterIuiv.xml
func (gl *GL) TexParameterIuiv(target, pname glbase.Enum, params []uint32) {
    C.gl4_1core_glTexParameterIuiv(gl.funcs, C.GLenum(target), C.GLenum(pname), (*C.GLuint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexParameterIiv.xml
func (gl *GL) TexParameterIiv(target, pname glbase.Enum, params []int32) {
    C.gl4_1core_glTexParameterIiv(gl.funcs, C.GLenum(target), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// Uniform4uiv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// Uniform4uiv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui}v can be used to modify a single
// uniform variable or a uniform variable array. These functions receive a
// slice with the values to be loaded into a uniform variable or a uniform
// variable array. A slice with length 1 should be used if modifying the value
// of a single uniform variable, and a length of 1 or greater can be used to
// modify an entire array or part of an array. When loading n elements
// starting at an arbitrary position m in a uniform variable array, elements
// m + n - 1 in the array will be replaced with the new values. If m + n - 1
// is larger than the size of the uniform variable array, values for all
// array elements beyond the end of the array will be ignored. The number
// specified in the name of the command indicates the number of components
// for each element in value, and it should match the number of components in
// the data type of the specified uniform variable (1 for float, int, bool;
// 2 for vec2, ivec2, bvec2, etc.). The data type specified in the name
// of the command must match the data type for the specified uniform variable
// as described for Uniform{1|2|3|4}{f|i|ui}.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform4uiv(location glbase.Uniform, value []uint32) {
    if len(value) == 0 {
        return
    }
    if len(value)%4 != 0 {
        panic("invalid value length for Uniform4uiv")
    }
    count := len(value) / 4
    C.gl4_1core_glUniform4uiv(gl.funcs, C.GLint(location), C.GLsizei(count), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// Uniform3uiv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// Uniform3uiv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui}v can be used to modify a single
// uniform variable or a uniform variable array. These functions receive a
// slice with the values to be loaded into a uniform variable or a uniform
// variable array. A slice with length 1 should be used if modifying the value
// of a single uniform variable, and a length of 1 or greater can be used to
// modify an entire array or part of an array. When loading n elements
// starting at an arbitrary position m in a uniform variable array, elements
// m + n - 1 in the array will be replaced with the new values. If m + n - 1
// is larger than the size of the uniform variable array, values for all
// array elements beyond the end of the array will be ignored. The number
// specified in the name of the command indicates the number of components
// for each element in value, and it should match the number of components in
// the data type of the specified uniform variable (1 for float, int, bool;
// 2 for vec2, ivec2, bvec2, etc.). The data type specified in the name
// of the command must match the data type for the specified uniform variable
// as described for Uniform{1|2|3|4}{f|i|ui}.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform3uiv(location glbase.Uniform, value []uint32) {
    if len(value) == 0 {
        return
    }
    if len(value)%3 != 0 {
        panic("invalid value length for Uniform3uiv")
    }
    count := len(value) / 3
    C.gl4_1core_glUniform3uiv(gl.funcs, C.GLint(location), C.GLsizei(count), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// Uniform2uiv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// Uniform2uiv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui}v can be used to modify a single
// uniform variable or a uniform variable array. These functions receive a
// slice with the values to be loaded into a uniform variable or a uniform
// variable array. A slice with length 1 should be used if modifying the value
// of a single uniform variable, and a length of 1 or greater can be used to
// modify an entire array or part of an array. When loading n elements
// starting at an arbitrary position m in a uniform variable array, elements
// m + n - 1 in the array will be replaced with the new values. If m + n - 1
// is larger than the size of the uniform variable array, values for all
// array elements beyond the end of the array will be ignored. The number
// specified in the name of the command indicates the number of components
// for each element in value, and it should match the number of components in
// the data type of the specified uniform variable (1 for float, int, bool;
// 2 for vec2, ivec2, bvec2, etc.). The data type specified in the name
// of the command must match the data type for the specified uniform variable
// as described for Uniform{1|2|3|4}{f|i|ui}.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform2uiv(location glbase.Uniform, value []uint32) {
    if len(value) == 0 {
        return
    }
    if len(value)%2 != 0 {
        panic("invalid value length for Uniform2uiv")
    }
    count := len(value) / 2
    C.gl4_1core_glUniform2uiv(gl.funcs, C.GLint(location), C.GLsizei(count), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// Uniform1uiv modifies the value of a uniform variable or a uniform
// variable array. The location of the uniform variable to be modified is
// specified by location, which should be a value returned by GetUniformLocation.
// Uniform1uiv operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui}v can be used to modify a single
// uniform variable or a uniform variable array. These functions receive a
// slice with the values to be loaded into a uniform variable or a uniform
// variable array. A slice with length 1 should be used if modifying the value
// of a single uniform variable, and a length of 1 or greater can be used to
// modify an entire array or part of an array. When loading n elements
// starting at an arbitrary position m in a uniform variable array, elements
// m + n - 1 in the array will be replaced with the new values. If m + n - 1
// is larger than the size of the uniform variable array, values for all
// array elements beyond the end of the array will be ignored. The number
// specified in the name of the command indicates the number of components
// for each element in value, and it should match the number of components in
// the data type of the specified uniform variable (1 for float, int, bool;
// 2 for vec2, ivec2, bvec2, etc.). The data type specified in the name
// of the command must match the data type for the specified uniform variable
// as described for Uniform{1|2|3|4}{f|i|ui}.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform1uiv(location glbase.Uniform, value []uint32) {
    if len(value) == 0 {
        return
    }
    count := len(value)
    C.gl4_1core_glUniform1uiv(gl.funcs, C.GLint(location), C.GLsizei(count), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// Uniform4ui modifies the value of a single uniform variable.
// The location of the uniform variable to be modified is specified by
// location, which should be a value returned by GetUniformLocation.
// Uniform4ui operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui} are used to change the value of the
// uniform variable specified by location using the values passed as
// arguments. The number specified in the function should match the number of
// components in the data type of the specified uniform variable (1 for
// float, int, unsigned int, bool; 2 for vec2, ivec2, uvec2, bvec2, etc.).
// The suffix f indicates that floating-point values are being passed; the
// suffix i indicates that integer values are being passed; the suffix ui
// indicates that unsigned integer values are being passed, and this type
// should also match the data type of the specified uniform variable. The i
// variants of this function should be used to provide values for uniform
// variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The ui
// variants of this function should be used to provide values for uniform
// variables defined as unsigned int, uvec2, uvec3, uvec4, or arrays of
// these. The f variants should be used to provide values for uniform
// variables of type float, vec2, vec3, vec4, or arrays of these. Either the
// i, ui or f variants may be used to provide values for uniform variables of
// type bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable
// will be set to false if the input value is 0 or 0.0f, and it will be set
// to true otherwise.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform4ui(location glbase.Uniform, v0, v1, v2, v3 uint32) {
    C.gl4_1core_glUniform4ui(gl.funcs, C.GLint(location), C.GLuint(v0), C.GLuint(v1), C.GLuint(v2), C.GLuint(v3))
}

// Uniform3ui modifies the value of a single uniform variable.
// The location of the uniform variable to be modified is specified by
// location, which should be a value returned by GetUniformLocation.
// Uniform3ui operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui} are used to change the value of the
// uniform variable specified by location using the values passed as
// arguments. The number specified in the function should match the number of
// components in the data type of the specified uniform variable (1 for
// float, int, unsigned int, bool; 2 for vec2, ivec2, uvec2, bvec2, etc.).
// The suffix f indicates that floating-point values are being passed; the
// suffix i indicates that integer values are being passed; the suffix ui
// indicates that unsigned integer values are being passed, and this type
// should also match the data type of the specified uniform variable. The i
// variants of this function should be used to provide values for uniform
// variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The ui
// variants of this function should be used to provide values for uniform
// variables defined as unsigned int, uvec2, uvec3, uvec4, or arrays of
// these. The f variants should be used to provide values for uniform
// variables of type float, vec2, vec3, vec4, or arrays of these. Either the
// i, ui or f variants may be used to provide values for uniform variables of
// type bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable
// will be set to false if the input value is 0 or 0.0f, and it will be set
// to true otherwise.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform3ui(location glbase.Uniform, v0, v1, v2 uint32) {
    C.gl4_1core_glUniform3ui(gl.funcs, C.GLint(location), C.GLuint(v0), C.GLuint(v1), C.GLuint(v2))
}

// Uniform2ui modifies the value of a single uniform variable.
// The location of the uniform variable to be modified is specified by
// location, which should be a value returned by GetUniformLocation.
// Uniform2ui operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui} are used to change the value of the
// uniform variable specified by location using the values passed as
// arguments. The number specified in the function should match the number of
// components in the data type of the specified uniform variable (1 for
// float, int, unsigned int, bool; 2 for vec2, ivec2, uvec2, bvec2, etc.).
// The suffix f indicates that floating-point values are being passed; the
// suffix i indicates that integer values are being passed; the suffix ui
// indicates that unsigned integer values are being passed, and this type
// should also match the data type of the specified uniform variable. The i
// variants of this function should be used to provide values for uniform
// variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The ui
// variants of this function should be used to provide values for uniform
// variables defined as unsigned int, uvec2, uvec3, uvec4, or arrays of
// these. The f variants should be used to provide values for uniform
// variables of type float, vec2, vec3, vec4, or arrays of these. Either the
// i, ui or f variants may be used to provide values for uniform variables of
// type bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable
// will be set to false if the input value is 0 or 0.0f, and it will be set
// to true otherwise.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform2ui(location glbase.Uniform, v0, v1 uint32) {
    C.gl4_1core_glUniform2ui(gl.funcs, C.GLint(location), C.GLuint(v0), C.GLuint(v1))
}

// Uniform1ui modifies the value of a single uniform variable.
// The location of the uniform variable to be modified is specified by
// location, which should be a value returned by GetUniformLocation.
// Uniform1ui operates on the program object that was made part of
// current state by calling UseProgram.
//
// The functions Uniform{1|2|3|4}{f|i|ui} are used to change the value of the
// uniform variable specified by location using the values passed as
// arguments. The number specified in the function should match the number of
// components in the data type of the specified uniform variable (1 for
// float, int, unsigned int, bool; 2 for vec2, ivec2, uvec2, bvec2, etc.).
// The suffix f indicates that floating-point values are being passed; the
// suffix i indicates that integer values are being passed; the suffix ui
// indicates that unsigned integer values are being passed, and this type
// should also match the data type of the specified uniform variable. The i
// variants of this function should be used to provide values for uniform
// variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The ui
// variants of this function should be used to provide values for uniform
// variables defined as unsigned int, uvec2, uvec3, uvec4, or arrays of
// these. The f variants should be used to provide values for uniform
// variables of type float, vec2, vec3, vec4, or arrays of these. Either the
// i, ui or f variants may be used to provide values for uniform variables of
// type bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable
// will be set to false if the input value is 0 or 0.0f, and it will be set
// to true otherwise.
//
// Uniform1i and Uniform1iv are the only two functions that may be used to
// load uniform variables defined as sampler types. Loading samplers with any
// other function will result in a GL.INVALID_OPERATION error.
//
// All active uniform variables defined in a program object are initialized
// to 0 when the program object is linked successfully. They retain the
// values assigned to them by a call to Uniform* until the next successful
// link operation occurs on the program object, when they are once again
// initialized to 0.
func (gl *GL) Uniform1ui(location glbase.Uniform, v0 uint32) {
    C.gl4_1core_glUniform1ui(gl.funcs, C.GLint(location), C.GLuint(v0))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetFragDataLocation.xml
func (gl *GL) GetFragDataLocation(program glbase.Program, name []byte) int32 {
    glresult := C.gl4_1core_glGetFragDataLocation(gl.funcs, C.GLuint(program), (*C.GLchar)(unsafe.Pointer(&name[0])))
    return int32(glresult)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBindFragDataLocation.xml
func (gl *GL) BindFragDataLocation(program glbase.Program, color uint32, name []byte) {
    C.gl4_1core_glBindFragDataLocation(gl.funcs, C.GLuint(program), C.GLuint(color), (*C.GLchar)(unsafe.Pointer(&name[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetUniformuiv.xml
func (gl *GL) GetUniformuiv(program glbase.Program, location glbase.Uniform, params []uint32) {
    C.gl4_1core_glGetUniformuiv(gl.funcs, C.GLuint(program), C.GLint(location), (*C.GLuint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetVertexAttribIuiv.xml
func (gl *GL) GetVertexAttribIuiv(index glbase.Attrib, pname glbase.Enum, params []uint32) {
    C.gl4_1core_glGetVertexAttribIuiv(gl.funcs, C.GLuint(index), C.GLenum(pname), (*C.GLuint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetVertexAttribIiv.xml
func (gl *GL) GetVertexAttribIiv(index glbase.Attrib, pname glbase.Enum, params []int32) {
    C.gl4_1core_glGetVertexAttribIiv(gl.funcs, C.GLuint(index), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribIPointer.xml
func (gl *GL) VertexAttribIPointer(index glbase.Attrib, size int, gltype glbase.Enum, stride int, pointer interface{}) {
    var pointer_ptr unsafe.Pointer
    var pointer_v = reflect.ValueOf(pointer)
    if pointer != nil && pointer_v.Kind() != reflect.Slice {
        panic("parameter pointer must be a slice")
    }
    if pointer != nil {
        pointer_ptr = unsafe.Pointer(pointer_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glVertexAttribIPointer(gl.funcs, C.GLuint(index), C.GLint(size), C.GLenum(gltype), C.GLsizei(stride), pointer_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glEndConditionalRender.xml
func (gl *GL) EndConditionalRender() {
    C.gl4_1core_glEndConditionalRender(gl.funcs)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBeginConditionalRender.xml
func (gl *GL) BeginConditionalRender(id uint32, mode glbase.Enum) {
    C.gl4_1core_glBeginConditionalRender(gl.funcs, C.GLuint(id), C.GLenum(mode))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glClampColor.xml
func (gl *GL) ClampColor(target, clamp glbase.Enum) {
    C.gl4_1core_glClampColor(gl.funcs, C.GLenum(target), C.GLenum(clamp))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetTransformFeedbackVarying.xml
func (gl *GL) GetTransformFeedbackVarying(program glbase.Program, index uint32, bufSize int32, length []int32, size []int, gltype []glbase.Enum, name []byte) {
    C.gl4_1core_glGetTransformFeedbackVarying(gl.funcs, C.GLuint(program), C.GLuint(index), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLsizei)(unsafe.Pointer(&size[0])), (*C.GLenum)(unsafe.Pointer(&gltype[0])), (*C.GLchar)(unsafe.Pointer(&name[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBindBufferBase.xml
func (gl *GL) BindBufferBase(target glbase.Enum, index uint32, buffer glbase.Buffer) {
    C.gl4_1core_glBindBufferBase(gl.funcs, C.GLenum(target), C.GLuint(index), C.GLuint(buffer))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBindBufferRange.xml
func (gl *GL) BindBufferRange(target glbase.Enum, index uint32, buffer glbase.Buffer, offset, size int) {
    C.gl4_1core_glBindBufferRange(gl.funcs, C.GLenum(target), C.GLuint(index), C.GLuint(buffer), C.GLintptr(offset), C.GLsizeiptr(size))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glEndTransformFeedback.xml
func (gl *GL) EndTransformFeedback() {
    C.gl4_1core_glEndTransformFeedback(gl.funcs)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBeginTransformFeedback.xml
func (gl *GL) BeginTransformFeedback(primitiveMode glbase.Enum) {
    C.gl4_1core_glBeginTransformFeedback(gl.funcs, C.GLenum(primitiveMode))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glIsEnabledi.xml
func (gl *GL) IsEnabledi(target glbase.Enum, index uint32) bool {
    glresult := C.gl4_1core_glIsEnabledi(gl.funcs, C.GLenum(target), C.GLuint(index))
    return *(*bool)(unsafe.Pointer(&glresult))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDisablei.xml
func (gl *GL) Disablei(target glbase.Enum, index uint32) {
    C.gl4_1core_glDisablei(gl.funcs, C.GLenum(target), C.GLuint(index))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glEnablei.xml
func (gl *GL) Enablei(target glbase.Enum, index uint32) {
    C.gl4_1core_glEnablei(gl.funcs, C.GLenum(target), C.GLuint(index))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetIntegeri_v.xml
func (gl *GL) GetIntegeri_v(target glbase.Enum, index uint32, data []int32) {
    C.gl4_1core_glGetIntegeri_v(gl.funcs, C.GLenum(target), C.GLuint(index), (*C.GLint)(unsafe.Pointer(&data[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetBooleani_v.xml
func (gl *GL) GetBooleani_v(target glbase.Enum, index uint32, data []bool) {
    C.gl4_1core_glGetBooleani_v(gl.funcs, C.GLenum(target), C.GLuint(index), (*C.GLboolean)(unsafe.Pointer(&data[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glColorMaski.xml
func (gl *GL) ColorMaski(index uint32, r, g, b, a bool) {
    C.gl4_1core_glColorMaski(gl.funcs, C.GLuint(index), *(*C.GLboolean)(unsafe.Pointer(&r)), *(*C.GLboolean)(unsafe.Pointer(&g)), *(*C.GLboolean)(unsafe.Pointer(&b)), *(*C.GLboolean)(unsafe.Pointer(&a)))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glCopyBufferSubData.xml
func (gl *GL) CopyBufferSubData(readTarget, writeTarget glbase.Enum, readOffset, writeOffset, size int) {
    C.gl4_1core_glCopyBufferSubData(gl.funcs, C.GLenum(readTarget), C.GLenum(writeTarget), C.GLintptr(readOffset), C.GLintptr(writeOffset), C.GLsizeiptr(size))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniformBlockBinding.xml
func (gl *GL) UniformBlockBinding(program glbase.Program, v0, v1 uint32) {
    C.gl4_1core_glUniformBlockBinding(gl.funcs, C.GLuint(program), C.GLuint(v0), C.GLuint(v1))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformBlockName.xml
func (gl *GL) GetActiveUniformBlockName(program glbase.Program, uniformBlockIndex uint32, bufSize int32, length []int32, uniformBlockName []byte) {
    C.gl4_1core_glGetActiveUniformBlockName(gl.funcs, C.GLuint(program), C.GLuint(uniformBlockIndex), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLchar)(unsafe.Pointer(&uniformBlockName[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformBlockiv.xml
func (gl *GL) GetActiveUniformBlockiv(program glbase.Program, uniformBlockIndex uint32, pname glbase.Enum, params []int32) {
    C.gl4_1core_glGetActiveUniformBlockiv(gl.funcs, C.GLuint(program), C.GLuint(uniformBlockIndex), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetUniformBlockIndex.xml
func (gl *GL) GetUniformBlockIndex(program glbase.Program, uniformBlockName []byte) uint32 {
    glresult := C.gl4_1core_glGetUniformBlockIndex(gl.funcs, C.GLuint(program), (*C.GLchar)(unsafe.Pointer(&uniformBlockName[0])))
    return uint32(glresult)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformName.xml
func (gl *GL) GetActiveUniformName(program glbase.Program, uniformIndex uint32, bufSize int32, length []int32, uniformName []byte) {
    C.gl4_1core_glGetActiveUniformName(gl.funcs, C.GLuint(program), C.GLuint(uniformIndex), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLchar)(unsafe.Pointer(&uniformName[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformsiv.xml
func (gl *GL) GetActiveUniformsiv(program glbase.Program, uniformCount int32, uniformIndices []uint32, pname glbase.Enum, params []int32) {
    C.gl4_1core_glGetActiveUniformsiv(gl.funcs, C.GLuint(program), C.GLsizei(uniformCount), (*C.GLuint)(unsafe.Pointer(&uniformIndices[0])), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glPrimitiveRestartIndex.xml
func (gl *GL) PrimitiveRestartIndex(index uint32) {
    C.gl4_1core_glPrimitiveRestartIndex(gl.funcs, C.GLuint(index))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexBuffer.xml
func (gl *GL) TexBuffer(target, internalFormat glbase.Enum, buffer glbase.Buffer) {
    C.gl4_1core_glTexBuffer(gl.funcs, C.GLenum(target), C.GLenum(internalFormat), C.GLuint(buffer))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDrawElementsInstanced.xml
func (gl *GL) DrawElementsInstanced(mode glbase.Enum, count int, gltype glbase.Enum, indices interface{}, instancecount int32) {
    var indices_ptr unsafe.Pointer
    var indices_v = reflect.ValueOf(indices)
    if indices != nil && indices_v.Kind() != reflect.Slice {
        panic("parameter indices must be a slice")
    }
    if indices != nil {
        indices_ptr = unsafe.Pointer(indices_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glDrawElementsInstanced(gl.funcs, C.GLenum(mode), C.GLsizei(count), C.GLenum(gltype), indices_ptr, C.GLsizei(instancecount))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDrawArraysInstanced.xml
func (gl *GL) DrawArraysInstanced(mode glbase.Enum, first, count int, instancecount int32) {
    C.gl4_1core_glDrawArraysInstanced(gl.funcs, C.GLenum(mode), C.GLint(first), C.GLsizei(count), C.GLsizei(instancecount))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glSampleMaski.xml
func (gl *GL) SampleMaski(index uint32, mask glbase.Bitfield) {
    C.gl4_1core_glSampleMaski(gl.funcs, C.GLuint(index), C.GLbitfield(mask))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetMultisamplefv.xml
func (gl *GL) GetMultisamplefv(pname glbase.Enum, index uint32, val []float32) {
    C.gl4_1core_glGetMultisamplefv(gl.funcs, C.GLenum(pname), C.GLuint(index), (*C.GLfloat)(unsafe.Pointer(&val[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexImage3DMultisample.xml
func (gl *GL) TexImage3DMultisample(target glbase.Enum, samples, internalFormat int32, width, height int, depth int32, fixedsamplelocations bool) {
    C.gl4_1core_glTexImage3DMultisample(gl.funcs, C.GLenum(target), C.GLsizei(samples), C.GLint(internalFormat), C.GLsizei(width), C.GLsizei(height), C.GLsizei(depth), *(*C.GLboolean)(unsafe.Pointer(&fixedsamplelocations)))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexImage2DMultisample.xml
func (gl *GL) TexImage2DMultisample(target glbase.Enum, samples, internalFormat int32, width, height int, fixedsamplelocations bool) {
    C.gl4_1core_glTexImage2DMultisample(gl.funcs, C.GLenum(target), C.GLsizei(samples), C.GLint(internalFormat), C.GLsizei(width), C.GLsizei(height), *(*C.GLboolean)(unsafe.Pointer(&fixedsamplelocations)))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetSynciv.xml
func (gl *GL) GetSynciv(sync glbase.Sync, pname glbase.Enum, bufSize int32, length, values []int32) {
    C.gl4_1core_glGetSynciv(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLenum(pname), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLint)(unsafe.Pointer(&values[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetInteger64v.xml
func (gl *GL) GetInteger64v(pname glbase.Enum, params []int64) {
    C.gl4_1core_glGetInteger64v(gl.funcs, C.GLenum(pname), (*C.GLint64)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glWaitSync.xml
func (gl *GL) WaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) {
    C.gl4_1core_glWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glClientWaitSync.xml
func (gl *GL) ClientWaitSync(sync glbase.Sync, flags glbase.Bitfield, timeout uint64) glbase.Enum {
    glresult := C.gl4_1core_glClientWaitSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)), C.GLbitfield(flags), C.GLuint64(timeout))
    return glbase.Enum(glresult)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDeleteSync.xml
func (gl *GL) DeleteSync(sync glbase.Sync) {
    C.gl4_1core_glDeleteSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glIsSync.xml
func (gl *GL) IsSync(sync glbase.Sync) bool {
    glresult := C.gl4_1core_glIsSync(gl.funcs, C.GLsync(unsafe.Pointer(sync)))
    return *(*bool)(unsafe.Pointer(&glresult))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glFenceSync.xml
func (gl *GL) FenceSync(condition glbase.Enum, flags glbase.Bitfield) glbase.Sync {
    glresult := C.gl4_1core_glFenceSync(gl.funcs, C.GLenum(condition), C.GLbitfield(flags))
    return glbase.Sync(unsafe.Pointer(glresult))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProvokingVertex.xml
func (gl *GL) ProvokingVertex(mode glbase.Enum) {
    C.gl4_1core_glProvokingVertex(gl.funcs, C.GLenum(mode))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDrawElementsInstancedBaseVertex.xml
func (gl *GL) DrawElementsInstancedBaseVertex(mode glbase.Enum, count int, gltype glbase.Enum, indices interface{}, instancecount, basevertex int32) {
    var indices_ptr unsafe.Pointer
    var indices_v = reflect.ValueOf(indices)
    if indices != nil && indices_v.Kind() != reflect.Slice {
        panic("parameter indices must be a slice")
    }
    if indices != nil {
        indices_ptr = unsafe.Pointer(indices_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glDrawElementsInstancedBaseVertex(gl.funcs, C.GLenum(mode), C.GLsizei(count), C.GLenum(gltype), indices_ptr, C.GLsizei(instancecount), C.GLint(basevertex))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDrawRangeElementsBaseVertex.xml
func (gl *GL) DrawRangeElementsBaseVertex(mode glbase.Enum, start, end uint32, count int, gltype glbase.Enum, indices interface{}, basevertex int32) {
    var indices_ptr unsafe.Pointer
    var indices_v = reflect.ValueOf(indices)
    if indices != nil && indices_v.Kind() != reflect.Slice {
        panic("parameter indices must be a slice")
    }
    if indices != nil {
        indices_ptr = unsafe.Pointer(indices_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glDrawRangeElementsBaseVertex(gl.funcs, C.GLenum(mode), C.GLuint(start), C.GLuint(end), C.GLsizei(count), C.GLenum(gltype), indices_ptr, C.GLint(basevertex))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDrawElementsBaseVertex.xml
func (gl *GL) DrawElementsBaseVertex(mode glbase.Enum, count int, gltype glbase.Enum, indices interface{}, basevertex int32) {
    var indices_ptr unsafe.Pointer
    var indices_v = reflect.ValueOf(indices)
    if indices != nil && indices_v.Kind() != reflect.Slice {
        panic("parameter indices must be a slice")
    }
    if indices != nil {
        indices_ptr = unsafe.Pointer(indices_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glDrawElementsBaseVertex(gl.funcs, C.GLenum(mode), C.GLsizei(count), C.GLenum(gltype), indices_ptr, C.GLint(basevertex))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glFramebufferTexture.xml
func (gl *GL) FramebufferTexture(target, attachment glbase.Enum, texture glbase.Texture, level int) {
    C.gl4_1core_glFramebufferTexture(gl.funcs, C.GLenum(target), C.GLenum(attachment), C.GLuint(texture), C.GLint(level))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetBufferParameteri64v.xml
func (gl *GL) GetBufferParameteri64v(target, pname glbase.Enum, params []int64) {
    C.gl4_1core_glGetBufferParameteri64v(gl.funcs, C.GLenum(target), C.GLenum(pname), (*C.GLint64)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetInteger64i_v.xml
func (gl *GL) GetInteger64i_v(target glbase.Enum, index uint32, data []int64) {
    C.gl4_1core_glGetInteger64i_v(gl.funcs, C.GLenum(target), C.GLuint(index), (*C.GLint64)(unsafe.Pointer(&data[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribP4uiv.xml
func (gl *GL) VertexAttribP4uiv(index glbase.Attrib, gltype glbase.Enum, normalized bool, value []uint32) {
    C.gl4_1core_glVertexAttribP4uiv(gl.funcs, C.GLuint(index), C.GLenum(gltype), *(*C.GLboolean)(unsafe.Pointer(&normalized)), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribP4ui.xml
func (gl *GL) VertexAttribP4ui(index glbase.Attrib, gltype glbase.Enum, normalized bool, value uint32) {
    C.gl4_1core_glVertexAttribP4ui(gl.funcs, C.GLuint(index), C.GLenum(gltype), *(*C.GLboolean)(unsafe.Pointer(&normalized)), C.GLuint(value))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribP3uiv.xml
func (gl *GL) VertexAttribP3uiv(index glbase.Attrib, gltype glbase.Enum, normalized bool, value []uint32) {
    C.gl4_1core_glVertexAttribP3uiv(gl.funcs, C.GLuint(index), C.GLenum(gltype), *(*C.GLboolean)(unsafe.Pointer(&normalized)), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribP3ui.xml
func (gl *GL) VertexAttribP3ui(index glbase.Attrib, gltype glbase.Enum, normalized bool, value uint32) {
    C.gl4_1core_glVertexAttribP3ui(gl.funcs, C.GLuint(index), C.GLenum(gltype), *(*C.GLboolean)(unsafe.Pointer(&normalized)), C.GLuint(value))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribP2uiv.xml
func (gl *GL) VertexAttribP2uiv(index glbase.Attrib, gltype glbase.Enum, normalized bool, value []uint32) {
    C.gl4_1core_glVertexAttribP2uiv(gl.funcs, C.GLuint(index), C.GLenum(gltype), *(*C.GLboolean)(unsafe.Pointer(&normalized)), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribP2ui.xml
func (gl *GL) VertexAttribP2ui(index glbase.Attrib, gltype glbase.Enum, normalized bool, value uint32) {
    C.gl4_1core_glVertexAttribP2ui(gl.funcs, C.GLuint(index), C.GLenum(gltype), *(*C.GLboolean)(unsafe.Pointer(&normalized)), C.GLuint(value))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribP1uiv.xml
func (gl *GL) VertexAttribP1uiv(index glbase.Attrib, gltype glbase.Enum, normalized bool, value []uint32) {
    C.gl4_1core_glVertexAttribP1uiv(gl.funcs, C.GLuint(index), C.GLenum(gltype), *(*C.GLboolean)(unsafe.Pointer(&normalized)), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribP1ui.xml
func (gl *GL) VertexAttribP1ui(index glbase.Attrib, gltype glbase.Enum, normalized bool, value uint32) {
    C.gl4_1core_glVertexAttribP1ui(gl.funcs, C.GLuint(index), C.GLenum(gltype), *(*C.GLboolean)(unsafe.Pointer(&normalized)), C.GLuint(value))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glSecondaryColorP3uiv.xml
func (gl *GL) SecondaryColorP3uiv(gltype glbase.Enum, color []uint32) {
    C.gl4_1core_glSecondaryColorP3uiv(gl.funcs, C.GLenum(gltype), (*C.GLuint)(unsafe.Pointer(&color[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glSecondaryColorP3ui.xml
func (gl *GL) SecondaryColorP3ui(gltype glbase.Enum, color uint32) {
    C.gl4_1core_glSecondaryColorP3ui(gl.funcs, C.GLenum(gltype), C.GLuint(color))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glColorP4uiv.xml
func (gl *GL) ColorP4uiv(gltype glbase.Enum, color []uint32) {
    C.gl4_1core_glColorP4uiv(gl.funcs, C.GLenum(gltype), (*C.GLuint)(unsafe.Pointer(&color[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glColorP4ui.xml
func (gl *GL) ColorP4ui(gltype glbase.Enum, color uint32) {
    C.gl4_1core_glColorP4ui(gl.funcs, C.GLenum(gltype), C.GLuint(color))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glColorP3uiv.xml
func (gl *GL) ColorP3uiv(gltype glbase.Enum, color []uint32) {
    C.gl4_1core_glColorP3uiv(gl.funcs, C.GLenum(gltype), (*C.GLuint)(unsafe.Pointer(&color[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glColorP3ui.xml
func (gl *GL) ColorP3ui(gltype glbase.Enum, color uint32) {
    C.gl4_1core_glColorP3ui(gl.funcs, C.GLenum(gltype), C.GLuint(color))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glNormalP3uiv.xml
func (gl *GL) NormalP3uiv(gltype glbase.Enum, coords []uint32) {
    C.gl4_1core_glNormalP3uiv(gl.funcs, C.GLenum(gltype), (*C.GLuint)(unsafe.Pointer(&coords[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glNormalP3ui.xml
func (gl *GL) NormalP3ui(gltype glbase.Enum, coords uint32) {
    C.gl4_1core_glNormalP3ui(gl.funcs, C.GLenum(gltype), C.GLuint(coords))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glMultiTexCoordP4uiv.xml
func (gl *GL) MultiTexCoordP4uiv(texture, gltype glbase.Enum, coords []uint32) {
    C.gl4_1core_glMultiTexCoordP4uiv(gl.funcs, C.GLenum(texture), C.GLenum(gltype), (*C.GLuint)(unsafe.Pointer(&coords[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glMultiTexCoordP4ui.xml
func (gl *GL) MultiTexCoordP4ui(texture, gltype glbase.Enum, coords uint32) {
    C.gl4_1core_glMultiTexCoordP4ui(gl.funcs, C.GLenum(texture), C.GLenum(gltype), C.GLuint(coords))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glMultiTexCoordP3uiv.xml
func (gl *GL) MultiTexCoordP3uiv(texture, gltype glbase.Enum, coords []uint32) {
    C.gl4_1core_glMultiTexCoordP3uiv(gl.funcs, C.GLenum(texture), C.GLenum(gltype), (*C.GLuint)(unsafe.Pointer(&coords[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glMultiTexCoordP3ui.xml
func (gl *GL) MultiTexCoordP3ui(texture, gltype glbase.Enum, coords uint32) {
    C.gl4_1core_glMultiTexCoordP3ui(gl.funcs, C.GLenum(texture), C.GLenum(gltype), C.GLuint(coords))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glMultiTexCoordP2uiv.xml
func (gl *GL) MultiTexCoordP2uiv(texture, gltype glbase.Enum, coords []uint32) {
    C.gl4_1core_glMultiTexCoordP2uiv(gl.funcs, C.GLenum(texture), C.GLenum(gltype), (*C.GLuint)(unsafe.Pointer(&coords[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glMultiTexCoordP2ui.xml
func (gl *GL) MultiTexCoordP2ui(texture, gltype glbase.Enum, coords uint32) {
    C.gl4_1core_glMultiTexCoordP2ui(gl.funcs, C.GLenum(texture), C.GLenum(gltype), C.GLuint(coords))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glMultiTexCoordP1uiv.xml
func (gl *GL) MultiTexCoordP1uiv(texture, gltype glbase.Enum, coords []uint32) {
    C.gl4_1core_glMultiTexCoordP1uiv(gl.funcs, C.GLenum(texture), C.GLenum(gltype), (*C.GLuint)(unsafe.Pointer(&coords[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glMultiTexCoordP1ui.xml
func (gl *GL) MultiTexCoordP1ui(texture, gltype glbase.Enum, coords uint32) {
    C.gl4_1core_glMultiTexCoordP1ui(gl.funcs, C.GLenum(texture), C.GLenum(gltype), C.GLuint(coords))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexCoordP4uiv.xml
func (gl *GL) TexCoordP4uiv(gltype glbase.Enum, coords []uint32) {
    C.gl4_1core_glTexCoordP4uiv(gl.funcs, C.GLenum(gltype), (*C.GLuint)(unsafe.Pointer(&coords[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexCoordP4ui.xml
func (gl *GL) TexCoordP4ui(gltype glbase.Enum, coords uint32) {
    C.gl4_1core_glTexCoordP4ui(gl.funcs, C.GLenum(gltype), C.GLuint(coords))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexCoordP3uiv.xml
func (gl *GL) TexCoordP3uiv(gltype glbase.Enum, coords []uint32) {
    C.gl4_1core_glTexCoordP3uiv(gl.funcs, C.GLenum(gltype), (*C.GLuint)(unsafe.Pointer(&coords[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexCoordP3ui.xml
func (gl *GL) TexCoordP3ui(gltype glbase.Enum, coords uint32) {
    C.gl4_1core_glTexCoordP3ui(gl.funcs, C.GLenum(gltype), C.GLuint(coords))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexCoordP2uiv.xml
func (gl *GL) TexCoordP2uiv(gltype glbase.Enum, coords []uint32) {
    C.gl4_1core_glTexCoordP2uiv(gl.funcs, C.GLenum(gltype), (*C.GLuint)(unsafe.Pointer(&coords[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexCoordP2ui.xml
func (gl *GL) TexCoordP2ui(gltype glbase.Enum, coords uint32) {
    C.gl4_1core_glTexCoordP2ui(gl.funcs, C.GLenum(gltype), C.GLuint(coords))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexCoordP1uiv.xml
func (gl *GL) TexCoordP1uiv(gltype glbase.Enum, coords []uint32) {
    C.gl4_1core_glTexCoordP1uiv(gl.funcs, C.GLenum(gltype), (*C.GLuint)(unsafe.Pointer(&coords[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glTexCoordP1ui.xml
func (gl *GL) TexCoordP1ui(gltype glbase.Enum, coords uint32) {
    C.gl4_1core_glTexCoordP1ui(gl.funcs, C.GLenum(gltype), C.GLuint(coords))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexP4uiv.xml
func (gl *GL) VertexP4uiv(gltype glbase.Enum, value []uint32) {
    C.gl4_1core_glVertexP4uiv(gl.funcs, C.GLenum(gltype), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexP4ui.xml
func (gl *GL) VertexP4ui(gltype glbase.Enum, value uint32) {
    C.gl4_1core_glVertexP4ui(gl.funcs, C.GLenum(gltype), C.GLuint(value))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexP3uiv.xml
func (gl *GL) VertexP3uiv(gltype glbase.Enum, value []uint32) {
    C.gl4_1core_glVertexP3uiv(gl.funcs, C.GLenum(gltype), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexP3ui.xml
func (gl *GL) VertexP3ui(gltype glbase.Enum, value uint32) {
    C.gl4_1core_glVertexP3ui(gl.funcs, C.GLenum(gltype), C.GLuint(value))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexP2uiv.xml
func (gl *GL) VertexP2uiv(gltype glbase.Enum, value []uint32) {
    C.gl4_1core_glVertexP2uiv(gl.funcs, C.GLenum(gltype), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexP2ui.xml
func (gl *GL) VertexP2ui(gltype glbase.Enum, value uint32) {
    C.gl4_1core_glVertexP2ui(gl.funcs, C.GLenum(gltype), C.GLuint(value))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetQueryObjectui64v.xml
func (gl *GL) GetQueryObjectui64v(id uint32, pname glbase.Enum, params []uint64) {
    C.gl4_1core_glGetQueryObjectui64v(gl.funcs, C.GLuint(id), C.GLenum(pname), (*C.GLuint64)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetQueryObjecti64v.xml
func (gl *GL) GetQueryObjecti64v(id uint32, pname glbase.Enum, params []int64) {
    C.gl4_1core_glGetQueryObjecti64v(gl.funcs, C.GLuint(id), C.GLenum(pname), (*C.GLint64)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glQueryCounter.xml
func (gl *GL) QueryCounter(id uint32, target glbase.Enum) {
    C.gl4_1core_glQueryCounter(gl.funcs, C.GLuint(id), C.GLenum(target))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetSamplerParameterIuiv.xml
func (gl *GL) GetSamplerParameterIuiv(sampler uint32, pname glbase.Enum, params []uint32) {
    C.gl4_1core_glGetSamplerParameterIuiv(gl.funcs, C.GLuint(sampler), C.GLenum(pname), (*C.GLuint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetSamplerParameterfv.xml
func (gl *GL) GetSamplerParameterfv(sampler uint32, pname glbase.Enum, params []float32) {
    C.gl4_1core_glGetSamplerParameterfv(gl.funcs, C.GLuint(sampler), C.GLenum(pname), (*C.GLfloat)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetSamplerParameterIiv.xml
func (gl *GL) GetSamplerParameterIiv(sampler uint32, pname glbase.Enum, params []int32) {
    C.gl4_1core_glGetSamplerParameterIiv(gl.funcs, C.GLuint(sampler), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetSamplerParameteriv.xml
func (gl *GL) GetSamplerParameteriv(sampler uint32, pname glbase.Enum, params []int32) {
    C.gl4_1core_glGetSamplerParameteriv(gl.funcs, C.GLuint(sampler), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glSamplerParameterIuiv.xml
func (gl *GL) SamplerParameterIuiv(sampler uint32, pname glbase.Enum, param []uint32) {
    C.gl4_1core_glSamplerParameterIuiv(gl.funcs, C.GLuint(sampler), C.GLenum(pname), (*C.GLuint)(unsafe.Pointer(&param[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glSamplerParameterIiv.xml
func (gl *GL) SamplerParameterIiv(sampler uint32, pname glbase.Enum, param []int32) {
    C.gl4_1core_glSamplerParameterIiv(gl.funcs, C.GLuint(sampler), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&param[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glSamplerParameterfv.xml
func (gl *GL) SamplerParameterfv(sampler uint32, pname glbase.Enum, param []float32) {
    C.gl4_1core_glSamplerParameterfv(gl.funcs, C.GLuint(sampler), C.GLenum(pname), (*C.GLfloat)(unsafe.Pointer(&param[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glSamplerParameterf.xml
func (gl *GL) SamplerParameterf(sampler uint32, pname glbase.Enum, param float32) {
    C.gl4_1core_glSamplerParameterf(gl.funcs, C.GLuint(sampler), C.GLenum(pname), C.GLfloat(param))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glSamplerParameteriv.xml
func (gl *GL) SamplerParameteriv(sampler uint32, pname glbase.Enum, param []int32) {
    C.gl4_1core_glSamplerParameteriv(gl.funcs, C.GLuint(sampler), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&param[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glSamplerParameteri.xml
func (gl *GL) SamplerParameteri(sampler uint32, pname glbase.Enum, param int32) {
    C.gl4_1core_glSamplerParameteri(gl.funcs, C.GLuint(sampler), C.GLenum(pname), C.GLint(param))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBindSampler.xml
func (gl *GL) BindSampler(unit, sampler uint32) {
    C.gl4_1core_glBindSampler(gl.funcs, C.GLuint(unit), C.GLuint(sampler))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glIsSampler.xml
func (gl *GL) IsSampler(sampler uint32) bool {
    glresult := C.gl4_1core_glIsSampler(gl.funcs, C.GLuint(sampler))
    return *(*bool)(unsafe.Pointer(&glresult))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDeleteSamplers.xml
func (gl *GL) DeleteSamplers(count int, samplers []uint32) {
    C.gl4_1core_glDeleteSamplers(gl.funcs, C.GLsizei(count), (*C.GLuint)(unsafe.Pointer(&samplers[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGenSamplers.xml
func (gl *GL) GenSamplers(count int, samplers []uint32) {
    C.gl4_1core_glGenSamplers(gl.funcs, C.GLsizei(count), (*C.GLuint)(unsafe.Pointer(&samplers[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetFragDataIndex.xml
func (gl *GL) GetFragDataIndex(program glbase.Program, name []byte) int32 {
    glresult := C.gl4_1core_glGetFragDataIndex(gl.funcs, C.GLuint(program), (*C.GLchar)(unsafe.Pointer(&name[0])))
    return int32(glresult)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBindFragDataLocationIndexed.xml
func (gl *GL) BindFragDataLocationIndexed(program glbase.Program, colorNumber, index uint32, name []byte) {
    C.gl4_1core_glBindFragDataLocationIndexed(gl.funcs, C.GLuint(program), C.GLuint(colorNumber), C.GLuint(index), (*C.GLchar)(unsafe.Pointer(&name[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribDivisor.xml
func (gl *GL) VertexAttribDivisor(index glbase.Attrib, divisor uint32) {
    C.gl4_1core_glVertexAttribDivisor(gl.funcs, C.GLuint(index), C.GLuint(divisor))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetQueryIndexediv.xml
func (gl *GL) GetQueryIndexediv(target glbase.Enum, index uint32, pname glbase.Enum, params []int32) {
    C.gl4_1core_glGetQueryIndexediv(gl.funcs, C.GLenum(target), C.GLuint(index), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glEndQueryIndexed.xml
func (gl *GL) EndQueryIndexed(target glbase.Enum, index uint32) {
    C.gl4_1core_glEndQueryIndexed(gl.funcs, C.GLenum(target), C.GLuint(index))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBeginQueryIndexed.xml
func (gl *GL) BeginQueryIndexed(target glbase.Enum, index, id uint32) {
    C.gl4_1core_glBeginQueryIndexed(gl.funcs, C.GLenum(target), C.GLuint(index), C.GLuint(id))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDrawTransformFeedbackStream.xml
func (gl *GL) DrawTransformFeedbackStream(mode glbase.Enum, id, stream uint32) {
    C.gl4_1core_glDrawTransformFeedbackStream(gl.funcs, C.GLenum(mode), C.GLuint(id), C.GLuint(stream))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDrawTransformFeedback.xml
func (gl *GL) DrawTransformFeedback(mode glbase.Enum, id uint32) {
    C.gl4_1core_glDrawTransformFeedback(gl.funcs, C.GLenum(mode), C.GLuint(id))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glResumeTransformFeedback.xml
func (gl *GL) ResumeTransformFeedback() {
    C.gl4_1core_glResumeTransformFeedback(gl.funcs)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glPauseTransformFeedback.xml
func (gl *GL) PauseTransformFeedback() {
    C.gl4_1core_glPauseTransformFeedback(gl.funcs)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glIsTransformFeedback.xml
func (gl *GL) IsTransformFeedback(id uint32) bool {
    glresult := C.gl4_1core_glIsTransformFeedback(gl.funcs, C.GLuint(id))
    return *(*bool)(unsafe.Pointer(&glresult))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGenTransformFeedbacks.xml
func (gl *GL) GenTransformFeedbacks(n int, ids []uint32) {
    C.gl4_1core_glGenTransformFeedbacks(gl.funcs, C.GLsizei(n), (*C.GLuint)(unsafe.Pointer(&ids[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDeleteTransformFeedbacks.xml
func (gl *GL) DeleteTransformFeedbacks(n int, ids []uint32) {
    C.gl4_1core_glDeleteTransformFeedbacks(gl.funcs, C.GLsizei(n), (*C.GLuint)(unsafe.Pointer(&ids[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBindTransformFeedback.xml
func (gl *GL) BindTransformFeedback(target glbase.Enum, id uint32) {
    C.gl4_1core_glBindTransformFeedback(gl.funcs, C.GLenum(target), C.GLuint(id))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glPatchParameterfv.xml
func (gl *GL) PatchParameterfv(pname glbase.Enum, values []float32) {
    C.gl4_1core_glPatchParameterfv(gl.funcs, C.GLenum(pname), (*C.GLfloat)(unsafe.Pointer(&values[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glPatchParameteri.xml
func (gl *GL) PatchParameteri(pname glbase.Enum, value int32) {
    C.gl4_1core_glPatchParameteri(gl.funcs, C.GLenum(pname), C.GLint(value))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetProgramStageiv.xml
func (gl *GL) GetProgramStageiv(program glbase.Program, shadertype, pname glbase.Enum, values []int32) {
    C.gl4_1core_glGetProgramStageiv(gl.funcs, C.GLuint(program), C.GLenum(shadertype), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&values[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetUniformSubroutineuiv.xml
func (gl *GL) GetUniformSubroutineuiv(shadertype glbase.Enum, location glbase.Uniform, params []uint32) {
    C.gl4_1core_glGetUniformSubroutineuiv(gl.funcs, C.GLenum(shadertype), C.GLint(location), (*C.GLuint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniformSubroutinesuiv.xml
func (gl *GL) UniformSubroutinesuiv(shadertype glbase.Enum, count int, value []uint32) {
    C.gl4_1core_glUniformSubroutinesuiv(gl.funcs, C.GLenum(shadertype), C.GLsizei(count), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveSubroutineName.xml
func (gl *GL) GetActiveSubroutineName(program glbase.Program, shadertype glbase.Enum, index uint32, bufSize int32, length []int32, name []byte) {
    C.gl4_1core_glGetActiveSubroutineName(gl.funcs, C.GLuint(program), C.GLenum(shadertype), C.GLuint(index), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLchar)(unsafe.Pointer(&name[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveSubroutineUniformName.xml
func (gl *GL) GetActiveSubroutineUniformName(program glbase.Program, shadertype glbase.Enum, index uint32, bufSize int32, length []int32, name []byte) {
    C.gl4_1core_glGetActiveSubroutineUniformName(gl.funcs, C.GLuint(program), C.GLenum(shadertype), C.GLuint(index), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLchar)(unsafe.Pointer(&name[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveSubroutineUniformiv.xml
func (gl *GL) GetActiveSubroutineUniformiv(program glbase.Program, shadertype glbase.Enum, index uint32, pname glbase.Enum, values []int32) {
    C.gl4_1core_glGetActiveSubroutineUniformiv(gl.funcs, C.GLuint(program), C.GLenum(shadertype), C.GLuint(index), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&values[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetSubroutineIndex.xml
func (gl *GL) GetSubroutineIndex(program glbase.Program, shadertype glbase.Enum, name []byte) uint32 {
    glresult := C.gl4_1core_glGetSubroutineIndex(gl.funcs, C.GLuint(program), C.GLenum(shadertype), (*C.GLchar)(unsafe.Pointer(&name[0])))
    return uint32(glresult)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetSubroutineUniformLocation.xml
func (gl *GL) GetSubroutineUniformLocation(program glbase.Program, shadertype glbase.Enum, name []byte) int32 {
    glresult := C.gl4_1core_glGetSubroutineUniformLocation(gl.funcs, C.GLuint(program), C.GLenum(shadertype), (*C.GLchar)(unsafe.Pointer(&name[0])))
    return int32(glresult)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetUniformdv.xml
func (gl *GL) GetUniformdv(program glbase.Program, location glbase.Uniform, params []float64) {
    C.gl4_1core_glGetUniformdv(gl.funcs, C.GLuint(program), C.GLint(location), (*C.GLdouble)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniformMatrix4x3dv.xml
func (gl *GL) UniformMatrix4x3dv(location glbase.Uniform, count int, transpose bool, value []float64) {
    C.gl4_1core_glUniformMatrix4x3dv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniformMatrix4x2dv.xml
func (gl *GL) UniformMatrix4x2dv(location glbase.Uniform, count int, transpose bool, value []float64) {
    C.gl4_1core_glUniformMatrix4x2dv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniformMatrix3x4dv.xml
func (gl *GL) UniformMatrix3x4dv(location glbase.Uniform, count int, transpose bool, value []float64) {
    C.gl4_1core_glUniformMatrix3x4dv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniformMatrix3x2dv.xml
func (gl *GL) UniformMatrix3x2dv(location glbase.Uniform, count int, transpose bool, value []float64) {
    C.gl4_1core_glUniformMatrix3x2dv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniformMatrix2x4dv.xml
func (gl *GL) UniformMatrix2x4dv(location glbase.Uniform, count int, transpose bool, value []float64) {
    C.gl4_1core_glUniformMatrix2x4dv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniformMatrix2x3dv.xml
func (gl *GL) UniformMatrix2x3dv(location glbase.Uniform, count int, transpose bool, value []float64) {
    C.gl4_1core_glUniformMatrix2x3dv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniformMatrix4dv.xml
func (gl *GL) UniformMatrix4dv(location glbase.Uniform, count int, transpose bool, value []float64) {
    C.gl4_1core_glUniformMatrix4dv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniformMatrix3dv.xml
func (gl *GL) UniformMatrix3dv(location glbase.Uniform, count int, transpose bool, value []float64) {
    C.gl4_1core_glUniformMatrix3dv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniformMatrix2dv.xml
func (gl *GL) UniformMatrix2dv(location glbase.Uniform, count int, transpose bool, value []float64) {
    C.gl4_1core_glUniformMatrix2dv(gl.funcs, C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniform4dv.xml
func (gl *GL) Uniform4dv(location glbase.Uniform, count int, value []float64) {
    C.gl4_1core_glUniform4dv(gl.funcs, C.GLint(location), C.GLsizei(count), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniform3dv.xml
func (gl *GL) Uniform3dv(location glbase.Uniform, count int, value []float64) {
    C.gl4_1core_glUniform3dv(gl.funcs, C.GLint(location), C.GLsizei(count), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniform2dv.xml
func (gl *GL) Uniform2dv(location glbase.Uniform, count int, value []float64) {
    C.gl4_1core_glUniform2dv(gl.funcs, C.GLint(location), C.GLsizei(count), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniform1dv.xml
func (gl *GL) Uniform1dv(location glbase.Uniform, count int, value []float64) {
    C.gl4_1core_glUniform1dv(gl.funcs, C.GLint(location), C.GLsizei(count), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniform4d.xml
func (gl *GL) Uniform4d(location glbase.Uniform, v0, v1, v2, v3 float64) {
    C.gl4_1core_glUniform4d(gl.funcs, C.GLint(location), C.GLdouble(v0), C.GLdouble(v1), C.GLdouble(v2), C.GLdouble(v3))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniform3d.xml
func (gl *GL) Uniform3d(location glbase.Uniform, v0, v1, v2 float64) {
    C.gl4_1core_glUniform3d(gl.funcs, C.GLint(location), C.GLdouble(v0), C.GLdouble(v1), C.GLdouble(v2))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniform2d.xml
func (gl *GL) Uniform2d(location glbase.Uniform, v0, v1 float64) {
    C.gl4_1core_glUniform2d(gl.funcs, C.GLint(location), C.GLdouble(v0), C.GLdouble(v1))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUniform1d.xml
func (gl *GL) Uniform1d(location glbase.Uniform, v0 float64) {
    C.gl4_1core_glUniform1d(gl.funcs, C.GLint(location), C.GLdouble(v0))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDrawElementsIndirect.xml
func (gl *GL) DrawElementsIndirect(mode, gltype glbase.Enum, indirect interface{}) {
    var indirect_ptr unsafe.Pointer
    var indirect_v = reflect.ValueOf(indirect)
    if indirect != nil && indirect_v.Kind() != reflect.Slice {
        panic("parameter indirect must be a slice")
    }
    if indirect != nil {
        indirect_ptr = unsafe.Pointer(indirect_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glDrawElementsIndirect(gl.funcs, C.GLenum(mode), C.GLenum(gltype), indirect_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDrawArraysIndirect.xml
func (gl *GL) DrawArraysIndirect(mode glbase.Enum, indirect interface{}) {
    var indirect_ptr unsafe.Pointer
    var indirect_v = reflect.ValueOf(indirect)
    if indirect != nil && indirect_v.Kind() != reflect.Slice {
        panic("parameter indirect must be a slice")
    }
    if indirect != nil {
        indirect_ptr = unsafe.Pointer(indirect_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glDrawArraysIndirect(gl.funcs, C.GLenum(mode), indirect_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBlendFuncSeparatei.xml
func (gl *GL) BlendFuncSeparatei(buf uint32, srcRGB, dstRGB, srcAlpha, dstAlpha glbase.Enum) {
    C.gl4_1core_glBlendFuncSeparatei(gl.funcs, C.GLuint(buf), C.GLenum(srcRGB), C.GLenum(dstRGB), C.GLenum(srcAlpha), C.GLenum(dstAlpha))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBlendFunci.xml
func (gl *GL) BlendFunci(buf uint32, src, dst glbase.Enum) {
    C.gl4_1core_glBlendFunci(gl.funcs, C.GLuint(buf), C.GLenum(src), C.GLenum(dst))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBlendEquationSeparatei.xml
func (gl *GL) BlendEquationSeparatei(buf uint32, modeRGB, modeAlpha glbase.Enum) {
    C.gl4_1core_glBlendEquationSeparatei(gl.funcs, C.GLuint(buf), C.GLenum(modeRGB), C.GLenum(modeAlpha))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBlendEquationi.xml
func (gl *GL) BlendEquationi(buf uint32, mode glbase.Enum) {
    C.gl4_1core_glBlendEquationi(gl.funcs, C.GLuint(buf), C.GLenum(mode))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glMinSampleShading.xml
func (gl *GL) MinSampleShading(value float32) {
    C.gl4_1core_glMinSampleShading(gl.funcs, C.GLfloat(value))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetDoublei_v.xml
func (gl *GL) GetDoublei_v(target glbase.Enum, index uint32, data []float64) {
    C.gl4_1core_glGetDoublei_v(gl.funcs, C.GLenum(target), C.GLuint(index), (*C.GLdouble)(unsafe.Pointer(&data[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetFloati_v.xml
func (gl *GL) GetFloati_v(target glbase.Enum, index uint32, data []float32) {
    C.gl4_1core_glGetFloati_v(gl.funcs, C.GLenum(target), C.GLuint(index), (*C.GLfloat)(unsafe.Pointer(&data[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDepthRangeIndexed.xml
func (gl *GL) DepthRangeIndexed(index uint32, n, f float64) {
    C.gl4_1core_glDepthRangeIndexed(gl.funcs, C.GLuint(index), C.GLdouble(n), C.GLdouble(f))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDepthRangeArrayv.xml
func (gl *GL) DepthRangeArrayv(first uint32, count int, v []float64) {
    C.gl4_1core_glDepthRangeArrayv(gl.funcs, C.GLuint(first), C.GLsizei(count), (*C.GLdouble)(unsafe.Pointer(&v[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glScissorIndexedv.xml
func (gl *GL) ScissorIndexedv(index uint32, v []int32) {
    C.gl4_1core_glScissorIndexedv(gl.funcs, C.GLuint(index), (*C.GLint)(unsafe.Pointer(&v[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glScissorIndexed.xml
func (gl *GL) ScissorIndexed(index uint32, left, bottom int32, width, height int) {
    C.gl4_1core_glScissorIndexed(gl.funcs, C.GLuint(index), C.GLint(left), C.GLint(bottom), C.GLsizei(width), C.GLsizei(height))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glScissorArrayv.xml
func (gl *GL) ScissorArrayv(first uint32, count int, v []int32) {
    C.gl4_1core_glScissorArrayv(gl.funcs, C.GLuint(first), C.GLsizei(count), (*C.GLint)(unsafe.Pointer(&v[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glViewportIndexedfv.xml
func (gl *GL) ViewportIndexedfv(index uint32, v []float32) {
    C.gl4_1core_glViewportIndexedfv(gl.funcs, C.GLuint(index), (*C.GLfloat)(unsafe.Pointer(&v[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glViewportIndexedf.xml
func (gl *GL) ViewportIndexedf(index uint32, x, y, w, h float32) {
    C.gl4_1core_glViewportIndexedf(gl.funcs, C.GLuint(index), C.GLfloat(x), C.GLfloat(y), C.GLfloat(w), C.GLfloat(h))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glViewportArrayv.xml
func (gl *GL) ViewportArrayv(first uint32, count int, v []float32) {
    C.gl4_1core_glViewportArrayv(gl.funcs, C.GLuint(first), C.GLsizei(count), (*C.GLfloat)(unsafe.Pointer(&v[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetVertexAttribLdv.xml
func (gl *GL) GetVertexAttribLdv(index glbase.Attrib, pname glbase.Enum, params []float64) {
    C.gl4_1core_glGetVertexAttribLdv(gl.funcs, C.GLuint(index), C.GLenum(pname), (*C.GLdouble)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribLPointer.xml
func (gl *GL) VertexAttribLPointer(index glbase.Attrib, size int, gltype glbase.Enum, stride int, pointer interface{}) {
    var pointer_ptr unsafe.Pointer
    var pointer_v = reflect.ValueOf(pointer)
    if pointer != nil && pointer_v.Kind() != reflect.Slice {
        panic("parameter pointer must be a slice")
    }
    if pointer != nil {
        pointer_ptr = unsafe.Pointer(pointer_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glVertexAttribLPointer(gl.funcs, C.GLuint(index), C.GLint(size), C.GLenum(gltype), C.GLsizei(stride), pointer_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribL4dv.xml
func (gl *GL) VertexAttribL4dv(index glbase.Attrib, v []float64) {
    if len(v) != 4 {
        panic("parameter v has incorrect length")
    }
    C.gl4_1core_glVertexAttribL4dv(gl.funcs, C.GLuint(index), (*C.GLdouble)(unsafe.Pointer(&v[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribL3dv.xml
func (gl *GL) VertexAttribL3dv(index glbase.Attrib, v []float64) {
    if len(v) != 3 {
        panic("parameter v has incorrect length")
    }
    C.gl4_1core_glVertexAttribL3dv(gl.funcs, C.GLuint(index), (*C.GLdouble)(unsafe.Pointer(&v[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribL2dv.xml
func (gl *GL) VertexAttribL2dv(index glbase.Attrib, v []float64) {
    if len(v) != 2 {
        panic("parameter v has incorrect length")
    }
    C.gl4_1core_glVertexAttribL2dv(gl.funcs, C.GLuint(index), (*C.GLdouble)(unsafe.Pointer(&v[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribL1dv.xml
func (gl *GL) VertexAttribL1dv(index glbase.Attrib, v []float64) {
    C.gl4_1core_glVertexAttribL1dv(gl.funcs, C.GLuint(index), (*C.GLdouble)(unsafe.Pointer(&v[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribL4d.xml
func (gl *GL) VertexAttribL4d(index glbase.Attrib, x, y, z, w float64) {
    C.gl4_1core_glVertexAttribL4d(gl.funcs, C.GLuint(index), C.GLdouble(x), C.GLdouble(y), C.GLdouble(z), C.GLdouble(w))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribL3d.xml
func (gl *GL) VertexAttribL3d(index glbase.Attrib, x, y, z float64) {
    C.gl4_1core_glVertexAttribL3d(gl.funcs, C.GLuint(index), C.GLdouble(x), C.GLdouble(y), C.GLdouble(z))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribL2d.xml
func (gl *GL) VertexAttribL2d(index glbase.Attrib, x, y float64) {
    C.gl4_1core_glVertexAttribL2d(gl.funcs, C.GLuint(index), C.GLdouble(x), C.GLdouble(y))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glVertexAttribL1d.xml
func (gl *GL) VertexAttribL1d(index glbase.Attrib, x float64) {
    C.gl4_1core_glVertexAttribL1d(gl.funcs, C.GLuint(index), C.GLdouble(x))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetProgramPipelineInfoLog.xml
func (gl *GL) GetProgramPipelineInfoLog(pipeline uint32, bufSize int32, length []int32, infoLog []byte) {
    C.gl4_1core_glGetProgramPipelineInfoLog(gl.funcs, C.GLuint(pipeline), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLchar)(unsafe.Pointer(&infoLog[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glValidateProgramPipeline.xml
func (gl *GL) ValidateProgramPipeline(pipeline uint32) {
    C.gl4_1core_glValidateProgramPipeline(gl.funcs, C.GLuint(pipeline))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix4x3dv.xml
func (gl *GL) ProgramUniformMatrix4x3dv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float64) {
    if len(value) != 3 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix4x3dv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix3x4dv.xml
func (gl *GL) ProgramUniformMatrix3x4dv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float64) {
    if len(value) != 4 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix3x4dv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix4x2dv.xml
func (gl *GL) ProgramUniformMatrix4x2dv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float64) {
    if len(value) != 2 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix4x2dv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix2x4dv.xml
func (gl *GL) ProgramUniformMatrix2x4dv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float64) {
    if len(value) != 4 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix2x4dv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix3x2dv.xml
func (gl *GL) ProgramUniformMatrix3x2dv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float64) {
    if len(value) != 2 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix3x2dv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix2x3dv.xml
func (gl *GL) ProgramUniformMatrix2x3dv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float64) {
    if len(value) != 3 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix2x3dv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix4x3fv.xml
func (gl *GL) ProgramUniformMatrix4x3fv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float32) {
    if len(value) != 3 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix4x3fv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix3x4fv.xml
func (gl *GL) ProgramUniformMatrix3x4fv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float32) {
    if len(value) != 4 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix3x4fv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix4x2fv.xml
func (gl *GL) ProgramUniformMatrix4x2fv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float32) {
    if len(value) != 2 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix4x2fv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix2x4fv.xml
func (gl *GL) ProgramUniformMatrix2x4fv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float32) {
    if len(value) != 4 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix2x4fv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix3x2fv.xml
func (gl *GL) ProgramUniformMatrix3x2fv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float32) {
    if len(value) != 2 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix3x2fv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix2x3fv.xml
func (gl *GL) ProgramUniformMatrix2x3fv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float32) {
    if len(value) != 3 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix2x3fv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix4dv.xml
func (gl *GL) ProgramUniformMatrix4dv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float64) {
    if len(value) != 4 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix4dv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix3dv.xml
func (gl *GL) ProgramUniformMatrix3dv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float64) {
    if len(value) != 3 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix3dv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix2dv.xml
func (gl *GL) ProgramUniformMatrix2dv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float64) {
    if len(value) != 2 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix2dv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix4fv.xml
func (gl *GL) ProgramUniformMatrix4fv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float32) {
    if len(value) != 4 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix4fv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix3fv.xml
func (gl *GL) ProgramUniformMatrix3fv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float32) {
    if len(value) != 3 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix3fv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniformMatrix2fv.xml
func (gl *GL) ProgramUniformMatrix2fv(program glbase.Program, location glbase.Uniform, count int, transpose bool, value []float32) {
    if len(value) != 2 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniformMatrix2fv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), *(*C.GLboolean)(unsafe.Pointer(&transpose)), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform4uiv.xml
func (gl *GL) ProgramUniform4uiv(program glbase.Program, location glbase.Uniform, count int, value []uint32) {
    C.gl4_1core_glProgramUniform4uiv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform4ui.xml
func (gl *GL) ProgramUniform4ui(program glbase.Program, location glbase.Uniform, v0, v1, v2, v3 uint32) {
    C.gl4_1core_glProgramUniform4ui(gl.funcs, C.GLuint(program), C.GLint(location), C.GLuint(v0), C.GLuint(v1), C.GLuint(v2), C.GLuint(v3))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform4dv.xml
func (gl *GL) ProgramUniform4dv(program glbase.Program, location glbase.Uniform, count int, value []float64) {
    if len(value) != 4 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniform4dv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform4d.xml
func (gl *GL) ProgramUniform4d(program glbase.Program, location glbase.Uniform, v0, v1, v2, v3 float64) {
    C.gl4_1core_glProgramUniform4d(gl.funcs, C.GLuint(program), C.GLint(location), C.GLdouble(v0), C.GLdouble(v1), C.GLdouble(v2), C.GLdouble(v3))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform4fv.xml
func (gl *GL) ProgramUniform4fv(program glbase.Program, location glbase.Uniform, count int, value []float32) {
    if len(value) != 4 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniform4fv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform4f.xml
func (gl *GL) ProgramUniform4f(program glbase.Program, location glbase.Uniform, v0, v1, v2, v3 float32) {
    C.gl4_1core_glProgramUniform4f(gl.funcs, C.GLuint(program), C.GLint(location), C.GLfloat(v0), C.GLfloat(v1), C.GLfloat(v2), C.GLfloat(v3))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform4iv.xml
func (gl *GL) ProgramUniform4iv(program glbase.Program, location glbase.Uniform, count int, value []int32) {
    if len(value) != 4 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniform4iv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), (*C.GLint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform4i.xml
func (gl *GL) ProgramUniform4i(program glbase.Program, location glbase.Uniform, v0, v1, v2, v3 int32) {
    C.gl4_1core_glProgramUniform4i(gl.funcs, C.GLuint(program), C.GLint(location), C.GLint(v0), C.GLint(v1), C.GLint(v2), C.GLint(v3))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform3uiv.xml
func (gl *GL) ProgramUniform3uiv(program glbase.Program, location glbase.Uniform, count int, value []uint32) {
    C.gl4_1core_glProgramUniform3uiv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform3ui.xml
func (gl *GL) ProgramUniform3ui(program glbase.Program, location glbase.Uniform, v0, v1, v2 uint32) {
    C.gl4_1core_glProgramUniform3ui(gl.funcs, C.GLuint(program), C.GLint(location), C.GLuint(v0), C.GLuint(v1), C.GLuint(v2))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform3dv.xml
func (gl *GL) ProgramUniform3dv(program glbase.Program, location glbase.Uniform, count int, value []float64) {
    if len(value) != 3 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniform3dv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform3d.xml
func (gl *GL) ProgramUniform3d(program glbase.Program, location glbase.Uniform, v0, v1, v2 float64) {
    C.gl4_1core_glProgramUniform3d(gl.funcs, C.GLuint(program), C.GLint(location), C.GLdouble(v0), C.GLdouble(v1), C.GLdouble(v2))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform3fv.xml
func (gl *GL) ProgramUniform3fv(program glbase.Program, location glbase.Uniform, count int, value []float32) {
    if len(value) != 3 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniform3fv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform3f.xml
func (gl *GL) ProgramUniform3f(program glbase.Program, location glbase.Uniform, v0, v1, v2 float32) {
    C.gl4_1core_glProgramUniform3f(gl.funcs, C.GLuint(program), C.GLint(location), C.GLfloat(v0), C.GLfloat(v1), C.GLfloat(v2))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform3iv.xml
func (gl *GL) ProgramUniform3iv(program glbase.Program, location glbase.Uniform, count int, value []int32) {
    if len(value) != 3 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniform3iv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), (*C.GLint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform3i.xml
func (gl *GL) ProgramUniform3i(program glbase.Program, location glbase.Uniform, v0, v1, v2 int32) {
    C.gl4_1core_glProgramUniform3i(gl.funcs, C.GLuint(program), C.GLint(location), C.GLint(v0), C.GLint(v1), C.GLint(v2))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform2uiv.xml
func (gl *GL) ProgramUniform2uiv(program glbase.Program, location glbase.Uniform, count int, value []uint32) {
    C.gl4_1core_glProgramUniform2uiv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform2ui.xml
func (gl *GL) ProgramUniform2ui(program glbase.Program, location glbase.Uniform, v0, v1 uint32) {
    C.gl4_1core_glProgramUniform2ui(gl.funcs, C.GLuint(program), C.GLint(location), C.GLuint(v0), C.GLuint(v1))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform2dv.xml
func (gl *GL) ProgramUniform2dv(program glbase.Program, location glbase.Uniform, count int, value []float64) {
    if len(value) != 2 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniform2dv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform2d.xml
func (gl *GL) ProgramUniform2d(program glbase.Program, location glbase.Uniform, v0, v1 float64) {
    C.gl4_1core_glProgramUniform2d(gl.funcs, C.GLuint(program), C.GLint(location), C.GLdouble(v0), C.GLdouble(v1))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform2fv.xml
func (gl *GL) ProgramUniform2fv(program glbase.Program, location glbase.Uniform, count int, value []float32) {
    if len(value) != 2 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniform2fv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform2f.xml
func (gl *GL) ProgramUniform2f(program glbase.Program, location glbase.Uniform, v0, v1 float32) {
    C.gl4_1core_glProgramUniform2f(gl.funcs, C.GLuint(program), C.GLint(location), C.GLfloat(v0), C.GLfloat(v1))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform2iv.xml
func (gl *GL) ProgramUniform2iv(program glbase.Program, location glbase.Uniform, count int, value []int32) {
    if len(value) != 2 {
        panic("parameter value has incorrect length")
    }
    C.gl4_1core_glProgramUniform2iv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), (*C.GLint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform2i.xml
func (gl *GL) ProgramUniform2i(program glbase.Program, location glbase.Uniform, v0, v1 int32) {
    C.gl4_1core_glProgramUniform2i(gl.funcs, C.GLuint(program), C.GLint(location), C.GLint(v0), C.GLint(v1))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform1uiv.xml
func (gl *GL) ProgramUniform1uiv(program glbase.Program, location glbase.Uniform, count int, value []uint32) {
    C.gl4_1core_glProgramUniform1uiv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), (*C.GLuint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform1ui.xml
func (gl *GL) ProgramUniform1ui(program glbase.Program, location glbase.Uniform, v0 uint32) {
    C.gl4_1core_glProgramUniform1ui(gl.funcs, C.GLuint(program), C.GLint(location), C.GLuint(v0))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform1dv.xml
func (gl *GL) ProgramUniform1dv(program glbase.Program, location glbase.Uniform, count int, value []float64) {
    C.gl4_1core_glProgramUniform1dv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), (*C.GLdouble)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform1d.xml
func (gl *GL) ProgramUniform1d(program glbase.Program, location glbase.Uniform, v0 float64) {
    C.gl4_1core_glProgramUniform1d(gl.funcs, C.GLuint(program), C.GLint(location), C.GLdouble(v0))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform1fv.xml
func (gl *GL) ProgramUniform1fv(program glbase.Program, location glbase.Uniform, count int, value []float32) {
    C.gl4_1core_glProgramUniform1fv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), (*C.GLfloat)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform1f.xml
func (gl *GL) ProgramUniform1f(program glbase.Program, location glbase.Uniform, v0 float32) {
    C.gl4_1core_glProgramUniform1f(gl.funcs, C.GLuint(program), C.GLint(location), C.GLfloat(v0))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform1iv.xml
func (gl *GL) ProgramUniform1iv(program glbase.Program, location glbase.Uniform, count int, value []int32) {
    C.gl4_1core_glProgramUniform1iv(gl.funcs, C.GLuint(program), C.GLint(location), C.GLsizei(count), (*C.GLint)(unsafe.Pointer(&value[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramUniform1i.xml
func (gl *GL) ProgramUniform1i(program glbase.Program, location glbase.Uniform, v0 int32) {
    C.gl4_1core_glProgramUniform1i(gl.funcs, C.GLuint(program), C.GLint(location), C.GLint(v0))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetProgramPipelineiv.xml
func (gl *GL) GetProgramPipelineiv(pipeline uint32, pname glbase.Enum, params []int32) {
    C.gl4_1core_glGetProgramPipelineiv(gl.funcs, C.GLuint(pipeline), C.GLenum(pname), (*C.GLint)(unsafe.Pointer(&params[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glIsProgramPipeline.xml
func (gl *GL) IsProgramPipeline(pipeline uint32) bool {
    glresult := C.gl4_1core_glIsProgramPipeline(gl.funcs, C.GLuint(pipeline))
    return *(*bool)(unsafe.Pointer(&glresult))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGenProgramPipelines.xml
func (gl *GL) GenProgramPipelines(n int, pipelines []uint32) {
    C.gl4_1core_glGenProgramPipelines(gl.funcs, C.GLsizei(n), (*C.GLuint)(unsafe.Pointer(&pipelines[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDeleteProgramPipelines.xml
func (gl *GL) DeleteProgramPipelines(n int, pipelines []uint32) {
    C.gl4_1core_glDeleteProgramPipelines(gl.funcs, C.GLsizei(n), (*C.GLuint)(unsafe.Pointer(&pipelines[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glBindProgramPipeline.xml
func (gl *GL) BindProgramPipeline(pipeline uint32) {
    C.gl4_1core_glBindProgramPipeline(gl.funcs, C.GLuint(pipeline))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glActiveShaderProgram.xml
func (gl *GL) ActiveShaderProgram(pipeline uint32, program glbase.Program) {
    C.gl4_1core_glActiveShaderProgram(gl.funcs, C.GLuint(pipeline), C.GLuint(program))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glUseProgramStages.xml
func (gl *GL) UseProgramStages(pipeline uint32, stages glbase.Bitfield, program glbase.Program) {
    C.gl4_1core_glUseProgramStages(gl.funcs, C.GLuint(pipeline), C.GLbitfield(stages), C.GLuint(program))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramParameteri.xml
func (gl *GL) ProgramParameteri(program glbase.Program, pname glbase.Enum, value int32) {
    C.gl4_1core_glProgramParameteri(gl.funcs, C.GLuint(program), C.GLenum(pname), C.GLint(value))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glProgramBinary.xml
func (gl *GL) ProgramBinary(program glbase.Program, binaryFormat glbase.Enum, binary interface{}, length int32) {
    var binary_ptr unsafe.Pointer
    var binary_v = reflect.ValueOf(binary)
    if binary != nil && binary_v.Kind() != reflect.Slice {
        panic("parameter binary must be a slice")
    }
    if binary != nil {
        binary_ptr = unsafe.Pointer(binary_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glProgramBinary(gl.funcs, C.GLuint(program), C.GLenum(binaryFormat), binary_ptr, C.GLsizei(length))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetProgramBinary.xml
func (gl *GL) GetProgramBinary(program glbase.Program, bufSize int32, length []int32, binaryFormat []glbase.Enum, binary interface{}) {
    var binary_ptr unsafe.Pointer
    var binary_v = reflect.ValueOf(binary)
    if binary != nil && binary_v.Kind() != reflect.Slice {
        panic("parameter binary must be a slice")
    }
    if binary != nil {
        binary_ptr = unsafe.Pointer(binary_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glGetProgramBinary(gl.funcs, C.GLuint(program), C.GLsizei(bufSize), (*C.GLsizei)(unsafe.Pointer(&length[0])), (*C.GLenum)(unsafe.Pointer(&binaryFormat[0])), binary_ptr)
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glClearDepthf.xml
func (gl *GL) ClearDepthf(dd float32) {
    C.gl4_1core_glClearDepthf(gl.funcs, C.GLfloat(dd))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glDepthRangef.xml
func (gl *GL) DepthRangef(n, f float32) {
    C.gl4_1core_glDepthRangef(gl.funcs, C.GLfloat(n), C.GLfloat(f))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glGetShaderPrecisionFormat.xml
func (gl *GL) GetShaderPrecisionFormat(shadertype, precisionType glbase.Enum, range_, precision []int32) {
    C.gl4_1core_glGetShaderPrecisionFormat(gl.funcs, C.GLenum(shadertype), C.GLenum(precisionType), (*C.GLint)(unsafe.Pointer(&range_[0])), (*C.GLint)(unsafe.Pointer(&precision[0])))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glShaderBinary.xml
func (gl *GL) ShaderBinary(count int, shaders []glbase.Shader, binaryFormat glbase.Enum, binary interface{}, length int32) {
    var binary_ptr unsafe.Pointer
    var binary_v = reflect.ValueOf(binary)
    if binary != nil && binary_v.Kind() != reflect.Slice {
        panic("parameter binary must be a slice")
    }
    if binary != nil {
        binary_ptr = unsafe.Pointer(binary_v.Index(0).Addr().Pointer())
    }
    C.gl4_1core_glShaderBinary(gl.funcs, C.GLsizei(count), (*C.GLuint)(unsafe.Pointer(&shaders[0])), C.GLenum(binaryFormat), binary_ptr, C.GLsizei(length))
}

// https://www.opengl.org/sdk/docs/man4/xhtml/glReleaseShaderCompiler.xml
func (gl *GL) ReleaseShaderCompiler() {
    C.gl4_1core_glReleaseShaderCompiler(gl.funcs)
}