summaryrefslogtreecommitdiffstats
path: root/meta/packages/qemu/qemu-git/qemu-add-gl-host-code.patch
blob: 25ee379251dd98cc738051ebf565fc537c1183a8 (plain)
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
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568
19569
19570
19571
19572
19573
19574
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977
19978
19979
19980
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293
20294
20295
20296
20297
20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
20313
20314
20315
20316
20317
20318
20319
20320
20321
20322
20323
20324
20325
20326
20327
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
20373
20374
20375
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511
20512
20513
20514
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528
20529
20530
20531
20532
20533
20534
20535
20536
20537
20538
20539
20540
20541
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
20623
20624
20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692
20693
20694
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724
20725
20726
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
20757
20758
20759
20760
20761
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822
20823
20824
20825
20826
20827
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838
20839
20840
20841
20842
20843
20844
20845
20846
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890
20891
20892
20893
20894
20895
20896
20897
20898
20899
20900
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947
20948
20949
20950
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987
20988
20989
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000
21001
21002
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186
21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21379
21380
21381
21382
21383
21384
21385
21386
21387
21388
21389
21390
21391
21392
21393
21394
21395
21396
21397
21398
21399
21400
21401
21402
21403
21404
21405
21406
21407
21408
21409
21410
21411
21412
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424
21425
21426
21427
21428
21429
21430
21431
21432
21433
21434
21435
21436
21437
21438
21439
21440
21441
21442
21443
21444
21445
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458
21459
21460
21461
21462
21463
21464
21465
21466
21467
21468
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
21553
21554
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564
21565
21566
21567
21568
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801
21802
21803
21804
21805
21806
21807
21808
21809
21810
21811
21812
21813
21814
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895
21896
21897
21898
21899
21900
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471
22472
22473
22474
22475
22476
22477
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616
22617
22618
22619
22620
22621
22622
22623
22624
22625
22626
22627
22628
22629
22630
22631
22632
22633
22634
22635
22636
22637
22638
22639
22640
22641
22642
22643
22644
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683
22684
22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695
22696
22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719
22720
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765
22766
22767
22768
22769
22770
22771
22772
22773
22774
22775
22776
22777
22778
22779
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791
22792
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
22824
22825
22826
22827
22828
22829
22830
22831
22832
22833
22834
22835
22836
22837
22838
22839
22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874
22875
22876
22877
22878
22879
22880
22881
22882
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962
22963
22964
22965
22966
22967
22968
22969
22970
22971
22972
22973
22974
22975
22976
22977
22978
22979
22980
22981
22982
22983
22984
22985
22986
22987
22988
22989
22990
22991
22992
22993
22994
22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040
23041
23042
23043
23044
23045
23046
23047
23048
23049
23050
23051
23052
23053
23054
23055
23056
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102
23103
23104
23105
23106
23107
23108
23109
23110
23111
23112
23113
23114
23115
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163
23164
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
23196
23197
23198
23199
23200
23201
23202
23203
23204
23205
23206
23207
23208
23209
23210
23211
23212
23213
23214
23215
23216
23217
23218
23219
23220
23221
23222
23223
23224
23225
23226
23227
23228
23229
23230
23231
23232
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288
23289
23290
23291
23292
23293
23294
23295
23296
23297
23298
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
23311
23312
23313
23314
23315
23316
23317
23318
23319
23320
23321
23322
23323
23324
23325
23326
23327
23328
23329
23330
23331
23332
23333
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
23351
23352
23353
23354
23355
23356
23357
23358
23359
23360
23361
23362
23363
23364
23365
23366
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
23381
23382
23383
23384
23385
23386
23387
23388
23389
23390
23391
23392
23393
23394
23395
23396
23397
23398
23399
23400
23401
23402
23403
23404
23405
23406
23407
23408
23409
23410
23411
23412
23413
23414
23415
23416
23417
23418
23419
23420
23421
23422
23423
23424
23425
23426
23427
23428
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
23444
23445
23446
23447
23448
23449
23450
23451
23452
23453
23454
23455
23456
23457
23458
23459
23460
23461
23462
23463
23464
23465
23466
23467
23468
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505
23506
23507
23508
23509
23510
23511
23512
23513
23514
23515
23516
23517
23518
23519
23520
23521
23522
23523
23524
23525
23526
23527
23528
23529
23530
23531
23532
23533
23534
23535
23536
23537
23538
23539
23540
23541
23542
23543
23544
23545
23546
23547
23548
23549
23550
23551
23552
23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
23568
23569
23570
23571
23572
23573
23574
23575
23576
23577
23578
23579
23580
23581
23582
23583
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
23599
23600
23601
23602
23603
23604
23605
23606
23607
23608
23609
23610
23611
23612
23613
23614
23615
23616
23617
23618
23619
23620
23621
23622
23623
23624
23625
23626
23627
23628
23629
23630
23631
23632
23633
23634
23635
23636
23637
23638
23639
23640
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662
23663
23664
23665
23666
23667
23668
23669
23670
23671
23672
23673
23674
23675
23676
23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691
23692
23693
23694
23695
23696
23697
23698
23699
23700
23701
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766
23767
23768
23769
23770
23771
23772
23773
23774
23775
23776
23777
23778
23779
23780
23781
23782
23783
23784
23785
23786
23787
23788
23789
23790
23791
23792
23793
23794
23795
23796
23797
23798
23799
23800
23801
23802
23803
23804
23805
23806
23807
23808
23809
23810
23811
23812
23813
23814
23815
23816
23817
23818
23819
23820
23821
23822
23823
23824
23825
23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836
23837
23838
23839
23840
23841
23842
23843
23844
23845
23846
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
23862
23863
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874
23875
23876
23877
23878
23879
23880
23881
23882
23883
23884
23885
23886
23887
23888
23889
23890
23891
23892
23893
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929
23930
23931
23932
23933
23934
23935
23936
23937
23938
23939
23940
23941
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
23981
23982
23983
23984
23985
23986
23987
23988
23989
23990
23991
23992
23993
23994
23995
23996
23997
23998
23999
24000
24001
24002
24003
24004
24005
24006
24007
24008
24009
24010
24011
24012
24013
24014
24015
24016
24017
24018
24019
24020
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034
24035
24036
24037
24038
24039
24040
24041
24042
24043
24044
24045
24046
24047
24048
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089
24090
24091
24092
24093
24094
24095
24096
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160
24161
24162
24163
24164
24165
24166
24167
24168
24169
24170
24171
24172
24173
24174
24175
24176
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186
24187
24188
24189
24190
24191
24192
24193
24194
24195
24196
24197
24198
24199
24200
24201
24202
24203
24204
24205
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320
24321
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
24343
24344
24345
24346
24347
24348
24349
24350
24351
24352
24353
24354
24355
24356
24357
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373
24374
24375
24376
24377
24378
24379
24380
24381
24382
24383
24384
24385
24386
24387
24388
24389
24390
24391
24392
24393
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
24405
24406
24407
24408
24409
24410
24411
24412
24413
24414
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439
24440
24441
24442
24443
24444
24445
24446
24447
24448
24449
24450
24451
24452
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462
24463
24464
24465
24466
24467
24468
24469
24470
24471
24472
24473
24474
24475
24476
24477
24478
24479
24480
24481
24482
24483
24484
24485
24486
24487
24488
24489
24490
24491
24492
24493
24494
24495
24496
24497
24498
24499
24500
24501
24502
24503
24504
24505
24506
24507
24508
24509
24510
24511
24512
24513
24514
24515
24516
24517
24518
24519
24520
24521
24522
24523
24524
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
24560
24561
24562
24563
24564
24565
24566
24567
24568
24569
24570
24571
24572
24573
24574
24575
24576
24577
24578
24579
24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
24591
24592
24593
24594
24595
24596
24597
24598
24599
24600
24601
24602
24603
24604
24605
24606
24607
24608
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
24622
24623
24624
24625
24626
24627
24628
24629
24630
24631
24632
24633
24634
24635
24636
24637
24638
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717
24718
24719
24720
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830
24831
24832
24833
24834
24835
24836
24837
24838
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866
24867
24868
24869
24870
24871
24872
24873
24874
24875
24876
24877
24878
24879
24880
24881
24882
24883
24884
24885
24886
24887
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903
24904
24905
24906
24907
24908
24909
24910
24911
24912
24913
24914
24915
24916
24917
24918
24919
24920
24921
24922
24923
24924
24925
24926
24927
24928
24929
24930
24931
24932
24933
24934
24935
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945
24946
24947
24948
24949
24950
24951
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967
24968
24969
24970
24971
24972
24973
24974
24975
24976
24977
24978
24979
24980
24981
24982
24983
24984
24985
24986
24987
24988
24989
24990
24991
24992
24993
24994
24995
24996
24997
24998
24999
25000
25001
25002
25003
25004
25005
25006
25007
25008
25009
25010
25011
25012
25013
25014
25015
25016
25017
25018
25019
25020
25021
25022
25023
25024
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034
25035
25036
25037
25038
25039
25040
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098
25099
25100
25101
25102
25103
25104
25105
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115
25116
25117
25118
25119
25120
25121
25122
25123
25124
25125
25126
25127
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148
25149
25150
25151
25152
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216
25217
25218
25219
25220
25221
25222
25223
25224
25225
25226
25227
25228
25229
25230
25231
25232
25233
25234
25235
25236
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249
25250
25251
25252
25253
25254
25255
25256
25257
25258
25259
25260
25261
25262
25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
25273
25274
25275
25276
25277
25278
25279
25280
25281
25282
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306
25307
25308
25309
25310
25311
25312
25313
25314
25315
25316
25317
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
25397
25398
25399
25400
25401
25402
25403
25404
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414
25415
25416
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468
25469
25470
25471
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492
25493
25494
25495
25496
25497
25498
25499
25500
25501
25502
25503
25504
25505
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558
25559
25560
25561
25562
25563
25564
25565
25566
25567
25568
25569
25570
25571
25572
25573
25574
25575
25576
25577
25578
25579
25580
25581
25582
25583
25584
25585
25586
25587
25588
25589
25590
25591
25592
25593
25594
25595
25596
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
25614
25615
25616
25617
25618
25619
25620
25621
25622
25623
25624
25625
25626
25627
25628
25629
25630
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643
25644
25645
25646
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658
25659
25660
25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671
25672
25673
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
25738
25739
25740
25741
25742
25743
25744
25745
25746
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783
25784
25785
25786
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801
25802
25803
25804
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827
25828
25829
25830
25831
25832
25833
25834
25835
25836
25837
25838
25839
25840
25841
25842
25843
25844
25845
25846
25847
25848
25849
25850
25851
25852
25853
25854
25855
25856
25857
25858
25859
25860
25861
25862
25863
25864
25865
25866
25867
25868
25869
25870
25871
25872
25873
25874
25875
25876
25877
25878
25879
25880
25881
25882
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898
25899
25900
25901
25902
25903
25904
25905
25906
25907
25908
25909
25910
25911
25912
25913
25914
25915
25916
25917
25918
25919
25920
25921
25922
25923
25924
25925
25926
25927
25928
25929
25930
25931
25932
25933
25934
25935
25936
25937
25938
25939
25940
25941
25942
25943
25944
25945
25946
25947
25948
25949
25950
25951
25952
25953
25954
25955
25956
25957
25958
25959
25960
25961
25962
25963
25964
25965
25966
25967
25968
25969
25970
25971
25972
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995
25996
25997
25998
25999
26000
26001
26002
26003
26004
26005
26006
26007
26008
26009
26010
26011
26012
26013
26014
26015
26016
26017
26018
26019
26020
26021
26022
26023
26024
26025
26026
26027
26028
26029
26030
26031
26032
26033
26034
26035
26036
26037
26038
26039
26040
26041
26042
26043
26044
26045
26046
26047
26048
26049
26050
26051
26052
26053
26054
26055
26056
26057
26058
26059
26060
26061
26062
26063
26064
26065
26066
26067
26068
26069
26070
26071
26072
26073
26074
26075
26076
26077
26078
26079
26080
26081
26082
26083
26084
26085
26086
26087
26088
26089
26090
26091
26092
26093
26094
26095
26096
26097
26098
26099
26100
26101
26102
26103
26104
26105
26106
26107
26108
26109
26110
26111
26112
26113
26114
26115
26116
26117
26118
26119
26120
26121
26122
26123
26124
26125
26126
26127
26128
26129
26130
26131
26132
26133
26134
26135
26136
26137
26138
26139
26140
26141
26142
26143
26144
26145
26146
26147
26148
26149
26150
26151
26152
26153
26154
26155
26156
26157
26158
26159
26160
26161
26162
26163
26164
26165
26166
26167
26168
26169
26170
26171
26172
26173
26174
26175
26176
26177
26178
26179
26180
26181
26182
26183
26184
26185
26186
26187
26188
26189
26190
26191
26192
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202
26203
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223
26224
26225
26226
26227
26228
26229
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239
26240
26241
26242
26243
26244
26245
26246
26247
26248
26249
26250
26251
26252
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266
26267
26268
26269
26270
26271
26272
26273
26274
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298
26299
26300
26301
26302
26303
26304
26305
26306
26307
26308
26309
26310
26311
26312
26313
26314
26315
26316
26317
26318
26319
26320
26321
26322
26323
26324
26325
26326
26327
26328
26329
26330
26331
26332
26333
26334
26335
26336
26337
26338
26339
26340
26341
26342
26343
26344
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354
26355
26356
26357
26358
26359
26360
26361
26362
26363
26364
26365
26366
26367
26368
26369
26370
26371
26372
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383
26384
26385
26386
26387
26388
26389
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423
26424
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26437
26438
26439
26440
26441
26442
26443
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453
26454
26455
26456
26457
26458
26459
26460
26461
26462
26463
26464
26465
26466
26467
26468
26469
26470
26471
26472
26473
26474
26475
26476
26477
26478
26479
26480
26481
26482
26483
26484
26485
26486
26487
26488
26489
26490
26491
26492
26493
26494
26495
26496
26497
26498
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527
26528
26529
26530
26531
26532
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545
26546
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556
26557
26558
26559
26560
26561
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574
26575
26576
26577
26578
26579
26580
26581
26582
26583
26584
26585
26586
26587
26588
26589
26590
26591
26592
26593
26594
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604
26605
26606
26607
26608
26609
26610
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649
26650
26651
26652
26653
26654
26655
26656
26657
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667
26668
26669
26670
26671
26672
26673
26674
26675
26676
26677
26678
26679
26680
26681
26682
26683
26684
26685
26686
26687
26688
26689
26690
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
26703
26704
26705
26706
26707
26708
26709
26710
26711
26712
26713
26714
26715
26716
26717
26718
26719
26720
26721
26722
26723
26724
26725
26726
26727
26728
26729
26730
26731
26732
26733
26734
26735
26736
26737
26738
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752
26753
26754
26755
26756
26757
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767
26768
26769
26770
26771
26772
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782
26783
26784
26785
26786
26787
26788
26789
26790
26791
26792
26793
26794
26795
26796
26797
26798
26799
26800
26801
26802
26803
26804
26805
26806
26807
26808
26809
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829
26830
26831
26832
26833
26834
26835
26836
26837
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852
26853
26854
26855
26856
26857
26858
26859
26860
26861
26862
26863
26864
26865
26866
26867
26868
26869
26870
26871
26872
26873
26874
26875
26876
26877
26878
26879
26880
26881
26882
26883
26884
26885
26886
26887
26888
26889
26890
26891
26892
26893
26894
26895
26896
26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911
26912
26913
26914
26915
26916
26917
26918
26919
26920
26921
26922
26923
26924
26925
26926
26927
26928
26929
26930
26931
26932
26933
26934
26935
26936
26937
26938
26939
26940
26941
26942
26943
26944
26945
26946
26947
26948
26949
26950
26951
26952
26953
26954
26955
26956
26957
26958
26959
26960
26961
26962
26963
26964
26965
26966
26967
26968
26969
26970
26971
26972
26973
26974
26975
26976
26977
26978
26979
26980
26981
26982
26983
26984
26985
26986
26987
26988
26989
26990
26991
26992
26993
26994
26995
26996
26997
26998
26999
27000
27001
27002
27003
27004
27005
27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018
27019
27020
27021
27022
27023
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034
27035
27036
27037
27038
27039
27040
27041
27042
27043
27044
27045
27046
27047
27048
27049
27050
27051
27052
27053
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067
27068
27069
27070
27071
27072
27073
27074
27075
27076
27077
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087
27088
27089
27090
27091
27092
27093
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106
27107
27108
27109
27110
27111
27112
27113
27114
27115
27116
27117
27118
27119
27120
27121
27122
27123
27124
27125
27126
27127
27128
27129
27130
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
27141
27142
27143
27144
27145
27146
27147
27148
27149
27150
27151
27152
27153
27154
27155
27156
27157
27158
27159
27160
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189
27190
27191
27192
27193
27194
27195
27196
27197
27198
27199
27200
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219
27220
27221
27222
27223
27224
27225
27226
27227
27228
27229
27230
27231
27232
27233
27234
27235
27236
27237
27238
27239
27240
27241
27242
27243
27244
27245
27246
27247
27248
27249
27250
27251
27252
27253
27254
27255
27256
27257
27258
27259
27260
27261
27262
27263
27264
27265
27266
27267
27268
27269
27270
27271
27272
27273
27274
27275
27276
27277
27278
27279
27280
27281
27282
27283
27284
27285
27286
27287
27288
27289
27290
27291
27292
27293
27294
27295
27296
27297
27298
27299
27300
27301
27302
27303
27304
27305
27306
27307
27308
27309
27310
27311
27312
27313
27314
27315
27316
27317
27318
27319
27320
27321
27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
27333
27334
27335
27336
27337
27338
27339
27340
27341
27342
27343
27344
27345
27346
27347
27348
27349
27350
27351
27352
27353
27354
27355
27356
27357
27358
27359
27360
27361
27362
27363
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374
27375
27376
27377
27378
27379
27380
27381
27382
27383
27384
27385
27386
27387
27388
27389
27390
27391
27392
27393
27394
27395
27396
27397
27398
27399
27400
27401
27402
27403
27404
27405
27406
27407
27408
27409
27410
27411
27412
27413
27414
27415
27416
27417
27418
27419
27420
27421
27422
27423
27424
27425
27426
27427
27428
27429
27430
27431
27432
27433
27434
27435
27436
27437
27438
27439
27440
27441
27442
27443
27444
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469
27470
27471
27472
27473
27474
27475
27476
27477
27478
27479
27480
27481
27482
27483
27484
27485
27486
27487
27488
27489
27490
27491
27492
27493
27494
27495
27496
27497
27498
27499
27500
27501
27502
27503
27504
27505
27506
27507
27508
27509
27510
27511
27512
27513
27514
27515
27516
27517
27518
27519
27520
27521
27522
27523
27524
27525
27526
27527
27528
27529
27530
27531
27532
27533
27534
27535
27536
27537
27538
27539
27540
27541
27542
27543
27544
27545
27546
27547
27548
27549
27550
27551
27552
27553
27554
27555
27556
27557
27558
27559
27560
27561
27562
27563
27564
27565
27566
27567
27568
27569
27570
27571
27572
27573
27574
27575
27576
27577
27578
27579
27580
27581
27582
27583
27584
27585
27586
27587
27588
27589
27590
27591
27592
27593
27594
27595
27596
27597
27598
27599
27600
27601
27602
27603
27604
27605
27606
27607
27608
27609
27610
27611
27612
27613
27614
27615
27616
27617
27618
27619
27620
27621
27622
27623
27624
27625
27626
27627
27628
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639
27640
27641
27642
27643
27644
27645
27646
27647
27648
27649
27650
27651
27652
27653
27654
27655
27656
27657
27658
27659
27660
27661
27662
27663
27664
27665
27666
27667
27668
27669
27670
27671
27672
27673
27674
27675
27676
27677
27678
27679
27680
27681
27682
27683
27684
27685
27686
27687
27688
27689
27690
27691
27692
27693
27694
27695
27696
27697
27698
27699
27700
27701
27702
27703
27704
27705
27706
27707
27708
27709
27710
27711
27712
27713
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731
27732
27733
27734
27735
27736
27737
27738
27739
27740
27741
27742
27743
27744
27745
27746
27747
27748
27749
27750
27751
27752
27753
27754
27755
27756
27757
27758
27759
27760
27761
27762
27763
27764
27765
27766
27767
27768
27769
27770
27771
27772
27773
27774
27775
27776
27777
27778
27779
27780
27781
27782
27783
27784
27785
27786
27787
27788
27789
27790
27791
27792
27793
27794
27795
27796
27797
27798
27799
27800
27801
27802
27803
27804
27805
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815
27816
27817
27818
27819
27820
27821
27822
27823
27824
27825
27826
27827
27828
27829
27830
27831
27832
27833
27834
27835
27836
27837
27838
27839
27840
27841
27842
27843
27844
27845
27846
27847
27848
27849
27850
27851
27852
27853
27854
27855
27856
27857
27858
27859
27860
27861
27862
27863
27864
27865
27866
27867
27868
27869
27870
27871
27872
27873
27874
27875
27876
27877
27878
27879
27880
27881
27882
27883
27884
27885
27886
27887
27888
27889
27890
27891
27892
27893
27894
27895
27896
27897
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941
27942
27943
27944
27945
27946
27947
27948
27949
27950
27951
27952
27953
27954
27955
27956
27957
27958
27959
27960
27961
27962
27963
27964
27965
27966
27967
27968
27969
27970
27971
27972
27973
27974
27975
27976
27977
27978
27979
27980
27981
27982
27983
27984
27985
27986
27987
27988
27989
27990
27991
27992
27993
27994
27995
27996
27997
27998
27999
28000
28001
28002
28003
28004
28005
28006
28007
28008
28009
28010
28011
28012
28013
28014
28015
28016
28017
28018
28019
28020
28021
28022
28023
28024
28025
28026
28027
28028
28029
28030
28031
28032
28033
28034
28035
28036
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048
28049
28050
28051
28052
28053
28054
28055
28056
28057
28058
28059
28060
28061
28062
28063
28064
28065
28066
28067
28068
28069
28070
28071
28072
28073
28074
28075
28076
28077
28078
28079
28080
28081
28082
28083
28084
28085
28086
28087
28088
28089
28090
28091
28092
28093
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106
28107
28108
28109
28110
28111
28112
28113
28114
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124
28125
28126
28127
28128
28129
28130
28131
28132
28133
28134
28135
28136
28137
28138
28139
28140
28141
28142
28143
28144
28145
28146
28147
28148
28149
28150
28151
28152
28153
28154
28155
28156
28157
28158
28159
28160
28161
28162
28163
28164
28165
28166
28167
28168
28169
28170
28171
28172
28173
28174
28175
28176
28177
28178
28179
28180
28181
28182
28183
28184
28185
28186
28187
28188
28189
28190
28191
28192
28193
28194
28195
28196
28197
28198
28199
28200
28201
28202
28203
28204
28205
28206
28207
28208
28209
28210
28211
28212
28213
28214
28215
28216
28217
28218
28219
28220
28221
28222
28223
28224
28225
28226
28227
28228
28229
28230
28231
28232
28233
28234
28235
28236
28237
28238
28239
28240
28241
28242
28243
28244
28245
28246
28247
28248
28249
28250
28251
28252
28253
28254
28255
28256
28257
28258
28259
28260
28261
28262
28263
28264
28265
28266
28267
28268
28269
28270
28271
28272
28273
28274
28275
28276
28277
28278
28279
28280
28281
28282
28283
28284
28285
28286
28287
28288
28289
28290
28291
28292
28293
28294
28295
28296
28297
28298
28299
28300
28301
28302
28303
28304
28305
28306
28307
28308
28309
28310
28311
28312
28313
28314
28315
28316
28317
28318
28319
28320
28321
28322
28323
28324
28325
28326
28327
28328
28329
28330
28331
28332
28333
28334
28335
28336
28337
28338
28339
28340
28341
28342
28343
28344
28345
28346
28347
28348
28349
28350
28351
28352
28353
28354
28355
28356
28357
28358
28359
28360
28361
28362
28363
28364
28365
28366
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402
28403
28404
28405
28406
28407
28408
28409
28410
28411
28412
28413
28414
28415
28416
28417
28418
28419
28420
28421
28422
28423
28424
28425
28426
28427
28428
28429
28430
28431
28432
28433
28434
28435
28436
28437
28438
28439
28440
28441
28442
28443
28444
28445
28446
28447
28448
28449
28450
28451
28452
28453
28454
28455
28456
28457
28458
28459
28460
28461
28462
28463
28464
28465
28466
28467
28468
28469
28470
28471
28472
28473
28474
28475
28476
28477
28478
28479
28480
28481
28482
28483
28484
28485
28486
28487
28488
28489
28490
28491
28492
28493
28494
28495
28496
28497
28498
28499
28500
28501
28502
28503
28504
28505
28506
28507
28508
28509
28510
28511
28512
28513
28514
28515
28516
28517
28518
28519
28520
28521
28522
28523
28524
28525
28526
28527
28528
28529
28530
28531
28532
28533
28534
28535
28536
28537
28538
28539
28540
28541
28542
28543
28544
28545
28546
28547
28548
28549
28550
28551
28552
28553
28554
28555
28556
28557
28558
28559
28560
28561
28562
28563
28564
28565
28566
28567
28568
28569
28570
28571
28572
28573
28574
28575
28576
28577
28578
28579
28580
28581
28582
28583
28584
28585
28586
28587
28588
28589
28590
28591
28592
28593
28594
28595
28596
28597
28598
28599
28600
28601
28602
28603
28604
28605
28606
28607
28608
28609
28610
28611
28612
28613
28614
28615
28616
28617
28618
28619
28620
28621
28622
28623
28624
28625
28626
28627
28628
28629
28630
28631
28632
28633
28634
28635
28636
28637
28638
28639
28640
28641
28642
28643
28644
28645
28646
28647
28648
28649
28650
28651
28652
28653
28654
28655
28656
28657
28658
28659
28660
28661
28662
28663
28664
28665
28666
28667
28668
28669
28670
28671
28672
28673
28674
28675
28676
28677
28678
28679
28680
28681
28682
28683
28684
28685
28686
28687
28688
28689
28690
28691
28692
28693
28694
28695
28696
28697
28698
28699
28700
28701
28702
28703
28704
28705
28706
28707
28708
28709
28710
28711
28712
28713
28714
28715
28716
28717
28718
28719
28720
28721
28722
28723
28724
28725
28726
28727
28728
28729
28730
28731
28732
28733
28734
28735
28736
28737
28738
28739
28740
28741
28742
28743
28744
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755
28756
28757
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782
28783
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793
28794
28795
28796
28797
28798
28799
28800
28801
28802
28803
28804
28805
28806
28807
28808
28809
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969
28970
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000
29001
29002
29003
29004
29005
29006
29007
29008
29009
29010
29011
29012
29013
29014
29015
29016
29017
29018
29019
29020
29021
29022
29023
29024
29025
29026
29027
29028
29029
29030
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051
29052
29053
29054
29055
29056
29057
29058
29059
29060
29061
29062
29063
29064
29065
29066
29067
29068
29069
29070
29071
29072
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085
29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102
29103
29104
29105
29106
29107
29108
29109
29110
29111
29112
29113
29114
29115
29116
29117
29118
29119
29120
29121
29122
29123
29124
29125
29126
29127
29128
29129
29130
29131
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148
29149
29150
29151
29152
29153
29154
29155
29156
29157
29158
29159
29160
29161
29162
29163
29164
29165
29166
29167
29168
29169
29170
29171
29172
29173
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197
29198
29199
29200
29201
29202
29203
29204
29205
29206
29207
29208
29209
29210
29211
29212
29213
29214
29215
29216
29217
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236
29237
29238
29239
29240
29241
29242
29243
29244
29245
29246
29247
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268
29269
29270
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286
29287
29288
29289
29290
29291
29292
29293
29294
29295
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314
29315
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325
29326
29327
29328
29329
29330
29331
29332
29333
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376
29377
29378
29379
29380
29381
29382
29383
29384
29385
29386
29387
29388
29389
29390
29391
29392
29393
29394
29395
29396
29397
29398
29399
29400
29401
29402
29403
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440
29441
29442
29443
29444
29445
29446
29447
29448
29449
29450
29451
29452
29453
29454
29455
29456
29457
29458
29459
29460
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470
29471
29472
29473
29474
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518
29519
29520
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532
29533
29534
29535
29536
29537
29538
29539
29540
29541
29542
29543
29544
29545
29546
29547
29548
29549
29550
29551
29552
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564
29565
29566
29567
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578
29579
29580
29581
29582
29583
29584
29585
29586
29587
29588
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641
29642
29643
29644
29645
29646
29647
29648
29649
29650
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661
29662
29663
29664
29665
29666
29667
29668
29669
29670
29671
29672
29673
29674
29675
29676
29677
29678
29679
29680
29681
29682
29683
29684
29685
29686
29687
29688
29689
29690
29691
29692
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
29739
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753
29754
29755
29756
29757
29758
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770
29771
29772
29773
29774
29775
29776
29777
29778
29779
29780
29781
29782
29783
29784
29785
29786
29787
29788
29789
29790
29791
29792
29793
29794
29795
29796
29797
29798
29799
29800
29801
29802
29803
29804
29805
29806
29807
29808
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818
29819
29820
29821
29822
29823
29824
29825
29826
29827
29828
29829
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839
29840
29841
29842
29843
29844
29845
29846
29847
29848
29849
29850
29851
29852
29853
29854
29855
29856
29857
29858
29859
29860
29861
29862
29863
29864
29865
29866
29867
29868
29869
29870
29871
29872
29873
29874
29875
29876
29877
29878
29879
29880
29881
29882
29883
29884
29885
29886
29887
29888
29889
29890
29891
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911
29912
29913
29914
29915
29916
29917
29918
29919
29920
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937
29938
29939
29940
29941
29942
29943
29944
29945
29946
29947
29948
29949
29950
29951
29952
29953
29954
29955
29956
29957
29958
29959
29960
29961
29962
29963
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978
29979
29980
29981
29982
29983
29984
29985
29986
29987
29988
29989
29990
29991
29992
29993
29994
29995
29996
29997
29998
29999
30000
30001
30002
30003
30004
30005
30006
30007
30008
30009
30010
30011
30012
30013
30014
30015
30016
30017
30018
30019
30020
30021
30022
30023
30024
30025
30026
30027
30028
30029
30030
30031
30032
30033
30034
30035
30036
30037
30038
30039
30040
30041
30042
30043
30044
30045
30046
30047
30048
30049
30050
30051
30052
30053
30054
30055
30056
30057
30058
30059
30060
30061
30062
30063
30064
30065
30066
30067
30068
30069
30070
30071
30072
30073
30074
30075
30076
30077
30078
30079
30080
30081
30082
30083
30084
30085
30086
30087
30088
30089
30090
30091
30092
30093
30094
30095
30096
30097
30098
30099
30100
30101
30102
30103
30104
30105
30106
30107
30108
30109
30110
30111
30112
30113
30114
30115
30116
30117
30118
30119
30120
30121
30122
30123
30124
30125
30126
30127
30128
30129
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140
30141
30142
30143
30144
30145
30146
30147
30148
30149
30150
30151
30152
30153
30154
30155
30156
30157
30158
30159
30160
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171
30172
30173
30174
30175
30176
30177
30178
30179
30180
30181
30182
30183
30184
30185
30186
30187
30188
30189
30190
30191
30192
30193
30194
30195
30196
30197
30198
30199
30200
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214
30215
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226
30227
30228
30229
30230
30231
30232
30233
30234
30235
30236
30237
30238
30239
30240
30241
30242
30243
30244
30245
30246
30247
30248
30249
30250
30251
30252
30253
30254
30255
30256
30257
30258
30259
30260
30261
30262
30263
30264
30265
30266
30267
30268
30269
30270
30271
30272
30273
30274
30275
30276
30277
30278
30279
30280
30281
30282
30283
30284
30285
30286
30287
30288
30289
30290
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300
30301
30302
30303
30304
30305
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
30325
30326
30327
30328
30329
30330
30331
30332
30333
30334
30335
30336
30337
30338
30339
30340
30341
30342
30343
30344
30345
30346
30347
30348
30349
30350
30351
30352
30353
30354
30355
30356
30357
30358
30359
30360
30361
30362
30363
30364
30365
30366
30367
30368
30369
30370
30371
30372
30373
30374
30375
30376
30377
30378
30379
30380
30381
30382
30383
30384
30385
30386
30387
30388
30389
30390
30391
30392
30393
30394
30395
30396
30397
30398
30399
30400
30401
30402
30403
30404
30405
30406
30407
30408
30409
30410
30411
30412
30413
30414
30415
30416
30417
30418
30419
30420
30421
30422
30423
30424
30425
30426
30427
30428
30429
30430
30431
30432
30433
30434
30435
30436
30437
30438
30439
30440
30441
30442
30443
30444
30445
30446
30447
30448
30449
30450
30451
30452
30453
30454
30455
30456
30457
30458
30459
30460
30461
30462
30463
30464
30465
30466
30467
30468
30469
30470
30471
30472
30473
30474
30475
30476
30477
30478
30479
30480
30481
30482
30483
30484
30485
30486
30487
30488
30489
30490
30491
30492
30493
30494
30495
30496
30497
30498
30499
30500
30501
30502
30503
30504
30505
30506
30507
30508
30509
30510
30511
30512
30513
30514
30515
30516
30517
30518
30519
30520
30521
30522
30523
30524
30525
30526
30527
30528
30529
30530
30531
30532
30533
30534
30535
30536
30537
30538
30539
30540
30541
30542
30543
30544
30545
30546
30547
30548
30549
30550
30551
30552
30553
30554
30555
30556
30557
30558
30559
30560
30561
30562
30563
30564
30565
30566
30567
30568
30569
30570
30571
30572
30573
30574
30575
30576
30577
30578
30579
30580
30581
30582
30583
30584
30585
30586
30587
30588
30589
30590
30591
30592
30593
30594
30595
30596
30597
30598
30599
30600
30601
30602
30603
30604
30605
30606
30607
30608
30609
30610
30611
30612
30613
30614
30615
30616
30617
30618
30619
30620
30621
30622
30623
30624
30625
30626
30627
30628
30629
30630
30631
30632
30633
30634
30635
30636
30637
30638
30639
30640
30641
30642
30643
30644
30645
30646
30647
30648
30649
30650
30651
30652
30653
30654
30655
30656
30657
30658
30659
30660
30661
30662
30663
30664
30665
30666
30667
30668
30669
30670
30671
30672
30673
30674
30675
30676
30677
30678
30679
30680
30681
30682
30683
30684
30685
30686
30687
30688
30689
30690
30691
30692
30693
30694
30695
30696
30697
30698
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719
30720
30721
30722
30723
30724
30725
30726
30727
30728
30729
30730
30731
30732
30733
30734
30735
30736
30737
30738
30739
30740
30741
30742
30743
30744
30745
30746
30747
30748
30749
30750
30751
30752
30753
30754
30755
30756
30757
30758
30759
30760
30761
30762
30763
30764
30765
30766
30767
30768
30769
30770
30771
30772
30773
30774
30775
30776
30777
30778
30779
30780
30781
30782
30783
30784
30785
30786
30787
30788
30789
30790
30791
30792
30793
30794
30795
30796
30797
30798
30799
30800
30801
30802
30803
30804
30805
30806
30807
30808
30809
30810
30811
30812
30813
30814
30815
30816
30817
30818
30819
30820
30821
30822
30823
30824
30825
30826
30827
30828
30829
30830
30831
30832
30833
30834
30835
30836
30837
30838
30839
30840
30841
30842
30843
30844
30845
30846
30847
30848
30849
30850
30851
30852
30853
30854
30855
30856
30857
30858
30859
30860
30861
30862
30863
30864
30865
30866
30867
30868
30869
30870
30871
30872
30873
30874
30875
30876
30877
30878
30879
30880
30881
30882
30883
30884
30885
30886
30887
30888
30889
30890
30891
30892
30893
30894
30895
30896
30897
30898
30899
30900
30901
30902
30903
30904
30905
30906
30907
30908
30909
30910
30911
30912
30913
30914
30915
30916
30917
30918
30919
30920
30921
30922
30923
30924
30925
30926
30927
30928
30929
30930
30931
30932
30933
30934
30935
30936
30937
30938
30939
30940
30941
30942
30943
30944
30945
30946
30947
30948
30949
30950
30951
30952
30953
30954
30955
30956
30957
30958
30959
30960
30961
30962
30963
30964
30965
30966
30967
30968
30969
30970
30971
30972
30973
30974
30975
30976
30977
30978
30979
30980
30981
30982
30983
30984
30985
30986
30987
30988
30989
30990
30991
30992
30993
30994
30995
30996
30997
30998
30999
31000
31001
31002
31003
31004
31005
31006
31007
31008
31009
31010
31011
31012
31013
31014
31015
31016
31017
31018
31019
31020
31021
31022
31023
31024
31025
31026
31027
31028
31029
31030
31031
31032
31033
31034
31035
31036
31037
31038
31039
31040
31041
31042
31043
31044
31045
31046
31047
31048
31049
31050
31051
31052
31053
31054
31055
31056
31057
31058
31059
31060
31061
31062
31063
31064
31065
31066
31067
31068
31069
31070
31071
31072
31073
31074
31075
31076
31077
31078
31079
31080
31081
31082
31083
31084
31085
31086
31087
31088
31089
31090
31091
31092
31093
31094
31095
31096
31097
31098
31099
31100
31101
31102
31103
31104
31105
31106
31107
31108
31109
31110
31111
31112
31113
31114
31115
31116
31117
31118
31119
31120
31121
31122
31123
31124
31125
31126
31127
31128
31129
31130
31131
31132
31133
31134
31135
31136
31137
31138
31139
31140
31141
31142
31143
31144
31145
31146
31147
31148
31149
31150
31151
31152
31153
31154
31155
31156
31157
31158
31159
31160
31161
31162
31163
31164
31165
31166
31167
31168
31169
31170
31171
31172
31173
31174
31175
31176
31177
31178
31179
31180
31181
31182
31183
31184
31185
31186
31187
31188
31189
31190
31191
31192
31193
31194
31195
31196
31197
31198
31199
31200
31201
31202
31203
31204
31205
31206
31207
31208
31209
31210
31211
31212
31213
31214
31215
31216
31217
31218
31219
31220
31221
31222
31223
31224
31225
31226
31227
31228
31229
31230
31231
31232
31233
31234
31235
31236
31237
31238
31239
31240
31241
31242
31243
31244
31245
31246
31247
31248
31249
31250
31251
31252
31253
31254
31255
31256
31257
31258
31259
31260
31261
31262
31263
31264
31265
31266
31267
31268
31269
31270
31271
31272
31273
31274
31275
31276
31277
31278
31279
31280
31281
31282
31283
31284
31285
31286
31287
31288
31289
31290
31291
31292
31293
31294
31295
31296
31297
31298
31299
31300
31301
31302
31303
31304
31305
31306
31307
31308
31309
31310
31311
31312
31313
31314
31315
31316
31317
31318
31319
31320
31321
31322
31323
31324
31325
31326
31327
31328
31329
31330
31331
31332
31333
31334
31335
31336
31337
31338
31339
31340
31341
31342
31343
31344
31345
31346
31347
31348
31349
31350
31351
31352
31353
31354
31355
31356
31357
31358
31359
31360
31361
31362
31363
31364
31365
31366
31367
31368
31369
31370
31371
31372
31373
31374
31375
31376
31377
31378
31379
31380
31381
31382
31383
31384
31385
31386
31387
31388
31389
31390
31391
31392
31393
31394
31395
31396
31397
31398
31399
31400
31401
31402
31403
31404
31405
31406
31407
31408
31409
31410
31411
31412
31413
31414
31415
31416
31417
31418
31419
31420
31421
31422
31423
31424
31425
31426
31427
31428
31429
31430
31431
31432
31433
31434
31435
31436
31437
31438
31439
31440
31441
31442
31443
31444
31445
31446
31447
31448
31449
31450
31451
31452
31453
31454
31455
31456
31457
31458
31459
31460
31461
31462
31463
31464
31465
31466
31467
31468
31469
31470
31471
31472
31473
31474
31475
31476
31477
31478
31479
31480
31481
31482
31483
31484
31485
31486
31487
31488
31489
31490
31491
31492
31493
31494
31495
31496
31497
31498
31499
31500
31501
31502
31503
31504
31505
31506
31507
31508
31509
31510
31511
31512
31513
31514
31515
31516
31517
31518
31519
31520
31521
31522
31523
31524
31525
31526
31527
31528
31529
31530
31531
31532
31533
31534
31535
31536
31537
31538
31539
31540
31541
31542
31543
31544
31545
31546
31547
31548
31549
31550
31551
31552
31553
31554
31555
31556
31557
31558
31559
31560
31561
31562
31563
31564
31565
31566
31567
31568
31569
31570
31571
31572
31573
31574
31575
31576
31577
31578
31579
31580
31581
31582
31583
31584
31585
31586
31587
31588
31589
31590
31591
31592
31593
31594
31595
31596
31597
31598
31599
31600
31601
31602
31603
31604
31605
31606
31607
31608
31609
31610
31611
31612
31613
31614
31615
31616
31617
31618
31619
31620
31621
31622
31623
31624
31625
31626
31627
31628
31629
31630
31631
31632
31633
31634
31635
31636
31637
31638
31639
31640
31641
31642
31643
31644
31645
31646
31647
31648
31649
31650
31651
31652
31653
31654
31655
31656
31657
31658
31659
31660
31661
31662
31663
31664
31665
31666
31667
31668
31669
31670
31671
31672
31673
31674
31675
31676
31677
31678
31679
31680
31681
31682
31683
31684
31685
31686
31687
31688
31689
31690
31691
31692
31693
31694
31695
31696
31697
31698
31699
31700
31701
31702
31703
31704
31705
31706
31707
31708
31709
31710
31711
31712
31713
31714
31715
31716
31717
31718
31719
31720
31721
31722
31723
31724
31725
31726
31727
31728
31729
31730
31731
31732
31733
31734
31735
31736
31737
31738
31739
31740
31741
31742
31743
31744
31745
31746
31747
31748
31749
31750
31751
31752
31753
31754
31755
31756
31757
31758
31759
31760
31761
31762
31763
31764
31765
31766
31767
31768
31769
31770
31771
31772
31773
31774
31775
31776
31777
31778
31779
31780
31781
31782
31783
31784
31785
31786
31787
31788
31789
31790
31791
31792
31793
31794
31795
31796
31797
31798
31799
31800
31801
31802
31803
31804
31805
31806
31807
31808
31809
31810
31811
31812
31813
31814
31815
31816
31817
31818
31819
31820
31821
31822
31823
31824
31825
31826
31827
31828
31829
31830
31831
31832
31833
31834
31835
31836
31837
31838
31839
31840
31841
31842
31843
31844
31845
31846
31847
31848
31849
31850
31851
31852
31853
31854
31855
31856
31857
31858
31859
31860
31861
31862
31863
31864
31865
31866
31867
31868
31869
31870
31871
31872
31873
31874
31875
31876
31877
31878
31879
31880
31881
31882
31883
31884
31885
31886
31887
31888
31889
31890
31891
31892
31893
31894
31895
31896
31897
31898
31899
31900
31901
31902
31903
31904
31905
31906
31907
31908
31909
31910
31911
31912
31913
31914
31915
31916
31917
31918
31919
31920
31921
31922
31923
31924
31925
31926
31927
31928
31929
31930
31931
31932
31933
31934
31935
31936
31937
31938
31939
31940
31941
31942
31943
31944
31945
31946
31947
31948
31949
31950
31951
31952
31953
31954
31955
31956
31957
31958
31959
31960
31961
31962
31963
31964
31965
31966
31967
31968
31969
31970
31971
31972
31973
31974
31975
31976
31977
31978
31979
31980
31981
31982
31983
31984
31985
31986
31987
31988
31989
31990
31991
31992
31993
31994
31995
31996
31997
31998
31999
32000
32001
32002
32003
32004
32005
32006
32007
32008
32009
32010
32011
32012
32013
32014
32015
32016
32017
32018
32019
32020
32021
32022
32023
32024
32025
32026
32027
32028
32029
32030
32031
32032
32033
32034
32035
32036
32037
32038
32039
32040
32041
32042
32043
32044
32045
32046
32047
32048
32049
32050
32051
32052
32053
32054
32055
32056
32057
32058
32059
32060
32061
32062
32063
32064
32065
32066
32067
32068
32069
32070
32071
32072
32073
32074
32075
32076
32077
32078
32079
32080
32081
32082
32083
32084
32085
32086
32087
32088
32089
32090
32091
32092
32093
32094
32095
32096
32097
32098
32099
32100
32101
32102
32103
32104
32105
32106
32107
32108
32109
32110
32111
32112
32113
32114
32115
32116
32117
32118
32119
32120
32121
32122
32123
32124
32125
32126
32127
32128
32129
32130
32131
32132
32133
32134
32135
32136
32137
32138
32139
32140
32141
32142
32143
32144
32145
32146
32147
32148
32149
32150
32151
32152
32153
32154
32155
32156
32157
32158
32159
32160
32161
32162
32163
32164
32165
32166
32167
32168
32169
32170
32171
32172
32173
32174
32175
32176
32177
32178
32179
32180
32181
32182
32183
32184
32185
32186
32187
32188
32189
32190
32191
32192
32193
32194
32195
32196
32197
32198
32199
32200
32201
32202
32203
32204
32205
32206
32207
32208
32209
32210
32211
32212
32213
32214
32215
32216
32217
32218
32219
32220
32221
32222
32223
32224
32225
32226
32227
32228
32229
32230
32231
32232
32233
32234
32235
32236
32237
32238
32239
32240
32241
32242
32243
32244
32245
32246
32247
32248
32249
32250
32251
32252
32253
32254
32255
32256
32257
32258
32259
32260
32261
32262
32263
32264
32265
32266
32267
32268
32269
32270
32271
32272
32273
32274
32275
32276
32277
32278
32279
32280
32281
32282
32283
32284
32285
32286
32287
32288
32289
32290
32291
32292
32293
32294
32295
32296
32297
32298
32299
32300
32301
32302
32303
32304
32305
32306
32307
32308
32309
32310
32311
32312
32313
32314
32315
32316
32317
32318
32319
32320
32321
32322
32323
32324
32325
32326
32327
32328
32329
32330
32331
32332
32333
32334
32335
32336
32337
32338
32339
32340
32341
32342
32343
32344
32345
32346
32347
32348
32349
32350
32351
32352
32353
32354
32355
32356
32357
32358
32359
32360
32361
32362
32363
32364
32365
32366
32367
32368
32369
32370
32371
32372
32373
32374
32375
32376
32377
32378
32379
32380
32381
32382
32383
32384
32385
32386
32387
32388
32389
32390
32391
32392
32393
32394
32395
32396
32397
32398
32399
32400
32401
32402
32403
32404
32405
32406
32407
32408
32409
32410
32411
32412
32413
32414
32415
32416
32417
32418
32419
32420
32421
32422
32423
32424
32425
32426
32427
32428
32429
32430
32431
32432
32433
32434
32435
32436
32437
32438
32439
32440
32441
32442
32443
32444
32445
32446
32447
32448
32449
32450
32451
32452
32453
32454
32455
32456
32457
32458
32459
32460
32461
32462
32463
32464
32465
32466
32467
32468
32469
32470
32471
32472
32473
32474
32475
32476
32477
32478
32479
32480
32481
32482
32483
32484
32485
32486
32487
32488
32489
32490
32491
32492
32493
32494
32495
32496
32497
32498
32499
32500
32501
32502
32503
32504
32505
32506
32507
32508
32509
32510
32511
32512
32513
32514
32515
32516
32517
32518
32519
32520
32521
32522
32523
32524
32525
32526
32527
32528
32529
32530
32531
32532
32533
32534
32535
32536
32537
32538
32539
32540
32541
32542
32543
32544
32545
32546
32547
32548
32549
32550
32551
32552
32553
32554
32555
32556
32557
32558
32559
32560
32561
32562
32563
32564
32565
32566
32567
32568
32569
32570
32571
32572
32573
32574
32575
32576
32577
32578
32579
32580
32581
32582
32583
32584
32585
32586
32587
32588
32589
32590
32591
32592
32593
32594
32595
32596
32597
32598
32599
32600
32601
32602
32603
32604
32605
32606
32607
32608
32609
32610
32611
32612
32613
32614
32615
32616
32617
32618
32619
32620
32621
32622
32623
32624
32625
32626
32627
32628
32629
32630
32631
32632
32633
32634
32635
32636
32637
32638
32639
32640
32641
32642
32643
32644
32645
32646
32647
32648
32649
32650
32651
32652
32653
32654
32655
32656
32657
32658
32659
32660
32661
32662
32663
32664
32665
32666
32667
32668
32669
32670
32671
32672
32673
32674
32675
32676
32677
32678
32679
32680
32681
32682
32683
32684
32685
32686
32687
32688
32689
32690
32691
32692
32693
32694
32695
32696
32697
32698
32699
32700
32701
32702
32703
32704
32705
32706
32707
32708
32709
32710
32711
32712
32713
32714
32715
32716
32717
32718
32719
32720
32721
32722
32723
32724
32725
32726
32727
32728
32729
32730
32731
32732
32733
32734
32735
32736
32737
32738
32739
32740
32741
32742
32743
32744
32745
32746
32747
32748
32749
32750
32751
32752
32753
32754
32755
32756
32757
32758
32759
32760
32761
32762
32763
32764
32765
32766
32767
32768
32769
32770
32771
32772
32773
32774
32775
32776
32777
32778
32779
32780
32781
32782
32783
32784
32785
32786
32787
32788
32789
32790
32791
32792
32793
32794
32795
32796
32797
32798
32799
32800
32801
32802
32803
32804
32805
32806
32807
32808
32809
32810
32811
32812
32813
32814
32815
32816
32817
32818
32819
32820
32821
32822
32823
32824
32825
32826
32827
32828
32829
32830
32831
32832
32833
32834
32835
32836
32837
32838
32839
32840
32841
32842
32843
32844
32845
32846
32847
32848
32849
32850
32851
32852
32853
32854
32855
32856
32857
32858
32859
32860
32861
32862
32863
32864
32865
32866
32867
32868
32869
32870
32871
32872
32873
32874
32875
32876
32877
32878
32879
32880
32881
32882
32883
32884
32885
32886
32887
32888
32889
32890
32891
32892
32893
32894
32895
32896
32897
32898
32899
32900
32901
32902
32903
32904
32905
32906
32907
32908
32909
32910
32911
32912
32913
32914
32915
32916
32917
32918
32919
32920
32921
32922
32923
32924
32925
32926
32927
32928
32929
32930
32931
32932
32933
32934
32935
32936
32937
32938
32939
32940
32941
32942
32943
32944
32945
32946
32947
32948
32949
32950
32951
32952
32953
32954
32955
32956
32957
32958
32959
32960
32961
32962
32963
32964
32965
32966
32967
32968
32969
32970
32971
32972
32973
32974
32975
32976
32977
32978
32979
32980
32981
32982
32983
32984
32985
32986
32987
32988
32989
32990
32991
32992
32993
32994
32995
32996
32997
32998
32999
33000
33001
33002
33003
33004
33005
33006
33007
33008
33009
33010
33011
33012
33013
33014
33015
33016
33017
33018
33019
33020
33021
33022
33023
33024
33025
33026
33027
33028
33029
33030
33031
33032
33033
33034
33035
33036
33037
33038
33039
33040
33041
33042
33043
33044
33045
33046
33047
33048
33049
33050
33051
33052
33053
33054
33055
33056
33057
33058
33059
33060
33061
33062
33063
33064
33065
33066
33067
33068
33069
33070
33071
33072
33073
33074
33075
33076
33077
33078
33079
33080
33081
33082
33083
33084
33085
33086
33087
33088
33089
33090
33091
33092
33093
33094
33095
33096
33097
33098
33099
33100
33101
33102
33103
33104
33105
33106
33107
33108
33109
33110
33111
33112
33113
33114
33115
33116
33117
33118
33119
33120
33121
33122
33123
33124
33125
33126
33127
33128
33129
33130
33131
33132
33133
33134
33135
33136
33137
33138
33139
33140
33141
33142
33143
33144
33145
33146
33147
33148
33149
33150
33151
33152
33153
33154
33155
33156
33157
33158
33159
33160
33161
33162
33163
33164
33165
33166
33167
33168
33169
33170
33171
33172
33173
33174
33175
33176
33177
33178
33179
33180
33181
33182
33183
33184
33185
33186
33187
33188
33189
33190
33191
33192
33193
33194
33195
33196
33197
33198
33199
33200
33201
33202
33203
33204
33205
33206
33207
33208
33209
33210
33211
33212
33213
33214
33215
33216
33217
33218
33219
33220
33221
33222
33223
33224
33225
33226
33227
33228
33229
33230
33231
33232
33233
33234
33235
33236
33237
33238
33239
33240
33241
33242
33243
33244
33245
33246
33247
33248
33249
33250
33251
33252
33253
33254
33255
33256
33257
33258
33259
33260
33261
33262
33263
33264
33265
33266
33267
33268
33269
33270
33271
33272
33273
33274
33275
33276
33277
33278
33279
33280
33281
33282
33283
33284
33285
33286
33287
33288
33289
33290
33291
33292
33293
33294
33295
33296
33297
33298
33299
33300
33301
33302
33303
33304
33305
33306
33307
33308
33309
33310
33311
33312
33313
33314
33315
33316
33317
33318
33319
33320
33321
33322
33323
33324
33325
33326
33327
33328
33329
33330
33331
33332
33333
33334
33335
33336
33337
33338
33339
33340
33341
33342
33343
33344
33345
33346
33347
33348
33349
33350
33351
33352
33353
33354
33355
33356
33357
33358
33359
33360
33361
33362
33363
33364
33365
33366
33367
33368
33369
33370
33371
33372
33373
33374
33375
33376
33377
33378
33379
33380
33381
33382
33383
33384
33385
33386
33387
33388
33389
33390
33391
33392
33393
33394
33395
33396
33397
33398
33399
33400
33401
33402
33403
33404
33405
33406
33407
33408
33409
33410
33411
33412
33413
33414
33415
33416
33417
33418
33419
33420
33421
33422
33423
33424
33425
33426
33427
33428
33429
33430
33431
33432
33433
33434
33435
33436
33437
33438
33439
33440
33441
33442
33443
33444
33445
33446
33447
33448
33449
33450
33451
33452
33453
33454
33455
33456
33457
33458
33459
33460
33461
33462
33463
33464
33465
33466
33467
33468
33469
33470
33471
33472
33473
33474
33475
33476
33477
33478
33479
33480
33481
33482
33483
33484
33485
33486
33487
33488
33489
33490
33491
33492
33493
33494
33495
33496
33497
33498
33499
33500
33501
33502
33503
33504
33505
33506
33507
33508
33509
33510
33511
33512
33513
33514
33515
33516
33517
33518
33519
33520
33521
33522
33523
33524
33525
33526
33527
33528
33529
33530
33531
33532
33533
33534
33535
33536
33537
33538
33539
33540
33541
33542
33543
33544
33545
33546
33547
33548
33549
33550
33551
33552
33553
33554
33555
33556
33557
33558
33559
33560
33561
33562
33563
33564
33565
33566
33567
33568
33569
33570
33571
33572
33573
33574
33575
33576
33577
33578
33579
33580
33581
33582
33583
33584
33585
33586
33587
33588
33589
33590
33591
33592
33593
33594
33595
33596
33597
33598
33599
33600
33601
33602
33603
33604
33605
33606
33607
33608
33609
33610
33611
33612
33613
33614
33615
33616
33617
33618
33619
33620
33621
33622
33623
33624
33625
33626
33627
33628
33629
33630
33631
33632
33633
33634
33635
33636
33637
33638
33639
33640
33641
33642
33643
33644
33645
33646
33647
33648
33649
33650
33651
33652
33653
33654
33655
33656
33657
33658
33659
33660
33661
33662
33663
33664
33665
33666
33667
33668
33669
33670
33671
33672
33673
33674
33675
33676
33677
33678
33679
33680
33681
33682
33683
33684
33685
33686
33687
33688
33689
33690
33691
33692
33693
33694
33695
33696
33697
33698
33699
33700
33701
33702
33703
33704
33705
33706
33707
33708
33709
33710
33711
33712
33713
33714
33715
33716
33717
33718
33719
33720
33721
33722
33723
33724
33725
33726
33727
33728
33729
33730
33731
33732
33733
33734
33735
33736
33737
33738
33739
33740
33741
33742
33743
33744
33745
33746
33747
33748
33749
33750
33751
33752
33753
33754
33755
33756
33757
33758
33759
33760
33761
33762
33763
33764
33765
33766
33767
33768
33769
33770
33771
33772
33773
33774
33775
33776
33777
33778
33779
33780
33781
33782
33783
33784
33785
33786
33787
33788
33789
33790
33791
33792
33793
33794
33795
33796
33797
33798
33799
33800
33801
33802
33803
33804
33805
33806
33807
33808
33809
33810
33811
33812
33813
33814
33815
33816
33817
33818
33819
33820
33821
33822
33823
33824
33825
33826
33827
33828
33829
33830
33831
Index: git/Makefile.target
===================================================================
--- git.orig/Makefile.target	2009-05-23 11:22:16.000000000 +0100
+++ git/Makefile.target	2009-05-23 11:59:35.000000000 +0100
@@ -153,6 +153,12 @@
 CPPFLAGS+=-I$(SRC_PATH)/fpu
 LIBOBJS+= op_helper.o helper.o
 
+ifeq ($(TARGET_BASE_ARCH), i386)
+LIBOBJS+=helper_opengl.o opengl_exec.o
+else
+LIBOBJS+=opengl_dummy.o
+endif
+
 ifeq ($(TARGET_BASE_ARCH), arm)
 LIBOBJS+= neon_helper.o iwmmxt_helper.o
 endif
@@ -224,6 +230,21 @@
 
 cpu-exec.o: CFLAGS += $(HELPER_CFLAGS)
 
+parse_gl_h: parse_gl_h.c
+	$(CC) -g -o $@ $<
+server_stub.c: parse_gl_h
+	./parse_gl_h
+gl_func.h: parse_gl_h
+	./parse_gl_h
+GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing
+opengl_func.h: gl_func.h
+helper_opengl.o: helper_opengl.c opengl_func.h server_stub.c
+	$(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I.. -I. -I../fpu -I../target-i386 -DNEED_CPU_H
+gl_beginend.h: ../target-i386/beginend_funcs.sh
+	$< > $@
+opengl_exec.o : opengl_exec.c server_stub.c gl_func.h opengl_func.h gl_beginend.h
+	$(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I. -I../target-i386
+
 #########################################################
 # Linux user emulator target
 
@@ -724,7 +745,7 @@
 main.o: CFLAGS+=-p
 endif
 
-$(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)
+$(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)  -lGL -lGLU
 
 $(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a
 	$(LINK)
Index: git/hw/vmware_vga.c
===================================================================
--- git.orig/hw/vmware_vga.c	2009-05-23 11:22:16.000000000 +0100
+++ git/hw/vmware_vga.c	2009-05-23 11:22:17.000000000 +0100
@@ -484,6 +484,8 @@
 
 #define CMD(f)	le32_to_cpu(s->cmd->f)
 
+static uint32_t last_cmd;
+
 static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
 {
     if (!s->config || !s->enable)
@@ -493,11 +495,18 @@
 
 static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
 {
-    uint32_t cmd = s->fifo[CMD(stop) >> 2];
-    s->cmd->stop = cpu_to_le32(CMD(stop) + 4);
-    if (CMD(stop) >= CMD(max))
+    int offset = CMD(stop);
+
+    if (unlikely(s->cmd->next_cmd == s->cmd->stop)) {
+        fprintf(stderr, "%s: FIFO empty during CMD %i\n",
+                        __FUNCTION__, last_cmd);
+        return 0x00000000;
+    }
+
+    s->cmd->stop = cpu_to_le32(offset + 4);
+    if (offset + 4 >= CMD(max))
         s->cmd->stop = s->cmd->min;
-    return cmd;
+    return s->fifo[offset >> 2];
 }
 
 static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
@@ -507,12 +516,12 @@
 
 static void vmsvga_fifo_run(struct vmsvga_state_s *s)
 {
-    uint32_t cmd, colour;
+    uint32_t colour;
     int args = 0;
     int x, y, dx, dy, width, height;
     struct vmsvga_cursor_definition_s cursor;
     while (!vmsvga_fifo_empty(s))
-        switch (cmd = vmsvga_fifo_read(s)) {
+        switch (last_cmd = vmsvga_fifo_read(s)) {
         case SVGA_CMD_UPDATE:
         case SVGA_CMD_UPDATE_VERBOSE:
             x = vmsvga_fifo_read(s);
@@ -612,7 +621,7 @@
             while (args --)
                 vmsvga_fifo_read(s);
             printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
-                            __FUNCTION__, cmd);
+                            __FUNCTION__, last_cmd);
             break;
         }
 
Index: git/kqemu.c
===================================================================
--- git.orig/kqemu.c	2009-05-23 11:22:16.000000000 +0100
+++ git/kqemu.c	2009-05-23 11:22:17.000000000 +0100
@@ -93,6 +93,8 @@
 int qpi_io_memory;
 uint32_t kqemu_comm_base; /* physical address of the QPI communication page */
 
+extern int enable_gl;
+
 #define cpuid(index, eax, ebx, ecx, edx) \
   asm volatile ("cpuid" \
                 : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) \
@@ -860,6 +862,22 @@
     else
         env->hflags &= ~HF_OSFXSR_MASK;
 
+    /* OPENGL Stuff */
+    if (enable_gl && ((env->hflags & HF_CPL_MASK) == 3)) {
+        int index = (env->eip >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
+        if (env->segs[R_CS].base != 0)
+            fprintf(stderr, "env->segs[R_CS].base != 0 !\n");
+        else if (__builtin_expect(env->tlb_table[1][index].addr_code !=
+                           (env->eip & TARGET_PAGE_MASK), 0))
+            ldub_code(env->eip);
+
+        if (env->tlb_table[1][index].addend) {
+            unsigned char *ptr = env->eip + env->tlb_table[1][index].addend;
+            if (ptr[0] == 0xCD && ptr[1] == 0x99)
+                helper_opengl();
+        }
+    }
+
     LOG_INT("kqemu: kqemu_cpu_exec: ret=0x%x\n", ret);
     if (ret == KQEMU_RET_SYSCALL) {
         /* syscall instruction */
Index: git/target-i386/beginend_funcs.sh
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/beginend_funcs.sh	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,23 @@
+#! /bin/sh
+# Copyright 2008 (C) Intel Corporation
+#
+# echo names of functions that are legal between a glBegin and glEnd pair.
+echo -e MAGIC_MACRO\(glVertex{2,3,4}{s,i,f,d}{,v}\)\\n
+echo -e MAGIC_MACRO\(glTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
+echo -e MAGIC_MACRO\(glMultiTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
+echo -e MAGIC_MACRO\(glNormal3{b,s,i,f,d}{,v}\)\\n
+echo -e MAGIC_MACRO\(glFogCoord{f,d}{,v}\)\\n
+echo -e MAGIC_MACRO\(glColor{3,4}{b,s,i,f,d,ub,us,ui}{,v}\)\\n
+echo -e MAGIC_MACRO\(glSecondaryColor3{b,s,i,f,d,ub,us,ui}{,v}\)\\n
+echo -e MAGIC_MACRO\(glIndex{s,i,f,d,ub}{,v}\)\\n
+echo -e MAGIC_MACRO\(glVertexAttrib{1,2,3,4}{s,f,d}{,v}\)\\n
+echo -e MAGIC_MACRO\(glVertexAttrib4{b,i,ub,us,ui}v\)\\n
+echo -e MAGIC_MACRO\(glVertexAttrib4Nub\)\\n
+echo -e MAGIC_MACRO\(glVertexAttrib4N{b,s,i,ub,us,ui}v\)\\n
+echo -e MAGIC_MACRO\(glArrayElement\)\\n
+echo -e MAGIC_MACRO\(glEvalCoord{1,2}{f,d}{,v}\)\\n
+echo -e MAGIC_MACRO\(glEvalPoint{1,2}\)\\n
+echo -e MAGIC_MACRO\(glMaterial{i,f}{,v}\)\\n
+echo -e MAGIC_MACRO\(glCallList\)\\n
+echo -e MAGIC_MACRO\(glCallLists\)\\n
+echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n
Index: git/target-i386/ghash.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/ghash.c	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,347 @@
+/* This is a modified and simplified version of original ghash.c */
+
+/* GLIB - Library of useful routines for C programming
+ * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * Modified by the GLib Team and others 1997-2000.  See the AUTHORS
+ * file for a list of people on the GLib Team.  See the ChangeLog
+ * files for a list of changes.  These files are distributed with
+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
+ */
+
+
+#include <stdlib.h>
+
+#include "ghash.h"
+
+#define HASH_TABLE_MIN_SIZE 11
+#define HASH_TABLE_MAX_SIZE 13845163
+
+#define CLAMP(x, low, high)  (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
+
+
+typedef struct _SimpleHashNode      SimpleHashNode;
+
+struct _SimpleHashNode
+{
+  int        key;
+  void*      value;
+  SimpleHashNode *next;
+};
+
+struct _SimpleHashTable
+{
+  int             size;
+  int             nnodes;
+  SimpleHashNode      **nodes;
+  SimpleDestroyNotify   value_destroy_func;
+};
+
+static const unsigned int simple_primes[] =
+{
+  11,
+  19,
+  37,
+  73,
+  109,
+  163,
+  251,
+  367,
+  557,
+  823,
+  1237,
+  1861,
+  2777,
+  4177,
+  6247,
+  9371,
+  14057,
+  21089,
+  31627,
+  47431,
+  71143,
+  106721,
+  160073,
+  240101,
+  360163,
+  540217,
+  810343,
+  1215497,
+  1823231,
+  2734867,
+  4102283,
+  6153409,
+  9230113,
+  13845163,
+};
+
+static const unsigned int simple_nprimes = sizeof (simple_primes) / sizeof (simple_primes[0]);
+
+unsigned int simple_spaced_primes_closest (unsigned int num)
+{
+  int i;
+
+  for (i = 0; i < simple_nprimes; i++)
+    if (simple_primes[i] > num)
+      return simple_primes[i];
+
+  return simple_primes[simple_nprimes - 1];
+}
+
+#define HASH_TABLE_RESIZE(hash_table)				\
+   do {						\
+     if ((hash_table->size >= 3 * hash_table->nnodes &&	        \
+	  hash_table->size > HASH_TABLE_MIN_SIZE) ||		\
+	 (3 * hash_table->size <= hash_table->nnodes &&	        \
+	  hash_table->size < HASH_TABLE_MAX_SIZE))		\
+	   simple_hash_table_resize (hash_table);			\
+    } while(0)
+
+static void		simple_hash_table_resize	  (SimpleHashTable	  *hash_table);
+static SimpleHashNode**	simple_hash_table_lookup_node  (SimpleHashTable     *hash_table,
+                                                   int   key);
+static SimpleHashNode*	simple_hash_node_new		  (int	   key,
+                                           void*        value);
+static void		simple_hash_nodes_destroy	  (SimpleHashNode	  *hash_node,
+                                           SimpleDestroyNotify   value_destroy_func);
+
+
+#define alloc0(type, n) (type*)calloc(n, sizeof(type))
+
+SimpleHashTable*
+simple_hash_table_new (SimpleDestroyNotify  value_destroy_func)
+{
+  SimpleHashTable *hash_table;
+
+  hash_table                     = alloc0(SimpleHashTable, 1);
+  hash_table->size               = HASH_TABLE_MIN_SIZE;
+  hash_table->nnodes             = 0;
+  hash_table->value_destroy_func = value_destroy_func;
+  hash_table->nodes              = alloc0 (SimpleHashNode*, hash_table->size);
+
+  return hash_table;
+}
+
+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
+                                       SimpleCloneValue clone_value_func)
+{
+  SimpleHashTable *hash_table_new;
+  SimpleHashNode *new_node;
+  SimpleHashNode *node;
+  int i;
+
+  hash_table_new                     = alloc0 (SimpleHashTable, 1);
+  hash_table_new->size               = hash_table->size;
+  hash_table_new->nnodes             = hash_table->nnodes;
+  hash_table_new->value_destroy_func = hash_table->value_destroy_func;
+  hash_table_new->nodes              = alloc0 (SimpleHashNode*, hash_table_new->size);
+  for (i = 0; i < hash_table->size; i++)
+  {
+    node = hash_table->nodes[i];
+    while(node)
+    {
+      SimpleHashNode *next = hash_table_new->nodes[i];
+      new_node = simple_hash_node_new(node->key,
+                                     (clone_value_func)? clone_value_func(node->value) : node->value);
+      new_node->next = next;
+      hash_table_new->nodes[i] = new_node;
+      node = node->next;
+    }
+  }
+  return hash_table_new;
+}
+
+void
+simple_hash_table_destroy (SimpleHashTable *hash_table)
+{
+  int i;
+
+  for (i = 0; i < hash_table->size; i++)
+  {
+    simple_hash_nodes_destroy (hash_table->nodes[i],
+                              hash_table->value_destroy_func);
+    hash_table->nodes[i] = NULL;
+  }
+  free (hash_table->nodes);
+  free (hash_table);
+}
+
+static inline SimpleHashNode**
+simple_hash_table_lookup_node (SimpleHashTable	*hash_table,
+                              int key)
+{
+  SimpleHashNode **node;
+
+  node = &hash_table->nodes[(unsigned int)key % hash_table->size];
+  while (*node && (*node)->key != key)
+    node = &(*node)->next;
+
+  return node;
+}
+
+void*
+simple_hash_table_lookup (SimpleHashTable	  *hash_table, int key)
+{
+  SimpleHashNode *node;
+
+  node = *simple_hash_table_lookup_node (hash_table, key);
+
+  return node ? node->value : NULL;
+}
+
+void**
+simple_hash_table_lookup_pointer (SimpleHashTable	  *hash_table, int key)
+{
+  SimpleHashNode *node;
+
+  node = *simple_hash_table_lookup_node (hash_table, key);
+
+  return node ? &node->value : NULL;
+}
+
+
+void
+simple_hash_table_insert (SimpleHashTable *hash_table,
+                         int	 key,
+                         void*	 value)
+{
+  SimpleHashNode **node;
+
+  node = simple_hash_table_lookup_node (hash_table, key);
+
+  if (*node)
+    {
+      /* do not reset node->key in this place, keeping
+       * the old key is the intended behaviour.
+       * simple_hash_table_replace() can be used instead.
+       */
+      if (hash_table->value_destroy_func)
+        hash_table->value_destroy_func ((*node)->value);
+
+      (*node)->value = value;
+    }
+  else
+    {
+      *node = simple_hash_node_new (key, value);
+      hash_table->nnodes++;
+      HASH_TABLE_RESIZE (hash_table);
+    }
+}
+int
+simple_hash_table_remove (SimpleHashTable	   *hash_table,
+                         int  key)
+{
+  SimpleHashNode **node, *dest;
+
+  node = simple_hash_table_lookup_node (hash_table, key);
+  if (*node)
+  {
+    dest = *node;
+    (*node) = dest->next;
+    if (hash_table->value_destroy_func)
+      hash_table->value_destroy_func (dest->value);
+    free (dest);
+    hash_table->nnodes--;
+
+    HASH_TABLE_RESIZE (hash_table);
+
+    return 1;
+  }
+
+  return 0;
+}
+
+
+void
+simple_hash_table_foreach (SimpleHashTable *hash_table,
+                          SimpleHFunc	  func,
+                          void*	  user_data)
+{
+  SimpleHashNode *node;
+  int i;
+
+  for (i = 0; i < hash_table->size; i++)
+    for (node = hash_table->nodes[i]; node; node = node->next)
+      (* func) (node->key, node->value, user_data);
+}
+
+unsigned int
+simple_hash_table_size (SimpleHashTable *hash_table)
+{
+  return hash_table->nnodes;
+}
+
+static void
+simple_hash_table_resize (SimpleHashTable *hash_table)
+{
+  SimpleHashNode **new_nodes;
+  SimpleHashNode *node;
+  SimpleHashNode *next;
+  unsigned int hash_val;
+  int new_size;
+  int i;
+
+  new_size = simple_spaced_primes_closest (hash_table->nnodes);
+  new_size = CLAMP (new_size, HASH_TABLE_MIN_SIZE, HASH_TABLE_MAX_SIZE);
+
+  new_nodes = alloc0 (SimpleHashNode*, new_size);
+
+  for (i = 0; i < hash_table->size; i++)
+    for (node = hash_table->nodes[i]; node; node = next)
+    {
+      next = node->next;
+
+      hash_val = (unsigned int)(node->key) % new_size;
+
+      node->next = new_nodes[hash_val];
+      new_nodes[hash_val] = node;
+    }
+
+  free (hash_table->nodes);
+  hash_table->nodes = new_nodes;
+  hash_table->size = new_size;
+}
+
+static SimpleHashNode*
+simple_hash_node_new (int key,
+                     void* value)
+{
+  SimpleHashNode *hash_node = alloc0 (SimpleHashNode, 1);
+
+  hash_node->key = key;
+  hash_node->value = value;
+  hash_node->next = NULL;
+
+  return hash_node;
+}
+
+static void
+simple_hash_nodes_destroy (SimpleHashNode *hash_node,
+                          SimpleDestroyNotify  value_destroy_func)
+{
+  while (hash_node)
+  {
+    SimpleHashNode *next = hash_node->next;
+    if (value_destroy_func)
+      value_destroy_func (hash_node->value);
+    free (hash_node);
+    hash_node = next;
+  }
+}
Index: git/target-i386/ghash.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/ghash.h	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,59 @@
+/* This is a modified and simplified version of original ghash.h  */
+
+
+/* GLIB - Library of useful routines for C programming
+ * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * Modified by the GLib Team and others 1997-2000.  See the AUTHORS
+ * file for a list of people on the GLib Team.  See the ChangeLog
+ * files for a list of changes.  These files are distributed with
+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
+ */
+
+#ifndef __SIMPLE_HASH_H__
+#define __SIMPLE_HASH_H__
+
+typedef struct _SimpleHashTable  SimpleHashTable;
+
+typedef void (*SimpleDestroyNotify)(void*);
+typedef void (*SimpleHFunc)(int key, void* value, void* user_data);
+typedef void* (*SimpleCloneValue)(void* value);
+
+/* Hash tables
+ */
+SimpleHashTable* simple_hash_table_new   (SimpleDestroyNotify value_destroy_func);
+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
+                                       SimpleCloneValue clone_value_func);
+void	    simple_hash_table_destroy   (SimpleHashTable	   *hash_table);
+void	    simple_hash_table_insert   (SimpleHashTable	   *hash_table,
+                                     int	    key,
+                                     void*	    value);
+int    simple_hash_table_remove   (SimpleHashTable	   *hash_table,
+                                  int   key);
+void*    simple_hash_table_lookup   (SimpleHashTable	   *hash_table,
+                                    int key);
+void** simple_hash_table_lookup_pointer (SimpleHashTable	  *hash_table, int key);
+void	    simple_hash_table_foreach (SimpleHashTable	   *hash_table,
+                                    SimpleHFunc	    func,
+                                    void*	    user_data);
+unsigned int simple_hash_table_size (SimpleHashTable	   *hash_table);
+
+#endif /* __SIMPLE_HASH_H__ */
+
Index: git/target-i386/gl_func_perso.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/gl_func_perso.h	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,135 @@
+/*
+ *  Hand-implemented GL/GLX API
+ *
+ *  Copyright (c) 2006,2007 Even Rouault
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+MAGIC_MACRO(_init32),
+MAGIC_MACRO(_init64),
+MAGIC_MACRO(_synchronize),
+MAGIC_MACRO(_serialized_calls),
+MAGIC_MACRO(_exit_process),
+MAGIC_MACRO(_moveResizeWindow),
+MAGIC_MACRO(_changeWindowState),
+MAGIC_MACRO(_send_cursor),
+
+/* When you add a glX call here, you HAVE TO update IS_GLX_CALL */
+MAGIC_MACRO(glXChooseVisual),
+MAGIC_MACRO(glXQueryExtensionsString),
+MAGIC_MACRO(glXQueryServerString),
+MAGIC_MACRO(glXCreateContext),
+MAGIC_MACRO(glXCopyContext),
+MAGIC_MACRO(glXDestroyContext),
+MAGIC_MACRO(glXGetClientString),
+MAGIC_MACRO(glXQueryVersion),
+MAGIC_MACRO(glXMakeCurrent),
+MAGIC_MACRO(glXGetConfig),
+MAGIC_MACRO(glXGetConfig_extended),
+MAGIC_MACRO(glXWaitGL),
+MAGIC_MACRO(glXWaitX),
+MAGIC_MACRO(glXGetFBConfigAttrib_extended),
+MAGIC_MACRO(glXChooseFBConfig),
+MAGIC_MACRO(glXChooseFBConfigSGIX),
+MAGIC_MACRO(glXGetFBConfigs),
+MAGIC_MACRO(glXCreatePbuffer),
+MAGIC_MACRO(glXCreateGLXPbufferSGIX),
+MAGIC_MACRO(glXDestroyPbuffer),
+MAGIC_MACRO(glXDestroyGLXPbufferSGIX),
+MAGIC_MACRO(glXCreateNewContext),
+MAGIC_MACRO(glXCreateContextWithConfigSGIX),
+MAGIC_MACRO(glXGetVisualFromFBConfig),
+MAGIC_MACRO(glXGetFBConfigAttrib),
+MAGIC_MACRO(glXGetFBConfigAttribSGIX),
+MAGIC_MACRO(glXQueryContext),
+MAGIC_MACRO(glXQueryDrawable),
+MAGIC_MACRO(glXQueryGLXPbufferSGIX),
+MAGIC_MACRO(glXUseXFont),
+MAGIC_MACRO(glXIsDirect),
+MAGIC_MACRO(glXGetProcAddress_fake),
+MAGIC_MACRO(glXGetProcAddress_global_fake),
+MAGIC_MACRO(glXSwapBuffers),
+MAGIC_MACRO(glXQueryExtension),
+MAGIC_MACRO(glXGetScreenDriver),
+MAGIC_MACRO(glXGetDriverConfig),
+MAGIC_MACRO(glXSwapIntervalSGI),
+MAGIC_MACRO(glXBindTexImageATI),
+MAGIC_MACRO(glXReleaseTexImageATI),
+MAGIC_MACRO(glXBindTexImageARB),
+MAGIC_MACRO(glXReleaseTexImageARB),
+
+MAGIC_MACRO(glGetString),
+
+MAGIC_MACRO(glShaderSourceARB_fake),
+MAGIC_MACRO(glShaderSource_fake),
+MAGIC_MACRO(glVertexPointer_fake),
+MAGIC_MACRO(glNormalPointer_fake),
+MAGIC_MACRO(glColorPointer_fake),
+MAGIC_MACRO(glSecondaryColorPointer_fake),
+MAGIC_MACRO(glIndexPointer_fake),
+MAGIC_MACRO(glTexCoordPointer_fake),
+MAGIC_MACRO(glEdgeFlagPointer_fake),
+MAGIC_MACRO(glVertexAttribPointerARB_fake),
+MAGIC_MACRO(glVertexAttribPointerNV_fake),
+MAGIC_MACRO(glWeightPointerARB_fake),
+MAGIC_MACRO(glMatrixIndexPointerARB_fake),
+MAGIC_MACRO(glFogCoordPointer_fake),
+MAGIC_MACRO(glVariantPointerEXT_fake),
+MAGIC_MACRO(glInterleavedArrays_fake),
+MAGIC_MACRO(glElementPointerATI_fake),
+MAGIC_MACRO(glTuxRacerDrawElements_fake),
+MAGIC_MACRO(glVertexAndNormalPointer_fake),
+MAGIC_MACRO(glTexCoordPointer01_fake),
+MAGIC_MACRO(glTexCoordPointer012_fake),
+MAGIC_MACRO(glVertexNormalPointerInterlaced_fake),
+MAGIC_MACRO(glVertexNormalColorPointerInterlaced_fake),
+MAGIC_MACRO(glVertexColorTexCoord0PointerInterlaced_fake),
+MAGIC_MACRO(glVertexNormalTexCoord0PointerInterlaced_fake),
+MAGIC_MACRO(glVertexNormalTexCoord01PointerInterlaced_fake),
+MAGIC_MACRO(glVertexNormalTexCoord012PointerInterlaced_fake),
+MAGIC_MACRO(glVertexNormalColorTexCoord0PointerInterlaced_fake),
+MAGIC_MACRO(glVertexNormalColorTexCoord01PointerInterlaced_fake),
+MAGIC_MACRO(glVertexNormalColorTexCoord012PointerInterlaced_fake),
+MAGIC_MACRO(glGenTextures_fake),
+MAGIC_MACRO(glGenBuffersARB_fake),
+MAGIC_MACRO(glGenLists_fake),
+MAGIC_MACRO(_glDrawElements_buffer),
+MAGIC_MACRO(_glDrawRangeElements_buffer),
+MAGIC_MACRO(_glMultiDrawElements_buffer),
+MAGIC_MACRO(_glVertexPointer_buffer),
+MAGIC_MACRO(_glNormalPointer_buffer),
+MAGIC_MACRO(_glColorPointer_buffer),
+MAGIC_MACRO(_glSecondaryColorPointer_buffer),
+MAGIC_MACRO(_glIndexPointer_buffer),
+MAGIC_MACRO(_glTexCoordPointer_buffer),
+MAGIC_MACRO(_glEdgeFlagPointer_buffer),
+MAGIC_MACRO(_glVertexAttribPointerARB_buffer),
+MAGIC_MACRO(_glWeightPointerARB_buffer),
+MAGIC_MACRO(_glMatrixIndexPointerARB_buffer),
+MAGIC_MACRO(_glFogCoordPointer_buffer),
+MAGIC_MACRO(_glVariantPointerEXT_buffer),
+MAGIC_MACRO(_glGetError_fake),
+MAGIC_MACRO(_glReadPixels_pbo),
+MAGIC_MACRO(_glDrawPixels_pbo),
+MAGIC_MACRO(_glMapBufferARB_fake),
+MAGIC_MACRO(_glSelectBuffer_fake),
+MAGIC_MACRO(_glGetSelectBuffer_fake),
+MAGIC_MACRO(_glFeedbackBuffer_fake),
+MAGIC_MACRO(_glGetFeedbackBuffer_fake),
Index: git/target-i386/helper.h
===================================================================
--- git.orig/target-i386/helper.h	2009-05-23 11:22:16.000000000 +0100
+++ git/target-i386/helper.h	2009-05-23 11:22:17.000000000 +0100
@@ -214,4 +214,6 @@
 DEF_HELPER_2(rcrq, tl, tl, tl)
 #endif
 
+DEF_HELPER_0(opengl, void)
+
 #include "def-helper.h"
Index: git/target-i386/helper_opengl.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/helper_opengl.c	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,979 @@
+/*
+ *  Host-side implementation of GL/GLX API
+ *
+ *  Copyright (c) 2006,2007 Even Rouault
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#define _XOPEN_SOURCE 600
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+#include "exec.h"
+
+#if defined(CONFIG_USER_ONLY)
+void helper_opengl(void)
+{
+    /* TODO */
+}
+#else
+
+#include "opengl_func.h"
+
+#define ENABLE_GL_LOG
+
+extern FILE *stderr;
+
+extern void init_process_tab(void);
+extern int do_function_call(int func_number, arg_t *args, char *ret_string);
+
+extern void sdl_set_opengl_window(int x, int y, int width, int height);
+
+static int last_process_id = 0;
+static int must_save = 0;
+
+static inline void *get_phys_mem_addr(const CPUState *env, target_ulong addr)
+{
+    int is_user, index;
+
+    index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
+    is_user = ((env->hflags & HF_CPL_MASK) == 3);
+    if (is_user == 0) {
+        fprintf(stderr, "not in userland !!!\n");
+        return NULL;
+    }
+    if (__builtin_expect
+        (env->tlb_table[is_user][index].addr_code !=
+         (addr & TARGET_PAGE_MASK), 0)) {
+        target_ulong ret = cpu_get_phys_page_debug((CPUState *) env, addr);
+
+        if (ret == -1) {
+            fprintf(stderr,
+                    "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
+                    TARGET_FMT_lx "\n", addr, ret);
+            fprintf(stderr,
+                    "not in phys mem " TARGET_FMT_lx "(" TARGET_FMT_lx " "
+                    TARGET_FMT_lx ")\n", addr,
+                    env->tlb_table[is_user][index].addr_code,
+                    addr & TARGET_PAGE_MASK);
+            fprintf(stderr, "cpu_x86_handle_mmu_fault = %d\n",
+                    cpu_x86_handle_mmu_fault((CPUState *) env, addr, 0, 1, 1));
+            return NULL;
+        } else {
+            if (ret + TARGET_PAGE_SIZE <= phys_ram_size) {
+                return phys_ram_base + ret +
+                    (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1));
+            } else {
+                fprintf(stderr,
+                        "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
+                        TARGET_FMT_lx "p\n", addr, ret);
+                fprintf(stderr,
+                        "ret=" TARGET_FMT_lx " phys_ram_size= " TARGET_FMT_lx
+                        "\n", ret, (target_ulong) phys_ram_size);
+                return NULL;
+            }
+        }
+    } else
+        return (void *) (addr + env->tlb_table[is_user][index].addend);
+}
+
+#ifndef MIN
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#endif
+
+enum {
+    NOT_MAPPED,
+    MAPPED_CONTIGUOUS,
+    MAPPED_NOT_CONTIGUOUS
+};
+
+#define TARGET_ADDR_LOW_ALIGN(x)  ((target_ulong)(x) & ~(TARGET_PAGE_SIZE - 1))
+
+/* Return NOT_MAPPED if a page is not mapped into target physical memory */
+/* MAPPED_CONTIGUOUS if all pages are mapped into target physical memory and contiguous */
+/* MAPPED_NOT_CONTIGUOUS if all pages are mapped into target physical memory but not contiguous */
+static int get_target_mem_state(const CPUState *env,
+                                target_ulong target_addr, int len)
+{
+    target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
+    int to_end_page =
+        (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
+    int ret = MAPPED_CONTIGUOUS;
+
+    if (aligned_target_addr != target_addr) {
+        void *phys_addr = get_phys_mem_addr(env, aligned_target_addr);
+        void *last_phys_addr = phys_addr;
+
+        if (phys_addr == 0) {
+            return NOT_MAPPED;
+        }
+        if (len > to_end_page) {
+            len -= to_end_page;
+            aligned_target_addr += TARGET_PAGE_SIZE;
+            int i;
+
+            for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
+                void *phys_addr =
+                    get_phys_mem_addr(env, aligned_target_addr + i);
+                if (phys_addr == 0) {
+                    return NOT_MAPPED;
+                }
+                if (phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
+                    ret = MAPPED_NOT_CONTIGUOUS;
+                last_phys_addr = phys_addr;
+            }
+        }
+    } else {
+        void *last_phys_addr = NULL;
+        int i;
+
+        for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
+            void *phys_addr = get_phys_mem_addr(env, target_addr + i);
+
+            if (phys_addr == 0) {
+                return NOT_MAPPED;
+            }
+            if (i != 0 && phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
+                ret = MAPPED_NOT_CONTIGUOUS;
+            last_phys_addr = phys_addr;
+        }
+    }
+    return ret;
+}
+
+/* copy len bytes from host memory at addr host_addr to target memory at logical addr target_addr */
+/* Returns 1 if successfull, 0 if some target pages are not mapped into target physical memory */
+static int memcpy_host_to_target(const CPUState *env,
+                                 target_ulong target_addr,
+                                 const void *host_addr, int len)
+{
+    int i;
+    target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
+    int to_end_page =
+        (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
+    int ret = get_target_mem_state(env, target_addr, len);
+
+    if (ret == NOT_MAPPED) {
+        return 0;
+    }
+
+    if (ret == MAPPED_CONTIGUOUS) {
+        void *phys_addr = get_phys_mem_addr(env, target_addr);
+
+        memcpy(phys_addr, host_addr, len);
+    } else {
+        if (aligned_target_addr != target_addr) {
+            void *phys_addr = get_phys_mem_addr(env, target_addr);
+
+            memcpy(phys_addr, host_addr, MIN(len, to_end_page));
+            if (len <= to_end_page) {
+                return 1;
+            }
+            len -= to_end_page;
+            host_addr += to_end_page;
+            target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
+        }
+        for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
+            void *phys_addr = get_phys_mem_addr(env, target_addr + i);
+
+            memcpy(phys_addr, host_addr + i,
+                   (i + TARGET_PAGE_SIZE <=
+                    len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
+        }
+    }
+
+    return 1;
+}
+
+static int memcpy_target_to_host(const CPUState *env, void *host_addr,
+                                 target_ulong target_addr, int len)
+{
+    int i;
+    target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
+    int to_end_page =
+        (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
+    int ret = get_target_mem_state(env, target_addr, len);
+
+    if (ret == NOT_MAPPED) {
+        return 0;
+    }
+
+    if (ret == MAPPED_CONTIGUOUS) {
+        void *phys_addr = get_phys_mem_addr(env, target_addr);
+
+        memcpy(host_addr, phys_addr, len);
+    } else {
+        if (aligned_target_addr != target_addr) {
+            void *phys_addr = get_phys_mem_addr(env, target_addr);
+
+            memcpy(host_addr, phys_addr, MIN(len, to_end_page));
+            if (len <= to_end_page)
+                return 1;
+
+            len -= to_end_page;
+            host_addr += to_end_page;
+            target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
+        }
+        for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
+            void *phys_addr = get_phys_mem_addr(env, target_addr + i);
+
+            memcpy(host_addr + i, phys_addr,
+                   (i + TARGET_PAGE_SIZE <=
+                    len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
+        }
+    }
+
+    return 1;
+}
+
+static int memcpy_target_to_host_1_1(const CPUState *env, void *host_addr,
+                                     target_ulong target_addr, int nb_args)
+{
+    return memcpy_target_to_host(env, host_addr, target_addr, nb_args * 8);
+}
+
+static int wordsize = 0;
+static int (*argcpy_target_to_host) (const CPUState *env, void *host_addr,
+                                     target_ulong target_addr, int nb_args) =
+    memcpy_target_to_host_1_1;
+
+void do_disconnect_current(void);
+void do_context_switch(Display *dpy, pid_t pid, int call);
+
+static void disconnect_current(void)
+{
+    last_process_id = 0;
+
+    return do_disconnect_current();
+}
+
+static int memcpy_target32_to_host(const CPUState *env, void *host_addr,
+                                   target_ulong target_addr, int nb_args)
+{
+    int ret;
+    uint32_t args_temp[nb_args], *src = args_temp;
+    arg_t *dest = host_addr;
+
+    ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 4);
+    if (!ret)
+        return ret;
+
+    while (nb_args) {
+        /* TODO: endianness */
+        *dest = 0;
+        *(uint32_t *) (dest++) = *src++;
+        nb_args--;
+    }
+
+    return ret;
+}
+
+static int memcpy_target64_to_host(const CPUState *env, void *host_addr,
+                                   target_ulong target_addr, int nb_args)
+{
+    int ret;
+    uint64_t args_temp[nb_args], *src = args_temp;
+    arg_t *dest = host_addr;
+
+    ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 8);
+    if (!ret)
+        return ret;
+
+    while (nb_args) {
+        /* TODO: endianness */
+        *dest = 0;
+        *(uint64_t *) (dest++) = *src++;
+        nb_args--;
+    }
+
+    return ret;
+}
+
+static int host_offset = 0;
+static void reset_host_offset()
+{
+    host_offset = 0;
+}
+
+/* Return a host pointer with the content of [target_addr, target_addr + len bytes[ */
+/* Do not free or modify */
+static const void *get_host_read_pointer(const CPUState *env,
+                const target_ulong target_addr, int len)
+{
+    int ret = get_target_mem_state(env, target_addr, len);
+
+    if (ret == NOT_MAPPED) {
+        return NULL;
+    } else if (ret == MAPPED_CONTIGUOUS) {
+        return get_phys_mem_addr(env, target_addr);
+    } else {
+        static int host_mem_size = 0;
+        static void *host_mem = NULL;
+        static void *ret;
+
+        if (host_mem_size < host_offset + len) {
+            host_mem_size = 2 * host_mem_size + host_offset + len;
+            host_mem = realloc(host_mem, host_mem_size);
+        }
+        ret = host_mem + host_offset;
+        assert(memcpy_target_to_host(env, ret, target_addr, len));
+        host_offset += len;
+        return ret;
+    }
+}
+
+int doing_opengl = 0;
+static int last_func_number = -1;
+static size_t(*my_strlen) (const char *) = NULL;
+
+#ifdef ENABLE_GL_LOG
+static FILE *f = NULL;
+static int logger_pid = 0;
+
+#define write_gl_debug_init() do { if (f == NULL) f = fopen("/tmp/debug_gl.bin", "wb"); } while(0)
+
+void write_gl_debug_cmd_int(int my_int)
+{
+    write_gl_debug_init();
+    fwrite(&my_int, sizeof(int), 1, f);
+    fflush(f);
+}
+
+void write_gl_debug_cmd_short(short my_int)
+{
+    write_gl_debug_init();
+    fwrite(&my_int, sizeof(short), 1, f);
+    fflush(f);
+}
+
+static void inline write_gl_debug_cmd_buffer_with_size(int size, void *buffer)
+{
+    write_gl_debug_init();
+    fwrite(&size, sizeof(int), 1, f);
+    if (size)
+        fwrite(buffer, size, 1, f);
+}
+
+static void inline write_gl_debug_cmd_buffer_without_size(
+                int size, void *buffer)
+{
+    write_gl_debug_init();
+    if (size)
+        fwrite(buffer, size, 1, f);
+}
+
+void write_gl_debug_end(void)
+{
+    write_gl_debug_init();
+    fclose(f);
+    f = NULL;
+    logger_pid = 0;
+    must_save = 0;
+}
+
+static inline int is_logging(int pid)
+{
+    return must_save && pid == logger_pid;
+}
+#endif
+
+#include <dlfcn.h>
+#include <signal.h>
+
+static void (*anticrash_handler) (void *) = NULL;
+static void (*show_stack_from_signal_handler) (int, int, int) = NULL;
+
+void my_anticrash_sigsegv_handler(int signum, siginfo_t *info, void *ptr)
+{
+    static int counter = 0;
+
+    counter++;
+
+    printf("oops\n");
+
+    /* if (show_stack_from_signal_handler && counter == 1) { struct ucontext* 
+     * ctxt = (struct ucontext*)ptr; show_stack_from_signal_handler(10,
+     * ctxt->uc_mcontext.gregs[REG_EBP], ctxt->uc_mcontext.gregs[REG_ESP]); } */
+    anticrash_handler(ptr);
+
+    counter--;
+}
+
+static int decode_call_int(CPUState *env, int func_number, int pid,
+                           target_ulong target_ret_string,
+                           target_ulong in_args, target_ulong in_args_size)
+{
+    Signature *signature = (Signature *) tab_opengl_calls[func_number];
+    int ret_type = signature->ret_type;
+    /* int has_out_parameters = signature->has_out_parameters; */
+    int nb_args = signature->nb_args;
+    int *args_type = signature->args_type;
+    int i;
+    int ret;
+    int *args_size = NULL;
+    target_ulong saved_out_ptr[50];
+    static char *ret_string = NULL;
+    static arg_t args[50];
+    static Display *dpy = NULL;
+
+    if (dpy == NULL) {
+        void *handle = dlopen("libanticrash.so", RTLD_LAZY);
+
+        if (handle) {
+            anticrash_handler = dlsym(handle, "anticrash_handler");
+            if (anticrash_handler) {
+                fprintf(stderr, "anticrash handler enabled\n");
+                struct sigaction sigsegv_action;
+                struct sigaction old_sigsegv_action;
+
+                sigsegv_action.sa_sigaction = my_anticrash_sigsegv_handler;
+                sigemptyset(&(sigsegv_action.sa_mask));
+                sigsegv_action.sa_flags = SA_SIGINFO | SA_NODEFER;
+                sigaction(SIGSEGV, &sigsegv_action, &old_sigsegv_action);
+            }
+        }
+        handle = dlopen("libgetstack.so", RTLD_LAZY);
+        if (handle) {
+            show_stack_from_signal_handler =
+                dlsym(handle, "show_stack_from_signal_handler");
+        }
+
+        dpy = XOpenDisplay(NULL);
+        init_process_tab();
+        ret_string = malloc(32768);
+        my_strlen = strlen;
+    }
+
+    if (unlikely(last_func_number == _exit_process_func &&
+                            func_number == _exit_process_func)) {
+        last_func_number = -1;
+        return 0;
+    }
+
+    if (last_process_id != pid) {
+        do_context_switch(dpy, pid, func_number);
+        last_process_id = pid;
+    }
+
+    if (unlikely(func_number == _exit_process_func))
+        last_process_id = 0;
+
+  argcpy:
+    reset_host_offset();
+
+    if (nb_args) {
+
+        if (argcpy_target_to_host(env, args, in_args, nb_args) == 0) {
+            fprintf(stderr, "call %s pid=%d\n",
+                    tab_opengl_calls_name[func_number], pid);
+            fprintf(stderr, "cannot get call parameters\n");
+            disconnect_current();
+            return 0;
+        }
+
+        args_size =
+            (int *) get_host_read_pointer(env, in_args_size,
+                                          sizeof(int) * nb_args);
+        if (args_size == NULL) {
+            fprintf(stderr, "call %s pid=%d\n",
+                    tab_opengl_calls_name[func_number], pid);
+            fprintf(stderr, "cannot get call parameters size\n");
+            disconnect_current();
+            return 0;
+        }
+    }
+
+    if (func_number == _serialized_calls_func) {
+        int command_buffer_size = args_size[0];
+        const void *command_buffer =
+            get_host_read_pointer(env, args[0], command_buffer_size);
+        int commmand_buffer_offset = 0;
+
+        args_size = NULL;
+#ifdef ENABLE_GL_LOG
+        if (is_logging(pid))
+            write_gl_debug_cmd_short(_serialized_calls_func);
+#endif
+
+        while (commmand_buffer_offset < command_buffer_size) {
+            func_number =
+                *(short *) (command_buffer + commmand_buffer_offset);
+            if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
+                fprintf(stderr,
+                        "func_number >= 0 && func_number < GL_N_CALLS failed at "
+                        "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
+                        commmand_buffer_offset, command_buffer_size);
+                return 0;
+            }
+            commmand_buffer_offset += sizeof(short);
+#ifdef ENABLE_GL_LOG
+            if (is_logging(pid))
+                write_gl_debug_cmd_short(func_number);
+#endif
+
+            signature = (Signature *) tab_opengl_calls[func_number];
+            ret_type = signature->ret_type;
+            assert(ret_type == TYPE_NONE);
+            nb_args = signature->nb_args;
+            args_type = signature->args_type;
+
+            for (i = 0; i < nb_args; i++) {
+                switch (args_type[i]) {
+                case TYPE_UNSIGNED_INT:
+                case TYPE_INT:
+                case TYPE_UNSIGNED_CHAR:
+                case TYPE_CHAR:
+                case TYPE_UNSIGNED_SHORT:
+                case TYPE_SHORT:
+                case TYPE_FLOAT:
+                    {
+                        args[i] =
+                            *(int *) (command_buffer +
+                                      commmand_buffer_offset);
+#ifdef ENABLE_GL_LOG
+                        if (is_logging(pid))
+                            write_gl_debug_cmd_int(args[i]);
+#endif
+                        commmand_buffer_offset += sizeof(int);
+                        break;
+                    }
+
+                case TYPE_NULL_TERMINATED_STRING:
+                  CASE_IN_UNKNOWN_SIZE_POINTERS:
+                    {
+                        int arg_size =
+                            *(int *) (command_buffer +
+                                      commmand_buffer_offset);
+                        commmand_buffer_offset += sizeof(int);
+
+                        if (arg_size == 0) {
+                            args[i] = 0;
+                        } else {
+                            args[i] =
+                                (long) (command_buffer +
+                                        commmand_buffer_offset);
+                        }
+
+                        if (args[i] == 0) {
+                            if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
+                                fprintf(stderr, "call %s arg %d pid=%d\n",
+                                        tab_opengl_calls_name[func_number], i,
+                                        pid);
+                                disconnect_current();
+                                return 0;
+                            }
+                        } else {
+                            if (arg_size == 0) {
+                                fprintf(stderr, "call %s arg %d pid=%d\n",
+                                        tab_opengl_calls_name[func_number], i,
+                                        pid);
+                                fprintf(stderr, "args_size[i] == 0 !!\n");
+                                disconnect_current();
+                                return 0;
+                            }
+                        }
+#ifdef ENABLE_GL_LOG
+                        if (is_logging(pid))
+                            write_gl_debug_cmd_buffer_with_size(arg_size,
+                                                                (void *)
+                                                                args[i]);
+#endif
+                        commmand_buffer_offset += arg_size;
+
+                        break;
+                    }
+
+                  CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
+                    {
+                        int arg_size =
+                            compute_arg_length(stderr, func_number, i, args);
+                        args[i] =
+                            (arg_size) ? (long) (command_buffer +
+                                                 commmand_buffer_offset) : 0;
+#ifdef ENABLE_GL_LOG
+                        if (is_logging(pid))
+                            write_gl_debug_cmd_buffer_without_size(arg_size,
+                                                                   (void *)
+                                                                   args[i]);
+#endif
+                        commmand_buffer_offset += arg_size;
+                        break;
+                    }
+
+                  CASE_OUT_POINTERS:
+                    {
+                        fprintf(stderr,
+                                "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n",
+                                tab_opengl_calls_name[func_number], i, pid);
+                        disconnect_current();
+                        return 0;
+                    }
+
+                case TYPE_DOUBLE:
+                  CASE_IN_KNOWN_SIZE_POINTERS:
+                    args[i] =
+                        (long) (command_buffer + commmand_buffer_offset);
+#ifdef ENABLE_GL_LOG
+                    if (is_logging(pid))
+                        write_gl_debug_cmd_buffer_without_size(
+                                        tab_args_type_length[args_type[i]],
+                                        (void *) args[i]);
+#endif
+                    commmand_buffer_offset +=
+                        tab_args_type_length[args_type[i]];
+                    break;
+
+                case TYPE_IN_IGNORED_POINTER:
+                    args[i] = 0;
+                    break;
+
+                default:
+                    fprintf(stderr,
+                            "shouldn't happen : call %s arg %d pid=%d\n",
+                            tab_opengl_calls_name[func_number], i, pid);
+                    disconnect_current();
+                    return 0;
+                }
+            }
+            do_function_call(func_number, args, ret_string);
+        }
+
+        ret = 0;
+    } else {
+#ifdef ENABLE_GL_LOG
+        if (is_logging(pid))
+            write_gl_debug_cmd_short(func_number);
+#endif
+
+        for (i = 0; i < nb_args; i++) {
+            switch (args_type[i]) {
+            case TYPE_UNSIGNED_INT:
+            case TYPE_INT:
+            case TYPE_UNSIGNED_CHAR:
+            case TYPE_CHAR:
+            case TYPE_UNSIGNED_SHORT:
+            case TYPE_SHORT:
+            case TYPE_FLOAT:
+#ifdef ENABLE_GL_LOG
+                if (is_logging(pid))
+                    write_gl_debug_cmd_int(args[i]);
+#endif
+                break;
+
+            case TYPE_NULL_TERMINATED_STRING:
+              CASE_IN_UNKNOWN_SIZE_POINTERS:
+                if (args[i] == 0 && args_size[i] == 0) {
+                    if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
+                        fprintf(stderr, "call %s arg %d pid=%d\n",
+                                tab_opengl_calls_name[func_number], i, pid);
+                        disconnect_current();
+                        return 0;
+                    }
+                } else if (args[i] == 0 && args_size[i] != 0) {
+                    fprintf(stderr, "call %s arg %d pid=%d\n",
+                            tab_opengl_calls_name[func_number], i, pid);
+                    fprintf(stderr, "args[i] == 0 && args_size[i] != 0 !!\n");
+                    disconnect_current();
+                    return 0;
+                } else if (args[i] != 0 && args_size[i] == 0) {
+                    fprintf(stderr, "call %s arg %d pid=%d\n",
+                            tab_opengl_calls_name[func_number], i, pid);
+                    fprintf(stderr, "args[i] != 0 && args_size[i] == 0 !!\n");
+                    disconnect_current();
+                    return 0;
+                }
+                if (args[i]) {
+                    args[i] =
+                        (arg_t) get_host_read_pointer(env, args[i],
+                                                      args_size[i]);
+                    if (args[i] == 0) {
+                        fprintf(stderr, "call %s arg %d pid=%d\n",
+                                tab_opengl_calls_name[func_number], i, pid);
+                        fprintf(stderr, "can not get %d bytes\n",
+                                args_size[i]);
+                        disconnect_current();
+                        return 0;
+                    }
+                }
+#ifdef ENABLE_GL_LOG
+                if (is_logging(pid))
+                    write_gl_debug_cmd_buffer_with_size(args_size[i],
+                                                        (void *) args[i]);
+#endif
+                break;
+
+              CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
+                {
+                    args_size[i] =
+                        compute_arg_length(stderr, func_number, i, args);
+                    args[i] = (args_size[i]) ? (arg_t)
+                            get_host_read_pointer(env,
+                                            args[i], args_size [i]) : 0;
+                    if (args[i] == 0 && args_size[i] != 0) {
+                        fprintf(stderr, "call %s arg %d pid=%d\n",
+                                tab_opengl_calls_name[func_number], i, pid);
+                        fprintf(stderr, "can not get %d bytes\n",
+                                args_size[i]);
+                        disconnect_current();
+                        return 0;
+                    }
+#ifdef ENABLE_GL_LOG
+                    if (is_logging(pid))
+                        write_gl_debug_cmd_buffer_without_size(args_size[i],
+                                        (void *) args[i]);
+#endif
+                    break;
+                }
+
+              CASE_OUT_POINTERS:
+                {
+                    int mem_state;
+
+#ifdef ENABLE_GL_LOG
+                    if (is_logging(pid))
+                        switch (args_type[i]) {
+                          CASE_OUT_UNKNOWN_SIZE_POINTERS:
+                            write_gl_debug_cmd_int(args_size[i]);
+                            break;
+
+                        default:
+                            break;
+                        }
+#endif
+
+                    if (func_number == glXQueryExtension_func && args[i] == 0) {
+                        saved_out_ptr[i] = 0;
+                        continue;
+                    }
+                    if (args[i] == 0 && args_size[i] == 0) {
+                        if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
+                            fprintf(stderr, "call %s arg %d pid=%d\n",
+                                    tab_opengl_calls_name[func_number], i,
+                                    pid);
+                            disconnect_current();
+                            return 0;
+                        }
+                        fprintf(stderr, "call %s arg %d pid=%d\n",
+                                tab_opengl_calls_name[func_number], i, pid);
+                        disconnect_current();
+                        return 0;
+                    } else if (args[i] == 0 && args_size[i] != 0) {
+                        fprintf(stderr, "call %s arg %d pid=%d\n",
+                                tab_opengl_calls_name[func_number], i, pid);
+                        fprintf(stderr,
+                                "args[i] == 0 && args_size[i] != 0 !!\n");
+                        disconnect_current();
+                        return 0;
+                    } else if (args[i] != 0 && args_size[i] == 0) {
+                        fprintf(stderr, "call %s arg %d pid=%d\n",
+                                tab_opengl_calls_name[func_number], i, pid);
+                        fprintf(stderr,
+                                "args[i] != 0 && args_size[i] == 0 !!\n");
+                        disconnect_current();
+                        return 0;
+                    }
+                    if (args[i]) {
+                        mem_state =
+                            get_target_mem_state(env, args[i], args_size[i]);
+                        if (mem_state == NOT_MAPPED) {
+                            fprintf(stderr,
+                                    "call %s arg %d pid=%d addr="
+                                    TARGET_FMT_lx " size=%d NOT_MAPPED\n",
+                                    tab_opengl_calls_name[func_number], i,
+                                    pid, args[i], args_size[i]);
+                            disconnect_current();
+                            return 0;
+                        } else if (mem_state == MAPPED_CONTIGUOUS) {
+                            saved_out_ptr[i] = 0;
+                            args[i] = (arg_t) get_phys_mem_addr(env, args[i]);
+                        } else {
+                            saved_out_ptr[i] = args[i];
+                            args[i] = (arg_t) malloc(args_size[i]);
+                        }
+                    } else {
+                        saved_out_ptr[i] = 0;
+                    }
+                    break;
+                }
+
+            case TYPE_DOUBLE:
+              CASE_IN_KNOWN_SIZE_POINTERS:
+                if (args[i] == 0) {
+                    fprintf(stderr, "call %s arg %d pid=%d\n",
+                            tab_opengl_calls_name[func_number], i, pid);
+                    fprintf(stderr, "can not get %d bytes\n",
+                            tab_args_type_length[args_type[i]]);
+                    disconnect_current();
+                    return 0;
+                }
+                args[i] = (arg_t) get_host_read_pointer(env,
+                                args[i], tab_args_type_length[args_type[i]]);
+                if (args[i] == 0) {
+                    fprintf(stderr, "call %s arg %d pid=%d\n",
+                            tab_opengl_calls_name[func_number], i, pid);
+                    fprintf(stderr, "can not get %d bytes\n",
+                            tab_args_type_length[args_type[i]]);
+                    disconnect_current();
+                    return 0;
+                }
+#ifdef ENABLE_GL_LOG
+                if (is_logging(pid))
+                    write_gl_debug_cmd_buffer_without_size
+                        (tab_args_type_length[args_type[i]],
+                         (void *) args[i]);
+#endif
+                break;
+
+            case TYPE_IN_IGNORED_POINTER:
+                args[i] = 0;
+                break;
+
+            default:
+                fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n",
+                        tab_opengl_calls_name[func_number], i, pid);
+                disconnect_current();
+                return 0;
+            }
+        }
+
+        if (ret_type == TYPE_CONST_CHAR) {
+            ret_string[0] = 0;
+        }
+
+        if (func_number == _init32_func || func_number == _init64_func) {
+            if (func_number == _init32_func) {
+                if (!wordsize) {
+                    wordsize = 32;
+                    argcpy_target_to_host = memcpy_target32_to_host;
+                    goto argcpy;
+                }
+
+                if (wordsize != 32) {
+                    fprintf(stderr,
+                            "clients with different ABIs not supported\n");
+                    exit(-1);
+                }
+            } else {
+                if (!wordsize) {
+                    wordsize = 64;
+                    argcpy_target_to_host = memcpy_target64_to_host;
+                    goto argcpy;
+                }
+
+                if (wordsize != 64) {
+                    fprintf(stderr,
+                            "clients with different ABIs not supported\n");
+                    exit(-1);
+                }
+            }
+
+            if (must_save && args[0])
+                fprintf(stderr, "error: pid %i is already recording\n",
+                                logger_pid);
+            else if (args[0]) {
+                logger_pid = pid;
+                must_save = 1;
+            }
+#ifdef USE_KQEMU
+            if (env->kqemu_enabled)
+                *(int *) args[1] = 2;
+            else
+#endif
+                *(int *) args[1] = 1;
+            ret = 0;
+        } else {
+            ret = do_function_call(func_number, args, ret_string);
+        }
+#ifdef ENABLE_GL_LOG
+        if (is_logging(pid) && func_number == glXGetVisualFromFBConfig_func)
+            write_gl_debug_cmd_int(ret);
+#endif
+        for (i = 0; i < nb_args; i++) {
+            switch (args_type[i]) {
+              CASE_OUT_POINTERS:
+                {
+                    if (saved_out_ptr[i]) {
+                        if (memcpy_host_to_target(env, saved_out_ptr[i],
+                                                (void *) args[i],
+                                                args_size[i]) == 0) {
+                            fprintf(stderr, "could not copy out parameters "
+                                            "back to user space\n");
+                            disconnect_current();
+                            return 0;
+                        }
+                        free((void *) args[i]);
+                    }
+                    break;
+                }
+
+            default:
+                break;
+            }
+        }
+
+        if (ret_type == TYPE_CONST_CHAR)
+            if (target_ret_string) {
+                /* the my_strlen stuff is a hack to workaround a GCC bug if
+                 * using directly strlen... */
+                if (memcpy_host_to_target(env, target_ret_string, ret_string,
+                                        my_strlen(ret_string) + 1) == 0) {
+                    fprintf(stderr, "cannot copy out parameters "
+                                    "back to user space\n");
+                    disconnect_current();
+                    return 0;
+                }
+            }
+    }
+
+#ifdef ENABLE_GL_LOG
+    if (is_logging(pid) && func_number == _exit_process_func) {
+        write_gl_debug_end();
+    }
+#endif
+
+    return ret;
+}
+
+static int decode_call(CPUState *env, int func_number, int pid,
+                       target_ulong target_ret_string, target_ulong in_args,
+                       target_ulong in_args_size)
+{
+    if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
+        fprintf(stderr,
+                "func_number >= 0 && func_number < GL_N_CALLS failed\n");
+        return 0;
+    }
+
+    return decode_call_int(env, func_number, pid,
+                    target_ret_string, in_args, in_args_size);
+}
+
+void helper_opengl(void)
+{
+    doing_opengl = 1;
+    env->regs[R_EAX] =
+        decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
+                    env->regs[R_EDX], env->regs[R_ESI]);
+    doing_opengl = 0;
+}
+#endif
Index: git/target-i386/mesa_enums.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/mesa_enums.c	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,4890 @@
+/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */
+
+/*
+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
+ * BRIAN PAUL,
+ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include "glheader.h"
+#include "enums.h"
+#include "imports.h"
+
+typedef struct {
+   size_t offset;
+   int n;
+} enum_elt;
+
+LONGSTRING static const char enum_string_table[] =
+   "GL_2D\0"
+   "GL_2_BYTES\0"
+   "GL_3D\0"
+   "GL_3D_COLOR\0"
+   "GL_3D_COLOR_TEXTURE\0"
+   "GL_3_BYTES\0"
+   "GL_4D_COLOR_TEXTURE\0"
+   "GL_4_BYTES\0"
+   "GL_ACCUM\0"
+   "GL_ACCUM_ALPHA_BITS\0"
+   "GL_ACCUM_BLUE_BITS\0"
+   "GL_ACCUM_BUFFER_BIT\0"
+   "GL_ACCUM_CLEAR_VALUE\0"
+   "GL_ACCUM_GREEN_BITS\0"
+   "GL_ACCUM_RED_BITS\0"
+   "GL_ACTIVE_ATTRIBUTES\0"
+   "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0"
+   "GL_ACTIVE_STENCIL_FACE_EXT\0"
+   "GL_ACTIVE_TEXTURE\0"
+   "GL_ACTIVE_TEXTURE_ARB\0"
+   "GL_ACTIVE_UNIFORMS\0"
+   "GL_ACTIVE_UNIFORM_MAX_LENGTH\0"
+   "GL_ACTIVE_VERTEX_UNITS_ARB\0"
+   "GL_ADD\0"
+   "GL_ADD_SIGNED\0"
+   "GL_ADD_SIGNED_ARB\0"
+   "GL_ADD_SIGNED_EXT\0"
+   "GL_ALIASED_LINE_WIDTH_RANGE\0"
+   "GL_ALIASED_POINT_SIZE_RANGE\0"
+   "GL_ALL_ATTRIB_BITS\0"
+   "GL_ALL_CLIENT_ATTRIB_BITS\0"
+   "GL_ALPHA\0"
+   "GL_ALPHA12\0"
+   "GL_ALPHA12_EXT\0"
+   "GL_ALPHA16\0"
+   "GL_ALPHA16_EXT\0"
+   "GL_ALPHA4\0"
+   "GL_ALPHA4_EXT\0"
+   "GL_ALPHA8\0"
+   "GL_ALPHA8_EXT\0"
+   "GL_ALPHA_BIAS\0"
+   "GL_ALPHA_BITS\0"
+   "GL_ALPHA_SCALE\0"
+   "GL_ALPHA_TEST\0"
+   "GL_ALPHA_TEST_FUNC\0"
+   "GL_ALPHA_TEST_REF\0"
+   "GL_ALWAYS\0"
+   "GL_AMBIENT\0"
+   "GL_AMBIENT_AND_DIFFUSE\0"
+   "GL_AND\0"
+   "GL_AND_INVERTED\0"
+   "GL_AND_REVERSE\0"
+   "GL_ARRAY_BUFFER\0"
+   "GL_ARRAY_BUFFER_ARB\0"
+   "GL_ARRAY_BUFFER_BINDING\0"
+   "GL_ARRAY_BUFFER_BINDING_ARB\0"
+   "GL_ATTACHED_SHADERS\0"
+   "GL_ATTRIB_ARRAY_POINTER_NV\0"
+   "GL_ATTRIB_ARRAY_SIZE_NV\0"
+   "GL_ATTRIB_ARRAY_STRIDE_NV\0"
+   "GL_ATTRIB_ARRAY_TYPE_NV\0"
+   "GL_ATTRIB_STACK_DEPTH\0"
+   "GL_AUTO_NORMAL\0"
+   "GL_AUX0\0"
+   "GL_AUX1\0"
+   "GL_AUX2\0"
+   "GL_AUX3\0"
+   "GL_AUX_BUFFERS\0"
+   "GL_BACK\0"
+   "GL_BACK_LEFT\0"
+   "GL_BACK_RIGHT\0"
+   "GL_BGR\0"
+   "GL_BGRA\0"
+   "GL_BITMAP\0"
+   "GL_BITMAP_TOKEN\0"
+   "GL_BLEND\0"
+   "GL_BLEND_COLOR\0"
+   "GL_BLEND_COLOR_EXT\0"
+   "GL_BLEND_DST\0"
+   "GL_BLEND_DST_ALPHA\0"
+   "GL_BLEND_DST_RGB\0"
+   "GL_BLEND_EQUATION\0"
+   "GL_BLEND_EQUATION_ALPHA\0"
+   "GL_BLEND_EQUATION_ALPHA_EXT\0"
+   "GL_BLEND_EQUATION_EXT\0"
+   "GL_BLEND_EQUATION_RGB_EXT\0"
+   "GL_BLEND_SRC\0"
+   "GL_BLEND_SRC_ALPHA\0"
+   "GL_BLEND_SRC_RGB\0"
+   "GL_BLUE\0"
+   "GL_BLUE_BIAS\0"
+   "GL_BLUE_BITS\0"
+   "GL_BLUE_SCALE\0"
+   "GL_BOOL\0"
+   "GL_BOOL_ARB\0"
+   "GL_BOOL_VEC2\0"
+   "GL_BOOL_VEC2_ARB\0"
+   "GL_BOOL_VEC3\0"
+   "GL_BOOL_VEC3_ARB\0"
+   "GL_BOOL_VEC4\0"
+   "GL_BOOL_VEC4_ARB\0"
+   "GL_BUFFER_ACCESS\0"
+   "GL_BUFFER_ACCESS_ARB\0"
+   "GL_BUFFER_MAPPED\0"
+   "GL_BUFFER_MAPPED_ARB\0"
+   "GL_BUFFER_MAP_POINTER\0"
+   "GL_BUFFER_MAP_POINTER_ARB\0"
+   "GL_BUFFER_SIZE\0"
+   "GL_BUFFER_SIZE_ARB\0"
+   "GL_BUFFER_USAGE\0"
+   "GL_BUFFER_USAGE_ARB\0"
+   "GL_BYTE\0"
+   "GL_C3F_V3F\0"
+   "GL_C4F_N3F_V3F\0"
+   "GL_C4UB_V2F\0"
+   "GL_C4UB_V3F\0"
+   "GL_CCW\0"
+   "GL_CLAMP\0"
+   "GL_CLAMP_TO_BORDER\0"
+   "GL_CLAMP_TO_BORDER_ARB\0"
+   "GL_CLAMP_TO_BORDER_SGIS\0"
+   "GL_CLAMP_TO_EDGE\0"
+   "GL_CLAMP_TO_EDGE_SGIS\0"
+   "GL_CLEAR\0"
+   "GL_CLIENT_ACTIVE_TEXTURE\0"
+   "GL_CLIENT_ACTIVE_TEXTURE_ARB\0"
+   "GL_CLIENT_ALL_ATTRIB_BITS\0"
+   "GL_CLIENT_ATTRIB_STACK_DEPTH\0"
+   "GL_CLIENT_PIXEL_STORE_BIT\0"
+   "GL_CLIENT_VERTEX_ARRAY_BIT\0"
+   "GL_CLIP_PLANE0\0"
+   "GL_CLIP_PLANE1\0"
+   "GL_CLIP_PLANE2\0"
+   "GL_CLIP_PLANE3\0"
+   "GL_CLIP_PLANE4\0"
+   "GL_CLIP_PLANE5\0"
+   "GL_CLIP_VOLUME_CLIPPING_HINT_EXT\0"
+   "GL_COEFF\0"
+   "GL_COLOR\0"
+   "GL_COLOR_ARRAY\0"
+   "GL_COLOR_ARRAY_BUFFER_BINDING\0"
+   "GL_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
+   "GL_COLOR_ARRAY_POINTER\0"
+   "GL_COLOR_ARRAY_SIZE\0"
+   "GL_COLOR_ARRAY_STRIDE\0"
+   "GL_COLOR_ARRAY_TYPE\0"
+   "GL_COLOR_ATTACHMENT0_EXT\0"
+   "GL_COLOR_ATTACHMENT10_EXT\0"
+   "GL_COLOR_ATTACHMENT11_EXT\0"
+   "GL_COLOR_ATTACHMENT12_EXT\0"
+   "GL_COLOR_ATTACHMENT13_EXT\0"
+   "GL_COLOR_ATTACHMENT14_EXT\0"
+   "GL_COLOR_ATTACHMENT15_EXT\0"
+   "GL_COLOR_ATTACHMENT1_EXT\0"
+   "GL_COLOR_ATTACHMENT2_EXT\0"
+   "GL_COLOR_ATTACHMENT3_EXT\0"
+   "GL_COLOR_ATTACHMENT4_EXT\0"
+   "GL_COLOR_ATTACHMENT5_EXT\0"
+   "GL_COLOR_ATTACHMENT6_EXT\0"
+   "GL_COLOR_ATTACHMENT7_EXT\0"
+   "GL_COLOR_ATTACHMENT8_EXT\0"
+   "GL_COLOR_ATTACHMENT9_EXT\0"
+   "GL_COLOR_BUFFER_BIT\0"
+   "GL_COLOR_CLEAR_VALUE\0"
+   "GL_COLOR_INDEX\0"
+   "GL_COLOR_INDEXES\0"
+   "GL_COLOR_LOGIC_OP\0"
+   "GL_COLOR_MATERIAL\0"
+   "GL_COLOR_MATERIAL_FACE\0"
+   "GL_COLOR_MATERIAL_PARAMETER\0"
+   "GL_COLOR_MATRIX\0"
+   "GL_COLOR_MATRIX_SGI\0"
+   "GL_COLOR_MATRIX_STACK_DEPTH\0"
+   "GL_COLOR_MATRIX_STACK_DEPTH_SGI\0"
+   "GL_COLOR_SUM\0"
+   "GL_COLOR_SUM_ARB\0"
+   "GL_COLOR_TABLE\0"
+   "GL_COLOR_TABLE_ALPHA_SIZE\0"
+   "GL_COLOR_TABLE_ALPHA_SIZE_EXT\0"
+   "GL_COLOR_TABLE_ALPHA_SIZE_SGI\0"
+   "GL_COLOR_TABLE_BIAS\0"
+   "GL_COLOR_TABLE_BIAS_SGI\0"
+   "GL_COLOR_TABLE_BLUE_SIZE\0"
+   "GL_COLOR_TABLE_BLUE_SIZE_EXT\0"
+   "GL_COLOR_TABLE_BLUE_SIZE_SGI\0"
+   "GL_COLOR_TABLE_FORMAT\0"
+   "GL_COLOR_TABLE_FORMAT_EXT\0"
+   "GL_COLOR_TABLE_FORMAT_SGI\0"
+   "GL_COLOR_TABLE_GREEN_SIZE\0"
+   "GL_COLOR_TABLE_GREEN_SIZE_EXT\0"
+   "GL_COLOR_TABLE_GREEN_SIZE_SGI\0"
+   "GL_COLOR_TABLE_INTENSITY_SIZE\0"
+   "GL_COLOR_TABLE_INTENSITY_SIZE_EXT\0"
+   "GL_COLOR_TABLE_INTENSITY_SIZE_SGI\0"
+   "GL_COLOR_TABLE_LUMINANCE_SIZE\0"
+   "GL_COLOR_TABLE_LUMINANCE_SIZE_EXT\0"
+   "GL_COLOR_TABLE_LUMINANCE_SIZE_SGI\0"
+   "GL_COLOR_TABLE_RED_SIZE\0"
+   "GL_COLOR_TABLE_RED_SIZE_EXT\0"
+   "GL_COLOR_TABLE_RED_SIZE_SGI\0"
+   "GL_COLOR_TABLE_SCALE\0"
+   "GL_COLOR_TABLE_SCALE_SGI\0"
+   "GL_COLOR_TABLE_WIDTH\0"
+   "GL_COLOR_TABLE_WIDTH_EXT\0"
+   "GL_COLOR_TABLE_WIDTH_SGI\0"
+   "GL_COLOR_WRITEMASK\0"
+   "GL_COMBINE\0"
+   "GL_COMBINE4\0"
+   "GL_COMBINE_ALPHA\0"
+   "GL_COMBINE_ALPHA_ARB\0"
+   "GL_COMBINE_ALPHA_EXT\0"
+   "GL_COMBINE_ARB\0"
+   "GL_COMBINE_EXT\0"
+   "GL_COMBINE_RGB\0"
+   "GL_COMBINE_RGB_ARB\0"
+   "GL_COMBINE_RGB_EXT\0"
+   "GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT\0"
+   "GL_COMPARE_R_TO_TEXTURE\0"
+   "GL_COMPARE_R_TO_TEXTURE_ARB\0"
+   "GL_COMPILE\0"
+   "GL_COMPILE_AND_EXECUTE\0"
+   "GL_COMPILE_STATUS\0"
+   "GL_COMPRESSED_ALPHA\0"
+   "GL_COMPRESSED_ALPHA_ARB\0"
+   "GL_COMPRESSED_INTENSITY\0"
+   "GL_COMPRESSED_INTENSITY_ARB\0"
+   "GL_COMPRESSED_LUMINANCE\0"
+   "GL_COMPRESSED_LUMINANCE_ALPHA\0"
+   "GL_COMPRESSED_LUMINANCE_ALPHA_ARB\0"
+   "GL_COMPRESSED_LUMINANCE_ARB\0"
+   "GL_COMPRESSED_RGB\0"
+   "GL_COMPRESSED_RGBA\0"
+   "GL_COMPRESSED_RGBA_ARB\0"
+   "GL_COMPRESSED_RGBA_FXT1_3DFX\0"
+   "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT\0"
+   "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT\0"
+   "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\0"
+   "GL_COMPRESSED_RGB_ARB\0"
+   "GL_COMPRESSED_RGB_FXT1_3DFX\0"
+   "GL_COMPRESSED_RGB_S3TC_DXT1_EXT\0"
+   "GL_COMPRESSED_TEXTURE_FORMATS\0"
+   "GL_CONSTANT\0"
+   "GL_CONSTANT_ALPHA\0"
+   "GL_CONSTANT_ALPHA_EXT\0"
+   "GL_CONSTANT_ARB\0"
+   "GL_CONSTANT_ATTENUATION\0"
+   "GL_CONSTANT_BORDER_HP\0"
+   "GL_CONSTANT_COLOR\0"
+   "GL_CONSTANT_COLOR_EXT\0"
+   "GL_CONSTANT_EXT\0"
+   "GL_CONVOLUTION_1D\0"
+   "GL_CONVOLUTION_2D\0"
+   "GL_CONVOLUTION_BORDER_COLOR\0"
+   "GL_CONVOLUTION_BORDER_COLOR_HP\0"
+   "GL_CONVOLUTION_BORDER_MODE\0"
+   "GL_CONVOLUTION_BORDER_MODE_EXT\0"
+   "GL_CONVOLUTION_FILTER_BIAS\0"
+   "GL_CONVOLUTION_FILTER_BIAS_EXT\0"
+   "GL_CONVOLUTION_FILTER_SCALE\0"
+   "GL_CONVOLUTION_FILTER_SCALE_EXT\0"
+   "GL_CONVOLUTION_FORMAT\0"
+   "GL_CONVOLUTION_FORMAT_EXT\0"
+   "GL_CONVOLUTION_HEIGHT\0"
+   "GL_CONVOLUTION_HEIGHT_EXT\0"
+   "GL_CONVOLUTION_WIDTH\0"
+   "GL_CONVOLUTION_WIDTH_EXT\0"
+   "GL_COORD_REPLACE\0"
+   "GL_COORD_REPLACE_ARB\0"
+   "GL_COORD_REPLACE_NV\0"
+   "GL_COPY\0"
+   "GL_COPY_INVERTED\0"
+   "GL_COPY_PIXEL_TOKEN\0"
+   "GL_CULL_FACE\0"
+   "GL_CULL_FACE_MODE\0"
+   "GL_CULL_VERTEX_EXT\0"
+   "GL_CULL_VERTEX_EYE_POSITION_EXT\0"
+   "GL_CULL_VERTEX_OBJECT_POSITION_EXT\0"
+   "GL_CURRENT_ATTRIB_NV\0"
+   "GL_CURRENT_BIT\0"
+   "GL_CURRENT_COLOR\0"
+   "GL_CURRENT_FOG_COORD\0"
+   "GL_CURRENT_FOG_COORDINATE\0"
+   "GL_CURRENT_INDEX\0"
+   "GL_CURRENT_MATRIX_ARB\0"
+   "GL_CURRENT_MATRIX_INDEX_ARB\0"
+   "GL_CURRENT_MATRIX_NV\0"
+   "GL_CURRENT_MATRIX_STACK_DEPTH_ARB\0"
+   "GL_CURRENT_MATRIX_STACK_DEPTH_NV\0"
+   "GL_CURRENT_NORMAL\0"
+   "GL_CURRENT_PALETTE_MATRIX_ARB\0"
+   "GL_CURRENT_PROGRAM\0"
+   "GL_CURRENT_QUERY\0"
+   "GL_CURRENT_QUERY_ARB\0"
+   "GL_CURRENT_RASTER_COLOR\0"
+   "GL_CURRENT_RASTER_DISTANCE\0"
+   "GL_CURRENT_RASTER_INDEX\0"
+   "GL_CURRENT_RASTER_POSITION\0"
+   "GL_CURRENT_RASTER_POSITION_VALID\0"
+   "GL_CURRENT_RASTER_TEXTURE_COORDS\0"
+   "GL_CURRENT_SECONDARY_COLOR\0"
+   "GL_CURRENT_TEXTURE_COORDS\0"
+   "GL_CURRENT_VERTEX_ATTRIB\0"
+   "GL_CURRENT_VERTEX_ATTRIB_ARB\0"
+   "GL_CURRENT_WEIGHT_ARB\0"
+   "GL_CW\0"
+   "GL_DEBUG_ASSERT_MESA\0"
+   "GL_DEBUG_OBJECT_MESA\0"
+   "GL_DEBUG_PRINT_MESA\0"
+   "GL_DECAL\0"
+   "GL_DECR\0"
+   "GL_DECR_WRAP\0"
+   "GL_DECR_WRAP_EXT\0"
+   "GL_DELETE_STATUS\0"
+   "GL_DEPTH\0"
+   "GL_DEPTH_ATTACHMENT_EXT\0"
+   "GL_DEPTH_BIAS\0"
+   "GL_DEPTH_BITS\0"
+   "GL_DEPTH_BOUNDS_EXT\0"
+   "GL_DEPTH_BOUNDS_TEST_EXT\0"
+   "GL_DEPTH_BUFFER_BIT\0"
+   "GL_DEPTH_CLAMP_NV\0"
+   "GL_DEPTH_CLEAR_VALUE\0"
+   "GL_DEPTH_COMPONENT\0"
+   "GL_DEPTH_COMPONENT16\0"
+   "GL_DEPTH_COMPONENT16_ARB\0"
+   "GL_DEPTH_COMPONENT16_SGIX\0"
+   "GL_DEPTH_COMPONENT24\0"
+   "GL_DEPTH_COMPONENT24_ARB\0"
+   "GL_DEPTH_COMPONENT24_SGIX\0"
+   "GL_DEPTH_COMPONENT32\0"
+   "GL_DEPTH_COMPONENT32_ARB\0"
+   "GL_DEPTH_COMPONENT32_SGIX\0"
+   "GL_DEPTH_FUNC\0"
+   "GL_DEPTH_RANGE\0"
+   "GL_DEPTH_SCALE\0"
+   "GL_DEPTH_STENCIL_NV\0"
+   "GL_DEPTH_STENCIL_TO_BGRA_NV\0"
+   "GL_DEPTH_STENCIL_TO_RGBA_NV\0"
+   "GL_DEPTH_TEST\0"
+   "GL_DEPTH_TEXTURE_MODE\0"
+   "GL_DEPTH_TEXTURE_MODE_ARB\0"
+   "GL_DEPTH_WRITEMASK\0"
+   "GL_DIFFUSE\0"
+   "GL_DITHER\0"
+   "GL_DOMAIN\0"
+   "GL_DONT_CARE\0"
+   "GL_DOT3_RGB\0"
+   "GL_DOT3_RGBA\0"
+   "GL_DOT3_RGBA_ARB\0"
+   "GL_DOT3_RGBA_EXT\0"
+   "GL_DOT3_RGB_ARB\0"
+   "GL_DOT3_RGB_EXT\0"
+   "GL_DOUBLE\0"
+   "GL_DOUBLEBUFFER\0"
+   "GL_DRAW_BUFFER\0"
+   "GL_DRAW_BUFFER0\0"
+   "GL_DRAW_BUFFER0_ARB\0"
+   "GL_DRAW_BUFFER0_ATI\0"
+   "GL_DRAW_BUFFER1\0"
+   "GL_DRAW_BUFFER10\0"
+   "GL_DRAW_BUFFER10_ARB\0"
+   "GL_DRAW_BUFFER10_ATI\0"
+   "GL_DRAW_BUFFER11\0"
+   "GL_DRAW_BUFFER11_ARB\0"
+   "GL_DRAW_BUFFER11_ATI\0"
+   "GL_DRAW_BUFFER12\0"
+   "GL_DRAW_BUFFER12_ARB\0"
+   "GL_DRAW_BUFFER12_ATI\0"
+   "GL_DRAW_BUFFER13\0"
+   "GL_DRAW_BUFFER13_ARB\0"
+   "GL_DRAW_BUFFER13_ATI\0"
+   "GL_DRAW_BUFFER14\0"
+   "GL_DRAW_BUFFER14_ARB\0"
+   "GL_DRAW_BUFFER14_ATI\0"
+   "GL_DRAW_BUFFER15\0"
+   "GL_DRAW_BUFFER15_ARB\0"
+   "GL_DRAW_BUFFER15_ATI\0"
+   "GL_DRAW_BUFFER1_ARB\0"
+   "GL_DRAW_BUFFER1_ATI\0"
+   "GL_DRAW_BUFFER2\0"
+   "GL_DRAW_BUFFER2_ARB\0"
+   "GL_DRAW_BUFFER2_ATI\0"
+   "GL_DRAW_BUFFER3\0"
+   "GL_DRAW_BUFFER3_ARB\0"
+   "GL_DRAW_BUFFER3_ATI\0"
+   "GL_DRAW_BUFFER4\0"
+   "GL_DRAW_BUFFER4_ARB\0"
+   "GL_DRAW_BUFFER4_ATI\0"
+   "GL_DRAW_BUFFER5\0"
+   "GL_DRAW_BUFFER5_ARB\0"
+   "GL_DRAW_BUFFER5_ATI\0"
+   "GL_DRAW_BUFFER6\0"
+   "GL_DRAW_BUFFER6_ARB\0"
+   "GL_DRAW_BUFFER6_ATI\0"
+   "GL_DRAW_BUFFER7\0"
+   "GL_DRAW_BUFFER7_ARB\0"
+   "GL_DRAW_BUFFER7_ATI\0"
+   "GL_DRAW_BUFFER8\0"
+   "GL_DRAW_BUFFER8_ARB\0"
+   "GL_DRAW_BUFFER8_ATI\0"
+   "GL_DRAW_BUFFER9\0"
+   "GL_DRAW_BUFFER9_ARB\0"
+   "GL_DRAW_BUFFER9_ATI\0"
+   "GL_DRAW_FRAMEBUFFER_BINDING_EXT\0"
+   "GL_DRAW_FRAMEBUFFER_EXT\0"
+   "GL_DRAW_PIXEL_TOKEN\0"
+   "GL_DST_ALPHA\0"
+   "GL_DST_COLOR\0"
+   "GL_DYNAMIC_COPY\0"
+   "GL_DYNAMIC_COPY_ARB\0"
+   "GL_DYNAMIC_DRAW\0"
+   "GL_DYNAMIC_DRAW_ARB\0"
+   "GL_DYNAMIC_READ\0"
+   "GL_DYNAMIC_READ_ARB\0"
+   "GL_EDGE_FLAG\0"
+   "GL_EDGE_FLAG_ARRAY\0"
+   "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING\0"
+   "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB\0"
+   "GL_EDGE_FLAG_ARRAY_POINTER\0"
+   "GL_EDGE_FLAG_ARRAY_STRIDE\0"
+   "GL_ELEMENT_ARRAY_BUFFER\0"
+   "GL_ELEMENT_ARRAY_BUFFER_ARB\0"
+   "GL_ELEMENT_ARRAY_BUFFER_BINDING\0"
+   "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB\0"
+   "GL_EMISSION\0"
+   "GL_ENABLE_BIT\0"
+   "GL_EQUAL\0"
+   "GL_EQUIV\0"
+   "GL_EVAL_BIT\0"
+   "GL_EXP\0"
+   "GL_EXP2\0"
+   "GL_EXTENSIONS\0"
+   "GL_EYE_LINEAR\0"
+   "GL_EYE_PLANE\0"
+   "GL_EYE_PLANE_ABSOLUTE_NV\0"
+   "GL_EYE_RADIAL_NV\0"
+   "GL_FALSE\0"
+   "GL_FASTEST\0"
+   "GL_FEEDBACK\0"
+   "GL_FEEDBACK_BUFFER_POINTER\0"
+   "GL_FEEDBACK_BUFFER_SIZE\0"
+   "GL_FEEDBACK_BUFFER_TYPE\0"
+   "GL_FILL\0"
+   "GL_FLAT\0"
+   "GL_FLOAT\0"
+   "GL_FLOAT_MAT2\0"
+   "GL_FLOAT_MAT2_ARB\0"
+   "GL_FLOAT_MAT3\0"
+   "GL_FLOAT_MAT3_ARB\0"
+   "GL_FLOAT_MAT4\0"
+   "GL_FLOAT_MAT4_ARB\0"
+   "GL_FLOAT_VEC2\0"
+   "GL_FLOAT_VEC2_ARB\0"
+   "GL_FLOAT_VEC3\0"
+   "GL_FLOAT_VEC3_ARB\0"
+   "GL_FLOAT_VEC4\0"
+   "GL_FLOAT_VEC4_ARB\0"
+   "GL_FOG\0"
+   "GL_FOG_BIT\0"
+   "GL_FOG_COLOR\0"
+   "GL_FOG_COORD\0"
+   "GL_FOG_COORDINATE\0"
+   "GL_FOG_COORDINATE_ARRAY\0"
+   "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING\0"
+   "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB\0"
+   "GL_FOG_COORDINATE_ARRAY_POINTER\0"
+   "GL_FOG_COORDINATE_ARRAY_STRIDE\0"
+   "GL_FOG_COORDINATE_ARRAY_TYPE\0"
+   "GL_FOG_COORDINATE_SOURCE\0"
+   "GL_FOG_COORD_ARRAY\0"
+   "GL_FOG_COORD_ARRAY_BUFFER_BINDING\0"
+   "GL_FOG_COORD_ARRAY_POINTER\0"
+   "GL_FOG_COORD_ARRAY_STRIDE\0"
+   "GL_FOG_COORD_ARRAY_TYPE\0"
+   "GL_FOG_COORD_SRC\0"
+   "GL_FOG_DENSITY\0"
+   "GL_FOG_DISTANCE_MODE_NV\0"
+   "GL_FOG_END\0"
+   "GL_FOG_HINT\0"
+   "GL_FOG_INDEX\0"
+   "GL_FOG_MODE\0"
+   "GL_FOG_OFFSET_SGIX\0"
+   "GL_FOG_OFFSET_VALUE_SGIX\0"
+   "GL_FOG_START\0"
+   "GL_FRAGMENT_DEPTH\0"
+   "GL_FRAGMENT_PROGRAM_ARB\0"
+   "GL_FRAGMENT_SHADER\0"
+   "GL_FRAGMENT_SHADER_ARB\0"
+   "GL_FRAGMENT_SHADER_DERIVATIVE_HINT\0"
+   "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0"
+   "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT\0"
+   "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT\0"
+   "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT\0"
+   "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT\0"
+   "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT\0"
+   "GL_FRAMEBUFFER_BINDING_EXT\0"
+   "GL_FRAMEBUFFER_COMPLETE_EXT\0"
+   "GL_FRAMEBUFFER_EXT\0"
+   "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT\0"
+   "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT\0"
+   "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT\0"
+   "GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT\0"
+   "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0"
+   "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0"
+   "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT\0"
+   "GL_FRAMEBUFFER_STATUS_ERROR_EXT\0"
+   "GL_FRAMEBUFFER_UNSUPPORTED_EXT\0"
+   "GL_FRONT\0"
+   "GL_FRONT_AND_BACK\0"
+   "GL_FRONT_FACE\0"
+   "GL_FRONT_LEFT\0"
+   "GL_FRONT_RIGHT\0"
+   "GL_FUNC_ADD\0"
+   "GL_FUNC_ADD_EXT\0"
+   "GL_FUNC_REVERSE_SUBTRACT\0"
+   "GL_FUNC_REVERSE_SUBTRACT_EXT\0"
+   "GL_FUNC_SUBTRACT\0"
+   "GL_FUNC_SUBTRACT_EXT\0"
+   "GL_GENERATE_MIPMAP\0"
+   "GL_GENERATE_MIPMAP_HINT\0"
+   "GL_GENERATE_MIPMAP_HINT_SGIS\0"
+   "GL_GENERATE_MIPMAP_SGIS\0"
+   "GL_GEQUAL\0"
+   "GL_GL_BLEND_EQUATION_RGB\0"
+   "GL_GL_COMPRESSED_SLUMINANCE\0"
+   "GL_GL_COMPRESSED_SLUMINANCE_ALPHA\0"
+   "GL_GL_COMPRESSED_SRGB\0"
+   "GL_GL_COMPRESSED_SRGB_ALPHA\0"
+   "GL_GL_CURRENT_RASTER_SECONDARY_COLOR\0"
+   "GL_GL_FLOAT_MAT2x3\0"
+   "GL_GL_FLOAT_MAT2x4\0"
+   "GL_GL_FLOAT_MAT3x2\0"
+   "GL_GL_FLOAT_MAT3x4\0"
+   "GL_GL_FLOAT_MAT4x2\0"
+   "GL_GL_FLOAT_MAT4x3\0"
+   "GL_GL_PIXEL_PACK_BUFFER\0"
+   "GL_GL_PIXEL_PACK_BUFFER_BINDING\0"
+   "GL_GL_PIXEL_UNPACK_BUFFER\0"
+   "GL_GL_PIXEL_UNPACK_BUFFER_BINDING\0"
+   "GL_GL_SLUMINANCE\0"
+   "GL_GL_SLUMINANCE8\0"
+   "GL_GL_SLUMINANCE8_ALPHA8\0"
+   "GL_GL_SLUMINANCE_ALPHA\0"
+   "GL_GL_SRGB\0"
+   "GL_GL_SRGB8\0"
+   "GL_GL_SRGB8_ALPHA8\0"
+   "GL_GL_SRGB_ALPHA\0"
+   "GL_GREATER\0"
+   "GL_GREEN\0"
+   "GL_GREEN_BIAS\0"
+   "GL_GREEN_BITS\0"
+   "GL_GREEN_SCALE\0"
+   "GL_HINT_BIT\0"
+   "GL_HISTOGRAM\0"
+   "GL_HISTOGRAM_ALPHA_SIZE\0"
+   "GL_HISTOGRAM_ALPHA_SIZE_EXT\0"
+   "GL_HISTOGRAM_BLUE_SIZE\0"
+   "GL_HISTOGRAM_BLUE_SIZE_EXT\0"
+   "GL_HISTOGRAM_EXT\0"
+   "GL_HISTOGRAM_FORMAT\0"
+   "GL_HISTOGRAM_FORMAT_EXT\0"
+   "GL_HISTOGRAM_GREEN_SIZE\0"
+   "GL_HISTOGRAM_GREEN_SIZE_EXT\0"
+   "GL_HISTOGRAM_LUMINANCE_SIZE\0"
+   "GL_HISTOGRAM_LUMINANCE_SIZE_EXT\0"
+   "GL_HISTOGRAM_RED_SIZE\0"
+   "GL_HISTOGRAM_RED_SIZE_EXT\0"
+   "GL_HISTOGRAM_SINK\0"
+   "GL_HISTOGRAM_SINK_EXT\0"
+   "GL_HISTOGRAM_WIDTH\0"
+   "GL_HISTOGRAM_WIDTH_EXT\0"
+   "GL_IDENTITY_NV\0"
+   "GL_IGNORE_BORDER_HP\0"
+   "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES\0"
+   "GL_IMPLEMENTATION_COLOR_READ_TYPE_OES\0"
+   "GL_INCR\0"
+   "GL_INCR_WRAP\0"
+   "GL_INCR_WRAP_EXT\0"
+   "GL_INDEX_ARRAY\0"
+   "GL_INDEX_ARRAY_BUFFER_BINDING\0"
+   "GL_INDEX_ARRAY_BUFFER_BINDING_ARB\0"
+   "GL_INDEX_ARRAY_POINTER\0"
+   "GL_INDEX_ARRAY_STRIDE\0"
+   "GL_INDEX_ARRAY_TYPE\0"
+   "GL_INDEX_BITS\0"
+   "GL_INDEX_CLEAR_VALUE\0"
+   "GL_INDEX_LOGIC_OP\0"
+   "GL_INDEX_MODE\0"
+   "GL_INDEX_OFFSET\0"
+   "GL_INDEX_SHIFT\0"
+   "GL_INDEX_WRITEMASK\0"
+   "GL_INFO_LOG_LENGTH\0"
+   "GL_INT\0"
+   "GL_INTENSITY\0"
+   "GL_INTENSITY12\0"
+   "GL_INTENSITY12_EXT\0"
+   "GL_INTENSITY16\0"
+   "GL_INTENSITY16_EXT\0"
+   "GL_INTENSITY4\0"
+   "GL_INTENSITY4_EXT\0"
+   "GL_INTENSITY8\0"
+   "GL_INTENSITY8_EXT\0"
+   "GL_INTENSITY_EXT\0"
+   "GL_INTERPOLATE\0"
+   "GL_INTERPOLATE_ARB\0"
+   "GL_INTERPOLATE_EXT\0"
+   "GL_INT_VEC2\0"
+   "GL_INT_VEC2_ARB\0"
+   "GL_INT_VEC3\0"
+   "GL_INT_VEC3_ARB\0"
+   "GL_INT_VEC4\0"
+   "GL_INT_VEC4_ARB\0"
+   "GL_INVALID_ENUM\0"
+   "GL_INVALID_FRAMEBUFFER_OPERATION_EXT\0"
+   "GL_INVALID_OPERATION\0"
+   "GL_INVALID_VALUE\0"
+   "GL_INVERSE_NV\0"
+   "GL_INVERSE_TRANSPOSE_NV\0"
+   "GL_INVERT\0"
+   "GL_KEEP\0"
+   "GL_LEFT\0"
+   "GL_LEQUAL\0"
+   "GL_LESS\0"
+   "GL_LIGHT0\0"
+   "GL_LIGHT1\0"
+   "GL_LIGHT2\0"
+   "GL_LIGHT3\0"
+   "GL_LIGHT4\0"
+   "GL_LIGHT5\0"
+   "GL_LIGHT6\0"
+   "GL_LIGHT7\0"
+   "GL_LIGHTING\0"
+   "GL_LIGHTING_BIT\0"
+   "GL_LIGHT_MODEL_AMBIENT\0"
+   "GL_LIGHT_MODEL_COLOR_CONTROL\0"
+   "GL_LIGHT_MODEL_COLOR_CONTROL_EXT\0"
+   "GL_LIGHT_MODEL_LOCAL_VIEWER\0"
+   "GL_LIGHT_MODEL_TWO_SIDE\0"
+   "GL_LINE\0"
+   "GL_LINEAR\0"
+   "GL_LINEAR_ATTENUATION\0"
+   "GL_LINEAR_CLIPMAP_LINEAR_SGIX\0"
+   "GL_LINEAR_CLIPMAP_NEAREST_SGIX\0"
+   "GL_LINEAR_MIPMAP_LINEAR\0"
+   "GL_LINEAR_MIPMAP_NEAREST\0"
+   "GL_LINES\0"
+   "GL_LINE_BIT\0"
+   "GL_LINE_LOOP\0"
+   "GL_LINE_RESET_TOKEN\0"
+   "GL_LINE_SMOOTH\0"
+   "GL_LINE_SMOOTH_HINT\0"
+   "GL_LINE_STIPPLE\0"
+   "GL_LINE_STIPPLE_PATTERN\0"
+   "GL_LINE_STIPPLE_REPEAT\0"
+   "GL_LINE_STRIP\0"
+   "GL_LINE_TOKEN\0"
+   "GL_LINE_WIDTH\0"
+   "GL_LINE_WIDTH_GRANULARITY\0"
+   "GL_LINE_WIDTH_RANGE\0"
+   "GL_LINK_STATUS\0"
+   "GL_LIST_BASE\0"
+   "GL_LIST_BIT\0"
+   "GL_LIST_INDEX\0"
+   "GL_LIST_MODE\0"
+   "GL_LOAD\0"
+   "GL_LOGIC_OP\0"
+   "GL_LOGIC_OP_MODE\0"
+   "GL_LOWER_LEFT\0"
+   "GL_LUMINANCE\0"
+   "GL_LUMINANCE12\0"
+   "GL_LUMINANCE12_ALPHA12\0"
+   "GL_LUMINANCE12_ALPHA12_EXT\0"
+   "GL_LUMINANCE12_ALPHA4\0"
+   "GL_LUMINANCE12_ALPHA4_EXT\0"
+   "GL_LUMINANCE12_EXT\0"
+   "GL_LUMINANCE16\0"
+   "GL_LUMINANCE16_ALPHA16\0"
+   "GL_LUMINANCE16_ALPHA16_EXT\0"
+   "GL_LUMINANCE16_EXT\0"
+   "GL_LUMINANCE4\0"
+   "GL_LUMINANCE4_ALPHA4\0"
+   "GL_LUMINANCE4_ALPHA4_EXT\0"
+   "GL_LUMINANCE4_EXT\0"
+   "GL_LUMINANCE6_ALPHA2\0"
+   "GL_LUMINANCE6_ALPHA2_EXT\0"
+   "GL_LUMINANCE8\0"
+   "GL_LUMINANCE8_ALPHA8\0"
+   "GL_LUMINANCE8_ALPHA8_EXT\0"
+   "GL_LUMINANCE8_EXT\0"
+   "GL_LUMINANCE_ALPHA\0"
+   "GL_MAP1_COLOR_4\0"
+   "GL_MAP1_GRID_DOMAIN\0"
+   "GL_MAP1_GRID_SEGMENTS\0"
+   "GL_MAP1_INDEX\0"
+   "GL_MAP1_NORMAL\0"
+   "GL_MAP1_TEXTURE_COORD_1\0"
+   "GL_MAP1_TEXTURE_COORD_2\0"
+   "GL_MAP1_TEXTURE_COORD_3\0"
+   "GL_MAP1_TEXTURE_COORD_4\0"
+   "GL_MAP1_VERTEX_3\0"
+   "GL_MAP1_VERTEX_4\0"
+   "GL_MAP1_VERTEX_ATTRIB0_4_NV\0"
+   "GL_MAP1_VERTEX_ATTRIB10_4_NV\0"
+   "GL_MAP1_VERTEX_ATTRIB11_4_NV\0"
+   "GL_MAP1_VERTEX_ATTRIB12_4_NV\0"
+   "GL_MAP1_VERTEX_ATTRIB13_4_NV\0"
+   "GL_MAP1_VERTEX_ATTRIB14_4_NV\0"
+   "GL_MAP1_VERTEX_ATTRIB15_4_NV\0"
+   "GL_MAP1_VERTEX_ATTRIB1_4_NV\0"
+   "GL_MAP1_VERTEX_ATTRIB2_4_NV\0"
+   "GL_MAP1_VERTEX_ATTRIB3_4_NV\0"
+   "GL_MAP1_VERTEX_ATTRIB4_4_NV\0"
+   "GL_MAP1_VERTEX_ATTRIB5_4_NV\0"
+   "GL_MAP1_VERTEX_ATTRIB6_4_NV\0"
+   "GL_MAP1_VERTEX_ATTRIB7_4_NV\0"
+   "GL_MAP1_VERTEX_ATTRIB8_4_NV\0"
+   "GL_MAP1_VERTEX_ATTRIB9_4_NV\0"
+   "GL_MAP2_COLOR_4\0"
+   "GL_MAP2_GRID_DOMAIN\0"
+   "GL_MAP2_GRID_SEGMENTS\0"
+   "GL_MAP2_INDEX\0"
+   "GL_MAP2_NORMAL\0"
+   "GL_MAP2_TEXTURE_COORD_1\0"
+   "GL_MAP2_TEXTURE_COORD_2\0"
+   "GL_MAP2_TEXTURE_COORD_3\0"
+   "GL_MAP2_TEXTURE_COORD_4\0"
+   "GL_MAP2_VERTEX_3\0"
+   "GL_MAP2_VERTEX_4\0"
+   "GL_MAP2_VERTEX_ATTRIB0_4_NV\0"
+   "GL_MAP2_VERTEX_ATTRIB10_4_NV\0"
+   "GL_MAP2_VERTEX_ATTRIB11_4_NV\0"
+   "GL_MAP2_VERTEX_ATTRIB12_4_NV\0"
+   "GL_MAP2_VERTEX_ATTRIB13_4_NV\0"
+   "GL_MAP2_VERTEX_ATTRIB14_4_NV\0"
+   "GL_MAP2_VERTEX_ATTRIB15_4_NV\0"
+   "GL_MAP2_VERTEX_ATTRIB1_4_NV\0"
+   "GL_MAP2_VERTEX_ATTRIB2_4_NV\0"
+   "GL_MAP2_VERTEX_ATTRIB3_4_NV\0"
+   "GL_MAP2_VERTEX_ATTRIB4_4_NV\0"
+   "GL_MAP2_VERTEX_ATTRIB5_4_NV\0"
+   "GL_MAP2_VERTEX_ATTRIB6_4_NV\0"
+   "GL_MAP2_VERTEX_ATTRIB7_4_NV\0"
+   "GL_MAP2_VERTEX_ATTRIB8_4_NV\0"
+   "GL_MAP2_VERTEX_ATTRIB9_4_NV\0"
+   "GL_MAP_COLOR\0"
+   "GL_MAP_STENCIL\0"
+   "GL_MATRIX0_ARB\0"
+   "GL_MATRIX0_NV\0"
+   "GL_MATRIX10_ARB\0"
+   "GL_MATRIX11_ARB\0"
+   "GL_MATRIX12_ARB\0"
+   "GL_MATRIX13_ARB\0"
+   "GL_MATRIX14_ARB\0"
+   "GL_MATRIX15_ARB\0"
+   "GL_MATRIX16_ARB\0"
+   "GL_MATRIX17_ARB\0"
+   "GL_MATRIX18_ARB\0"
+   "GL_MATRIX19_ARB\0"
+   "GL_MATRIX1_ARB\0"
+   "GL_MATRIX1_NV\0"
+   "GL_MATRIX20_ARB\0"
+   "GL_MATRIX21_ARB\0"
+   "GL_MATRIX22_ARB\0"
+   "GL_MATRIX23_ARB\0"
+   "GL_MATRIX24_ARB\0"
+   "GL_MATRIX25_ARB\0"
+   "GL_MATRIX26_ARB\0"
+   "GL_MATRIX27_ARB\0"
+   "GL_MATRIX28_ARB\0"
+   "GL_MATRIX29_ARB\0"
+   "GL_MATRIX2_ARB\0"
+   "GL_MATRIX2_NV\0"
+   "GL_MATRIX30_ARB\0"
+   "GL_MATRIX31_ARB\0"
+   "GL_MATRIX3_ARB\0"
+   "GL_MATRIX3_NV\0"
+   "GL_MATRIX4_ARB\0"
+   "GL_MATRIX4_NV\0"
+   "GL_MATRIX5_ARB\0"
+   "GL_MATRIX5_NV\0"
+   "GL_MATRIX6_ARB\0"
+   "GL_MATRIX6_NV\0"
+   "GL_MATRIX7_ARB\0"
+   "GL_MATRIX7_NV\0"
+   "GL_MATRIX8_ARB\0"
+   "GL_MATRIX9_ARB\0"
+   "GL_MATRIX_INDEX_ARRAY_ARB\0"
+   "GL_MATRIX_INDEX_ARRAY_POINTER_ARB\0"
+   "GL_MATRIX_INDEX_ARRAY_SIZE_ARB\0"
+   "GL_MATRIX_INDEX_ARRAY_STRIDE_ARB\0"
+   "GL_MATRIX_INDEX_ARRAY_TYPE_ARB\0"
+   "GL_MATRIX_MODE\0"
+   "GL_MATRIX_PALETTE_ARB\0"
+   "GL_MAX\0"
+   "GL_MAX_3D_TEXTURE_SIZE\0"
+   "GL_MAX_ARRAY_TEXTURE_LAYERS_EXT\0"
+   "GL_MAX_ATTRIB_STACK_DEPTH\0"
+   "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\0"
+   "GL_MAX_CLIPMAP_DEPTH_SGIX\0"
+   "GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
+   "GL_MAX_CLIP_PLANES\0"
+   "GL_MAX_COLOR_ATTACHMENTS_EXT\0"
+   "GL_MAX_COLOR_MATRIX_STACK_DEPTH\0"
+   "GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0"
+   "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS\0"
+   "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB\0"
+   "GL_MAX_CONVOLUTION_HEIGHT\0"
+   "GL_MAX_CONVOLUTION_HEIGHT_EXT\0"
+   "GL_MAX_CONVOLUTION_WIDTH\0"
+   "GL_MAX_CONVOLUTION_WIDTH_EXT\0"
+   "GL_MAX_CUBE_MAP_TEXTURE_SIZE\0"
+   "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB\0"
+   "GL_MAX_DRAW_BUFFERS\0"
+   "GL_MAX_DRAW_BUFFERS_ARB\0"
+   "GL_MAX_DRAW_BUFFERS_ATI\0"
+   "GL_MAX_ELEMENTS_INDICES\0"
+   "GL_MAX_ELEMENTS_VERTICES\0"
+   "GL_MAX_EVAL_ORDER\0"
+   "GL_MAX_EXT\0"
+   "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0"
+   "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0"
+   "GL_MAX_LIGHTS\0"
+   "GL_MAX_LIST_NESTING\0"
+   "GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB\0"
+   "GL_MAX_MODELVIEW_STACK_DEPTH\0"
+   "GL_MAX_NAME_STACK_DEPTH\0"
+   "GL_MAX_PALETTE_MATRICES_ARB\0"
+   "GL_MAX_PIXEL_MAP_TABLE\0"
+   "GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB\0"
+   "GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
+   "GL_MAX_PROGRAM_ATTRIBS_ARB\0"
+   "GL_MAX_PROGRAM_CALL_DEPTH_NV\0"
+   "GL_MAX_PROGRAM_ENV_PARAMETERS_ARB\0"
+   "GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV\0"
+   "GL_MAX_PROGRAM_IF_DEPTH_NV\0"
+   "GL_MAX_PROGRAM_INSTRUCTIONS_ARB\0"
+   "GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB\0"
+   "GL_MAX_PROGRAM_LOOP_COUNT_NV\0"
+   "GL_MAX_PROGRAM_LOOP_DEPTH_NV\0"
+   "GL_MAX_PROGRAM_MATRICES_ARB\0"
+   "GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB\0"
+   "GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
+   "GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
+   "GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB\0"
+   "GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
+   "GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB\0"
+   "GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
+   "GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
+   "GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
+   "GL_MAX_PROGRAM_PARAMETERS_ARB\0"
+   "GL_MAX_PROGRAM_TEMPORARIES_ARB\0"
+   "GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB\0"
+   "GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
+   "GL_MAX_PROJECTION_STACK_DEPTH\0"
+   "GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB\0"
+   "GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0"
+   "GL_MAX_RENDERBUFFER_SIZE_EXT\0"
+   "GL_MAX_SHININESS_NV\0"
+   "GL_MAX_SPOT_EXPONENT_NV\0"
+   "GL_MAX_TEXTURE_COORDS\0"
+   "GL_MAX_TEXTURE_COORDS_ARB\0"
+   "GL_MAX_TEXTURE_IMAGE_UNITS\0"
+   "GL_MAX_TEXTURE_IMAGE_UNITS_ARB\0"
+   "GL_MAX_TEXTURE_LOD_BIAS\0"
+   "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT\0"
+   "GL_MAX_TEXTURE_SIZE\0"
+   "GL_MAX_TEXTURE_STACK_DEPTH\0"
+   "GL_MAX_TEXTURE_UNITS\0"
+   "GL_MAX_TEXTURE_UNITS_ARB\0"
+   "GL_MAX_TRACK_MATRICES_NV\0"
+   "GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0"
+   "GL_MAX_VARYING_FLOATS\0"
+   "GL_MAX_VARYING_FLOATS_ARB\0"
+   "GL_MAX_VERTEX_ATTRIBS\0"
+   "GL_MAX_VERTEX_ATTRIBS_ARB\0"
+   "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0"
+   "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0"
+   "GL_MAX_VERTEX_UNIFORM_COMPONENTS\0"
+   "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB\0"
+   "GL_MAX_VERTEX_UNITS_ARB\0"
+   "GL_MAX_VIEWPORT_DIMS\0"
+   "GL_MIN\0"
+   "GL_MINMAX\0"
+   "GL_MINMAX_EXT\0"
+   "GL_MINMAX_FORMAT\0"
+   "GL_MINMAX_FORMAT_EXT\0"
+   "GL_MINMAX_SINK\0"
+   "GL_MINMAX_SINK_EXT\0"
+   "GL_MIN_EXT\0"
+   "GL_MIRRORED_REPEAT\0"
+   "GL_MIRRORED_REPEAT_ARB\0"
+   "GL_MIRRORED_REPEAT_IBM\0"
+   "GL_MIRROR_CLAMP_ATI\0"
+   "GL_MIRROR_CLAMP_EXT\0"
+   "GL_MIRROR_CLAMP_TO_BORDER_EXT\0"
+   "GL_MIRROR_CLAMP_TO_EDGE_ATI\0"
+   "GL_MIRROR_CLAMP_TO_EDGE_EXT\0"
+   "GL_MODELVIEW\0"
+   "GL_MODELVIEW0_ARB\0"
+   "GL_MODELVIEW10_ARB\0"
+   "GL_MODELVIEW11_ARB\0"
+   "GL_MODELVIEW12_ARB\0"
+   "GL_MODELVIEW13_ARB\0"
+   "GL_MODELVIEW14_ARB\0"
+   "GL_MODELVIEW15_ARB\0"
+   "GL_MODELVIEW16_ARB\0"
+   "GL_MODELVIEW17_ARB\0"
+   "GL_MODELVIEW18_ARB\0"
+   "GL_MODELVIEW19_ARB\0"
+   "GL_MODELVIEW1_ARB\0"
+   "GL_MODELVIEW20_ARB\0"
+   "GL_MODELVIEW21_ARB\0"
+   "GL_MODELVIEW22_ARB\0"
+   "GL_MODELVIEW23_ARB\0"
+   "GL_MODELVIEW24_ARB\0"
+   "GL_MODELVIEW25_ARB\0"
+   "GL_MODELVIEW26_ARB\0"
+   "GL_MODELVIEW27_ARB\0"
+   "GL_MODELVIEW28_ARB\0"
+   "GL_MODELVIEW29_ARB\0"
+   "GL_MODELVIEW2_ARB\0"
+   "GL_MODELVIEW30_ARB\0"
+   "GL_MODELVIEW31_ARB\0"
+   "GL_MODELVIEW3_ARB\0"
+   "GL_MODELVIEW4_ARB\0"
+   "GL_MODELVIEW5_ARB\0"
+   "GL_MODELVIEW6_ARB\0"
+   "GL_MODELVIEW7_ARB\0"
+   "GL_MODELVIEW8_ARB\0"
+   "GL_MODELVIEW9_ARB\0"
+   "GL_MODELVIEW_MATRIX\0"
+   "GL_MODELVIEW_PROJECTION_NV\0"
+   "GL_MODELVIEW_STACK_DEPTH\0"
+   "GL_MODULATE\0"
+   "GL_MODULATE_ADD_ATI\0"
+   "GL_MODULATE_SIGNED_ADD_ATI\0"
+   "GL_MODULATE_SUBTRACT_ATI\0"
+   "GL_MULT\0"
+   "GL_MULTISAMPLE\0"
+   "GL_MULTISAMPLE_3DFX\0"
+   "GL_MULTISAMPLE_ARB\0"
+   "GL_MULTISAMPLE_BIT\0"
+   "GL_MULTISAMPLE_BIT_3DFX\0"
+   "GL_MULTISAMPLE_BIT_ARB\0"
+   "GL_MULTISAMPLE_FILTER_HINT_NV\0"
+   "GL_N3F_V3F\0"
+   "GL_NAME_STACK_DEPTH\0"
+   "GL_NAND\0"
+   "GL_NEAREST\0"
+   "GL_NEAREST_CLIPMAP_LINEAR_SGIX\0"
+   "GL_NEAREST_CLIPMAP_NEAREST_SGIX\0"
+   "GL_NEAREST_MIPMAP_LINEAR\0"
+   "GL_NEAREST_MIPMAP_NEAREST\0"
+   "GL_NEVER\0"
+   "GL_NICEST\0"
+   "GL_NONE\0"
+   "GL_NOOP\0"
+   "GL_NOR\0"
+   "GL_NORMALIZE\0"
+   "GL_NORMAL_ARRAY\0"
+   "GL_NORMAL_ARRAY_BUFFER_BINDING\0"
+   "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB\0"
+   "GL_NORMAL_ARRAY_POINTER\0"
+   "GL_NORMAL_ARRAY_STRIDE\0"
+   "GL_NORMAL_ARRAY_TYPE\0"
+   "GL_NORMAL_MAP\0"
+   "GL_NORMAL_MAP_ARB\0"
+   "GL_NORMAL_MAP_NV\0"
+   "GL_NOTEQUAL\0"
+   "GL_NO_ERROR\0"
+   "GL_NUM_COMPRESSED_TEXTURE_FORMATS\0"
+   "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB\0"
+   "GL_OBJECT_ACTIVE_ATTRIBUTES_ARB\0"
+   "GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB\0"
+   "GL_OBJECT_ACTIVE_UNIFORMS_ARB\0"
+   "GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB\0"
+   "GL_OBJECT_ATTACHED_OBJECTS_ARB\0"
+   "GL_OBJECT_COMPILE_STATUS_ARB\0"
+   "GL_OBJECT_DELETE_STATUS_ARB\0"
+   "GL_OBJECT_INFO_LOG_LENGTH_ARB\0"
+   "GL_OBJECT_LINEAR\0"
+   "GL_OBJECT_LINK_STATUS_ARB\0"
+   "GL_OBJECT_PLANE\0"
+   "GL_OBJECT_SHADER_SOURCE_LENGTH_ARB\0"
+   "GL_OBJECT_SUBTYPE_ARB\0"
+   "GL_OBJECT_TYPE_ARB\0"
+   "GL_OBJECT_VALIDATE_STATUS_ARB\0"
+   "GL_OCCLUSION_TEST_HP\0"
+   "GL_OCCLUSION_TEST_RESULT_HP\0"
+   "GL_ONE\0"
+   "GL_ONE_MINUS_CONSTANT_ALPHA\0"
+   "GL_ONE_MINUS_CONSTANT_ALPHA_EXT\0"
+   "GL_ONE_MINUS_CONSTANT_COLOR\0"
+   "GL_ONE_MINUS_CONSTANT_COLOR_EXT\0"
+   "GL_ONE_MINUS_DST_ALPHA\0"
+   "GL_ONE_MINUS_DST_COLOR\0"
+   "GL_ONE_MINUS_SRC_ALPHA\0"
+   "GL_ONE_MINUS_SRC_COLOR\0"
+   "GL_OPERAND0_ALPHA\0"
+   "GL_OPERAND0_ALPHA_ARB\0"
+   "GL_OPERAND0_ALPHA_EXT\0"
+   "GL_OPERAND0_RGB\0"
+   "GL_OPERAND0_RGB_ARB\0"
+   "GL_OPERAND0_RGB_EXT\0"
+   "GL_OPERAND1_ALPHA\0"
+   "GL_OPERAND1_ALPHA_ARB\0"
+   "GL_OPERAND1_ALPHA_EXT\0"
+   "GL_OPERAND1_RGB\0"
+   "GL_OPERAND1_RGB_ARB\0"
+   "GL_OPERAND1_RGB_EXT\0"
+   "GL_OPERAND2_ALPHA\0"
+   "GL_OPERAND2_ALPHA_ARB\0"
+   "GL_OPERAND2_ALPHA_EXT\0"
+   "GL_OPERAND2_RGB\0"
+   "GL_OPERAND2_RGB_ARB\0"
+   "GL_OPERAND2_RGB_EXT\0"
+   "GL_OPERAND3_ALPHA_NV\0"
+   "GL_OPERAND3_RGB_NV\0"
+   "GL_OR\0"
+   "GL_ORDER\0"
+   "GL_OR_INVERTED\0"
+   "GL_OR_REVERSE\0"
+   "GL_OUT_OF_MEMORY\0"
+   "GL_PACK_ALIGNMENT\0"
+   "GL_PACK_IMAGE_HEIGHT\0"
+   "GL_PACK_INVERT_MESA\0"
+   "GL_PACK_LSB_FIRST\0"
+   "GL_PACK_ROW_LENGTH\0"
+   "GL_PACK_SKIP_IMAGES\0"
+   "GL_PACK_SKIP_PIXELS\0"
+   "GL_PACK_SKIP_ROWS\0"
+   "GL_PACK_SWAP_BYTES\0"
+   "GL_PALETTE4_R5_G6_B5_OES\0"
+   "GL_PALETTE4_RGB5_A1_OES\0"
+   "GL_PALETTE4_RGB8_OES\0"
+   "GL_PALETTE4_RGBA4_OES\0"
+   "GL_PALETTE4_RGBA8_OES\0"
+   "GL_PALETTE8_R5_G6_B5_OES\0"
+   "GL_PALETTE8_RGB5_A1_OES\0"
+   "GL_PALETTE8_RGB8_OES\0"
+   "GL_PALETTE8_RGBA4_OES\0"
+   "GL_PALETTE8_RGBA8_OES\0"
+   "GL_PASS_THROUGH_TOKEN\0"
+   "GL_PERSPECTIVE_CORRECTION_HINT\0"
+   "GL_PIXEL_MAP_A_TO_A\0"
+   "GL_PIXEL_MAP_A_TO_A_SIZE\0"
+   "GL_PIXEL_MAP_B_TO_B\0"
+   "GL_PIXEL_MAP_B_TO_B_SIZE\0"
+   "GL_PIXEL_MAP_G_TO_G\0"
+   "GL_PIXEL_MAP_G_TO_G_SIZE\0"
+   "GL_PIXEL_MAP_I_TO_A\0"
+   "GL_PIXEL_MAP_I_TO_A_SIZE\0"
+   "GL_PIXEL_MAP_I_TO_B\0"
+   "GL_PIXEL_MAP_I_TO_B_SIZE\0"
+   "GL_PIXEL_MAP_I_TO_G\0"
+   "GL_PIXEL_MAP_I_TO_G_SIZE\0"
+   "GL_PIXEL_MAP_I_TO_I\0"
+   "GL_PIXEL_MAP_I_TO_I_SIZE\0"
+   "GL_PIXEL_MAP_I_TO_R\0"
+   "GL_PIXEL_MAP_I_TO_R_SIZE\0"
+   "GL_PIXEL_MAP_R_TO_R\0"
+   "GL_PIXEL_MAP_R_TO_R_SIZE\0"
+   "GL_PIXEL_MAP_S_TO_S\0"
+   "GL_PIXEL_MAP_S_TO_S_SIZE\0"
+   "GL_PIXEL_MODE_BIT\0"
+   "GL_PIXEL_PACK_BUFFER_BINDING_EXT\0"
+   "GL_PIXEL_PACK_BUFFER_EXT\0"
+   "GL_PIXEL_UNPACK_BUFFER_BINDING_EXT\0"
+   "GL_PIXEL_UNPACK_BUFFER_EXT\0"
+   "GL_POINT\0"
+   "GL_POINTS\0"
+   "GL_POINT_BIT\0"
+   "GL_POINT_DISTANCE_ATTENUATION\0"
+   "GL_POINT_DISTANCE_ATTENUATION_ARB\0"
+   "GL_POINT_DISTANCE_ATTENUATION_EXT\0"
+   "GL_POINT_DISTANCE_ATTENUATION_SGIS\0"
+   "GL_POINT_FADE_THRESHOLD_SIZE\0"
+   "GL_POINT_FADE_THRESHOLD_SIZE_ARB\0"
+   "GL_POINT_FADE_THRESHOLD_SIZE_EXT\0"
+   "GL_POINT_FADE_THRESHOLD_SIZE_SGIS\0"
+   "GL_POINT_SIZE\0"
+   "GL_POINT_SIZE_GRANULARITY\0"
+   "GL_POINT_SIZE_MAX\0"
+   "GL_POINT_SIZE_MAX_ARB\0"
+   "GL_POINT_SIZE_MAX_EXT\0"
+   "GL_POINT_SIZE_MAX_SGIS\0"
+   "GL_POINT_SIZE_MIN\0"
+   "GL_POINT_SIZE_MIN_ARB\0"
+   "GL_POINT_SIZE_MIN_EXT\0"
+   "GL_POINT_SIZE_MIN_SGIS\0"
+   "GL_POINT_SIZE_RANGE\0"
+   "GL_POINT_SMOOTH\0"
+   "GL_POINT_SMOOTH_HINT\0"
+   "GL_POINT_SPRITE\0"
+   "GL_POINT_SPRITE_ARB\0"
+   "GL_POINT_SPRITE_COORD_ORIGIN\0"
+   "GL_POINT_SPRITE_NV\0"
+   "GL_POINT_SPRITE_R_MODE_NV\0"
+   "GL_POINT_TOKEN\0"
+   "GL_POLYGON\0"
+   "GL_POLYGON_BIT\0"
+   "GL_POLYGON_MODE\0"
+   "GL_POLYGON_OFFSET_BIAS\0"
+   "GL_POLYGON_OFFSET_FACTOR\0"
+   "GL_POLYGON_OFFSET_FILL\0"
+   "GL_POLYGON_OFFSET_LINE\0"
+   "GL_POLYGON_OFFSET_POINT\0"
+   "GL_POLYGON_OFFSET_UNITS\0"
+   "GL_POLYGON_SMOOTH\0"
+   "GL_POLYGON_SMOOTH_HINT\0"
+   "GL_POLYGON_STIPPLE\0"
+   "GL_POLYGON_STIPPLE_BIT\0"
+   "GL_POLYGON_TOKEN\0"
+   "GL_POSITION\0"
+   "GL_POST_COLOR_MATRIX_ALPHA_BIAS\0"
+   "GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI\0"
+   "GL_POST_COLOR_MATRIX_ALPHA_SCALE\0"
+   "GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI\0"
+   "GL_POST_COLOR_MATRIX_BLUE_BIAS\0"
+   "GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI\0"
+   "GL_POST_COLOR_MATRIX_BLUE_SCALE\0"
+   "GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI\0"
+   "GL_POST_COLOR_MATRIX_COLOR_TABLE\0"
+   "GL_POST_COLOR_MATRIX_GREEN_BIAS\0"
+   "GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI\0"
+   "GL_POST_COLOR_MATRIX_GREEN_SCALE\0"
+   "GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI\0"
+   "GL_POST_COLOR_MATRIX_RED_BIAS\0"
+   "GL_POST_COLOR_MATRIX_RED_BIAS_SGI\0"
+   "GL_POST_COLOR_MATRIX_RED_SCALE\0"
+   "GL_POST_COLOR_MATRIX_RED_SCALE_SGI\0"
+   "GL_POST_CONVOLUTION_ALPHA_BIAS\0"
+   "GL_POST_CONVOLUTION_ALPHA_BIAS_EXT\0"
+   "GL_POST_CONVOLUTION_ALPHA_SCALE\0"
+   "GL_POST_CONVOLUTION_ALPHA_SCALE_EXT\0"
+   "GL_POST_CONVOLUTION_BLUE_BIAS\0"
+   "GL_POST_CONVOLUTION_BLUE_BIAS_EXT\0"
+   "GL_POST_CONVOLUTION_BLUE_SCALE\0"
+   "GL_POST_CONVOLUTION_BLUE_SCALE_EXT\0"
+   "GL_POST_CONVOLUTION_COLOR_TABLE\0"
+   "GL_POST_CONVOLUTION_GREEN_BIAS\0"
+   "GL_POST_CONVOLUTION_GREEN_BIAS_EXT\0"
+   "GL_POST_CONVOLUTION_GREEN_SCALE\0"
+   "GL_POST_CONVOLUTION_GREEN_SCALE_EXT\0"
+   "GL_POST_CONVOLUTION_RED_BIAS\0"
+   "GL_POST_CONVOLUTION_RED_BIAS_EXT\0"
+   "GL_POST_CONVOLUTION_RED_SCALE\0"
+   "GL_POST_CONVOLUTION_RED_SCALE_EXT\0"
+   "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX\0"
+   "GL_POST_TEXTURE_FILTER_BIAS_SGIX\0"
+   "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX\0"
+   "GL_POST_TEXTURE_FILTER_SCALE_SGIX\0"
+   "GL_PREVIOUS\0"
+   "GL_PREVIOUS_ARB\0"
+   "GL_PREVIOUS_EXT\0"
+   "GL_PRIMARY_COLOR\0"
+   "GL_PRIMARY_COLOR_ARB\0"
+   "GL_PRIMARY_COLOR_EXT\0"
+   "GL_PROGRAM_ADDRESS_REGISTERS_ARB\0"
+   "GL_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
+   "GL_PROGRAM_ATTRIBS_ARB\0"
+   "GL_PROGRAM_BINDING_ARB\0"
+   "GL_PROGRAM_ERROR_POSITION_ARB\0"
+   "GL_PROGRAM_ERROR_POSITION_NV\0"
+   "GL_PROGRAM_ERROR_STRING_ARB\0"
+   "GL_PROGRAM_FORMAT_ARB\0"
+   "GL_PROGRAM_FORMAT_ASCII_ARB\0"
+   "GL_PROGRAM_INSTRUCTIONS_ARB\0"
+   "GL_PROGRAM_LENGTH_ARB\0"
+   "GL_PROGRAM_LENGTH_NV\0"
+   "GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
+   "GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
+   "GL_PROGRAM_NATIVE_ATTRIBS_ARB\0"
+   "GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
+   "GL_PROGRAM_NATIVE_PARAMETERS_ARB\0"
+   "GL_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
+   "GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
+   "GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
+   "GL_PROGRAM_OBJECT_ARB\0"
+   "GL_PROGRAM_PARAMETERS_ARB\0"
+   "GL_PROGRAM_PARAMETER_NV\0"
+   "GL_PROGRAM_RESIDENT_NV\0"
+   "GL_PROGRAM_STRING_ARB\0"
+   "GL_PROGRAM_STRING_NV\0"
+   "GL_PROGRAM_TARGET_NV\0"
+   "GL_PROGRAM_TEMPORARIES_ARB\0"
+   "GL_PROGRAM_TEX_INDIRECTIONS_ARB\0"
+   "GL_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
+   "GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB\0"
+   "GL_PROJECTION\0"
+   "GL_PROJECTION_MATRIX\0"
+   "GL_PROJECTION_STACK_DEPTH\0"
+   "GL_PROXY_COLOR_TABLE\0"
+   "GL_PROXY_HISTOGRAM\0"
+   "GL_PROXY_HISTOGRAM_EXT\0"
+   "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE\0"
+   "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE\0"
+   "GL_PROXY_TEXTURE_1D\0"
+   "GL_PROXY_TEXTURE_1D_ARRAY_EXT\0"
+   "GL_PROXY_TEXTURE_1D_EXT\0"
+   "GL_PROXY_TEXTURE_2D\0"
+   "GL_PROXY_TEXTURE_2D_ARRAY_EXT\0"
+   "GL_PROXY_TEXTURE_2D_EXT\0"
+   "GL_PROXY_TEXTURE_3D\0"
+   "GL_PROXY_TEXTURE_COLOR_TABLE_SGI\0"
+   "GL_PROXY_TEXTURE_CUBE_MAP\0"
+   "GL_PROXY_TEXTURE_CUBE_MAP_ARB\0"
+   "GL_PROXY_TEXTURE_RECTANGLE_ARB\0"
+   "GL_PROXY_TEXTURE_RECTANGLE_NV\0"
+   "GL_Q\0"
+   "GL_QUADRATIC_ATTENUATION\0"
+   "GL_QUADS\0"
+   "GL_QUAD_MESH_SUN\0"
+   "GL_QUAD_STRIP\0"
+   "GL_QUERY_COUNTER_BITS\0"
+   "GL_QUERY_COUNTER_BITS_ARB\0"
+   "GL_QUERY_RESULT\0"
+   "GL_QUERY_RESULT_ARB\0"
+   "GL_QUERY_RESULT_AVAILABLE\0"
+   "GL_QUERY_RESULT_AVAILABLE_ARB\0"
+   "GL_R\0"
+   "GL_R3_G3_B2\0"
+   "GL_RASTER_POSITION_UNCLIPPED_IBM\0"
+   "GL_READ_BUFFER\0"
+   "GL_READ_FRAMEBUFFER_BINDING_EXT\0"
+   "GL_READ_FRAMEBUFFER_EXT\0"
+   "GL_READ_ONLY\0"
+   "GL_READ_ONLY_ARB\0"
+   "GL_READ_WRITE\0"
+   "GL_READ_WRITE_ARB\0"
+   "GL_RED\0"
+   "GL_REDUCE\0"
+   "GL_REDUCE_EXT\0"
+   "GL_RED_BIAS\0"
+   "GL_RED_BITS\0"
+   "GL_RED_SCALE\0"
+   "GL_REFLECTION_MAP\0"
+   "GL_REFLECTION_MAP_ARB\0"
+   "GL_REFLECTION_MAP_NV\0"
+   "GL_RENDER\0"
+   "GL_RENDERBUFFER_BINDING_EXT\0"
+   "GL_RENDERBUFFER_EXT\0"
+   "GL_RENDERBUFFER_HEIGHT_EXT\0"
+   "GL_RENDERBUFFER_INTERNAL_FORMAT_EXT\0"
+   "GL_RENDERBUFFER_WIDTH_EXT\0"
+   "GL_RENDERER\0"
+   "GL_RENDER_MODE\0"
+   "GL_REPEAT\0"
+   "GL_REPLACE\0"
+   "GL_REPLACE_EXT\0"
+   "GL_REPLICATE_BORDER_HP\0"
+   "GL_RESCALE_NORMAL\0"
+   "GL_RESCALE_NORMAL_EXT\0"
+   "GL_RETURN\0"
+   "GL_RGB\0"
+   "GL_RGB10\0"
+   "GL_RGB10_A2\0"
+   "GL_RGB10_A2_EXT\0"
+   "GL_RGB10_EXT\0"
+   "GL_RGB12\0"
+   "GL_RGB12_EXT\0"
+   "GL_RGB16\0"
+   "GL_RGB16_EXT\0"
+   "GL_RGB2_EXT\0"
+   "GL_RGB4\0"
+   "GL_RGB4_EXT\0"
+   "GL_RGB4_S3TC\0"
+   "GL_RGB5\0"
+   "GL_RGB5_A1\0"
+   "GL_RGB5_A1_EXT\0"
+   "GL_RGB5_EXT\0"
+   "GL_RGB8\0"
+   "GL_RGB8_EXT\0"
+   "GL_RGBA\0"
+   "GL_RGBA12\0"
+   "GL_RGBA12_EXT\0"
+   "GL_RGBA16\0"
+   "GL_RGBA16_EXT\0"
+   "GL_RGBA2\0"
+   "GL_RGBA2_EXT\0"
+   "GL_RGBA4\0"
+   "GL_RGBA4_DXT5_S3TC\0"
+   "GL_RGBA4_EXT\0"
+   "GL_RGBA4_S3TC\0"
+   "GL_RGBA8\0"
+   "GL_RGBA8_EXT\0"
+   "GL_RGBA_DXT5_S3TC\0"
+   "GL_RGBA_MODE\0"
+   "GL_RGBA_S3TC\0"
+   "GL_RGB_S3TC\0"
+   "GL_RGB_SCALE\0"
+   "GL_RGB_SCALE_ARB\0"
+   "GL_RGB_SCALE_EXT\0"
+   "GL_RIGHT\0"
+   "GL_S\0"
+   "GL_SAMPLER_1D\0"
+   "GL_SAMPLER_1D_SHADOW\0"
+   "GL_SAMPLER_2D\0"
+   "GL_SAMPLER_2D_SHADOW\0"
+   "GL_SAMPLER_3D\0"
+   "GL_SAMPLER_CUBE\0"
+   "GL_SAMPLES\0"
+   "GL_SAMPLES_3DFX\0"
+   "GL_SAMPLES_ARB\0"
+   "GL_SAMPLES_PASSED\0"
+   "GL_SAMPLES_PASSED_ARB\0"
+   "GL_SAMPLE_ALPHA_TO_COVERAGE\0"
+   "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB\0"
+   "GL_SAMPLE_ALPHA_TO_ONE\0"
+   "GL_SAMPLE_ALPHA_TO_ONE_ARB\0"
+   "GL_SAMPLE_BUFFERS\0"
+   "GL_SAMPLE_BUFFERS_3DFX\0"
+   "GL_SAMPLE_BUFFERS_ARB\0"
+   "GL_SAMPLE_COVERAGE\0"
+   "GL_SAMPLE_COVERAGE_ARB\0"
+   "GL_SAMPLE_COVERAGE_INVERT\0"
+   "GL_SAMPLE_COVERAGE_INVERT_ARB\0"
+   "GL_SAMPLE_COVERAGE_VALUE\0"
+   "GL_SAMPLE_COVERAGE_VALUE_ARB\0"
+   "GL_SCISSOR_BIT\0"
+   "GL_SCISSOR_BOX\0"
+   "GL_SCISSOR_TEST\0"
+   "GL_SECONDARY_COLOR_ARRAY\0"
+   "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING\0"
+   "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
+   "GL_SECONDARY_COLOR_ARRAY_POINTER\0"
+   "GL_SECONDARY_COLOR_ARRAY_SIZE\0"
+   "GL_SECONDARY_COLOR_ARRAY_STRIDE\0"
+   "GL_SECONDARY_COLOR_ARRAY_TYPE\0"
+   "GL_SELECT\0"
+   "GL_SELECTION_BUFFER_POINTER\0"
+   "GL_SELECTION_BUFFER_SIZE\0"
+   "GL_SEPARABLE_2D\0"
+   "GL_SEPARATE_SPECULAR_COLOR\0"
+   "GL_SEPARATE_SPECULAR_COLOR_EXT\0"
+   "GL_SET\0"
+   "GL_SHADER_OBJECT_ARB\0"
+   "GL_SHADER_SOURCE_LENGTH\0"
+   "GL_SHADER_TYPE\0"
+   "GL_SHADE_MODEL\0"
+   "GL_SHADING_LANGUAGE_VERSION\0"
+   "GL_SHADOW_AMBIENT_SGIX\0"
+   "GL_SHARED_TEXTURE_PALETTE_EXT\0"
+   "GL_SHININESS\0"
+   "GL_SHORT\0"
+   "GL_SINGLE_COLOR\0"
+   "GL_SINGLE_COLOR_EXT\0"
+   "GL_SLICE_ACCUM_SUN\0"
+   "GL_SMOOTH\0"
+   "GL_SMOOTH_LINE_WIDTH_GRANULARITY\0"
+   "GL_SMOOTH_LINE_WIDTH_RANGE\0"
+   "GL_SMOOTH_POINT_SIZE_GRANULARITY\0"
+   "GL_SMOOTH_POINT_SIZE_RANGE\0"
+   "GL_SOURCE0_ALPHA\0"
+   "GL_SOURCE0_ALPHA_ARB\0"
+   "GL_SOURCE0_ALPHA_EXT\0"
+   "GL_SOURCE0_RGB\0"
+   "GL_SOURCE0_RGB_ARB\0"
+   "GL_SOURCE0_RGB_EXT\0"
+   "GL_SOURCE1_ALPHA\0"
+   "GL_SOURCE1_ALPHA_ARB\0"
+   "GL_SOURCE1_ALPHA_EXT\0"
+   "GL_SOURCE1_RGB\0"
+   "GL_SOURCE1_RGB_ARB\0"
+   "GL_SOURCE1_RGB_EXT\0"
+   "GL_SOURCE2_ALPHA\0"
+   "GL_SOURCE2_ALPHA_ARB\0"
+   "GL_SOURCE2_ALPHA_EXT\0"
+   "GL_SOURCE2_RGB\0"
+   "GL_SOURCE2_RGB_ARB\0"
+   "GL_SOURCE2_RGB_EXT\0"
+   "GL_SOURCE3_ALPHA_NV\0"
+   "GL_SOURCE3_RGB_NV\0"
+   "GL_SPECULAR\0"
+   "GL_SPHERE_MAP\0"
+   "GL_SPOT_CUTOFF\0"
+   "GL_SPOT_DIRECTION\0"
+   "GL_SPOT_EXPONENT\0"
+   "GL_SRC0_ALPHA\0"
+   "GL_SRC0_RGB\0"
+   "GL_SRC1_ALPHA\0"
+   "GL_SRC1_RGB\0"
+   "GL_SRC2_ALPHA\0"
+   "GL_SRC2_RGB\0"
+   "GL_SRC_ALPHA\0"
+   "GL_SRC_ALPHA_SATURATE\0"
+   "GL_SRC_COLOR\0"
+   "GL_STACK_OVERFLOW\0"
+   "GL_STACK_UNDERFLOW\0"
+   "GL_STATIC_COPY\0"
+   "GL_STATIC_COPY_ARB\0"
+   "GL_STATIC_DRAW\0"
+   "GL_STATIC_DRAW_ARB\0"
+   "GL_STATIC_READ\0"
+   "GL_STATIC_READ_ARB\0"
+   "GL_STENCIL\0"
+   "GL_STENCIL_ATTACHMENT_EXT\0"
+   "GL_STENCIL_BACK_FAIL\0"
+   "GL_STENCIL_BACK_FUNC\0"
+   "GL_STENCIL_BACK_PASS_DEPTH_FAIL\0"
+   "GL_STENCIL_BACK_PASS_DEPTH_PASS\0"
+   "GL_STENCIL_BACK_REF\0"
+   "GL_STENCIL_BACK_VALUE_MASK\0"
+   "GL_STENCIL_BACK_WRITEMASK\0"
+   "GL_STENCIL_BITS\0"
+   "GL_STENCIL_BUFFER_BIT\0"
+   "GL_STENCIL_CLEAR_VALUE\0"
+   "GL_STENCIL_FAIL\0"
+   "GL_STENCIL_FUNC\0"
+   "GL_STENCIL_INDEX\0"
+   "GL_STENCIL_INDEX16_EXT\0"
+   "GL_STENCIL_INDEX1_EXT\0"
+   "GL_STENCIL_INDEX4_EXT\0"
+   "GL_STENCIL_INDEX8_EXT\0"
+   "GL_STENCIL_INDEX_EXT\0"
+   "GL_STENCIL_PASS_DEPTH_FAIL\0"
+   "GL_STENCIL_PASS_DEPTH_PASS\0"
+   "GL_STENCIL_REF\0"
+   "GL_STENCIL_TEST\0"
+   "GL_STENCIL_TEST_TWO_SIDE_EXT\0"
+   "GL_STENCIL_VALUE_MASK\0"
+   "GL_STENCIL_WRITEMASK\0"
+   "GL_STEREO\0"
+   "GL_STREAM_COPY\0"
+   "GL_STREAM_COPY_ARB\0"
+   "GL_STREAM_DRAW\0"
+   "GL_STREAM_DRAW_ARB\0"
+   "GL_STREAM_READ\0"
+   "GL_STREAM_READ_ARB\0"
+   "GL_SUBPIXEL_BITS\0"
+   "GL_SUBTRACT\0"
+   "GL_SUBTRACT_ARB\0"
+   "GL_T\0"
+   "GL_T2F_C3F_V3F\0"
+   "GL_T2F_C4F_N3F_V3F\0"
+   "GL_T2F_C4UB_V3F\0"
+   "GL_T2F_N3F_V3F\0"
+   "GL_T2F_V3F\0"
+   "GL_T4F_C4F_N3F_V4F\0"
+   "GL_T4F_V4F\0"
+   "GL_TABLE_TOO_LARGE_EXT\0"
+   "GL_TEXTURE\0"
+   "GL_TEXTURE0\0"
+   "GL_TEXTURE0_ARB\0"
+   "GL_TEXTURE1\0"
+   "GL_TEXTURE10\0"
+   "GL_TEXTURE10_ARB\0"
+   "GL_TEXTURE11\0"
+   "GL_TEXTURE11_ARB\0"
+   "GL_TEXTURE12\0"
+   "GL_TEXTURE12_ARB\0"
+   "GL_TEXTURE13\0"
+   "GL_TEXTURE13_ARB\0"
+   "GL_TEXTURE14\0"
+   "GL_TEXTURE14_ARB\0"
+   "GL_TEXTURE15\0"
+   "GL_TEXTURE15_ARB\0"
+   "GL_TEXTURE16\0"
+   "GL_TEXTURE16_ARB\0"
+   "GL_TEXTURE17\0"
+   "GL_TEXTURE17_ARB\0"
+   "GL_TEXTURE18\0"
+   "GL_TEXTURE18_ARB\0"
+   "GL_TEXTURE19\0"
+   "GL_TEXTURE19_ARB\0"
+   "GL_TEXTURE1_ARB\0"
+   "GL_TEXTURE2\0"
+   "GL_TEXTURE20\0"
+   "GL_TEXTURE20_ARB\0"
+   "GL_TEXTURE21\0"
+   "GL_TEXTURE21_ARB\0"
+   "GL_TEXTURE22\0"
+   "GL_TEXTURE22_ARB\0"
+   "GL_TEXTURE23\0"
+   "GL_TEXTURE23_ARB\0"
+   "GL_TEXTURE24\0"
+   "GL_TEXTURE24_ARB\0"
+   "GL_TEXTURE25\0"
+   "GL_TEXTURE25_ARB\0"
+   "GL_TEXTURE26\0"
+   "GL_TEXTURE26_ARB\0"
+   "GL_TEXTURE27\0"
+   "GL_TEXTURE27_ARB\0"
+   "GL_TEXTURE28\0"
+   "GL_TEXTURE28_ARB\0"
+   "GL_TEXTURE29\0"
+   "GL_TEXTURE29_ARB\0"
+   "GL_TEXTURE2_ARB\0"
+   "GL_TEXTURE3\0"
+   "GL_TEXTURE30\0"
+   "GL_TEXTURE30_ARB\0"
+   "GL_TEXTURE31\0"
+   "GL_TEXTURE31_ARB\0"
+   "GL_TEXTURE3_ARB\0"
+   "GL_TEXTURE4\0"
+   "GL_TEXTURE4_ARB\0"
+   "GL_TEXTURE5\0"
+   "GL_TEXTURE5_ARB\0"
+   "GL_TEXTURE6\0"
+   "GL_TEXTURE6_ARB\0"
+   "GL_TEXTURE7\0"
+   "GL_TEXTURE7_ARB\0"
+   "GL_TEXTURE8\0"
+   "GL_TEXTURE8_ARB\0"
+   "GL_TEXTURE9\0"
+   "GL_TEXTURE9_ARB\0"
+   "GL_TEXTURE_1D\0"
+   "GL_TEXTURE_1D_ARRAY_EXT\0"
+   "GL_TEXTURE_2D\0"
+   "GL_TEXTURE_2D_ARRAY_EXT\0"
+   "GL_TEXTURE_3D\0"
+   "GL_TEXTURE_ALPHA_SIZE\0"
+   "GL_TEXTURE_ALPHA_SIZE_EXT\0"
+   "GL_TEXTURE_BASE_LEVEL\0"
+   "GL_TEXTURE_BINDING_1D\0"
+   "GL_TEXTURE_BINDING_1D_ARRAY_EXT\0"
+   "GL_TEXTURE_BINDING_2D\0"
+   "GL_TEXTURE_BINDING_2D_ARRAY_EXT\0"
+   "GL_TEXTURE_BINDING_3D\0"
+   "GL_TEXTURE_BINDING_CUBE_MAP\0"
+   "GL_TEXTURE_BINDING_CUBE_MAP_ARB\0"
+   "GL_TEXTURE_BINDING_RECTANGLE_ARB\0"
+   "GL_TEXTURE_BINDING_RECTANGLE_NV\0"
+   "GL_TEXTURE_BIT\0"
+   "GL_TEXTURE_BLUE_SIZE\0"
+   "GL_TEXTURE_BLUE_SIZE_EXT\0"
+   "GL_TEXTURE_BORDER\0"
+   "GL_TEXTURE_BORDER_COLOR\0"
+   "GL_TEXTURE_CLIPMAP_CENTER_SGIX\0"
+   "GL_TEXTURE_CLIPMAP_DEPTH_SGIX\0"
+   "GL_TEXTURE_CLIPMAP_FRAME_SGIX\0"
+   "GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX\0"
+   "GL_TEXTURE_CLIPMAP_OFFSET_SGIX\0"
+   "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
+   "GL_TEXTURE_COLOR_TABLE_SGI\0"
+   "GL_TEXTURE_COLOR_WRITEMASK_SGIS\0"
+   "GL_TEXTURE_COMPARE_FAIL_VALUE_ARB\0"
+   "GL_TEXTURE_COMPARE_FUNC\0"
+   "GL_TEXTURE_COMPARE_FUNC_ARB\0"
+   "GL_TEXTURE_COMPARE_MODE\0"
+   "GL_TEXTURE_COMPARE_MODE_ARB\0"
+   "GL_TEXTURE_COMPARE_OPERATOR_SGIX\0"
+   "GL_TEXTURE_COMPARE_SGIX\0"
+   "GL_TEXTURE_COMPONENTS\0"
+   "GL_TEXTURE_COMPRESSED\0"
+   "GL_TEXTURE_COMPRESSED_ARB\0"
+   "GL_TEXTURE_COMPRESSED_FORMATS_ARB\0"
+   "GL_TEXTURE_COMPRESSED_IMAGE_SIZE\0"
+   "GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB\0"
+   "GL_TEXTURE_COMPRESSION_HINT\0"
+   "GL_TEXTURE_COMPRESSION_HINT_ARB\0"
+   "GL_TEXTURE_COORD_ARRAY\0"
+   "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING\0"
+   "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB\0"
+   "GL_TEXTURE_COORD_ARRAY_POINTER\0"
+   "GL_TEXTURE_COORD_ARRAY_SIZE\0"
+   "GL_TEXTURE_COORD_ARRAY_STRIDE\0"
+   "GL_TEXTURE_COORD_ARRAY_TYPE\0"
+   "GL_TEXTURE_CUBE_MAP\0"
+   "GL_TEXTURE_CUBE_MAP_ARB\0"
+   "GL_TEXTURE_CUBE_MAP_NEGATIVE_X\0"
+   "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB\0"
+   "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y\0"
+   "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB\0"
+   "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z\0"
+   "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB\0"
+   "GL_TEXTURE_CUBE_MAP_POSITIVE_X\0"
+   "GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB\0"
+   "GL_TEXTURE_CUBE_MAP_POSITIVE_Y\0"
+   "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB\0"
+   "GL_TEXTURE_CUBE_MAP_POSITIVE_Z\0"
+   "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB\0"
+   "GL_TEXTURE_DEPTH\0"
+   "GL_TEXTURE_DEPTH_SIZE\0"
+   "GL_TEXTURE_DEPTH_SIZE_ARB\0"
+   "GL_TEXTURE_ENV\0"
+   "GL_TEXTURE_ENV_COLOR\0"
+   "GL_TEXTURE_ENV_MODE\0"
+   "GL_TEXTURE_FILTER_CONTROL\0"
+   "GL_TEXTURE_GEN_MODE\0"
+   "GL_TEXTURE_GEN_Q\0"
+   "GL_TEXTURE_GEN_R\0"
+   "GL_TEXTURE_GEN_S\0"
+   "GL_TEXTURE_GEN_T\0"
+   "GL_TEXTURE_GEQUAL_R_SGIX\0"
+   "GL_TEXTURE_GREEN_SIZE\0"
+   "GL_TEXTURE_GREEN_SIZE_EXT\0"
+   "GL_TEXTURE_HEIGHT\0"
+   "GL_TEXTURE_INDEX_SIZE_EXT\0"
+   "GL_TEXTURE_INTENSITY_SIZE\0"
+   "GL_TEXTURE_INTENSITY_SIZE_EXT\0"
+   "GL_TEXTURE_INTERNAL_FORMAT\0"
+   "GL_TEXTURE_LEQUAL_R_SGIX\0"
+   "GL_TEXTURE_LOD_BIAS\0"
+   "GL_TEXTURE_LOD_BIAS_EXT\0"
+   "GL_TEXTURE_LOD_BIAS_R_SGIX\0"
+   "GL_TEXTURE_LOD_BIAS_S_SGIX\0"
+   "GL_TEXTURE_LOD_BIAS_T_SGIX\0"
+   "GL_TEXTURE_LUMINANCE_SIZE\0"
+   "GL_TEXTURE_LUMINANCE_SIZE_EXT\0"
+   "GL_TEXTURE_MAG_FILTER\0"
+   "GL_TEXTURE_MATRIX\0"
+   "GL_TEXTURE_MAX_ANISOTROPY_EXT\0"
+   "GL_TEXTURE_MAX_CLAMP_R_SGIX\0"
+   "GL_TEXTURE_MAX_CLAMP_S_SGIX\0"
+   "GL_TEXTURE_MAX_CLAMP_T_SGIX\0"
+   "GL_TEXTURE_MAX_LEVEL\0"
+   "GL_TEXTURE_MAX_LOD\0"
+   "GL_TEXTURE_MIN_FILTER\0"
+   "GL_TEXTURE_MIN_LOD\0"
+   "GL_TEXTURE_PRIORITY\0"
+   "GL_TEXTURE_RECTANGLE_ARB\0"
+   "GL_TEXTURE_RECTANGLE_NV\0"
+   "GL_TEXTURE_RED_SIZE\0"
+   "GL_TEXTURE_RED_SIZE_EXT\0"
+   "GL_TEXTURE_RESIDENT\0"
+   "GL_TEXTURE_STACK_DEPTH\0"
+   "GL_TEXTURE_TOO_LARGE_EXT\0"
+   "GL_TEXTURE_UNSIGNED_REMAP_MODE_NV\0"
+   "GL_TEXTURE_WIDTH\0"
+   "GL_TEXTURE_WRAP_R\0"
+   "GL_TEXTURE_WRAP_S\0"
+   "GL_TEXTURE_WRAP_T\0"
+   "GL_TIME_ELAPSED_EXT\0"
+   "GL_TRACK_MATRIX_NV\0"
+   "GL_TRACK_MATRIX_TRANSFORM_NV\0"
+   "GL_TRANSFORM_BIT\0"
+   "GL_TRANSPOSE_COLOR_MATRIX\0"
+   "GL_TRANSPOSE_COLOR_MATRIX_ARB\0"
+   "GL_TRANSPOSE_CURRENT_MATRIX_ARB\0"
+   "GL_TRANSPOSE_MODELVIEW_MATRIX\0"
+   "GL_TRANSPOSE_MODELVIEW_MATRIX_ARB\0"
+   "GL_TRANSPOSE_NV\0"
+   "GL_TRANSPOSE_PROJECTION_MATRIX\0"
+   "GL_TRANSPOSE_PROJECTION_MATRIX_ARB\0"
+   "GL_TRANSPOSE_TEXTURE_MATRIX\0"
+   "GL_TRANSPOSE_TEXTURE_MATRIX_ARB\0"
+   "GL_TRIANGLES\0"
+   "GL_TRIANGLE_FAN\0"
+   "GL_TRIANGLE_MESH_SUN\0"
+   "GL_TRIANGLE_STRIP\0"
+   "GL_TRUE\0"
+   "GL_UNPACK_ALIGNMENT\0"
+   "GL_UNPACK_IMAGE_HEIGHT\0"
+   "GL_UNPACK_LSB_FIRST\0"
+   "GL_UNPACK_ROW_LENGTH\0"
+   "GL_UNPACK_SKIP_IMAGES\0"
+   "GL_UNPACK_SKIP_PIXELS\0"
+   "GL_UNPACK_SKIP_ROWS\0"
+   "GL_UNPACK_SWAP_BYTES\0"
+   "GL_UNSIGNED_BYTE\0"
+   "GL_UNSIGNED_BYTE_2_3_3_REV\0"
+   "GL_UNSIGNED_BYTE_3_3_2\0"
+   "GL_UNSIGNED_INT\0"
+   "GL_UNSIGNED_INT_10_10_10_2\0"
+   "GL_UNSIGNED_INT_24_8_NV\0"
+   "GL_UNSIGNED_INT_2_10_10_10_REV\0"
+   "GL_UNSIGNED_INT_8_8_8_8\0"
+   "GL_UNSIGNED_INT_8_8_8_8_REV\0"
+   "GL_UNSIGNED_SHORT\0"
+   "GL_UNSIGNED_SHORT_1_5_5_5_REV\0"
+   "GL_UNSIGNED_SHORT_4_4_4_4\0"
+   "GL_UNSIGNED_SHORT_4_4_4_4_REV\0"
+   "GL_UNSIGNED_SHORT_5_5_5_1\0"
+   "GL_UNSIGNED_SHORT_5_6_5\0"
+   "GL_UNSIGNED_SHORT_5_6_5_REV\0"
+   "GL_UNSIGNED_SHORT_8_8_APPLE\0"
+   "GL_UNSIGNED_SHORT_8_8_MESA\0"
+   "GL_UNSIGNED_SHORT_8_8_REV_APPLE\0"
+   "GL_UNSIGNED_SHORT_8_8_REV_MESA\0"
+   "GL_UPPER_LEFT\0"
+   "GL_V2F\0"
+   "GL_V3F\0"
+   "GL_VALIDATE_STATUS\0"
+   "GL_VENDOR\0"
+   "GL_VERSION\0"
+   "GL_VERTEX_ARRAY\0"
+   "GL_VERTEX_ARRAY_BINDING_APPLE\0"
+   "GL_VERTEX_ARRAY_BUFFER_BINDING\0"
+   "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB\0"
+   "GL_VERTEX_ARRAY_POINTER\0"
+   "GL_VERTEX_ARRAY_SIZE\0"
+   "GL_VERTEX_ARRAY_STRIDE\0"
+   "GL_VERTEX_ARRAY_TYPE\0"
+   "GL_VERTEX_ATTRIB_ARRAY0_NV\0"
+   "GL_VERTEX_ATTRIB_ARRAY10_NV\0"
+   "GL_VERTEX_ATTRIB_ARRAY11_NV\0"
+   "GL_VERTEX_ATTRIB_ARRAY12_NV\0"
+   "GL_VERTEX_ATTRIB_ARRAY13_NV\0"
+   "GL_VERTEX_ATTRIB_ARRAY14_NV\0"
+   "GL_VERTEX_ATTRIB_ARRAY15_NV\0"
+   "GL_VERTEX_ATTRIB_ARRAY1_NV\0"
+   "GL_VERTEX_ATTRIB_ARRAY2_NV\0"
+   "GL_VERTEX_ATTRIB_ARRAY3_NV\0"
+   "GL_VERTEX_ATTRIB_ARRAY4_NV\0"
+   "GL_VERTEX_ATTRIB_ARRAY5_NV\0"
+   "GL_VERTEX_ATTRIB_ARRAY6_NV\0"
+   "GL_VERTEX_ATTRIB_ARRAY7_NV\0"
+   "GL_VERTEX_ATTRIB_ARRAY8_NV\0"
+   "GL_VERTEX_ATTRIB_ARRAY9_NV\0"
+   "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\0"
+   "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0"
+   "GL_VERTEX_ATTRIB_ARRAY_ENABLED\0"
+   "GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0"
+   "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED\0"
+   "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB\0"
+   "GL_VERTEX_ATTRIB_ARRAY_POINTER\0"
+   "GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB\0"
+   "GL_VERTEX_ATTRIB_ARRAY_SIZE\0"
+   "GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB\0"
+   "GL_VERTEX_ATTRIB_ARRAY_STRIDE\0"
+   "GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB\0"
+   "GL_VERTEX_ATTRIB_ARRAY_TYPE\0"
+   "GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB\0"
+   "GL_VERTEX_BLEND_ARB\0"
+   "GL_VERTEX_PROGRAM_ARB\0"
+   "GL_VERTEX_PROGRAM_BINDING_NV\0"
+   "GL_VERTEX_PROGRAM_NV\0"
+   "GL_VERTEX_PROGRAM_POINT_SIZE\0"
+   "GL_VERTEX_PROGRAM_POINT_SIZE_ARB\0"
+   "GL_VERTEX_PROGRAM_POINT_SIZE_NV\0"
+   "GL_VERTEX_PROGRAM_TWO_SIDE\0"
+   "GL_VERTEX_PROGRAM_TWO_SIDE_ARB\0"
+   "GL_VERTEX_PROGRAM_TWO_SIDE_NV\0"
+   "GL_VERTEX_SHADER\0"
+   "GL_VERTEX_SHADER_ARB\0"
+   "GL_VERTEX_STATE_PROGRAM_NV\0"
+   "GL_VIEWPORT\0"
+   "GL_VIEWPORT_BIT\0"
+   "GL_WEIGHT_ARRAY_ARB\0"
+   "GL_WEIGHT_ARRAY_BUFFER_BINDING\0"
+   "GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB\0"
+   "GL_WEIGHT_ARRAY_POINTER_ARB\0"
+   "GL_WEIGHT_ARRAY_SIZE_ARB\0"
+   "GL_WEIGHT_ARRAY_STRIDE_ARB\0"
+   "GL_WEIGHT_ARRAY_TYPE_ARB\0"
+   "GL_WEIGHT_SUM_UNITY_ARB\0"
+   "GL_WRAP_BORDER_SUN\0"
+   "GL_WRITE_ONLY\0"
+   "GL_WRITE_ONLY_ARB\0"
+   "GL_XOR\0"
+   "GL_YCBCR_422_APPLE\0"
+   "GL_YCBCR_MESA\0"
+   "GL_ZERO\0"
+   "GL_ZOOM_X\0"
+   "GL_ZOOM_Y\0"
+   ;
+
+static const enum_elt all_enums[1746] =
+{
+   {     0, 0x00000600 }, /* GL_2D */
+   {     6, 0x00001407 }, /* GL_2_BYTES */
+   {    17, 0x00000601 }, /* GL_3D */
+   {    23, 0x00000602 }, /* GL_3D_COLOR */
+   {    35, 0x00000603 }, /* GL_3D_COLOR_TEXTURE */
+   {    55, 0x00001408 }, /* GL_3_BYTES */
+   {    66, 0x00000604 }, /* GL_4D_COLOR_TEXTURE */
+   {    86, 0x00001409 }, /* GL_4_BYTES */
+   {    97, 0x00000100 }, /* GL_ACCUM */
+   {   106, 0x00000D5B }, /* GL_ACCUM_ALPHA_BITS */
+   {   126, 0x00000D5A }, /* GL_ACCUM_BLUE_BITS */
+   {   145, 0x00000200 }, /* GL_ACCUM_BUFFER_BIT */
+   {   165, 0x00000B80 }, /* GL_ACCUM_CLEAR_VALUE */
+   {   186, 0x00000D59 }, /* GL_ACCUM_GREEN_BITS */
+   {   206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */
+   {   224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */
+   {   245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
+   {   276, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
+   {   303, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
+   {   321, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
+   {   343, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
+   {   362, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
+   {   391, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
+   {   418, 0x00000104 }, /* GL_ADD */
+   {   425, 0x00008574 }, /* GL_ADD_SIGNED */
+   {   439, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
+   {   457, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
+   {   475, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
+   {   503, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
+   {   531, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
+   {   550, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
+   {   576, 0x00001906 }, /* GL_ALPHA */
+   {   585, 0x0000803D }, /* GL_ALPHA12 */
+   {   596, 0x0000803D }, /* GL_ALPHA12_EXT */
+   {   611, 0x0000803E }, /* GL_ALPHA16 */
+   {   622, 0x0000803E }, /* GL_ALPHA16_EXT */
+   {   637, 0x0000803B }, /* GL_ALPHA4 */
+   {   647, 0x0000803B }, /* GL_ALPHA4_EXT */
+   {   661, 0x0000803C }, /* GL_ALPHA8 */
+   {   671, 0x0000803C }, /* GL_ALPHA8_EXT */
+   {   685, 0x00000D1D }, /* GL_ALPHA_BIAS */
+   {   699, 0x00000D55 }, /* GL_ALPHA_BITS */
+   {   713, 0x00000D1C }, /* GL_ALPHA_SCALE */
+   {   728, 0x00000BC0 }, /* GL_ALPHA_TEST */
+   {   742, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
+   {   761, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
+   {   779, 0x00000207 }, /* GL_ALWAYS */
+   {   789, 0x00001200 }, /* GL_AMBIENT */
+   {   800, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
+   {   823, 0x00001501 }, /* GL_AND */
+   {   830, 0x00001504 }, /* GL_AND_INVERTED */
+   {   846, 0x00001502 }, /* GL_AND_REVERSE */
+   {   861, 0x00008892 }, /* GL_ARRAY_BUFFER */
+   {   877, 0x00008892 }, /* GL_ARRAY_BUFFER_ARB */
+   {   897, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
+   {   921, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
+   {   949, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
+   {   969, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
+   {   996, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
+   {  1020, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
+   {  1046, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
+   {  1070, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
+   {  1092, 0x00000D80 }, /* GL_AUTO_NORMAL */
+   {  1107, 0x00000409 }, /* GL_AUX0 */
+   {  1115, 0x0000040A }, /* GL_AUX1 */
+   {  1123, 0x0000040B }, /* GL_AUX2 */
+   {  1131, 0x0000040C }, /* GL_AUX3 */
+   {  1139, 0x00000C00 }, /* GL_AUX_BUFFERS */
+   {  1154, 0x00000405 }, /* GL_BACK */
+   {  1162, 0x00000402 }, /* GL_BACK_LEFT */
+   {  1175, 0x00000403 }, /* GL_BACK_RIGHT */
+   {  1189, 0x000080E0 }, /* GL_BGR */
+   {  1196, 0x000080E1 }, /* GL_BGRA */
+   {  1204, 0x00001A00 }, /* GL_BITMAP */
+   {  1214, 0x00000704 }, /* GL_BITMAP_TOKEN */
+   {  1230, 0x00000BE2 }, /* GL_BLEND */
+   {  1239, 0x00008005 }, /* GL_BLEND_COLOR */
+   {  1254, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
+   {  1273, 0x00000BE0 }, /* GL_BLEND_DST */
+   {  1286, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
+   {  1305, 0x000080C8 }, /* GL_BLEND_DST_RGB */
+   {  1322, 0x00008009 }, /* GL_BLEND_EQUATION */
+   {  1340, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
+   {  1364, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
+   {  1392, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
+   {  1414, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
+   {  1440, 0x00000BE1 }, /* GL_BLEND_SRC */
+   {  1453, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
+   {  1472, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
+   {  1489, 0x00001905 }, /* GL_BLUE */
+   {  1497, 0x00000D1B }, /* GL_BLUE_BIAS */
+   {  1510, 0x00000D54 }, /* GL_BLUE_BITS */
+   {  1523, 0x00000D1A }, /* GL_BLUE_SCALE */
+   {  1537, 0x00008B56 }, /* GL_BOOL */
+   {  1545, 0x00008B56 }, /* GL_BOOL_ARB */
+   {  1557, 0x00008B57 }, /* GL_BOOL_VEC2 */
+   {  1570, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
+   {  1587, 0x00008B58 }, /* GL_BOOL_VEC3 */
+   {  1600, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
+   {  1617, 0x00008B59 }, /* GL_BOOL_VEC4 */
+   {  1630, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
+   {  1647, 0x000088BB }, /* GL_BUFFER_ACCESS */
+   {  1664, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
+   {  1685, 0x000088BC }, /* GL_BUFFER_MAPPED */
+   {  1702, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
+   {  1723, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
+   {  1745, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
+   {  1771, 0x00008764 }, /* GL_BUFFER_SIZE */
+   {  1786, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
+   {  1805, 0x00008765 }, /* GL_BUFFER_USAGE */
+   {  1821, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
+   {  1841, 0x00001400 }, /* GL_BYTE */
+   {  1849, 0x00002A24 }, /* GL_C3F_V3F */
+   {  1860, 0x00002A26 }, /* GL_C4F_N3F_V3F */
+   {  1875, 0x00002A22 }, /* GL_C4UB_V2F */
+   {  1887, 0x00002A23 }, /* GL_C4UB_V3F */
+   {  1899, 0x00000901 }, /* GL_CCW */
+   {  1906, 0x00002900 }, /* GL_CLAMP */
+   {  1915, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
+   {  1934, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
+   {  1957, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
+   {  1981, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
+   {  1998, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
+   {  2020, 0x00001500 }, /* GL_CLEAR */
+   {  2029, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
+   {  2054, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
+   {  2083, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
+   {  2109, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
+   {  2138, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
+   {  2164, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
+   {  2191, 0x00003000 }, /* GL_CLIP_PLANE0 */
+   {  2206, 0x00003001 }, /* GL_CLIP_PLANE1 */
+   {  2221, 0x00003002 }, /* GL_CLIP_PLANE2 */
+   {  2236, 0x00003003 }, /* GL_CLIP_PLANE3 */
+   {  2251, 0x00003004 }, /* GL_CLIP_PLANE4 */
+   {  2266, 0x00003005 }, /* GL_CLIP_PLANE5 */
+   {  2281, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
+   {  2314, 0x00000A00 }, /* GL_COEFF */
+   {  2323, 0x00001800 }, /* GL_COLOR */
+   {  2332, 0x00008076 }, /* GL_COLOR_ARRAY */
+   {  2347, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
+   {  2377, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
+   {  2411, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
+   {  2434, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
+   {  2454, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
+   {  2476, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
+   {  2496, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
+   {  2521, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
+   {  2547, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
+   {  2573, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
+   {  2599, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
+   {  2625, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
+   {  2651, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
+   {  2677, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
+   {  2702, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
+   {  2727, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
+   {  2752, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
+   {  2777, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
+   {  2802, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
+   {  2827, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
+   {  2852, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
+   {  2877, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
+   {  2902, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
+   {  2922, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
+   {  2943, 0x00001900 }, /* GL_COLOR_INDEX */
+   {  2958, 0x00001603 }, /* GL_COLOR_INDEXES */
+   {  2975, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
+   {  2993, 0x00000B57 }, /* GL_COLOR_MATERIAL */
+   {  3011, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
+   {  3034, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
+   {  3062, 0x000080B1 }, /* GL_COLOR_MATRIX */
+   {  3078, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
+   {  3098, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
+   {  3126, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
+   {  3158, 0x00008458 }, /* GL_COLOR_SUM */
+   {  3171, 0x00008458 }, /* GL_COLOR_SUM_ARB */
+   {  3188, 0x000080D0 }, /* GL_COLOR_TABLE */
+   {  3203, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
+   {  3229, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
+   {  3259, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
+   {  3289, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
+   {  3309, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
+   {  3333, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
+   {  3358, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
+   {  3387, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
+   {  3416, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
+   {  3438, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
+   {  3464, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
+   {  3490, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
+   {  3516, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
+   {  3546, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
+   {  3576, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
+   {  3606, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
+   {  3640, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
+   {  3674, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
+   {  3704, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
+   {  3738, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
+   {  3772, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
+   {  3796, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
+   {  3824, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
+   {  3852, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
+   {  3873, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
+   {  3898, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
+   {  3919, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
+   {  3944, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
+   {  3969, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
+   {  3988, 0x00008570 }, /* GL_COMBINE */
+   {  3999, 0x00008503 }, /* GL_COMBINE4 */
+   {  4011, 0x00008572 }, /* GL_COMBINE_ALPHA */
+   {  4028, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
+   {  4049, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
+   {  4070, 0x00008570 }, /* GL_COMBINE_ARB */
+   {  4085, 0x00008570 }, /* GL_COMBINE_EXT */
+   {  4100, 0x00008571 }, /* GL_COMBINE_RGB */
+   {  4115, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
+   {  4134, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
+   {  4153, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
+   {  4189, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
+   {  4213, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
+   {  4241, 0x00001300 }, /* GL_COMPILE */
+   {  4252, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
+   {  4275, 0x00008B81 }, /* GL_COMPILE_STATUS */
+   {  4293, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
+   {  4313, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
+   {  4337, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
+   {  4361, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
+   {  4389, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
+   {  4413, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
+   {  4443, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
+   {  4477, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
+   {  4505, 0x000084ED }, /* GL_COMPRESSED_RGB */
+   {  4523, 0x000084EE }, /* GL_COMPRESSED_RGBA */
+   {  4542, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
+   {  4565, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
+   {  4594, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
+   {  4627, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
+   {  4660, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
+   {  4693, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
+   {  4715, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
+   {  4743, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
+   {  4775, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
+   {  4805, 0x00008576 }, /* GL_CONSTANT */
+   {  4817, 0x00008003 }, /* GL_CONSTANT_ALPHA */
+   {  4835, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
+   {  4857, 0x00008576 }, /* GL_CONSTANT_ARB */
+   {  4873, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
+   {  4897, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
+   {  4919, 0x00008001 }, /* GL_CONSTANT_COLOR */
+   {  4937, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
+   {  4959, 0x00008576 }, /* GL_CONSTANT_EXT */
+   {  4975, 0x00008010 }, /* GL_CONVOLUTION_1D */
+   {  4993, 0x00008011 }, /* GL_CONVOLUTION_2D */
+   {  5011, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
+   {  5039, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
+   {  5070, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
+   {  5097, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
+   {  5128, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
+   {  5155, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
+   {  5186, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
+   {  5214, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
+   {  5246, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
+   {  5268, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
+   {  5294, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
+   {  5316, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
+   {  5342, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
+   {  5363, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
+   {  5388, 0x00008862 }, /* GL_COORD_REPLACE */
+   {  5405, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
+   {  5426, 0x00008862 }, /* GL_COORD_REPLACE_NV */
+   {  5446, 0x00001503 }, /* GL_COPY */
+   {  5454, 0x0000150C }, /* GL_COPY_INVERTED */
+   {  5471, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
+   {  5491, 0x00000B44 }, /* GL_CULL_FACE */
+   {  5504, 0x00000B45 }, /* GL_CULL_FACE_MODE */
+   {  5522, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
+   {  5541, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
+   {  5573, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
+   {  5608, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
+   {  5629, 0x00000001 }, /* GL_CURRENT_BIT */
+   {  5644, 0x00000B00 }, /* GL_CURRENT_COLOR */
+   {  5661, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
+   {  5682, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
+   {  5708, 0x00000B01 }, /* GL_CURRENT_INDEX */
+   {  5725, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
+   {  5747, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
+   {  5775, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
+   {  5796, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
+   {  5830, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
+   {  5863, 0x00000B02 }, /* GL_CURRENT_NORMAL */
+   {  5881, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
+   {  5911, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
+   {  5930, 0x00008865 }, /* GL_CURRENT_QUERY */
+   {  5947, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
+   {  5968, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
+   {  5992, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
+   {  6019, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
+   {  6043, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
+   {  6070, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
+   {  6103, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
+   {  6136, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
+   {  6163, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
+   {  6189, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
+   {  6214, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
+   {  6243, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
+   {  6265, 0x00000900 }, /* GL_CW */
+   {  6271, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
+   {  6292, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
+   {  6313, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
+   {  6333, 0x00002101 }, /* GL_DECAL */
+   {  6342, 0x00001E03 }, /* GL_DECR */
+   {  6350, 0x00008508 }, /* GL_DECR_WRAP */
+   {  6363, 0x00008508 }, /* GL_DECR_WRAP_EXT */
+   {  6380, 0x00008B80 }, /* GL_DELETE_STATUS */
+   {  6397, 0x00001801 }, /* GL_DEPTH */
+   {  6406, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
+   {  6430, 0x00000D1F }, /* GL_DEPTH_BIAS */
+   {  6444, 0x00000D56 }, /* GL_DEPTH_BITS */
+   {  6458, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
+   {  6478, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
+   {  6503, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
+   {  6523, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
+   {  6541, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
+   {  6562, 0x00001902 }, /* GL_DEPTH_COMPONENT */
+   {  6581, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
+   {  6602, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
+   {  6627, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
+   {  6653, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
+   {  6674, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
+   {  6699, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
+   {  6725, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
+   {  6746, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
+   {  6771, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
+   {  6797, 0x00000B74 }, /* GL_DEPTH_FUNC */
+   {  6811, 0x00000B70 }, /* GL_DEPTH_RANGE */
+   {  6826, 0x00000D1E }, /* GL_DEPTH_SCALE */
+   {  6841, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
+   {  6861, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+   {  6889, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+   {  6917, 0x00000B71 }, /* GL_DEPTH_TEST */
+   {  6931, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
+   {  6953, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
+   {  6979, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
+   {  6998, 0x00001201 }, /* GL_DIFFUSE */
+   {  7009, 0x00000BD0 }, /* GL_DITHER */
+   {  7019, 0x00000A02 }, /* GL_DOMAIN */
+   {  7029, 0x00001100 }, /* GL_DONT_CARE */
+   {  7042, 0x000086AE }, /* GL_DOT3_RGB */
+   {  7054, 0x000086AF }, /* GL_DOT3_RGBA */
+   {  7067, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
+   {  7084, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
+   {  7101, 0x000086AE }, /* GL_DOT3_RGB_ARB */
+   {  7117, 0x00008740 }, /* GL_DOT3_RGB_EXT */
+   {  7133, 0x0000140A }, /* GL_DOUBLE */
+   {  7143, 0x00000C32 }, /* GL_DOUBLEBUFFER */
+   {  7159, 0x00000C01 }, /* GL_DRAW_BUFFER */
+   {  7174, 0x00008825 }, /* GL_DRAW_BUFFER0 */
+   {  7190, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
+   {  7210, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
+   {  7230, 0x00008826 }, /* GL_DRAW_BUFFER1 */
+   {  7246, 0x0000882F }, /* GL_DRAW_BUFFER10 */
+   {  7263, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
+   {  7284, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
+   {  7305, 0x00008830 }, /* GL_DRAW_BUFFER11 */
+   {  7322, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
+   {  7343, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
+   {  7364, 0x00008831 }, /* GL_DRAW_BUFFER12 */
+   {  7381, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
+   {  7402, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
+   {  7423, 0x00008832 }, /* GL_DRAW_BUFFER13 */
+   {  7440, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
+   {  7461, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
+   {  7482, 0x00008833 }, /* GL_DRAW_BUFFER14 */
+   {  7499, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
+   {  7520, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
+   {  7541, 0x00008834 }, /* GL_DRAW_BUFFER15 */
+   {  7558, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
+   {  7579, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
+   {  7600, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
+   {  7620, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
+   {  7640, 0x00008827 }, /* GL_DRAW_BUFFER2 */
+   {  7656, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
+   {  7676, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
+   {  7696, 0x00008828 }, /* GL_DRAW_BUFFER3 */
+   {  7712, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
+   {  7732, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
+   {  7752, 0x00008829 }, /* GL_DRAW_BUFFER4 */
+   {  7768, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
+   {  7788, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
+   {  7808, 0x0000882A }, /* GL_DRAW_BUFFER5 */
+   {  7824, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
+   {  7844, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
+   {  7864, 0x0000882B }, /* GL_DRAW_BUFFER6 */
+   {  7880, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
+   {  7900, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
+   {  7920, 0x0000882C }, /* GL_DRAW_BUFFER7 */
+   {  7936, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
+   {  7956, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
+   {  7976, 0x0000882D }, /* GL_DRAW_BUFFER8 */
+   {  7992, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
+   {  8012, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
+   {  8032, 0x0000882E }, /* GL_DRAW_BUFFER9 */
+   {  8048, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
+   {  8068, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
+   {  8088, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
+   {  8120, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
+   {  8144, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
+   {  8164, 0x00000304 }, /* GL_DST_ALPHA */
+   {  8177, 0x00000306 }, /* GL_DST_COLOR */
+   {  8190, 0x000088EA }, /* GL_DYNAMIC_COPY */
+   {  8206, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
+   {  8226, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
+   {  8242, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
+   {  8262, 0x000088E9 }, /* GL_DYNAMIC_READ */
+   {  8278, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
+   {  8298, 0x00000B43 }, /* GL_EDGE_FLAG */
+   {  8311, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
+   {  8330, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+   {  8364, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
+   {  8402, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
+   {  8429, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+   {  8455, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
+   {  8479, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER_ARB */
+   {  8507, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+   {  8539, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
+   {  8575, 0x00001600 }, /* GL_EMISSION */
+   {  8587, 0x00002000 }, /* GL_ENABLE_BIT */
+   {  8601, 0x00000202 }, /* GL_EQUAL */
+   {  8610, 0x00001509 }, /* GL_EQUIV */
+   {  8619, 0x00010000 }, /* GL_EVAL_BIT */
+   {  8631, 0x00000800 }, /* GL_EXP */
+   {  8638, 0x00000801 }, /* GL_EXP2 */
+   {  8646, 0x00001F03 }, /* GL_EXTENSIONS */
+   {  8660, 0x00002400 }, /* GL_EYE_LINEAR */
+   {  8674, 0x00002502 }, /* GL_EYE_PLANE */
+   {  8687, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
+   {  8712, 0x0000855B }, /* GL_EYE_RADIAL_NV */
+   {  8729, 0x00000000 }, /* GL_FALSE */
+   {  8738, 0x00001101 }, /* GL_FASTEST */
+   {  8749, 0x00001C01 }, /* GL_FEEDBACK */
+   {  8761, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
+   {  8788, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
+   {  8812, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
+   {  8836, 0x00001B02 }, /* GL_FILL */
+   {  8844, 0x00001D00 }, /* GL_FLAT */
+   {  8852, 0x00001406 }, /* GL_FLOAT */
+   {  8861, 0x00008B5A }, /* GL_FLOAT_MAT2 */
+   {  8875, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
+   {  8893, 0x00008B5B }, /* GL_FLOAT_MAT3 */
+   {  8907, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
+   {  8925, 0x00008B5C }, /* GL_FLOAT_MAT4 */
+   {  8939, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
+   {  8957, 0x00008B50 }, /* GL_FLOAT_VEC2 */
+   {  8971, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
+   {  8989, 0x00008B51 }, /* GL_FLOAT_VEC3 */
+   {  9003, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
+   {  9021, 0x00008B52 }, /* GL_FLOAT_VEC4 */
+   {  9035, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
+   {  9053, 0x00000B60 }, /* GL_FOG */
+   {  9060, 0x00000080 }, /* GL_FOG_BIT */
+   {  9071, 0x00000B66 }, /* GL_FOG_COLOR */
+   {  9084, 0x00008451 }, /* GL_FOG_COORD */
+   {  9097, 0x00008451 }, /* GL_FOG_COORDINATE */
+   {  9115, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
+   {  9139, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+   {  9178, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
+   {  9221, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+   {  9253, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+   {  9284, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+   {  9313, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
+   {  9338, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
+   {  9357, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
+   {  9391, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
+   {  9418, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
+   {  9444, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
+   {  9468, 0x00008450 }, /* GL_FOG_COORD_SRC */
+   {  9485, 0x00000B62 }, /* GL_FOG_DENSITY */
+   {  9500, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
+   {  9524, 0x00000B64 }, /* GL_FOG_END */
+   {  9535, 0x00000C54 }, /* GL_FOG_HINT */
+   {  9547, 0x00000B61 }, /* GL_FOG_INDEX */
+   {  9560, 0x00000B65 }, /* GL_FOG_MODE */
+   {  9572, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
+   {  9591, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
+   {  9616, 0x00000B63 }, /* GL_FOG_START */
+   {  9629, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
+   {  9647, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
+   {  9671, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
+   {  9690, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
+   {  9713, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+   {  9748, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
+   {  9790, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
+   {  9832, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
+   {  9881, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
+   {  9933, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
+   {  9977, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
+   { 10021, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
+   { 10048, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
+   { 10076, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
+   { 10095, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
+   { 10136, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+   { 10177, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
+   { 10219, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+   { 10270, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+   { 10308, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
+   { 10357, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
+   { 10399, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+   { 10431, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
+   { 10462, 0x00000404 }, /* GL_FRONT */
+   { 10471, 0x00000408 }, /* GL_FRONT_AND_BACK */
+   { 10489, 0x00000B46 }, /* GL_FRONT_FACE */
+   { 10503, 0x00000400 }, /* GL_FRONT_LEFT */
+   { 10517, 0x00000401 }, /* GL_FRONT_RIGHT */
+   { 10532, 0x00008006 }, /* GL_FUNC_ADD */
+   { 10544, 0x00008006 }, /* GL_FUNC_ADD_EXT */
+   { 10560, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
+   { 10585, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
+   { 10614, 0x0000800A }, /* GL_FUNC_SUBTRACT */
+   { 10631, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
+   { 10652, 0x00008191 }, /* GL_GENERATE_MIPMAP */
+   { 10671, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
+   { 10695, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
+   { 10724, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
+   { 10748, 0x00000206 }, /* GL_GEQUAL */
+   { 10758, 0x00008009 }, /* GL_GL_BLEND_EQUATION_RGB */
+   { 10783, 0x00008C4A }, /* GL_GL_COMPRESSED_SLUMINANCE */
+   { 10811, 0x00008C4B }, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
+   { 10845, 0x00008C48 }, /* GL_GL_COMPRESSED_SRGB */
+   { 10867, 0x00008C49 }, /* GL_GL_COMPRESSED_SRGB_ALPHA */
+   { 10895, 0x0000845F }, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
+   { 10932, 0x00008B65 }, /* GL_GL_FLOAT_MAT2x3 */
+   { 10951, 0x00008B66 }, /* GL_GL_FLOAT_MAT2x4 */
+   { 10970, 0x00008B67 }, /* GL_GL_FLOAT_MAT3x2 */
+   { 10989, 0x00008B68 }, /* GL_GL_FLOAT_MAT3x4 */
+   { 11008, 0x00008B69 }, /* GL_GL_FLOAT_MAT4x2 */
+   { 11027, 0x00008B6A }, /* GL_GL_FLOAT_MAT4x3 */
+   { 11046, 0x000088EB }, /* GL_GL_PIXEL_PACK_BUFFER */
+   { 11070, 0x000088ED }, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
+   { 11102, 0x000088EC }, /* GL_GL_PIXEL_UNPACK_BUFFER */
+   { 11128, 0x000088EF }, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
+   { 11162, 0x00008C46 }, /* GL_GL_SLUMINANCE */
+   { 11179, 0x00008C47 }, /* GL_GL_SLUMINANCE8 */
+   { 11197, 0x00008C45 }, /* GL_GL_SLUMINANCE8_ALPHA8 */
+   { 11222, 0x00008C44 }, /* GL_GL_SLUMINANCE_ALPHA */
+   { 11245, 0x00008C40 }, /* GL_GL_SRGB */
+   { 11256, 0x00008C41 }, /* GL_GL_SRGB8 */
+   { 11268, 0x00008C43 }, /* GL_GL_SRGB8_ALPHA8 */
+   { 11287, 0x00008C42 }, /* GL_GL_SRGB_ALPHA */
+   { 11304, 0x00000204 }, /* GL_GREATER */
+   { 11315, 0x00001904 }, /* GL_GREEN */
+   { 11324, 0x00000D19 }, /* GL_GREEN_BIAS */
+   { 11338, 0x00000D53 }, /* GL_GREEN_BITS */
+   { 11352, 0x00000D18 }, /* GL_GREEN_SCALE */
+   { 11367, 0x00008000 }, /* GL_HINT_BIT */
+   { 11379, 0x00008024 }, /* GL_HISTOGRAM */
+   { 11392, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
+   { 11416, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
+   { 11444, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
+   { 11467, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
+   { 11494, 0x00008024 }, /* GL_HISTOGRAM_EXT */
+   { 11511, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
+   { 11531, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
+   { 11555, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
+   { 11579, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
+   { 11607, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+   { 11635, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
+   { 11667, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
+   { 11689, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
+   { 11715, 0x0000802D }, /* GL_HISTOGRAM_SINK */
+   { 11733, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
+   { 11755, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
+   { 11774, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
+   { 11797, 0x0000862A }, /* GL_IDENTITY_NV */
+   { 11812, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
+   { 11832, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+   { 11872, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+   { 11910, 0x00001E02 }, /* GL_INCR */
+   { 11918, 0x00008507 }, /* GL_INCR_WRAP */
+   { 11931, 0x00008507 }, /* GL_INCR_WRAP_EXT */
+   { 11948, 0x00008077 }, /* GL_INDEX_ARRAY */
+   { 11963, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+   { 11993, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
+   { 12027, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
+   { 12050, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
+   { 12072, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
+   { 12092, 0x00000D51 }, /* GL_INDEX_BITS */
+   { 12106, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
+   { 12127, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
+   { 12145, 0x00000C30 }, /* GL_INDEX_MODE */
+   { 12159, 0x00000D13 }, /* GL_INDEX_OFFSET */
+   { 12175, 0x00000D12 }, /* GL_INDEX_SHIFT */
+   { 12190, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
+   { 12209, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
+   { 12228, 0x00001404 }, /* GL_INT */
+   { 12235, 0x00008049 }, /* GL_INTENSITY */
+   { 12248, 0x0000804C }, /* GL_INTENSITY12 */
+   { 12263, 0x0000804C }, /* GL_INTENSITY12_EXT */
+   { 12282, 0x0000804D }, /* GL_INTENSITY16 */
+   { 12297, 0x0000804D }, /* GL_INTENSITY16_EXT */
+   { 12316, 0x0000804A }, /* GL_INTENSITY4 */
+   { 12330, 0x0000804A }, /* GL_INTENSITY4_EXT */
+   { 12348, 0x0000804B }, /* GL_INTENSITY8 */
+   { 12362, 0x0000804B }, /* GL_INTENSITY8_EXT */
+   { 12380, 0x00008049 }, /* GL_INTENSITY_EXT */
+   { 12397, 0x00008575 }, /* GL_INTERPOLATE */
+   { 12412, 0x00008575 }, /* GL_INTERPOLATE_ARB */
+   { 12431, 0x00008575 }, /* GL_INTERPOLATE_EXT */
+   { 12450, 0x00008B53 }, /* GL_INT_VEC2 */
+   { 12462, 0x00008B53 }, /* GL_INT_VEC2_ARB */
+   { 12478, 0x00008B54 }, /* GL_INT_VEC3 */
+   { 12490, 0x00008B54 }, /* GL_INT_VEC3_ARB */
+   { 12506, 0x00008B55 }, /* GL_INT_VEC4 */
+   { 12518, 0x00008B55 }, /* GL_INT_VEC4_ARB */
+   { 12534, 0x00000500 }, /* GL_INVALID_ENUM */
+   { 12550, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
+   { 12587, 0x00000502 }, /* GL_INVALID_OPERATION */
+   { 12608, 0x00000501 }, /* GL_INVALID_VALUE */
+   { 12625, 0x0000862B }, /* GL_INVERSE_NV */
+   { 12639, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
+   { 12663, 0x0000150A }, /* GL_INVERT */
+   { 12673, 0x00001E00 }, /* GL_KEEP */
+   { 12681, 0x00000406 }, /* GL_LEFT */
+   { 12689, 0x00000203 }, /* GL_LEQUAL */
+   { 12699, 0x00000201 }, /* GL_LESS */
+   { 12707, 0x00004000 }, /* GL_LIGHT0 */
+   { 12717, 0x00004001 }, /* GL_LIGHT1 */
+   { 12727, 0x00004002 }, /* GL_LIGHT2 */
+   { 12737, 0x00004003 }, /* GL_LIGHT3 */
+   { 12747, 0x00004004 }, /* GL_LIGHT4 */
+   { 12757, 0x00004005 }, /* GL_LIGHT5 */
+   { 12767, 0x00004006 }, /* GL_LIGHT6 */
+   { 12777, 0x00004007 }, /* GL_LIGHT7 */
+   { 12787, 0x00000B50 }, /* GL_LIGHTING */
+   { 12799, 0x00000040 }, /* GL_LIGHTING_BIT */
+   { 12815, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
+   { 12838, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+   { 12867, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
+   { 12900, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+   { 12928, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
+   { 12952, 0x00001B01 }, /* GL_LINE */
+   { 12960, 0x00002601 }, /* GL_LINEAR */
+   { 12970, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
+   { 12992, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+   { 13022, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+   { 13053, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
+   { 13077, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
+   { 13102, 0x00000001 }, /* GL_LINES */
+   { 13111, 0x00000004 }, /* GL_LINE_BIT */
+   { 13123, 0x00000002 }, /* GL_LINE_LOOP */
+   { 13136, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
+   { 13156, 0x00000B20 }, /* GL_LINE_SMOOTH */
+   { 13171, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
+   { 13191, 0x00000B24 }, /* GL_LINE_STIPPLE */
+   { 13207, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
+   { 13231, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
+   { 13254, 0x00000003 }, /* GL_LINE_STRIP */
+   { 13268, 0x00000702 }, /* GL_LINE_TOKEN */
+   { 13282, 0x00000B21 }, /* GL_LINE_WIDTH */
+   { 13296, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
+   { 13322, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
+   { 13342, 0x00008B82 }, /* GL_LINK_STATUS */
+   { 13357, 0x00000B32 }, /* GL_LIST_BASE */
+   { 13370, 0x00020000 }, /* GL_LIST_BIT */
+   { 13382, 0x00000B33 }, /* GL_LIST_INDEX */
+   { 13396, 0x00000B30 }, /* GL_LIST_MODE */
+   { 13409, 0x00000101 }, /* GL_LOAD */
+   { 13417, 0x00000BF1 }, /* GL_LOGIC_OP */
+   { 13429, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
+   { 13446, 0x00008CA1 }, /* GL_LOWER_LEFT */
+   { 13460, 0x00001909 }, /* GL_LUMINANCE */
+   { 13473, 0x00008041 }, /* GL_LUMINANCE12 */
+   { 13488, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
+   { 13511, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
+   { 13538, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
+   { 13560, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
+   { 13586, 0x00008041 }, /* GL_LUMINANCE12_EXT */
+   { 13605, 0x00008042 }, /* GL_LUMINANCE16 */
+   { 13620, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
+   { 13643, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
+   { 13670, 0x00008042 }, /* GL_LUMINANCE16_EXT */
+   { 13689, 0x0000803F }, /* GL_LUMINANCE4 */
+   { 13703, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
+   { 13724, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
+   { 13749, 0x0000803F }, /* GL_LUMINANCE4_EXT */
+   { 13767, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
+   { 13788, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
+   { 13813, 0x00008040 }, /* GL_LUMINANCE8 */
+   { 13827, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
+   { 13848, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
+   { 13873, 0x00008040 }, /* GL_LUMINANCE8_EXT */
+   { 13891, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
+   { 13910, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
+   { 13926, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
+   { 13946, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
+   { 13968, 0x00000D91 }, /* GL_MAP1_INDEX */
+   { 13982, 0x00000D92 }, /* GL_MAP1_NORMAL */
+   { 13997, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
+   { 14021, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
+   { 14045, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
+   { 14069, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
+   { 14093, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
+   { 14110, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
+   { 14127, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+   { 14155, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+   { 14184, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+   { 14213, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+   { 14242, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+   { 14271, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+   { 14300, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+   { 14329, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+   { 14357, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+   { 14385, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+   { 14413, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+   { 14441, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+   { 14469, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+   { 14497, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+   { 14525, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+   { 14553, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+   { 14581, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
+   { 14597, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
+   { 14617, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
+   { 14639, 0x00000DB1 }, /* GL_MAP2_INDEX */
+   { 14653, 0x00000DB2 }, /* GL_MAP2_NORMAL */
+   { 14668, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
+   { 14692, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
+   { 14716, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
+   { 14740, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
+   { 14764, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
+   { 14781, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
+   { 14798, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+   { 14826, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+   { 14855, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+   { 14884, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+   { 14913, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+   { 14942, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+   { 14971, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+   { 15000, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+   { 15028, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+   { 15056, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+   { 15084, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+   { 15112, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+   { 15140, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+   { 15168, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
+   { 15196, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+   { 15224, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+   { 15252, 0x00000D10 }, /* GL_MAP_COLOR */
+   { 15265, 0x00000D11 }, /* GL_MAP_STENCIL */
+   { 15280, 0x000088C0 }, /* GL_MATRIX0_ARB */
+   { 15295, 0x00008630 }, /* GL_MATRIX0_NV */
+   { 15309, 0x000088CA }, /* GL_MATRIX10_ARB */
+   { 15325, 0x000088CB }, /* GL_MATRIX11_ARB */
+   { 15341, 0x000088CC }, /* GL_MATRIX12_ARB */
+   { 15357, 0x000088CD }, /* GL_MATRIX13_ARB */
+   { 15373, 0x000088CE }, /* GL_MATRIX14_ARB */
+   { 15389, 0x000088CF }, /* GL_MATRIX15_ARB */
+   { 15405, 0x000088D0 }, /* GL_MATRIX16_ARB */
+   { 15421, 0x000088D1 }, /* GL_MATRIX17_ARB */
+   { 15437, 0x000088D2 }, /* GL_MATRIX18_ARB */
+   { 15453, 0x000088D3 }, /* GL_MATRIX19_ARB */
+   { 15469, 0x000088C1 }, /* GL_MATRIX1_ARB */
+   { 15484, 0x00008631 }, /* GL_MATRIX1_NV */
+   { 15498, 0x000088D4 }, /* GL_MATRIX20_ARB */
+   { 15514, 0x000088D5 }, /* GL_MATRIX21_ARB */
+   { 15530, 0x000088D6 }, /* GL_MATRIX22_ARB */
+   { 15546, 0x000088D7 }, /* GL_MATRIX23_ARB */
+   { 15562, 0x000088D8 }, /* GL_MATRIX24_ARB */
+   { 15578, 0x000088D9 }, /* GL_MATRIX25_ARB */
+   { 15594, 0x000088DA }, /* GL_MATRIX26_ARB */
+   { 15610, 0x000088DB }, /* GL_MATRIX27_ARB */
+   { 15626, 0x000088DC }, /* GL_MATRIX28_ARB */
+   { 15642, 0x000088DD }, /* GL_MATRIX29_ARB */
+   { 15658, 0x000088C2 }, /* GL_MATRIX2_ARB */
+   { 15673, 0x00008632 }, /* GL_MATRIX2_NV */
+   { 15687, 0x000088DE }, /* GL_MATRIX30_ARB */
+   { 15703, 0x000088DF }, /* GL_MATRIX31_ARB */
+   { 15719, 0x000088C3 }, /* GL_MATRIX3_ARB */
+   { 15734, 0x00008633 }, /* GL_MATRIX3_NV */
+   { 15748, 0x000088C4 }, /* GL_MATRIX4_ARB */
+   { 15763, 0x00008634 }, /* GL_MATRIX4_NV */
+   { 15777, 0x000088C5 }, /* GL_MATRIX5_ARB */
+   { 15792, 0x00008635 }, /* GL_MATRIX5_NV */
+   { 15806, 0x000088C6 }, /* GL_MATRIX6_ARB */
+   { 15821, 0x00008636 }, /* GL_MATRIX6_NV */
+   { 15835, 0x000088C7 }, /* GL_MATRIX7_ARB */
+   { 15850, 0x00008637 }, /* GL_MATRIX7_NV */
+   { 15864, 0x000088C8 }, /* GL_MATRIX8_ARB */
+   { 15879, 0x000088C9 }, /* GL_MATRIX9_ARB */
+   { 15894, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
+   { 15920, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+   { 15954, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+   { 15985, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+   { 16018, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+   { 16049, 0x00000BA0 }, /* GL_MATRIX_MODE */
+   { 16064, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
+   { 16086, 0x00008008 }, /* GL_MAX */
+   { 16093, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
+   { 16116, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
+   { 16148, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
+   { 16174, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+   { 16207, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+   { 16233, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+   { 16267, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
+   { 16286, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
+   { 16315, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+   { 16347, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
+   { 16383, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+   { 16419, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
+   { 16459, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
+   { 16485, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
+   { 16515, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
+   { 16540, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
+   { 16569, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+   { 16598, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
+   { 16631, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
+   { 16651, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
+   { 16675, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
+   { 16699, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
+   { 16723, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
+   { 16748, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
+   { 16766, 0x00008008 }, /* GL_MAX_EXT */
+   { 16777, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+   { 16812, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
+   { 16851, 0x00000D31 }, /* GL_MAX_LIGHTS */
+   { 16865, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
+   { 16885, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+   { 16923, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+   { 16952, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
+   { 16976, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
+   { 17004, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
+   { 17027, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+   { 17064, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+   { 17100, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+   { 17127, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+   { 17156, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+   { 17190, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
+   { 17226, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+   { 17253, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+   { 17285, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+   { 17321, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+   { 17350, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+   { 17379, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
+   { 17407, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+   { 17445, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+   { 17489, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+   { 17532, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+   { 17566, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+   { 17605, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+   { 17642, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+   { 17680, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+   { 17723, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+   { 17766, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+   { 17796, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+   { 17827, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+   { 17863, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+   { 17899, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
+   { 17929, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+   { 17963, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
+   { 17996, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
+   { 18025, 0x00008504 }, /* GL_MAX_SHININESS_NV */
+   { 18045, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
+   { 18069, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
+   { 18091, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
+   { 18117, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+   { 18144, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
+   { 18175, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
+   { 18199, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+   { 18233, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
+   { 18253, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
+   { 18280, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
+   { 18301, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
+   { 18326, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
+   { 18351, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
+   { 18386, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
+   { 18408, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
+   { 18434, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
+   { 18456, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
+   { 18482, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+   { 18516, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
+   { 18554, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+   { 18587, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
+   { 18624, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
+   { 18648, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
+   { 18669, 0x00008007 }, /* GL_MIN */
+   { 18676, 0x0000802E }, /* GL_MINMAX */
+   { 18686, 0x0000802E }, /* GL_MINMAX_EXT */
+   { 18700, 0x0000802F }, /* GL_MINMAX_FORMAT */
+   { 18717, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
+   { 18738, 0x00008030 }, /* GL_MINMAX_SINK */
+   { 18753, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
+   { 18772, 0x00008007 }, /* GL_MIN_EXT */
+   { 18783, 0x00008370 }, /* GL_MIRRORED_REPEAT */
+   { 18802, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
+   { 18825, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
+   { 18848, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
+   { 18868, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
+   { 18888, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+   { 18918, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
+   { 18946, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+   { 18974, 0x00001700 }, /* GL_MODELVIEW */
+   { 18987, 0x00001700 }, /* GL_MODELVIEW0_ARB */
+   { 19005, 0x0000872A }, /* GL_MODELVIEW10_ARB */
+   { 19024, 0x0000872B }, /* GL_MODELVIEW11_ARB */
+   { 19043, 0x0000872C }, /* GL_MODELVIEW12_ARB */
+   { 19062, 0x0000872D }, /* GL_MODELVIEW13_ARB */
+   { 19081, 0x0000872E }, /* GL_MODELVIEW14_ARB */
+   { 19100, 0x0000872F }, /* GL_MODELVIEW15_ARB */
+   { 19119, 0x00008730 }, /* GL_MODELVIEW16_ARB */
+   { 19138, 0x00008731 }, /* GL_MODELVIEW17_ARB */
+   { 19157, 0x00008732 }, /* GL_MODELVIEW18_ARB */
+   { 19176, 0x00008733 }, /* GL_MODELVIEW19_ARB */
+   { 19195, 0x0000850A }, /* GL_MODELVIEW1_ARB */
+   { 19213, 0x00008734 }, /* GL_MODELVIEW20_ARB */
+   { 19232, 0x00008735 }, /* GL_MODELVIEW21_ARB */
+   { 19251, 0x00008736 }, /* GL_MODELVIEW22_ARB */
+   { 19270, 0x00008737 }, /* GL_MODELVIEW23_ARB */
+   { 19289, 0x00008738 }, /* GL_MODELVIEW24_ARB */
+   { 19308, 0x00008739 }, /* GL_MODELVIEW25_ARB */
+   { 19327, 0x0000873A }, /* GL_MODELVIEW26_ARB */
+   { 19346, 0x0000873B }, /* GL_MODELVIEW27_ARB */
+   { 19365, 0x0000873C }, /* GL_MODELVIEW28_ARB */
+   { 19384, 0x0000873D }, /* GL_MODELVIEW29_ARB */
+   { 19403, 0x00008722 }, /* GL_MODELVIEW2_ARB */
+   { 19421, 0x0000873E }, /* GL_MODELVIEW30_ARB */
+   { 19440, 0x0000873F }, /* GL_MODELVIEW31_ARB */
+   { 19459, 0x00008723 }, /* GL_MODELVIEW3_ARB */
+   { 19477, 0x00008724 }, /* GL_MODELVIEW4_ARB */
+   { 19495, 0x00008725 }, /* GL_MODELVIEW5_ARB */
+   { 19513, 0x00008726 }, /* GL_MODELVIEW6_ARB */
+   { 19531, 0x00008727 }, /* GL_MODELVIEW7_ARB */
+   { 19549, 0x00008728 }, /* GL_MODELVIEW8_ARB */
+   { 19567, 0x00008729 }, /* GL_MODELVIEW9_ARB */
+   { 19585, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
+   { 19605, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
+   { 19632, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
+   { 19657, 0x00002100 }, /* GL_MODULATE */
+   { 19669, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
+   { 19689, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
+   { 19716, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
+   { 19741, 0x00000103 }, /* GL_MULT */
+   { 19749, 0x0000809D }, /* GL_MULTISAMPLE */
+   { 19764, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
+   { 19784, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
+   { 19803, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
+   { 19822, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
+   { 19846, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
+   { 19869, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+   { 19899, 0x00002A25 }, /* GL_N3F_V3F */
+   { 19910, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
+   { 19930, 0x0000150E }, /* GL_NAND */
+   { 19938, 0x00002600 }, /* GL_NEAREST */
+   { 19949, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+   { 19980, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+   { 20012, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
+   { 20037, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
+   { 20063, 0x00000200 }, /* GL_NEVER */
+   { 20072, 0x00001102 }, /* GL_NICEST */
+   { 20082, 0x00000000 }, /* GL_NONE */
+   { 20090, 0x00001505 }, /* GL_NOOP */
+   { 20098, 0x00001508 }, /* GL_NOR */
+   { 20105, 0x00000BA1 }, /* GL_NORMALIZE */
+   { 20118, 0x00008075 }, /* GL_NORMAL_ARRAY */
+   { 20134, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+   { 20165, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
+   { 20200, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
+   { 20224, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
+   { 20247, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
+   { 20268, 0x00008511 }, /* GL_NORMAL_MAP */
+   { 20282, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
+   { 20300, 0x00008511 }, /* GL_NORMAL_MAP_NV */
+   { 20317, 0x00000205 }, /* GL_NOTEQUAL */
+   { 20329, 0x00000000 }, /* GL_NO_ERROR */
+   { 20341, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+   { 20375, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
+   { 20413, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
+   { 20445, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
+   { 20487, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
+   { 20517, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
+   { 20557, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
+   { 20588, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
+   { 20617, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
+   { 20645, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
+   { 20675, 0x00002401 }, /* GL_OBJECT_LINEAR */
+   { 20692, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
+   { 20718, 0x00002501 }, /* GL_OBJECT_PLANE */
+   { 20734, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
+   { 20769, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
+   { 20791, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
+   { 20810, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
+   { 20840, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
+   { 20861, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
+   { 20889, 0x00000001 }, /* GL_ONE */
+   { 20896, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+   { 20924, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
+   { 20956, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
+   { 20984, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
+   { 21016, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
+   { 21039, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
+   { 21062, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
+   { 21085, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
+   { 21108, 0x00008598 }, /* GL_OPERAND0_ALPHA */
+   { 21126, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
+   { 21148, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
+   { 21170, 0x00008590 }, /* GL_OPERAND0_RGB */
+   { 21186, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
+   { 21206, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
+   { 21226, 0x00008599 }, /* GL_OPERAND1_ALPHA */
+   { 21244, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
+   { 21266, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
+   { 21288, 0x00008591 }, /* GL_OPERAND1_RGB */
+   { 21304, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
+   { 21324, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
+   { 21344, 0x0000859A }, /* GL_OPERAND2_ALPHA */
+   { 21362, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
+   { 21384, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
+   { 21406, 0x00008592 }, /* GL_OPERAND2_RGB */
+   { 21422, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
+   { 21442, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
+   { 21462, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
+   { 21483, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
+   { 21502, 0x00001507 }, /* GL_OR */
+   { 21508, 0x00000A01 }, /* GL_ORDER */
+   { 21517, 0x0000150D }, /* GL_OR_INVERTED */
+   { 21532, 0x0000150B }, /* GL_OR_REVERSE */
+   { 21546, 0x00000505 }, /* GL_OUT_OF_MEMORY */
+   { 21563, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
+   { 21581, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
+   { 21602, 0x00008758 }, /* GL_PACK_INVERT_MESA */
+   { 21622, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
+   { 21640, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
+   { 21659, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
+   { 21679, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
+   { 21699, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
+   { 21717, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
+   { 21736, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
+   { 21761, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
+   { 21785, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
+   { 21806, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
+   { 21828, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
+   { 21850, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
+   { 21875, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
+   { 21899, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
+   { 21920, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
+   { 21942, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
+   { 21964, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
+   { 21986, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
+   { 22017, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
+   { 22037, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+   { 22062, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
+   { 22082, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+   { 22107, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
+   { 22127, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+   { 22152, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
+   { 22172, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+   { 22197, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
+   { 22217, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+   { 22242, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
+   { 22262, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+   { 22287, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
+   { 22307, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+   { 22332, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
+   { 22352, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+   { 22377, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
+   { 22397, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+   { 22422, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
+   { 22442, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+   { 22467, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
+   { 22485, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
+   { 22518, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
+   { 22543, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
+   { 22578, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
+   { 22605, 0x00001B00 }, /* GL_POINT */
+   { 22614, 0x00000000 }, /* GL_POINTS */
+   { 22624, 0x00000002 }, /* GL_POINT_BIT */
+   { 22637, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
+   { 22667, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
+   { 22701, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
+   { 22735, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
+   { 22770, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
+   { 22799, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
+   { 22832, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
+   { 22865, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
+   { 22899, 0x00000B11 }, /* GL_POINT_SIZE */
+   { 22913, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
+   { 22939, 0x00008127 }, /* GL_POINT_SIZE_MAX */
+   { 22957, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
+   { 22979, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
+   { 23001, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
+   { 23024, 0x00008126 }, /* GL_POINT_SIZE_MIN */
+   { 23042, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
+   { 23064, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
+   { 23086, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
+   { 23109, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
+   { 23129, 0x00000B10 }, /* GL_POINT_SMOOTH */
+   { 23145, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
+   { 23166, 0x00008861 }, /* GL_POINT_SPRITE */
+   { 23182, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
+   { 23202, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
+   { 23231, 0x00008861 }, /* GL_POINT_SPRITE_NV */
+   { 23250, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
+   { 23276, 0x00000701 }, /* GL_POINT_TOKEN */
+   { 23291, 0x00000009 }, /* GL_POLYGON */
+   { 23302, 0x00000008 }, /* GL_POLYGON_BIT */
+   { 23317, 0x00000B40 }, /* GL_POLYGON_MODE */
+   { 23333, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
+   { 23356, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
+   { 23381, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
+   { 23404, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
+   { 23427, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
+   { 23451, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
+   { 23475, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
+   { 23493, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
+   { 23516, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
+   { 23535, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
+   { 23558, 0x00000703 }, /* GL_POLYGON_TOKEN */
+   { 23575, 0x00001203 }, /* GL_POSITION */
+   { 23587, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+   { 23619, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
+   { 23655, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+   { 23688, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
+   { 23725, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+   { 23756, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
+   { 23791, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+   { 23823, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
+   { 23859, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+   { 23892, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+   { 23924, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
+   { 23960, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+   { 23993, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
+   { 24030, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+   { 24060, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
+   { 24094, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+   { 24125, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
+   { 24160, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+   { 24191, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
+   { 24226, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+   { 24258, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
+   { 24294, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+   { 24324, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
+   { 24358, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+   { 24389, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
+   { 24424, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+   { 24456, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+   { 24487, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
+   { 24522, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+   { 24554, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
+   { 24590, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
+   { 24619, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
+   { 24652, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
+   { 24682, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
+   { 24716, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+   { 24755, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+   { 24788, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+   { 24828, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+   { 24862, 0x00008578 }, /* GL_PREVIOUS */
+   { 24874, 0x00008578 }, /* GL_PREVIOUS_ARB */
+   { 24890, 0x00008578 }, /* GL_PREVIOUS_EXT */
+   { 24906, 0x00008577 }, /* GL_PRIMARY_COLOR */
+   { 24923, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
+   { 24944, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
+   { 24965, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+   { 24998, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+   { 25030, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
+   { 25053, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
+   { 25076, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
+   { 25106, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
+   { 25135, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
+   { 25163, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
+   { 25185, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+   { 25213, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+   { 25241, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
+   { 25263, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
+   { 25284, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+   { 25324, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+   { 25363, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+   { 25393, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+   { 25428, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+   { 25461, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+   { 25495, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+   { 25534, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+   { 25573, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
+   { 25595, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
+   { 25621, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
+   { 25645, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
+   { 25668, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
+   { 25690, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
+   { 25711, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
+   { 25732, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
+   { 25759, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+   { 25791, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+   { 25823, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+   { 25858, 0x00001701 }, /* GL_PROJECTION */
+   { 25872, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
+   { 25893, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
+   { 25919, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
+   { 25940, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
+   { 25959, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
+   { 25982, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+   { 26021, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+   { 26059, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
+   { 26079, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
+   { 26109, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
+   { 26133, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
+   { 26153, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
+   { 26183, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
+   { 26207, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
+   { 26227, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+   { 26260, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
+   { 26286, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
+   { 26316, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+   { 26347, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
+   { 26377, 0x00002003 }, /* GL_Q */
+   { 26382, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
+   { 26407, 0x00000007 }, /* GL_QUADS */
+   { 26416, 0x00008614 }, /* GL_QUAD_MESH_SUN */
+   { 26433, 0x00000008 }, /* GL_QUAD_STRIP */
+   { 26447, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
+   { 26469, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
+   { 26495, 0x00008866 }, /* GL_QUERY_RESULT */
+   { 26511, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
+   { 26531, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
+   { 26557, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
+   { 26587, 0x00002002 }, /* GL_R */
+   { 26592, 0x00002A10 }, /* GL_R3_G3_B2 */
+   { 26604, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+   { 26637, 0x00000C02 }, /* GL_READ_BUFFER */
+   { 26652, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
+   { 26684, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
+   { 26708, 0x000088B8 }, /* GL_READ_ONLY */
+   { 26721, 0x000088B8 }, /* GL_READ_ONLY_ARB */
+   { 26738, 0x000088BA }, /* GL_READ_WRITE */
+   { 26752, 0x000088BA }, /* GL_READ_WRITE_ARB */
+   { 26770, 0x00001903 }, /* GL_RED */
+   { 26777, 0x00008016 }, /* GL_REDUCE */
+   { 26787, 0x00008016 }, /* GL_REDUCE_EXT */
+   { 26801, 0x00000D15 }, /* GL_RED_BIAS */
+   { 26813, 0x00000D52 }, /* GL_RED_BITS */
+   { 26825, 0x00000D14 }, /* GL_RED_SCALE */
+   { 26838, 0x00008512 }, /* GL_REFLECTION_MAP */
+   { 26856, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
+   { 26878, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
+   { 26899, 0x00001C00 }, /* GL_RENDER */
+   { 26909, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
+   { 26937, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
+   { 26957, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
+   { 26984, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
+   { 27020, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
+   { 27046, 0x00001F01 }, /* GL_RENDERER */
+   { 27058, 0x00000C40 }, /* GL_RENDER_MODE */
+   { 27073, 0x00002901 }, /* GL_REPEAT */
+   { 27083, 0x00001E01 }, /* GL_REPLACE */
+   { 27094, 0x00008062 }, /* GL_REPLACE_EXT */
+   { 27109, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
+   { 27132, 0x0000803A }, /* GL_RESCALE_NORMAL */
+   { 27150, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
+   { 27172, 0x00000102 }, /* GL_RETURN */
+   { 27182, 0x00001907 }, /* GL_RGB */
+   { 27189, 0x00008052 }, /* GL_RGB10 */
+   { 27198, 0x00008059 }, /* GL_RGB10_A2 */
+   { 27210, 0x00008059 }, /* GL_RGB10_A2_EXT */
+   { 27226, 0x00008052 }, /* GL_RGB10_EXT */
+   { 27239, 0x00008053 }, /* GL_RGB12 */
+   { 27248, 0x00008053 }, /* GL_RGB12_EXT */
+   { 27261, 0x00008054 }, /* GL_RGB16 */
+   { 27270, 0x00008054 }, /* GL_RGB16_EXT */
+   { 27283, 0x0000804E }, /* GL_RGB2_EXT */
+   { 27295, 0x0000804F }, /* GL_RGB4 */
+   { 27303, 0x0000804F }, /* GL_RGB4_EXT */
+   { 27315, 0x000083A1 }, /* GL_RGB4_S3TC */
+   { 27328, 0x00008050 }, /* GL_RGB5 */
+   { 27336, 0x00008057 }, /* GL_RGB5_A1 */
+   { 27347, 0x00008057 }, /* GL_RGB5_A1_EXT */
+   { 27362, 0x00008050 }, /* GL_RGB5_EXT */
+   { 27374, 0x00008051 }, /* GL_RGB8 */
+   { 27382, 0x00008051 }, /* GL_RGB8_EXT */
+   { 27394, 0x00001908 }, /* GL_RGBA */
+   { 27402, 0x0000805A }, /* GL_RGBA12 */
+   { 27412, 0x0000805A }, /* GL_RGBA12_EXT */
+   { 27426, 0x0000805B }, /* GL_RGBA16 */
+   { 27436, 0x0000805B }, /* GL_RGBA16_EXT */
+   { 27450, 0x00008055 }, /* GL_RGBA2 */
+   { 27459, 0x00008055 }, /* GL_RGBA2_EXT */
+   { 27472, 0x00008056 }, /* GL_RGBA4 */
+   { 27481, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
+   { 27500, 0x00008056 }, /* GL_RGBA4_EXT */
+   { 27513, 0x000083A3 }, /* GL_RGBA4_S3TC */
+   { 27527, 0x00008058 }, /* GL_RGBA8 */
+   { 27536, 0x00008058 }, /* GL_RGBA8_EXT */
+   { 27549, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
+   { 27567, 0x00000C31 }, /* GL_RGBA_MODE */
+   { 27580, 0x000083A2 }, /* GL_RGBA_S3TC */
+   { 27593, 0x000083A0 }, /* GL_RGB_S3TC */
+   { 27605, 0x00008573 }, /* GL_RGB_SCALE */
+   { 27618, 0x00008573 }, /* GL_RGB_SCALE_ARB */
+   { 27635, 0x00008573 }, /* GL_RGB_SCALE_EXT */
+   { 27652, 0x00000407 }, /* GL_RIGHT */
+   { 27661, 0x00002000 }, /* GL_S */
+   { 27666, 0x00008B5D }, /* GL_SAMPLER_1D */
+   { 27680, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
+   { 27701, 0x00008B5E }, /* GL_SAMPLER_2D */
+   { 27715, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
+   { 27736, 0x00008B5F }, /* GL_SAMPLER_3D */
+   { 27750, 0x00008B60 }, /* GL_SAMPLER_CUBE */
+   { 27766, 0x000080A9 }, /* GL_SAMPLES */
+   { 27777, 0x000086B4 }, /* GL_SAMPLES_3DFX */
+   { 27793, 0x000080A9 }, /* GL_SAMPLES_ARB */
+   { 27808, 0x00008914 }, /* GL_SAMPLES_PASSED */
+   { 27826, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
+   { 27848, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+   { 27876, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
+   { 27908, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
+   { 27931, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
+   { 27958, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
+   { 27976, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
+   { 27999, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
+   { 28021, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
+   { 28040, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
+   { 28063, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
+   { 28089, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
+   { 28119, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
+   { 28144, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
+   { 28173, 0x00080000 }, /* GL_SCISSOR_BIT */
+   { 28188, 0x00000C10 }, /* GL_SCISSOR_BOX */
+   { 28203, 0x00000C11 }, /* GL_SCISSOR_TEST */
+   { 28219, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
+   { 28244, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+   { 28284, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
+   { 28328, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+   { 28361, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+   { 28391, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+   { 28423, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+   { 28453, 0x00001C02 }, /* GL_SELECT */
+   { 28463, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
+   { 28491, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
+   { 28516, 0x00008012 }, /* GL_SEPARABLE_2D */
+   { 28532, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
+   { 28559, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
+   { 28590, 0x0000150F }, /* GL_SET */
+   { 28597, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
+   { 28618, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
+   { 28642, 0x00008B4F }, /* GL_SHADER_TYPE */
+   { 28657, 0x00000B54 }, /* GL_SHADE_MODEL */
+   { 28672, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
+   { 28700, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
+   { 28723, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+   { 28753, 0x00001601 }, /* GL_SHININESS */
+   { 28766, 0x00001402 }, /* GL_SHORT */
+   { 28775, 0x000081F9 }, /* GL_SINGLE_COLOR */
+   { 28791, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
+   { 28811, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
+   { 28830, 0x00001D01 }, /* GL_SMOOTH */
+   { 28840, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
+   { 28873, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
+   { 28900, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
+   { 28933, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
+   { 28960, 0x00008588 }, /* GL_SOURCE0_ALPHA */
+   { 28977, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
+   { 28998, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
+   { 29019, 0x00008580 }, /* GL_SOURCE0_RGB */
+   { 29034, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
+   { 29053, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
+   { 29072, 0x00008589 }, /* GL_SOURCE1_ALPHA */
+   { 29089, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
+   { 29110, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
+   { 29131, 0x00008581 }, /* GL_SOURCE1_RGB */
+   { 29146, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
+   { 29165, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
+   { 29184, 0x0000858A }, /* GL_SOURCE2_ALPHA */
+   { 29201, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
+   { 29222, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
+   { 29243, 0x00008582 }, /* GL_SOURCE2_RGB */
+   { 29258, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
+   { 29277, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
+   { 29296, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
+   { 29316, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
+   { 29334, 0x00001202 }, /* GL_SPECULAR */
+   { 29346, 0x00002402 }, /* GL_SPHERE_MAP */
+   { 29360, 0x00001206 }, /* GL_SPOT_CUTOFF */
+   { 29375, 0x00001204 }, /* GL_SPOT_DIRECTION */
+   { 29393, 0x00001205 }, /* GL_SPOT_EXPONENT */
+   { 29410, 0x00008588 }, /* GL_SRC0_ALPHA */
+   { 29424, 0x00008580 }, /* GL_SRC0_RGB */
+   { 29436, 0x00008589 }, /* GL_SRC1_ALPHA */
+   { 29450, 0x00008581 }, /* GL_SRC1_RGB */
+   { 29462, 0x0000858A }, /* GL_SRC2_ALPHA */
+   { 29476, 0x00008582 }, /* GL_SRC2_RGB */
+   { 29488, 0x00000302 }, /* GL_SRC_ALPHA */
+   { 29501, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
+   { 29523, 0x00000300 }, /* GL_SRC_COLOR */
+   { 29536, 0x00000503 }, /* GL_STACK_OVERFLOW */
+   { 29554, 0x00000504 }, /* GL_STACK_UNDERFLOW */
+   { 29573, 0x000088E6 }, /* GL_STATIC_COPY */
+   { 29588, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
+   { 29607, 0x000088E4 }, /* GL_STATIC_DRAW */
+   { 29622, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
+   { 29641, 0x000088E5 }, /* GL_STATIC_READ */
+   { 29656, 0x000088E5 }, /* GL_STATIC_READ_ARB */
+   { 29675, 0x00001802 }, /* GL_STENCIL */
+   { 29686, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
+   { 29712, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
+   { 29733, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
+   { 29754, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+   { 29786, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+   { 29818, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
+   { 29838, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
+   { 29865, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
+   { 29891, 0x00000D57 }, /* GL_STENCIL_BITS */
+   { 29907, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
+   { 29929, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
+   { 29952, 0x00000B94 }, /* GL_STENCIL_FAIL */
+   { 29968, 0x00000B92 }, /* GL_STENCIL_FUNC */
+   { 29984, 0x00001901 }, /* GL_STENCIL_INDEX */
+   { 30001, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
+   { 30024, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
+   { 30046, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
+   { 30068, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
+   { 30090, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
+   { 30111, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
+   { 30138, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
+   { 30165, 0x00000B97 }, /* GL_STENCIL_REF */
+   { 30180, 0x00000B90 }, /* GL_STENCIL_TEST */
+   { 30196, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+   { 30225, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
+   { 30247, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
+   { 30268, 0x00000C33 }, /* GL_STEREO */
+   { 30278, 0x000088E2 }, /* GL_STREAM_COPY */
+   { 30293, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
+   { 30312, 0x000088E0 }, /* GL_STREAM_DRAW */
+   { 30327, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
+   { 30346, 0x000088E1 }, /* GL_STREAM_READ */
+   { 30361, 0x000088E1 }, /* GL_STREAM_READ_ARB */
+   { 30380, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
+   { 30397, 0x000084E7 }, /* GL_SUBTRACT */
+   { 30409, 0x000084E7 }, /* GL_SUBTRACT_ARB */
+   { 30425, 0x00002001 }, /* GL_T */
+   { 30430, 0x00002A2A }, /* GL_T2F_C3F_V3F */
+   { 30445, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
+   { 30464, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
+   { 30480, 0x00002A2B }, /* GL_T2F_N3F_V3F */
+   { 30495, 0x00002A27 }, /* GL_T2F_V3F */
+   { 30506, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
+   { 30525, 0x00002A28 }, /* GL_T4F_V4F */
+   { 30536, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
+   { 30559, 0x00001702 }, /* GL_TEXTURE */
+   { 30570, 0x000084C0 }, /* GL_TEXTURE0 */
+   { 30582, 0x000084C0 }, /* GL_TEXTURE0_ARB */
+   { 30598, 0x000084C1 }, /* GL_TEXTURE1 */
+   { 30610, 0x000084CA }, /* GL_TEXTURE10 */
+   { 30623, 0x000084CA }, /* GL_TEXTURE10_ARB */
+   { 30640, 0x000084CB }, /* GL_TEXTURE11 */
+   { 30653, 0x000084CB }, /* GL_TEXTURE11_ARB */
+   { 30670, 0x000084CC }, /* GL_TEXTURE12 */
+   { 30683, 0x000084CC }, /* GL_TEXTURE12_ARB */
+   { 30700, 0x000084CD }, /* GL_TEXTURE13 */
+   { 30713, 0x000084CD }, /* GL_TEXTURE13_ARB */
+   { 30730, 0x000084CE }, /* GL_TEXTURE14 */
+   { 30743, 0x000084CE }, /* GL_TEXTURE14_ARB */
+   { 30760, 0x000084CF }, /* GL_TEXTURE15 */
+   { 30773, 0x000084CF }, /* GL_TEXTURE15_ARB */
+   { 30790, 0x000084D0 }, /* GL_TEXTURE16 */
+   { 30803, 0x000084D0 }, /* GL_TEXTURE16_ARB */
+   { 30820, 0x000084D1 }, /* GL_TEXTURE17 */
+   { 30833, 0x000084D1 }, /* GL_TEXTURE17_ARB */
+   { 30850, 0x000084D2 }, /* GL_TEXTURE18 */
+   { 30863, 0x000084D2 }, /* GL_TEXTURE18_ARB */
+   { 30880, 0x000084D3 }, /* GL_TEXTURE19 */
+   { 30893, 0x000084D3 }, /* GL_TEXTURE19_ARB */
+   { 30910, 0x000084C1 }, /* GL_TEXTURE1_ARB */
+   { 30926, 0x000084C2 }, /* GL_TEXTURE2 */
+   { 30938, 0x000084D4 }, /* GL_TEXTURE20 */
+   { 30951, 0x000084D4 }, /* GL_TEXTURE20_ARB */
+   { 30968, 0x000084D5 }, /* GL_TEXTURE21 */
+   { 30981, 0x000084D5 }, /* GL_TEXTURE21_ARB */
+   { 30998, 0x000084D6 }, /* GL_TEXTURE22 */
+   { 31011, 0x000084D6 }, /* GL_TEXTURE22_ARB */
+   { 31028, 0x000084D7 }, /* GL_TEXTURE23 */
+   { 31041, 0x000084D7 }, /* GL_TEXTURE23_ARB */
+   { 31058, 0x000084D8 }, /* GL_TEXTURE24 */
+   { 31071, 0x000084D8 }, /* GL_TEXTURE24_ARB */
+   { 31088, 0x000084D9 }, /* GL_TEXTURE25 */
+   { 31101, 0x000084D9 }, /* GL_TEXTURE25_ARB */
+   { 31118, 0x000084DA }, /* GL_TEXTURE26 */
+   { 31131, 0x000084DA }, /* GL_TEXTURE26_ARB */
+   { 31148, 0x000084DB }, /* GL_TEXTURE27 */
+   { 31161, 0x000084DB }, /* GL_TEXTURE27_ARB */
+   { 31178, 0x000084DC }, /* GL_TEXTURE28 */
+   { 31191, 0x000084DC }, /* GL_TEXTURE28_ARB */
+   { 31208, 0x000084DD }, /* GL_TEXTURE29 */
+   { 31221, 0x000084DD }, /* GL_TEXTURE29_ARB */
+   { 31238, 0x000084C2 }, /* GL_TEXTURE2_ARB */
+   { 31254, 0x000084C3 }, /* GL_TEXTURE3 */
+   { 31266, 0x000084DE }, /* GL_TEXTURE30 */
+   { 31279, 0x000084DE }, /* GL_TEXTURE30_ARB */
+   { 31296, 0x000084DF }, /* GL_TEXTURE31 */
+   { 31309, 0x000084DF }, /* GL_TEXTURE31_ARB */
+   { 31326, 0x000084C3 }, /* GL_TEXTURE3_ARB */
+   { 31342, 0x000084C4 }, /* GL_TEXTURE4 */
+   { 31354, 0x000084C4 }, /* GL_TEXTURE4_ARB */
+   { 31370, 0x000084C5 }, /* GL_TEXTURE5 */
+   { 31382, 0x000084C5 }, /* GL_TEXTURE5_ARB */
+   { 31398, 0x000084C6 }, /* GL_TEXTURE6 */
+   { 31410, 0x000084C6 }, /* GL_TEXTURE6_ARB */
+   { 31426, 0x000084C7 }, /* GL_TEXTURE7 */
+   { 31438, 0x000084C7 }, /* GL_TEXTURE7_ARB */
+   { 31454, 0x000084C8 }, /* GL_TEXTURE8 */
+   { 31466, 0x000084C8 }, /* GL_TEXTURE8_ARB */
+   { 31482, 0x000084C9 }, /* GL_TEXTURE9 */
+   { 31494, 0x000084C9 }, /* GL_TEXTURE9_ARB */
+   { 31510, 0x00000DE0 }, /* GL_TEXTURE_1D */
+   { 31524, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
+   { 31548, 0x00000DE1 }, /* GL_TEXTURE_2D */
+   { 31562, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
+   { 31586, 0x0000806F }, /* GL_TEXTURE_3D */
+   { 31600, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
+   { 31622, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
+   { 31648, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
+   { 31670, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
+   { 31692, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
+   { 31724, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
+   { 31746, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
+   { 31778, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
+   { 31800, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
+   { 31828, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
+   { 31860, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+   { 31893, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
+   { 31925, 0x00040000 }, /* GL_TEXTURE_BIT */
+   { 31940, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
+   { 31961, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
+   { 31986, 0x00001005 }, /* GL_TEXTURE_BORDER */
+   { 32004, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
+   { 32028, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+   { 32059, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+   { 32089, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+   { 32119, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+   { 32154, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+   { 32185, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+   { 32223, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
+   { 32250, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+   { 32282, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+   { 32316, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
+   { 32340, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
+   { 32368, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
+   { 32392, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
+   { 32420, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+   { 32453, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
+   { 32477, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
+   { 32499, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
+   { 32521, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
+   { 32547, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
+   { 32581, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+   { 32614, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
+   { 32651, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
+   { 32679, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
+   { 32711, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
+   { 32734, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+   { 32772, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
+   { 32814, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+   { 32845, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+   { 32873, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+   { 32903, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+   { 32931, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
+   { 32951, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
+   { 32975, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+   { 33006, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
+   { 33041, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+   { 33072, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
+   { 33107, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+   { 33138, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
+   { 33173, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+   { 33204, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
+   { 33239, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+   { 33270, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
+   { 33305, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+   { 33336, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
+   { 33371, 0x00008071 }, /* GL_TEXTURE_DEPTH */
+   { 33388, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
+   { 33410, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
+   { 33436, 0x00002300 }, /* GL_TEXTURE_ENV */
+   { 33451, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
+   { 33472, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
+   { 33492, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
+   { 33518, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
+   { 33538, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
+   { 33555, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
+   { 33572, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
+   { 33589, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
+   { 33606, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
+   { 33631, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
+   { 33653, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
+   { 33679, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
+   { 33697, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
+   { 33723, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
+   { 33749, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
+   { 33779, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
+   { 33806, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
+   { 33831, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
+   { 33851, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
+   { 33875, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+   { 33902, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+   { 33929, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+   { 33956, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
+   { 33982, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
+   { 34012, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
+   { 34034, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
+   { 34052, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+   { 34082, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+   { 34110, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+   { 34138, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+   { 34166, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
+   { 34187, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
+   { 34206, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
+   { 34228, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
+   { 34247, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
+   { 34267, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
+   { 34292, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
+   { 34316, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
+   { 34336, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
+   { 34360, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
+   { 34380, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
+   { 34403, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
+   { 34428, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+   { 34462, 0x00001000 }, /* GL_TEXTURE_WIDTH */
+   { 34479, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
+   { 34497, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
+   { 34515, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
+   { 34533, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
+   { 34553, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
+   { 34572, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+   { 34601, 0x00001000 }, /* GL_TRANSFORM_BIT */
+   { 34618, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
+   { 34644, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
+   { 34674, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+   { 34706, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+   { 34736, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
+   { 34770, 0x0000862C }, /* GL_TRANSPOSE_NV */
+   { 34786, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+   { 34817, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
+   { 34852, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+   { 34880, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
+   { 34912, 0x00000004 }, /* GL_TRIANGLES */
+   { 34925, 0x00000006 }, /* GL_TRIANGLE_FAN */
+   { 34941, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
+   { 34962, 0x00000005 }, /* GL_TRIANGLE_STRIP */
+   { 34980, 0x00000001 }, /* GL_TRUE */
+   { 34988, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
+   { 35008, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
+   { 35031, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
+   { 35051, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
+   { 35072, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
+   { 35094, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
+   { 35116, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
+   { 35136, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
+   { 35157, 0x00001401 }, /* GL_UNSIGNED_BYTE */
+   { 35174, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+   { 35201, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
+   { 35224, 0x00001405 }, /* GL_UNSIGNED_INT */
+   { 35240, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
+   { 35267, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
+   { 35291, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+   { 35322, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
+   { 35346, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+   { 35374, 0x00001403 }, /* GL_UNSIGNED_SHORT */
+   { 35392, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+   { 35422, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+   { 35448, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+   { 35478, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+   { 35504, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
+   { 35528, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+   { 35556, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+   { 35584, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
+   { 35611, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+   { 35643, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
+   { 35674, 0x00008CA2 }, /* GL_UPPER_LEFT */
+   { 35688, 0x00002A20 }, /* GL_V2F */
+   { 35695, 0x00002A21 }, /* GL_V3F */
+   { 35702, 0x00008B83 }, /* GL_VALIDATE_STATUS */
+   { 35721, 0x00001F00 }, /* GL_VENDOR */
+   { 35731, 0x00001F02 }, /* GL_VERSION */
+   { 35742, 0x00008074 }, /* GL_VERTEX_ARRAY */
+   { 35758, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
+   { 35788, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+   { 35819, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
+   { 35854, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
+   { 35878, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
+   { 35899, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
+   { 35922, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
+   { 35943, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+   { 35970, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+   { 35998, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+   { 36026, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+   { 36054, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+   { 36082, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+   { 36110, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+   { 36138, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+   { 36165, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+   { 36192, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+   { 36219, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+   { 36246, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+   { 36273, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+   { 36300, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+   { 36327, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+   { 36354, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+   { 36381, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+   { 36419, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
+   { 36461, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+   { 36492, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
+   { 36527, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+   { 36561, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
+   { 36599, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+   { 36630, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
+   { 36665, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+   { 36693, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
+   { 36725, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+   { 36755, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
+   { 36789, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+   { 36817, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
+   { 36849, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
+   { 36869, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
+   { 36891, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
+   { 36920, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
+   { 36941, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+   { 36970, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
+   { 37003, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
+   { 37035, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+   { 37062, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
+   { 37093, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
+   { 37123, 0x00008B31 }, /* GL_VERTEX_SHADER */
+   { 37140, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
+   { 37161, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
+   { 37188, 0x00000BA2 }, /* GL_VIEWPORT */
+   { 37200, 0x00000800 }, /* GL_VIEWPORT_BIT */
+   { 37216, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
+   { 37236, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+   { 37267, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
+   { 37302, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+   { 37330, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+   { 37355, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+   { 37382, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+   { 37407, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
+   { 37431, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
+   { 37450, 0x000088B9 }, /* GL_WRITE_ONLY */
+   { 37464, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
+   { 37482, 0x00001506 }, /* GL_XOR */
+   { 37489, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
+   { 37508, 0x00008757 }, /* GL_YCBCR_MESA */
+   { 37522, 0x00000000 }, /* GL_ZERO */
+   { 37530, 0x00000D16 }, /* GL_ZOOM_X */
+   { 37540, 0x00000D17 }, /* GL_ZOOM_Y */
+};
+
+static const unsigned reduced_enums[1284] =
+{
+       436, /* GL_FALSE */
+       645, /* GL_LINES */
+       647, /* GL_LINE_LOOP */
+       654, /* GL_LINE_STRIP */
+      1637, /* GL_TRIANGLES */
+      1640, /* GL_TRIANGLE_STRIP */
+      1638, /* GL_TRIANGLE_FAN */
+      1211, /* GL_QUADS */
+      1213, /* GL_QUAD_STRIP */
+      1099, /* GL_POLYGON */
+      1111, /* GL_POLYGON_STIPPLE_BIT */
+      1064, /* GL_PIXEL_MODE_BIT */
+       632, /* GL_LIGHTING_BIT */
+       458, /* GL_FOG_BIT */
+         8, /* GL_ACCUM */
+       664, /* GL_LOAD */
+      1253, /* GL_RETURN */
+       937, /* GL_MULT */
+        23, /* GL_ADD */
+       953, /* GL_NEVER */
+       622, /* GL_LESS */
+       426, /* GL_EQUAL */
+       621, /* GL_LEQUAL */
+       547, /* GL_GREATER */
+       968, /* GL_NOTEQUAL */
+       522, /* GL_GEQUAL */
+        46, /* GL_ALWAYS */
+      1386, /* GL_SRC_COLOR */
+       997, /* GL_ONE_MINUS_SRC_COLOR */
+      1384, /* GL_SRC_ALPHA */
+       996, /* GL_ONE_MINUS_SRC_ALPHA */
+       406, /* GL_DST_ALPHA */
+       994, /* GL_ONE_MINUS_DST_ALPHA */
+       407, /* GL_DST_COLOR */
+       995, /* GL_ONE_MINUS_DST_COLOR */
+      1385, /* GL_SRC_ALPHA_SATURATE */
+       510, /* GL_FRONT_LEFT */
+       511, /* GL_FRONT_RIGHT */
+        69, /* GL_BACK_LEFT */
+        70, /* GL_BACK_RIGHT */
+       507, /* GL_FRONT */
+        68, /* GL_BACK */
+       620, /* GL_LEFT */
+      1293, /* GL_RIGHT */
+       508, /* GL_FRONT_AND_BACK */
+        63, /* GL_AUX0 */
+        64, /* GL_AUX1 */
+        65, /* GL_AUX2 */
+        66, /* GL_AUX3 */
+       612, /* GL_INVALID_ENUM */
+       615, /* GL_INVALID_VALUE */
+       614, /* GL_INVALID_OPERATION */
+      1387, /* GL_STACK_OVERFLOW */
+      1388, /* GL_STACK_UNDERFLOW */
+      1022, /* GL_OUT_OF_MEMORY */
+       613, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
+         0, /* GL_2D */
+         2, /* GL_3D */
+         3, /* GL_3D_COLOR */
+         4, /* GL_3D_COLOR_TEXTURE */
+         6, /* GL_4D_COLOR_TEXTURE */
+      1042, /* GL_PASS_THROUGH_TOKEN */
+      1098, /* GL_POINT_TOKEN */
+       655, /* GL_LINE_TOKEN */
+      1112, /* GL_POLYGON_TOKEN */
+        74, /* GL_BITMAP_TOKEN */
+       405, /* GL_DRAW_PIXEL_TOKEN */
+       271, /* GL_COPY_PIXEL_TOKEN */
+       648, /* GL_LINE_RESET_TOKEN */
+       429, /* GL_EXP */
+       430, /* GL_EXP2 */
+       304, /* GL_CW */
+       116, /* GL_CCW */
+       137, /* GL_COEFF */
+      1019, /* GL_ORDER */
+       344, /* GL_DOMAIN */
+       279, /* GL_CURRENT_COLOR */
+       282, /* GL_CURRENT_INDEX */
+       288, /* GL_CURRENT_NORMAL */
+       300, /* GL_CURRENT_TEXTURE_COORDS */
+       293, /* GL_CURRENT_RASTER_COLOR */
+       295, /* GL_CURRENT_RASTER_INDEX */
+       298, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
+       296, /* GL_CURRENT_RASTER_POSITION */
+       297, /* GL_CURRENT_RASTER_POSITION_VALID */
+       294, /* GL_CURRENT_RASTER_DISTANCE */
+      1091, /* GL_POINT_SMOOTH */
+      1080, /* GL_POINT_SIZE */
+      1090, /* GL_POINT_SIZE_RANGE */
+      1081, /* GL_POINT_SIZE_GRANULARITY */
+       649, /* GL_LINE_SMOOTH */
+       656, /* GL_LINE_WIDTH */
+       658, /* GL_LINE_WIDTH_RANGE */
+       657, /* GL_LINE_WIDTH_GRANULARITY */
+       651, /* GL_LINE_STIPPLE */
+       652, /* GL_LINE_STIPPLE_PATTERN */
+       653, /* GL_LINE_STIPPLE_REPEAT */
+       663, /* GL_LIST_MODE */
+       822, /* GL_MAX_LIST_NESTING */
+       660, /* GL_LIST_BASE */
+       662, /* GL_LIST_INDEX */
+      1101, /* GL_POLYGON_MODE */
+      1108, /* GL_POLYGON_SMOOTH */
+      1110, /* GL_POLYGON_STIPPLE */
+       414, /* GL_EDGE_FLAG */
+       272, /* GL_CULL_FACE */
+       273, /* GL_CULL_FACE_MODE */
+       509, /* GL_FRONT_FACE */
+       631, /* GL_LIGHTING */
+       636, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+       637, /* GL_LIGHT_MODEL_TWO_SIDE */
+       633, /* GL_LIGHT_MODEL_AMBIENT */
+      1339, /* GL_SHADE_MODEL */
+       168, /* GL_COLOR_MATERIAL_FACE */
+       169, /* GL_COLOR_MATERIAL_PARAMETER */
+       167, /* GL_COLOR_MATERIAL */
+       457, /* GL_FOG */
+       479, /* GL_FOG_INDEX */
+       475, /* GL_FOG_DENSITY */
+       483, /* GL_FOG_START */
+       477, /* GL_FOG_END */
+       480, /* GL_FOG_MODE */
+       459, /* GL_FOG_COLOR */
+       333, /* GL_DEPTH_RANGE */
+       338, /* GL_DEPTH_TEST */
+       341, /* GL_DEPTH_WRITEMASK */
+       321, /* GL_DEPTH_CLEAR_VALUE */
+       332, /* GL_DEPTH_FUNC */
+        12, /* GL_ACCUM_CLEAR_VALUE */
+      1418, /* GL_STENCIL_TEST */
+      1406, /* GL_STENCIL_CLEAR_VALUE */
+      1408, /* GL_STENCIL_FUNC */
+      1420, /* GL_STENCIL_VALUE_MASK */
+      1407, /* GL_STENCIL_FAIL */
+      1415, /* GL_STENCIL_PASS_DEPTH_FAIL */
+      1416, /* GL_STENCIL_PASS_DEPTH_PASS */
+      1417, /* GL_STENCIL_REF */
+      1421, /* GL_STENCIL_WRITEMASK */
+       791, /* GL_MATRIX_MODE */
+       958, /* GL_NORMALIZE */
+      1727, /* GL_VIEWPORT */
+       932, /* GL_MODELVIEW_STACK_DEPTH */
+      1191, /* GL_PROJECTION_STACK_DEPTH */
+      1616, /* GL_TEXTURE_STACK_DEPTH */
+       930, /* GL_MODELVIEW_MATRIX */
+      1190, /* GL_PROJECTION_MATRIX */
+      1601, /* GL_TEXTURE_MATRIX */
+        61, /* GL_ATTRIB_STACK_DEPTH */
+       127, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
+        43, /* GL_ALPHA_TEST */
+        44, /* GL_ALPHA_TEST_FUNC */
+        45, /* GL_ALPHA_TEST_REF */
+       343, /* GL_DITHER */
+        78, /* GL_BLEND_DST */
+        86, /* GL_BLEND_SRC */
+        75, /* GL_BLEND */
+       666, /* GL_LOGIC_OP_MODE */
+       586, /* GL_INDEX_LOGIC_OP */
+       166, /* GL_COLOR_LOGIC_OP */
+        67, /* GL_AUX_BUFFERS */
+       354, /* GL_DRAW_BUFFER */
+      1223, /* GL_READ_BUFFER */
+      1320, /* GL_SCISSOR_BOX */
+      1321, /* GL_SCISSOR_TEST */
+       585, /* GL_INDEX_CLEAR_VALUE */
+       590, /* GL_INDEX_WRITEMASK */
+       163, /* GL_COLOR_CLEAR_VALUE */
+       205, /* GL_COLOR_WRITEMASK */
+       587, /* GL_INDEX_MODE */
+      1287, /* GL_RGBA_MODE */
+       353, /* GL_DOUBLEBUFFER */
+      1422, /* GL_STEREO */
+      1246, /* GL_RENDER_MODE */
+      1043, /* GL_PERSPECTIVE_CORRECTION_HINT */
+      1092, /* GL_POINT_SMOOTH_HINT */
+       650, /* GL_LINE_SMOOTH_HINT */
+      1109, /* GL_POLYGON_SMOOTH_HINT */
+       478, /* GL_FOG_HINT */
+      1582, /* GL_TEXTURE_GEN_S */
+      1583, /* GL_TEXTURE_GEN_T */
+      1581, /* GL_TEXTURE_GEN_R */
+      1580, /* GL_TEXTURE_GEN_Q */
+      1056, /* GL_PIXEL_MAP_I_TO_I */
+      1062, /* GL_PIXEL_MAP_S_TO_S */
+      1058, /* GL_PIXEL_MAP_I_TO_R */
+      1054, /* GL_PIXEL_MAP_I_TO_G */
+      1052, /* GL_PIXEL_MAP_I_TO_B */
+      1050, /* GL_PIXEL_MAP_I_TO_A */
+      1060, /* GL_PIXEL_MAP_R_TO_R */
+      1048, /* GL_PIXEL_MAP_G_TO_G */
+      1046, /* GL_PIXEL_MAP_B_TO_B */
+      1044, /* GL_PIXEL_MAP_A_TO_A */
+      1057, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+      1063, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+      1059, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+      1055, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+      1053, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+      1051, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+      1061, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+      1049, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+      1047, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+      1045, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+      1649, /* GL_UNPACK_SWAP_BYTES */
+      1644, /* GL_UNPACK_LSB_FIRST */
+      1645, /* GL_UNPACK_ROW_LENGTH */
+      1648, /* GL_UNPACK_SKIP_ROWS */
+      1647, /* GL_UNPACK_SKIP_PIXELS */
+      1642, /* GL_UNPACK_ALIGNMENT */
+      1031, /* GL_PACK_SWAP_BYTES */
+      1026, /* GL_PACK_LSB_FIRST */
+      1027, /* GL_PACK_ROW_LENGTH */
+      1030, /* GL_PACK_SKIP_ROWS */
+      1029, /* GL_PACK_SKIP_PIXELS */
+      1023, /* GL_PACK_ALIGNMENT */
+       744, /* GL_MAP_COLOR */
+       745, /* GL_MAP_STENCIL */
+       589, /* GL_INDEX_SHIFT */
+       588, /* GL_INDEX_OFFSET */
+      1235, /* GL_RED_SCALE */
+      1233, /* GL_RED_BIAS */
+      1744, /* GL_ZOOM_X */
+      1745, /* GL_ZOOM_Y */
+       551, /* GL_GREEN_SCALE */
+       549, /* GL_GREEN_BIAS */
+        92, /* GL_BLUE_SCALE */
+        90, /* GL_BLUE_BIAS */
+        42, /* GL_ALPHA_SCALE */
+        40, /* GL_ALPHA_BIAS */
+       334, /* GL_DEPTH_SCALE */
+       315, /* GL_DEPTH_BIAS */
+       817, /* GL_MAX_EVAL_ORDER */
+       821, /* GL_MAX_LIGHTS */
+       800, /* GL_MAX_CLIP_PLANES */
+       865, /* GL_MAX_TEXTURE_SIZE */
+       827, /* GL_MAX_PIXEL_MAP_TABLE */
+       796, /* GL_MAX_ATTRIB_STACK_DEPTH */
+       824, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+       825, /* GL_MAX_NAME_STACK_DEPTH */
+       853, /* GL_MAX_PROJECTION_STACK_DEPTH */
+       866, /* GL_MAX_TEXTURE_STACK_DEPTH */
+       880, /* GL_MAX_VIEWPORT_DIMS */
+       797, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+      1429, /* GL_SUBPIXEL_BITS */
+       584, /* GL_INDEX_BITS */
+      1234, /* GL_RED_BITS */
+       550, /* GL_GREEN_BITS */
+        91, /* GL_BLUE_BITS */
+        41, /* GL_ALPHA_BITS */
+       316, /* GL_DEPTH_BITS */
+      1404, /* GL_STENCIL_BITS */
+        14, /* GL_ACCUM_RED_BITS */
+        13, /* GL_ACCUM_GREEN_BITS */
+        10, /* GL_ACCUM_BLUE_BITS */
+         9, /* GL_ACCUM_ALPHA_BITS */
+       946, /* GL_NAME_STACK_DEPTH */
+        62, /* GL_AUTO_NORMAL */
+       690, /* GL_MAP1_COLOR_4 */
+       693, /* GL_MAP1_INDEX */
+       694, /* GL_MAP1_NORMAL */
+       695, /* GL_MAP1_TEXTURE_COORD_1 */
+       696, /* GL_MAP1_TEXTURE_COORD_2 */
+       697, /* GL_MAP1_TEXTURE_COORD_3 */
+       698, /* GL_MAP1_TEXTURE_COORD_4 */
+       699, /* GL_MAP1_VERTEX_3 */
+       700, /* GL_MAP1_VERTEX_4 */
+       717, /* GL_MAP2_COLOR_4 */
+       720, /* GL_MAP2_INDEX */
+       721, /* GL_MAP2_NORMAL */
+       722, /* GL_MAP2_TEXTURE_COORD_1 */
+       723, /* GL_MAP2_TEXTURE_COORD_2 */
+       724, /* GL_MAP2_TEXTURE_COORD_3 */
+       725, /* GL_MAP2_TEXTURE_COORD_4 */
+       726, /* GL_MAP2_VERTEX_3 */
+       727, /* GL_MAP2_VERTEX_4 */
+       691, /* GL_MAP1_GRID_DOMAIN */
+       692, /* GL_MAP1_GRID_SEGMENTS */
+       718, /* GL_MAP2_GRID_DOMAIN */
+       719, /* GL_MAP2_GRID_SEGMENTS */
+      1506, /* GL_TEXTURE_1D */
+      1508, /* GL_TEXTURE_2D */
+       439, /* GL_FEEDBACK_BUFFER_POINTER */
+       440, /* GL_FEEDBACK_BUFFER_SIZE */
+       441, /* GL_FEEDBACK_BUFFER_TYPE */
+      1330, /* GL_SELECTION_BUFFER_POINTER */
+      1331, /* GL_SELECTION_BUFFER_SIZE */
+      1619, /* GL_TEXTURE_WIDTH */
+      1587, /* GL_TEXTURE_HEIGHT */
+      1543, /* GL_TEXTURE_COMPONENTS */
+      1527, /* GL_TEXTURE_BORDER_COLOR */
+      1526, /* GL_TEXTURE_BORDER */
+       345, /* GL_DONT_CARE */
+       437, /* GL_FASTEST */
+       954, /* GL_NICEST */
+        47, /* GL_AMBIENT */
+       342, /* GL_DIFFUSE */
+      1373, /* GL_SPECULAR */
+      1113, /* GL_POSITION */
+      1376, /* GL_SPOT_DIRECTION */
+      1377, /* GL_SPOT_EXPONENT */
+      1375, /* GL_SPOT_CUTOFF */
+       245, /* GL_CONSTANT_ATTENUATION */
+       640, /* GL_LINEAR_ATTENUATION */
+      1210, /* GL_QUADRATIC_ATTENUATION */
+       219, /* GL_COMPILE */
+       220, /* GL_COMPILE_AND_EXECUTE */
+       111, /* GL_BYTE */
+      1650, /* GL_UNSIGNED_BYTE */
+      1344, /* GL_SHORT */
+      1659, /* GL_UNSIGNED_SHORT */
+       592, /* GL_INT */
+      1653, /* GL_UNSIGNED_INT */
+       444, /* GL_FLOAT */
+         1, /* GL_2_BYTES */
+         5, /* GL_3_BYTES */
+         7, /* GL_4_BYTES */
+       352, /* GL_DOUBLE */
+       123, /* GL_CLEAR */
+        49, /* GL_AND */
+        51, /* GL_AND_REVERSE */
+       269, /* GL_COPY */
+        50, /* GL_AND_INVERTED */
+       956, /* GL_NOOP */
+      1740, /* GL_XOR */
+      1018, /* GL_OR */
+       957, /* GL_NOR */
+       427, /* GL_EQUIV */
+       618, /* GL_INVERT */
+      1021, /* GL_OR_REVERSE */
+       270, /* GL_COPY_INVERTED */
+      1020, /* GL_OR_INVERTED */
+       947, /* GL_NAND */
+      1335, /* GL_SET */
+       424, /* GL_EMISSION */
+      1343, /* GL_SHININESS */
+        48, /* GL_AMBIENT_AND_DIFFUSE */
+       165, /* GL_COLOR_INDEXES */
+       897, /* GL_MODELVIEW */
+      1189, /* GL_PROJECTION */
+      1441, /* GL_TEXTURE */
+       138, /* GL_COLOR */
+       313, /* GL_DEPTH */
+      1395, /* GL_STENCIL */
+       164, /* GL_COLOR_INDEX */
+      1409, /* GL_STENCIL_INDEX */
+       322, /* GL_DEPTH_COMPONENT */
+      1230, /* GL_RED */
+       548, /* GL_GREEN */
+        89, /* GL_BLUE */
+        31, /* GL_ALPHA */
+      1254, /* GL_RGB */
+      1273, /* GL_RGBA */
+       668, /* GL_LUMINANCE */
+       689, /* GL_LUMINANCE_ALPHA */
+        73, /* GL_BITMAP */
+      1069, /* GL_POINT */
+       638, /* GL_LINE */
+       442, /* GL_FILL */
+      1239, /* GL_RENDER */
+       438, /* GL_FEEDBACK */
+      1329, /* GL_SELECT */
+       443, /* GL_FLAT */
+      1348, /* GL_SMOOTH */
+       619, /* GL_KEEP */
+      1248, /* GL_REPLACE */
+       575, /* GL_INCR */
+       309, /* GL_DECR */
+      1674, /* GL_VENDOR */
+      1245, /* GL_RENDERER */
+      1675, /* GL_VERSION */
+       431, /* GL_EXTENSIONS */
+      1294, /* GL_S */
+      1432, /* GL_T */
+      1220, /* GL_R */
+      1209, /* GL_Q */
+       933, /* GL_MODULATE */
+       308, /* GL_DECAL */
+      1577, /* GL_TEXTURE_ENV_MODE */
+      1576, /* GL_TEXTURE_ENV_COLOR */
+      1575, /* GL_TEXTURE_ENV */
+       432, /* GL_EYE_LINEAR */
+       980, /* GL_OBJECT_LINEAR */
+      1374, /* GL_SPHERE_MAP */
+      1579, /* GL_TEXTURE_GEN_MODE */
+       982, /* GL_OBJECT_PLANE */
+       433, /* GL_EYE_PLANE */
+       948, /* GL_NEAREST */
+       639, /* GL_LINEAR */
+       952, /* GL_NEAREST_MIPMAP_NEAREST */
+       644, /* GL_LINEAR_MIPMAP_NEAREST */
+       951, /* GL_NEAREST_MIPMAP_LINEAR */
+       643, /* GL_LINEAR_MIPMAP_LINEAR */
+      1600, /* GL_TEXTURE_MAG_FILTER */
+      1608, /* GL_TEXTURE_MIN_FILTER */
+      1621, /* GL_TEXTURE_WRAP_S */
+      1622, /* GL_TEXTURE_WRAP_T */
+       117, /* GL_CLAMP */
+      1247, /* GL_REPEAT */
+      1107, /* GL_POLYGON_OFFSET_UNITS */
+      1106, /* GL_POLYGON_OFFSET_POINT */
+      1105, /* GL_POLYGON_OFFSET_LINE */
+      1221, /* GL_R3_G3_B2 */
+      1671, /* GL_V2F */
+      1672, /* GL_V3F */
+       114, /* GL_C4UB_V2F */
+       115, /* GL_C4UB_V3F */
+       112, /* GL_C3F_V3F */
+       945, /* GL_N3F_V3F */
+       113, /* GL_C4F_N3F_V3F */
+      1437, /* GL_T2F_V3F */
+      1439, /* GL_T4F_V4F */
+      1435, /* GL_T2F_C4UB_V3F */
+      1433, /* GL_T2F_C3F_V3F */
+      1436, /* GL_T2F_N3F_V3F */
+      1434, /* GL_T2F_C4F_N3F_V3F */
+      1438, /* GL_T4F_C4F_N3F_V4F */
+       130, /* GL_CLIP_PLANE0 */
+       131, /* GL_CLIP_PLANE1 */
+       132, /* GL_CLIP_PLANE2 */
+       133, /* GL_CLIP_PLANE3 */
+       134, /* GL_CLIP_PLANE4 */
+       135, /* GL_CLIP_PLANE5 */
+       623, /* GL_LIGHT0 */
+       624, /* GL_LIGHT1 */
+       625, /* GL_LIGHT2 */
+       626, /* GL_LIGHT3 */
+       627, /* GL_LIGHT4 */
+       628, /* GL_LIGHT5 */
+       629, /* GL_LIGHT6 */
+       630, /* GL_LIGHT7 */
+       552, /* GL_HINT_BIT */
+       247, /* GL_CONSTANT_COLOR */
+       992, /* GL_ONE_MINUS_CONSTANT_COLOR */
+       242, /* GL_CONSTANT_ALPHA */
+       990, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+        76, /* GL_BLEND_COLOR */
+       512, /* GL_FUNC_ADD */
+       881, /* GL_MIN */
+       793, /* GL_MAX */
+        81, /* GL_BLEND_EQUATION */
+       516, /* GL_FUNC_SUBTRACT */
+       514, /* GL_FUNC_REVERSE_SUBTRACT */
+       250, /* GL_CONVOLUTION_1D */
+       251, /* GL_CONVOLUTION_2D */
+      1332, /* GL_SEPARABLE_2D */
+       254, /* GL_CONVOLUTION_BORDER_MODE */
+       258, /* GL_CONVOLUTION_FILTER_SCALE */
+       256, /* GL_CONVOLUTION_FILTER_BIAS */
+      1231, /* GL_REDUCE */
+       260, /* GL_CONVOLUTION_FORMAT */
+       264, /* GL_CONVOLUTION_WIDTH */
+       262, /* GL_CONVOLUTION_HEIGHT */
+       808, /* GL_MAX_CONVOLUTION_WIDTH */
+       806, /* GL_MAX_CONVOLUTION_HEIGHT */
+      1146, /* GL_POST_CONVOLUTION_RED_SCALE */
+      1142, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+      1137, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+      1133, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+      1144, /* GL_POST_CONVOLUTION_RED_BIAS */
+      1140, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+      1135, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+      1131, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+       553, /* GL_HISTOGRAM */
+      1193, /* GL_PROXY_HISTOGRAM */
+       569, /* GL_HISTOGRAM_WIDTH */
+       559, /* GL_HISTOGRAM_FORMAT */
+       565, /* GL_HISTOGRAM_RED_SIZE */
+       561, /* GL_HISTOGRAM_GREEN_SIZE */
+       556, /* GL_HISTOGRAM_BLUE_SIZE */
+       554, /* GL_HISTOGRAM_ALPHA_SIZE */
+       563, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+       567, /* GL_HISTOGRAM_SINK */
+       882, /* GL_MINMAX */
+       884, /* GL_MINMAX_FORMAT */
+       886, /* GL_MINMAX_SINK */
+      1440, /* GL_TABLE_TOO_LARGE_EXT */
+      1652, /* GL_UNSIGNED_BYTE_3_3_2 */
+      1661, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+      1663, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+      1657, /* GL_UNSIGNED_INT_8_8_8_8 */
+      1654, /* GL_UNSIGNED_INT_10_10_10_2 */
+      1104, /* GL_POLYGON_OFFSET_FILL */
+      1103, /* GL_POLYGON_OFFSET_FACTOR */
+      1102, /* GL_POLYGON_OFFSET_BIAS */
+      1251, /* GL_RESCALE_NORMAL */
+        36, /* GL_ALPHA4 */
+        38, /* GL_ALPHA8 */
+        32, /* GL_ALPHA12 */
+        34, /* GL_ALPHA16 */
+       679, /* GL_LUMINANCE4 */
+       685, /* GL_LUMINANCE8 */
+       669, /* GL_LUMINANCE12 */
+       675, /* GL_LUMINANCE16 */
+       680, /* GL_LUMINANCE4_ALPHA4 */
+       683, /* GL_LUMINANCE6_ALPHA2 */
+       686, /* GL_LUMINANCE8_ALPHA8 */
+       672, /* GL_LUMINANCE12_ALPHA4 */
+       670, /* GL_LUMINANCE12_ALPHA12 */
+       676, /* GL_LUMINANCE16_ALPHA16 */
+       593, /* GL_INTENSITY */
+       598, /* GL_INTENSITY4 */
+       600, /* GL_INTENSITY8 */
+       594, /* GL_INTENSITY12 */
+       596, /* GL_INTENSITY16 */
+      1263, /* GL_RGB2_EXT */
+      1264, /* GL_RGB4 */
+      1267, /* GL_RGB5 */
+      1271, /* GL_RGB8 */
+      1255, /* GL_RGB10 */
+      1259, /* GL_RGB12 */
+      1261, /* GL_RGB16 */
+      1278, /* GL_RGBA2 */
+      1280, /* GL_RGBA4 */
+      1268, /* GL_RGB5_A1 */
+      1284, /* GL_RGBA8 */
+      1256, /* GL_RGB10_A2 */
+      1274, /* GL_RGBA12 */
+      1276, /* GL_RGBA16 */
+      1613, /* GL_TEXTURE_RED_SIZE */
+      1585, /* GL_TEXTURE_GREEN_SIZE */
+      1524, /* GL_TEXTURE_BLUE_SIZE */
+      1511, /* GL_TEXTURE_ALPHA_SIZE */
+      1598, /* GL_TEXTURE_LUMINANCE_SIZE */
+      1589, /* GL_TEXTURE_INTENSITY_SIZE */
+      1249, /* GL_REPLACE_EXT */
+      1197, /* GL_PROXY_TEXTURE_1D */
+      1200, /* GL_PROXY_TEXTURE_2D */
+      1617, /* GL_TEXTURE_TOO_LARGE_EXT */
+      1610, /* GL_TEXTURE_PRIORITY */
+      1615, /* GL_TEXTURE_RESIDENT */
+      1514, /* GL_TEXTURE_BINDING_1D */
+      1516, /* GL_TEXTURE_BINDING_2D */
+      1518, /* GL_TEXTURE_BINDING_3D */
+      1028, /* GL_PACK_SKIP_IMAGES */
+      1024, /* GL_PACK_IMAGE_HEIGHT */
+      1646, /* GL_UNPACK_SKIP_IMAGES */
+      1643, /* GL_UNPACK_IMAGE_HEIGHT */
+      1510, /* GL_TEXTURE_3D */
+      1203, /* GL_PROXY_TEXTURE_3D */
+      1572, /* GL_TEXTURE_DEPTH */
+      1620, /* GL_TEXTURE_WRAP_R */
+       794, /* GL_MAX_3D_TEXTURE_SIZE */
+      1676, /* GL_VERTEX_ARRAY */
+       959, /* GL_NORMAL_ARRAY */
+       139, /* GL_COLOR_ARRAY */
+       578, /* GL_INDEX_ARRAY */
+      1551, /* GL_TEXTURE_COORD_ARRAY */
+       415, /* GL_EDGE_FLAG_ARRAY */
+      1681, /* GL_VERTEX_ARRAY_SIZE */
+      1683, /* GL_VERTEX_ARRAY_TYPE */
+      1682, /* GL_VERTEX_ARRAY_STRIDE */
+       964, /* GL_NORMAL_ARRAY_TYPE */
+       963, /* GL_NORMAL_ARRAY_STRIDE */
+       143, /* GL_COLOR_ARRAY_SIZE */
+       145, /* GL_COLOR_ARRAY_TYPE */
+       144, /* GL_COLOR_ARRAY_STRIDE */
+       583, /* GL_INDEX_ARRAY_TYPE */
+       582, /* GL_INDEX_ARRAY_STRIDE */
+      1555, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+      1557, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+      1556, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+       419, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+      1680, /* GL_VERTEX_ARRAY_POINTER */
+       962, /* GL_NORMAL_ARRAY_POINTER */
+       142, /* GL_COLOR_ARRAY_POINTER */
+       581, /* GL_INDEX_ARRAY_POINTER */
+      1554, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+       418, /* GL_EDGE_FLAG_ARRAY_POINTER */
+       938, /* GL_MULTISAMPLE */
+      1306, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+      1308, /* GL_SAMPLE_ALPHA_TO_ONE */
+      1313, /* GL_SAMPLE_COVERAGE */
+      1310, /* GL_SAMPLE_BUFFERS */
+      1301, /* GL_SAMPLES */
+      1317, /* GL_SAMPLE_COVERAGE_VALUE */
+      1315, /* GL_SAMPLE_COVERAGE_INVERT */
+       170, /* GL_COLOR_MATRIX */
+       172, /* GL_COLOR_MATRIX_STACK_DEPTH */
+       802, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+      1129, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+      1125, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+      1120, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+      1116, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+      1127, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+      1123, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+      1118, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+      1114, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+      1534, /* GL_TEXTURE_COLOR_TABLE_SGI */
+      1204, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+      1536, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+        80, /* GL_BLEND_DST_RGB */
+        88, /* GL_BLEND_SRC_RGB */
+        79, /* GL_BLEND_DST_ALPHA */
+        87, /* GL_BLEND_SRC_ALPHA */
+       176, /* GL_COLOR_TABLE */
+      1139, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+      1122, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+      1192, /* GL_PROXY_COLOR_TABLE */
+      1196, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+      1195, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+       200, /* GL_COLOR_TABLE_SCALE */
+       180, /* GL_COLOR_TABLE_BIAS */
+       185, /* GL_COLOR_TABLE_FORMAT */
+       202, /* GL_COLOR_TABLE_WIDTH */
+       197, /* GL_COLOR_TABLE_RED_SIZE */
+       188, /* GL_COLOR_TABLE_GREEN_SIZE */
+       182, /* GL_COLOR_TABLE_BLUE_SIZE */
+       177, /* GL_COLOR_TABLE_ALPHA_SIZE */
+       194, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
+       191, /* GL_COLOR_TABLE_INTENSITY_SIZE */
+        71, /* GL_BGR */
+        72, /* GL_BGRA */
+       816, /* GL_MAX_ELEMENTS_VERTICES */
+       815, /* GL_MAX_ELEMENTS_INDICES */
+      1588, /* GL_TEXTURE_INDEX_SIZE_EXT */
+       136, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
+      1086, /* GL_POINT_SIZE_MIN */
+      1082, /* GL_POINT_SIZE_MAX */
+      1076, /* GL_POINT_FADE_THRESHOLD_SIZE */
+      1072, /* GL_POINT_DISTANCE_ATTENUATION */
+       118, /* GL_CLAMP_TO_BORDER */
+       121, /* GL_CLAMP_TO_EDGE */
+      1609, /* GL_TEXTURE_MIN_LOD */
+      1607, /* GL_TEXTURE_MAX_LOD */
+      1513, /* GL_TEXTURE_BASE_LEVEL */
+      1606, /* GL_TEXTURE_MAX_LEVEL */
+       572, /* GL_IGNORE_BORDER_HP */
+       246, /* GL_CONSTANT_BORDER_HP */
+      1250, /* GL_REPLICATE_BORDER_HP */
+       252, /* GL_CONVOLUTION_BORDER_COLOR */
+       987, /* GL_OCCLUSION_TEST_HP */
+       988, /* GL_OCCLUSION_TEST_RESULT_HP */
+       641, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+      1528, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+      1530, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+      1532, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+      1533, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+      1531, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+      1529, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+       798, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+       799, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+      1149, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+      1151, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+      1148, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+      1150, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+      1596, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+      1597, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+      1595, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+       518, /* GL_GENERATE_MIPMAP */
+       519, /* GL_GENERATE_MIPMAP_HINT */
+       481, /* GL_FOG_OFFSET_SGIX */
+       482, /* GL_FOG_OFFSET_VALUE_SGIX */
+      1542, /* GL_TEXTURE_COMPARE_SGIX */
+      1541, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+      1592, /* GL_TEXTURE_LEQUAL_R_SGIX */
+      1584, /* GL_TEXTURE_GEQUAL_R_SGIX */
+       323, /* GL_DEPTH_COMPONENT16 */
+       326, /* GL_DEPTH_COMPONENT24 */
+       329, /* GL_DEPTH_COMPONENT32 */
+       274, /* GL_CULL_VERTEX_EXT */
+       276, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
+       275, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
+      1737, /* GL_WRAP_BORDER_SUN */
+      1535, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+       634, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+      1345, /* GL_SINGLE_COLOR */
+      1333, /* GL_SEPARATE_SPECULAR_COLOR */
+      1342, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+      1651, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+      1664, /* GL_UNSIGNED_SHORT_5_6_5 */
+      1665, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+      1662, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+      1660, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+      1658, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+      1656, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+      1604, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+      1605, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+      1603, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+       889, /* GL_MIRRORED_REPEAT */
+      1289, /* GL_RGB_S3TC */
+      1266, /* GL_RGB4_S3TC */
+      1288, /* GL_RGBA_S3TC */
+      1283, /* GL_RGBA4_S3TC */
+      1286, /* GL_RGBA_DXT5_S3TC */
+      1281, /* GL_RGBA4_DXT5_S3TC */
+       239, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
+       234, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
+       235, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
+       236, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
+       950, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+       949, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+       642, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+       468, /* GL_FOG_COORDINATE_SOURCE */
+       460, /* GL_FOG_COORD */
+       484, /* GL_FRAGMENT_DEPTH */
+       280, /* GL_CURRENT_FOG_COORD */
+       467, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+       466, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+       465, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+       462, /* GL_FOG_COORDINATE_ARRAY */
+       174, /* GL_COLOR_SUM */
+       299, /* GL_CURRENT_SECONDARY_COLOR */
+      1326, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+      1328, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+      1327, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+      1325, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+      1322, /* GL_SECONDARY_COLOR_ARRAY */
+       528, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
+        28, /* GL_ALIASED_POINT_SIZE_RANGE */
+        27, /* GL_ALIASED_LINE_WIDTH_RANGE */
+      1442, /* GL_TEXTURE0 */
+      1444, /* GL_TEXTURE1 */
+      1466, /* GL_TEXTURE2 */
+      1488, /* GL_TEXTURE3 */
+      1494, /* GL_TEXTURE4 */
+      1496, /* GL_TEXTURE5 */
+      1498, /* GL_TEXTURE6 */
+      1500, /* GL_TEXTURE7 */
+      1502, /* GL_TEXTURE8 */
+      1504, /* GL_TEXTURE9 */
+      1445, /* GL_TEXTURE10 */
+      1447, /* GL_TEXTURE11 */
+      1449, /* GL_TEXTURE12 */
+      1451, /* GL_TEXTURE13 */
+      1453, /* GL_TEXTURE14 */
+      1455, /* GL_TEXTURE15 */
+      1457, /* GL_TEXTURE16 */
+      1459, /* GL_TEXTURE17 */
+      1461, /* GL_TEXTURE18 */
+      1463, /* GL_TEXTURE19 */
+      1467, /* GL_TEXTURE20 */
+      1469, /* GL_TEXTURE21 */
+      1471, /* GL_TEXTURE22 */
+      1473, /* GL_TEXTURE23 */
+      1475, /* GL_TEXTURE24 */
+      1477, /* GL_TEXTURE25 */
+      1479, /* GL_TEXTURE26 */
+      1481, /* GL_TEXTURE27 */
+      1483, /* GL_TEXTURE28 */
+      1485, /* GL_TEXTURE29 */
+      1489, /* GL_TEXTURE30 */
+      1491, /* GL_TEXTURE31 */
+        18, /* GL_ACTIVE_TEXTURE */
+       124, /* GL_CLIENT_ACTIVE_TEXTURE */
+       867, /* GL_MAX_TEXTURE_UNITS */
+      1630, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+      1633, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+      1635, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+      1627, /* GL_TRANSPOSE_COLOR_MATRIX */
+      1430, /* GL_SUBTRACT */
+       856, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
+       222, /* GL_COMPRESSED_ALPHA */
+       226, /* GL_COMPRESSED_LUMINANCE */
+       227, /* GL_COMPRESSED_LUMINANCE_ALPHA */
+       224, /* GL_COMPRESSED_INTENSITY */
+       230, /* GL_COMPRESSED_RGB */
+       231, /* GL_COMPRESSED_RGBA */
+      1549, /* GL_TEXTURE_COMPRESSION_HINT */
+      1611, /* GL_TEXTURE_RECTANGLE_ARB */
+      1521, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+      1207, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+       854, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+       335, /* GL_DEPTH_STENCIL_NV */
+      1655, /* GL_UNSIGNED_INT_24_8_NV */
+       863, /* GL_MAX_TEXTURE_LOD_BIAS */
+      1602, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+       864, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+      1578, /* GL_TEXTURE_FILTER_CONTROL */
+      1593, /* GL_TEXTURE_LOD_BIAS */
+       207, /* GL_COMBINE4 */
+       857, /* GL_MAX_SHININESS_NV */
+       858, /* GL_MAX_SPOT_EXPONENT_NV */
+       576, /* GL_INCR_WRAP */
+       310, /* GL_DECR_WRAP */
+       909, /* GL_MODELVIEW1_ARB */
+       965, /* GL_NORMAL_MAP */
+      1236, /* GL_REFLECTION_MAP */
+      1558, /* GL_TEXTURE_CUBE_MAP */
+      1519, /* GL_TEXTURE_BINDING_CUBE_MAP */
+      1566, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+      1560, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+      1568, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+      1562, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+      1570, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+      1564, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+      1205, /* GL_PROXY_TEXTURE_CUBE_MAP */
+       810, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+       944, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+       476, /* GL_FOG_DISTANCE_MODE_NV */
+       435, /* GL_EYE_RADIAL_NV */
+       434, /* GL_EYE_PLANE_ABSOLUTE_NV */
+       206, /* GL_COMBINE */
+       213, /* GL_COMBINE_RGB */
+       208, /* GL_COMBINE_ALPHA */
+      1290, /* GL_RGB_SCALE */
+        24, /* GL_ADD_SIGNED */
+       603, /* GL_INTERPOLATE */
+       241, /* GL_CONSTANT */
+      1155, /* GL_PRIMARY_COLOR */
+      1152, /* GL_PREVIOUS */
+      1356, /* GL_SOURCE0_RGB */
+      1362, /* GL_SOURCE1_RGB */
+      1368, /* GL_SOURCE2_RGB */
+      1372, /* GL_SOURCE3_RGB_NV */
+      1353, /* GL_SOURCE0_ALPHA */
+      1359, /* GL_SOURCE1_ALPHA */
+      1365, /* GL_SOURCE2_ALPHA */
+      1371, /* GL_SOURCE3_ALPHA_NV */
+      1001, /* GL_OPERAND0_RGB */
+      1007, /* GL_OPERAND1_RGB */
+      1013, /* GL_OPERAND2_RGB */
+      1017, /* GL_OPERAND3_RGB_NV */
+       998, /* GL_OPERAND0_ALPHA */
+      1004, /* GL_OPERAND1_ALPHA */
+      1010, /* GL_OPERAND2_ALPHA */
+      1016, /* GL_OPERAND3_ALPHA_NV */
+      1677, /* GL_VERTEX_ARRAY_BINDING_APPLE */
+      1741, /* GL_YCBCR_422_APPLE */
+      1666, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+      1668, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+      1347, /* GL_SLICE_ACCUM_SUN */
+      1212, /* GL_QUAD_MESH_SUN */
+      1639, /* GL_TRIANGLE_MESH_SUN */
+      1715, /* GL_VERTEX_PROGRAM_ARB */
+      1726, /* GL_VERTEX_STATE_PROGRAM_NV */
+      1702, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+      1708, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+      1710, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+      1712, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+       301, /* GL_CURRENT_VERTEX_ATTRIB */
+      1168, /* GL_PROGRAM_LENGTH_ARB */
+      1182, /* GL_PROGRAM_STRING_ARB */
+       931, /* GL_MODELVIEW_PROJECTION_NV */
+       571, /* GL_IDENTITY_NV */
+       616, /* GL_INVERSE_NV */
+      1632, /* GL_TRANSPOSE_NV */
+       617, /* GL_INVERSE_TRANSPOSE_NV */
+       840, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+       839, /* GL_MAX_PROGRAM_MATRICES_ARB */
+       747, /* GL_MATRIX0_NV */
+       759, /* GL_MATRIX1_NV */
+       771, /* GL_MATRIX2_NV */
+       775, /* GL_MATRIX3_NV */
+       777, /* GL_MATRIX4_NV */
+       779, /* GL_MATRIX5_NV */
+       781, /* GL_MATRIX6_NV */
+       783, /* GL_MATRIX7_NV */
+       286, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
+       283, /* GL_CURRENT_MATRIX_ARB */
+      1718, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+      1721, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+      1180, /* GL_PROGRAM_PARAMETER_NV */
+      1706, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+      1184, /* GL_PROGRAM_TARGET_NV */
+      1181, /* GL_PROGRAM_RESIDENT_NV */
+      1624, /* GL_TRACK_MATRIX_NV */
+      1625, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+      1716, /* GL_VERTEX_PROGRAM_BINDING_NV */
+      1162, /* GL_PROGRAM_ERROR_POSITION_ARB */
+       320, /* GL_DEPTH_CLAMP_NV */
+      1684, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+      1691, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+      1692, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+      1693, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+      1694, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+      1695, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+      1696, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+      1697, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+      1698, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+      1699, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+      1685, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+      1686, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+      1687, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+      1688, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+      1689, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+      1690, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+       701, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+       708, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+       709, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+       710, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+       711, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+       712, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+       713, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+       714, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+       715, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+       716, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+       702, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+       703, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+       704, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+       705, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+       706, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+       707, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+       728, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+       735, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+       736, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+       737, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+       738, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+       739, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+       740, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+      1161, /* GL_PROGRAM_BINDING_ARB */
+       742, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+       743, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+       729, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+       730, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+       731, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+       732, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+       733, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+       734, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+      1547, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+      1544, /* GL_TEXTURE_COMPRESSED */
+       970, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+       240, /* GL_COMPRESSED_TEXTURE_FORMATS */
+       879, /* GL_MAX_VERTEX_UNITS_ARB */
+        22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
+      1736, /* GL_WEIGHT_SUM_UNITY_ARB */
+      1714, /* GL_VERTEX_BLEND_ARB */
+       303, /* GL_CURRENT_WEIGHT_ARB */
+      1735, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+      1734, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+      1733, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+      1732, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+      1729, /* GL_WEIGHT_ARRAY_ARB */
+       346, /* GL_DOT3_RGB */
+       347, /* GL_DOT3_RGBA */
+       238, /* GL_COMPRESSED_RGB_FXT1_3DFX */
+       233, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
+       939, /* GL_MULTISAMPLE_3DFX */
+      1311, /* GL_SAMPLE_BUFFERS_3DFX */
+      1302, /* GL_SAMPLES_3DFX */
+       920, /* GL_MODELVIEW2_ARB */
+       923, /* GL_MODELVIEW3_ARB */
+       924, /* GL_MODELVIEW4_ARB */
+       925, /* GL_MODELVIEW5_ARB */
+       926, /* GL_MODELVIEW6_ARB */
+       927, /* GL_MODELVIEW7_ARB */
+       928, /* GL_MODELVIEW8_ARB */
+       929, /* GL_MODELVIEW9_ARB */
+       899, /* GL_MODELVIEW10_ARB */
+       900, /* GL_MODELVIEW11_ARB */
+       901, /* GL_MODELVIEW12_ARB */
+       902, /* GL_MODELVIEW13_ARB */
+       903, /* GL_MODELVIEW14_ARB */
+       904, /* GL_MODELVIEW15_ARB */
+       905, /* GL_MODELVIEW16_ARB */
+       906, /* GL_MODELVIEW17_ARB */
+       907, /* GL_MODELVIEW18_ARB */
+       908, /* GL_MODELVIEW19_ARB */
+       910, /* GL_MODELVIEW20_ARB */
+       911, /* GL_MODELVIEW21_ARB */
+       912, /* GL_MODELVIEW22_ARB */
+       913, /* GL_MODELVIEW23_ARB */
+       914, /* GL_MODELVIEW24_ARB */
+       915, /* GL_MODELVIEW25_ARB */
+       916, /* GL_MODELVIEW26_ARB */
+       917, /* GL_MODELVIEW27_ARB */
+       918, /* GL_MODELVIEW28_ARB */
+       919, /* GL_MODELVIEW29_ARB */
+       921, /* GL_MODELVIEW30_ARB */
+       922, /* GL_MODELVIEW31_ARB */
+       351, /* GL_DOT3_RGB_EXT */
+       349, /* GL_DOT3_RGBA_EXT */
+       893, /* GL_MIRROR_CLAMP_EXT */
+       896, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+       934, /* GL_MODULATE_ADD_ATI */
+       935, /* GL_MODULATE_SIGNED_ADD_ATI */
+       936, /* GL_MODULATE_SUBTRACT_ATI */
+      1742, /* GL_YCBCR_MESA */
+      1025, /* GL_PACK_INVERT_MESA */
+       306, /* GL_DEBUG_OBJECT_MESA */
+       307, /* GL_DEBUG_PRINT_MESA */
+       305, /* GL_DEBUG_ASSERT_MESA */
+       107, /* GL_BUFFER_SIZE */
+       109, /* GL_BUFFER_USAGE */
+      1398, /* GL_STENCIL_BACK_FUNC */
+      1397, /* GL_STENCIL_BACK_FAIL */
+      1399, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+      1400, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+       485, /* GL_FRAGMENT_PROGRAM_ARB */
+      1159, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+      1187, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+      1186, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+      1171, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+      1177, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+      1176, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+       829, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+       852, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+       851, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+       842, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+       848, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+       847, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+       812, /* GL_MAX_DRAW_BUFFERS */
+       355, /* GL_DRAW_BUFFER0 */
+       358, /* GL_DRAW_BUFFER1 */
+       379, /* GL_DRAW_BUFFER2 */
+       382, /* GL_DRAW_BUFFER3 */
+       385, /* GL_DRAW_BUFFER4 */
+       388, /* GL_DRAW_BUFFER5 */
+       391, /* GL_DRAW_BUFFER6 */
+       394, /* GL_DRAW_BUFFER7 */
+       397, /* GL_DRAW_BUFFER8 */
+       400, /* GL_DRAW_BUFFER9 */
+       359, /* GL_DRAW_BUFFER10 */
+       362, /* GL_DRAW_BUFFER11 */
+       365, /* GL_DRAW_BUFFER12 */
+       368, /* GL_DRAW_BUFFER13 */
+       371, /* GL_DRAW_BUFFER14 */
+       374, /* GL_DRAW_BUFFER15 */
+        82, /* GL_BLEND_EQUATION_ALPHA */
+       792, /* GL_MATRIX_PALETTE_ARB */
+       823, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+       826, /* GL_MAX_PALETTE_MATRICES_ARB */
+       289, /* GL_CURRENT_PALETTE_MATRIX_ARB */
+       786, /* GL_MATRIX_INDEX_ARRAY_ARB */
+       284, /* GL_CURRENT_MATRIX_INDEX_ARB */
+       788, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+       790, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+       789, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+       787, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+      1573, /* GL_TEXTURE_DEPTH_SIZE */
+       339, /* GL_DEPTH_TEXTURE_MODE */
+      1539, /* GL_TEXTURE_COMPARE_MODE */
+      1537, /* GL_TEXTURE_COMPARE_FUNC */
+       217, /* GL_COMPARE_R_TO_TEXTURE */
+      1093, /* GL_POINT_SPRITE */
+       266, /* GL_COORD_REPLACE */
+      1097, /* GL_POINT_SPRITE_R_MODE_NV */
+      1214, /* GL_QUERY_COUNTER_BITS */
+       291, /* GL_CURRENT_QUERY */
+      1216, /* GL_QUERY_RESULT */
+      1218, /* GL_QUERY_RESULT_AVAILABLE */
+       873, /* GL_MAX_VERTEX_ATTRIBS */
+      1704, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+       337, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+       336, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+       859, /* GL_MAX_TEXTURE_COORDS */
+       861, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+      1164, /* GL_PROGRAM_ERROR_STRING_ARB */
+      1166, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+      1165, /* GL_PROGRAM_FORMAT_ARB */
+      1618, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+       318, /* GL_DEPTH_BOUNDS_TEST_EXT */
+       317, /* GL_DEPTH_BOUNDS_EXT */
+        52, /* GL_ARRAY_BUFFER */
+       420, /* GL_ELEMENT_ARRAY_BUFFER */
+        54, /* GL_ARRAY_BUFFER_BINDING */
+       422, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+      1678, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+       960, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+       140, /* GL_COLOR_ARRAY_BUFFER_BINDING */
+       579, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+      1552, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+       416, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+      1323, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+       463, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+      1730, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+      1700, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+      1167, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+       835, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+      1173, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+       844, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+      1185, /* GL_PROGRAM_TEMPORARIES_ARB */
+       850, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+      1175, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+       846, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+      1179, /* GL_PROGRAM_PARAMETERS_ARB */
+       849, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+      1174, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+       845, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+      1160, /* GL_PROGRAM_ATTRIBS_ARB */
+       830, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+      1172, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+       843, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+      1158, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+       828, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+      1170, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+       841, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+       836, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+       832, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+      1188, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+      1629, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+      1226, /* GL_READ_ONLY */
+      1738, /* GL_WRITE_ONLY */
+      1228, /* GL_READ_WRITE */
+       101, /* GL_BUFFER_ACCESS */
+       103, /* GL_BUFFER_MAPPED */
+       105, /* GL_BUFFER_MAP_POINTER */
+      1623, /* GL_TIME_ELAPSED_EXT */
+       746, /* GL_MATRIX0_ARB */
+       758, /* GL_MATRIX1_ARB */
+       770, /* GL_MATRIX2_ARB */
+       774, /* GL_MATRIX3_ARB */
+       776, /* GL_MATRIX4_ARB */
+       778, /* GL_MATRIX5_ARB */
+       780, /* GL_MATRIX6_ARB */
+       782, /* GL_MATRIX7_ARB */
+       784, /* GL_MATRIX8_ARB */
+       785, /* GL_MATRIX9_ARB */
+       748, /* GL_MATRIX10_ARB */
+       749, /* GL_MATRIX11_ARB */
+       750, /* GL_MATRIX12_ARB */
+       751, /* GL_MATRIX13_ARB */
+       752, /* GL_MATRIX14_ARB */
+       753, /* GL_MATRIX15_ARB */
+       754, /* GL_MATRIX16_ARB */
+       755, /* GL_MATRIX17_ARB */
+       756, /* GL_MATRIX18_ARB */
+       757, /* GL_MATRIX19_ARB */
+       760, /* GL_MATRIX20_ARB */
+       761, /* GL_MATRIX21_ARB */
+       762, /* GL_MATRIX22_ARB */
+       763, /* GL_MATRIX23_ARB */
+       764, /* GL_MATRIX24_ARB */
+       765, /* GL_MATRIX25_ARB */
+       766, /* GL_MATRIX26_ARB */
+       767, /* GL_MATRIX27_ARB */
+       768, /* GL_MATRIX28_ARB */
+       769, /* GL_MATRIX29_ARB */
+       772, /* GL_MATRIX30_ARB */
+       773, /* GL_MATRIX31_ARB */
+      1425, /* GL_STREAM_DRAW */
+      1427, /* GL_STREAM_READ */
+      1423, /* GL_STREAM_COPY */
+      1391, /* GL_STATIC_DRAW */
+      1393, /* GL_STATIC_READ */
+      1389, /* GL_STATIC_COPY */
+       410, /* GL_DYNAMIC_DRAW */
+       412, /* GL_DYNAMIC_READ */
+       408, /* GL_DYNAMIC_COPY */
+       535, /* GL_GL_PIXEL_PACK_BUFFER */
+       537, /* GL_GL_PIXEL_UNPACK_BUFFER */
+       536, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
+       538, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
+       833, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
+       831, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+       834, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+       838, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+       837, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+       795, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
+      1419, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+        17, /* GL_ACTIVE_STENCIL_FACE_EXT */
+       894, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+      1304, /* GL_SAMPLES_PASSED */
+       486, /* GL_FRAGMENT_SHADER */
+      1724, /* GL_VERTEX_SHADER */
+      1178, /* GL_PROGRAM_OBJECT_ARB */
+      1336, /* GL_SHADER_OBJECT_ARB */
+       819, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+       877, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+       871, /* GL_MAX_VARYING_FLOATS */
+       875, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+       804, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+       985, /* GL_OBJECT_TYPE_ARB */
+      1338, /* GL_SHADER_TYPE */
+       451, /* GL_FLOAT_VEC2 */
+       453, /* GL_FLOAT_VEC3 */
+       455, /* GL_FLOAT_VEC4 */
+       606, /* GL_INT_VEC2 */
+       608, /* GL_INT_VEC3 */
+       610, /* GL_INT_VEC4 */
+        93, /* GL_BOOL */
+        95, /* GL_BOOL_VEC2 */
+        97, /* GL_BOOL_VEC3 */
+        99, /* GL_BOOL_VEC4 */
+       445, /* GL_FLOAT_MAT2 */
+       447, /* GL_FLOAT_MAT3 */
+       449, /* GL_FLOAT_MAT4 */
+      1295, /* GL_SAMPLER_1D */
+      1297, /* GL_SAMPLER_2D */
+      1299, /* GL_SAMPLER_3D */
+      1300, /* GL_SAMPLER_CUBE */
+      1296, /* GL_SAMPLER_1D_SHADOW */
+      1298, /* GL_SAMPLER_2D_SHADOW */
+       529, /* GL_GL_FLOAT_MAT2x3 */
+       530, /* GL_GL_FLOAT_MAT2x4 */
+       531, /* GL_GL_FLOAT_MAT3x2 */
+       532, /* GL_GL_FLOAT_MAT3x4 */
+       533, /* GL_GL_FLOAT_MAT4x2 */
+       534, /* GL_GL_FLOAT_MAT4x3 */
+       312, /* GL_DELETE_STATUS */
+       221, /* GL_COMPILE_STATUS */
+       659, /* GL_LINK_STATUS */
+      1673, /* GL_VALIDATE_STATUS */
+       591, /* GL_INFO_LOG_LENGTH */
+        56, /* GL_ATTACHED_SHADERS */
+        20, /* GL_ACTIVE_UNIFORMS */
+        21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
+      1337, /* GL_SHADER_SOURCE_LENGTH */
+        15, /* GL_ACTIVE_ATTRIBUTES */
+        16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
+       488, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+      1340, /* GL_SHADING_LANGUAGE_VERSION */
+       290, /* GL_CURRENT_PROGRAM */
+      1034, /* GL_PALETTE4_RGB8_OES */
+      1036, /* GL_PALETTE4_RGBA8_OES */
+      1032, /* GL_PALETTE4_R5_G6_B5_OES */
+      1035, /* GL_PALETTE4_RGBA4_OES */
+      1033, /* GL_PALETTE4_RGB5_A1_OES */
+      1039, /* GL_PALETTE8_RGB8_OES */
+      1041, /* GL_PALETTE8_RGBA8_OES */
+      1037, /* GL_PALETTE8_R5_G6_B5_OES */
+      1040, /* GL_PALETTE8_RGBA4_OES */
+      1038, /* GL_PALETTE8_RGB5_A1_OES */
+       574, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+       573, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+      1507, /* GL_TEXTURE_1D_ARRAY_EXT */
+      1198, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
+      1509, /* GL_TEXTURE_2D_ARRAY_EXT */
+      1201, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
+      1515, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
+      1517, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
+       543, /* GL_GL_SRGB */
+       544, /* GL_GL_SRGB8 */
+       546, /* GL_GL_SRGB_ALPHA */
+       545, /* GL_GL_SRGB8_ALPHA8 */
+       542, /* GL_GL_SLUMINANCE_ALPHA */
+       541, /* GL_GL_SLUMINANCE8_ALPHA8 */
+       539, /* GL_GL_SLUMINANCE */
+       540, /* GL_GL_SLUMINANCE8 */
+       526, /* GL_GL_COMPRESSED_SRGB */
+       527, /* GL_GL_COMPRESSED_SRGB_ALPHA */
+       524, /* GL_GL_COMPRESSED_SLUMINANCE */
+       525, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
+      1095, /* GL_POINT_SPRITE_COORD_ORIGIN */
+       667, /* GL_LOWER_LEFT */
+      1670, /* GL_UPPER_LEFT */
+      1401, /* GL_STENCIL_BACK_REF */
+      1402, /* GL_STENCIL_BACK_VALUE_MASK */
+      1403, /* GL_STENCIL_BACK_WRITEMASK */
+       403, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
+      1240, /* GL_RENDERBUFFER_BINDING_EXT */
+      1225, /* GL_READ_FRAMEBUFFER_EXT */
+       404, /* GL_DRAW_FRAMEBUFFER_EXT */
+      1224, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
+       490, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
+       489, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
+       494, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
+       492, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
+       491, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
+       496, /* GL_FRAMEBUFFER_COMPLETE_EXT */
+       498, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
+       503, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
+       501, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+       499, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+       502, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+       500, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
+       504, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
+       506, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
+       505, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+       801, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
+       146, /* GL_COLOR_ATTACHMENT0_EXT */
+       153, /* GL_COLOR_ATTACHMENT1_EXT */
+       154, /* GL_COLOR_ATTACHMENT2_EXT */
+       155, /* GL_COLOR_ATTACHMENT3_EXT */
+       156, /* GL_COLOR_ATTACHMENT4_EXT */
+       157, /* GL_COLOR_ATTACHMENT5_EXT */
+       158, /* GL_COLOR_ATTACHMENT6_EXT */
+       159, /* GL_COLOR_ATTACHMENT7_EXT */
+       160, /* GL_COLOR_ATTACHMENT8_EXT */
+       161, /* GL_COLOR_ATTACHMENT9_EXT */
+       147, /* GL_COLOR_ATTACHMENT10_EXT */
+       148, /* GL_COLOR_ATTACHMENT11_EXT */
+       149, /* GL_COLOR_ATTACHMENT12_EXT */
+       150, /* GL_COLOR_ATTACHMENT13_EXT */
+       151, /* GL_COLOR_ATTACHMENT14_EXT */
+       152, /* GL_COLOR_ATTACHMENT15_EXT */
+       314, /* GL_DEPTH_ATTACHMENT_EXT */
+      1396, /* GL_STENCIL_ATTACHMENT_EXT */
+       497, /* GL_FRAMEBUFFER_EXT */
+      1241, /* GL_RENDERBUFFER_EXT */
+      1244, /* GL_RENDERBUFFER_WIDTH_EXT */
+      1242, /* GL_RENDERBUFFER_HEIGHT_EXT */
+      1243, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
+      1414, /* GL_STENCIL_INDEX_EXT */
+      1411, /* GL_STENCIL_INDEX1_EXT */
+      1412, /* GL_STENCIL_INDEX4_EXT */
+      1413, /* GL_STENCIL_INDEX8_EXT */
+      1410, /* GL_STENCIL_INDEX16_EXT */
+       428, /* GL_EVAL_BIT */
+      1222, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+       661, /* GL_LIST_BIT */
+      1523, /* GL_TEXTURE_BIT */
+      1319, /* GL_SCISSOR_BIT */
+        29, /* GL_ALL_ATTRIB_BITS */
+       941, /* GL_MULTISAMPLE_BIT */
+        30, /* GL_ALL_CLIENT_ATTRIB_BITS */
+};
+
+#define Elements(x) sizeof(x)/sizeof(*x)
+
+typedef int (*cfunc)(const void *, const void *);
+
+/**
+ * Compare a key name to an element in the \c all_enums array.
+ *
+ * \c bsearch always passes the key as the first parameter and the pointer
+ * to the array element as the second parameter.  We can elimiate some
+ * extra work by taking advantage of that fact.
+ *
+ * \param a  Pointer to the desired enum name.
+ * \param b  Pointer to an element of the \c all_enums array.
+ */
+static int compar_name( const char *a, const enum_elt *b )
+{
+   return _mesa_strcmp( a, & enum_string_table[ b->offset ] );
+}
+
+/**
+ * Compare a key enum value to an element in the \c all_enums array.
+ *
+ * \c bsearch always passes the key as the first parameter and the pointer
+ * to the array element as the second parameter.  We can elimiate some
+ * extra work by taking advantage of that fact.
+ *
+ * \param a  Pointer to the desired enum name.
+ * \param b  Pointer to an index into the \c all_enums array.
+ */
+static int compar_nr( const int *a, const unsigned *b )
+{
+   return a[0] - all_enums[*b].n;
+}
+
+
+static char token_tmp[20];
+
+const char *_mesa_lookup_enum_by_nr( int nr )
+{
+   unsigned * i;
+
+   i = (unsigned *)bsearch( & nr, reduced_enums, Elements(reduced_enums),
+                            sizeof(reduced_enums[0]), (cfunc) compar_nr );
+
+   if ( i != NULL ) {
+      return & enum_string_table[ all_enums[ *i ].offset ];
+   }
+   else {
+      /* this is not re-entrant safe, no big deal here */
+      _mesa_sprintf(token_tmp, "0x%x", nr);
+      return token_tmp;
+   }
+}
+
+int _mesa_lookup_enum_by_name( const char *symbol )
+{
+   enum_elt * f = NULL;
+
+   if ( symbol != NULL ) {
+      f = (enum_elt *)bsearch( symbol, all_enums, Elements(all_enums),
+			       sizeof( enum_elt ), (cfunc) compar_name );
+   }
+
+   return (f != NULL) ? f->n : -1;
+}
+
+
Index: git/target-i386/mesa_get.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/mesa_get.c	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,5563 @@
+
+/***
+ ***  NOTE!!!  DO NOT EDIT THIS FILE!!!  IT IS GENERATED BY get_gen.py
+ ***/
+
+#include "glheader.h"
+#include "context.h"
+#include "enable.h"
+#include "extensions.h"
+#include "fbobject.h"
+#include "get.h"
+#include "macros.h"
+#include "mtypes.h"
+#include "state.h"
+#include "texcompress.h"
+
+
+#define FLOAT_TO_BOOLEAN(X)   ( (X) ? GL_TRUE : GL_FALSE )
+
+#define INT_TO_BOOLEAN(I)     ( (I) ? GL_TRUE : GL_FALSE )
+
+#define ENUM_TO_BOOLEAN(E)    ( (E) ? GL_TRUE : GL_FALSE )
+#define ENUM_TO_INT(E)        ( (GLint) (E) )
+#define ENUM_TO_FLOAT(E)      ( (GLfloat) (E) )
+
+#define BOOLEAN_TO_INT(B)     ( (GLint) (B) )
+#define BOOLEAN_TO_FLOAT(B)   ( (B) ? 1.0F : 0.0F )
+
+
+/*
+ * Check if named extension is enabled, if not generate error and return.
+ */
+#define CHECK_EXT1(EXT1, FUNC)                                         \
+   if (!ctx->Extensions.EXT1) {                                        \
+      _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname);  \
+      return;                                                          \
+   }
+
+/*
+ * Check if either of two extensions is enabled.
+ */
+#define CHECK_EXT2(EXT1, EXT2, FUNC)                                   \
+   if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) {               \
+      _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname);  \
+      return;                                                          \
+   }
+
+/*
+ * Check if either of three extensions is enabled.
+ */
+#define CHECK_EXT3(EXT1, EXT2, EXT3, FUNC)                             \
+   if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 &&               \
+       !ctx->Extensions.EXT3) {                                        \
+      _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname);  \
+      return;                                                          \
+   }
+
+/*
+ * Check if either of four extensions is enabled.
+ */
+#define CHECK_EXT4(EXT1, EXT2, EXT3, EXT4, FUNC)                       \
+   if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 &&               \
+       !ctx->Extensions.EXT3 && !ctx->Extensions.EXT4) {               \
+      _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname);  \
+      return;                                                          \
+   }
+
+
+void GLAPIENTRY
+_mesa_GetBooleanv( GLenum pname, GLboolean *params )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+   if (!params)
+      return;
+
+   if (ctx->NewState)
+      _mesa_update_state(ctx);
+
+   if (ctx->Driver.GetBooleanv &&
+       ctx->Driver.GetBooleanv(ctx, pname, params))
+      return;
+
+   switch (pname) {
+      case GL_ACCUM_RED_BITS:
+         params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumRedBits);
+         break;
+      case GL_ACCUM_GREEN_BITS:
+         params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumGreenBits);
+         break;
+      case GL_ACCUM_BLUE_BITS:
+         params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumBlueBits);
+         break;
+      case GL_ACCUM_ALPHA_BITS:
+         params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumAlphaBits);
+         break;
+      case GL_ACCUM_CLEAR_VALUE:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[0]);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[1]);
+         params[2] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[2]);
+         params[3] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[3]);
+         break;
+      case GL_ALPHA_BIAS:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaBias);
+         break;
+      case GL_ALPHA_BITS:
+         params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.alphaBits);
+         break;
+      case GL_ALPHA_SCALE:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaScale);
+         break;
+      case GL_ALPHA_TEST:
+         params[0] = ctx->Color.AlphaEnabled;
+         break;
+      case GL_ALPHA_TEST_FUNC:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Color.AlphaFunc);
+         break;
+      case GL_ALPHA_TEST_REF:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Color.AlphaRef);
+         break;
+      case GL_ATTRIB_STACK_DEPTH:
+         params[0] = INT_TO_BOOLEAN(ctx->AttribStackDepth);
+         break;
+      case GL_AUTO_NORMAL:
+         params[0] = ctx->Eval.AutoNormal;
+         break;
+      case GL_AUX_BUFFERS:
+         params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.numAuxBuffers);
+         break;
+      case GL_BLEND:
+         params[0] = ctx->Color.BlendEnabled;
+         break;
+      case GL_BLEND_DST:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
+         break;
+      case GL_BLEND_SRC:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
+         break;
+      case GL_BLEND_SRC_RGB_EXT:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
+         break;
+      case GL_BLEND_DST_RGB_EXT:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
+         break;
+      case GL_BLEND_SRC_ALPHA_EXT:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcA);
+         break;
+      case GL_BLEND_DST_ALPHA_EXT:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstA);
+         break;
+      case GL_BLEND_EQUATION:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationRGB );
+         break;
+      case GL_BLEND_EQUATION_ALPHA_EXT:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationA );
+         break;
+      case GL_BLEND_COLOR_EXT:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[0]);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[1]);
+         params[2] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[2]);
+         params[3] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[3]);
+         break;
+      case GL_BLUE_BIAS:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueBias);
+         break;
+      case GL_BLUE_BITS:
+         params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.blueBits);
+         break;
+      case GL_BLUE_SCALE:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueScale);
+         break;
+      case GL_CLIENT_ATTRIB_STACK_DEPTH:
+         params[0] = INT_TO_BOOLEAN(ctx->ClientAttribStackDepth);
+         break;
+      case GL_CLIP_PLANE0:
+         params[0] = (ctx->Transform.ClipPlanesEnabled >> 0) & 1;
+         break;
+      case GL_CLIP_PLANE1:
+         params[0] = (ctx->Transform.ClipPlanesEnabled >> 1) & 1;
+         break;
+      case GL_CLIP_PLANE2:
+         params[0] = (ctx->Transform.ClipPlanesEnabled >> 2) & 1;
+         break;
+      case GL_CLIP_PLANE3:
+         params[0] = (ctx->Transform.ClipPlanesEnabled >> 3) & 1;
+         break;
+      case GL_CLIP_PLANE4:
+         params[0] = (ctx->Transform.ClipPlanesEnabled >> 4) & 1;
+         break;
+      case GL_CLIP_PLANE5:
+         params[0] = (ctx->Transform.ClipPlanesEnabled >> 5) & 1;
+         break;
+      case GL_COLOR_CLEAR_VALUE:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[0]);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[1]);
+         params[2] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[2]);
+         params[3] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[3]);
+         break;
+      case GL_COLOR_MATERIAL:
+         params[0] = ctx->Light.ColorMaterialEnabled;
+         break;
+      case GL_COLOR_MATERIAL_FACE:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialFace);
+         break;
+      case GL_COLOR_MATERIAL_PARAMETER:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialMode);
+         break;
+      case GL_COLOR_WRITEMASK:
+         params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
+         params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
+         params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
+         params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
+         break;
+      case GL_CULL_FACE:
+         params[0] = ctx->Polygon.CullFlag;
+         break;
+      case GL_CULL_FACE_MODE:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.CullFaceMode);
+         break;
+      case GL_CURRENT_COLOR:
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
+         params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
+         params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
+         }
+         break;
+      case GL_CURRENT_INDEX:
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
+         }
+         break;
+      case GL_CURRENT_NORMAL:
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
+         params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
+         }
+         break;
+      case GL_CURRENT_RASTER_COLOR:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[0]);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[1]);
+         params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[2]);
+         params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[3]);
+         break;
+      case GL_CURRENT_RASTER_DISTANCE:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterDistance);
+         break;
+      case GL_CURRENT_RASTER_INDEX:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterIndex);
+         break;
+      case GL_CURRENT_RASTER_POSITION:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[0]);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[1]);
+         params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[2]);
+         params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[3]);
+         break;
+      case GL_CURRENT_RASTER_SECONDARY_COLOR:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[0]);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[1]);
+         params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[2]);
+         params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[3]);
+         break;
+      case GL_CURRENT_RASTER_TEXTURE_COORDS:
+         {
+         const GLuint texUnit = ctx->Texture.CurrentUnit;
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][0]);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][1]);
+         params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][2]);
+         params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][3]);
+         }
+         break;
+      case GL_CURRENT_RASTER_POSITION_VALID:
+         params[0] = ctx->Current.RasterPosValid;
+         break;
+      case GL_CURRENT_TEXTURE_COORDS:
+         {
+         const GLuint texUnit = ctx->Texture.CurrentUnit;
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
+         params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
+         params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
+         }
+         break;
+      case GL_DEPTH_BIAS:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthBias);
+         break;
+      case GL_DEPTH_BITS:
+         params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.depthBits);
+         break;
+      case GL_DEPTH_CLEAR_VALUE:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.Clear);
+         break;
+      case GL_DEPTH_FUNC:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Depth.Func);
+         break;
+      case GL_DEPTH_RANGE:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Viewport.Near);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Viewport.Far);
+         break;
+      case GL_DEPTH_SCALE:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthScale);
+         break;
+      case GL_DEPTH_TEST:
+         params[0] = ctx->Depth.Test;
+         break;
+      case GL_DEPTH_WRITEMASK:
+         params[0] = ctx->Depth.Mask;
+         break;
+      case GL_DITHER:
+         params[0] = ctx->Color.DitherFlag;
+         break;
+      case GL_DOUBLEBUFFER:
+         params[0] = ctx->DrawBuffer->Visual.doubleBufferMode;
+         break;
+      case GL_DRAW_BUFFER:
+         params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
+         break;
+      case GL_EDGE_FLAG:
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = ctx->Current.EdgeFlag;
+         }
+         break;
+      case GL_FEEDBACK_BUFFER_SIZE:
+         params[0] = INT_TO_BOOLEAN(ctx->Feedback.BufferSize);
+         break;
+      case GL_FEEDBACK_BUFFER_TYPE:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Feedback.Type);
+         break;
+      case GL_FOG:
+         params[0] = ctx->Fog.Enabled;
+         break;
+      case GL_FOG_COLOR:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[0]);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[1]);
+         params[2] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[2]);
+         params[3] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[3]);
+         break;
+      case GL_FOG_DENSITY:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Density);
+         break;
+      case GL_FOG_END:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.End);
+         break;
+      case GL_FOG_HINT:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Hint.Fog);
+         break;
+      case GL_FOG_INDEX:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Index);
+         break;
+      case GL_FOG_MODE:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Fog.Mode);
+         break;
+      case GL_FOG_START:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Start);
+         break;
+      case GL_FRONT_FACE:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontFace);
+         break;
+      case GL_GREEN_BIAS:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenBias);
+         break;
+      case GL_GREEN_BITS:
+         params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.greenBits);
+         break;
+      case GL_GREEN_SCALE:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenScale);
+         break;
+      case GL_INDEX_BITS:
+         params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.indexBits);
+         break;
+      case GL_INDEX_CLEAR_VALUE:
+         params[0] = INT_TO_BOOLEAN(ctx->Color.ClearIndex);
+         break;
+      case GL_INDEX_MODE:
+         params[0] = !ctx->DrawBuffer->Visual.rgbMode;
+         break;
+      case GL_INDEX_OFFSET:
+         params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexOffset);
+         break;
+      case GL_INDEX_SHIFT:
+         params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexShift);
+         break;
+      case GL_INDEX_WRITEMASK:
+         params[0] = INT_TO_BOOLEAN(ctx->Color.IndexMask);
+         break;
+      case GL_LIGHT0:
+         params[0] = ctx->Light.Light[0].Enabled;
+         break;
+      case GL_LIGHT1:
+         params[0] = ctx->Light.Light[1].Enabled;
+         break;
+      case GL_LIGHT2:
+         params[0] = ctx->Light.Light[2].Enabled;
+         break;
+      case GL_LIGHT3:
+         params[0] = ctx->Light.Light[3].Enabled;
+         break;
+      case GL_LIGHT4:
+         params[0] = ctx->Light.Light[4].Enabled;
+         break;
+      case GL_LIGHT5:
+         params[0] = ctx->Light.Light[5].Enabled;
+         break;
+      case GL_LIGHT6:
+         params[0] = ctx->Light.Light[6].Enabled;
+         break;
+      case GL_LIGHT7:
+         params[0] = ctx->Light.Light[7].Enabled;
+         break;
+      case GL_LIGHTING:
+         params[0] = ctx->Light.Enabled;
+         break;
+      case GL_LIGHT_MODEL_AMBIENT:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[0]);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[1]);
+         params[2] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[2]);
+         params[3] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[3]);
+         break;
+      case GL_LIGHT_MODEL_COLOR_CONTROL:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Light.Model.ColorControl);
+         break;
+      case GL_LIGHT_MODEL_LOCAL_VIEWER:
+         params[0] = ctx->Light.Model.LocalViewer;
+         break;
+      case GL_LIGHT_MODEL_TWO_SIDE:
+         params[0] = ctx->Light.Model.TwoSide;
+         break;
+      case GL_LINE_SMOOTH:
+         params[0] = ctx->Line.SmoothFlag;
+         break;
+      case GL_LINE_SMOOTH_HINT:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Hint.LineSmooth);
+         break;
+      case GL_LINE_STIPPLE:
+         params[0] = ctx->Line.StippleFlag;
+         break;
+      case GL_LINE_STIPPLE_PATTERN:
+         params[0] = INT_TO_BOOLEAN(ctx->Line.StipplePattern);
+         break;
+      case GL_LINE_STIPPLE_REPEAT:
+         params[0] = INT_TO_BOOLEAN(ctx->Line.StippleFactor);
+         break;
+      case GL_LINE_WIDTH:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Line.Width);
+         break;
+      case GL_LINE_WIDTH_GRANULARITY:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Const.LineWidthGranularity);
+         break;
+      case GL_LINE_WIDTH_RANGE:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidthAA);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidthAA);
+         break;
+      case GL_ALIASED_LINE_WIDTH_RANGE:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidth);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidth);
+         break;
+      case GL_LIST_BASE:
+         params[0] = INT_TO_BOOLEAN(ctx->List.ListBase);
+         break;
+      case GL_LIST_INDEX:
+         params[0] = INT_TO_BOOLEAN(ctx->ListState.CurrentListNum);
+         break;
+      case GL_LIST_MODE:
+         {
+         GLenum mode;
+         if (!ctx->CompileFlag)
+            mode = 0;
+         else if (ctx->ExecuteFlag)
+            mode = GL_COMPILE_AND_EXECUTE;
+         else
+            mode = GL_COMPILE;
+         params[0] = ENUM_TO_BOOLEAN(mode);
+         }
+         break;
+      case GL_INDEX_LOGIC_OP:
+         params[0] = ctx->Color.IndexLogicOpEnabled;
+         break;
+      case GL_COLOR_LOGIC_OP:
+         params[0] = ctx->Color.ColorLogicOpEnabled;
+         break;
+      case GL_LOGIC_OP_MODE:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Color.LogicOp);
+         break;
+      case GL_MAP1_COLOR_4:
+         params[0] = ctx->Eval.Map1Color4;
+         break;
+      case GL_MAP1_GRID_DOMAIN:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u1);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u2);
+         break;
+      case GL_MAP1_GRID_SEGMENTS:
+         params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid1un);
+         break;
+      case GL_MAP1_INDEX:
+         params[0] = ctx->Eval.Map1Index;
+         break;
+      case GL_MAP1_NORMAL:
+         params[0] = ctx->Eval.Map1Normal;
+         break;
+      case GL_MAP1_TEXTURE_COORD_1:
+         params[0] = ctx->Eval.Map1TextureCoord1;
+         break;
+      case GL_MAP1_TEXTURE_COORD_2:
+         params[0] = ctx->Eval.Map1TextureCoord2;
+         break;
+      case GL_MAP1_TEXTURE_COORD_3:
+         params[0] = ctx->Eval.Map1TextureCoord3;
+         break;
+      case GL_MAP1_TEXTURE_COORD_4:
+         params[0] = ctx->Eval.Map1TextureCoord4;
+         break;
+      case GL_MAP1_VERTEX_3:
+         params[0] = ctx->Eval.Map1Vertex3;
+         break;
+      case GL_MAP1_VERTEX_4:
+         params[0] = ctx->Eval.Map1Vertex4;
+         break;
+      case GL_MAP2_COLOR_4:
+         params[0] = ctx->Eval.Map2Color4;
+         break;
+      case GL_MAP2_GRID_DOMAIN:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u1);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u2);
+         params[2] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v1);
+         params[3] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v2);
+         break;
+      case GL_MAP2_GRID_SEGMENTS:
+         params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2un);
+         params[1] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2vn);
+         break;
+      case GL_MAP2_INDEX:
+         params[0] = ctx->Eval.Map2Index;
+         break;
+      case GL_MAP2_NORMAL:
+         params[0] = ctx->Eval.Map2Normal;
+         break;
+      case GL_MAP2_TEXTURE_COORD_1:
+         params[0] = ctx->Eval.Map2TextureCoord1;
+         break;
+      case GL_MAP2_TEXTURE_COORD_2:
+         params[0] = ctx->Eval.Map2TextureCoord2;
+         break;
+      case GL_MAP2_TEXTURE_COORD_3:
+         params[0] = ctx->Eval.Map2TextureCoord3;
+         break;
+      case GL_MAP2_TEXTURE_COORD_4:
+         params[0] = ctx->Eval.Map2TextureCoord4;
+         break;
+      case GL_MAP2_VERTEX_3:
+         params[0] = ctx->Eval.Map2Vertex3;
+         break;
+      case GL_MAP2_VERTEX_4:
+         params[0] = ctx->Eval.Map2Vertex4;
+         break;
+      case GL_MAP_COLOR:
+         params[0] = ctx->Pixel.MapColorFlag;
+         break;
+      case GL_MAP_STENCIL:
+         params[0] = ctx->Pixel.MapStencilFlag;
+         break;
+      case GL_MATRIX_MODE:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Transform.MatrixMode);
+         break;
+      case GL_MAX_ATTRIB_STACK_DEPTH:
+         params[0] = INT_TO_BOOLEAN(MAX_ATTRIB_STACK_DEPTH);
+         break;
+      case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
+         params[0] = INT_TO_BOOLEAN(MAX_CLIENT_ATTRIB_STACK_DEPTH);
+         break;
+      case GL_MAX_CLIP_PLANES:
+         params[0] = INT_TO_BOOLEAN(ctx->Const.MaxClipPlanes);
+         break;
+      case GL_MAX_ELEMENTS_VERTICES:
+         params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
+         break;
+      case GL_MAX_ELEMENTS_INDICES:
+         params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
+         break;
+      case GL_MAX_EVAL_ORDER:
+         params[0] = INT_TO_BOOLEAN(MAX_EVAL_ORDER);
+         break;
+      case GL_MAX_LIGHTS:
+         params[0] = INT_TO_BOOLEAN(ctx->Const.MaxLights);
+         break;
+      case GL_MAX_LIST_NESTING:
+         params[0] = INT_TO_BOOLEAN(MAX_LIST_NESTING);
+         break;
+      case GL_MAX_MODELVIEW_STACK_DEPTH:
+         params[0] = INT_TO_BOOLEAN(MAX_MODELVIEW_STACK_DEPTH);
+         break;
+      case GL_MAX_NAME_STACK_DEPTH:
+         params[0] = INT_TO_BOOLEAN(MAX_NAME_STACK_DEPTH);
+         break;
+      case GL_MAX_PIXEL_MAP_TABLE:
+         params[0] = INT_TO_BOOLEAN(MAX_PIXEL_MAP_TABLE);
+         break;
+      case GL_MAX_PROJECTION_STACK_DEPTH:
+         params[0] = INT_TO_BOOLEAN(MAX_PROJECTION_STACK_DEPTH);
+         break;
+      case GL_MAX_TEXTURE_SIZE:
+         params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.MaxTextureLevels - 1));
+         break;
+      case GL_MAX_3D_TEXTURE_SIZE:
+         params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.Max3DTextureLevels - 1));
+         break;
+      case GL_MAX_TEXTURE_STACK_DEPTH:
+         params[0] = INT_TO_BOOLEAN(MAX_TEXTURE_STACK_DEPTH);
+         break;
+      case GL_MAX_VIEWPORT_DIMS:
+         params[0] = INT_TO_BOOLEAN(ctx->Const.MaxViewportWidth);
+         params[1] = INT_TO_BOOLEAN(ctx->Const.MaxViewportHeight);
+         break;
+      case GL_MODELVIEW_MATRIX:
+         {
+         const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
+         params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
+         params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
+         params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
+         params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
+         params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
+         params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
+         params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
+         params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
+         params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
+         params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
+         params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
+         params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
+         params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
+         params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
+         params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
+         params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
+         }
+         break;
+      case GL_MODELVIEW_STACK_DEPTH:
+         params[0] = INT_TO_BOOLEAN(ctx->ModelviewMatrixStack.Depth + 1);
+         break;
+      case GL_NAME_STACK_DEPTH:
+         params[0] = INT_TO_BOOLEAN(ctx->Select.NameStackDepth);
+         break;
+      case GL_NORMALIZE:
+         params[0] = ctx->Transform.Normalize;
+         break;
+      case GL_PACK_ALIGNMENT:
+         params[0] = INT_TO_BOOLEAN(ctx->Pack.Alignment);
+         break;
+      case GL_PACK_LSB_FIRST:
+         params[0] = ctx->Pack.LsbFirst;
+         break;
+      case GL_PACK_ROW_LENGTH:
+         params[0] = INT_TO_BOOLEAN(ctx->Pack.RowLength);
+         break;
+      case GL_PACK_SKIP_PIXELS:
+         params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipPixels);
+         break;
+      case GL_PACK_SKIP_ROWS:
+         params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipRows);
+         break;
+      case GL_PACK_SWAP_BYTES:
+         params[0] = ctx->Pack.SwapBytes;
+         break;
+      case GL_PACK_SKIP_IMAGES_EXT:
+         params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipImages);
+         break;
+      case GL_PACK_IMAGE_HEIGHT_EXT:
+         params[0] = INT_TO_BOOLEAN(ctx->Pack.ImageHeight);
+         break;
+      case GL_PACK_INVERT_MESA:
+         params[0] = ctx->Pack.Invert;
+         break;
+      case GL_PERSPECTIVE_CORRECTION_HINT:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PerspectiveCorrection);
+         break;
+      case GL_PIXEL_MAP_A_TO_A_SIZE:
+         params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapAtoAsize);
+         break;
+      case GL_PIXEL_MAP_B_TO_B_SIZE:
+         params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapBtoBsize);
+         break;
+      case GL_PIXEL_MAP_G_TO_G_SIZE:
+         params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapGtoGsize);
+         break;
+      case GL_PIXEL_MAP_I_TO_A_SIZE:
+         params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoAsize);
+         break;
+      case GL_PIXEL_MAP_I_TO_B_SIZE:
+         params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoBsize);
+         break;
+      case GL_PIXEL_MAP_I_TO_G_SIZE:
+         params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoGsize);
+         break;
+      case GL_PIXEL_MAP_I_TO_I_SIZE:
+         params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoIsize);
+         break;
+      case GL_PIXEL_MAP_I_TO_R_SIZE:
+         params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoRsize);
+         break;
+      case GL_PIXEL_MAP_R_TO_R_SIZE:
+         params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapRtoRsize);
+         break;
+      case GL_PIXEL_MAP_S_TO_S_SIZE:
+         params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapStoSsize);
+         break;
+      case GL_POINT_SIZE:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Size);
+         break;
+      case GL_POINT_SIZE_GRANULARITY:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Const.PointSizeGranularity);
+         break;
+      case GL_POINT_SIZE_RANGE:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSizeAA);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSizeAA);
+         break;
+      case GL_ALIASED_POINT_SIZE_RANGE:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSize);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSize);
+         break;
+      case GL_POINT_SMOOTH:
+         params[0] = ctx->Point.SmoothFlag;
+         break;
+      case GL_POINT_SMOOTH_HINT:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PointSmooth);
+         break;
+      case GL_POINT_SIZE_MIN_EXT:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MinSize);
+         break;
+      case GL_POINT_SIZE_MAX_EXT:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MaxSize);
+         break;
+      case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Threshold);
+         break;
+      case GL_DISTANCE_ATTENUATION_EXT:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Params[0]);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Point.Params[1]);
+         params[2] = FLOAT_TO_BOOLEAN(ctx->Point.Params[2]);
+         break;
+      case GL_POLYGON_MODE:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontMode);
+         params[1] = ENUM_TO_BOOLEAN(ctx->Polygon.BackMode);
+         break;
+      case GL_POLYGON_OFFSET_BIAS_EXT:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits);
+         break;
+      case GL_POLYGON_OFFSET_FACTOR:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetFactor );
+         break;
+      case GL_POLYGON_OFFSET_UNITS:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits );
+         break;
+      case GL_POLYGON_SMOOTH:
+         params[0] = ctx->Polygon.SmoothFlag;
+         break;
+      case GL_POLYGON_SMOOTH_HINT:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PolygonSmooth);
+         break;
+      case GL_POLYGON_STIPPLE:
+         params[0] = ctx->Polygon.StippleFlag;
+         break;
+      case GL_PROJECTION_MATRIX:
+         {
+         const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
+         params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
+         params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
+         params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
+         params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
+         params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
+         params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
+         params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
+         params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
+         params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
+         params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
+         params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
+         params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
+         params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
+         params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
+         params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
+         params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
+         }
+         break;
+      case GL_PROJECTION_STACK_DEPTH:
+         params[0] = INT_TO_BOOLEAN(ctx->ProjectionMatrixStack.Depth + 1);
+         break;
+      case GL_READ_BUFFER:
+         params[0] = ENUM_TO_BOOLEAN(ctx->ReadBuffer->ColorReadBuffer);
+         break;
+      case GL_RED_BIAS:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedBias);
+         break;
+      case GL_RED_BITS:
+         params[0] = INT_TO_BOOLEAN( ctx->DrawBuffer->Visual.redBits );
+         break;
+      case GL_RED_SCALE:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedScale);
+         break;
+      case GL_RENDER_MODE:
+         params[0] = ENUM_TO_BOOLEAN(ctx->RenderMode);
+         break;
+      case GL_RESCALE_NORMAL:
+         params[0] = ctx->Transform.RescaleNormals;
+         break;
+      case GL_RGBA_MODE:
+         params[0] = ctx->DrawBuffer->Visual.rgbMode;
+         break;
+      case GL_SCISSOR_BOX:
+         params[0] = INT_TO_BOOLEAN(ctx->Scissor.X);
+         params[1] = INT_TO_BOOLEAN(ctx->Scissor.Y);
+         params[2] = INT_TO_BOOLEAN(ctx->Scissor.Width);
+         params[3] = INT_TO_BOOLEAN(ctx->Scissor.Height);
+         break;
+      case GL_SCISSOR_TEST:
+         params[0] = ctx->Scissor.Enabled;
+         break;
+      case GL_SELECTION_BUFFER_SIZE:
+         params[0] = INT_TO_BOOLEAN(ctx->Select.BufferSize);
+         break;
+      case GL_SHADE_MODEL:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Light.ShadeModel);
+         break;
+      case GL_SHARED_TEXTURE_PALETTE_EXT:
+         params[0] = ctx->Texture.SharedPalette;
+         break;
+      case GL_STENCIL_BITS:
+         params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.stencilBits);
+         break;
+      case GL_STENCIL_CLEAR_VALUE:
+         params[0] = INT_TO_BOOLEAN(ctx->Stencil.Clear);
+         break;
+      case GL_STENCIL_FAIL:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STENCIL_FUNC:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STENCIL_PASS_DEPTH_FAIL:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STENCIL_PASS_DEPTH_PASS:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STENCIL_REF:
+         params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STENCIL_TEST:
+         params[0] = ctx->Stencil.Enabled;
+         break;
+      case GL_STENCIL_VALUE_MASK:
+         params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STENCIL_WRITEMASK:
+         params[0] = INT_TO_BOOLEAN(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STEREO:
+         params[0] = ctx->DrawBuffer->Visual.stereoMode;
+         break;
+      case GL_SUBPIXEL_BITS:
+         params[0] = INT_TO_BOOLEAN(ctx->Const.SubPixelBits);
+         break;
+      case GL_TEXTURE_1D:
+         params[0] = _mesa_IsEnabled(GL_TEXTURE_1D);
+         break;
+      case GL_TEXTURE_2D:
+         params[0] = _mesa_IsEnabled(GL_TEXTURE_2D);
+         break;
+      case GL_TEXTURE_3D:
+         params[0] = _mesa_IsEnabled(GL_TEXTURE_3D);
+         break;
+      case GL_TEXTURE_BINDING_1D:
+         params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
+         break;
+      case GL_TEXTURE_BINDING_2D:
+         params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
+         break;
+      case GL_TEXTURE_BINDING_3D:
+         params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
+         break;
+      case GL_TEXTURE_ENV_COLOR:
+         {
+         const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
+         params[0] = FLOAT_TO_BOOLEAN(color[0]);
+         params[1] = FLOAT_TO_BOOLEAN(color[1]);
+         params[2] = FLOAT_TO_BOOLEAN(color[2]);
+         params[3] = FLOAT_TO_BOOLEAN(color[3]);
+         }
+         break;
+      case GL_TEXTURE_ENV_MODE:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
+         break;
+      case GL_TEXTURE_GEN_S:
+         params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0);
+         break;
+      case GL_TEXTURE_GEN_T:
+         params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0);
+         break;
+      case GL_TEXTURE_GEN_R:
+         params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0);
+         break;
+      case GL_TEXTURE_GEN_Q:
+         params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0);
+         break;
+      case GL_TEXTURE_MATRIX:
+         {
+         const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
+         params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
+         params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
+         params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
+         params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
+         params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
+         params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
+         params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
+         params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
+         params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
+         params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
+         params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
+         params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
+         params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
+         params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
+         params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
+         params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
+         }
+         break;
+      case GL_TEXTURE_STACK_DEPTH:
+         params[0] = INT_TO_BOOLEAN(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
+         break;
+      case GL_UNPACK_ALIGNMENT:
+         params[0] = INT_TO_BOOLEAN(ctx->Unpack.Alignment);
+         break;
+      case GL_UNPACK_LSB_FIRST:
+         params[0] = ctx->Unpack.LsbFirst;
+         break;
+      case GL_UNPACK_ROW_LENGTH:
+         params[0] = INT_TO_BOOLEAN(ctx->Unpack.RowLength);
+         break;
+      case GL_UNPACK_SKIP_PIXELS:
+         params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipPixels);
+         break;
+      case GL_UNPACK_SKIP_ROWS:
+         params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipRows);
+         break;
+      case GL_UNPACK_SWAP_BYTES:
+         params[0] = ctx->Unpack.SwapBytes;
+         break;
+      case GL_UNPACK_SKIP_IMAGES_EXT:
+         params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipImages);
+         break;
+      case GL_UNPACK_IMAGE_HEIGHT_EXT:
+         params[0] = INT_TO_BOOLEAN(ctx->Unpack.ImageHeight);
+         break;
+      case GL_UNPACK_CLIENT_STORAGE_APPLE:
+         params[0] = ctx->Unpack.ClientStorage;
+         break;
+      case GL_VIEWPORT:
+         params[0] = INT_TO_BOOLEAN(ctx->Viewport.X);
+         params[1] = INT_TO_BOOLEAN(ctx->Viewport.Y);
+         params[2] = INT_TO_BOOLEAN(ctx->Viewport.Width);
+         params[3] = INT_TO_BOOLEAN(ctx->Viewport.Height);
+         break;
+      case GL_ZOOM_X:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomX);
+         break;
+      case GL_ZOOM_Y:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomY);
+         break;
+      case GL_VERTEX_ARRAY:
+         params[0] = ctx->Array.ArrayObj->Vertex.Enabled;
+         break;
+      case GL_VERTEX_ARRAY_SIZE:
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Size);
+         break;
+      case GL_VERTEX_ARRAY_TYPE:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Type);
+         break;
+      case GL_VERTEX_ARRAY_STRIDE:
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Stride);
+         break;
+      case GL_VERTEX_ARRAY_COUNT_EXT:
+         params[0] = INT_TO_BOOLEAN(0);
+         break;
+      case GL_NORMAL_ARRAY:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Enabled);
+         break;
+      case GL_NORMAL_ARRAY_TYPE:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Type);
+         break;
+      case GL_NORMAL_ARRAY_STRIDE:
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Stride);
+         break;
+      case GL_NORMAL_ARRAY_COUNT_EXT:
+         params[0] = INT_TO_BOOLEAN(0);
+         break;
+      case GL_COLOR_ARRAY:
+         params[0] = ctx->Array.ArrayObj->Color.Enabled;
+         break;
+      case GL_COLOR_ARRAY_SIZE:
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Size);
+         break;
+      case GL_COLOR_ARRAY_TYPE:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Type);
+         break;
+      case GL_COLOR_ARRAY_STRIDE:
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Stride);
+         break;
+      case GL_COLOR_ARRAY_COUNT_EXT:
+         params[0] = INT_TO_BOOLEAN(0);
+         break;
+      case GL_INDEX_ARRAY:
+         params[0] = ctx->Array.ArrayObj->Index.Enabled;
+         break;
+      case GL_INDEX_ARRAY_TYPE:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Type);
+         break;
+      case GL_INDEX_ARRAY_STRIDE:
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Stride);
+         break;
+      case GL_INDEX_ARRAY_COUNT_EXT:
+         params[0] = INT_TO_BOOLEAN(0);
+         break;
+      case GL_TEXTURE_COORD_ARRAY:
+         params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled;
+         break;
+      case GL_TEXTURE_COORD_ARRAY_SIZE:
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
+         break;
+      case GL_TEXTURE_COORD_ARRAY_TYPE:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
+         break;
+      case GL_TEXTURE_COORD_ARRAY_STRIDE:
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
+         break;
+      case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
+         params[0] = INT_TO_BOOLEAN(0);
+         break;
+      case GL_EDGE_FLAG_ARRAY:
+         params[0] = ctx->Array.ArrayObj->EdgeFlag.Enabled;
+         break;
+      case GL_EDGE_FLAG_ARRAY_STRIDE:
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.Stride);
+         break;
+      case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
+         params[0] = INT_TO_BOOLEAN(0);
+         break;
+      case GL_MAX_TEXTURE_UNITS_ARB:
+         CHECK_EXT1(ARB_multitexture, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureUnits);
+         break;
+      case GL_ACTIVE_TEXTURE_ARB:
+         CHECK_EXT1(ARB_multitexture, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
+         break;
+      case GL_CLIENT_ACTIVE_TEXTURE_ARB:
+         CHECK_EXT1(ARB_multitexture, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
+         break;
+      case GL_TEXTURE_CUBE_MAP_ARB:
+         CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
+         params[0] = _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
+         break;
+      case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
+         CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
+         break;
+      case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
+         CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
+         break;
+      case GL_TEXTURE_COMPRESSION_HINT_ARB:
+         CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Hint.TextureCompression);
+         break;
+      case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
+         CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
+         break;
+      case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
+         CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
+         {
+         GLint formats[100];
+         GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
+         ASSERT(n <= 100);
+         for (i = 0; i < n; i++)
+            params[i] = ENUM_TO_INT(formats[i]);
+         }
+         break;
+      case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
+         CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Array.LockFirst);
+         break;
+      case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
+         CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Array.LockCount);
+         break;
+      case GL_TRANSPOSE_COLOR_MATRIX_ARB:
+         {
+         const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
+         params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
+         params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
+         params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
+         params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
+         params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
+         params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
+         params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
+         params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
+         params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
+         params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
+         params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
+         params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
+         params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
+         params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
+         params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
+         params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
+         }
+         break;
+      case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
+         {
+         const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
+         params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
+         params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
+         params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
+         params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
+         params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
+         params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
+         params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
+         params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
+         params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
+         params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
+         params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
+         params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
+         params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
+         params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
+         params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
+         params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
+         }
+         break;
+      case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
+         {
+         const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
+         params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
+         params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
+         params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
+         params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
+         params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
+         params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
+         params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
+         params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
+         params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
+         params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
+         params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
+         params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
+         params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
+         params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
+         params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
+         params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
+         }
+         break;
+      case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
+         {
+         const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
+         params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
+         params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
+         params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
+         params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
+         params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
+         params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
+         params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
+         params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
+         params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
+         params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
+         params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
+         params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
+         params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
+         params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
+         params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
+         params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
+         }
+         break;
+      case GL_COLOR_MATRIX_SGI:
+         {
+         const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
+         params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
+         params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
+         params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
+         params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
+         params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
+         params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
+         params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
+         params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
+         params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
+         params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
+         params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
+         params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
+         params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
+         params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
+         params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
+         params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
+         }
+         break;
+      case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
+         params[0] = INT_TO_BOOLEAN(ctx->ColorMatrixStack.Depth + 1);
+         break;
+      case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
+         params[0] = INT_TO_BOOLEAN(MAX_COLOR_STACK_DEPTH);
+         break;
+      case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[0]);
+         break;
+      case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[1]);
+         break;
+      case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[2]);
+         break;
+      case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[3]);
+         break;
+      case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[0]);
+         break;
+      case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[1]);
+         break;
+      case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[2]);
+         break;
+      case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[3]);
+         break;
+      case GL_CONVOLUTION_1D_EXT:
+         CHECK_EXT1(EXT_convolution, "GetBooleanv");
+         params[0] = ctx->Pixel.Convolution1DEnabled;
+         break;
+      case GL_CONVOLUTION_2D_EXT:
+         CHECK_EXT1(EXT_convolution, "GetBooleanv");
+         params[0] = ctx->Pixel.Convolution2DEnabled;
+         break;
+      case GL_SEPARABLE_2D_EXT:
+         CHECK_EXT1(EXT_convolution, "GetBooleanv");
+         params[0] = ctx->Pixel.Separable2DEnabled;
+         break;
+      case GL_POST_CONVOLUTION_RED_SCALE_EXT:
+         CHECK_EXT1(EXT_convolution, "GetBooleanv");
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[0]);
+         break;
+      case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
+         CHECK_EXT1(EXT_convolution, "GetBooleanv");
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[1]);
+         break;
+      case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
+         CHECK_EXT1(EXT_convolution, "GetBooleanv");
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[2]);
+         break;
+      case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
+         CHECK_EXT1(EXT_convolution, "GetBooleanv");
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[3]);
+         break;
+      case GL_POST_CONVOLUTION_RED_BIAS_EXT:
+         CHECK_EXT1(EXT_convolution, "GetBooleanv");
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[0]);
+         break;
+      case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
+         CHECK_EXT1(EXT_convolution, "GetBooleanv");
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[1]);
+         break;
+      case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
+         CHECK_EXT1(EXT_convolution, "GetBooleanv");
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[2]);
+         break;
+      case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
+         CHECK_EXT1(EXT_convolution, "GetBooleanv");
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[3]);
+         break;
+      case GL_HISTOGRAM:
+         CHECK_EXT1(EXT_histogram, "GetBooleanv");
+         params[0] = ctx->Pixel.HistogramEnabled;
+         break;
+      case GL_MINMAX:
+         CHECK_EXT1(EXT_histogram, "GetBooleanv");
+         params[0] = ctx->Pixel.MinMaxEnabled;
+         break;
+      case GL_COLOR_TABLE_SGI:
+         CHECK_EXT1(SGI_color_table, "GetBooleanv");
+         params[0] = ctx->Pixel.ColorTableEnabled;
+         break;
+      case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
+         CHECK_EXT1(SGI_color_table, "GetBooleanv");
+         params[0] = ctx->Pixel.PostConvolutionColorTableEnabled;
+         break;
+      case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
+         CHECK_EXT1(SGI_color_table, "GetBooleanv");
+         params[0] = ctx->Pixel.PostColorMatrixColorTableEnabled;
+         break;
+      case GL_TEXTURE_COLOR_TABLE_SGI:
+         CHECK_EXT1(SGI_texture_color_table, "GetBooleanv");
+         params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled;
+         break;
+      case GL_COLOR_SUM_EXT:
+         CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetBooleanv");
+         params[0] = ctx->Fog.ColorSumEnabled;
+         break;
+      case GL_CURRENT_SECONDARY_COLOR_EXT:
+         CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
+         params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
+         params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
+         }
+         break;
+      case GL_SECONDARY_COLOR_ARRAY_EXT:
+         CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->SecondaryColor.Enabled;
+         break;
+      case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
+         CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
+         params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Type);
+         break;
+      case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
+         CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Stride);
+         break;
+      case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
+         CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Size);
+         break;
+      case GL_CURRENT_FOG_COORDINATE_EXT:
+         CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
+         }
+         break;
+      case GL_FOG_COORDINATE_ARRAY_EXT:
+         CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->FogCoord.Enabled;
+         break;
+      case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
+         CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
+         params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Type);
+         break;
+      case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
+         CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Stride);
+         break;
+      case GL_FOG_COORDINATE_SOURCE_EXT:
+         CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
+         params[0] = ENUM_TO_BOOLEAN(ctx->Fog.FogCoordinateSource);
+         break;
+      case GL_MAX_TEXTURE_LOD_BIAS_EXT:
+         CHECK_EXT1(EXT_texture_lod_bias, "GetBooleanv");
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureLodBias);
+         break;
+      case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
+         CHECK_EXT1(EXT_texture_filter_anisotropic, "GetBooleanv");
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureMaxAnisotropy);
+         break;
+      case GL_MULTISAMPLE_ARB:
+         CHECK_EXT1(ARB_multisample, "GetBooleanv");
+         params[0] = ctx->Multisample.Enabled;
+         break;
+      case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
+         CHECK_EXT1(ARB_multisample, "GetBooleanv");
+         params[0] = ctx->Multisample.SampleAlphaToCoverage;
+         break;
+      case GL_SAMPLE_ALPHA_TO_ONE_ARB:
+         CHECK_EXT1(ARB_multisample, "GetBooleanv");
+         params[0] = ctx->Multisample.SampleAlphaToOne;
+         break;
+      case GL_SAMPLE_COVERAGE_ARB:
+         CHECK_EXT1(ARB_multisample, "GetBooleanv");
+         params[0] = ctx->Multisample.SampleCoverage;
+         break;
+      case GL_SAMPLE_COVERAGE_VALUE_ARB:
+         CHECK_EXT1(ARB_multisample, "GetBooleanv");
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Multisample.SampleCoverageValue);
+         break;
+      case GL_SAMPLE_COVERAGE_INVERT_ARB:
+         CHECK_EXT1(ARB_multisample, "GetBooleanv");
+         params[0] = ctx->Multisample.SampleCoverageInvert;
+         break;
+      case GL_SAMPLE_BUFFERS_ARB:
+         CHECK_EXT1(ARB_multisample, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.sampleBuffers);
+         break;
+      case GL_SAMPLES_ARB:
+         CHECK_EXT1(ARB_multisample, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.samples);
+         break;
+      case GL_RASTER_POSITION_UNCLIPPED_IBM:
+         CHECK_EXT1(IBM_rasterpos_clip, "GetBooleanv");
+         params[0] = ctx->Transform.RasterPositionUnclipped;
+         break;
+      case GL_POINT_SPRITE_NV:
+         CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
+         params[0] = ctx->Point.PointSprite;
+         break;
+      case GL_POINT_SPRITE_R_MODE_NV:
+         CHECK_EXT1(NV_point_sprite, "GetBooleanv");
+         params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteRMode);
+         break;
+      case GL_POINT_SPRITE_COORD_ORIGIN:
+         CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
+         params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteOrigin);
+         break;
+      case GL_GENERATE_MIPMAP_HINT_SGIS:
+         CHECK_EXT1(SGIS_generate_mipmap, "GetBooleanv");
+         params[0] = ENUM_TO_BOOLEAN(ctx->Hint.GenerateMipmap);
+         break;
+      case GL_VERTEX_PROGRAM_BINDING_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY0_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->VertexAttrib[0].Enabled;
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY1_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->VertexAttrib[1].Enabled;
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY2_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->VertexAttrib[2].Enabled;
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY3_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->VertexAttrib[3].Enabled;
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->VertexAttrib[4].Enabled;
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY5_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->VertexAttrib[5].Enabled;
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY6_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->VertexAttrib[6].Enabled;
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY7_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->VertexAttrib[7].Enabled;
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY8_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->VertexAttrib[8].Enabled;
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY9_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->VertexAttrib[9].Enabled;
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY10_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->VertexAttrib[10].Enabled;
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY11_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->VertexAttrib[11].Enabled;
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY12_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->VertexAttrib[12].Enabled;
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY13_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->VertexAttrib[13].Enabled;
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY14_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->VertexAttrib[14].Enabled;
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY15_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Array.ArrayObj->VertexAttrib[15].Enabled;
+         break;
+      case GL_MAP1_VERTEX_ATTRIB0_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Eval.Map1Attrib[0];
+         break;
+      case GL_MAP1_VERTEX_ATTRIB1_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Eval.Map1Attrib[1];
+         break;
+      case GL_MAP1_VERTEX_ATTRIB2_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Eval.Map1Attrib[2];
+         break;
+      case GL_MAP1_VERTEX_ATTRIB3_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Eval.Map1Attrib[3];
+         break;
+      case GL_MAP1_VERTEX_ATTRIB4_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Eval.Map1Attrib[4];
+         break;
+      case GL_MAP1_VERTEX_ATTRIB5_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Eval.Map1Attrib[5];
+         break;
+      case GL_MAP1_VERTEX_ATTRIB6_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Eval.Map1Attrib[6];
+         break;
+      case GL_MAP1_VERTEX_ATTRIB7_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Eval.Map1Attrib[7];
+         break;
+      case GL_MAP1_VERTEX_ATTRIB8_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Eval.Map1Attrib[8];
+         break;
+      case GL_MAP1_VERTEX_ATTRIB9_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Eval.Map1Attrib[9];
+         break;
+      case GL_MAP1_VERTEX_ATTRIB10_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Eval.Map1Attrib[10];
+         break;
+      case GL_MAP1_VERTEX_ATTRIB11_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Eval.Map1Attrib[11];
+         break;
+      case GL_MAP1_VERTEX_ATTRIB12_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Eval.Map1Attrib[12];
+         break;
+      case GL_MAP1_VERTEX_ATTRIB13_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Eval.Map1Attrib[13];
+         break;
+      case GL_MAP1_VERTEX_ATTRIB14_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Eval.Map1Attrib[14];
+         break;
+      case GL_MAP1_VERTEX_ATTRIB15_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->Eval.Map1Attrib[15];
+         break;
+      case GL_FRAGMENT_PROGRAM_NV:
+         CHECK_EXT1(NV_fragment_program, "GetBooleanv");
+         params[0] = ctx->FragmentProgram.Enabled;
+         break;
+      case GL_FRAGMENT_PROGRAM_BINDING_NV:
+         CHECK_EXT1(NV_fragment_program, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
+         break;
+      case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
+         CHECK_EXT1(NV_fragment_program, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
+         break;
+      case GL_TEXTURE_RECTANGLE_NV:
+         CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
+         params[0] = _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV);
+         break;
+      case GL_TEXTURE_BINDING_RECTANGLE_NV:
+         CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
+         break;
+      case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
+         CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureRectSize);
+         break;
+      case GL_STENCIL_TEST_TWO_SIDE_EXT:
+         CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
+         params[0] = ctx->Stencil.TestTwoSide;
+         break;
+      case GL_ACTIVE_STENCIL_FACE_EXT:
+         CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
+         params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
+         break;
+      case GL_MAX_SHININESS_NV:
+         CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxShininess);
+         break;
+      case GL_MAX_SPOT_EXPONENT_NV:
+         CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxSpotExponent);
+         break;
+      case GL_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayBufferObj->Name);
+         break;
+      case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
+         break;
+      case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.BufferObj->Name);
+         break;
+      case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.BufferObj->Name);
+         break;
+      case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.BufferObj->Name);
+         break;
+      case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
+         break;
+      case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
+         break;
+      case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
+         break;
+      case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
+         break;
+      case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Array.ElementArrayBufferObj->Name);
+         break;
+      case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
+         CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Pack.BufferObj->Name);
+         break;
+      case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
+         CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Unpack.BufferObj->Name);
+         break;
+      case GL_VERTEX_PROGRAM_ARB:
+         CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->VertexProgram.Enabled;
+         break;
+      case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
+         CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->VertexProgram.PointSizeEnabled;
+         break;
+      case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
+         CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->VertexProgram.TwoSideEnabled;
+         break;
+      case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
+         CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrixStackDepth);
+         break;
+      case GL_MAX_PROGRAM_MATRICES_ARB:
+         CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrices);
+         break;
+      case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
+         CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
+         params[0] = ctx->CurrentStack->Depth + 1;
+         break;
+      case GL_CURRENT_MATRIX_ARB:
+         CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetBooleanv");
+         {
+         const GLfloat *matrix = ctx->CurrentStack->Top->m;
+         params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
+         params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
+         params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
+         params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
+         params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
+         params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
+         params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
+         params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
+         params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
+         params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
+         params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
+         params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
+         params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
+         params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
+         params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
+         params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
+         }
+         break;
+      case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
+         CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetBooleanv");
+         {
+         const GLfloat *matrix = ctx->CurrentStack->Top->m;
+         params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
+         params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
+         params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
+         params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
+         params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
+         params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
+         params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
+         params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
+         params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
+         params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
+         params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
+         params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
+         params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
+         params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
+         params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
+         params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
+         }
+         break;
+      case GL_MAX_VERTEX_ATTRIBS_ARB:
+         CHECK_EXT1(ARB_vertex_program, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Const.VertexProgram.MaxAttribs);
+         break;
+      case GL_PROGRAM_ERROR_POSITION_ARB:
+         CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Program.ErrorPos);
+         break;
+      case GL_FRAGMENT_PROGRAM_ARB:
+         CHECK_EXT1(ARB_fragment_program, "GetBooleanv");
+         params[0] = ctx->FragmentProgram.Enabled;
+         break;
+      case GL_MAX_TEXTURE_COORDS_ARB:
+         CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureCoordUnits);
+         break;
+      case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
+         CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureImageUnits);
+         break;
+      case GL_DEPTH_BOUNDS_TEST_EXT:
+         CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
+         params[0] = ctx->Depth.BoundsTest;
+         break;
+      case GL_DEPTH_BOUNDS_EXT:
+         CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
+         params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMin);
+         params[1] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMax);
+         break;
+      case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
+         CHECK_EXT1(MESA_program_debug, "GetBooleanv");
+         params[0] = ctx->FragmentProgram.CallbackEnabled;
+         break;
+      case GL_VERTEX_PROGRAM_CALLBACK_MESA:
+         CHECK_EXT1(MESA_program_debug, "GetBooleanv");
+         params[0] = ctx->VertexProgram.CallbackEnabled;
+         break;
+      case GL_FRAGMENT_PROGRAM_POSITION_MESA:
+         CHECK_EXT1(MESA_program_debug, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.CurrentPosition);
+         break;
+      case GL_VERTEX_PROGRAM_POSITION_MESA:
+         CHECK_EXT1(MESA_program_debug, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->VertexProgram.CurrentPosition);
+         break;
+      case GL_MAX_DRAW_BUFFERS_ARB:
+         CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Const.MaxDrawBuffers);
+         break;
+      case GL_DRAW_BUFFER0_ARB:
+         CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
+         params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
+         break;
+      case GL_DRAW_BUFFER1_ARB:
+         CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
+         {
+         GLenum buffer;
+         if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
+            _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
+            return;
+         }
+         buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
+         params[0] = ENUM_TO_BOOLEAN(buffer);
+         }
+         break;
+      case GL_DRAW_BUFFER2_ARB:
+         CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
+         {
+         GLenum buffer;
+         if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
+            _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
+            return;
+         }
+         buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
+         params[0] = ENUM_TO_BOOLEAN(buffer);
+         }
+         break;
+      case GL_DRAW_BUFFER3_ARB:
+         CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
+         {
+         GLenum buffer;
+         if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
+            _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
+            return;
+         }
+         buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
+         params[0] = ENUM_TO_BOOLEAN(buffer);
+         }
+         break;
+      case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
+         CHECK_EXT1(OES_read_format, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadType);
+         break;
+      case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
+         CHECK_EXT1(OES_read_format, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadFormat);
+         break;
+      case GL_NUM_FRAGMENT_REGISTERS_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(6);
+         break;
+      case GL_NUM_FRAGMENT_CONSTANTS_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(8);
+         break;
+      case GL_NUM_PASSES_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(2);
+         break;
+      case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(8);
+         break;
+      case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(16);
+         break;
+      case GL_COLOR_ALPHA_PAIRING_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
+         params[0] = GL_TRUE;
+         break;
+      case GL_NUM_LOOPBACK_COMPONENTS_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(3);
+         break;
+      case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(3);
+         break;
+      case GL_STENCIL_BACK_FUNC:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[1]);
+         break;
+      case GL_STENCIL_BACK_VALUE_MASK:
+         params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[1]);
+         break;
+      case GL_STENCIL_BACK_REF:
+         params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[1]);
+         break;
+      case GL_STENCIL_BACK_FAIL:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[1]);
+         break;
+      case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[1]);
+         break;
+      case GL_STENCIL_BACK_PASS_DEPTH_PASS:
+         params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[1]);
+         break;
+      case GL_FRAMEBUFFER_BINDING_EXT:
+         CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Name);
+         break;
+      case GL_RENDERBUFFER_BINDING_EXT:
+         CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
+         break;
+      case GL_MAX_COLOR_ATTACHMENTS_EXT:
+         CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Const.MaxColorAttachments);
+         break;
+      case GL_MAX_RENDERBUFFER_SIZE_EXT:
+         CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(ctx->Const.MaxRenderbufferSize);
+         break;
+      case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
+         CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(MAX_FRAGMENT_UNIFORM_COMPONENTS);
+         break;
+      case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
+         CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
+         params[0] = ENUM_TO_BOOLEAN(ctx->Hint.FragmentShaderDerivative);
+         break;
+      case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
+         CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(MAX_VERTEX_UNIFORM_COMPONENTS);
+         break;
+      case GL_MAX_VARYING_FLOATS_ARB:
+         CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(MAX_VARYING_FLOATS);
+         break;
+      case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
+         CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
+         break;
+      case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
+         CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
+         params[0] = INT_TO_BOOLEAN(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
+         break;
+      default:
+         _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
+   }
+}
+
+void GLAPIENTRY
+_mesa_GetFloatv( GLenum pname, GLfloat *params )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+   if (!params)
+      return;
+
+   if (ctx->NewState)
+      _mesa_update_state(ctx);
+
+   if (ctx->Driver.GetFloatv &&
+       ctx->Driver.GetFloatv(ctx, pname, params))
+      return;
+
+   switch (pname) {
+      case GL_ACCUM_RED_BITS:
+         params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumRedBits);
+         break;
+      case GL_ACCUM_GREEN_BITS:
+         params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumGreenBits);
+         break;
+      case GL_ACCUM_BLUE_BITS:
+         params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumBlueBits);
+         break;
+      case GL_ACCUM_ALPHA_BITS:
+         params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumAlphaBits);
+         break;
+      case GL_ACCUM_CLEAR_VALUE:
+         params[0] = ctx->Accum.ClearColor[0];
+         params[1] = ctx->Accum.ClearColor[1];
+         params[2] = ctx->Accum.ClearColor[2];
+         params[3] = ctx->Accum.ClearColor[3];
+         break;
+      case GL_ALPHA_BIAS:
+         params[0] = ctx->Pixel.AlphaBias;
+         break;
+      case GL_ALPHA_BITS:
+         params[0] = (GLfloat)(ctx->DrawBuffer->Visual.alphaBits);
+         break;
+      case GL_ALPHA_SCALE:
+         params[0] = ctx->Pixel.AlphaScale;
+         break;
+      case GL_ALPHA_TEST:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Color.AlphaEnabled);
+         break;
+      case GL_ALPHA_TEST_FUNC:
+         params[0] = ENUM_TO_FLOAT(ctx->Color.AlphaFunc);
+         break;
+      case GL_ALPHA_TEST_REF:
+         params[0] = ctx->Color.AlphaRef;
+         break;
+      case GL_ATTRIB_STACK_DEPTH:
+         params[0] = (GLfloat)(ctx->AttribStackDepth);
+         break;
+      case GL_AUTO_NORMAL:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.AutoNormal);
+         break;
+      case GL_AUX_BUFFERS:
+         params[0] = (GLfloat)(ctx->DrawBuffer->Visual.numAuxBuffers);
+         break;
+      case GL_BLEND:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Color.BlendEnabled);
+         break;
+      case GL_BLEND_DST:
+         params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
+         break;
+      case GL_BLEND_SRC:
+         params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
+         break;
+      case GL_BLEND_SRC_RGB_EXT:
+         params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
+         break;
+      case GL_BLEND_DST_RGB_EXT:
+         params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
+         break;
+      case GL_BLEND_SRC_ALPHA_EXT:
+         params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcA);
+         break;
+      case GL_BLEND_DST_ALPHA_EXT:
+         params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstA);
+         break;
+      case GL_BLEND_EQUATION:
+         params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationRGB );
+         break;
+      case GL_BLEND_EQUATION_ALPHA_EXT:
+         params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationA );
+         break;
+      case GL_BLEND_COLOR_EXT:
+         params[0] = ctx->Color.BlendColor[0];
+         params[1] = ctx->Color.BlendColor[1];
+         params[2] = ctx->Color.BlendColor[2];
+         params[3] = ctx->Color.BlendColor[3];
+         break;
+      case GL_BLUE_BIAS:
+         params[0] = ctx->Pixel.BlueBias;
+         break;
+      case GL_BLUE_BITS:
+         params[0] = (GLfloat)(ctx->DrawBuffer->Visual.blueBits);
+         break;
+      case GL_BLUE_SCALE:
+         params[0] = ctx->Pixel.BlueScale;
+         break;
+      case GL_CLIENT_ATTRIB_STACK_DEPTH:
+         params[0] = (GLfloat)(ctx->ClientAttribStackDepth);
+         break;
+      case GL_CLIP_PLANE0:
+         params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
+         break;
+      case GL_CLIP_PLANE1:
+         params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
+         break;
+      case GL_CLIP_PLANE2:
+         params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
+         break;
+      case GL_CLIP_PLANE3:
+         params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
+         break;
+      case GL_CLIP_PLANE4:
+         params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
+         break;
+      case GL_CLIP_PLANE5:
+         params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
+         break;
+      case GL_COLOR_CLEAR_VALUE:
+         params[0] = ctx->Color.ClearColor[0];
+         params[1] = ctx->Color.ClearColor[1];
+         params[2] = ctx->Color.ClearColor[2];
+         params[3] = ctx->Color.ClearColor[3];
+         break;
+      case GL_COLOR_MATERIAL:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Light.ColorMaterialEnabled);
+         break;
+      case GL_COLOR_MATERIAL_FACE:
+         params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialFace);
+         break;
+      case GL_COLOR_MATERIAL_PARAMETER:
+         params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialMode);
+         break;
+      case GL_COLOR_WRITEMASK:
+         params[0] = (GLfloat)(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
+         params[1] = (GLfloat)(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
+         params[2] = (GLfloat)(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
+         params[3] = (GLfloat)(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
+         break;
+      case GL_CULL_FACE:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.CullFlag);
+         break;
+      case GL_CULL_FACE_MODE:
+         params[0] = ENUM_TO_FLOAT(ctx->Polygon.CullFaceMode);
+         break;
+      case GL_CURRENT_COLOR:
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0];
+         params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1];
+         params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2];
+         params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3];
+         }
+         break;
+      case GL_CURRENT_INDEX:
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0];
+         }
+         break;
+      case GL_CURRENT_NORMAL:
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0];
+         params[1] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1];
+         params[2] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2];
+         }
+         break;
+      case GL_CURRENT_RASTER_COLOR:
+         params[0] = ctx->Current.RasterColor[0];
+         params[1] = ctx->Current.RasterColor[1];
+         params[2] = ctx->Current.RasterColor[2];
+         params[3] = ctx->Current.RasterColor[3];
+         break;
+      case GL_CURRENT_RASTER_DISTANCE:
+         params[0] = ctx->Current.RasterDistance;
+         break;
+      case GL_CURRENT_RASTER_INDEX:
+         params[0] = ctx->Current.RasterIndex;
+         break;
+      case GL_CURRENT_RASTER_POSITION:
+         params[0] = ctx->Current.RasterPos[0];
+         params[1] = ctx->Current.RasterPos[1];
+         params[2] = ctx->Current.RasterPos[2];
+         params[3] = ctx->Current.RasterPos[3];
+         break;
+      case GL_CURRENT_RASTER_SECONDARY_COLOR:
+         params[0] = ctx->Current.RasterSecondaryColor[0];
+         params[1] = ctx->Current.RasterSecondaryColor[1];
+         params[2] = ctx->Current.RasterSecondaryColor[2];
+         params[3] = ctx->Current.RasterSecondaryColor[3];
+         break;
+      case GL_CURRENT_RASTER_TEXTURE_COORDS:
+         {
+         const GLuint texUnit = ctx->Texture.CurrentUnit;
+         params[0] = ctx->Current.RasterTexCoords[texUnit][0];
+         params[1] = ctx->Current.RasterTexCoords[texUnit][1];
+         params[2] = ctx->Current.RasterTexCoords[texUnit][2];
+         params[3] = ctx->Current.RasterTexCoords[texUnit][3];
+         }
+         break;
+      case GL_CURRENT_RASTER_POSITION_VALID:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Current.RasterPosValid);
+         break;
+      case GL_CURRENT_TEXTURE_COORDS:
+         {
+         const GLuint texUnit = ctx->Texture.CurrentUnit;
+         params[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0];
+         params[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1];
+         params[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2];
+         params[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3];
+         }
+         break;
+      case GL_DEPTH_BIAS:
+         params[0] = ctx->Pixel.DepthBias;
+         break;
+      case GL_DEPTH_BITS:
+         params[0] = (GLfloat)(ctx->DrawBuffer->Visual.depthBits);
+         break;
+      case GL_DEPTH_CLEAR_VALUE:
+         params[0] = ctx->Depth.Clear;
+         break;
+      case GL_DEPTH_FUNC:
+         params[0] = ENUM_TO_FLOAT(ctx->Depth.Func);
+         break;
+      case GL_DEPTH_RANGE:
+         params[0] = ctx->Viewport.Near;
+         params[1] = ctx->Viewport.Far;
+         break;
+      case GL_DEPTH_SCALE:
+         params[0] = ctx->Pixel.DepthScale;
+         break;
+      case GL_DEPTH_TEST:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Test);
+         break;
+      case GL_DEPTH_WRITEMASK:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Mask);
+         break;
+      case GL_DITHER:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Color.DitherFlag);
+         break;
+      case GL_DOUBLEBUFFER:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.doubleBufferMode);
+         break;
+      case GL_DRAW_BUFFER:
+         params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
+         break;
+      case GL_EDGE_FLAG:
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Current.EdgeFlag);
+         }
+         break;
+      case GL_FEEDBACK_BUFFER_SIZE:
+         params[0] = (GLfloat)(ctx->Feedback.BufferSize);
+         break;
+      case GL_FEEDBACK_BUFFER_TYPE:
+         params[0] = ENUM_TO_FLOAT(ctx->Feedback.Type);
+         break;
+      case GL_FOG:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.Enabled);
+         break;
+      case GL_FOG_COLOR:
+         params[0] = ctx->Fog.Color[0];
+         params[1] = ctx->Fog.Color[1];
+         params[2] = ctx->Fog.Color[2];
+         params[3] = ctx->Fog.Color[3];
+         break;
+      case GL_FOG_DENSITY:
+         params[0] = ctx->Fog.Density;
+         break;
+      case GL_FOG_END:
+         params[0] = ctx->Fog.End;
+         break;
+      case GL_FOG_HINT:
+         params[0] = ENUM_TO_FLOAT(ctx->Hint.Fog);
+         break;
+      case GL_FOG_INDEX:
+         params[0] = ctx->Fog.Index;
+         break;
+      case GL_FOG_MODE:
+         params[0] = ENUM_TO_FLOAT(ctx->Fog.Mode);
+         break;
+      case GL_FOG_START:
+         params[0] = ctx->Fog.Start;
+         break;
+      case GL_FRONT_FACE:
+         params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontFace);
+         break;
+      case GL_GREEN_BIAS:
+         params[0] = ctx->Pixel.GreenBias;
+         break;
+      case GL_GREEN_BITS:
+         params[0] = (GLfloat)(ctx->DrawBuffer->Visual.greenBits);
+         break;
+      case GL_GREEN_SCALE:
+         params[0] = ctx->Pixel.GreenScale;
+         break;
+      case GL_INDEX_BITS:
+         params[0] = (GLfloat)(ctx->DrawBuffer->Visual.indexBits);
+         break;
+      case GL_INDEX_CLEAR_VALUE:
+         params[0] = (GLfloat)(ctx->Color.ClearIndex);
+         break;
+      case GL_INDEX_MODE:
+         params[0] = BOOLEAN_TO_FLOAT(!ctx->DrawBuffer->Visual.rgbMode);
+         break;
+      case GL_INDEX_OFFSET:
+         params[0] = (GLfloat)(ctx->Pixel.IndexOffset);
+         break;
+      case GL_INDEX_SHIFT:
+         params[0] = (GLfloat)(ctx->Pixel.IndexShift);
+         break;
+      case GL_INDEX_WRITEMASK:
+         params[0] = (GLfloat)(ctx->Color.IndexMask);
+         break;
+      case GL_LIGHT0:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[0].Enabled);
+         break;
+      case GL_LIGHT1:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[1].Enabled);
+         break;
+      case GL_LIGHT2:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[2].Enabled);
+         break;
+      case GL_LIGHT3:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[3].Enabled);
+         break;
+      case GL_LIGHT4:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[4].Enabled);
+         break;
+      case GL_LIGHT5:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[5].Enabled);
+         break;
+      case GL_LIGHT6:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[6].Enabled);
+         break;
+      case GL_LIGHT7:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[7].Enabled);
+         break;
+      case GL_LIGHTING:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Enabled);
+         break;
+      case GL_LIGHT_MODEL_AMBIENT:
+         params[0] = ctx->Light.Model.Ambient[0];
+         params[1] = ctx->Light.Model.Ambient[1];
+         params[2] = ctx->Light.Model.Ambient[2];
+         params[3] = ctx->Light.Model.Ambient[3];
+         break;
+      case GL_LIGHT_MODEL_COLOR_CONTROL:
+         params[0] = ENUM_TO_FLOAT(ctx->Light.Model.ColorControl);
+         break;
+      case GL_LIGHT_MODEL_LOCAL_VIEWER:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.LocalViewer);
+         break;
+      case GL_LIGHT_MODEL_TWO_SIDE:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.TwoSide);
+         break;
+      case GL_LINE_SMOOTH:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Line.SmoothFlag);
+         break;
+      case GL_LINE_SMOOTH_HINT:
+         params[0] = ENUM_TO_FLOAT(ctx->Hint.LineSmooth);
+         break;
+      case GL_LINE_STIPPLE:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Line.StippleFlag);
+         break;
+      case GL_LINE_STIPPLE_PATTERN:
+         params[0] = (GLfloat)(ctx->Line.StipplePattern);
+         break;
+      case GL_LINE_STIPPLE_REPEAT:
+         params[0] = (GLfloat)(ctx->Line.StippleFactor);
+         break;
+      case GL_LINE_WIDTH:
+         params[0] = ctx->Line.Width;
+         break;
+      case GL_LINE_WIDTH_GRANULARITY:
+         params[0] = ctx->Const.LineWidthGranularity;
+         break;
+      case GL_LINE_WIDTH_RANGE:
+         params[0] = ctx->Const.MinLineWidthAA;
+         params[1] = ctx->Const.MaxLineWidthAA;
+         break;
+      case GL_ALIASED_LINE_WIDTH_RANGE:
+         params[0] = ctx->Const.MinLineWidth;
+         params[1] = ctx->Const.MaxLineWidth;
+         break;
+      case GL_LIST_BASE:
+         params[0] = (GLfloat)(ctx->List.ListBase);
+         break;
+      case GL_LIST_INDEX:
+         params[0] = (GLfloat)(ctx->ListState.CurrentListNum);
+         break;
+      case GL_LIST_MODE:
+         {
+         GLenum mode;
+         if (!ctx->CompileFlag)
+            mode = 0;
+         else if (ctx->ExecuteFlag)
+            mode = GL_COMPILE_AND_EXECUTE;
+         else
+            mode = GL_COMPILE;
+         params[0] = ENUM_TO_FLOAT(mode);
+         }
+         break;
+      case GL_INDEX_LOGIC_OP:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Color.IndexLogicOpEnabled);
+         break;
+      case GL_COLOR_LOGIC_OP:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Color.ColorLogicOpEnabled);
+         break;
+      case GL_LOGIC_OP_MODE:
+         params[0] = ENUM_TO_FLOAT(ctx->Color.LogicOp);
+         break;
+      case GL_MAP1_COLOR_4:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Color4);
+         break;
+      case GL_MAP1_GRID_DOMAIN:
+         params[0] = ctx->Eval.MapGrid1u1;
+         params[1] = ctx->Eval.MapGrid1u2;
+         break;
+      case GL_MAP1_GRID_SEGMENTS:
+         params[0] = (GLfloat)(ctx->Eval.MapGrid1un);
+         break;
+      case GL_MAP1_INDEX:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Index);
+         break;
+      case GL_MAP1_NORMAL:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Normal);
+         break;
+      case GL_MAP1_TEXTURE_COORD_1:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord1);
+         break;
+      case GL_MAP1_TEXTURE_COORD_2:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord2);
+         break;
+      case GL_MAP1_TEXTURE_COORD_3:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord3);
+         break;
+      case GL_MAP1_TEXTURE_COORD_4:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord4);
+         break;
+      case GL_MAP1_VERTEX_3:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex3);
+         break;
+      case GL_MAP1_VERTEX_4:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex4);
+         break;
+      case GL_MAP2_COLOR_4:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Color4);
+         break;
+      case GL_MAP2_GRID_DOMAIN:
+         params[0] = ctx->Eval.MapGrid2u1;
+         params[1] = ctx->Eval.MapGrid2u2;
+         params[2] = ctx->Eval.MapGrid2v1;
+         params[3] = ctx->Eval.MapGrid2v2;
+         break;
+      case GL_MAP2_GRID_SEGMENTS:
+         params[0] = (GLfloat)(ctx->Eval.MapGrid2un);
+         params[1] = (GLfloat)(ctx->Eval.MapGrid2vn);
+         break;
+      case GL_MAP2_INDEX:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Index);
+         break;
+      case GL_MAP2_NORMAL:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Normal);
+         break;
+      case GL_MAP2_TEXTURE_COORD_1:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord1);
+         break;
+      case GL_MAP2_TEXTURE_COORD_2:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord2);
+         break;
+      case GL_MAP2_TEXTURE_COORD_3:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord3);
+         break;
+      case GL_MAP2_TEXTURE_COORD_4:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord4);
+         break;
+      case GL_MAP2_VERTEX_3:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex3);
+         break;
+      case GL_MAP2_VERTEX_4:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex4);
+         break;
+      case GL_MAP_COLOR:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapColorFlag);
+         break;
+      case GL_MAP_STENCIL:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapStencilFlag);
+         break;
+      case GL_MATRIX_MODE:
+         params[0] = ENUM_TO_FLOAT(ctx->Transform.MatrixMode);
+         break;
+      case GL_MAX_ATTRIB_STACK_DEPTH:
+         params[0] = (GLfloat)(MAX_ATTRIB_STACK_DEPTH);
+         break;
+      case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
+         params[0] = (GLfloat)(MAX_CLIENT_ATTRIB_STACK_DEPTH);
+         break;
+      case GL_MAX_CLIP_PLANES:
+         params[0] = (GLfloat)(ctx->Const.MaxClipPlanes);
+         break;
+      case GL_MAX_ELEMENTS_VERTICES:
+         params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
+         break;
+      case GL_MAX_ELEMENTS_INDICES:
+         params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
+         break;
+      case GL_MAX_EVAL_ORDER:
+         params[0] = (GLfloat)(MAX_EVAL_ORDER);
+         break;
+      case GL_MAX_LIGHTS:
+         params[0] = (GLfloat)(ctx->Const.MaxLights);
+         break;
+      case GL_MAX_LIST_NESTING:
+         params[0] = (GLfloat)(MAX_LIST_NESTING);
+         break;
+      case GL_MAX_MODELVIEW_STACK_DEPTH:
+         params[0] = (GLfloat)(MAX_MODELVIEW_STACK_DEPTH);
+         break;
+      case GL_MAX_NAME_STACK_DEPTH:
+         params[0] = (GLfloat)(MAX_NAME_STACK_DEPTH);
+         break;
+      case GL_MAX_PIXEL_MAP_TABLE:
+         params[0] = (GLfloat)(MAX_PIXEL_MAP_TABLE);
+         break;
+      case GL_MAX_PROJECTION_STACK_DEPTH:
+         params[0] = (GLfloat)(MAX_PROJECTION_STACK_DEPTH);
+         break;
+      case GL_MAX_TEXTURE_SIZE:
+         params[0] = (GLfloat)(1 << (ctx->Const.MaxTextureLevels - 1));
+         break;
+      case GL_MAX_3D_TEXTURE_SIZE:
+         params[0] = (GLfloat)(1 << (ctx->Const.Max3DTextureLevels - 1));
+         break;
+      case GL_MAX_TEXTURE_STACK_DEPTH:
+         params[0] = (GLfloat)(MAX_TEXTURE_STACK_DEPTH);
+         break;
+      case GL_MAX_VIEWPORT_DIMS:
+         params[0] = (GLfloat)(ctx->Const.MaxViewportWidth);
+         params[1] = (GLfloat)(ctx->Const.MaxViewportHeight);
+         break;
+      case GL_MODELVIEW_MATRIX:
+         {
+         const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
+         params[0] = matrix[0];
+         params[1] = matrix[1];
+         params[2] = matrix[2];
+         params[3] = matrix[3];
+         params[4] = matrix[4];
+         params[5] = matrix[5];
+         params[6] = matrix[6];
+         params[7] = matrix[7];
+         params[8] = matrix[8];
+         params[9] = matrix[9];
+         params[10] = matrix[10];
+         params[11] = matrix[11];
+         params[12] = matrix[12];
+         params[13] = matrix[13];
+         params[14] = matrix[14];
+         params[15] = matrix[15];
+         }
+         break;
+      case GL_MODELVIEW_STACK_DEPTH:
+         params[0] = (GLfloat)(ctx->ModelviewMatrixStack.Depth + 1);
+         break;
+      case GL_NAME_STACK_DEPTH:
+         params[0] = (GLfloat)(ctx->Select.NameStackDepth);
+         break;
+      case GL_NORMALIZE:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.Normalize);
+         break;
+      case GL_PACK_ALIGNMENT:
+         params[0] = (GLfloat)(ctx->Pack.Alignment);
+         break;
+      case GL_PACK_LSB_FIRST:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.LsbFirst);
+         break;
+      case GL_PACK_ROW_LENGTH:
+         params[0] = (GLfloat)(ctx->Pack.RowLength);
+         break;
+      case GL_PACK_SKIP_PIXELS:
+         params[0] = (GLfloat)(ctx->Pack.SkipPixels);
+         break;
+      case GL_PACK_SKIP_ROWS:
+         params[0] = (GLfloat)(ctx->Pack.SkipRows);
+         break;
+      case GL_PACK_SWAP_BYTES:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.SwapBytes);
+         break;
+      case GL_PACK_SKIP_IMAGES_EXT:
+         params[0] = (GLfloat)(ctx->Pack.SkipImages);
+         break;
+      case GL_PACK_IMAGE_HEIGHT_EXT:
+         params[0] = (GLfloat)(ctx->Pack.ImageHeight);
+         break;
+      case GL_PACK_INVERT_MESA:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.Invert);
+         break;
+      case GL_PERSPECTIVE_CORRECTION_HINT:
+         params[0] = ENUM_TO_FLOAT(ctx->Hint.PerspectiveCorrection);
+         break;
+      case GL_PIXEL_MAP_A_TO_A_SIZE:
+         params[0] = (GLfloat)(ctx->Pixel.MapAtoAsize);
+         break;
+      case GL_PIXEL_MAP_B_TO_B_SIZE:
+         params[0] = (GLfloat)(ctx->Pixel.MapBtoBsize);
+         break;
+      case GL_PIXEL_MAP_G_TO_G_SIZE:
+         params[0] = (GLfloat)(ctx->Pixel.MapGtoGsize);
+         break;
+      case GL_PIXEL_MAP_I_TO_A_SIZE:
+         params[0] = (GLfloat)(ctx->Pixel.MapItoAsize);
+         break;
+      case GL_PIXEL_MAP_I_TO_B_SIZE:
+         params[0] = (GLfloat)(ctx->Pixel.MapItoBsize);
+         break;
+      case GL_PIXEL_MAP_I_TO_G_SIZE:
+         params[0] = (GLfloat)(ctx->Pixel.MapItoGsize);
+         break;
+      case GL_PIXEL_MAP_I_TO_I_SIZE:
+         params[0] = (GLfloat)(ctx->Pixel.MapItoIsize);
+         break;
+      case GL_PIXEL_MAP_I_TO_R_SIZE:
+         params[0] = (GLfloat)(ctx->Pixel.MapItoRsize);
+         break;
+      case GL_PIXEL_MAP_R_TO_R_SIZE:
+         params[0] = (GLfloat)(ctx->Pixel.MapRtoRsize);
+         break;
+      case GL_PIXEL_MAP_S_TO_S_SIZE:
+         params[0] = (GLfloat)(ctx->Pixel.MapStoSsize);
+         break;
+      case GL_POINT_SIZE:
+         params[0] = ctx->Point.Size;
+         break;
+      case GL_POINT_SIZE_GRANULARITY:
+         params[0] = ctx->Const.PointSizeGranularity;
+         break;
+      case GL_POINT_SIZE_RANGE:
+         params[0] = ctx->Const.MinPointSizeAA;
+         params[1] = ctx->Const.MaxPointSizeAA;
+         break;
+      case GL_ALIASED_POINT_SIZE_RANGE:
+         params[0] = ctx->Const.MinPointSize;
+         params[1] = ctx->Const.MaxPointSize;
+         break;
+      case GL_POINT_SMOOTH:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Point.SmoothFlag);
+         break;
+      case GL_POINT_SMOOTH_HINT:
+         params[0] = ENUM_TO_FLOAT(ctx->Hint.PointSmooth);
+         break;
+      case GL_POINT_SIZE_MIN_EXT:
+         params[0] = ctx->Point.MinSize;
+         break;
+      case GL_POINT_SIZE_MAX_EXT:
+         params[0] = ctx->Point.MaxSize;
+         break;
+      case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
+         params[0] = ctx->Point.Threshold;
+         break;
+      case GL_DISTANCE_ATTENUATION_EXT:
+         params[0] = ctx->Point.Params[0];
+         params[1] = ctx->Point.Params[1];
+         params[2] = ctx->Point.Params[2];
+         break;
+      case GL_POLYGON_MODE:
+         params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontMode);
+         params[1] = ENUM_TO_FLOAT(ctx->Polygon.BackMode);
+         break;
+      case GL_POLYGON_OFFSET_BIAS_EXT:
+         params[0] = ctx->Polygon.OffsetUnits;
+         break;
+      case GL_POLYGON_OFFSET_FACTOR:
+         params[0] = ctx->Polygon.OffsetFactor ;
+         break;
+      case GL_POLYGON_OFFSET_UNITS:
+         params[0] = ctx->Polygon.OffsetUnits ;
+         break;
+      case GL_POLYGON_SMOOTH:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.SmoothFlag);
+         break;
+      case GL_POLYGON_SMOOTH_HINT:
+         params[0] = ENUM_TO_FLOAT(ctx->Hint.PolygonSmooth);
+         break;
+      case GL_POLYGON_STIPPLE:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.StippleFlag);
+         break;
+      case GL_PROJECTION_MATRIX:
+         {
+         const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
+         params[0] = matrix[0];
+         params[1] = matrix[1];
+         params[2] = matrix[2];
+         params[3] = matrix[3];
+         params[4] = matrix[4];
+         params[5] = matrix[5];
+         params[6] = matrix[6];
+         params[7] = matrix[7];
+         params[8] = matrix[8];
+         params[9] = matrix[9];
+         params[10] = matrix[10];
+         params[11] = matrix[11];
+         params[12] = matrix[12];
+         params[13] = matrix[13];
+         params[14] = matrix[14];
+         params[15] = matrix[15];
+         }
+         break;
+      case GL_PROJECTION_STACK_DEPTH:
+         params[0] = (GLfloat)(ctx->ProjectionMatrixStack.Depth + 1);
+         break;
+      case GL_READ_BUFFER:
+         params[0] = ENUM_TO_FLOAT(ctx->ReadBuffer->ColorReadBuffer);
+         break;
+      case GL_RED_BIAS:
+         params[0] = ctx->Pixel.RedBias;
+         break;
+      case GL_RED_BITS:
+         params[0] = (GLfloat)( ctx->DrawBuffer->Visual.redBits );
+         break;
+      case GL_RED_SCALE:
+         params[0] = ctx->Pixel.RedScale;
+         break;
+      case GL_RENDER_MODE:
+         params[0] = ENUM_TO_FLOAT(ctx->RenderMode);
+         break;
+      case GL_RESCALE_NORMAL:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RescaleNormals);
+         break;
+      case GL_RGBA_MODE:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.rgbMode);
+         break;
+      case GL_SCISSOR_BOX:
+         params[0] = (GLfloat)(ctx->Scissor.X);
+         params[1] = (GLfloat)(ctx->Scissor.Y);
+         params[2] = (GLfloat)(ctx->Scissor.Width);
+         params[3] = (GLfloat)(ctx->Scissor.Height);
+         break;
+      case GL_SCISSOR_TEST:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Scissor.Enabled);
+         break;
+      case GL_SELECTION_BUFFER_SIZE:
+         params[0] = (GLfloat)(ctx->Select.BufferSize);
+         break;
+      case GL_SHADE_MODEL:
+         params[0] = ENUM_TO_FLOAT(ctx->Light.ShadeModel);
+         break;
+      case GL_SHARED_TEXTURE_PALETTE_EXT:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.SharedPalette);
+         break;
+      case GL_STENCIL_BITS:
+         params[0] = (GLfloat)(ctx->DrawBuffer->Visual.stencilBits);
+         break;
+      case GL_STENCIL_CLEAR_VALUE:
+         params[0] = (GLfloat)(ctx->Stencil.Clear);
+         break;
+      case GL_STENCIL_FAIL:
+         params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STENCIL_FUNC:
+         params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STENCIL_PASS_DEPTH_FAIL:
+         params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STENCIL_PASS_DEPTH_PASS:
+         params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STENCIL_REF:
+         params[0] = (GLfloat)(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STENCIL_TEST:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.Enabled);
+         break;
+      case GL_STENCIL_VALUE_MASK:
+         params[0] = (GLfloat)(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STENCIL_WRITEMASK:
+         params[0] = (GLfloat)(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STEREO:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.stereoMode);
+         break;
+      case GL_SUBPIXEL_BITS:
+         params[0] = (GLfloat)(ctx->Const.SubPixelBits);
+         break;
+      case GL_TEXTURE_1D:
+         params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_1D));
+         break;
+      case GL_TEXTURE_2D:
+         params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_2D));
+         break;
+      case GL_TEXTURE_3D:
+         params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_3D));
+         break;
+      case GL_TEXTURE_BINDING_1D:
+         params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
+         break;
+      case GL_TEXTURE_BINDING_2D:
+         params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
+         break;
+      case GL_TEXTURE_BINDING_3D:
+         params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
+         break;
+      case GL_TEXTURE_ENV_COLOR:
+         {
+         const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
+         params[0] = color[0];
+         params[1] = color[1];
+         params[2] = color[2];
+         params[3] = color[3];
+         }
+         break;
+      case GL_TEXTURE_ENV_MODE:
+         params[0] = ENUM_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
+         break;
+      case GL_TEXTURE_GEN_S:
+         params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
+         break;
+      case GL_TEXTURE_GEN_T:
+         params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
+         break;
+      case GL_TEXTURE_GEN_R:
+         params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
+         break;
+      case GL_TEXTURE_GEN_Q:
+         params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
+         break;
+      case GL_TEXTURE_MATRIX:
+         {
+         const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
+         params[0] = matrix[0];
+         params[1] = matrix[1];
+         params[2] = matrix[2];
+         params[3] = matrix[3];
+         params[4] = matrix[4];
+         params[5] = matrix[5];
+         params[6] = matrix[6];
+         params[7] = matrix[7];
+         params[8] = matrix[8];
+         params[9] = matrix[9];
+         params[10] = matrix[10];
+         params[11] = matrix[11];
+         params[12] = matrix[12];
+         params[13] = matrix[13];
+         params[14] = matrix[14];
+         params[15] = matrix[15];
+         }
+         break;
+      case GL_TEXTURE_STACK_DEPTH:
+         params[0] = (GLfloat)(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
+         break;
+      case GL_UNPACK_ALIGNMENT:
+         params[0] = (GLfloat)(ctx->Unpack.Alignment);
+         break;
+      case GL_UNPACK_LSB_FIRST:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.LsbFirst);
+         break;
+      case GL_UNPACK_ROW_LENGTH:
+         params[0] = (GLfloat)(ctx->Unpack.RowLength);
+         break;
+      case GL_UNPACK_SKIP_PIXELS:
+         params[0] = (GLfloat)(ctx->Unpack.SkipPixels);
+         break;
+      case GL_UNPACK_SKIP_ROWS:
+         params[0] = (GLfloat)(ctx->Unpack.SkipRows);
+         break;
+      case GL_UNPACK_SWAP_BYTES:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.SwapBytes);
+         break;
+      case GL_UNPACK_SKIP_IMAGES_EXT:
+         params[0] = (GLfloat)(ctx->Unpack.SkipImages);
+         break;
+      case GL_UNPACK_IMAGE_HEIGHT_EXT:
+         params[0] = (GLfloat)(ctx->Unpack.ImageHeight);
+         break;
+      case GL_UNPACK_CLIENT_STORAGE_APPLE:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.ClientStorage);
+         break;
+      case GL_VIEWPORT:
+         params[0] = (GLfloat)(ctx->Viewport.X);
+         params[1] = (GLfloat)(ctx->Viewport.Y);
+         params[2] = (GLfloat)(ctx->Viewport.Width);
+         params[3] = (GLfloat)(ctx->Viewport.Height);
+         break;
+      case GL_ZOOM_X:
+         params[0] = ctx->Pixel.ZoomX;
+         break;
+      case GL_ZOOM_Y:
+         params[0] = ctx->Pixel.ZoomY;
+         break;
+      case GL_VERTEX_ARRAY:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Enabled);
+         break;
+      case GL_VERTEX_ARRAY_SIZE:
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Size);
+         break;
+      case GL_VERTEX_ARRAY_TYPE:
+         params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Type);
+         break;
+      case GL_VERTEX_ARRAY_STRIDE:
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Stride);
+         break;
+      case GL_VERTEX_ARRAY_COUNT_EXT:
+         params[0] = (GLfloat)(0);
+         break;
+      case GL_NORMAL_ARRAY:
+         params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Enabled);
+         break;
+      case GL_NORMAL_ARRAY_TYPE:
+         params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Type);
+         break;
+      case GL_NORMAL_ARRAY_STRIDE:
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.Stride);
+         break;
+      case GL_NORMAL_ARRAY_COUNT_EXT:
+         params[0] = (GLfloat)(0);
+         break;
+      case GL_COLOR_ARRAY:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Color.Enabled);
+         break;
+      case GL_COLOR_ARRAY_SIZE:
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Size);
+         break;
+      case GL_COLOR_ARRAY_TYPE:
+         params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Color.Type);
+         break;
+      case GL_COLOR_ARRAY_STRIDE:
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Stride);
+         break;
+      case GL_COLOR_ARRAY_COUNT_EXT:
+         params[0] = (GLfloat)(0);
+         break;
+      case GL_INDEX_ARRAY:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Index.Enabled);
+         break;
+      case GL_INDEX_ARRAY_TYPE:
+         params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Index.Type);
+         break;
+      case GL_INDEX_ARRAY_STRIDE:
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.Stride);
+         break;
+      case GL_INDEX_ARRAY_COUNT_EXT:
+         params[0] = (GLfloat)(0);
+         break;
+      case GL_TEXTURE_COORD_ARRAY:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
+         break;
+      case GL_TEXTURE_COORD_ARRAY_SIZE:
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
+         break;
+      case GL_TEXTURE_COORD_ARRAY_TYPE:
+         params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
+         break;
+      case GL_TEXTURE_COORD_ARRAY_STRIDE:
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
+         break;
+      case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
+         params[0] = (GLfloat)(0);
+         break;
+      case GL_EDGE_FLAG_ARRAY:
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
+         break;
+      case GL_EDGE_FLAG_ARRAY_STRIDE:
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.Stride);
+         break;
+      case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
+         params[0] = (GLfloat)(0);
+         break;
+      case GL_MAX_TEXTURE_UNITS_ARB:
+         CHECK_EXT1(ARB_multitexture, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Const.MaxTextureUnits);
+         break;
+      case GL_ACTIVE_TEXTURE_ARB:
+         CHECK_EXT1(ARB_multitexture, "GetFloatv");
+         params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
+         break;
+      case GL_CLIENT_ACTIVE_TEXTURE_ARB:
+         CHECK_EXT1(ARB_multitexture, "GetFloatv");
+         params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
+         break;
+      case GL_TEXTURE_CUBE_MAP_ARB:
+         CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
+         break;
+      case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
+         CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
+         break;
+      case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
+         CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
+         params[0] = (GLfloat)((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
+         break;
+      case GL_TEXTURE_COMPRESSION_HINT_ARB:
+         CHECK_EXT1(ARB_texture_compression, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Hint.TextureCompression);
+         break;
+      case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
+         CHECK_EXT1(ARB_texture_compression, "GetFloatv");
+         params[0] = (GLfloat)(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
+         break;
+      case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
+         CHECK_EXT1(ARB_texture_compression, "GetFloatv");
+         {
+         GLint formats[100];
+         GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
+         ASSERT(n <= 100);
+         for (i = 0; i < n; i++)
+            params[i] = ENUM_TO_INT(formats[i]);
+         }
+         break;
+      case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
+         CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Array.LockFirst);
+         break;
+      case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
+         CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Array.LockCount);
+         break;
+      case GL_TRANSPOSE_COLOR_MATRIX_ARB:
+         {
+         const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
+         params[0] = matrix[0];
+         params[1] = matrix[4];
+         params[2] = matrix[8];
+         params[3] = matrix[12];
+         params[4] = matrix[1];
+         params[5] = matrix[5];
+         params[6] = matrix[9];
+         params[7] = matrix[13];
+         params[8] = matrix[2];
+         params[9] = matrix[6];
+         params[10] = matrix[10];
+         params[11] = matrix[14];
+         params[12] = matrix[3];
+         params[13] = matrix[7];
+         params[14] = matrix[11];
+         params[15] = matrix[15];
+         }
+         break;
+      case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
+         {
+         const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
+         params[0] = matrix[0];
+         params[1] = matrix[4];
+         params[2] = matrix[8];
+         params[3] = matrix[12];
+         params[4] = matrix[1];
+         params[5] = matrix[5];
+         params[6] = matrix[9];
+         params[7] = matrix[13];
+         params[8] = matrix[2];
+         params[9] = matrix[6];
+         params[10] = matrix[10];
+         params[11] = matrix[14];
+         params[12] = matrix[3];
+         params[13] = matrix[7];
+         params[14] = matrix[11];
+         params[15] = matrix[15];
+         }
+         break;
+      case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
+         {
+         const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
+         params[0] = matrix[0];
+         params[1] = matrix[4];
+         params[2] = matrix[8];
+         params[3] = matrix[12];
+         params[4] = matrix[1];
+         params[5] = matrix[5];
+         params[6] = matrix[9];
+         params[7] = matrix[13];
+         params[8] = matrix[2];
+         params[9] = matrix[6];
+         params[10] = matrix[10];
+         params[11] = matrix[14];
+         params[12] = matrix[3];
+         params[13] = matrix[7];
+         params[14] = matrix[11];
+         params[15] = matrix[15];
+         }
+         break;
+      case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
+         {
+         const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
+         params[0] = matrix[0];
+         params[1] = matrix[4];
+         params[2] = matrix[8];
+         params[3] = matrix[12];
+         params[4] = matrix[1];
+         params[5] = matrix[5];
+         params[6] = matrix[9];
+         params[7] = matrix[13];
+         params[8] = matrix[2];
+         params[9] = matrix[6];
+         params[10] = matrix[10];
+         params[11] = matrix[14];
+         params[12] = matrix[3];
+         params[13] = matrix[7];
+         params[14] = matrix[11];
+         params[15] = matrix[15];
+         }
+         break;
+      case GL_COLOR_MATRIX_SGI:
+         {
+         const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
+         params[0] = matrix[0];
+         params[1] = matrix[1];
+         params[2] = matrix[2];
+         params[3] = matrix[3];
+         params[4] = matrix[4];
+         params[5] = matrix[5];
+         params[6] = matrix[6];
+         params[7] = matrix[7];
+         params[8] = matrix[8];
+         params[9] = matrix[9];
+         params[10] = matrix[10];
+         params[11] = matrix[11];
+         params[12] = matrix[12];
+         params[13] = matrix[13];
+         params[14] = matrix[14];
+         params[15] = matrix[15];
+         }
+         break;
+      case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
+         params[0] = (GLfloat)(ctx->ColorMatrixStack.Depth + 1);
+         break;
+      case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
+         params[0] = (GLfloat)(MAX_COLOR_STACK_DEPTH);
+         break;
+      case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
+         params[0] = ctx->Pixel.PostColorMatrixScale[0];
+         break;
+      case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
+         params[0] = ctx->Pixel.PostColorMatrixScale[1];
+         break;
+      case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
+         params[0] = ctx->Pixel.PostColorMatrixScale[2];
+         break;
+      case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
+         params[0] = ctx->Pixel.PostColorMatrixScale[3];
+         break;
+      case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
+         params[0] = ctx->Pixel.PostColorMatrixBias[0];
+         break;
+      case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
+         params[0] = ctx->Pixel.PostColorMatrixBias[1];
+         break;
+      case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
+         params[0] = ctx->Pixel.PostColorMatrixBias[2];
+         break;
+      case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
+         params[0] = ctx->Pixel.PostColorMatrixBias[3];
+         break;
+      case GL_CONVOLUTION_1D_EXT:
+         CHECK_EXT1(EXT_convolution, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution1DEnabled);
+         break;
+      case GL_CONVOLUTION_2D_EXT:
+         CHECK_EXT1(EXT_convolution, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution2DEnabled);
+         break;
+      case GL_SEPARABLE_2D_EXT:
+         CHECK_EXT1(EXT_convolution, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Separable2DEnabled);
+         break;
+      case GL_POST_CONVOLUTION_RED_SCALE_EXT:
+         CHECK_EXT1(EXT_convolution, "GetFloatv");
+         params[0] = ctx->Pixel.PostConvolutionScale[0];
+         break;
+      case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
+         CHECK_EXT1(EXT_convolution, "GetFloatv");
+         params[0] = ctx->Pixel.PostConvolutionScale[1];
+         break;
+      case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
+         CHECK_EXT1(EXT_convolution, "GetFloatv");
+         params[0] = ctx->Pixel.PostConvolutionScale[2];
+         break;
+      case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
+         CHECK_EXT1(EXT_convolution, "GetFloatv");
+         params[0] = ctx->Pixel.PostConvolutionScale[3];
+         break;
+      case GL_POST_CONVOLUTION_RED_BIAS_EXT:
+         CHECK_EXT1(EXT_convolution, "GetFloatv");
+         params[0] = ctx->Pixel.PostConvolutionBias[0];
+         break;
+      case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
+         CHECK_EXT1(EXT_convolution, "GetFloatv");
+         params[0] = ctx->Pixel.PostConvolutionBias[1];
+         break;
+      case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
+         CHECK_EXT1(EXT_convolution, "GetFloatv");
+         params[0] = ctx->Pixel.PostConvolutionBias[2];
+         break;
+      case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
+         CHECK_EXT1(EXT_convolution, "GetFloatv");
+         params[0] = ctx->Pixel.PostConvolutionBias[3];
+         break;
+      case GL_HISTOGRAM:
+         CHECK_EXT1(EXT_histogram, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.HistogramEnabled);
+         break;
+      case GL_MINMAX:
+         CHECK_EXT1(EXT_histogram, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MinMaxEnabled);
+         break;
+      case GL_COLOR_TABLE_SGI:
+         CHECK_EXT1(SGI_color_table, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.ColorTableEnabled);
+         break;
+      case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
+         CHECK_EXT1(SGI_color_table, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostConvolutionColorTableEnabled);
+         break;
+      case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
+         CHECK_EXT1(SGI_color_table, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostColorMatrixColorTableEnabled);
+         break;
+      case GL_TEXTURE_COLOR_TABLE_SGI:
+         CHECK_EXT1(SGI_texture_color_table, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
+         break;
+      case GL_COLOR_SUM_EXT:
+         CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.ColorSumEnabled);
+         break;
+      case GL_CURRENT_SECONDARY_COLOR_EXT:
+         CHECK_EXT1(EXT_secondary_color, "GetFloatv");
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0];
+         params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1];
+         params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2];
+         params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3];
+         }
+         break;
+      case GL_SECONDARY_COLOR_ARRAY_EXT:
+         CHECK_EXT1(EXT_secondary_color, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
+         break;
+      case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
+         CHECK_EXT1(EXT_secondary_color, "GetFloatv");
+         params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Type);
+         break;
+      case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
+         CHECK_EXT1(EXT_secondary_color, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Stride);
+         break;
+      case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
+         CHECK_EXT1(EXT_secondary_color, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Size);
+         break;
+      case GL_CURRENT_FOG_COORDINATE_EXT:
+         CHECK_EXT1(EXT_fog_coord, "GetFloatv");
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = ctx->Current.Attrib[VERT_ATTRIB_FOG][0];
+         }
+         break;
+      case GL_FOG_COORDINATE_ARRAY_EXT:
+         CHECK_EXT1(EXT_fog_coord, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Enabled);
+         break;
+      case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
+         CHECK_EXT1(EXT_fog_coord, "GetFloatv");
+         params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Type);
+         break;
+      case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
+         CHECK_EXT1(EXT_fog_coord, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.Stride);
+         break;
+      case GL_FOG_COORDINATE_SOURCE_EXT:
+         CHECK_EXT1(EXT_fog_coord, "GetFloatv");
+         params[0] = ENUM_TO_FLOAT(ctx->Fog.FogCoordinateSource);
+         break;
+      case GL_MAX_TEXTURE_LOD_BIAS_EXT:
+         CHECK_EXT1(EXT_texture_lod_bias, "GetFloatv");
+         params[0] = ctx->Const.MaxTextureLodBias;
+         break;
+      case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
+         CHECK_EXT1(EXT_texture_filter_anisotropic, "GetFloatv");
+         params[0] = ctx->Const.MaxTextureMaxAnisotropy;
+         break;
+      case GL_MULTISAMPLE_ARB:
+         CHECK_EXT1(ARB_multisample, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.Enabled);
+         break;
+      case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
+         CHECK_EXT1(ARB_multisample, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToCoverage);
+         break;
+      case GL_SAMPLE_ALPHA_TO_ONE_ARB:
+         CHECK_EXT1(ARB_multisample, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToOne);
+         break;
+      case GL_SAMPLE_COVERAGE_ARB:
+         CHECK_EXT1(ARB_multisample, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverage);
+         break;
+      case GL_SAMPLE_COVERAGE_VALUE_ARB:
+         CHECK_EXT1(ARB_multisample, "GetFloatv");
+         params[0] = ctx->Multisample.SampleCoverageValue;
+         break;
+      case GL_SAMPLE_COVERAGE_INVERT_ARB:
+         CHECK_EXT1(ARB_multisample, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverageInvert);
+         break;
+      case GL_SAMPLE_BUFFERS_ARB:
+         CHECK_EXT1(ARB_multisample, "GetFloatv");
+         params[0] = (GLfloat)(ctx->DrawBuffer->Visual.sampleBuffers);
+         break;
+      case GL_SAMPLES_ARB:
+         CHECK_EXT1(ARB_multisample, "GetFloatv");
+         params[0] = (GLfloat)(ctx->DrawBuffer->Visual.samples);
+         break;
+      case GL_RASTER_POSITION_UNCLIPPED_IBM:
+         CHECK_EXT1(IBM_rasterpos_clip, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RasterPositionUnclipped);
+         break;
+      case GL_POINT_SPRITE_NV:
+         CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Point.PointSprite);
+         break;
+      case GL_POINT_SPRITE_R_MODE_NV:
+         CHECK_EXT1(NV_point_sprite, "GetFloatv");
+         params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteRMode);
+         break;
+      case GL_POINT_SPRITE_COORD_ORIGIN:
+         CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
+         params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteOrigin);
+         break;
+      case GL_GENERATE_MIPMAP_HINT_SGIS:
+         CHECK_EXT1(SGIS_generate_mipmap, "GetFloatv");
+         params[0] = ENUM_TO_FLOAT(ctx->Hint.GenerateMipmap);
+         break;
+      case GL_VERTEX_PROGRAM_BINDING_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = (GLfloat)((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY0_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY1_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY2_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY3_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY5_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY6_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY7_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY8_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY9_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY10_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY11_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY12_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY13_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY14_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY15_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB0_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[0]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB1_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[1]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB2_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[2]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB3_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[3]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB4_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[4]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB5_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[5]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB6_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[6]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB7_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[7]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB8_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[8]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB9_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[9]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB10_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[10]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB11_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[11]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB12_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[12]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB13_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[13]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB14_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[14]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB15_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[15]);
+         break;
+      case GL_FRAGMENT_PROGRAM_NV:
+         CHECK_EXT1(NV_fragment_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
+         break;
+      case GL_FRAGMENT_PROGRAM_BINDING_NV:
+         CHECK_EXT1(NV_fragment_program, "GetFloatv");
+         params[0] = (GLfloat)(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
+         break;
+      case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
+         CHECK_EXT1(NV_fragment_program, "GetFloatv");
+         params[0] = (GLfloat)(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
+         break;
+      case GL_TEXTURE_RECTANGLE_NV:
+         CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
+         break;
+      case GL_TEXTURE_BINDING_RECTANGLE_NV:
+         CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
+         break;
+      case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
+         CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Const.MaxTextureRectSize);
+         break;
+      case GL_STENCIL_TEST_TWO_SIDE_EXT:
+         CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.TestTwoSide);
+         break;
+      case GL_ACTIVE_STENCIL_FACE_EXT:
+         CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
+         params[0] = ENUM_TO_FLOAT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
+         break;
+      case GL_MAX_SHININESS_NV:
+         CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
+         params[0] = ctx->Const.MaxShininess;
+         break;
+      case GL_MAX_SPOT_EXPONENT_NV:
+         CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
+         params[0] = ctx->Const.MaxSpotExponent;
+         break;
+      case GL_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Array.ArrayBufferObj->Name);
+         break;
+      case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
+         break;
+      case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.BufferObj->Name);
+         break;
+      case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.BufferObj->Name);
+         break;
+      case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.BufferObj->Name);
+         break;
+      case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
+         break;
+      case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
+         break;
+      case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
+         break;
+      case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
+         break;
+      case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Array.ElementArrayBufferObj->Name);
+         break;
+      case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
+         CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Pack.BufferObj->Name);
+         break;
+      case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
+         CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Unpack.BufferObj->Name);
+         break;
+      case GL_VERTEX_PROGRAM_ARB:
+         CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.Enabled);
+         break;
+      case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
+         CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.PointSizeEnabled);
+         break;
+      case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
+         CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.TwoSideEnabled);
+         break;
+      case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
+         CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Const.MaxProgramMatrixStackDepth);
+         break;
+      case GL_MAX_PROGRAM_MATRICES_ARB:
+         CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Const.MaxProgramMatrices);
+         break;
+      case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
+         CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->CurrentStack->Depth + 1);
+         break;
+      case GL_CURRENT_MATRIX_ARB:
+         CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetFloatv");
+         {
+         const GLfloat *matrix = ctx->CurrentStack->Top->m;
+         params[0] = matrix[0];
+         params[1] = matrix[1];
+         params[2] = matrix[2];
+         params[3] = matrix[3];
+         params[4] = matrix[4];
+         params[5] = matrix[5];
+         params[6] = matrix[6];
+         params[7] = matrix[7];
+         params[8] = matrix[8];
+         params[9] = matrix[9];
+         params[10] = matrix[10];
+         params[11] = matrix[11];
+         params[12] = matrix[12];
+         params[13] = matrix[13];
+         params[14] = matrix[14];
+         params[15] = matrix[15];
+         }
+         break;
+      case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
+         CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetFloatv");
+         {
+         const GLfloat *matrix = ctx->CurrentStack->Top->m;
+         params[0] = matrix[0];
+         params[1] = matrix[4];
+         params[2] = matrix[8];
+         params[3] = matrix[12];
+         params[4] = matrix[1];
+         params[5] = matrix[5];
+         params[6] = matrix[9];
+         params[7] = matrix[13];
+         params[8] = matrix[2];
+         params[9] = matrix[6];
+         params[10] = matrix[10];
+         params[11] = matrix[14];
+         params[12] = matrix[3];
+         params[13] = matrix[7];
+         params[14] = matrix[11];
+         params[15] = matrix[15];
+         }
+         break;
+      case GL_MAX_VERTEX_ATTRIBS_ARB:
+         CHECK_EXT1(ARB_vertex_program, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Const.VertexProgram.MaxAttribs);
+         break;
+      case GL_PROGRAM_ERROR_POSITION_ARB:
+         CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Program.ErrorPos);
+         break;
+      case GL_FRAGMENT_PROGRAM_ARB:
+         CHECK_EXT1(ARB_fragment_program, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
+         break;
+      case GL_MAX_TEXTURE_COORDS_ARB:
+         CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Const.MaxTextureCoordUnits);
+         break;
+      case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
+         CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Const.MaxTextureImageUnits);
+         break;
+      case GL_DEPTH_BOUNDS_TEST_EXT:
+         CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.BoundsTest);
+         break;
+      case GL_DEPTH_BOUNDS_EXT:
+         CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
+         params[0] = ctx->Depth.BoundsMin;
+         params[1] = ctx->Depth.BoundsMax;
+         break;
+      case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
+         CHECK_EXT1(MESA_program_debug, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.CallbackEnabled);
+         break;
+      case GL_VERTEX_PROGRAM_CALLBACK_MESA:
+         CHECK_EXT1(MESA_program_debug, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.CallbackEnabled);
+         break;
+      case GL_FRAGMENT_PROGRAM_POSITION_MESA:
+         CHECK_EXT1(MESA_program_debug, "GetFloatv");
+         params[0] = (GLfloat)(ctx->FragmentProgram.CurrentPosition);
+         break;
+      case GL_VERTEX_PROGRAM_POSITION_MESA:
+         CHECK_EXT1(MESA_program_debug, "GetFloatv");
+         params[0] = (GLfloat)(ctx->VertexProgram.CurrentPosition);
+         break;
+      case GL_MAX_DRAW_BUFFERS_ARB:
+         CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Const.MaxDrawBuffers);
+         break;
+      case GL_DRAW_BUFFER0_ARB:
+         CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
+         params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
+         break;
+      case GL_DRAW_BUFFER1_ARB:
+         CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
+         {
+         GLenum buffer;
+         if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
+            _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
+            return;
+         }
+         buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
+         params[0] = ENUM_TO_FLOAT(buffer);
+         }
+         break;
+      case GL_DRAW_BUFFER2_ARB:
+         CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
+         {
+         GLenum buffer;
+         if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
+            _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
+            return;
+         }
+         buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
+         params[0] = ENUM_TO_FLOAT(buffer);
+         }
+         break;
+      case GL_DRAW_BUFFER3_ARB:
+         CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
+         {
+         GLenum buffer;
+         if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
+            _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
+            return;
+         }
+         buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
+         params[0] = ENUM_TO_FLOAT(buffer);
+         }
+         break;
+      case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
+         CHECK_EXT1(OES_read_format, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Const.ColorReadType);
+         break;
+      case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
+         CHECK_EXT1(OES_read_format, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Const.ColorReadFormat);
+         break;
+      case GL_NUM_FRAGMENT_REGISTERS_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
+         params[0] = (GLfloat)(6);
+         break;
+      case GL_NUM_FRAGMENT_CONSTANTS_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
+         params[0] = (GLfloat)(8);
+         break;
+      case GL_NUM_PASSES_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
+         params[0] = (GLfloat)(2);
+         break;
+      case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
+         params[0] = (GLfloat)(8);
+         break;
+      case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
+         params[0] = (GLfloat)(16);
+         break;
+      case GL_COLOR_ALPHA_PAIRING_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(GL_TRUE);
+         break;
+      case GL_NUM_LOOPBACK_COMPONENTS_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
+         params[0] = (GLfloat)(3);
+         break;
+      case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
+         params[0] = (GLfloat)(3);
+         break;
+      case GL_STENCIL_BACK_FUNC:
+         params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[1]);
+         break;
+      case GL_STENCIL_BACK_VALUE_MASK:
+         params[0] = (GLfloat)(ctx->Stencil.ValueMask[1]);
+         break;
+      case GL_STENCIL_BACK_REF:
+         params[0] = (GLfloat)(ctx->Stencil.Ref[1]);
+         break;
+      case GL_STENCIL_BACK_FAIL:
+         params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[1]);
+         break;
+      case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
+         params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[1]);
+         break;
+      case GL_STENCIL_BACK_PASS_DEPTH_PASS:
+         params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[1]);
+         break;
+      case GL_FRAMEBUFFER_BINDING_EXT:
+         CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
+         params[0] = (GLfloat)(ctx->DrawBuffer->Name);
+         break;
+      case GL_RENDERBUFFER_BINDING_EXT:
+         CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
+         params[0] = (GLfloat)(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
+         break;
+      case GL_MAX_COLOR_ATTACHMENTS_EXT:
+         CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Const.MaxColorAttachments);
+         break;
+      case GL_MAX_RENDERBUFFER_SIZE_EXT:
+         CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
+         params[0] = (GLfloat)(ctx->Const.MaxRenderbufferSize);
+         break;
+      case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
+         CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
+         params[0] = (GLfloat)(MAX_FRAGMENT_UNIFORM_COMPONENTS);
+         break;
+      case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
+         CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
+         params[0] = ENUM_TO_FLOAT(ctx->Hint.FragmentShaderDerivative);
+         break;
+      case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
+         CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
+         params[0] = (GLfloat)(MAX_VERTEX_UNIFORM_COMPONENTS);
+         break;
+      case GL_MAX_VARYING_FLOATS_ARB:
+         CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
+         params[0] = (GLfloat)(MAX_VARYING_FLOATS);
+         break;
+      case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
+         CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
+         params[0] = (GLfloat)(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
+         break;
+      case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
+         CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
+         params[0] = (GLfloat)(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
+         break;
+      default:
+         _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
+   }
+}
+
+void GLAPIENTRY
+_mesa_GetIntegerv( GLenum pname, GLint *params )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+   if (!params)
+      return;
+
+   if (ctx->NewState)
+      _mesa_update_state(ctx);
+
+   if (ctx->Driver.GetIntegerv &&
+       ctx->Driver.GetIntegerv(ctx, pname, params))
+      return;
+
+   switch (pname) {
+      case GL_ACCUM_RED_BITS:
+         params[0] = ctx->DrawBuffer->Visual.accumRedBits;
+         break;
+      case GL_ACCUM_GREEN_BITS:
+         params[0] = ctx->DrawBuffer->Visual.accumGreenBits;
+         break;
+      case GL_ACCUM_BLUE_BITS:
+         params[0] = ctx->DrawBuffer->Visual.accumBlueBits;
+         break;
+      case GL_ACCUM_ALPHA_BITS:
+         params[0] = ctx->DrawBuffer->Visual.accumAlphaBits;
+         break;
+      case GL_ACCUM_CLEAR_VALUE:
+         params[0] = FLOAT_TO_INT(ctx->Accum.ClearColor[0]);
+         params[1] = FLOAT_TO_INT(ctx->Accum.ClearColor[1]);
+         params[2] = FLOAT_TO_INT(ctx->Accum.ClearColor[2]);
+         params[3] = FLOAT_TO_INT(ctx->Accum.ClearColor[3]);
+         break;
+      case GL_ALPHA_BIAS:
+         params[0] = IROUND(ctx->Pixel.AlphaBias);
+         break;
+      case GL_ALPHA_BITS:
+         params[0] = ctx->DrawBuffer->Visual.alphaBits;
+         break;
+      case GL_ALPHA_SCALE:
+         params[0] = IROUND(ctx->Pixel.AlphaScale);
+         break;
+      case GL_ALPHA_TEST:
+         params[0] = BOOLEAN_TO_INT(ctx->Color.AlphaEnabled);
+         break;
+      case GL_ALPHA_TEST_FUNC:
+         params[0] = ENUM_TO_INT(ctx->Color.AlphaFunc);
+         break;
+      case GL_ALPHA_TEST_REF:
+         params[0] = FLOAT_TO_INT(ctx->Color.AlphaRef);
+         break;
+      case GL_ATTRIB_STACK_DEPTH:
+         params[0] = ctx->AttribStackDepth;
+         break;
+      case GL_AUTO_NORMAL:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.AutoNormal);
+         break;
+      case GL_AUX_BUFFERS:
+         params[0] = ctx->DrawBuffer->Visual.numAuxBuffers;
+         break;
+      case GL_BLEND:
+         params[0] = BOOLEAN_TO_INT(ctx->Color.BlendEnabled);
+         break;
+      case GL_BLEND_DST:
+         params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
+         break;
+      case GL_BLEND_SRC:
+         params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
+         break;
+      case GL_BLEND_SRC_RGB_EXT:
+         params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
+         break;
+      case GL_BLEND_DST_RGB_EXT:
+         params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
+         break;
+      case GL_BLEND_SRC_ALPHA_EXT:
+         params[0] = ENUM_TO_INT(ctx->Color.BlendSrcA);
+         break;
+      case GL_BLEND_DST_ALPHA_EXT:
+         params[0] = ENUM_TO_INT(ctx->Color.BlendDstA);
+         break;
+      case GL_BLEND_EQUATION:
+         params[0] = ENUM_TO_INT(ctx->Color.BlendEquationRGB );
+         break;
+      case GL_BLEND_EQUATION_ALPHA_EXT:
+         params[0] = ENUM_TO_INT(ctx->Color.BlendEquationA );
+         break;
+      case GL_BLEND_COLOR_EXT:
+         params[0] = FLOAT_TO_INT(ctx->Color.BlendColor[0]);
+         params[1] = FLOAT_TO_INT(ctx->Color.BlendColor[1]);
+         params[2] = FLOAT_TO_INT(ctx->Color.BlendColor[2]);
+         params[3] = FLOAT_TO_INT(ctx->Color.BlendColor[3]);
+         break;
+      case GL_BLUE_BIAS:
+         params[0] = IROUND(ctx->Pixel.BlueBias);
+         break;
+      case GL_BLUE_BITS:
+         params[0] = ctx->DrawBuffer->Visual.blueBits;
+         break;
+      case GL_BLUE_SCALE:
+         params[0] = IROUND(ctx->Pixel.BlueScale);
+         break;
+      case GL_CLIENT_ATTRIB_STACK_DEPTH:
+         params[0] = ctx->ClientAttribStackDepth;
+         break;
+      case GL_CLIP_PLANE0:
+         params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
+         break;
+      case GL_CLIP_PLANE1:
+         params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
+         break;
+      case GL_CLIP_PLANE2:
+         params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
+         break;
+      case GL_CLIP_PLANE3:
+         params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
+         break;
+      case GL_CLIP_PLANE4:
+         params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
+         break;
+      case GL_CLIP_PLANE5:
+         params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
+         break;
+      case GL_COLOR_CLEAR_VALUE:
+         params[0] = FLOAT_TO_INT(ctx->Color.ClearColor[0]);
+         params[1] = FLOAT_TO_INT(ctx->Color.ClearColor[1]);
+         params[2] = FLOAT_TO_INT(ctx->Color.ClearColor[2]);
+         params[3] = FLOAT_TO_INT(ctx->Color.ClearColor[3]);
+         break;
+      case GL_COLOR_MATERIAL:
+         params[0] = BOOLEAN_TO_INT(ctx->Light.ColorMaterialEnabled);
+         break;
+      case GL_COLOR_MATERIAL_FACE:
+         params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialFace);
+         break;
+      case GL_COLOR_MATERIAL_PARAMETER:
+         params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialMode);
+         break;
+      case GL_COLOR_WRITEMASK:
+         params[0] = ctx->Color.ColorMask[RCOMP] ? 1 : 0;
+         params[1] = ctx->Color.ColorMask[GCOMP] ? 1 : 0;
+         params[2] = ctx->Color.ColorMask[BCOMP] ? 1 : 0;
+         params[3] = ctx->Color.ColorMask[ACOMP] ? 1 : 0;
+         break;
+      case GL_CULL_FACE:
+         params[0] = BOOLEAN_TO_INT(ctx->Polygon.CullFlag);
+         break;
+      case GL_CULL_FACE_MODE:
+         params[0] = ENUM_TO_INT(ctx->Polygon.CullFaceMode);
+         break;
+      case GL_CURRENT_COLOR:
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
+         params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
+         params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
+         params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
+         }
+         break;
+      case GL_CURRENT_INDEX:
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
+         }
+         break;
+      case GL_CURRENT_NORMAL:
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
+         params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
+         params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
+         }
+         break;
+      case GL_CURRENT_RASTER_COLOR:
+         params[0] = FLOAT_TO_INT(ctx->Current.RasterColor[0]);
+         params[1] = FLOAT_TO_INT(ctx->Current.RasterColor[1]);
+         params[2] = FLOAT_TO_INT(ctx->Current.RasterColor[2]);
+         params[3] = FLOAT_TO_INT(ctx->Current.RasterColor[3]);
+         break;
+      case GL_CURRENT_RASTER_DISTANCE:
+         params[0] = IROUND(ctx->Current.RasterDistance);
+         break;
+      case GL_CURRENT_RASTER_INDEX:
+         params[0] = IROUND(ctx->Current.RasterIndex);
+         break;
+      case GL_CURRENT_RASTER_POSITION:
+         params[0] = IROUND(ctx->Current.RasterPos[0]);
+         params[1] = IROUND(ctx->Current.RasterPos[1]);
+         params[2] = IROUND(ctx->Current.RasterPos[2]);
+         params[3] = IROUND(ctx->Current.RasterPos[3]);
+         break;
+      case GL_CURRENT_RASTER_SECONDARY_COLOR:
+         params[0] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[0]);
+         params[1] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[1]);
+         params[2] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[2]);
+         params[3] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[3]);
+         break;
+      case GL_CURRENT_RASTER_TEXTURE_COORDS:
+         {
+         const GLuint texUnit = ctx->Texture.CurrentUnit;
+         params[0] = IROUND(ctx->Current.RasterTexCoords[texUnit][0]);
+         params[1] = IROUND(ctx->Current.RasterTexCoords[texUnit][1]);
+         params[2] = IROUND(ctx->Current.RasterTexCoords[texUnit][2]);
+         params[3] = IROUND(ctx->Current.RasterTexCoords[texUnit][3]);
+         }
+         break;
+      case GL_CURRENT_RASTER_POSITION_VALID:
+         params[0] = BOOLEAN_TO_INT(ctx->Current.RasterPosValid);
+         break;
+      case GL_CURRENT_TEXTURE_COORDS:
+         {
+         const GLuint texUnit = ctx->Texture.CurrentUnit;
+         params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
+         params[1] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
+         params[2] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
+         params[3] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
+         }
+         break;
+      case GL_DEPTH_BIAS:
+         params[0] = IROUND(ctx->Pixel.DepthBias);
+         break;
+      case GL_DEPTH_BITS:
+         params[0] = ctx->DrawBuffer->Visual.depthBits;
+         break;
+      case GL_DEPTH_CLEAR_VALUE:
+         params[0] = IROUND(ctx->Depth.Clear);
+         break;
+      case GL_DEPTH_FUNC:
+         params[0] = ENUM_TO_INT(ctx->Depth.Func);
+         break;
+      case GL_DEPTH_RANGE:
+         params[0] = FLOAT_TO_INT(ctx->Viewport.Near);
+         params[1] = FLOAT_TO_INT(ctx->Viewport.Far);
+         break;
+      case GL_DEPTH_SCALE:
+         params[0] = IROUND(ctx->Pixel.DepthScale);
+         break;
+      case GL_DEPTH_TEST:
+         params[0] = BOOLEAN_TO_INT(ctx->Depth.Test);
+         break;
+      case GL_DEPTH_WRITEMASK:
+         params[0] = BOOLEAN_TO_INT(ctx->Depth.Mask);
+         break;
+      case GL_DITHER:
+         params[0] = BOOLEAN_TO_INT(ctx->Color.DitherFlag);
+         break;
+      case GL_DOUBLEBUFFER:
+         params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.doubleBufferMode);
+         break;
+      case GL_DRAW_BUFFER:
+         params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
+         break;
+      case GL_EDGE_FLAG:
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = BOOLEAN_TO_INT(ctx->Current.EdgeFlag);
+         }
+         break;
+      case GL_FEEDBACK_BUFFER_SIZE:
+         params[0] = ctx->Feedback.BufferSize;
+         break;
+      case GL_FEEDBACK_BUFFER_TYPE:
+         params[0] = ENUM_TO_INT(ctx->Feedback.Type);
+         break;
+      case GL_FOG:
+         params[0] = BOOLEAN_TO_INT(ctx->Fog.Enabled);
+         break;
+      case GL_FOG_COLOR:
+         params[0] = FLOAT_TO_INT(ctx->Fog.Color[0]);
+         params[1] = FLOAT_TO_INT(ctx->Fog.Color[1]);
+         params[2] = FLOAT_TO_INT(ctx->Fog.Color[2]);
+         params[3] = FLOAT_TO_INT(ctx->Fog.Color[3]);
+         break;
+      case GL_FOG_DENSITY:
+         params[0] = IROUND(ctx->Fog.Density);
+         break;
+      case GL_FOG_END:
+         params[0] = IROUND(ctx->Fog.End);
+         break;
+      case GL_FOG_HINT:
+         params[0] = ENUM_TO_INT(ctx->Hint.Fog);
+         break;
+      case GL_FOG_INDEX:
+         params[0] = IROUND(ctx->Fog.Index);
+         break;
+      case GL_FOG_MODE:
+         params[0] = ENUM_TO_INT(ctx->Fog.Mode);
+         break;
+      case GL_FOG_START:
+         params[0] = IROUND(ctx->Fog.Start);
+         break;
+      case GL_FRONT_FACE:
+         params[0] = ENUM_TO_INT(ctx->Polygon.FrontFace);
+         break;
+      case GL_GREEN_BIAS:
+         params[0] = IROUND(ctx->Pixel.GreenBias);
+         break;
+      case GL_GREEN_BITS:
+         params[0] = ctx->DrawBuffer->Visual.greenBits;
+         break;
+      case GL_GREEN_SCALE:
+         params[0] = IROUND(ctx->Pixel.GreenScale);
+         break;
+      case GL_INDEX_BITS:
+         params[0] = ctx->DrawBuffer->Visual.indexBits;
+         break;
+      case GL_INDEX_CLEAR_VALUE:
+         params[0] = ctx->Color.ClearIndex;
+         break;
+      case GL_INDEX_MODE:
+         params[0] = BOOLEAN_TO_INT(!ctx->DrawBuffer->Visual.rgbMode);
+         break;
+      case GL_INDEX_OFFSET:
+         params[0] = ctx->Pixel.IndexOffset;
+         break;
+      case GL_INDEX_SHIFT:
+         params[0] = ctx->Pixel.IndexShift;
+         break;
+      case GL_INDEX_WRITEMASK:
+         params[0] = ctx->Color.IndexMask;
+         break;
+      case GL_LIGHT0:
+         params[0] = BOOLEAN_TO_INT(ctx->Light.Light[0].Enabled);
+         break;
+      case GL_LIGHT1:
+         params[0] = BOOLEAN_TO_INT(ctx->Light.Light[1].Enabled);
+         break;
+      case GL_LIGHT2:
+         params[0] = BOOLEAN_TO_INT(ctx->Light.Light[2].Enabled);
+         break;
+      case GL_LIGHT3:
+         params[0] = BOOLEAN_TO_INT(ctx->Light.Light[3].Enabled);
+         break;
+      case GL_LIGHT4:
+         params[0] = BOOLEAN_TO_INT(ctx->Light.Light[4].Enabled);
+         break;
+      case GL_LIGHT5:
+         params[0] = BOOLEAN_TO_INT(ctx->Light.Light[5].Enabled);
+         break;
+      case GL_LIGHT6:
+         params[0] = BOOLEAN_TO_INT(ctx->Light.Light[6].Enabled);
+         break;
+      case GL_LIGHT7:
+         params[0] = BOOLEAN_TO_INT(ctx->Light.Light[7].Enabled);
+         break;
+      case GL_LIGHTING:
+         params[0] = BOOLEAN_TO_INT(ctx->Light.Enabled);
+         break;
+      case GL_LIGHT_MODEL_AMBIENT:
+         params[0] = FLOAT_TO_INT(ctx->Light.Model.Ambient[0]);
+         params[1] = FLOAT_TO_INT(ctx->Light.Model.Ambient[1]);
+         params[2] = FLOAT_TO_INT(ctx->Light.Model.Ambient[2]);
+         params[3] = FLOAT_TO_INT(ctx->Light.Model.Ambient[3]);
+         break;
+      case GL_LIGHT_MODEL_COLOR_CONTROL:
+         params[0] = ENUM_TO_INT(ctx->Light.Model.ColorControl);
+         break;
+      case GL_LIGHT_MODEL_LOCAL_VIEWER:
+         params[0] = BOOLEAN_TO_INT(ctx->Light.Model.LocalViewer);
+         break;
+      case GL_LIGHT_MODEL_TWO_SIDE:
+         params[0] = BOOLEAN_TO_INT(ctx->Light.Model.TwoSide);
+         break;
+      case GL_LINE_SMOOTH:
+         params[0] = BOOLEAN_TO_INT(ctx->Line.SmoothFlag);
+         break;
+      case GL_LINE_SMOOTH_HINT:
+         params[0] = ENUM_TO_INT(ctx->Hint.LineSmooth);
+         break;
+      case GL_LINE_STIPPLE:
+         params[0] = BOOLEAN_TO_INT(ctx->Line.StippleFlag);
+         break;
+      case GL_LINE_STIPPLE_PATTERN:
+         params[0] = ctx->Line.StipplePattern;
+         break;
+      case GL_LINE_STIPPLE_REPEAT:
+         params[0] = ctx->Line.StippleFactor;
+         break;
+      case GL_LINE_WIDTH:
+         params[0] = IROUND(ctx->Line.Width);
+         break;
+      case GL_LINE_WIDTH_GRANULARITY:
+         params[0] = IROUND(ctx->Const.LineWidthGranularity);
+         break;
+      case GL_LINE_WIDTH_RANGE:
+         params[0] = IROUND(ctx->Const.MinLineWidthAA);
+         params[1] = IROUND(ctx->Const.MaxLineWidthAA);
+         break;
+      case GL_ALIASED_LINE_WIDTH_RANGE:
+         params[0] = IROUND(ctx->Const.MinLineWidth);
+         params[1] = IROUND(ctx->Const.MaxLineWidth);
+         break;
+      case GL_LIST_BASE:
+         params[0] = ctx->List.ListBase;
+         break;
+      case GL_LIST_INDEX:
+         params[0] = ctx->ListState.CurrentListNum;
+         break;
+      case GL_LIST_MODE:
+         {
+         GLenum mode;
+         if (!ctx->CompileFlag)
+            mode = 0;
+         else if (ctx->ExecuteFlag)
+            mode = GL_COMPILE_AND_EXECUTE;
+         else
+            mode = GL_COMPILE;
+         params[0] = ENUM_TO_INT(mode);
+         }
+         break;
+      case GL_INDEX_LOGIC_OP:
+         params[0] = BOOLEAN_TO_INT(ctx->Color.IndexLogicOpEnabled);
+         break;
+      case GL_COLOR_LOGIC_OP:
+         params[0] = BOOLEAN_TO_INT(ctx->Color.ColorLogicOpEnabled);
+         break;
+      case GL_LOGIC_OP_MODE:
+         params[0] = ENUM_TO_INT(ctx->Color.LogicOp);
+         break;
+      case GL_MAP1_COLOR_4:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Color4);
+         break;
+      case GL_MAP1_GRID_DOMAIN:
+         params[0] = IROUND(ctx->Eval.MapGrid1u1);
+         params[1] = IROUND(ctx->Eval.MapGrid1u2);
+         break;
+      case GL_MAP1_GRID_SEGMENTS:
+         params[0] = ctx->Eval.MapGrid1un;
+         break;
+      case GL_MAP1_INDEX:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Index);
+         break;
+      case GL_MAP1_NORMAL:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Normal);
+         break;
+      case GL_MAP1_TEXTURE_COORD_1:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord1);
+         break;
+      case GL_MAP1_TEXTURE_COORD_2:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord2);
+         break;
+      case GL_MAP1_TEXTURE_COORD_3:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord3);
+         break;
+      case GL_MAP1_TEXTURE_COORD_4:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord4);
+         break;
+      case GL_MAP1_VERTEX_3:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex3);
+         break;
+      case GL_MAP1_VERTEX_4:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex4);
+         break;
+      case GL_MAP2_COLOR_4:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Color4);
+         break;
+      case GL_MAP2_GRID_DOMAIN:
+         params[0] = IROUND(ctx->Eval.MapGrid2u1);
+         params[1] = IROUND(ctx->Eval.MapGrid2u2);
+         params[2] = IROUND(ctx->Eval.MapGrid2v1);
+         params[3] = IROUND(ctx->Eval.MapGrid2v2);
+         break;
+      case GL_MAP2_GRID_SEGMENTS:
+         params[0] = ctx->Eval.MapGrid2un;
+         params[1] = ctx->Eval.MapGrid2vn;
+         break;
+      case GL_MAP2_INDEX:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Index);
+         break;
+      case GL_MAP2_NORMAL:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Normal);
+         break;
+      case GL_MAP2_TEXTURE_COORD_1:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord1);
+         break;
+      case GL_MAP2_TEXTURE_COORD_2:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord2);
+         break;
+      case GL_MAP2_TEXTURE_COORD_3:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord3);
+         break;
+      case GL_MAP2_TEXTURE_COORD_4:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord4);
+         break;
+      case GL_MAP2_VERTEX_3:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex3);
+         break;
+      case GL_MAP2_VERTEX_4:
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex4);
+         break;
+      case GL_MAP_COLOR:
+         params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapColorFlag);
+         break;
+      case GL_MAP_STENCIL:
+         params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapStencilFlag);
+         break;
+      case GL_MATRIX_MODE:
+         params[0] = ENUM_TO_INT(ctx->Transform.MatrixMode);
+         break;
+      case GL_MAX_ATTRIB_STACK_DEPTH:
+         params[0] = MAX_ATTRIB_STACK_DEPTH;
+         break;
+      case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
+         params[0] = MAX_CLIENT_ATTRIB_STACK_DEPTH;
+         break;
+      case GL_MAX_CLIP_PLANES:
+         params[0] = ctx->Const.MaxClipPlanes;
+         break;
+      case GL_MAX_ELEMENTS_VERTICES:
+         params[0] = ctx->Const.MaxArrayLockSize;
+         break;
+      case GL_MAX_ELEMENTS_INDICES:
+         params[0] = ctx->Const.MaxArrayLockSize;
+         break;
+      case GL_MAX_EVAL_ORDER:
+         params[0] = MAX_EVAL_ORDER;
+         break;
+      case GL_MAX_LIGHTS:
+         params[0] = ctx->Const.MaxLights;
+         break;
+      case GL_MAX_LIST_NESTING:
+         params[0] = MAX_LIST_NESTING;
+         break;
+      case GL_MAX_MODELVIEW_STACK_DEPTH:
+         params[0] = MAX_MODELVIEW_STACK_DEPTH;
+         break;
+      case GL_MAX_NAME_STACK_DEPTH:
+         params[0] = MAX_NAME_STACK_DEPTH;
+         break;
+      case GL_MAX_PIXEL_MAP_TABLE:
+         params[0] = MAX_PIXEL_MAP_TABLE;
+         break;
+      case GL_MAX_PROJECTION_STACK_DEPTH:
+         params[0] = MAX_PROJECTION_STACK_DEPTH;
+         break;
+      case GL_MAX_TEXTURE_SIZE:
+         params[0] = 1 << (ctx->Const.MaxTextureLevels - 1);
+         break;
+      case GL_MAX_3D_TEXTURE_SIZE:
+         params[0] = 1 << (ctx->Const.Max3DTextureLevels - 1);
+         break;
+      case GL_MAX_TEXTURE_STACK_DEPTH:
+         params[0] = MAX_TEXTURE_STACK_DEPTH;
+         break;
+      case GL_MAX_VIEWPORT_DIMS:
+         params[0] = ctx->Const.MaxViewportWidth;
+         params[1] = ctx->Const.MaxViewportHeight;
+         break;
+      case GL_MODELVIEW_MATRIX:
+         {
+         const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
+         params[0] = IROUND(matrix[0]);
+         params[1] = IROUND(matrix[1]);
+         params[2] = IROUND(matrix[2]);
+         params[3] = IROUND(matrix[3]);
+         params[4] = IROUND(matrix[4]);
+         params[5] = IROUND(matrix[5]);
+         params[6] = IROUND(matrix[6]);
+         params[7] = IROUND(matrix[7]);
+         params[8] = IROUND(matrix[8]);
+         params[9] = IROUND(matrix[9]);
+         params[10] = IROUND(matrix[10]);
+         params[11] = IROUND(matrix[11]);
+         params[12] = IROUND(matrix[12]);
+         params[13] = IROUND(matrix[13]);
+         params[14] = IROUND(matrix[14]);
+         params[15] = IROUND(matrix[15]);
+         }
+         break;
+      case GL_MODELVIEW_STACK_DEPTH:
+         params[0] = ctx->ModelviewMatrixStack.Depth + 1;
+         break;
+      case GL_NAME_STACK_DEPTH:
+         params[0] = ctx->Select.NameStackDepth;
+         break;
+      case GL_NORMALIZE:
+         params[0] = BOOLEAN_TO_INT(ctx->Transform.Normalize);
+         break;
+      case GL_PACK_ALIGNMENT:
+         params[0] = ctx->Pack.Alignment;
+         break;
+      case GL_PACK_LSB_FIRST:
+         params[0] = BOOLEAN_TO_INT(ctx->Pack.LsbFirst);
+         break;
+      case GL_PACK_ROW_LENGTH:
+         params[0] = ctx->Pack.RowLength;
+         break;
+      case GL_PACK_SKIP_PIXELS:
+         params[0] = ctx->Pack.SkipPixels;
+         break;
+      case GL_PACK_SKIP_ROWS:
+         params[0] = ctx->Pack.SkipRows;
+         break;
+      case GL_PACK_SWAP_BYTES:
+         params[0] = BOOLEAN_TO_INT(ctx->Pack.SwapBytes);
+         break;
+      case GL_PACK_SKIP_IMAGES_EXT:
+         params[0] = ctx->Pack.SkipImages;
+         break;
+      case GL_PACK_IMAGE_HEIGHT_EXT:
+         params[0] = ctx->Pack.ImageHeight;
+         break;
+      case GL_PACK_INVERT_MESA:
+         params[0] = BOOLEAN_TO_INT(ctx->Pack.Invert);
+         break;
+      case GL_PERSPECTIVE_CORRECTION_HINT:
+         params[0] = ENUM_TO_INT(ctx->Hint.PerspectiveCorrection);
+         break;
+      case GL_PIXEL_MAP_A_TO_A_SIZE:
+         params[0] = ctx->Pixel.MapAtoAsize;
+         break;
+      case GL_PIXEL_MAP_B_TO_B_SIZE:
+         params[0] = ctx->Pixel.MapBtoBsize;
+         break;
+      case GL_PIXEL_MAP_G_TO_G_SIZE:
+         params[0] = ctx->Pixel.MapGtoGsize;
+         break;
+      case GL_PIXEL_MAP_I_TO_A_SIZE:
+         params[0] = ctx->Pixel.MapItoAsize;
+         break;
+      case GL_PIXEL_MAP_I_TO_B_SIZE:
+         params[0] = ctx->Pixel.MapItoBsize;
+         break;
+      case GL_PIXEL_MAP_I_TO_G_SIZE:
+         params[0] = ctx->Pixel.MapItoGsize;
+         break;
+      case GL_PIXEL_MAP_I_TO_I_SIZE:
+         params[0] = ctx->Pixel.MapItoIsize;
+         break;
+      case GL_PIXEL_MAP_I_TO_R_SIZE:
+         params[0] = ctx->Pixel.MapItoRsize;
+         break;
+      case GL_PIXEL_MAP_R_TO_R_SIZE:
+         params[0] = ctx->Pixel.MapRtoRsize;
+         break;
+      case GL_PIXEL_MAP_S_TO_S_SIZE:
+         params[0] = ctx->Pixel.MapStoSsize;
+         break;
+      case GL_POINT_SIZE:
+         params[0] = IROUND(ctx->Point.Size);
+         break;
+      case GL_POINT_SIZE_GRANULARITY:
+         params[0] = IROUND(ctx->Const.PointSizeGranularity);
+         break;
+      case GL_POINT_SIZE_RANGE:
+         params[0] = IROUND(ctx->Const.MinPointSizeAA);
+         params[1] = IROUND(ctx->Const.MaxPointSizeAA);
+         break;
+      case GL_ALIASED_POINT_SIZE_RANGE:
+         params[0] = IROUND(ctx->Const.MinPointSize);
+         params[1] = IROUND(ctx->Const.MaxPointSize);
+         break;
+      case GL_POINT_SMOOTH:
+         params[0] = BOOLEAN_TO_INT(ctx->Point.SmoothFlag);
+         break;
+      case GL_POINT_SMOOTH_HINT:
+         params[0] = ENUM_TO_INT(ctx->Hint.PointSmooth);
+         break;
+      case GL_POINT_SIZE_MIN_EXT:
+         params[0] = IROUND(ctx->Point.MinSize);
+         break;
+      case GL_POINT_SIZE_MAX_EXT:
+         params[0] = IROUND(ctx->Point.MaxSize);
+         break;
+      case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
+         params[0] = IROUND(ctx->Point.Threshold);
+         break;
+      case GL_DISTANCE_ATTENUATION_EXT:
+         params[0] = IROUND(ctx->Point.Params[0]);
+         params[1] = IROUND(ctx->Point.Params[1]);
+         params[2] = IROUND(ctx->Point.Params[2]);
+         break;
+      case GL_POLYGON_MODE:
+         params[0] = ENUM_TO_INT(ctx->Polygon.FrontMode);
+         params[1] = ENUM_TO_INT(ctx->Polygon.BackMode);
+         break;
+      case GL_POLYGON_OFFSET_BIAS_EXT:
+         params[0] = IROUND(ctx->Polygon.OffsetUnits);
+         break;
+      case GL_POLYGON_OFFSET_FACTOR:
+         params[0] = IROUND(ctx->Polygon.OffsetFactor );
+         break;
+      case GL_POLYGON_OFFSET_UNITS:
+         params[0] = IROUND(ctx->Polygon.OffsetUnits );
+         break;
+      case GL_POLYGON_SMOOTH:
+         params[0] = BOOLEAN_TO_INT(ctx->Polygon.SmoothFlag);
+         break;
+      case GL_POLYGON_SMOOTH_HINT:
+         params[0] = ENUM_TO_INT(ctx->Hint.PolygonSmooth);
+         break;
+      case GL_POLYGON_STIPPLE:
+         params[0] = BOOLEAN_TO_INT(ctx->Polygon.StippleFlag);
+         break;
+      case GL_PROJECTION_MATRIX:
+         {
+         const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
+         params[0] = IROUND(matrix[0]);
+         params[1] = IROUND(matrix[1]);
+         params[2] = IROUND(matrix[2]);
+         params[3] = IROUND(matrix[3]);
+         params[4] = IROUND(matrix[4]);
+         params[5] = IROUND(matrix[5]);
+         params[6] = IROUND(matrix[6]);
+         params[7] = IROUND(matrix[7]);
+         params[8] = IROUND(matrix[8]);
+         params[9] = IROUND(matrix[9]);
+         params[10] = IROUND(matrix[10]);
+         params[11] = IROUND(matrix[11]);
+         params[12] = IROUND(matrix[12]);
+         params[13] = IROUND(matrix[13]);
+         params[14] = IROUND(matrix[14]);
+         params[15] = IROUND(matrix[15]);
+         }
+         break;
+      case GL_PROJECTION_STACK_DEPTH:
+         params[0] = ctx->ProjectionMatrixStack.Depth + 1;
+         break;
+      case GL_READ_BUFFER:
+         params[0] = ENUM_TO_INT(ctx->ReadBuffer->ColorReadBuffer);
+         break;
+      case GL_RED_BIAS:
+         params[0] = IROUND(ctx->Pixel.RedBias);
+         break;
+      case GL_RED_BITS:
+         params[0] =  ctx->DrawBuffer->Visual.redBits ;
+         break;
+      case GL_RED_SCALE:
+         params[0] = IROUND(ctx->Pixel.RedScale);
+         break;
+      case GL_RENDER_MODE:
+         params[0] = ENUM_TO_INT(ctx->RenderMode);
+         break;
+      case GL_RESCALE_NORMAL:
+         params[0] = BOOLEAN_TO_INT(ctx->Transform.RescaleNormals);
+         break;
+      case GL_RGBA_MODE:
+         params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.rgbMode);
+         break;
+      case GL_SCISSOR_BOX:
+         params[0] = ctx->Scissor.X;
+         params[1] = ctx->Scissor.Y;
+         params[2] = ctx->Scissor.Width;
+         params[3] = ctx->Scissor.Height;
+         break;
+      case GL_SCISSOR_TEST:
+         params[0] = BOOLEAN_TO_INT(ctx->Scissor.Enabled);
+         break;
+      case GL_SELECTION_BUFFER_SIZE:
+         params[0] = ctx->Select.BufferSize;
+         break;
+      case GL_SHADE_MODEL:
+         params[0] = ENUM_TO_INT(ctx->Light.ShadeModel);
+         break;
+      case GL_SHARED_TEXTURE_PALETTE_EXT:
+         params[0] = BOOLEAN_TO_INT(ctx->Texture.SharedPalette);
+         break;
+      case GL_STENCIL_BITS:
+         params[0] = ctx->DrawBuffer->Visual.stencilBits;
+         break;
+      case GL_STENCIL_CLEAR_VALUE:
+         params[0] = ctx->Stencil.Clear;
+         break;
+      case GL_STENCIL_FAIL:
+         params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STENCIL_FUNC:
+         params[0] = ENUM_TO_INT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STENCIL_PASS_DEPTH_FAIL:
+         params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STENCIL_PASS_DEPTH_PASS:
+         params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
+         break;
+      case GL_STENCIL_REF:
+         params[0] = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
+         break;
+      case GL_STENCIL_TEST:
+         params[0] = BOOLEAN_TO_INT(ctx->Stencil.Enabled);
+         break;
+      case GL_STENCIL_VALUE_MASK:
+         params[0] = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
+         break;
+      case GL_STENCIL_WRITEMASK:
+         params[0] = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace];
+         break;
+      case GL_STEREO:
+         params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.stereoMode);
+         break;
+      case GL_SUBPIXEL_BITS:
+         params[0] = ctx->Const.SubPixelBits;
+         break;
+      case GL_TEXTURE_1D:
+         params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_1D));
+         break;
+      case GL_TEXTURE_2D:
+         params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_2D));
+         break;
+      case GL_TEXTURE_3D:
+         params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_3D));
+         break;
+      case GL_TEXTURE_BINDING_1D:
+         params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name;
+         break;
+      case GL_TEXTURE_BINDING_2D:
+         params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name;
+         break;
+      case GL_TEXTURE_BINDING_3D:
+         params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name;
+         break;
+      case GL_TEXTURE_ENV_COLOR:
+         {
+         const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
+         params[0] = FLOAT_TO_INT(color[0]);
+         params[1] = FLOAT_TO_INT(color[1]);
+         params[2] = FLOAT_TO_INT(color[2]);
+         params[3] = FLOAT_TO_INT(color[3]);
+         }
+         break;
+      case GL_TEXTURE_ENV_MODE:
+         params[0] = ENUM_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
+         break;
+      case GL_TEXTURE_GEN_S:
+         params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
+         break;
+      case GL_TEXTURE_GEN_T:
+         params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
+         break;
+      case GL_TEXTURE_GEN_R:
+         params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
+         break;
+      case GL_TEXTURE_GEN_Q:
+         params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
+         break;
+      case GL_TEXTURE_MATRIX:
+         {
+         const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
+         params[0] = IROUND(matrix[0]);
+         params[1] = IROUND(matrix[1]);
+         params[2] = IROUND(matrix[2]);
+         params[3] = IROUND(matrix[3]);
+         params[4] = IROUND(matrix[4]);
+         params[5] = IROUND(matrix[5]);
+         params[6] = IROUND(matrix[6]);
+         params[7] = IROUND(matrix[7]);
+         params[8] = IROUND(matrix[8]);
+         params[9] = IROUND(matrix[9]);
+         params[10] = IROUND(matrix[10]);
+         params[11] = IROUND(matrix[11]);
+         params[12] = IROUND(matrix[12]);
+         params[13] = IROUND(matrix[13]);
+         params[14] = IROUND(matrix[14]);
+         params[15] = IROUND(matrix[15]);
+         }
+         break;
+      case GL_TEXTURE_STACK_DEPTH:
+         params[0] = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1;
+         break;
+      case GL_UNPACK_ALIGNMENT:
+         params[0] = ctx->Unpack.Alignment;
+         break;
+      case GL_UNPACK_LSB_FIRST:
+         params[0] = BOOLEAN_TO_INT(ctx->Unpack.LsbFirst);
+         break;
+      case GL_UNPACK_ROW_LENGTH:
+         params[0] = ctx->Unpack.RowLength;
+         break;
+      case GL_UNPACK_SKIP_PIXELS:
+         params[0] = ctx->Unpack.SkipPixels;
+         break;
+      case GL_UNPACK_SKIP_ROWS:
+         params[0] = ctx->Unpack.SkipRows;
+         break;
+      case GL_UNPACK_SWAP_BYTES:
+         params[0] = BOOLEAN_TO_INT(ctx->Unpack.SwapBytes);
+         break;
+      case GL_UNPACK_SKIP_IMAGES_EXT:
+         params[0] = ctx->Unpack.SkipImages;
+         break;
+      case GL_UNPACK_IMAGE_HEIGHT_EXT:
+         params[0] = ctx->Unpack.ImageHeight;
+         break;
+      case GL_UNPACK_CLIENT_STORAGE_APPLE:
+         params[0] = BOOLEAN_TO_INT(ctx->Unpack.ClientStorage);
+         break;
+      case GL_VIEWPORT:
+         params[0] = ctx->Viewport.X;
+         params[1] = ctx->Viewport.Y;
+         params[2] = ctx->Viewport.Width;
+         params[3] = ctx->Viewport.Height;
+         break;
+      case GL_ZOOM_X:
+         params[0] = IROUND(ctx->Pixel.ZoomX);
+         break;
+      case GL_ZOOM_Y:
+         params[0] = IROUND(ctx->Pixel.ZoomY);
+         break;
+      case GL_VERTEX_ARRAY:
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Vertex.Enabled);
+         break;
+      case GL_VERTEX_ARRAY_SIZE:
+         params[0] = ctx->Array.ArrayObj->Vertex.Size;
+         break;
+      case GL_VERTEX_ARRAY_TYPE:
+         params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Vertex.Type);
+         break;
+      case GL_VERTEX_ARRAY_STRIDE:
+         params[0] = ctx->Array.ArrayObj->Vertex.Stride;
+         break;
+      case GL_VERTEX_ARRAY_COUNT_EXT:
+         params[0] = 0;
+         break;
+      case GL_NORMAL_ARRAY:
+         params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Enabled);
+         break;
+      case GL_NORMAL_ARRAY_TYPE:
+         params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Type);
+         break;
+      case GL_NORMAL_ARRAY_STRIDE:
+         params[0] = ctx->Array.ArrayObj->Normal.Stride;
+         break;
+      case GL_NORMAL_ARRAY_COUNT_EXT:
+         params[0] = 0;
+         break;
+      case GL_COLOR_ARRAY:
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Color.Enabled);
+         break;
+      case GL_COLOR_ARRAY_SIZE:
+         params[0] = ctx->Array.ArrayObj->Color.Size;
+         break;
+      case GL_COLOR_ARRAY_TYPE:
+         params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Color.Type);
+         break;
+      case GL_COLOR_ARRAY_STRIDE:
+         params[0] = ctx->Array.ArrayObj->Color.Stride;
+         break;
+      case GL_COLOR_ARRAY_COUNT_EXT:
+         params[0] = 0;
+         break;
+      case GL_INDEX_ARRAY:
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Index.Enabled);
+         break;
+      case GL_INDEX_ARRAY_TYPE:
+         params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Index.Type);
+         break;
+      case GL_INDEX_ARRAY_STRIDE:
+         params[0] = ctx->Array.ArrayObj->Index.Stride;
+         break;
+      case GL_INDEX_ARRAY_COUNT_EXT:
+         params[0] = 0;
+         break;
+      case GL_TEXTURE_COORD_ARRAY:
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
+         break;
+      case GL_TEXTURE_COORD_ARRAY_SIZE:
+         params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size;
+         break;
+      case GL_TEXTURE_COORD_ARRAY_TYPE:
+         params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
+         break;
+      case GL_TEXTURE_COORD_ARRAY_STRIDE:
+         params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride;
+         break;
+      case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
+         params[0] = 0;
+         break;
+      case GL_EDGE_FLAG_ARRAY:
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
+         break;
+      case GL_EDGE_FLAG_ARRAY_STRIDE:
+         params[0] = ctx->Array.ArrayObj->EdgeFlag.Stride;
+         break;
+      case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
+         params[0] = 0;
+         break;
+      case GL_MAX_TEXTURE_UNITS_ARB:
+         CHECK_EXT1(ARB_multitexture, "GetIntegerv");
+         params[0] = ctx->Const.MaxTextureUnits;
+         break;
+      case GL_ACTIVE_TEXTURE_ARB:
+         CHECK_EXT1(ARB_multitexture, "GetIntegerv");
+         params[0] = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
+         break;
+      case GL_CLIENT_ACTIVE_TEXTURE_ARB:
+         CHECK_EXT1(ARB_multitexture, "GetIntegerv");
+         params[0] = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
+         break;
+      case GL_TEXTURE_CUBE_MAP_ARB:
+         CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
+         break;
+      case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
+         CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
+         params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name;
+         break;
+      case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
+         CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
+         params[0] = (1 << (ctx->Const.MaxCubeTextureLevels - 1));
+         break;
+      case GL_TEXTURE_COMPRESSION_HINT_ARB:
+         CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
+         params[0] = ctx->Hint.TextureCompression;
+         break;
+      case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
+         CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
+         params[0] = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE);
+         break;
+      case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
+         CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
+         {
+         GLint formats[100];
+         GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
+         ASSERT(n <= 100);
+         for (i = 0; i < n; i++)
+            params[i] = ENUM_TO_INT(formats[i]);
+         }
+         break;
+      case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
+         CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
+         params[0] = ctx->Array.LockFirst;
+         break;
+      case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
+         CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
+         params[0] = ctx->Array.LockCount;
+         break;
+      case GL_TRANSPOSE_COLOR_MATRIX_ARB:
+         {
+         const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
+         params[0] = IROUND(matrix[0]);
+         params[1] = IROUND(matrix[4]);
+         params[2] = IROUND(matrix[8]);
+         params[3] = IROUND(matrix[12]);
+         params[4] = IROUND(matrix[1]);
+         params[5] = IROUND(matrix[5]);
+         params[6] = IROUND(matrix[9]);
+         params[7] = IROUND(matrix[13]);
+         params[8] = IROUND(matrix[2]);
+         params[9] = IROUND(matrix[6]);
+         params[10] = IROUND(matrix[10]);
+         params[11] = IROUND(matrix[14]);
+         params[12] = IROUND(matrix[3]);
+         params[13] = IROUND(matrix[7]);
+         params[14] = IROUND(matrix[11]);
+         params[15] = IROUND(matrix[15]);
+         }
+         break;
+      case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
+         {
+         const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
+         params[0] = IROUND(matrix[0]);
+         params[1] = IROUND(matrix[4]);
+         params[2] = IROUND(matrix[8]);
+         params[3] = IROUND(matrix[12]);
+         params[4] = IROUND(matrix[1]);
+         params[5] = IROUND(matrix[5]);
+         params[6] = IROUND(matrix[9]);
+         params[7] = IROUND(matrix[13]);
+         params[8] = IROUND(matrix[2]);
+         params[9] = IROUND(matrix[6]);
+         params[10] = IROUND(matrix[10]);
+         params[11] = IROUND(matrix[14]);
+         params[12] = IROUND(matrix[3]);
+         params[13] = IROUND(matrix[7]);
+         params[14] = IROUND(matrix[11]);
+         params[15] = IROUND(matrix[15]);
+         }
+         break;
+      case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
+         {
+         const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
+         params[0] = IROUND(matrix[0]);
+         params[1] = IROUND(matrix[4]);
+         params[2] = IROUND(matrix[8]);
+         params[3] = IROUND(matrix[12]);
+         params[4] = IROUND(matrix[1]);
+         params[5] = IROUND(matrix[5]);
+         params[6] = IROUND(matrix[9]);
+         params[7] = IROUND(matrix[13]);
+         params[8] = IROUND(matrix[2]);
+         params[9] = IROUND(matrix[6]);
+         params[10] = IROUND(matrix[10]);
+         params[11] = IROUND(matrix[14]);
+         params[12] = IROUND(matrix[3]);
+         params[13] = IROUND(matrix[7]);
+         params[14] = IROUND(matrix[11]);
+         params[15] = IROUND(matrix[15]);
+         }
+         break;
+      case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
+         {
+         const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
+         params[0] = IROUND(matrix[0]);
+         params[1] = IROUND(matrix[4]);
+         params[2] = IROUND(matrix[8]);
+         params[3] = IROUND(matrix[12]);
+         params[4] = IROUND(matrix[1]);
+         params[5] = IROUND(matrix[5]);
+         params[6] = IROUND(matrix[9]);
+         params[7] = IROUND(matrix[13]);
+         params[8] = IROUND(matrix[2]);
+         params[9] = IROUND(matrix[6]);
+         params[10] = IROUND(matrix[10]);
+         params[11] = IROUND(matrix[14]);
+         params[12] = IROUND(matrix[3]);
+         params[13] = IROUND(matrix[7]);
+         params[14] = IROUND(matrix[11]);
+         params[15] = IROUND(matrix[15]);
+         }
+         break;
+      case GL_COLOR_MATRIX_SGI:
+         {
+         const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
+         params[0] = IROUND(matrix[0]);
+         params[1] = IROUND(matrix[1]);
+         params[2] = IROUND(matrix[2]);
+         params[3] = IROUND(matrix[3]);
+         params[4] = IROUND(matrix[4]);
+         params[5] = IROUND(matrix[5]);
+         params[6] = IROUND(matrix[6]);
+         params[7] = IROUND(matrix[7]);
+         params[8] = IROUND(matrix[8]);
+         params[9] = IROUND(matrix[9]);
+         params[10] = IROUND(matrix[10]);
+         params[11] = IROUND(matrix[11]);
+         params[12] = IROUND(matrix[12]);
+         params[13] = IROUND(matrix[13]);
+         params[14] = IROUND(matrix[14]);
+         params[15] = IROUND(matrix[15]);
+         }
+         break;
+      case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
+         params[0] = ctx->ColorMatrixStack.Depth + 1;
+         break;
+      case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
+         params[0] = MAX_COLOR_STACK_DEPTH;
+         break;
+      case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
+         params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[0]);
+         break;
+      case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
+         params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[1]);
+         break;
+      case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
+         params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[2]);
+         break;
+      case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
+         params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[3]);
+         break;
+      case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
+         params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[0]);
+         break;
+      case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
+         params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[1]);
+         break;
+      case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
+         params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[2]);
+         break;
+      case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
+         params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[3]);
+         break;
+      case GL_CONVOLUTION_1D_EXT:
+         CHECK_EXT1(EXT_convolution, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution1DEnabled);
+         break;
+      case GL_CONVOLUTION_2D_EXT:
+         CHECK_EXT1(EXT_convolution, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution2DEnabled);
+         break;
+      case GL_SEPARABLE_2D_EXT:
+         CHECK_EXT1(EXT_convolution, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Pixel.Separable2DEnabled);
+         break;
+      case GL_POST_CONVOLUTION_RED_SCALE_EXT:
+         CHECK_EXT1(EXT_convolution, "GetIntegerv");
+         params[0] = IROUND(ctx->Pixel.PostConvolutionScale[0]);
+         break;
+      case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
+         CHECK_EXT1(EXT_convolution, "GetIntegerv");
+         params[0] = IROUND(ctx->Pixel.PostConvolutionScale[1]);
+         break;
+      case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
+         CHECK_EXT1(EXT_convolution, "GetIntegerv");
+         params[0] = IROUND(ctx->Pixel.PostConvolutionScale[2]);
+         break;
+      case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
+         CHECK_EXT1(EXT_convolution, "GetIntegerv");
+         params[0] = IROUND(ctx->Pixel.PostConvolutionScale[3]);
+         break;
+      case GL_POST_CONVOLUTION_RED_BIAS_EXT:
+         CHECK_EXT1(EXT_convolution, "GetIntegerv");
+         params[0] = IROUND(ctx->Pixel.PostConvolutionBias[0]);
+         break;
+      case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
+         CHECK_EXT1(EXT_convolution, "GetIntegerv");
+         params[0] = IROUND(ctx->Pixel.PostConvolutionBias[1]);
+         break;
+      case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
+         CHECK_EXT1(EXT_convolution, "GetIntegerv");
+         params[0] = IROUND(ctx->Pixel.PostConvolutionBias[2]);
+         break;
+      case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
+         CHECK_EXT1(EXT_convolution, "GetIntegerv");
+         params[0] = IROUND(ctx->Pixel.PostConvolutionBias[3]);
+         break;
+      case GL_HISTOGRAM:
+         CHECK_EXT1(EXT_histogram, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Pixel.HistogramEnabled);
+         break;
+      case GL_MINMAX:
+         CHECK_EXT1(EXT_histogram, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Pixel.MinMaxEnabled);
+         break;
+      case GL_COLOR_TABLE_SGI:
+         CHECK_EXT1(SGI_color_table, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Pixel.ColorTableEnabled);
+         break;
+      case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
+         CHECK_EXT1(SGI_color_table, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostConvolutionColorTableEnabled);
+         break;
+      case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
+         CHECK_EXT1(SGI_color_table, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostColorMatrixColorTableEnabled);
+         break;
+      case GL_TEXTURE_COLOR_TABLE_SGI:
+         CHECK_EXT1(SGI_texture_color_table, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
+         break;
+      case GL_COLOR_SUM_EXT:
+         CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Fog.ColorSumEnabled);
+         break;
+      case GL_CURRENT_SECONDARY_COLOR_EXT:
+         CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
+         params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
+         params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
+         params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
+         }
+         break;
+      case GL_SECONDARY_COLOR_ARRAY_EXT:
+         CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
+         break;
+      case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
+         CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
+         params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Type);
+         break;
+      case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
+         CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
+         params[0] = ctx->Array.ArrayObj->SecondaryColor.Stride;
+         break;
+      case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
+         CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
+         params[0] = ctx->Array.ArrayObj->SecondaryColor.Size;
+         break;
+      case GL_CURRENT_FOG_COORDINATE_EXT:
+         CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
+         {
+         FLUSH_CURRENT(ctx, 0);
+         params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
+         }
+         break;
+      case GL_FOG_COORDINATE_ARRAY_EXT:
+         CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->FogCoord.Enabled);
+         break;
+      case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
+         CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
+         params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->FogCoord.Type);
+         break;
+      case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
+         CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
+         params[0] = ctx->Array.ArrayObj->FogCoord.Stride;
+         break;
+      case GL_FOG_COORDINATE_SOURCE_EXT:
+         CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
+         params[0] = ENUM_TO_INT(ctx->Fog.FogCoordinateSource);
+         break;
+      case GL_MAX_TEXTURE_LOD_BIAS_EXT:
+         CHECK_EXT1(EXT_texture_lod_bias, "GetIntegerv");
+         params[0] = IROUND(ctx->Const.MaxTextureLodBias);
+         break;
+      case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
+         CHECK_EXT1(EXT_texture_filter_anisotropic, "GetIntegerv");
+         params[0] = IROUND(ctx->Const.MaxTextureMaxAnisotropy);
+         break;
+      case GL_MULTISAMPLE_ARB:
+         CHECK_EXT1(ARB_multisample, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Multisample.Enabled);
+         break;
+      case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
+         CHECK_EXT1(ARB_multisample, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToCoverage);
+         break;
+      case GL_SAMPLE_ALPHA_TO_ONE_ARB:
+         CHECK_EXT1(ARB_multisample, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToOne);
+         break;
+      case GL_SAMPLE_COVERAGE_ARB:
+         CHECK_EXT1(ARB_multisample, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverage);
+         break;
+      case GL_SAMPLE_COVERAGE_VALUE_ARB:
+         CHECK_EXT1(ARB_multisample, "GetIntegerv");
+         params[0] = IROUND(ctx->Multisample.SampleCoverageValue);
+         break;
+      case GL_SAMPLE_COVERAGE_INVERT_ARB:
+         CHECK_EXT1(ARB_multisample, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverageInvert);
+         break;
+      case GL_SAMPLE_BUFFERS_ARB:
+         CHECK_EXT1(ARB_multisample, "GetIntegerv");
+         params[0] = ctx->DrawBuffer->Visual.sampleBuffers;
+         break;
+      case GL_SAMPLES_ARB:
+         CHECK_EXT1(ARB_multisample, "GetIntegerv");
+         params[0] = ctx->DrawBuffer->Visual.samples;
+         break;
+      case GL_RASTER_POSITION_UNCLIPPED_IBM:
+         CHECK_EXT1(IBM_rasterpos_clip, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Transform.RasterPositionUnclipped);
+         break;
+      case GL_POINT_SPRITE_NV:
+         CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Point.PointSprite);
+         break;
+      case GL_POINT_SPRITE_R_MODE_NV:
+         CHECK_EXT1(NV_point_sprite, "GetIntegerv");
+         params[0] = ENUM_TO_INT(ctx->Point.SpriteRMode);
+         break;
+      case GL_POINT_SPRITE_COORD_ORIGIN:
+         CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
+         params[0] = ENUM_TO_INT(ctx->Point.SpriteOrigin);
+         break;
+      case GL_GENERATE_MIPMAP_HINT_SGIS:
+         CHECK_EXT1(SGIS_generate_mipmap, "GetIntegerv");
+         params[0] = ENUM_TO_INT(ctx->Hint.GenerateMipmap);
+         break;
+      case GL_VERTEX_PROGRAM_BINDING_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = (ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY0_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY1_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY2_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY3_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY5_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY6_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY7_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY8_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY9_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY10_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY11_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY12_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY13_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY14_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
+         break;
+      case GL_VERTEX_ATTRIB_ARRAY15_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB0_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[0]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB1_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[1]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB2_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[2]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB3_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[3]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB4_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[4]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB5_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[5]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB6_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[6]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB7_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[7]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB8_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[8]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB9_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[9]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB10_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[10]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB11_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[11]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB12_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[12]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB13_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[13]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB14_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[14]);
+         break;
+      case GL_MAP1_VERTEX_ATTRIB15_4_NV:
+         CHECK_EXT1(NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[15]);
+         break;
+      case GL_FRAGMENT_PROGRAM_NV:
+         CHECK_EXT1(NV_fragment_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
+         break;
+      case GL_FRAGMENT_PROGRAM_BINDING_NV:
+         CHECK_EXT1(NV_fragment_program, "GetIntegerv");
+         params[0] = ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
+         break;
+      case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
+         CHECK_EXT1(NV_fragment_program, "GetIntegerv");
+         params[0] = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
+         break;
+      case GL_TEXTURE_RECTANGLE_NV:
+         CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
+         break;
+      case GL_TEXTURE_BINDING_RECTANGLE_NV:
+         CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
+         params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name;
+         break;
+      case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
+         CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
+         params[0] = ctx->Const.MaxTextureRectSize;
+         break;
+      case GL_STENCIL_TEST_TWO_SIDE_EXT:
+         CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Stencil.TestTwoSide);
+         break;
+      case GL_ACTIVE_STENCIL_FACE_EXT:
+         CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
+         params[0] = ENUM_TO_INT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
+         break;
+      case GL_MAX_SHININESS_NV:
+         CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
+         params[0] = IROUND(ctx->Const.MaxShininess);
+         break;
+      case GL_MAX_SPOT_EXPONENT_NV:
+         CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
+         params[0] = IROUND(ctx->Const.MaxSpotExponent);
+         break;
+      case GL_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
+         params[0] = ctx->Array.ArrayBufferObj->Name;
+         break;
+      case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
+         params[0] = ctx->Array.ArrayObj->Vertex.BufferObj->Name;
+         break;
+      case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
+         params[0] = ctx->Array.ArrayObj->Normal.BufferObj->Name;
+         break;
+      case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
+         params[0] = ctx->Array.ArrayObj->Color.BufferObj->Name;
+         break;
+      case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
+         params[0] = ctx->Array.ArrayObj->Index.BufferObj->Name;
+         break;
+      case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
+         params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
+         break;
+      case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
+         params[0] = ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name;
+         break;
+      case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
+         params[0] = ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name;
+         break;
+      case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
+         params[0] = ctx->Array.ArrayObj->FogCoord.BufferObj->Name;
+         break;
+      case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
+         CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
+         params[0] = ctx->Array.ElementArrayBufferObj->Name;
+         break;
+      case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
+         CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
+         params[0] = ctx->Pack.BufferObj->Name;
+         break;
+      case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
+         CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
+         params[0] = ctx->Unpack.BufferObj->Name;
+         break;
+      case GL_VERTEX_PROGRAM_ARB:
+         CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.Enabled);
+         break;
+      case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
+         CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.PointSizeEnabled);
+         break;
+      case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
+         CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.TwoSideEnabled);
+         break;
+      case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
+         CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
+         params[0] = ctx->Const.MaxProgramMatrixStackDepth;
+         break;
+      case GL_MAX_PROGRAM_MATRICES_ARB:
+         CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
+         params[0] = ctx->Const.MaxProgramMatrices;
+         break;
+      case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
+         CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->CurrentStack->Depth + 1);
+         break;
+      case GL_CURRENT_MATRIX_ARB:
+         CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetIntegerv");
+         {
+         const GLfloat *matrix = ctx->CurrentStack->Top->m;
+         params[0] = IROUND(matrix[0]);
+         params[1] = IROUND(matrix[1]);
+         params[2] = IROUND(matrix[2]);
+         params[3] = IROUND(matrix[3]);
+         params[4] = IROUND(matrix[4]);
+         params[5] = IROUND(matrix[5]);
+         params[6] = IROUND(matrix[6]);
+         params[7] = IROUND(matrix[7]);
+         params[8] = IROUND(matrix[8]);
+         params[9] = IROUND(matrix[9]);
+         params[10] = IROUND(matrix[10]);
+         params[11] = IROUND(matrix[11]);
+         params[12] = IROUND(matrix[12]);
+         params[13] = IROUND(matrix[13]);
+         params[14] = IROUND(matrix[14]);
+         params[15] = IROUND(matrix[15]);
+         }
+         break;
+      case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
+         CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetIntegerv");
+         {
+         const GLfloat *matrix = ctx->CurrentStack->Top->m;
+         params[0] = IROUND(matrix[0]);
+         params[1] = IROUND(matrix[4]);
+         params[2] = IROUND(matrix[8]);
+         params[3] = IROUND(matrix[12]);
+         params[4] = IROUND(matrix[1]);
+         params[5] = IROUND(matrix[5]);
+         params[6] = IROUND(matrix[9]);
+         params[7] = IROUND(matrix[13]);
+         params[8] = IROUND(matrix[2]);
+         params[9] = IROUND(matrix[6]);
+         params[10] = IROUND(matrix[10]);
+         params[11] = IROUND(matrix[14]);
+         params[12] = IROUND(matrix[3]);
+         params[13] = IROUND(matrix[7]);
+         params[14] = IROUND(matrix[11]);
+         params[15] = IROUND(matrix[15]);
+         }
+         break;
+      case GL_MAX_VERTEX_ATTRIBS_ARB:
+         CHECK_EXT1(ARB_vertex_program, "GetIntegerv");
+         params[0] = ctx->Const.VertexProgram.MaxAttribs;
+         break;
+      case GL_PROGRAM_ERROR_POSITION_ARB:
+         CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetIntegerv");
+         params[0] = ctx->Program.ErrorPos;
+         break;
+      case GL_FRAGMENT_PROGRAM_ARB:
+         CHECK_EXT1(ARB_fragment_program, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
+         break;
+      case GL_MAX_TEXTURE_COORDS_ARB:
+         CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
+         params[0] = ctx->Const.MaxTextureCoordUnits;
+         break;
+      case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
+         CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
+         params[0] = ctx->Const.MaxTextureImageUnits;
+         break;
+      case GL_DEPTH_BOUNDS_TEST_EXT:
+         CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Depth.BoundsTest);
+         break;
+      case GL_DEPTH_BOUNDS_EXT:
+         CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
+         params[0] = IROUND(ctx->Depth.BoundsMin);
+         params[1] = IROUND(ctx->Depth.BoundsMax);
+         break;
+      case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
+         CHECK_EXT1(MESA_program_debug, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.CallbackEnabled);
+         break;
+      case GL_VERTEX_PROGRAM_CALLBACK_MESA:
+         CHECK_EXT1(MESA_program_debug, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.CallbackEnabled);
+         break;
+      case GL_FRAGMENT_PROGRAM_POSITION_MESA:
+         CHECK_EXT1(MESA_program_debug, "GetIntegerv");
+         params[0] = ctx->FragmentProgram.CurrentPosition;
+         break;
+      case GL_VERTEX_PROGRAM_POSITION_MESA:
+         CHECK_EXT1(MESA_program_debug, "GetIntegerv");
+         params[0] = ctx->VertexProgram.CurrentPosition;
+         break;
+      case GL_MAX_DRAW_BUFFERS_ARB:
+         CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
+         params[0] = ctx->Const.MaxDrawBuffers;
+         break;
+      case GL_DRAW_BUFFER0_ARB:
+         CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
+         params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
+         break;
+      case GL_DRAW_BUFFER1_ARB:
+         CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
+         {
+         GLenum buffer;
+         if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
+            _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
+            return;
+         }
+         buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
+         params[0] = ENUM_TO_INT(buffer);
+         }
+         break;
+      case GL_DRAW_BUFFER2_ARB:
+         CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
+         {
+         GLenum buffer;
+         if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
+            _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
+            return;
+         }
+         buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
+         params[0] = ENUM_TO_INT(buffer);
+         }
+         break;
+      case GL_DRAW_BUFFER3_ARB:
+         CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
+         {
+         GLenum buffer;
+         if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
+            _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
+            return;
+         }
+         buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
+         params[0] = ENUM_TO_INT(buffer);
+         }
+         break;
+      case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
+         CHECK_EXT1(OES_read_format, "GetIntegerv");
+         params[0] = ctx->Const.ColorReadType;
+         break;
+      case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
+         CHECK_EXT1(OES_read_format, "GetIntegerv");
+         params[0] = ctx->Const.ColorReadFormat;
+         break;
+      case GL_NUM_FRAGMENT_REGISTERS_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
+         params[0] = 6;
+         break;
+      case GL_NUM_FRAGMENT_CONSTANTS_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
+         params[0] = 8;
+         break;
+      case GL_NUM_PASSES_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
+         params[0] = 2;
+         break;
+      case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
+         params[0] = 8;
+         break;
+      case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
+         params[0] = 16;
+         break;
+      case GL_COLOR_ALPHA_PAIRING_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(GL_TRUE);
+         break;
+      case GL_NUM_LOOPBACK_COMPONENTS_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
+         params[0] = 3;
+         break;
+      case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
+         CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
+         params[0] = 3;
+         break;
+      case GL_STENCIL_BACK_FUNC:
+         params[0] = ENUM_TO_INT(ctx->Stencil.Function[1]);
+         break;
+      case GL_STENCIL_BACK_VALUE_MASK:
+         params[0] = ctx->Stencil.ValueMask[1];
+         break;
+      case GL_STENCIL_BACK_REF:
+         params[0] = ctx->Stencil.Ref[1];
+         break;
+      case GL_STENCIL_BACK_FAIL:
+         params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[1]);
+         break;
+      case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
+         params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[1]);
+         break;
+      case GL_STENCIL_BACK_PASS_DEPTH_PASS:
+         params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[1]);
+         break;
+      case GL_FRAMEBUFFER_BINDING_EXT:
+         CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
+         params[0] = ctx->DrawBuffer->Name;
+         break;
+      case GL_RENDERBUFFER_BINDING_EXT:
+         CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
+         params[0] = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
+         break;
+      case GL_MAX_COLOR_ATTACHMENTS_EXT:
+         CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
+         params[0] = ctx->Const.MaxColorAttachments;
+         break;
+      case GL_MAX_RENDERBUFFER_SIZE_EXT:
+         CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
+         params[0] = ctx->Const.MaxRenderbufferSize;
+         break;
+      case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
+         CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
+         params[0] = MAX_FRAGMENT_UNIFORM_COMPONENTS;
+         break;
+      case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
+         CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
+         params[0] = ENUM_TO_INT(ctx->Hint.FragmentShaderDerivative);
+         break;
+      case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
+         CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
+         params[0] = MAX_VERTEX_UNIFORM_COMPONENTS;
+         break;
+      case GL_MAX_VARYING_FLOATS_ARB:
+         CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
+         params[0] = MAX_VARYING_FLOATS;
+         break;
+      case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
+         CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
+         params[0] = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
+         break;
+      case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
+         CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
+         params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
+         break;
+      default:
+         _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
+   }
+}
+
+
+void GLAPIENTRY
+_mesa_GetDoublev( GLenum pname, GLdouble *params )
+{
+   const GLfloat magic = -1234.5F;
+   GLfloat values[16];
+   GLuint i;
+
+   if (!params)
+      return;
+
+   /* Init temp array to magic numbers so we can figure out how many values
+    * are returned by the GetFloatv() call.
+    */
+   for (i = 0; i < 16; i++)
+      values[i] = magic;
+
+   _mesa_GetFloatv(pname, values);
+
+   for (i = 0; i < 16 && values[i] != magic; i++)
+      params[i] = (GLdouble) values[i];
+}
+
Index: git/target-i386/mesa_gl.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/mesa_gl.h	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,2251 @@
+/*
+ * Mesa 3-D graphics library
+ * Version:  6.5.1
+ *
+ * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef __gl_h_
+#define __gl_h_
+
+#if defined(USE_MGL_NAMESPACE)
+#include "gl_mangle.h"
+#endif
+
+
+/**********************************************************************
+ * Begin system-specific stuff. Do not do any of this when building
+ * for SciTech SNAP, as this is all done before this header file is
+ * included.
+ */
+#if !defined(__SCITECH_SNAP__)
+
+#if defined(__BEOS__)
+#include <stdlib.h>     /* to get some BeOS-isms */
+#endif
+
+#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
+#define OPENSTEP
+#endif
+
+#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
+#define __WIN32__
+#endif
+
+#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
+#  if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
+#    define GLAPI __declspec(dllexport)
+#  elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
+#    define GLAPI __declspec(dllimport)
+#  else /* for use with static link lib build of Win32 edition only */
+#    define GLAPI extern
+#  endif /* _STATIC_MESA support */
+#  define GLAPIENTRY __stdcall
+#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
+#  define GLAPI extern
+#  define GLAPIENTRY __stdcall
+#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
+#  define GLAPI __attribute__((visibility("default")))
+#  define GLAPIENTRY
+#endif /* WIN32 && !CYGWIN */
+
+#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
+#  define PRAGMA_EXPORT_SUPPORTED		1
+#endif
+
+/*
+ * WINDOWS: Include windows.h here to define APIENTRY.
+ * It is also useful when applications include this file by
+ * including only glut.h, since glut.h depends on windows.h.
+ * Applications needing to include windows.h with parms other
+ * than "WIN32_LEAN_AND_MEAN" may include windows.h before
+ * glut.h or gl.h.
+ */
+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
+#define WIN32_LEAN_AND_MEAN 1
+#include <windows.h>
+#endif
+
+#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__)
+#include <GL/mesa_wgl.h>
+#endif
+
+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
+#pragma import on
+#endif
+
+#ifndef GLAPI
+#define GLAPI extern
+#endif
+
+#ifndef GLAPIENTRY
+#define GLAPIENTRY
+#endif
+
+#ifndef APIENTRY
+#define APIENTRY GLAPIENTRY
+#endif
+
+/* "P" suffix to be used for a pointer to a function */
+#ifndef APIENTRYP
+#define APIENTRYP APIENTRY *
+#endif
+
+#ifndef GLAPIENTRYP
+#define GLAPIENTRYP GLAPIENTRY *
+#endif
+
+#ifdef CENTERLINE_CLPP
+#define signed
+#endif
+
+#if defined(PRAGMA_EXPORT_SUPPORTED)
+#pragma export on
+#endif
+
+#endif /* !__SCITECH_SNAP__ */
+/*
+ * End system-specific stuff.
+ **********************************************************************/
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+#define GL_VERSION_1_1   1
+#define GL_VERSION_1_2   1
+#define GL_VERSION_1_3   1
+#define GL_ARB_imaging   1
+
+
+/*
+ * Datatypes
+ */
+typedef unsigned int	GLenum;
+typedef unsigned char	GLboolean;
+typedef unsigned int	GLbitfield;
+typedef void		GLvoid;
+typedef signed char	GLbyte;		/* 1-byte signed */
+typedef short		GLshort;	/* 2-byte signed */
+typedef int		GLint;		/* 4-byte signed */
+typedef unsigned char	GLubyte;	/* 1-byte unsigned */
+typedef unsigned short	GLushort;	/* 2-byte unsigned */
+typedef unsigned int	GLuint;		/* 4-byte unsigned */
+typedef int		GLsizei;	/* 4-byte signed */
+typedef float		GLfloat;	/* single precision float */
+typedef float		GLclampf;	/* single precision float in [0,1] */
+typedef double		GLdouble;	/* double precision float */
+typedef double		GLclampd;	/* double precision float in [0,1] */
+
+
+
+/*
+ * Constants
+ */
+
+/* Boolean values */
+#define GL_FALSE				0x0
+#define GL_TRUE					0x1
+
+/* Data types */
+#define GL_BYTE					0x1400
+#define GL_UNSIGNED_BYTE			0x1401
+#define GL_SHORT				0x1402
+#define GL_UNSIGNED_SHORT			0x1403
+#define GL_INT					0x1404
+#define GL_UNSIGNED_INT				0x1405
+#define GL_FLOAT				0x1406
+#define GL_2_BYTES				0x1407
+#define GL_3_BYTES				0x1408
+#define GL_4_BYTES				0x1409
+#define GL_DOUBLE				0x140A
+
+/* Primitives */
+#define GL_POINTS				0x0000
+#define GL_LINES				0x0001
+#define GL_LINE_LOOP				0x0002
+#define GL_LINE_STRIP				0x0003
+#define GL_TRIANGLES				0x0004
+#define GL_TRIANGLE_STRIP			0x0005
+#define GL_TRIANGLE_FAN				0x0006
+#define GL_QUADS				0x0007
+#define GL_QUAD_STRIP				0x0008
+#define GL_POLYGON				0x0009
+
+/* Vertex Arrays */
+#define GL_VERTEX_ARRAY				0x8074
+#define GL_NORMAL_ARRAY				0x8075
+#define GL_COLOR_ARRAY				0x8076
+#define GL_INDEX_ARRAY				0x8077
+#define GL_TEXTURE_COORD_ARRAY			0x8078
+#define GL_EDGE_FLAG_ARRAY			0x8079
+#define GL_VERTEX_ARRAY_SIZE			0x807A
+#define GL_VERTEX_ARRAY_TYPE			0x807B
+#define GL_VERTEX_ARRAY_STRIDE			0x807C
+#define GL_NORMAL_ARRAY_TYPE			0x807E
+#define GL_NORMAL_ARRAY_STRIDE			0x807F
+#define GL_COLOR_ARRAY_SIZE			0x8081
+#define GL_COLOR_ARRAY_TYPE			0x8082
+#define GL_COLOR_ARRAY_STRIDE			0x8083
+#define GL_INDEX_ARRAY_TYPE			0x8085
+#define GL_INDEX_ARRAY_STRIDE			0x8086
+#define GL_TEXTURE_COORD_ARRAY_SIZE		0x8088
+#define GL_TEXTURE_COORD_ARRAY_TYPE		0x8089
+#define GL_TEXTURE_COORD_ARRAY_STRIDE		0x808A
+#define GL_EDGE_FLAG_ARRAY_STRIDE		0x808C
+#define GL_VERTEX_ARRAY_POINTER			0x808E
+#define GL_NORMAL_ARRAY_POINTER			0x808F
+#define GL_COLOR_ARRAY_POINTER			0x8090
+#define GL_INDEX_ARRAY_POINTER			0x8091
+#define GL_TEXTURE_COORD_ARRAY_POINTER		0x8092
+#define GL_EDGE_FLAG_ARRAY_POINTER		0x8093
+#define GL_V2F					0x2A20
+#define GL_V3F					0x2A21
+#define GL_C4UB_V2F				0x2A22
+#define GL_C4UB_V3F				0x2A23
+#define GL_C3F_V3F				0x2A24
+#define GL_N3F_V3F				0x2A25
+#define GL_C4F_N3F_V3F				0x2A26
+#define GL_T2F_V3F				0x2A27
+#define GL_T4F_V4F				0x2A28
+#define GL_T2F_C4UB_V3F				0x2A29
+#define GL_T2F_C3F_V3F				0x2A2A
+#define GL_T2F_N3F_V3F				0x2A2B
+#define GL_T2F_C4F_N3F_V3F			0x2A2C
+#define GL_T4F_C4F_N3F_V4F			0x2A2D
+
+/* Matrix Mode */
+#define GL_MATRIX_MODE				0x0BA0
+#define GL_MODELVIEW				0x1700
+#define GL_PROJECTION				0x1701
+#define GL_TEXTURE				0x1702
+
+/* Points */
+#define GL_POINT_SMOOTH				0x0B10
+#define GL_POINT_SIZE				0x0B11
+#define GL_POINT_SIZE_GRANULARITY 		0x0B13
+#define GL_POINT_SIZE_RANGE			0x0B12
+
+/* Lines */
+#define GL_LINE_SMOOTH				0x0B20
+#define GL_LINE_STIPPLE				0x0B24
+#define GL_LINE_STIPPLE_PATTERN			0x0B25
+#define GL_LINE_STIPPLE_REPEAT			0x0B26
+#define GL_LINE_WIDTH				0x0B21
+#define GL_LINE_WIDTH_GRANULARITY		0x0B23
+#define GL_LINE_WIDTH_RANGE			0x0B22
+
+/* Polygons */
+#define GL_POINT				0x1B00
+#define GL_LINE					0x1B01
+#define GL_FILL					0x1B02
+#define GL_CW					0x0900
+#define GL_CCW					0x0901
+#define GL_FRONT				0x0404
+#define GL_BACK					0x0405
+#define GL_POLYGON_MODE				0x0B40
+#define GL_POLYGON_SMOOTH			0x0B41
+#define GL_POLYGON_STIPPLE			0x0B42
+#define GL_EDGE_FLAG				0x0B43
+#define GL_CULL_FACE				0x0B44
+#define GL_CULL_FACE_MODE			0x0B45
+#define GL_FRONT_FACE				0x0B46
+#define GL_POLYGON_OFFSET_FACTOR		0x8038
+#define GL_POLYGON_OFFSET_UNITS			0x2A00
+#define GL_POLYGON_OFFSET_POINT			0x2A01
+#define GL_POLYGON_OFFSET_LINE			0x2A02
+#define GL_POLYGON_OFFSET_FILL			0x8037
+
+/* Display Lists */
+#define GL_COMPILE				0x1300
+#define GL_COMPILE_AND_EXECUTE			0x1301
+#define GL_LIST_BASE				0x0B32
+#define GL_LIST_INDEX				0x0B33
+#define GL_LIST_MODE				0x0B30
+
+/* Depth buffer */
+#define GL_NEVER				0x0200
+#define GL_LESS					0x0201
+#define GL_EQUAL				0x0202
+#define GL_LEQUAL				0x0203
+#define GL_GREATER				0x0204
+#define GL_NOTEQUAL				0x0205
+#define GL_GEQUAL				0x0206
+#define GL_ALWAYS				0x0207
+#define GL_DEPTH_TEST				0x0B71
+#define GL_DEPTH_BITS				0x0D56
+#define GL_DEPTH_CLEAR_VALUE			0x0B73
+#define GL_DEPTH_FUNC				0x0B74
+#define GL_DEPTH_RANGE				0x0B70
+#define GL_DEPTH_WRITEMASK			0x0B72
+#define GL_DEPTH_COMPONENT			0x1902
+
+/* Lighting */
+#define GL_LIGHTING				0x0B50
+#define GL_LIGHT0				0x4000
+#define GL_LIGHT1				0x4001
+#define GL_LIGHT2				0x4002
+#define GL_LIGHT3				0x4003
+#define GL_LIGHT4				0x4004
+#define GL_LIGHT5				0x4005
+#define GL_LIGHT6				0x4006
+#define GL_LIGHT7				0x4007
+#define GL_SPOT_EXPONENT			0x1205
+#define GL_SPOT_CUTOFF				0x1206
+#define GL_CONSTANT_ATTENUATION			0x1207
+#define GL_LINEAR_ATTENUATION			0x1208
+#define GL_QUADRATIC_ATTENUATION		0x1209
+#define GL_AMBIENT				0x1200
+#define GL_DIFFUSE				0x1201
+#define GL_SPECULAR				0x1202
+#define GL_SHININESS				0x1601
+#define GL_EMISSION				0x1600
+#define GL_POSITION				0x1203
+#define GL_SPOT_DIRECTION			0x1204
+#define GL_AMBIENT_AND_DIFFUSE			0x1602
+#define GL_COLOR_INDEXES			0x1603
+#define GL_LIGHT_MODEL_TWO_SIDE			0x0B52
+#define GL_LIGHT_MODEL_LOCAL_VIEWER		0x0B51
+#define GL_LIGHT_MODEL_AMBIENT			0x0B53
+#define GL_FRONT_AND_BACK			0x0408
+#define GL_SHADE_MODEL				0x0B54
+#define GL_FLAT					0x1D00
+#define GL_SMOOTH				0x1D01
+#define GL_COLOR_MATERIAL			0x0B57
+#define GL_COLOR_MATERIAL_FACE			0x0B55
+#define GL_COLOR_MATERIAL_PARAMETER		0x0B56
+#define GL_NORMALIZE				0x0BA1
+
+/* User clipping planes */
+#define GL_CLIP_PLANE0				0x3000
+#define GL_CLIP_PLANE1				0x3001
+#define GL_CLIP_PLANE2				0x3002
+#define GL_CLIP_PLANE3				0x3003
+#define GL_CLIP_PLANE4				0x3004
+#define GL_CLIP_PLANE5				0x3005
+
+/* Accumulation buffer */
+#define GL_ACCUM_RED_BITS			0x0D58
+#define GL_ACCUM_GREEN_BITS			0x0D59
+#define GL_ACCUM_BLUE_BITS			0x0D5A
+#define GL_ACCUM_ALPHA_BITS			0x0D5B
+#define GL_ACCUM_CLEAR_VALUE			0x0B80
+#define GL_ACCUM				0x0100
+#define GL_ADD					0x0104
+#define GL_LOAD					0x0101
+#define GL_MULT					0x0103
+#define GL_RETURN				0x0102
+
+/* Alpha testing */
+#define GL_ALPHA_TEST				0x0BC0
+#define GL_ALPHA_TEST_REF			0x0BC2
+#define GL_ALPHA_TEST_FUNC			0x0BC1
+
+/* Blending */
+#define GL_BLEND				0x0BE2
+#define GL_BLEND_SRC				0x0BE1
+#define GL_BLEND_DST				0x0BE0
+#define GL_ZERO					0x0
+#define GL_ONE					0x1
+#define GL_SRC_COLOR				0x0300
+#define GL_ONE_MINUS_SRC_COLOR			0x0301
+#define GL_SRC_ALPHA				0x0302
+#define GL_ONE_MINUS_SRC_ALPHA			0x0303
+#define GL_DST_ALPHA				0x0304
+#define GL_ONE_MINUS_DST_ALPHA			0x0305
+#define GL_DST_COLOR				0x0306
+#define GL_ONE_MINUS_DST_COLOR			0x0307
+#define GL_SRC_ALPHA_SATURATE			0x0308
+
+/* Render Mode */
+#define GL_FEEDBACK				0x1C01
+#define GL_RENDER				0x1C00
+#define GL_SELECT				0x1C02
+
+/* Feedback */
+#define GL_2D					0x0600
+#define GL_3D					0x0601
+#define GL_3D_COLOR				0x0602
+#define GL_3D_COLOR_TEXTURE			0x0603
+#define GL_4D_COLOR_TEXTURE			0x0604
+#define GL_POINT_TOKEN				0x0701
+#define GL_LINE_TOKEN				0x0702
+#define GL_LINE_RESET_TOKEN			0x0707
+#define GL_POLYGON_TOKEN			0x0703
+#define GL_BITMAP_TOKEN				0x0704
+#define GL_DRAW_PIXEL_TOKEN			0x0705
+#define GL_COPY_PIXEL_TOKEN			0x0706
+#define GL_PASS_THROUGH_TOKEN			0x0700
+#define GL_FEEDBACK_BUFFER_POINTER		0x0DF0
+#define GL_FEEDBACK_BUFFER_SIZE			0x0DF1
+#define GL_FEEDBACK_BUFFER_TYPE			0x0DF2
+
+/* Selection */
+#define GL_SELECTION_BUFFER_POINTER		0x0DF3
+#define GL_SELECTION_BUFFER_SIZE		0x0DF4
+
+/* Fog */
+#define GL_FOG					0x0B60
+#define GL_FOG_MODE				0x0B65
+#define GL_FOG_DENSITY				0x0B62
+#define GL_FOG_COLOR				0x0B66
+#define GL_FOG_INDEX				0x0B61
+#define GL_FOG_START				0x0B63
+#define GL_FOG_END				0x0B64
+#define GL_LINEAR				0x2601
+#define GL_EXP					0x0800
+#define GL_EXP2					0x0801
+
+/* Logic Ops */
+#define GL_LOGIC_OP				0x0BF1
+#define GL_INDEX_LOGIC_OP			0x0BF1
+#define GL_COLOR_LOGIC_OP			0x0BF2
+#define GL_LOGIC_OP_MODE			0x0BF0
+#define GL_CLEAR				0x1500
+#define GL_SET					0x150F
+#define GL_COPY					0x1503
+#define GL_COPY_INVERTED			0x150C
+#define GL_NOOP					0x1505
+#define GL_INVERT				0x150A
+#define GL_AND					0x1501
+#define GL_NAND					0x150E
+#define GL_OR					0x1507
+#define GL_NOR					0x1508
+#define GL_XOR					0x1506
+#define GL_EQUIV				0x1509
+#define GL_AND_REVERSE				0x1502
+#define GL_AND_INVERTED				0x1504
+#define GL_OR_REVERSE				0x150B
+#define GL_OR_INVERTED				0x150D
+
+/* Stencil */
+#define GL_STENCIL_BITS				0x0D57
+#define GL_STENCIL_TEST				0x0B90
+#define GL_STENCIL_CLEAR_VALUE			0x0B91
+#define GL_STENCIL_FUNC				0x0B92
+#define GL_STENCIL_VALUE_MASK			0x0B93
+#define GL_STENCIL_FAIL				0x0B94
+#define GL_STENCIL_PASS_DEPTH_FAIL		0x0B95
+#define GL_STENCIL_PASS_DEPTH_PASS		0x0B96
+#define GL_STENCIL_REF				0x0B97
+#define GL_STENCIL_WRITEMASK			0x0B98
+#define GL_STENCIL_INDEX			0x1901
+#define GL_KEEP					0x1E00
+#define GL_REPLACE				0x1E01
+#define GL_INCR					0x1E02
+#define GL_DECR					0x1E03
+
+/* Buffers, Pixel Drawing/Reading */
+#define GL_NONE					0x0
+#define GL_LEFT					0x0406
+#define GL_RIGHT				0x0407
+/*GL_FRONT					0x0404 */
+/*GL_BACK					0x0405 */
+/*GL_FRONT_AND_BACK				0x0408 */
+#define GL_FRONT_LEFT				0x0400
+#define GL_FRONT_RIGHT				0x0401
+#define GL_BACK_LEFT				0x0402
+#define GL_BACK_RIGHT				0x0403
+#define GL_AUX0					0x0409
+#define GL_AUX1					0x040A
+#define GL_AUX2					0x040B
+#define GL_AUX3					0x040C
+#define GL_COLOR_INDEX				0x1900
+#define GL_RED					0x1903
+#define GL_GREEN				0x1904
+#define GL_BLUE					0x1905
+#define GL_ALPHA				0x1906
+#define GL_LUMINANCE				0x1909
+#define GL_LUMINANCE_ALPHA			0x190A
+#define GL_ALPHA_BITS				0x0D55
+#define GL_RED_BITS				0x0D52
+#define GL_GREEN_BITS				0x0D53
+#define GL_BLUE_BITS				0x0D54
+#define GL_INDEX_BITS				0x0D51
+#define GL_SUBPIXEL_BITS			0x0D50
+#define GL_AUX_BUFFERS				0x0C00
+#define GL_READ_BUFFER				0x0C02
+#define GL_DRAW_BUFFER				0x0C01
+#define GL_DOUBLEBUFFER				0x0C32
+#define GL_STEREO				0x0C33
+#define GL_BITMAP				0x1A00
+#define GL_COLOR				0x1800
+#define GL_DEPTH				0x1801
+#define GL_STENCIL				0x1802
+#define GL_DITHER				0x0BD0
+#define GL_RGB					0x1907
+#define GL_RGBA					0x1908
+
+/* Implementation limits */
+#define GL_MAX_LIST_NESTING			0x0B31
+#define GL_MAX_EVAL_ORDER			0x0D30
+#define GL_MAX_LIGHTS				0x0D31
+#define GL_MAX_CLIP_PLANES			0x0D32
+#define GL_MAX_TEXTURE_SIZE			0x0D33
+#define GL_MAX_PIXEL_MAP_TABLE			0x0D34
+#define GL_MAX_ATTRIB_STACK_DEPTH		0x0D35
+#define GL_MAX_MODELVIEW_STACK_DEPTH		0x0D36
+#define GL_MAX_NAME_STACK_DEPTH			0x0D37
+#define GL_MAX_PROJECTION_STACK_DEPTH		0x0D38
+#define GL_MAX_TEXTURE_STACK_DEPTH		0x0D39
+#define GL_MAX_VIEWPORT_DIMS			0x0D3A
+#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH	0x0D3B
+
+/* Gets */
+#define GL_ATTRIB_STACK_DEPTH			0x0BB0
+#define GL_CLIENT_ATTRIB_STACK_DEPTH		0x0BB1
+#define GL_COLOR_CLEAR_VALUE			0x0C22
+#define GL_COLOR_WRITEMASK			0x0C23
+#define GL_CURRENT_INDEX			0x0B01
+#define GL_CURRENT_COLOR			0x0B00
+#define GL_CURRENT_NORMAL			0x0B02
+#define GL_CURRENT_RASTER_COLOR			0x0B04
+#define GL_CURRENT_RASTER_DISTANCE		0x0B09
+#define GL_CURRENT_RASTER_INDEX			0x0B05
+#define GL_CURRENT_RASTER_POSITION		0x0B07
+#define GL_CURRENT_RASTER_TEXTURE_COORDS	0x0B06
+#define GL_CURRENT_RASTER_POSITION_VALID	0x0B08
+#define GL_CURRENT_TEXTURE_COORDS		0x0B03
+#define GL_INDEX_CLEAR_VALUE			0x0C20
+#define GL_INDEX_MODE				0x0C30
+#define GL_INDEX_WRITEMASK			0x0C21
+#define GL_MODELVIEW_MATRIX			0x0BA6
+#define GL_MODELVIEW_STACK_DEPTH		0x0BA3
+#define GL_NAME_STACK_DEPTH			0x0D70
+#define GL_PROJECTION_MATRIX			0x0BA7
+#define GL_PROJECTION_STACK_DEPTH		0x0BA4
+#define GL_RENDER_MODE				0x0C40
+#define GL_RGBA_MODE				0x0C31
+#define GL_TEXTURE_MATRIX			0x0BA8
+#define GL_TEXTURE_STACK_DEPTH			0x0BA5
+#define GL_VIEWPORT				0x0BA2
+
+/* Evaluators */
+#define GL_AUTO_NORMAL				0x0D80
+#define GL_MAP1_COLOR_4				0x0D90
+#define GL_MAP1_INDEX				0x0D91
+#define GL_MAP1_NORMAL				0x0D92
+#define GL_MAP1_TEXTURE_COORD_1			0x0D93
+#define GL_MAP1_TEXTURE_COORD_2			0x0D94
+#define GL_MAP1_TEXTURE_COORD_3			0x0D95
+#define GL_MAP1_TEXTURE_COORD_4			0x0D96
+#define GL_MAP1_VERTEX_3			0x0D97
+#define GL_MAP1_VERTEX_4			0x0D98
+#define GL_MAP2_COLOR_4				0x0DB0
+#define GL_MAP2_INDEX				0x0DB1
+#define GL_MAP2_NORMAL				0x0DB2
+#define GL_MAP2_TEXTURE_COORD_1			0x0DB3
+#define GL_MAP2_TEXTURE_COORD_2			0x0DB4
+#define GL_MAP2_TEXTURE_COORD_3			0x0DB5
+#define GL_MAP2_TEXTURE_COORD_4			0x0DB6
+#define GL_MAP2_VERTEX_3			0x0DB7
+#define GL_MAP2_VERTEX_4			0x0DB8
+#define GL_MAP1_GRID_DOMAIN			0x0DD0
+#define GL_MAP1_GRID_SEGMENTS			0x0DD1
+#define GL_MAP2_GRID_DOMAIN			0x0DD2
+#define GL_MAP2_GRID_SEGMENTS			0x0DD3
+#define GL_COEFF				0x0A00
+#define GL_ORDER				0x0A01
+#define GL_DOMAIN				0x0A02
+
+/* Hints */
+#define GL_PERSPECTIVE_CORRECTION_HINT		0x0C50
+#define GL_POINT_SMOOTH_HINT			0x0C51
+#define GL_LINE_SMOOTH_HINT			0x0C52
+#define GL_POLYGON_SMOOTH_HINT			0x0C53
+#define GL_FOG_HINT				0x0C54
+#define GL_DONT_CARE				0x1100
+#define GL_FASTEST				0x1101
+#define GL_NICEST				0x1102
+
+/* Scissor box */
+#define GL_SCISSOR_BOX				0x0C10
+#define GL_SCISSOR_TEST				0x0C11
+
+/* Pixel Mode / Transfer */
+#define GL_MAP_COLOR				0x0D10
+#define GL_MAP_STENCIL				0x0D11
+#define GL_INDEX_SHIFT				0x0D12
+#define GL_INDEX_OFFSET				0x0D13
+#define GL_RED_SCALE				0x0D14
+#define GL_RED_BIAS				0x0D15
+#define GL_GREEN_SCALE				0x0D18
+#define GL_GREEN_BIAS				0x0D19
+#define GL_BLUE_SCALE				0x0D1A
+#define GL_BLUE_BIAS				0x0D1B
+#define GL_ALPHA_SCALE				0x0D1C
+#define GL_ALPHA_BIAS				0x0D1D
+#define GL_DEPTH_SCALE				0x0D1E
+#define GL_DEPTH_BIAS				0x0D1F
+#define GL_PIXEL_MAP_S_TO_S_SIZE		0x0CB1
+#define GL_PIXEL_MAP_I_TO_I_SIZE		0x0CB0
+#define GL_PIXEL_MAP_I_TO_R_SIZE		0x0CB2
+#define GL_PIXEL_MAP_I_TO_G_SIZE		0x0CB3
+#define GL_PIXEL_MAP_I_TO_B_SIZE		0x0CB4
+#define GL_PIXEL_MAP_I_TO_A_SIZE		0x0CB5
+#define GL_PIXEL_MAP_R_TO_R_SIZE		0x0CB6
+#define GL_PIXEL_MAP_G_TO_G_SIZE		0x0CB7
+#define GL_PIXEL_MAP_B_TO_B_SIZE		0x0CB8
+#define GL_PIXEL_MAP_A_TO_A_SIZE		0x0CB9
+#define GL_PIXEL_MAP_S_TO_S			0x0C71
+#define GL_PIXEL_MAP_I_TO_I			0x0C70
+#define GL_PIXEL_MAP_I_TO_R			0x0C72
+#define GL_PIXEL_MAP_I_TO_G			0x0C73
+#define GL_PIXEL_MAP_I_TO_B			0x0C74
+#define GL_PIXEL_MAP_I_TO_A			0x0C75
+#define GL_PIXEL_MAP_R_TO_R			0x0C76
+#define GL_PIXEL_MAP_G_TO_G			0x0C77
+#define GL_PIXEL_MAP_B_TO_B			0x0C78
+#define GL_PIXEL_MAP_A_TO_A			0x0C79
+#define GL_PACK_ALIGNMENT			0x0D05
+#define GL_PACK_LSB_FIRST			0x0D01
+#define GL_PACK_ROW_LENGTH			0x0D02
+#define GL_PACK_SKIP_PIXELS			0x0D04
+#define GL_PACK_SKIP_ROWS			0x0D03
+#define GL_PACK_SWAP_BYTES			0x0D00
+#define GL_UNPACK_ALIGNMENT			0x0CF5
+#define GL_UNPACK_LSB_FIRST			0x0CF1
+#define GL_UNPACK_ROW_LENGTH			0x0CF2
+#define GL_UNPACK_SKIP_PIXELS			0x0CF4
+#define GL_UNPACK_SKIP_ROWS			0x0CF3
+#define GL_UNPACK_SWAP_BYTES			0x0CF0
+#define GL_ZOOM_X				0x0D16
+#define GL_ZOOM_Y				0x0D17
+
+/* Texture mapping */
+#define GL_TEXTURE_ENV				0x2300
+#define GL_TEXTURE_ENV_MODE			0x2200
+#define GL_TEXTURE_1D				0x0DE0
+#define GL_TEXTURE_2D				0x0DE1
+#define GL_TEXTURE_WRAP_S			0x2802
+#define GL_TEXTURE_WRAP_T			0x2803
+#define GL_TEXTURE_MAG_FILTER			0x2800
+#define GL_TEXTURE_MIN_FILTER			0x2801
+#define GL_TEXTURE_ENV_COLOR			0x2201
+#define GL_TEXTURE_GEN_S			0x0C60
+#define GL_TEXTURE_GEN_T			0x0C61
+#define GL_TEXTURE_GEN_MODE			0x2500
+#define GL_TEXTURE_BORDER_COLOR			0x1004
+#define GL_TEXTURE_WIDTH			0x1000
+#define GL_TEXTURE_HEIGHT			0x1001
+#define GL_TEXTURE_BORDER			0x1005
+#define GL_TEXTURE_COMPONENTS			0x1003
+#define GL_TEXTURE_RED_SIZE			0x805C
+#define GL_TEXTURE_GREEN_SIZE			0x805D
+#define GL_TEXTURE_BLUE_SIZE			0x805E
+#define GL_TEXTURE_ALPHA_SIZE			0x805F
+#define GL_TEXTURE_LUMINANCE_SIZE		0x8060
+#define GL_TEXTURE_INTENSITY_SIZE		0x8061
+#define GL_NEAREST_MIPMAP_NEAREST		0x2700
+#define GL_NEAREST_MIPMAP_LINEAR		0x2702
+#define GL_LINEAR_MIPMAP_NEAREST		0x2701
+#define GL_LINEAR_MIPMAP_LINEAR			0x2703
+#define GL_OBJECT_LINEAR			0x2401
+#define GL_OBJECT_PLANE				0x2501
+#define GL_EYE_LINEAR				0x2400
+#define GL_EYE_PLANE				0x2502
+#define GL_SPHERE_MAP				0x2402
+#define GL_DECAL				0x2101
+#define GL_MODULATE				0x2100
+#define GL_NEAREST				0x2600
+#define GL_REPEAT				0x2901
+#define GL_CLAMP				0x2900
+#define GL_S					0x2000
+#define GL_T					0x2001
+#define GL_R					0x2002
+#define GL_Q					0x2003
+#define GL_TEXTURE_GEN_R			0x0C62
+#define GL_TEXTURE_GEN_Q			0x0C63
+
+/* Utility */
+#define GL_VENDOR				0x1F00
+#define GL_RENDERER				0x1F01
+#define GL_VERSION				0x1F02
+#define GL_EXTENSIONS				0x1F03
+
+/* Errors */
+#define GL_NO_ERROR 				0x0
+#define GL_INVALID_ENUM				0x0500
+#define GL_INVALID_VALUE			0x0501
+#define GL_INVALID_OPERATION			0x0502
+#define GL_STACK_OVERFLOW			0x0503
+#define GL_STACK_UNDERFLOW			0x0504
+#define GL_OUT_OF_MEMORY			0x0505
+
+/* glPush/PopAttrib bits */
+#define GL_CURRENT_BIT				0x00000001
+#define GL_POINT_BIT				0x00000002
+#define GL_LINE_BIT				0x00000004
+#define GL_POLYGON_BIT				0x00000008
+#define GL_POLYGON_STIPPLE_BIT			0x00000010
+#define GL_PIXEL_MODE_BIT			0x00000020
+#define GL_LIGHTING_BIT				0x00000040
+#define GL_FOG_BIT				0x00000080
+#define GL_DEPTH_BUFFER_BIT			0x00000100
+#define GL_ACCUM_BUFFER_BIT			0x00000200
+#define GL_STENCIL_BUFFER_BIT			0x00000400
+#define GL_VIEWPORT_BIT				0x00000800
+#define GL_TRANSFORM_BIT			0x00001000
+#define GL_ENABLE_BIT				0x00002000
+#define GL_COLOR_BUFFER_BIT			0x00004000
+#define GL_HINT_BIT				0x00008000
+#define GL_EVAL_BIT				0x00010000
+#define GL_LIST_BIT				0x00020000
+#define GL_TEXTURE_BIT				0x00040000
+#define GL_SCISSOR_BIT				0x00080000
+#define GL_ALL_ATTRIB_BITS			0x000FFFFF
+
+
+/* OpenGL 1.1 */
+#define GL_PROXY_TEXTURE_1D			0x8063
+#define GL_PROXY_TEXTURE_2D			0x8064
+#define GL_TEXTURE_PRIORITY			0x8066
+#define GL_TEXTURE_RESIDENT			0x8067
+#define GL_TEXTURE_BINDING_1D			0x8068
+#define GL_TEXTURE_BINDING_2D			0x8069
+#define GL_TEXTURE_INTERNAL_FORMAT		0x1003
+#define GL_ALPHA4				0x803B
+#define GL_ALPHA8				0x803C
+#define GL_ALPHA12				0x803D
+#define GL_ALPHA16				0x803E
+#define GL_LUMINANCE4				0x803F
+#define GL_LUMINANCE8				0x8040
+#define GL_LUMINANCE12				0x8041
+#define GL_LUMINANCE16				0x8042
+#define GL_LUMINANCE4_ALPHA4			0x8043
+#define GL_LUMINANCE6_ALPHA2			0x8044
+#define GL_LUMINANCE8_ALPHA8			0x8045
+#define GL_LUMINANCE12_ALPHA4			0x8046
+#define GL_LUMINANCE12_ALPHA12			0x8047
+#define GL_LUMINANCE16_ALPHA16			0x8048
+#define GL_INTENSITY				0x8049
+#define GL_INTENSITY4				0x804A
+#define GL_INTENSITY8				0x804B
+#define GL_INTENSITY12				0x804C
+#define GL_INTENSITY16				0x804D
+#define GL_R3_G3_B2				0x2A10
+#define GL_RGB4					0x804F
+#define GL_RGB5					0x8050
+#define GL_RGB8					0x8051
+#define GL_RGB10				0x8052
+#define GL_RGB12				0x8053
+#define GL_RGB16				0x8054
+#define GL_RGBA2				0x8055
+#define GL_RGBA4				0x8056
+#define GL_RGB5_A1				0x8057
+#define GL_RGBA8				0x8058
+#define GL_RGB10_A2				0x8059
+#define GL_RGBA12				0x805A
+#define GL_RGBA16				0x805B
+#define GL_CLIENT_PIXEL_STORE_BIT		0x00000001
+#define GL_CLIENT_VERTEX_ARRAY_BIT		0x00000002
+#define GL_ALL_CLIENT_ATTRIB_BITS 		0xFFFFFFFF
+#define GL_CLIENT_ALL_ATTRIB_BITS 		0xFFFFFFFF
+
+
+
+/*
+ * Miscellaneous
+ */
+
+GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
+
+GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
+
+GLAPI void GLAPIENTRY glClear( GLbitfield mask );
+
+GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
+
+GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
+
+GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
+
+GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
+
+GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
+
+GLAPI void GLAPIENTRY glCullFace( GLenum mode );
+
+GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
+
+GLAPI void GLAPIENTRY glPointSize( GLfloat size );
+
+GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
+
+GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
+
+GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
+
+GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
+
+GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
+
+GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
+
+GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
+
+GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
+
+GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
+
+GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
+
+GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
+
+GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
+
+GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
+
+GLAPI void GLAPIENTRY glEnable( GLenum cap );
+
+GLAPI void GLAPIENTRY glDisable( GLenum cap );
+
+GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
+
+
+GLAPI void GLAPIENTRY glEnableClientState( GLenum cap );  /* 1.1 */
+
+GLAPI void GLAPIENTRY glDisableClientState( GLenum cap );  /* 1.1 */
+
+
+GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
+
+GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
+
+GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
+
+GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
+
+
+GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
+
+GLAPI void GLAPIENTRY glPopAttrib( void );
+
+
+GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask );  /* 1.1 */
+
+GLAPI void GLAPIENTRY glPopClientAttrib( void );  /* 1.1 */
+
+
+GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
+
+GLAPI GLenum GLAPIENTRY glGetError( void );
+
+GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
+
+GLAPI void GLAPIENTRY glFinish( void );
+
+GLAPI void GLAPIENTRY glFlush( void );
+
+GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
+
+
+/*
+ * Depth Buffer
+ */
+
+GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
+
+GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
+
+GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
+
+GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
+
+
+/*
+ * Accumulation Buffer
+ */
+
+GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
+
+GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
+
+
+/*
+ * Transformation
+ */
+
+GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
+
+GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
+                                 GLdouble bottom, GLdouble top,
+                                 GLdouble near_val, GLdouble far_val );
+
+GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
+                                   GLdouble bottom, GLdouble top,
+                                   GLdouble near_val, GLdouble far_val );
+
+GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
+                                    GLsizei width, GLsizei height );
+
+GLAPI void GLAPIENTRY glPushMatrix( void );
+
+GLAPI void GLAPIENTRY glPopMatrix( void );
+
+GLAPI void GLAPIENTRY glLoadIdentity( void );
+
+GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
+GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
+
+GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
+GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
+
+GLAPI void GLAPIENTRY glRotated( GLdouble angle,
+                                   GLdouble x, GLdouble y, GLdouble z );
+GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
+                                   GLfloat x, GLfloat y, GLfloat z );
+
+GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
+GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
+
+GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
+GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
+
+
+/*
+ * Display Lists
+ */
+
+GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
+
+GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
+
+GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
+
+GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
+
+GLAPI void GLAPIENTRY glEndList( void );
+
+GLAPI void GLAPIENTRY glCallList( GLuint list );
+
+GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
+                                     const GLvoid *lists );
+
+GLAPI void GLAPIENTRY glListBase( GLuint base );
+
+
+/*
+ * Drawing Functions
+ */
+
+GLAPI void GLAPIENTRY glBegin( GLenum mode );
+
+GLAPI void GLAPIENTRY glEnd( void );
+
+
+GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
+GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
+GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
+GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
+
+GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
+GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
+GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
+GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
+
+GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
+GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
+GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
+GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
+
+GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
+GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
+GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
+GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
+
+
+GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
+GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
+GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
+GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
+GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
+
+GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
+GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
+GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
+
+
+GLAPI void GLAPIENTRY glIndexd( GLdouble c );
+GLAPI void GLAPIENTRY glIndexf( GLfloat c );
+GLAPI void GLAPIENTRY glIndexi( GLint c );
+GLAPI void GLAPIENTRY glIndexs( GLshort c );
+GLAPI void GLAPIENTRY glIndexub( GLubyte c );  /* 1.1 */
+
+GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
+GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
+GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
+GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
+GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c );  /* 1.1 */
+
+GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
+GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
+GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
+GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
+GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
+GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
+GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
+GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
+
+GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
+                                   GLbyte blue, GLbyte alpha );
+GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
+                                   GLdouble blue, GLdouble alpha );
+GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
+                                   GLfloat blue, GLfloat alpha );
+GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
+                                   GLint blue, GLint alpha );
+GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
+                                   GLshort blue, GLshort alpha );
+GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
+                                    GLubyte blue, GLubyte alpha );
+GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
+                                    GLuint blue, GLuint alpha );
+GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
+                                    GLushort blue, GLushort alpha );
+
+
+GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
+GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
+GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
+GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
+GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
+GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
+
+GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
+GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
+GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
+GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
+GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
+GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
+
+
+GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
+GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
+GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
+GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
+
+GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
+GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
+GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
+GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
+
+GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
+GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
+GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
+GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
+
+GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
+GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
+GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
+GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
+
+GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
+GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
+GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
+GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
+GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
+
+
+GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
+GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
+GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
+GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
+
+GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
+GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
+GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
+GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
+
+GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
+GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
+GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
+GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
+
+GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
+GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
+GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
+
+GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
+GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
+GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
+GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
+
+
+GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
+GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
+GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
+GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
+
+
+GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
+GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
+GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
+GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
+
+
+/*
+ * Vertex Arrays  (1.1)
+ */
+
+GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
+                                       GLsizei stride, const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
+                                       const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
+                                      GLsizei stride, const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
+                                      const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
+                                         GLsizei stride, const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
+
+GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
+
+GLAPI void GLAPIENTRY glArrayElement( GLint i );
+
+GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
+
+GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
+                                      GLenum type, const GLvoid *indices );
+
+GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
+                                           const GLvoid *pointer );
+
+/*
+ * Lighting
+ */
+
+GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
+
+GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
+GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
+                                 const GLfloat *params );
+GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
+                                 const GLint *params );
+
+GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
+                                    GLfloat *params );
+GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
+                                    GLint *params );
+
+GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
+GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
+GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
+
+GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
+GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
+GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
+
+GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
+GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
+
+GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
+
+
+/*
+ * Raster functions
+ */
+
+GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
+
+GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
+                                    const GLfloat *values );
+GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
+                                     const GLuint *values );
+GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
+                                     const GLushort *values );
+
+GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
+GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
+GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
+
+GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
+                                GLfloat xorig, GLfloat yorig,
+                                GLfloat xmove, GLfloat ymove,
+                                const GLubyte *bitmap );
+
+GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
+                                    GLsizei width, GLsizei height,
+                                    GLenum format, GLenum type,
+                                    GLvoid *pixels );
+
+GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
+                                    GLenum format, GLenum type,
+                                    const GLvoid *pixels );
+
+GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
+                                    GLsizei width, GLsizei height,
+                                    GLenum type );
+
+/*
+ * Stenciling
+ */
+
+GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
+
+GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
+
+GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
+
+GLAPI void GLAPIENTRY glClearStencil( GLint s );
+
+
+
+/*
+ * Texture mapping
+ */
+
+GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
+GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
+GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
+GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
+
+GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
+GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
+GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
+
+
+GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
+GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
+
+GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
+GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
+
+
+GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
+GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
+                                          const GLfloat *params );
+GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
+                                          const GLint *params );
+
+GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
+                                           GLenum pname, GLfloat *params);
+GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
+                                           GLenum pname, GLint *params );
+
+GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
+                                                GLenum pname, GLfloat *params );
+GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
+                                                GLenum pname, GLint *params );
+
+
+GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
+                                    GLint internalFormat,
+                                    GLsizei width, GLint border,
+                                    GLenum format, GLenum type,
+                                    const GLvoid *pixels );
+
+GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
+                                    GLint internalFormat,
+                                    GLsizei width, GLsizei height,
+                                    GLint border, GLenum format, GLenum type,
+                                    const GLvoid *pixels );
+
+GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
+                                     GLenum format, GLenum type,
+                                     GLvoid *pixels );
+
+
+/* 1.1 functions */
+
+GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
+
+GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
+
+GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
+
+GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
+                                            const GLuint *textures,
+                                            const GLclampf *priorities );
+
+GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
+                                                  const GLuint *textures,
+                                                  GLboolean *residences );
+
+GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
+
+
+GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
+                                       GLint xoffset,
+                                       GLsizei width, GLenum format,
+                                       GLenum type, const GLvoid *pixels );
+
+
+GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
+                                       GLint xoffset, GLint yoffset,
+                                       GLsizei width, GLsizei height,
+                                       GLenum format, GLenum type,
+                                       const GLvoid *pixels );
+
+
+GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
+                                        GLenum internalformat,
+                                        GLint x, GLint y,
+                                        GLsizei width, GLint border );
+
+
+GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
+                                        GLenum internalformat,
+                                        GLint x, GLint y,
+                                        GLsizei width, GLsizei height,
+                                        GLint border );
+
+
+GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
+                                           GLint xoffset, GLint x, GLint y,
+                                           GLsizei width );
+
+
+GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
+                                           GLint xoffset, GLint yoffset,
+                                           GLint x, GLint y,
+                                           GLsizei width, GLsizei height );
+
+
+/*
+ * Evaluators
+ */
+
+GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
+                               GLint stride,
+                               GLint order, const GLdouble *points );
+GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
+                               GLint stride,
+                               GLint order, const GLfloat *points );
+
+GLAPI void GLAPIENTRY glMap2d( GLenum target,
+		     GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
+		     GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
+		     const GLdouble *points );
+GLAPI void GLAPIENTRY glMap2f( GLenum target,
+		     GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
+		     GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
+		     const GLfloat *points );
+
+GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
+GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
+GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
+
+GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
+GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
+
+GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
+GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
+
+GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
+GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
+
+GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
+GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
+
+GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
+GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
+
+GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
+                                   GLint vn, GLdouble v1, GLdouble v2 );
+GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
+                                   GLint vn, GLfloat v1, GLfloat v2 );
+
+GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
+
+GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
+
+GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
+
+GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
+
+
+/*
+ * Fog
+ */
+
+GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
+
+GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
+
+GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
+
+GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
+
+
+/*
+ * Selection and Feedback
+ */
+
+GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
+
+GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
+
+GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
+
+GLAPI void GLAPIENTRY glInitNames( void );
+
+GLAPI void GLAPIENTRY glLoadName( GLuint name );
+
+GLAPI void GLAPIENTRY glPushName( GLuint name );
+
+GLAPI void GLAPIENTRY glPopName( void );
+
+
+
+/*
+ * OpenGL 1.2
+ */
+
+#define GL_RESCALE_NORMAL			0x803A
+#define GL_CLAMP_TO_EDGE			0x812F
+#define GL_MAX_ELEMENTS_VERTICES		0x80E8
+#define GL_MAX_ELEMENTS_INDICES			0x80E9
+#define GL_BGR					0x80E0
+#define GL_BGRA					0x80E1
+#define GL_UNSIGNED_BYTE_3_3_2			0x8032
+#define GL_UNSIGNED_BYTE_2_3_3_REV		0x8362
+#define GL_UNSIGNED_SHORT_5_6_5			0x8363
+#define GL_UNSIGNED_SHORT_5_6_5_REV		0x8364
+#define GL_UNSIGNED_SHORT_4_4_4_4		0x8033
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV		0x8365
+#define GL_UNSIGNED_SHORT_5_5_5_1		0x8034
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV		0x8366
+#define GL_UNSIGNED_INT_8_8_8_8			0x8035
+#define GL_UNSIGNED_INT_8_8_8_8_REV		0x8367
+#define GL_UNSIGNED_INT_10_10_10_2		0x8036
+#define GL_UNSIGNED_INT_2_10_10_10_REV		0x8368
+#define GL_LIGHT_MODEL_COLOR_CONTROL		0x81F8
+#define GL_SINGLE_COLOR				0x81F9
+#define GL_SEPARATE_SPECULAR_COLOR		0x81FA
+#define GL_TEXTURE_MIN_LOD			0x813A
+#define GL_TEXTURE_MAX_LOD			0x813B
+#define GL_TEXTURE_BASE_LEVEL			0x813C
+#define GL_TEXTURE_MAX_LEVEL			0x813D
+#define GL_SMOOTH_POINT_SIZE_RANGE		0x0B12
+#define GL_SMOOTH_POINT_SIZE_GRANULARITY	0x0B13
+#define GL_SMOOTH_LINE_WIDTH_RANGE		0x0B22
+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY	0x0B23
+#define GL_ALIASED_POINT_SIZE_RANGE		0x846D
+#define GL_ALIASED_LINE_WIDTH_RANGE		0x846E
+#define GL_PACK_SKIP_IMAGES			0x806B
+#define GL_PACK_IMAGE_HEIGHT			0x806C
+#define GL_UNPACK_SKIP_IMAGES			0x806D
+#define GL_UNPACK_IMAGE_HEIGHT			0x806E
+#define GL_TEXTURE_3D				0x806F
+#define GL_PROXY_TEXTURE_3D			0x8070
+#define GL_TEXTURE_DEPTH			0x8071
+#define GL_TEXTURE_WRAP_R			0x8072
+#define GL_MAX_3D_TEXTURE_SIZE			0x8073
+#define GL_TEXTURE_BINDING_3D			0x806A
+
+GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
+	GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
+
+GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
+                                      GLint internalFormat,
+                                      GLsizei width, GLsizei height,
+                                      GLsizei depth, GLint border,
+                                      GLenum format, GLenum type,
+                                      const GLvoid *pixels );
+
+GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
+                                         GLint xoffset, GLint yoffset,
+                                         GLint zoffset, GLsizei width,
+                                         GLsizei height, GLsizei depth,
+                                         GLenum format,
+                                         GLenum type, const GLvoid *pixels);
+
+GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
+                                             GLint xoffset, GLint yoffset,
+                                             GLint zoffset, GLint x,
+                                             GLint y, GLsizei width,
+                                             GLsizei height );
+
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+
+
+/*
+ * GL_ARB_imaging
+ */
+
+#define GL_CONSTANT_COLOR			0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR		0x8002
+#define GL_CONSTANT_ALPHA			0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA		0x8004
+#define GL_COLOR_TABLE				0x80D0
+#define GL_POST_CONVOLUTION_COLOR_TABLE		0x80D1
+#define GL_POST_COLOR_MATRIX_COLOR_TABLE	0x80D2
+#define GL_PROXY_COLOR_TABLE			0x80D3
+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE	0x80D4
+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE	0x80D5
+#define GL_COLOR_TABLE_SCALE			0x80D6
+#define GL_COLOR_TABLE_BIAS			0x80D7
+#define GL_COLOR_TABLE_FORMAT			0x80D8
+#define GL_COLOR_TABLE_WIDTH			0x80D9
+#define GL_COLOR_TABLE_RED_SIZE			0x80DA
+#define GL_COLOR_TABLE_GREEN_SIZE		0x80DB
+#define GL_COLOR_TABLE_BLUE_SIZE		0x80DC
+#define GL_COLOR_TABLE_ALPHA_SIZE		0x80DD
+#define GL_COLOR_TABLE_LUMINANCE_SIZE		0x80DE
+#define GL_COLOR_TABLE_INTENSITY_SIZE		0x80DF
+#define GL_CONVOLUTION_1D			0x8010
+#define GL_CONVOLUTION_2D			0x8011
+#define GL_SEPARABLE_2D				0x8012
+#define GL_CONVOLUTION_BORDER_MODE		0x8013
+#define GL_CONVOLUTION_FILTER_SCALE		0x8014
+#define GL_CONVOLUTION_FILTER_BIAS		0x8015
+#define GL_REDUCE				0x8016
+#define GL_CONVOLUTION_FORMAT			0x8017
+#define GL_CONVOLUTION_WIDTH			0x8018
+#define GL_CONVOLUTION_HEIGHT			0x8019
+#define GL_MAX_CONVOLUTION_WIDTH		0x801A
+#define GL_MAX_CONVOLUTION_HEIGHT		0x801B
+#define GL_POST_CONVOLUTION_RED_SCALE		0x801C
+#define GL_POST_CONVOLUTION_GREEN_SCALE		0x801D
+#define GL_POST_CONVOLUTION_BLUE_SCALE		0x801E
+#define GL_POST_CONVOLUTION_ALPHA_SCALE		0x801F
+#define GL_POST_CONVOLUTION_RED_BIAS		0x8020
+#define GL_POST_CONVOLUTION_GREEN_BIAS		0x8021
+#define GL_POST_CONVOLUTION_BLUE_BIAS		0x8022
+#define GL_POST_CONVOLUTION_ALPHA_BIAS		0x8023
+#define GL_CONSTANT_BORDER			0x8151
+#define GL_REPLICATE_BORDER			0x8153
+#define GL_CONVOLUTION_BORDER_COLOR		0x8154
+#define GL_COLOR_MATRIX				0x80B1
+#define GL_COLOR_MATRIX_STACK_DEPTH		0x80B2
+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH		0x80B3
+#define GL_POST_COLOR_MATRIX_RED_SCALE		0x80B4
+#define GL_POST_COLOR_MATRIX_GREEN_SCALE	0x80B5
+#define GL_POST_COLOR_MATRIX_BLUE_SCALE		0x80B6
+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE	0x80B7
+#define GL_POST_COLOR_MATRIX_RED_BIAS		0x80B8
+#define GL_POST_COLOR_MATRIX_GREEN_BIAS		0x80B9
+#define GL_POST_COLOR_MATRIX_BLUE_BIAS		0x80BA
+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS		0x80BB
+#define GL_HISTOGRAM				0x8024
+#define GL_PROXY_HISTOGRAM			0x8025
+#define GL_HISTOGRAM_WIDTH			0x8026
+#define GL_HISTOGRAM_FORMAT			0x8027
+#define GL_HISTOGRAM_RED_SIZE			0x8028
+#define GL_HISTOGRAM_GREEN_SIZE			0x8029
+#define GL_HISTOGRAM_BLUE_SIZE			0x802A
+#define GL_HISTOGRAM_ALPHA_SIZE			0x802B
+#define GL_HISTOGRAM_LUMINANCE_SIZE		0x802C
+#define GL_HISTOGRAM_SINK			0x802D
+#define GL_MINMAX				0x802E
+#define GL_MINMAX_FORMAT			0x802F
+#define GL_MINMAX_SINK				0x8030
+#define GL_TABLE_TOO_LARGE			0x8031
+#define GL_BLEND_EQUATION			0x8009
+#define GL_MIN					0x8007
+#define GL_MAX					0x8008
+#define GL_FUNC_ADD				0x8006
+#define GL_FUNC_SUBTRACT			0x800A
+#define GL_FUNC_REVERSE_SUBTRACT		0x800B
+#define GL_BLEND_COLOR				0x8005
+
+
+GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
+                                    GLsizei width, GLenum format,
+                                    GLenum type, const GLvoid *table );
+
+GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
+                                       GLsizei start, GLsizei count,
+                                       GLenum format, GLenum type,
+                                       const GLvoid *data );
+
+GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
+                                              const GLint *params);
+
+GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
+                                              const GLfloat *params);
+
+GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
+                                           GLint x, GLint y, GLsizei width );
+
+GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
+                                        GLint x, GLint y, GLsizei width );
+
+GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
+                                       GLenum type, GLvoid *table );
+
+GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
+                                                  GLfloat *params );
+
+GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
+                                                  GLint *params );
+
+GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
+
+GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
+                                    GLclampf blue, GLclampf alpha );
+
+GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
+				   GLenum internalformat, GLboolean sink );
+
+GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
+
+GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
+				      GLenum format, GLenum type,
+				      GLvoid *values );
+
+GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
+						 GLfloat *params );
+
+GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
+						 GLint *params );
+
+GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
+				GLboolean sink );
+
+GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
+
+GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
+                                   GLenum format, GLenum types,
+                                   GLvoid *values );
+
+GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
+					      GLfloat *params );
+
+GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
+					      GLint *params );
+
+GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
+	GLenum internalformat, GLsizei width, GLenum format, GLenum type,
+	const GLvoid *image );
+
+GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
+	GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
+	GLenum type, const GLvoid *image );
+
+GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
+	GLfloat params );
+
+GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
+	const GLfloat *params );
+
+GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
+	GLint params );
+
+GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
+	const GLint *params );
+
+GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
+	GLenum internalformat, GLint x, GLint y, GLsizei width );
+
+GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
+	GLenum internalformat, GLint x, GLint y, GLsizei width,
+	GLsizei height);
+
+GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
+	GLenum type, GLvoid *image );
+
+GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
+	GLfloat *params );
+
+GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
+	GLint *params );
+
+GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
+	GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
+	GLenum type, const GLvoid *row, const GLvoid *column );
+
+GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
+	GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
+
+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
+
+
+
+/*
+ * OpenGL 1.3
+ */
+
+/* multitexture */
+#define GL_TEXTURE0				0x84C0
+#define GL_TEXTURE1				0x84C1
+#define GL_TEXTURE2				0x84C2
+#define GL_TEXTURE3				0x84C3
+#define GL_TEXTURE4				0x84C4
+#define GL_TEXTURE5				0x84C5
+#define GL_TEXTURE6				0x84C6
+#define GL_TEXTURE7				0x84C7
+#define GL_TEXTURE8				0x84C8
+#define GL_TEXTURE9				0x84C9
+#define GL_TEXTURE10				0x84CA
+#define GL_TEXTURE11				0x84CB
+#define GL_TEXTURE12				0x84CC
+#define GL_TEXTURE13				0x84CD
+#define GL_TEXTURE14				0x84CE
+#define GL_TEXTURE15				0x84CF
+#define GL_TEXTURE16				0x84D0
+#define GL_TEXTURE17				0x84D1
+#define GL_TEXTURE18				0x84D2
+#define GL_TEXTURE19				0x84D3
+#define GL_TEXTURE20				0x84D4
+#define GL_TEXTURE21				0x84D5
+#define GL_TEXTURE22				0x84D6
+#define GL_TEXTURE23				0x84D7
+#define GL_TEXTURE24				0x84D8
+#define GL_TEXTURE25				0x84D9
+#define GL_TEXTURE26				0x84DA
+#define GL_TEXTURE27				0x84DB
+#define GL_TEXTURE28				0x84DC
+#define GL_TEXTURE29				0x84DD
+#define GL_TEXTURE30				0x84DE
+#define GL_TEXTURE31				0x84DF
+#define GL_ACTIVE_TEXTURE			0x84E0
+#define GL_CLIENT_ACTIVE_TEXTURE		0x84E1
+#define GL_MAX_TEXTURE_UNITS			0x84E2
+/* texture_cube_map */
+#define GL_NORMAL_MAP				0x8511
+#define GL_REFLECTION_MAP			0x8512
+#define GL_TEXTURE_CUBE_MAP			0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP		0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X		0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X		0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y		0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y		0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z		0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z		0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP		0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE		0x851C
+/* texture_compression */
+#define GL_COMPRESSED_ALPHA			0x84E9
+#define GL_COMPRESSED_LUMINANCE			0x84EA
+#define GL_COMPRESSED_LUMINANCE_ALPHA		0x84EB
+#define GL_COMPRESSED_INTENSITY			0x84EC
+#define GL_COMPRESSED_RGB			0x84ED
+#define GL_COMPRESSED_RGBA			0x84EE
+#define GL_TEXTURE_COMPRESSION_HINT		0x84EF
+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE	0x86A0
+#define GL_TEXTURE_COMPRESSED			0x86A1
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS	0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS		0x86A3
+/* multisample */
+#define GL_MULTISAMPLE				0x809D
+#define GL_SAMPLE_ALPHA_TO_COVERAGE		0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE			0x809F
+#define GL_SAMPLE_COVERAGE			0x80A0
+#define GL_SAMPLE_BUFFERS			0x80A8
+#define GL_SAMPLES				0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE		0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT		0x80AB
+#define GL_MULTISAMPLE_BIT			0x20000000
+/* transpose_matrix */
+#define GL_TRANSPOSE_MODELVIEW_MATRIX		0x84E3
+#define GL_TRANSPOSE_PROJECTION_MATRIX		0x84E4
+#define GL_TRANSPOSE_TEXTURE_MATRIX		0x84E5
+#define GL_TRANSPOSE_COLOR_MATRIX		0x84E6
+/* texture_env_combine */
+#define GL_COMBINE				0x8570
+#define GL_COMBINE_RGB				0x8571
+#define GL_COMBINE_ALPHA			0x8572
+#define GL_SOURCE0_RGB				0x8580
+#define GL_SOURCE1_RGB				0x8581
+#define GL_SOURCE2_RGB				0x8582
+#define GL_SOURCE0_ALPHA			0x8588
+#define GL_SOURCE1_ALPHA			0x8589
+#define GL_SOURCE2_ALPHA			0x858A
+#define GL_OPERAND0_RGB				0x8590
+#define GL_OPERAND1_RGB				0x8591
+#define GL_OPERAND2_RGB				0x8592
+#define GL_OPERAND0_ALPHA			0x8598
+#define GL_OPERAND1_ALPHA			0x8599
+#define GL_OPERAND2_ALPHA			0x859A
+#define GL_RGB_SCALE				0x8573
+#define GL_ADD_SIGNED				0x8574
+#define GL_INTERPOLATE				0x8575
+#define GL_SUBTRACT				0x84E7
+#define GL_CONSTANT				0x8576
+#define GL_PRIMARY_COLOR			0x8577
+#define GL_PREVIOUS				0x8578
+/* texture_env_dot3 */
+#define GL_DOT3_RGB				0x86AE
+#define GL_DOT3_RGBA				0x86AF
+/* texture_border_clamp */
+#define GL_CLAMP_TO_BORDER			0x812D
+
+GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
+
+GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
+
+GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data );
+
+GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
+
+GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
+
+GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
+
+GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
+
+GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
+
+GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
+
+GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
+
+GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
+
+GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
+
+GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
+
+GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
+
+GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
+
+GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
+
+GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
+
+GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
+
+GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
+
+GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
+
+GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
+
+GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
+
+
+GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
+
+GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
+
+GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
+
+GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
+
+GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
+
+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
+
+
+/*
+ * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
+ */
+#ifndef GL_ARB_multitexture
+#define GL_ARB_multitexture 1
+
+#define GL_TEXTURE0_ARB				0x84C0
+#define GL_TEXTURE1_ARB				0x84C1
+#define GL_TEXTURE2_ARB				0x84C2
+#define GL_TEXTURE3_ARB				0x84C3
+#define GL_TEXTURE4_ARB				0x84C4
+#define GL_TEXTURE5_ARB				0x84C5
+#define GL_TEXTURE6_ARB				0x84C6
+#define GL_TEXTURE7_ARB				0x84C7
+#define GL_TEXTURE8_ARB				0x84C8
+#define GL_TEXTURE9_ARB				0x84C9
+#define GL_TEXTURE10_ARB			0x84CA
+#define GL_TEXTURE11_ARB			0x84CB
+#define GL_TEXTURE12_ARB			0x84CC
+#define GL_TEXTURE13_ARB			0x84CD
+#define GL_TEXTURE14_ARB			0x84CE
+#define GL_TEXTURE15_ARB			0x84CF
+#define GL_TEXTURE16_ARB			0x84D0
+#define GL_TEXTURE17_ARB			0x84D1
+#define GL_TEXTURE18_ARB			0x84D2
+#define GL_TEXTURE19_ARB			0x84D3
+#define GL_TEXTURE20_ARB			0x84D4
+#define GL_TEXTURE21_ARB			0x84D5
+#define GL_TEXTURE22_ARB			0x84D6
+#define GL_TEXTURE23_ARB			0x84D7
+#define GL_TEXTURE24_ARB			0x84D8
+#define GL_TEXTURE25_ARB			0x84D9
+#define GL_TEXTURE26_ARB			0x84DA
+#define GL_TEXTURE27_ARB			0x84DB
+#define GL_TEXTURE28_ARB			0x84DC
+#define GL_TEXTURE29_ARB			0x84DD
+#define GL_TEXTURE30_ARB			0x84DE
+#define GL_TEXTURE31_ARB			0x84DF
+#define GL_ACTIVE_TEXTURE_ARB			0x84E0
+#define GL_CLIENT_ACTIVE_TEXTURE_ARB		0x84E1
+#define GL_MAX_TEXTURE_UNITS_ARB		0x84E2
+
+GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
+GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
+GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
+GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
+GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
+GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
+GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
+GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
+GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
+GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
+GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
+GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
+GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
+GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
+GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
+GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
+GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
+GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
+GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
+GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
+GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
+GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
+GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
+GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
+GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
+GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
+GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
+GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
+GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
+GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
+GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
+
+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
+
+#endif /* GL_ARB_multitexture */
+
+
+
+/*
+ * Define this token if you want "old-style" header file behaviour (extensions
+ * defined in gl.h).  Otherwise, extensions will be included from glext.h.
+ */
+#if defined(GL_GLEXT_LEGACY)
+
+/* All extensions that used to be here are now found in glext.h */
+
+#else  /* GL_GLEXT_LEGACY */
+
+#include <mesa_glext.h>
+
+#endif  /* GL_GLEXT_LEGACY */
+
+
+
+#if GL_ARB_shader_objects
+
+#ifndef GL_MESA_shader_debug
+#define GL_MESA_shader_debug 1
+
+#define GL_DEBUG_OBJECT_MESA              0x8759
+#define GL_DEBUG_PRINT_MESA               0x875A
+#define GL_DEBUG_ASSERT_MESA              0x875B
+
+GLAPI GLhandleARB APIENTRY glCreateDebugObjectMESA (void);
+GLAPI void APIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
+GLAPI void APIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
+                                         GLsizei *length, GLcharARB *debugLog);
+GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
+
+#endif /* GL_MESA_shader_debug */
+
+#endif /* GL_ARB_shader_objects */
+
+
+/*
+ * ???. GL_MESA_packed_depth_stencil
+ * XXX obsolete
+ */
+#ifndef GL_MESA_packed_depth_stencil
+#define GL_MESA_packed_depth_stencil 1
+
+#define GL_DEPTH_STENCIL_MESA			0x8750
+#define GL_UNSIGNED_INT_24_8_MESA		0x8751
+#define GL_UNSIGNED_INT_8_24_REV_MESA		0x8752
+#define GL_UNSIGNED_SHORT_15_1_MESA		0x8753
+#define GL_UNSIGNED_SHORT_1_15_REV_MESA		0x8754
+
+#endif /* GL_MESA_packed_depth_stencil */
+
+
+#ifndef GL_MESA_program_debug
+#define GL_MESA_program_debug 1
+
+#define GL_FRAGMENT_PROGRAM_POSITION_MESA       0x8bb0
+#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA       0x8bb1
+#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA  0x8bb2
+#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA  0x8bb3
+#define GL_VERTEX_PROGRAM_POSITION_MESA         0x8bb4
+#define GL_VERTEX_PROGRAM_CALLBACK_MESA         0x8bb5
+#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA    0x8bb6
+#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA    0x8bb7
+
+typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
+
+GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data);
+
+GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v);
+
+#endif /* GL_MESA_program_debug */
+
+
+#ifndef GL_ATI_blend_equation_separate
+#define GL_ATI_blend_equation_separate 1
+
+#define GL_ALPHA_BLEND_EQUATION_ATI	        0x883D
+
+GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
+
+#endif /* GL_ATI_blend_equation_separate */
+
+
+
+/**
+ ** NOTE!!!!!  If you add new functions to this file, or update
+ ** glext.h be sure to regenerate the gl_mangle.h file.  See comments
+ ** in that file for details.
+ **/
+
+
+
+/**********************************************************************
+ * Begin system-specific stuff
+ */
+#if defined(PRAGMA_EXPORT_SUPPORTED)
+#pragma export off
+#endif
+
+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
+#pragma import off
+#endif
+/*
+ * End system-specific stuff
+ **********************************************************************/
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gl_h_ */
Index: git/target-i386/mesa_glext.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/mesa_glext.h	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,7279 @@
+#ifndef __glext_h_
+#define __glext_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2007 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+#define WIN32_LEAN_AND_MEAN 1
+#include <windows.h>
+#endif
+
+#ifndef APIENTRY
+#define APIENTRY
+#endif
+#ifndef APIENTRYP
+#define APIENTRYP APIENTRY *
+#endif
+#ifndef GLAPI
+#define GLAPI extern
+#endif
+
+/*************************************************************/
+
+/* Header file version number, required by OpenGL ABI for Linux */
+/* glext.h last updated 2007/02/12 */
+/* Current version at http://www.opengl.org/registry/ */
+#define GL_GLEXT_VERSION 39
+
+#ifndef GL_VERSION_1_2
+#define GL_UNSIGNED_BYTE_3_3_2            0x8032
+#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034
+#define GL_UNSIGNED_INT_8_8_8_8           0x8035
+#define GL_UNSIGNED_INT_10_10_10_2        0x8036
+#define GL_RESCALE_NORMAL                 0x803A
+#define GL_TEXTURE_BINDING_3D             0x806A
+#define GL_PACK_SKIP_IMAGES               0x806B
+#define GL_PACK_IMAGE_HEIGHT              0x806C
+#define GL_UNPACK_SKIP_IMAGES             0x806D
+#define GL_UNPACK_IMAGE_HEIGHT            0x806E
+#define GL_TEXTURE_3D                     0x806F
+#define GL_PROXY_TEXTURE_3D               0x8070
+#define GL_TEXTURE_DEPTH                  0x8071
+#define GL_TEXTURE_WRAP_R                 0x8072
+#define GL_MAX_3D_TEXTURE_SIZE            0x8073
+#define GL_UNSIGNED_BYTE_2_3_3_REV        0x8362
+#define GL_UNSIGNED_SHORT_5_6_5           0x8363
+#define GL_UNSIGNED_SHORT_5_6_5_REV       0x8364
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV     0x8365
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV     0x8366
+#define GL_UNSIGNED_INT_8_8_8_8_REV       0x8367
+#define GL_UNSIGNED_INT_2_10_10_10_REV    0x8368
+#define GL_BGR                            0x80E0
+#define GL_BGRA                           0x80E1
+#define GL_MAX_ELEMENTS_VERTICES          0x80E8
+#define GL_MAX_ELEMENTS_INDICES           0x80E9
+#define GL_CLAMP_TO_EDGE                  0x812F
+#define GL_TEXTURE_MIN_LOD                0x813A
+#define GL_TEXTURE_MAX_LOD                0x813B
+#define GL_TEXTURE_BASE_LEVEL             0x813C
+#define GL_TEXTURE_MAX_LEVEL              0x813D
+#define GL_LIGHT_MODEL_COLOR_CONTROL      0x81F8
+#define GL_SINGLE_COLOR                   0x81F9
+#define GL_SEPARATE_SPECULAR_COLOR        0x81FA
+#define GL_SMOOTH_POINT_SIZE_RANGE        0x0B12
+#define GL_SMOOTH_POINT_SIZE_GRANULARITY  0x0B13
+#define GL_SMOOTH_LINE_WIDTH_RANGE        0x0B22
+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY  0x0B23
+#define GL_ALIASED_POINT_SIZE_RANGE       0x846D
+#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E
+#endif
+
+#ifndef GL_ARB_imaging
+#define GL_CONSTANT_COLOR                 0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR       0x8002
+#define GL_CONSTANT_ALPHA                 0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004
+#define GL_BLEND_COLOR                    0x8005
+#define GL_FUNC_ADD                       0x8006
+#define GL_MIN                            0x8007
+#define GL_MAX                            0x8008
+#define GL_BLEND_EQUATION                 0x8009
+#define GL_FUNC_SUBTRACT                  0x800A
+#define GL_FUNC_REVERSE_SUBTRACT          0x800B
+#define GL_CONVOLUTION_1D                 0x8010
+#define GL_CONVOLUTION_2D                 0x8011
+#define GL_SEPARABLE_2D                   0x8012
+#define GL_CONVOLUTION_BORDER_MODE        0x8013
+#define GL_CONVOLUTION_FILTER_SCALE       0x8014
+#define GL_CONVOLUTION_FILTER_BIAS        0x8015
+#define GL_REDUCE                         0x8016
+#define GL_CONVOLUTION_FORMAT             0x8017
+#define GL_CONVOLUTION_WIDTH              0x8018
+#define GL_CONVOLUTION_HEIGHT             0x8019
+#define GL_MAX_CONVOLUTION_WIDTH          0x801A
+#define GL_MAX_CONVOLUTION_HEIGHT         0x801B
+#define GL_POST_CONVOLUTION_RED_SCALE     0x801C
+#define GL_POST_CONVOLUTION_GREEN_SCALE   0x801D
+#define GL_POST_CONVOLUTION_BLUE_SCALE    0x801E
+#define GL_POST_CONVOLUTION_ALPHA_SCALE   0x801F
+#define GL_POST_CONVOLUTION_RED_BIAS      0x8020
+#define GL_POST_CONVOLUTION_GREEN_BIAS    0x8021
+#define GL_POST_CONVOLUTION_BLUE_BIAS     0x8022
+#define GL_POST_CONVOLUTION_ALPHA_BIAS    0x8023
+#define GL_HISTOGRAM                      0x8024
+#define GL_PROXY_HISTOGRAM                0x8025
+#define GL_HISTOGRAM_WIDTH                0x8026
+#define GL_HISTOGRAM_FORMAT               0x8027
+#define GL_HISTOGRAM_RED_SIZE             0x8028
+#define GL_HISTOGRAM_GREEN_SIZE           0x8029
+#define GL_HISTOGRAM_BLUE_SIZE            0x802A
+#define GL_HISTOGRAM_ALPHA_SIZE           0x802B
+#define GL_HISTOGRAM_LUMINANCE_SIZE       0x802C
+#define GL_HISTOGRAM_SINK                 0x802D
+#define GL_MINMAX                         0x802E
+#define GL_MINMAX_FORMAT                  0x802F
+#define GL_MINMAX_SINK                    0x8030
+#define GL_TABLE_TOO_LARGE                0x8031
+#define GL_COLOR_MATRIX                   0x80B1
+#define GL_COLOR_MATRIX_STACK_DEPTH       0x80B2
+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH   0x80B3
+#define GL_POST_COLOR_MATRIX_RED_SCALE    0x80B4
+#define GL_POST_COLOR_MATRIX_GREEN_SCALE  0x80B5
+#define GL_POST_COLOR_MATRIX_BLUE_SCALE   0x80B6
+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE  0x80B7
+#define GL_POST_COLOR_MATRIX_RED_BIAS     0x80B8
+#define GL_POST_COLOR_MATRIX_GREEN_BIAS   0x80B9
+#define GL_POST_COLOR_MATRIX_BLUE_BIAS    0x80BA
+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS   0x80BB
+#define GL_COLOR_TABLE                    0x80D0
+#define GL_POST_CONVOLUTION_COLOR_TABLE   0x80D1
+#define GL_POST_COLOR_MATRIX_COLOR_TABLE  0x80D2
+#define GL_PROXY_COLOR_TABLE              0x80D3
+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
+#define GL_COLOR_TABLE_SCALE              0x80D6
+#define GL_COLOR_TABLE_BIAS               0x80D7
+#define GL_COLOR_TABLE_FORMAT             0x80D8
+#define GL_COLOR_TABLE_WIDTH              0x80D9
+#define GL_COLOR_TABLE_RED_SIZE           0x80DA
+#define GL_COLOR_TABLE_GREEN_SIZE         0x80DB
+#define GL_COLOR_TABLE_BLUE_SIZE          0x80DC
+#define GL_COLOR_TABLE_ALPHA_SIZE         0x80DD
+#define GL_COLOR_TABLE_LUMINANCE_SIZE     0x80DE
+#define GL_COLOR_TABLE_INTENSITY_SIZE     0x80DF
+#define GL_CONSTANT_BORDER                0x8151
+#define GL_REPLICATE_BORDER               0x8153
+#define GL_CONVOLUTION_BORDER_COLOR       0x8154
+#endif
+
+#ifndef GL_VERSION_1_3
+#define GL_TEXTURE0                       0x84C0
+#define GL_TEXTURE1                       0x84C1
+#define GL_TEXTURE2                       0x84C2
+#define GL_TEXTURE3                       0x84C3
+#define GL_TEXTURE4                       0x84C4
+#define GL_TEXTURE5                       0x84C5
+#define GL_TEXTURE6                       0x84C6
+#define GL_TEXTURE7                       0x84C7
+#define GL_TEXTURE8                       0x84C8
+#define GL_TEXTURE9                       0x84C9
+#define GL_TEXTURE10                      0x84CA
+#define GL_TEXTURE11                      0x84CB
+#define GL_TEXTURE12                      0x84CC
+#define GL_TEXTURE13                      0x84CD
+#define GL_TEXTURE14                      0x84CE
+#define GL_TEXTURE15                      0x84CF
+#define GL_TEXTURE16                      0x84D0
+#define GL_TEXTURE17                      0x84D1
+#define GL_TEXTURE18                      0x84D2
+#define GL_TEXTURE19                      0x84D3
+#define GL_TEXTURE20                      0x84D4
+#define GL_TEXTURE21                      0x84D5
+#define GL_TEXTURE22                      0x84D6
+#define GL_TEXTURE23                      0x84D7
+#define GL_TEXTURE24                      0x84D8
+#define GL_TEXTURE25                      0x84D9
+#define GL_TEXTURE26                      0x84DA
+#define GL_TEXTURE27                      0x84DB
+#define GL_TEXTURE28                      0x84DC
+#define GL_TEXTURE29                      0x84DD
+#define GL_TEXTURE30                      0x84DE
+#define GL_TEXTURE31                      0x84DF
+#define GL_ACTIVE_TEXTURE                 0x84E0
+#define GL_CLIENT_ACTIVE_TEXTURE          0x84E1
+#define GL_MAX_TEXTURE_UNITS              0x84E2
+#define GL_TRANSPOSE_MODELVIEW_MATRIX     0x84E3
+#define GL_TRANSPOSE_PROJECTION_MATRIX    0x84E4
+#define GL_TRANSPOSE_TEXTURE_MATRIX       0x84E5
+#define GL_TRANSPOSE_COLOR_MATRIX         0x84E6
+#define GL_MULTISAMPLE                    0x809D
+#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE            0x809F
+#define GL_SAMPLE_COVERAGE                0x80A0
+#define GL_SAMPLE_BUFFERS                 0x80A8
+#define GL_SAMPLES                        0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE          0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT         0x80AB
+#define GL_MULTISAMPLE_BIT                0x20000000
+#define GL_NORMAL_MAP                     0x8511
+#define GL_REFLECTION_MAP                 0x8512
+#define GL_TEXTURE_CUBE_MAP               0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP       0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP         0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C
+#define GL_COMPRESSED_ALPHA               0x84E9
+#define GL_COMPRESSED_LUMINANCE           0x84EA
+#define GL_COMPRESSED_LUMINANCE_ALPHA     0x84EB
+#define GL_COMPRESSED_INTENSITY           0x84EC
+#define GL_COMPRESSED_RGB                 0x84ED
+#define GL_COMPRESSED_RGBA                0x84EE
+#define GL_TEXTURE_COMPRESSION_HINT       0x84EF
+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE  0x86A0
+#define GL_TEXTURE_COMPRESSED             0x86A1
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
+#define GL_CLAMP_TO_BORDER                0x812D
+#define GL_COMBINE                        0x8570
+#define GL_COMBINE_RGB                    0x8571
+#define GL_COMBINE_ALPHA                  0x8572
+#define GL_SOURCE0_RGB                    0x8580
+#define GL_SOURCE1_RGB                    0x8581
+#define GL_SOURCE2_RGB                    0x8582
+#define GL_SOURCE0_ALPHA                  0x8588
+#define GL_SOURCE1_ALPHA                  0x8589
+#define GL_SOURCE2_ALPHA                  0x858A
+#define GL_OPERAND0_RGB                   0x8590
+#define GL_OPERAND1_RGB                   0x8591
+#define GL_OPERAND2_RGB                   0x8592
+#define GL_OPERAND0_ALPHA                 0x8598
+#define GL_OPERAND1_ALPHA                 0x8599
+#define GL_OPERAND2_ALPHA                 0x859A
+#define GL_RGB_SCALE                      0x8573
+#define GL_ADD_SIGNED                     0x8574
+#define GL_INTERPOLATE                    0x8575
+#define GL_SUBTRACT                       0x84E7
+#define GL_CONSTANT                       0x8576
+#define GL_PRIMARY_COLOR                  0x8577
+#define GL_PREVIOUS                       0x8578
+#define GL_DOT3_RGB                       0x86AE
+#define GL_DOT3_RGBA                      0x86AF
+#endif
+
+#ifndef GL_VERSION_1_4
+#define GL_BLEND_DST_RGB                  0x80C8
+#define GL_BLEND_SRC_RGB                  0x80C9
+#define GL_BLEND_DST_ALPHA                0x80CA
+#define GL_BLEND_SRC_ALPHA                0x80CB
+#define GL_POINT_SIZE_MIN                 0x8126
+#define GL_POINT_SIZE_MAX                 0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE      0x8128
+#define GL_POINT_DISTANCE_ATTENUATION     0x8129
+#define GL_GENERATE_MIPMAP                0x8191
+#define GL_GENERATE_MIPMAP_HINT           0x8192
+#define GL_DEPTH_COMPONENT16              0x81A5
+#define GL_DEPTH_COMPONENT24              0x81A6
+#define GL_DEPTH_COMPONENT32              0x81A7
+#define GL_MIRRORED_REPEAT                0x8370
+#define GL_FOG_COORDINATE_SOURCE          0x8450
+#define GL_FOG_COORDINATE                 0x8451
+#define GL_FRAGMENT_DEPTH                 0x8452
+#define GL_CURRENT_FOG_COORDINATE         0x8453
+#define GL_FOG_COORDINATE_ARRAY_TYPE      0x8454
+#define GL_FOG_COORDINATE_ARRAY_STRIDE    0x8455
+#define GL_FOG_COORDINATE_ARRAY_POINTER   0x8456
+#define GL_FOG_COORDINATE_ARRAY           0x8457
+#define GL_COLOR_SUM                      0x8458
+#define GL_CURRENT_SECONDARY_COLOR        0x8459
+#define GL_SECONDARY_COLOR_ARRAY_SIZE     0x845A
+#define GL_SECONDARY_COLOR_ARRAY_TYPE     0x845B
+#define GL_SECONDARY_COLOR_ARRAY_STRIDE   0x845C
+#define GL_SECONDARY_COLOR_ARRAY_POINTER  0x845D
+#define GL_SECONDARY_COLOR_ARRAY          0x845E
+#define GL_MAX_TEXTURE_LOD_BIAS           0x84FD
+#define GL_TEXTURE_FILTER_CONTROL         0x8500
+#define GL_TEXTURE_LOD_BIAS               0x8501
+#define GL_INCR_WRAP                      0x8507
+#define GL_DECR_WRAP                      0x8508
+#define GL_TEXTURE_DEPTH_SIZE             0x884A
+#define GL_DEPTH_TEXTURE_MODE             0x884B
+#define GL_TEXTURE_COMPARE_MODE           0x884C
+#define GL_TEXTURE_COMPARE_FUNC           0x884D
+#define GL_COMPARE_R_TO_TEXTURE           0x884E
+#endif
+
+#ifndef GL_VERSION_1_5
+#define GL_BUFFER_SIZE                    0x8764
+#define GL_BUFFER_USAGE                   0x8765
+#define GL_QUERY_COUNTER_BITS             0x8864
+#define GL_CURRENT_QUERY                  0x8865
+#define GL_QUERY_RESULT                   0x8866
+#define GL_QUERY_RESULT_AVAILABLE         0x8867
+#define GL_ARRAY_BUFFER                   0x8892
+#define GL_ELEMENT_ARRAY_BUFFER           0x8893
+#define GL_ARRAY_BUFFER_BINDING           0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895
+#define GL_VERTEX_ARRAY_BUFFER_BINDING    0x8896
+#define GL_NORMAL_ARRAY_BUFFER_BINDING    0x8897
+#define GL_COLOR_ARRAY_BUFFER_BINDING     0x8898
+#define GL_INDEX_ARRAY_BUFFER_BINDING     0x8899
+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
+#define GL_WEIGHT_ARRAY_BUFFER_BINDING    0x889E
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+#define GL_READ_ONLY                      0x88B8
+#define GL_WRITE_ONLY                     0x88B9
+#define GL_READ_WRITE                     0x88BA
+#define GL_BUFFER_ACCESS                  0x88BB
+#define GL_BUFFER_MAPPED                  0x88BC
+#define GL_BUFFER_MAP_POINTER             0x88BD
+#define GL_STREAM_DRAW                    0x88E0
+#define GL_STREAM_READ                    0x88E1
+#define GL_STREAM_COPY                    0x88E2
+#define GL_STATIC_DRAW                    0x88E4
+#define GL_STATIC_READ                    0x88E5
+#define GL_STATIC_COPY                    0x88E6
+#define GL_DYNAMIC_DRAW                   0x88E8
+#define GL_DYNAMIC_READ                   0x88E9
+#define GL_DYNAMIC_COPY                   0x88EA
+#define GL_SAMPLES_PASSED                 0x8914
+#define GL_FOG_COORD_SRC                  GL_FOG_COORDINATE_SOURCE
+#define GL_FOG_COORD                      GL_FOG_COORDINATE
+#define GL_CURRENT_FOG_COORD              GL_CURRENT_FOG_COORDINATE
+#define GL_FOG_COORD_ARRAY_TYPE           GL_FOG_COORDINATE_ARRAY_TYPE
+#define GL_FOG_COORD_ARRAY_STRIDE         GL_FOG_COORDINATE_ARRAY_STRIDE
+#define GL_FOG_COORD_ARRAY_POINTER        GL_FOG_COORDINATE_ARRAY_POINTER
+#define GL_FOG_COORD_ARRAY                GL_FOG_COORDINATE_ARRAY
+#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
+#define GL_SRC0_RGB                       GL_SOURCE0_RGB
+#define GL_SRC1_RGB                       GL_SOURCE1_RGB
+#define GL_SRC2_RGB                       GL_SOURCE2_RGB
+#define GL_SRC0_ALPHA                     GL_SOURCE0_ALPHA
+#define GL_SRC1_ALPHA                     GL_SOURCE1_ALPHA
+#define GL_SRC2_ALPHA                     GL_SOURCE2_ALPHA
+#endif
+
+#ifndef GL_VERSION_2_0
+#define GL_BLEND_EQUATION_RGB             GL_BLEND_EQUATION
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED    0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE       0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE     0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE       0x8625
+#define GL_CURRENT_VERTEX_ATTRIB          0x8626
+#define GL_VERTEX_PROGRAM_POINT_SIZE      0x8642
+#define GL_VERTEX_PROGRAM_TWO_SIDE        0x8643
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER    0x8645
+#define GL_STENCIL_BACK_FUNC              0x8800
+#define GL_STENCIL_BACK_FAIL              0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803
+#define GL_MAX_DRAW_BUFFERS               0x8824
+#define GL_DRAW_BUFFER0                   0x8825
+#define GL_DRAW_BUFFER1                   0x8826
+#define GL_DRAW_BUFFER2                   0x8827
+#define GL_DRAW_BUFFER3                   0x8828
+#define GL_DRAW_BUFFER4                   0x8829
+#define GL_DRAW_BUFFER5                   0x882A
+#define GL_DRAW_BUFFER6                   0x882B
+#define GL_DRAW_BUFFER7                   0x882C
+#define GL_DRAW_BUFFER8                   0x882D
+#define GL_DRAW_BUFFER9                   0x882E
+#define GL_DRAW_BUFFER10                  0x882F
+#define GL_DRAW_BUFFER11                  0x8830
+#define GL_DRAW_BUFFER12                  0x8831
+#define GL_DRAW_BUFFER13                  0x8832
+#define GL_DRAW_BUFFER14                  0x8833
+#define GL_DRAW_BUFFER15                  0x8834
+#define GL_BLEND_EQUATION_ALPHA           0x883D
+#define GL_POINT_SPRITE                   0x8861
+#define GL_COORD_REPLACE                  0x8862
+#define GL_MAX_VERTEX_ATTRIBS             0x8869
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
+#define GL_MAX_TEXTURE_COORDS             0x8871
+#define GL_MAX_TEXTURE_IMAGE_UNITS        0x8872
+#define GL_FRAGMENT_SHADER                0x8B30
+#define GL_VERTEX_SHADER                  0x8B31
+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS  0x8B4A
+#define GL_MAX_VARYING_FLOATS             0x8B4B
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_SHADER_TYPE                    0x8B4F
+#define GL_FLOAT_VEC2                     0x8B50
+#define GL_FLOAT_VEC3                     0x8B51
+#define GL_FLOAT_VEC4                     0x8B52
+#define GL_INT_VEC2                       0x8B53
+#define GL_INT_VEC3                       0x8B54
+#define GL_INT_VEC4                       0x8B55
+#define GL_BOOL                           0x8B56
+#define GL_BOOL_VEC2                      0x8B57
+#define GL_BOOL_VEC3                      0x8B58
+#define GL_BOOL_VEC4                      0x8B59
+#define GL_FLOAT_MAT2                     0x8B5A
+#define GL_FLOAT_MAT3                     0x8B5B
+#define GL_FLOAT_MAT4                     0x8B5C
+#define GL_SAMPLER_1D                     0x8B5D
+#define GL_SAMPLER_2D                     0x8B5E
+#define GL_SAMPLER_3D                     0x8B5F
+#define GL_SAMPLER_CUBE                   0x8B60
+#define GL_SAMPLER_1D_SHADOW              0x8B61
+#define GL_SAMPLER_2D_SHADOW              0x8B62
+#define GL_DELETE_STATUS                  0x8B80
+#define GL_COMPILE_STATUS                 0x8B81
+#define GL_LINK_STATUS                    0x8B82
+#define GL_VALIDATE_STATUS                0x8B83
+#define GL_INFO_LOG_LENGTH                0x8B84
+#define GL_ATTACHED_SHADERS               0x8B85
+#define GL_ACTIVE_UNIFORMS                0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH      0x8B87
+#define GL_SHADER_SOURCE_LENGTH           0x8B88
+#define GL_ACTIVE_ATTRIBUTES              0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH    0x8B8A
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
+#define GL_SHADING_LANGUAGE_VERSION       0x8B8C
+#define GL_CURRENT_PROGRAM                0x8B8D
+#define GL_POINT_SPRITE_COORD_ORIGIN      0x8CA0
+#define GL_LOWER_LEFT                     0x8CA1
+#define GL_UPPER_LEFT                     0x8CA2
+#define GL_STENCIL_BACK_REF               0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK         0x8CA5
+#endif
+
+#ifndef GL_VERSION_2_1
+#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
+#define GL_PIXEL_PACK_BUFFER              0x88EB
+#define GL_PIXEL_UNPACK_BUFFER            0x88EC
+#define GL_PIXEL_PACK_BUFFER_BINDING      0x88ED
+#define GL_PIXEL_UNPACK_BUFFER_BINDING    0x88EF
+#define GL_FLOAT_MAT2x3                   0x8B65
+#define GL_FLOAT_MAT2x4                   0x8B66
+#define GL_FLOAT_MAT3x2                   0x8B67
+#define GL_FLOAT_MAT3x4                   0x8B68
+#define GL_FLOAT_MAT4x2                   0x8B69
+#define GL_FLOAT_MAT4x3                   0x8B6A
+#define GL_SRGB                           0x8C40
+#define GL_SRGB8                          0x8C41
+#define GL_SRGB_ALPHA                     0x8C42
+#define GL_SRGB8_ALPHA8                   0x8C43
+#define GL_SLUMINANCE_ALPHA               0x8C44
+#define GL_SLUMINANCE8_ALPHA8             0x8C45
+#define GL_SLUMINANCE                     0x8C46
+#define GL_SLUMINANCE8                    0x8C47
+#define GL_COMPRESSED_SRGB                0x8C48
+#define GL_COMPRESSED_SRGB_ALPHA          0x8C49
+#define GL_COMPRESSED_SLUMINANCE          0x8C4A
+#define GL_COMPRESSED_SLUMINANCE_ALPHA    0x8C4B
+#endif
+
+#ifndef GL_ARB_multitexture
+#define GL_TEXTURE0_ARB                   0x84C0
+#define GL_TEXTURE1_ARB                   0x84C1
+#define GL_TEXTURE2_ARB                   0x84C2
+#define GL_TEXTURE3_ARB                   0x84C3
+#define GL_TEXTURE4_ARB                   0x84C4
+#define GL_TEXTURE5_ARB                   0x84C5
+#define GL_TEXTURE6_ARB                   0x84C6
+#define GL_TEXTURE7_ARB                   0x84C7
+#define GL_TEXTURE8_ARB                   0x84C8
+#define GL_TEXTURE9_ARB                   0x84C9
+#define GL_TEXTURE10_ARB                  0x84CA
+#define GL_TEXTURE11_ARB                  0x84CB
+#define GL_TEXTURE12_ARB                  0x84CC
+#define GL_TEXTURE13_ARB                  0x84CD
+#define GL_TEXTURE14_ARB                  0x84CE
+#define GL_TEXTURE15_ARB                  0x84CF
+#define GL_TEXTURE16_ARB                  0x84D0
+#define GL_TEXTURE17_ARB                  0x84D1
+#define GL_TEXTURE18_ARB                  0x84D2
+#define GL_TEXTURE19_ARB                  0x84D3
+#define GL_TEXTURE20_ARB                  0x84D4
+#define GL_TEXTURE21_ARB                  0x84D5
+#define GL_TEXTURE22_ARB                  0x84D6
+#define GL_TEXTURE23_ARB                  0x84D7
+#define GL_TEXTURE24_ARB                  0x84D8
+#define GL_TEXTURE25_ARB                  0x84D9
+#define GL_TEXTURE26_ARB                  0x84DA
+#define GL_TEXTURE27_ARB                  0x84DB
+#define GL_TEXTURE28_ARB                  0x84DC
+#define GL_TEXTURE29_ARB                  0x84DD
+#define GL_TEXTURE30_ARB                  0x84DE
+#define GL_TEXTURE31_ARB                  0x84DF
+#define GL_ACTIVE_TEXTURE_ARB             0x84E0
+#define GL_CLIENT_ACTIVE_TEXTURE_ARB      0x84E1
+#define GL_MAX_TEXTURE_UNITS_ARB          0x84E2
+#endif
+
+#ifndef GL_ARB_transpose_matrix
+#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
+#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
+#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB   0x84E5
+#define GL_TRANSPOSE_COLOR_MATRIX_ARB     0x84E6
+#endif
+
+#ifndef GL_ARB_multisample
+#define GL_MULTISAMPLE_ARB                0x809D
+#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB   0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE_ARB        0x809F
+#define GL_SAMPLE_COVERAGE_ARB            0x80A0
+#define GL_SAMPLE_BUFFERS_ARB             0x80A8
+#define GL_SAMPLES_ARB                    0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE_ARB      0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT_ARB     0x80AB
+#define GL_MULTISAMPLE_BIT_ARB            0x20000000
+#endif
+
+#ifndef GL_ARB_texture_env_add
+#endif
+
+#ifndef GL_ARB_texture_cube_map
+#define GL_NORMAL_MAP_ARB                 0x8511
+#define GL_REFLECTION_MAP_ARB             0x8512
+#define GL_TEXTURE_CUBE_MAP_ARB           0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP_ARB   0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP_ARB     0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB  0x851C
+#endif
+
+#ifndef GL_ARB_texture_compression
+#define GL_COMPRESSED_ALPHA_ARB           0x84E9
+#define GL_COMPRESSED_LUMINANCE_ARB       0x84EA
+#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
+#define GL_COMPRESSED_INTENSITY_ARB       0x84EC
+#define GL_COMPRESSED_RGB_ARB             0x84ED
+#define GL_COMPRESSED_RGBA_ARB            0x84EE
+#define GL_TEXTURE_COMPRESSION_HINT_ARB   0x84EF
+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
+#define GL_TEXTURE_COMPRESSED_ARB         0x86A1
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
+#endif
+
+#ifndef GL_ARB_texture_border_clamp
+#define GL_CLAMP_TO_BORDER_ARB            0x812D
+#endif
+
+#ifndef GL_ARB_point_parameters
+#define GL_POINT_SIZE_MIN_ARB             0x8126
+#define GL_POINT_SIZE_MAX_ARB             0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE_ARB  0x8128
+#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
+#endif
+
+#ifndef GL_ARB_vertex_blend
+#define GL_MAX_VERTEX_UNITS_ARB           0x86A4
+#define GL_ACTIVE_VERTEX_UNITS_ARB        0x86A5
+#define GL_WEIGHT_SUM_UNITY_ARB           0x86A6
+#define GL_VERTEX_BLEND_ARB               0x86A7
+#define GL_CURRENT_WEIGHT_ARB             0x86A8
+#define GL_WEIGHT_ARRAY_TYPE_ARB          0x86A9
+#define GL_WEIGHT_ARRAY_STRIDE_ARB        0x86AA
+#define GL_WEIGHT_ARRAY_SIZE_ARB          0x86AB
+#define GL_WEIGHT_ARRAY_POINTER_ARB       0x86AC
+#define GL_WEIGHT_ARRAY_ARB               0x86AD
+#define GL_MODELVIEW0_ARB                 0x1700
+#define GL_MODELVIEW1_ARB                 0x850A
+#define GL_MODELVIEW2_ARB                 0x8722
+#define GL_MODELVIEW3_ARB                 0x8723
+#define GL_MODELVIEW4_ARB                 0x8724
+#define GL_MODELVIEW5_ARB                 0x8725
+#define GL_MODELVIEW6_ARB                 0x8726
+#define GL_MODELVIEW7_ARB                 0x8727
+#define GL_MODELVIEW8_ARB                 0x8728
+#define GL_MODELVIEW9_ARB                 0x8729
+#define GL_MODELVIEW10_ARB                0x872A
+#define GL_MODELVIEW11_ARB                0x872B
+#define GL_MODELVIEW12_ARB                0x872C
+#define GL_MODELVIEW13_ARB                0x872D
+#define GL_MODELVIEW14_ARB                0x872E
+#define GL_MODELVIEW15_ARB                0x872F
+#define GL_MODELVIEW16_ARB                0x8730
+#define GL_MODELVIEW17_ARB                0x8731
+#define GL_MODELVIEW18_ARB                0x8732
+#define GL_MODELVIEW19_ARB                0x8733
+#define GL_MODELVIEW20_ARB                0x8734
+#define GL_MODELVIEW21_ARB                0x8735
+#define GL_MODELVIEW22_ARB                0x8736
+#define GL_MODELVIEW23_ARB                0x8737
+#define GL_MODELVIEW24_ARB                0x8738
+#define GL_MODELVIEW25_ARB                0x8739
+#define GL_MODELVIEW26_ARB                0x873A
+#define GL_MODELVIEW27_ARB                0x873B
+#define GL_MODELVIEW28_ARB                0x873C
+#define GL_MODELVIEW29_ARB                0x873D
+#define GL_MODELVIEW30_ARB                0x873E
+#define GL_MODELVIEW31_ARB                0x873F
+#endif
+
+#ifndef GL_ARB_matrix_palette
+#define GL_MATRIX_PALETTE_ARB             0x8840
+#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
+#define GL_MAX_PALETTE_MATRICES_ARB       0x8842
+#define GL_CURRENT_PALETTE_MATRIX_ARB     0x8843
+#define GL_MATRIX_INDEX_ARRAY_ARB         0x8844
+#define GL_CURRENT_MATRIX_INDEX_ARB       0x8845
+#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB    0x8846
+#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB    0x8847
+#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB  0x8848
+#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
+#endif
+
+#ifndef GL_ARB_texture_env_combine
+#define GL_COMBINE_ARB                    0x8570
+#define GL_COMBINE_RGB_ARB                0x8571
+#define GL_COMBINE_ALPHA_ARB              0x8572
+#define GL_SOURCE0_RGB_ARB                0x8580
+#define GL_SOURCE1_RGB_ARB                0x8581
+#define GL_SOURCE2_RGB_ARB                0x8582
+#define GL_SOURCE0_ALPHA_ARB              0x8588
+#define GL_SOURCE1_ALPHA_ARB              0x8589
+#define GL_SOURCE2_ALPHA_ARB              0x858A
+#define GL_OPERAND0_RGB_ARB               0x8590
+#define GL_OPERAND1_RGB_ARB               0x8591
+#define GL_OPERAND2_RGB_ARB               0x8592
+#define GL_OPERAND0_ALPHA_ARB             0x8598
+#define GL_OPERAND1_ALPHA_ARB             0x8599
+#define GL_OPERAND2_ALPHA_ARB             0x859A
+#define GL_RGB_SCALE_ARB                  0x8573
+#define GL_ADD_SIGNED_ARB                 0x8574
+#define GL_INTERPOLATE_ARB                0x8575
+#define GL_SUBTRACT_ARB                   0x84E7
+#define GL_CONSTANT_ARB                   0x8576
+#define GL_PRIMARY_COLOR_ARB              0x8577
+#define GL_PREVIOUS_ARB                   0x8578
+#endif
+
+#ifndef GL_ARB_texture_env_crossbar
+#endif
+
+#ifndef GL_ARB_texture_env_dot3
+#define GL_DOT3_RGB_ARB                   0x86AE
+#define GL_DOT3_RGBA_ARB                  0x86AF
+#endif
+
+#ifndef GL_ARB_texture_mirrored_repeat
+#define GL_MIRRORED_REPEAT_ARB            0x8370
+#endif
+
+#ifndef GL_ARB_depth_texture
+#define GL_DEPTH_COMPONENT16_ARB          0x81A5
+#define GL_DEPTH_COMPONENT24_ARB          0x81A6
+#define GL_DEPTH_COMPONENT32_ARB          0x81A7
+#define GL_TEXTURE_DEPTH_SIZE_ARB         0x884A
+#define GL_DEPTH_TEXTURE_MODE_ARB         0x884B
+#endif
+
+#ifndef GL_ARB_shadow
+#define GL_TEXTURE_COMPARE_MODE_ARB       0x884C
+#define GL_TEXTURE_COMPARE_FUNC_ARB       0x884D
+#define GL_COMPARE_R_TO_TEXTURE_ARB       0x884E
+#endif
+
+#ifndef GL_ARB_shadow_ambient
+#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
+#endif
+
+#ifndef GL_ARB_window_pos
+#endif
+
+#ifndef GL_ARB_vertex_program
+#define GL_COLOR_SUM_ARB                  0x8458
+#define GL_VERTEX_PROGRAM_ARB             0x8620
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB   0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB   0x8625
+#define GL_CURRENT_VERTEX_ATTRIB_ARB      0x8626
+#define GL_PROGRAM_LENGTH_ARB             0x8627
+#define GL_PROGRAM_STRING_ARB             0x8628
+#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
+#define GL_MAX_PROGRAM_MATRICES_ARB       0x862F
+#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
+#define GL_CURRENT_MATRIX_ARB             0x8641
+#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB  0x8642
+#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB    0x8643
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
+#define GL_PROGRAM_ERROR_POSITION_ARB     0x864B
+#define GL_PROGRAM_BINDING_ARB            0x8677
+#define GL_MAX_VERTEX_ATTRIBS_ARB         0x8869
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
+#define GL_PROGRAM_ERROR_STRING_ARB       0x8874
+#define GL_PROGRAM_FORMAT_ASCII_ARB       0x8875
+#define GL_PROGRAM_FORMAT_ARB             0x8876
+#define GL_PROGRAM_INSTRUCTIONS_ARB       0x88A0
+#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB   0x88A1
+#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
+#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
+#define GL_PROGRAM_TEMPORARIES_ARB        0x88A4
+#define GL_MAX_PROGRAM_TEMPORARIES_ARB    0x88A5
+#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
+#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
+#define GL_PROGRAM_PARAMETERS_ARB         0x88A8
+#define GL_MAX_PROGRAM_PARAMETERS_ARB     0x88A9
+#define GL_PROGRAM_NATIVE_PARAMETERS_ARB  0x88AA
+#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
+#define GL_PROGRAM_ATTRIBS_ARB            0x88AC
+#define GL_MAX_PROGRAM_ATTRIBS_ARB        0x88AD
+#define GL_PROGRAM_NATIVE_ATTRIBS_ARB     0x88AE
+#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
+#define GL_PROGRAM_ADDRESS_REGISTERS_ARB  0x88B0
+#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
+#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
+#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
+#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
+#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
+#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
+#define GL_TRANSPOSE_CURRENT_MATRIX_ARB   0x88B7
+#define GL_MATRIX0_ARB                    0x88C0
+#define GL_MATRIX1_ARB                    0x88C1
+#define GL_MATRIX2_ARB                    0x88C2
+#define GL_MATRIX3_ARB                    0x88C3
+#define GL_MATRIX4_ARB                    0x88C4
+#define GL_MATRIX5_ARB                    0x88C5
+#define GL_MATRIX6_ARB                    0x88C6
+#define GL_MATRIX7_ARB                    0x88C7
+#define GL_MATRIX8_ARB                    0x88C8
+#define GL_MATRIX9_ARB                    0x88C9
+#define GL_MATRIX10_ARB                   0x88CA
+#define GL_MATRIX11_ARB                   0x88CB
+#define GL_MATRIX12_ARB                   0x88CC
+#define GL_MATRIX13_ARB                   0x88CD
+#define GL_MATRIX14_ARB                   0x88CE
+#define GL_MATRIX15_ARB                   0x88CF
+#define GL_MATRIX16_ARB                   0x88D0
+#define GL_MATRIX17_ARB                   0x88D1
+#define GL_MATRIX18_ARB                   0x88D2
+#define GL_MATRIX19_ARB                   0x88D3
+#define GL_MATRIX20_ARB                   0x88D4
+#define GL_MATRIX21_ARB                   0x88D5
+#define GL_MATRIX22_ARB                   0x88D6
+#define GL_MATRIX23_ARB                   0x88D7
+#define GL_MATRIX24_ARB                   0x88D8
+#define GL_MATRIX25_ARB                   0x88D9
+#define GL_MATRIX26_ARB                   0x88DA
+#define GL_MATRIX27_ARB                   0x88DB
+#define GL_MATRIX28_ARB                   0x88DC
+#define GL_MATRIX29_ARB                   0x88DD
+#define GL_MATRIX30_ARB                   0x88DE
+#define GL_MATRIX31_ARB                   0x88DF
+#endif
+
+#ifndef GL_ARB_fragment_program
+#define GL_FRAGMENT_PROGRAM_ARB           0x8804
+#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB   0x8805
+#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB   0x8806
+#define GL_PROGRAM_TEX_INDIRECTIONS_ARB   0x8807
+#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
+#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
+#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
+#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
+#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
+#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
+#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
+#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
+#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
+#define GL_MAX_TEXTURE_COORDS_ARB         0x8871
+#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB    0x8872
+#endif
+
+#ifndef GL_ARB_vertex_buffer_object
+#define GL_BUFFER_SIZE_ARB                0x8764
+#define GL_BUFFER_USAGE_ARB               0x8765
+#define GL_ARRAY_BUFFER_ARB               0x8892
+#define GL_ELEMENT_ARRAY_BUFFER_ARB       0x8893
+#define GL_ARRAY_BUFFER_BINDING_ARB       0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
+#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
+#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
+#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
+#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
+#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
+#define GL_READ_ONLY_ARB                  0x88B8
+#define GL_WRITE_ONLY_ARB                 0x88B9
+#define GL_READ_WRITE_ARB                 0x88BA
+#define GL_BUFFER_ACCESS_ARB              0x88BB
+#define GL_BUFFER_MAPPED_ARB              0x88BC
+#define GL_BUFFER_MAP_POINTER_ARB         0x88BD
+#define GL_STREAM_DRAW_ARB                0x88E0
+#define GL_STREAM_READ_ARB                0x88E1
+#define GL_STREAM_COPY_ARB                0x88E2
+#define GL_STATIC_DRAW_ARB                0x88E4
+#define GL_STATIC_READ_ARB                0x88E5
+#define GL_STATIC_COPY_ARB                0x88E6
+#define GL_DYNAMIC_DRAW_ARB               0x88E8
+#define GL_DYNAMIC_READ_ARB               0x88E9
+#define GL_DYNAMIC_COPY_ARB               0x88EA
+#endif
+
+#ifndef GL_ARB_occlusion_query
+#define GL_QUERY_COUNTER_BITS_ARB         0x8864
+#define GL_CURRENT_QUERY_ARB              0x8865
+#define GL_QUERY_RESULT_ARB               0x8866
+#define GL_QUERY_RESULT_AVAILABLE_ARB     0x8867
+#define GL_SAMPLES_PASSED_ARB             0x8914
+#endif
+
+#ifndef GL_ARB_shader_objects
+#define GL_PROGRAM_OBJECT_ARB             0x8B40
+#define GL_SHADER_OBJECT_ARB              0x8B48
+#define GL_OBJECT_TYPE_ARB                0x8B4E
+#define GL_OBJECT_SUBTYPE_ARB             0x8B4F
+#define GL_FLOAT_VEC2_ARB                 0x8B50
+#define GL_FLOAT_VEC3_ARB                 0x8B51
+#define GL_FLOAT_VEC4_ARB                 0x8B52
+#define GL_INT_VEC2_ARB                   0x8B53
+#define GL_INT_VEC3_ARB                   0x8B54
+#define GL_INT_VEC4_ARB                   0x8B55
+#define GL_BOOL_ARB                       0x8B56
+#define GL_BOOL_VEC2_ARB                  0x8B57
+#define GL_BOOL_VEC3_ARB                  0x8B58
+#define GL_BOOL_VEC4_ARB                  0x8B59
+#define GL_FLOAT_MAT2_ARB                 0x8B5A
+#define GL_FLOAT_MAT3_ARB                 0x8B5B
+#define GL_FLOAT_MAT4_ARB                 0x8B5C
+#define GL_SAMPLER_1D_ARB                 0x8B5D
+#define GL_SAMPLER_2D_ARB                 0x8B5E
+#define GL_SAMPLER_3D_ARB                 0x8B5F
+#define GL_SAMPLER_CUBE_ARB               0x8B60
+#define GL_SAMPLER_1D_SHADOW_ARB          0x8B61
+#define GL_SAMPLER_2D_SHADOW_ARB          0x8B62
+#define GL_SAMPLER_2D_RECT_ARB            0x8B63
+#define GL_SAMPLER_2D_RECT_SHADOW_ARB     0x8B64
+#define GL_OBJECT_DELETE_STATUS_ARB       0x8B80
+#define GL_OBJECT_COMPILE_STATUS_ARB      0x8B81
+#define GL_OBJECT_LINK_STATUS_ARB         0x8B82
+#define GL_OBJECT_VALIDATE_STATUS_ARB     0x8B83
+#define GL_OBJECT_INFO_LOG_LENGTH_ARB     0x8B84
+#define GL_OBJECT_ATTACHED_OBJECTS_ARB    0x8B85
+#define GL_OBJECT_ACTIVE_UNIFORMS_ARB     0x8B86
+#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
+#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
+#endif
+
+#ifndef GL_ARB_vertex_shader
+#define GL_VERTEX_SHADER_ARB              0x8B31
+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
+#define GL_MAX_VARYING_FLOATS_ARB         0x8B4B
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
+#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB   0x8B89
+#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
+#endif
+
+#ifndef GL_ARB_fragment_shader
+#define GL_FRAGMENT_SHADER_ARB            0x8B30
+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
+#endif
+
+#ifndef GL_ARB_shading_language_100
+#define GL_SHADING_LANGUAGE_VERSION_ARB   0x8B8C
+#endif
+
+#ifndef GL_ARB_texture_non_power_of_two
+#endif
+
+#ifndef GL_ARB_point_sprite
+#define GL_POINT_SPRITE_ARB               0x8861
+#define GL_COORD_REPLACE_ARB              0x8862
+#endif
+
+#ifndef GL_ARB_fragment_program_shadow
+#endif
+
+#ifndef GL_ARB_draw_buffers
+#define GL_MAX_DRAW_BUFFERS_ARB           0x8824
+#define GL_DRAW_BUFFER0_ARB               0x8825
+#define GL_DRAW_BUFFER1_ARB               0x8826
+#define GL_DRAW_BUFFER2_ARB               0x8827
+#define GL_DRAW_BUFFER3_ARB               0x8828
+#define GL_DRAW_BUFFER4_ARB               0x8829
+#define GL_DRAW_BUFFER5_ARB               0x882A
+#define GL_DRAW_BUFFER6_ARB               0x882B
+#define GL_DRAW_BUFFER7_ARB               0x882C
+#define GL_DRAW_BUFFER8_ARB               0x882D
+#define GL_DRAW_BUFFER9_ARB               0x882E
+#define GL_DRAW_BUFFER10_ARB              0x882F
+#define GL_DRAW_BUFFER11_ARB              0x8830
+#define GL_DRAW_BUFFER12_ARB              0x8831
+#define GL_DRAW_BUFFER13_ARB              0x8832
+#define GL_DRAW_BUFFER14_ARB              0x8833
+#define GL_DRAW_BUFFER15_ARB              0x8834
+#endif
+
+#ifndef GL_ARB_texture_rectangle
+#define GL_TEXTURE_RECTANGLE_ARB          0x84F5
+#define GL_TEXTURE_BINDING_RECTANGLE_ARB  0x84F6
+#define GL_PROXY_TEXTURE_RECTANGLE_ARB    0x84F7
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
+#endif
+
+#ifndef GL_ARB_color_buffer_float
+#define GL_RGBA_FLOAT_MODE_ARB            0x8820
+#define GL_CLAMP_VERTEX_COLOR_ARB         0x891A
+#define GL_CLAMP_FRAGMENT_COLOR_ARB       0x891B
+#define GL_CLAMP_READ_COLOR_ARB           0x891C
+#define GL_FIXED_ONLY_ARB                 0x891D
+#endif
+
+#ifndef GL_ARB_half_float_pixel
+#define GL_HALF_FLOAT_ARB                 0x140B
+#endif
+
+#ifndef GL_ARB_texture_float
+#define GL_TEXTURE_RED_TYPE_ARB           0x8C10
+#define GL_TEXTURE_GREEN_TYPE_ARB         0x8C11
+#define GL_TEXTURE_BLUE_TYPE_ARB          0x8C12
+#define GL_TEXTURE_ALPHA_TYPE_ARB         0x8C13
+#define GL_TEXTURE_LUMINANCE_TYPE_ARB     0x8C14
+#define GL_TEXTURE_INTENSITY_TYPE_ARB     0x8C15
+#define GL_TEXTURE_DEPTH_TYPE_ARB         0x8C16
+#define GL_UNSIGNED_NORMALIZED_ARB        0x8C17
+#define GL_RGBA32F_ARB                    0x8814
+#define GL_RGB32F_ARB                     0x8815
+#define GL_ALPHA32F_ARB                   0x8816
+#define GL_INTENSITY32F_ARB               0x8817
+#define GL_LUMINANCE32F_ARB               0x8818
+#define GL_LUMINANCE_ALPHA32F_ARB         0x8819
+#define GL_RGBA16F_ARB                    0x881A
+#define GL_RGB16F_ARB                     0x881B
+#define GL_ALPHA16F_ARB                   0x881C
+#define GL_INTENSITY16F_ARB               0x881D
+#define GL_LUMINANCE16F_ARB               0x881E
+#define GL_LUMINANCE_ALPHA16F_ARB         0x881F
+#endif
+
+#ifndef GL_ARB_pixel_buffer_object
+#define GL_PIXEL_PACK_BUFFER_ARB          0x88EB
+#define GL_PIXEL_UNPACK_BUFFER_ARB        0x88EC
+#define GL_PIXEL_PACK_BUFFER_BINDING_ARB  0x88ED
+#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
+#endif
+
+#ifndef GL_EXT_abgr
+#define GL_ABGR_EXT                       0x8000
+#endif
+
+#ifndef GL_EXT_blend_color
+#define GL_CONSTANT_COLOR_EXT             0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR_EXT   0x8002
+#define GL_CONSTANT_ALPHA_EXT             0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT   0x8004
+#define GL_BLEND_COLOR_EXT                0x8005
+#endif
+
+#ifndef GL_EXT_polygon_offset
+#define GL_POLYGON_OFFSET_EXT             0x8037
+#define GL_POLYGON_OFFSET_FACTOR_EXT      0x8038
+#define GL_POLYGON_OFFSET_BIAS_EXT        0x8039
+#endif
+
+#ifndef GL_EXT_texture
+#define GL_ALPHA4_EXT                     0x803B
+#define GL_ALPHA8_EXT                     0x803C
+#define GL_ALPHA12_EXT                    0x803D
+#define GL_ALPHA16_EXT                    0x803E
+#define GL_LUMINANCE4_EXT                 0x803F
+#define GL_LUMINANCE8_EXT                 0x8040
+#define GL_LUMINANCE12_EXT                0x8041
+#define GL_LUMINANCE16_EXT                0x8042
+#define GL_LUMINANCE4_ALPHA4_EXT          0x8043
+#define GL_LUMINANCE6_ALPHA2_EXT          0x8044
+#define GL_LUMINANCE8_ALPHA8_EXT          0x8045
+#define GL_LUMINANCE12_ALPHA4_EXT         0x8046
+#define GL_LUMINANCE12_ALPHA12_EXT        0x8047
+#define GL_LUMINANCE16_ALPHA16_EXT        0x8048
+#define GL_INTENSITY_EXT                  0x8049
+#define GL_INTENSITY4_EXT                 0x804A
+#define GL_INTENSITY8_EXT                 0x804B
+#define GL_INTENSITY12_EXT                0x804C
+#define GL_INTENSITY16_EXT                0x804D
+#define GL_RGB2_EXT                       0x804E
+#define GL_RGB4_EXT                       0x804F
+#define GL_RGB5_EXT                       0x8050
+#define GL_RGB8_EXT                       0x8051
+#define GL_RGB10_EXT                      0x8052
+#define GL_RGB12_EXT                      0x8053
+#define GL_RGB16_EXT                      0x8054
+#define GL_RGBA2_EXT                      0x8055
+#define GL_RGBA4_EXT                      0x8056
+#define GL_RGB5_A1_EXT                    0x8057
+#define GL_RGBA8_EXT                      0x8058
+#define GL_RGB10_A2_EXT                   0x8059
+#define GL_RGBA12_EXT                     0x805A
+#define GL_RGBA16_EXT                     0x805B
+#define GL_TEXTURE_RED_SIZE_EXT           0x805C
+#define GL_TEXTURE_GREEN_SIZE_EXT         0x805D
+#define GL_TEXTURE_BLUE_SIZE_EXT          0x805E
+#define GL_TEXTURE_ALPHA_SIZE_EXT         0x805F
+#define GL_TEXTURE_LUMINANCE_SIZE_EXT     0x8060
+#define GL_TEXTURE_INTENSITY_SIZE_EXT     0x8061
+#define GL_REPLACE_EXT                    0x8062
+#define GL_PROXY_TEXTURE_1D_EXT           0x8063
+#define GL_PROXY_TEXTURE_2D_EXT           0x8064
+#define GL_TEXTURE_TOO_LARGE_EXT          0x8065
+#endif
+
+#ifndef GL_EXT_texture3D
+#define GL_PACK_SKIP_IMAGES_EXT           0x806B
+#define GL_PACK_IMAGE_HEIGHT_EXT          0x806C
+#define GL_UNPACK_SKIP_IMAGES_EXT         0x806D
+#define GL_UNPACK_IMAGE_HEIGHT_EXT        0x806E
+#define GL_TEXTURE_3D_EXT                 0x806F
+#define GL_PROXY_TEXTURE_3D_EXT           0x8070
+#define GL_TEXTURE_DEPTH_EXT              0x8071
+#define GL_TEXTURE_WRAP_R_EXT             0x8072
+#define GL_MAX_3D_TEXTURE_SIZE_EXT        0x8073
+#endif
+
+#ifndef GL_SGIS_texture_filter4
+#define GL_FILTER4_SGIS                   0x8146
+#define GL_TEXTURE_FILTER4_SIZE_SGIS      0x8147
+#endif
+
+#ifndef GL_EXT_subtexture
+#endif
+
+#ifndef GL_EXT_copy_texture
+#endif
+
+#ifndef GL_EXT_histogram
+#define GL_HISTOGRAM_EXT                  0x8024
+#define GL_PROXY_HISTOGRAM_EXT            0x8025
+#define GL_HISTOGRAM_WIDTH_EXT            0x8026
+#define GL_HISTOGRAM_FORMAT_EXT           0x8027
+#define GL_HISTOGRAM_RED_SIZE_EXT         0x8028
+#define GL_HISTOGRAM_GREEN_SIZE_EXT       0x8029
+#define GL_HISTOGRAM_BLUE_SIZE_EXT        0x802A
+#define GL_HISTOGRAM_ALPHA_SIZE_EXT       0x802B
+#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT   0x802C
+#define GL_HISTOGRAM_SINK_EXT             0x802D
+#define GL_MINMAX_EXT                     0x802E
+#define GL_MINMAX_FORMAT_EXT              0x802F
+#define GL_MINMAX_SINK_EXT                0x8030
+#define GL_TABLE_TOO_LARGE_EXT            0x8031
+#endif
+
+#ifndef GL_EXT_convolution
+#define GL_CONVOLUTION_1D_EXT             0x8010
+#define GL_CONVOLUTION_2D_EXT             0x8011
+#define GL_SEPARABLE_2D_EXT               0x8012
+#define GL_CONVOLUTION_BORDER_MODE_EXT    0x8013
+#define GL_CONVOLUTION_FILTER_SCALE_EXT   0x8014
+#define GL_CONVOLUTION_FILTER_BIAS_EXT    0x8015
+#define GL_REDUCE_EXT                     0x8016
+#define GL_CONVOLUTION_FORMAT_EXT         0x8017
+#define GL_CONVOLUTION_WIDTH_EXT          0x8018
+#define GL_CONVOLUTION_HEIGHT_EXT         0x8019
+#define GL_MAX_CONVOLUTION_WIDTH_EXT      0x801A
+#define GL_MAX_CONVOLUTION_HEIGHT_EXT     0x801B
+#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
+#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
+#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
+#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
+#define GL_POST_CONVOLUTION_RED_BIAS_EXT  0x8020
+#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
+#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
+#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
+#endif
+
+#ifndef GL_SGI_color_matrix
+#define GL_COLOR_MATRIX_SGI               0x80B1
+#define GL_COLOR_MATRIX_STACK_DEPTH_SGI   0x80B2
+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
+#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
+#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
+#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
+#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
+#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
+#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
+#endif
+
+#ifndef GL_SGI_color_table
+#define GL_COLOR_TABLE_SGI                0x80D0
+#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
+#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
+#define GL_PROXY_COLOR_TABLE_SGI          0x80D3
+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
+#define GL_COLOR_TABLE_SCALE_SGI          0x80D6
+#define GL_COLOR_TABLE_BIAS_SGI           0x80D7
+#define GL_COLOR_TABLE_FORMAT_SGI         0x80D8
+#define GL_COLOR_TABLE_WIDTH_SGI          0x80D9
+#define GL_COLOR_TABLE_RED_SIZE_SGI       0x80DA
+#define GL_COLOR_TABLE_GREEN_SIZE_SGI     0x80DB
+#define GL_COLOR_TABLE_BLUE_SIZE_SGI      0x80DC
+#define GL_COLOR_TABLE_ALPHA_SIZE_SGI     0x80DD
+#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
+#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
+#endif
+
+#ifndef GL_SGIS_pixel_texture
+#define GL_PIXEL_TEXTURE_SGIS             0x8353
+#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
+#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
+#define GL_PIXEL_GROUP_COLOR_SGIS         0x8356
+#endif
+
+#ifndef GL_SGIX_pixel_texture
+#define GL_PIXEL_TEX_GEN_SGIX             0x8139
+#define GL_PIXEL_TEX_GEN_MODE_SGIX        0x832B
+#endif
+
+#ifndef GL_SGIS_texture4D
+#define GL_PACK_SKIP_VOLUMES_SGIS         0x8130
+#define GL_PACK_IMAGE_DEPTH_SGIS          0x8131
+#define GL_UNPACK_SKIP_VOLUMES_SGIS       0x8132
+#define GL_UNPACK_IMAGE_DEPTH_SGIS        0x8133
+#define GL_TEXTURE_4D_SGIS                0x8134
+#define GL_PROXY_TEXTURE_4D_SGIS          0x8135
+#define GL_TEXTURE_4DSIZE_SGIS            0x8136
+#define GL_TEXTURE_WRAP_Q_SGIS            0x8137
+#define GL_MAX_4D_TEXTURE_SIZE_SGIS       0x8138
+#define GL_TEXTURE_4D_BINDING_SGIS        0x814F
+#endif
+
+#ifndef GL_SGI_texture_color_table
+#define GL_TEXTURE_COLOR_TABLE_SGI        0x80BC
+#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI  0x80BD
+#endif
+
+#ifndef GL_EXT_cmyka
+#define GL_CMYK_EXT                       0x800C
+#define GL_CMYKA_EXT                      0x800D
+#define GL_PACK_CMYK_HINT_EXT             0x800E
+#define GL_UNPACK_CMYK_HINT_EXT           0x800F
+#endif
+
+#ifndef GL_EXT_texture_object
+#define GL_TEXTURE_PRIORITY_EXT           0x8066
+#define GL_TEXTURE_RESIDENT_EXT           0x8067
+#define GL_TEXTURE_1D_BINDING_EXT         0x8068
+#define GL_TEXTURE_2D_BINDING_EXT         0x8069
+#define GL_TEXTURE_3D_BINDING_EXT         0x806A
+#endif
+
+#ifndef GL_SGIS_detail_texture
+#define GL_DETAIL_TEXTURE_2D_SGIS         0x8095
+#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
+#define GL_LINEAR_DETAIL_SGIS             0x8097
+#define GL_LINEAR_DETAIL_ALPHA_SGIS       0x8098
+#define GL_LINEAR_DETAIL_COLOR_SGIS       0x8099
+#define GL_DETAIL_TEXTURE_LEVEL_SGIS      0x809A
+#define GL_DETAIL_TEXTURE_MODE_SGIS       0x809B
+#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
+#endif
+
+#ifndef GL_SGIS_sharpen_texture
+#define GL_LINEAR_SHARPEN_SGIS            0x80AD
+#define GL_LINEAR_SHARPEN_ALPHA_SGIS      0x80AE
+#define GL_LINEAR_SHARPEN_COLOR_SGIS      0x80AF
+#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
+#endif
+
+#ifndef GL_EXT_packed_pixels
+#define GL_UNSIGNED_BYTE_3_3_2_EXT        0x8032
+#define GL_UNSIGNED_SHORT_4_4_4_4_EXT     0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1_EXT     0x8034
+#define GL_UNSIGNED_INT_8_8_8_8_EXT       0x8035
+#define GL_UNSIGNED_INT_10_10_10_2_EXT    0x8036
+#endif
+
+#ifndef GL_SGIS_texture_lod
+#define GL_TEXTURE_MIN_LOD_SGIS           0x813A
+#define GL_TEXTURE_MAX_LOD_SGIS           0x813B
+#define GL_TEXTURE_BASE_LEVEL_SGIS        0x813C
+#define GL_TEXTURE_MAX_LEVEL_SGIS         0x813D
+#endif
+
+#ifndef GL_SGIS_multisample
+#define GL_MULTISAMPLE_SGIS               0x809D
+#define GL_SAMPLE_ALPHA_TO_MASK_SGIS      0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE_SGIS       0x809F
+#define GL_SAMPLE_MASK_SGIS               0x80A0
+#define GL_1PASS_SGIS                     0x80A1
+#define GL_2PASS_0_SGIS                   0x80A2
+#define GL_2PASS_1_SGIS                   0x80A3
+#define GL_4PASS_0_SGIS                   0x80A4
+#define GL_4PASS_1_SGIS                   0x80A5
+#define GL_4PASS_2_SGIS                   0x80A6
+#define GL_4PASS_3_SGIS                   0x80A7
+#define GL_SAMPLE_BUFFERS_SGIS            0x80A8
+#define GL_SAMPLES_SGIS                   0x80A9
+#define GL_SAMPLE_MASK_VALUE_SGIS         0x80AA
+#define GL_SAMPLE_MASK_INVERT_SGIS        0x80AB
+#define GL_SAMPLE_PATTERN_SGIS            0x80AC
+#endif
+
+#ifndef GL_EXT_rescale_normal
+#define GL_RESCALE_NORMAL_EXT             0x803A
+#endif
+
+#ifndef GL_EXT_vertex_array
+#define GL_VERTEX_ARRAY_EXT               0x8074
+#define GL_NORMAL_ARRAY_EXT               0x8075
+#define GL_COLOR_ARRAY_EXT                0x8076
+#define GL_INDEX_ARRAY_EXT                0x8077
+#define GL_TEXTURE_COORD_ARRAY_EXT        0x8078
+#define GL_EDGE_FLAG_ARRAY_EXT            0x8079
+#define GL_VERTEX_ARRAY_SIZE_EXT          0x807A
+#define GL_VERTEX_ARRAY_TYPE_EXT          0x807B
+#define GL_VERTEX_ARRAY_STRIDE_EXT        0x807C
+#define GL_VERTEX_ARRAY_COUNT_EXT         0x807D
+#define GL_NORMAL_ARRAY_TYPE_EXT          0x807E
+#define GL_NORMAL_ARRAY_STRIDE_EXT        0x807F
+#define GL_NORMAL_ARRAY_COUNT_EXT         0x8080
+#define GL_COLOR_ARRAY_SIZE_EXT           0x8081
+#define GL_COLOR_ARRAY_TYPE_EXT           0x8082
+#define GL_COLOR_ARRAY_STRIDE_EXT         0x8083
+#define GL_COLOR_ARRAY_COUNT_EXT          0x8084
+#define GL_INDEX_ARRAY_TYPE_EXT           0x8085
+#define GL_INDEX_ARRAY_STRIDE_EXT         0x8086
+#define GL_INDEX_ARRAY_COUNT_EXT          0x8087
+#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT   0x8088
+#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT   0x8089
+#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
+#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT  0x808B
+#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT     0x808C
+#define GL_EDGE_FLAG_ARRAY_COUNT_EXT      0x808D
+#define GL_VERTEX_ARRAY_POINTER_EXT       0x808E
+#define GL_NORMAL_ARRAY_POINTER_EXT       0x808F
+#define GL_COLOR_ARRAY_POINTER_EXT        0x8090
+#define GL_INDEX_ARRAY_POINTER_EXT        0x8091
+#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
+#define GL_EDGE_FLAG_ARRAY_POINTER_EXT    0x8093
+#endif
+
+#ifndef GL_EXT_misc_attribute
+#endif
+
+#ifndef GL_SGIS_generate_mipmap
+#define GL_GENERATE_MIPMAP_SGIS           0x8191
+#define GL_GENERATE_MIPMAP_HINT_SGIS      0x8192
+#endif
+
+#ifndef GL_SGIX_clipmap
+#define GL_LINEAR_CLIPMAP_LINEAR_SGIX     0x8170
+#define GL_TEXTURE_CLIPMAP_CENTER_SGIX    0x8171
+#define GL_TEXTURE_CLIPMAP_FRAME_SGIX     0x8172
+#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX    0x8173
+#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
+#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
+#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX     0x8176
+#define GL_MAX_CLIPMAP_DEPTH_SGIX         0x8177
+#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
+#define GL_NEAREST_CLIPMAP_NEAREST_SGIX   0x844D
+#define GL_NEAREST_CLIPMAP_LINEAR_SGIX    0x844E
+#define GL_LINEAR_CLIPMAP_NEAREST_SGIX    0x844F
+#endif
+
+#ifndef GL_SGIX_shadow
+#define GL_TEXTURE_COMPARE_SGIX           0x819A
+#define GL_TEXTURE_COMPARE_OPERATOR_SGIX  0x819B
+#define GL_TEXTURE_LEQUAL_R_SGIX          0x819C
+#define GL_TEXTURE_GEQUAL_R_SGIX          0x819D
+#endif
+
+#ifndef GL_SGIS_texture_edge_clamp
+#define GL_CLAMP_TO_EDGE_SGIS             0x812F
+#endif
+
+#ifndef GL_SGIS_texture_border_clamp
+#define GL_CLAMP_TO_BORDER_SGIS           0x812D
+#endif
+
+#ifndef GL_EXT_blend_minmax
+#define GL_FUNC_ADD_EXT                   0x8006
+#define GL_MIN_EXT                        0x8007
+#define GL_MAX_EXT                        0x8008
+#define GL_BLEND_EQUATION_EXT             0x8009
+#endif
+
+#ifndef GL_EXT_blend_subtract
+#define GL_FUNC_SUBTRACT_EXT              0x800A
+#define GL_FUNC_REVERSE_SUBTRACT_EXT      0x800B
+#endif
+
+#ifndef GL_EXT_blend_logic_op
+#endif
+
+#ifndef GL_SGIX_interlace
+#define GL_INTERLACE_SGIX                 0x8094
+#endif
+
+#ifndef GL_SGIX_pixel_tiles
+#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
+#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
+#define GL_PIXEL_TILE_WIDTH_SGIX          0x8140
+#define GL_PIXEL_TILE_HEIGHT_SGIX         0x8141
+#define GL_PIXEL_TILE_GRID_WIDTH_SGIX     0x8142
+#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX    0x8143
+#define GL_PIXEL_TILE_GRID_DEPTH_SGIX     0x8144
+#define GL_PIXEL_TILE_CACHE_SIZE_SGIX     0x8145
+#endif
+
+#ifndef GL_SGIS_texture_select
+#define GL_DUAL_ALPHA4_SGIS               0x8110
+#define GL_DUAL_ALPHA8_SGIS               0x8111
+#define GL_DUAL_ALPHA12_SGIS              0x8112
+#define GL_DUAL_ALPHA16_SGIS              0x8113
+#define GL_DUAL_LUMINANCE4_SGIS           0x8114
+#define GL_DUAL_LUMINANCE8_SGIS           0x8115
+#define GL_DUAL_LUMINANCE12_SGIS          0x8116
+#define GL_DUAL_LUMINANCE16_SGIS          0x8117
+#define GL_DUAL_INTENSITY4_SGIS           0x8118
+#define GL_DUAL_INTENSITY8_SGIS           0x8119
+#define GL_DUAL_INTENSITY12_SGIS          0x811A
+#define GL_DUAL_INTENSITY16_SGIS          0x811B
+#define GL_DUAL_LUMINANCE_ALPHA4_SGIS     0x811C
+#define GL_DUAL_LUMINANCE_ALPHA8_SGIS     0x811D
+#define GL_QUAD_ALPHA4_SGIS               0x811E
+#define GL_QUAD_ALPHA8_SGIS               0x811F
+#define GL_QUAD_LUMINANCE4_SGIS           0x8120
+#define GL_QUAD_LUMINANCE8_SGIS           0x8121
+#define GL_QUAD_INTENSITY4_SGIS           0x8122
+#define GL_QUAD_INTENSITY8_SGIS           0x8123
+#define GL_DUAL_TEXTURE_SELECT_SGIS       0x8124
+#define GL_QUAD_TEXTURE_SELECT_SGIS       0x8125
+#endif
+
+#ifndef GL_SGIX_sprite
+#define GL_SPRITE_SGIX                    0x8148
+#define GL_SPRITE_MODE_SGIX               0x8149
+#define GL_SPRITE_AXIS_SGIX               0x814A
+#define GL_SPRITE_TRANSLATION_SGIX        0x814B
+#define GL_SPRITE_AXIAL_SGIX              0x814C
+#define GL_SPRITE_OBJECT_ALIGNED_SGIX     0x814D
+#define GL_SPRITE_EYE_ALIGNED_SGIX        0x814E
+#endif
+
+#ifndef GL_SGIX_texture_multi_buffer
+#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
+#endif
+
+#ifndef GL_EXT_point_parameters
+#define GL_POINT_SIZE_MIN_EXT             0x8126
+#define GL_POINT_SIZE_MAX_EXT             0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE_EXT  0x8128
+#define GL_DISTANCE_ATTENUATION_EXT       0x8129
+#endif
+
+#ifndef GL_SGIS_point_parameters
+#define GL_POINT_SIZE_MIN_SGIS            0x8126
+#define GL_POINT_SIZE_MAX_SGIS            0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
+#define GL_DISTANCE_ATTENUATION_SGIS      0x8129
+#endif
+
+#ifndef GL_SGIX_instruments
+#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
+#define GL_INSTRUMENT_MEASUREMENTS_SGIX   0x8181
+#endif
+
+#ifndef GL_SGIX_texture_scale_bias
+#define GL_POST_TEXTURE_FILTER_BIAS_SGIX  0x8179
+#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
+#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
+#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
+#endif
+
+#ifndef GL_SGIX_framezoom
+#define GL_FRAMEZOOM_SGIX                 0x818B
+#define GL_FRAMEZOOM_FACTOR_SGIX          0x818C
+#define GL_MAX_FRAMEZOOM_FACTOR_SGIX      0x818D
+#endif
+
+#ifndef GL_SGIX_tag_sample_buffer
+#endif
+
+#ifndef GL_FfdMaskSGIX
+#define GL_TEXTURE_DEFORMATION_BIT_SGIX   0x00000001
+#define GL_GEOMETRY_DEFORMATION_BIT_SGIX  0x00000002
+#endif
+
+#ifndef GL_SGIX_polynomial_ffd
+#define GL_GEOMETRY_DEFORMATION_SGIX      0x8194
+#define GL_TEXTURE_DEFORMATION_SGIX       0x8195
+#define GL_DEFORMATIONS_MASK_SGIX         0x8196
+#define GL_MAX_DEFORMATION_ORDER_SGIX     0x8197
+#endif
+
+#ifndef GL_SGIX_reference_plane
+#define GL_REFERENCE_PLANE_SGIX           0x817D
+#define GL_REFERENCE_PLANE_EQUATION_SGIX  0x817E
+#endif
+
+#ifndef GL_SGIX_flush_raster
+#endif
+
+#ifndef GL_SGIX_depth_texture
+#define GL_DEPTH_COMPONENT16_SGIX         0x81A5
+#define GL_DEPTH_COMPONENT24_SGIX         0x81A6
+#define GL_DEPTH_COMPONENT32_SGIX         0x81A7
+#endif
+
+#ifndef GL_SGIS_fog_function
+#define GL_FOG_FUNC_SGIS                  0x812A
+#define GL_FOG_FUNC_POINTS_SGIS           0x812B
+#define GL_MAX_FOG_FUNC_POINTS_SGIS       0x812C
+#endif
+
+#ifndef GL_SGIX_fog_offset
+#define GL_FOG_OFFSET_SGIX                0x8198
+#define GL_FOG_OFFSET_VALUE_SGIX          0x8199
+#endif
+
+#ifndef GL_HP_image_transform
+#define GL_IMAGE_SCALE_X_HP               0x8155
+#define GL_IMAGE_SCALE_Y_HP               0x8156
+#define GL_IMAGE_TRANSLATE_X_HP           0x8157
+#define GL_IMAGE_TRANSLATE_Y_HP           0x8158
+#define GL_IMAGE_ROTATE_ANGLE_HP          0x8159
+#define GL_IMAGE_ROTATE_ORIGIN_X_HP       0x815A
+#define GL_IMAGE_ROTATE_ORIGIN_Y_HP       0x815B
+#define GL_IMAGE_MAG_FILTER_HP            0x815C
+#define GL_IMAGE_MIN_FILTER_HP            0x815D
+#define GL_IMAGE_CUBIC_WEIGHT_HP          0x815E
+#define GL_CUBIC_HP                       0x815F
+#define GL_AVERAGE_HP                     0x8160
+#define GL_IMAGE_TRANSFORM_2D_HP          0x8161
+#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
+#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
+#endif
+
+#ifndef GL_HP_convolution_border_modes
+#define GL_IGNORE_BORDER_HP               0x8150
+#define GL_CONSTANT_BORDER_HP             0x8151
+#define GL_REPLICATE_BORDER_HP            0x8153
+#define GL_CONVOLUTION_BORDER_COLOR_HP    0x8154
+#endif
+
+#ifndef GL_INGR_palette_buffer
+#endif
+
+#ifndef GL_SGIX_texture_add_env
+#define GL_TEXTURE_ENV_BIAS_SGIX          0x80BE
+#endif
+
+#ifndef GL_EXT_color_subtable
+#endif
+
+#ifndef GL_PGI_vertex_hints
+#define GL_VERTEX_DATA_HINT_PGI           0x1A22A
+#define GL_VERTEX_CONSISTENT_HINT_PGI     0x1A22B
+#define GL_MATERIAL_SIDE_HINT_PGI         0x1A22C
+#define GL_MAX_VERTEX_HINT_PGI            0x1A22D
+#define GL_COLOR3_BIT_PGI                 0x00010000
+#define GL_COLOR4_BIT_PGI                 0x00020000
+#define GL_EDGEFLAG_BIT_PGI               0x00040000
+#define GL_INDEX_BIT_PGI                  0x00080000
+#define GL_MAT_AMBIENT_BIT_PGI            0x00100000
+#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
+#define GL_MAT_DIFFUSE_BIT_PGI            0x00400000
+#define GL_MAT_EMISSION_BIT_PGI           0x00800000
+#define GL_MAT_COLOR_INDEXES_BIT_PGI      0x01000000
+#define GL_MAT_SHININESS_BIT_PGI          0x02000000
+#define GL_MAT_SPECULAR_BIT_PGI           0x04000000
+#define GL_NORMAL_BIT_PGI                 0x08000000
+#define GL_TEXCOORD1_BIT_PGI              0x10000000
+#define GL_TEXCOORD2_BIT_PGI              0x20000000
+#define GL_TEXCOORD3_BIT_PGI              0x40000000
+#define GL_TEXCOORD4_BIT_PGI              0x80000000
+#define GL_VERTEX23_BIT_PGI               0x00000004
+#define GL_VERTEX4_BIT_PGI                0x00000008
+#endif
+
+#ifndef GL_PGI_misc_hints
+#define GL_PREFER_DOUBLEBUFFER_HINT_PGI   0x1A1F8
+#define GL_CONSERVE_MEMORY_HINT_PGI       0x1A1FD
+#define GL_RECLAIM_MEMORY_HINT_PGI        0x1A1FE
+#define GL_NATIVE_GRAPHICS_HANDLE_PGI     0x1A202
+#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
+#define GL_NATIVE_GRAPHICS_END_HINT_PGI   0x1A204
+#define GL_ALWAYS_FAST_HINT_PGI           0x1A20C
+#define GL_ALWAYS_SOFT_HINT_PGI           0x1A20D
+#define GL_ALLOW_DRAW_OBJ_HINT_PGI        0x1A20E
+#define GL_ALLOW_DRAW_WIN_HINT_PGI        0x1A20F
+#define GL_ALLOW_DRAW_FRG_HINT_PGI        0x1A210
+#define GL_ALLOW_DRAW_MEM_HINT_PGI        0x1A211
+#define GL_STRICT_DEPTHFUNC_HINT_PGI      0x1A216
+#define GL_STRICT_LIGHTING_HINT_PGI       0x1A217
+#define GL_STRICT_SCISSOR_HINT_PGI        0x1A218
+#define GL_FULL_STIPPLE_HINT_PGI          0x1A219
+#define GL_CLIP_NEAR_HINT_PGI             0x1A220
+#define GL_CLIP_FAR_HINT_PGI              0x1A221
+#define GL_WIDE_LINE_HINT_PGI             0x1A222
+#define GL_BACK_NORMALS_HINT_PGI          0x1A223
+#endif
+
+#ifndef GL_EXT_paletted_texture
+#define GL_COLOR_INDEX1_EXT               0x80E2
+#define GL_COLOR_INDEX2_EXT               0x80E3
+#define GL_COLOR_INDEX4_EXT               0x80E4
+#define GL_COLOR_INDEX8_EXT               0x80E5
+#define GL_COLOR_INDEX12_EXT              0x80E6
+#define GL_COLOR_INDEX16_EXT              0x80E7
+#define GL_TEXTURE_INDEX_SIZE_EXT         0x80ED
+#endif
+
+#ifndef GL_EXT_clip_volume_hint
+#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT  0x80F0
+#endif
+
+#ifndef GL_SGIX_list_priority
+#define GL_LIST_PRIORITY_SGIX             0x8182
+#endif
+
+#ifndef GL_SGIX_ir_instrument1
+#define GL_IR_INSTRUMENT1_SGIX            0x817F
+#endif
+
+#ifndef GL_SGIX_calligraphic_fragment
+#define GL_CALLIGRAPHIC_FRAGMENT_SGIX     0x8183
+#endif
+
+#ifndef GL_SGIX_texture_lod_bias
+#define GL_TEXTURE_LOD_BIAS_S_SGIX        0x818E
+#define GL_TEXTURE_LOD_BIAS_T_SGIX        0x818F
+#define GL_TEXTURE_LOD_BIAS_R_SGIX        0x8190
+#endif
+
+#ifndef GL_SGIX_shadow_ambient
+#define GL_SHADOW_AMBIENT_SGIX            0x80BF
+#endif
+
+#ifndef GL_EXT_index_texture
+#endif
+
+#ifndef GL_EXT_index_material
+#define GL_INDEX_MATERIAL_EXT             0x81B8
+#define GL_INDEX_MATERIAL_PARAMETER_EXT   0x81B9
+#define GL_INDEX_MATERIAL_FACE_EXT        0x81BA
+#endif
+
+#ifndef GL_EXT_index_func
+#define GL_INDEX_TEST_EXT                 0x81B5
+#define GL_INDEX_TEST_FUNC_EXT            0x81B6
+#define GL_INDEX_TEST_REF_EXT             0x81B7
+#endif
+
+#ifndef GL_EXT_index_array_formats
+#define GL_IUI_V2F_EXT                    0x81AD
+#define GL_IUI_V3F_EXT                    0x81AE
+#define GL_IUI_N3F_V2F_EXT                0x81AF
+#define GL_IUI_N3F_V3F_EXT                0x81B0
+#define GL_T2F_IUI_V2F_EXT                0x81B1
+#define GL_T2F_IUI_V3F_EXT                0x81B2
+#define GL_T2F_IUI_N3F_V2F_EXT            0x81B3
+#define GL_T2F_IUI_N3F_V3F_EXT            0x81B4
+#endif
+
+#ifndef GL_EXT_compiled_vertex_array
+#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT   0x81A8
+#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT   0x81A9
+#endif
+
+#ifndef GL_EXT_cull_vertex
+#define GL_CULL_VERTEX_EXT                0x81AA
+#define GL_CULL_VERTEX_EYE_POSITION_EXT   0x81AB
+#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
+#endif
+
+#ifndef GL_SGIX_ycrcb
+#define GL_YCRCB_422_SGIX                 0x81BB
+#define GL_YCRCB_444_SGIX                 0x81BC
+#endif
+
+#ifndef GL_SGIX_fragment_lighting
+#define GL_FRAGMENT_LIGHTING_SGIX         0x8400
+#define GL_FRAGMENT_COLOR_MATERIAL_SGIX   0x8401
+#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
+#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
+#define GL_MAX_FRAGMENT_LIGHTS_SGIX       0x8404
+#define GL_MAX_ACTIVE_LIGHTS_SGIX         0x8405
+#define GL_CURRENT_RASTER_NORMAL_SGIX     0x8406
+#define GL_LIGHT_ENV_MODE_SGIX            0x8407
+#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
+#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
+#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
+#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
+#define GL_FRAGMENT_LIGHT0_SGIX           0x840C
+#define GL_FRAGMENT_LIGHT1_SGIX           0x840D
+#define GL_FRAGMENT_LIGHT2_SGIX           0x840E
+#define GL_FRAGMENT_LIGHT3_SGIX           0x840F
+#define GL_FRAGMENT_LIGHT4_SGIX           0x8410
+#define GL_FRAGMENT_LIGHT5_SGIX           0x8411
+#define GL_FRAGMENT_LIGHT6_SGIX           0x8412
+#define GL_FRAGMENT_LIGHT7_SGIX           0x8413
+#endif
+
+#ifndef GL_IBM_rasterpos_clip
+#define GL_RASTER_POSITION_UNCLIPPED_IBM  0x19262
+#endif
+
+#ifndef GL_HP_texture_lighting
+#define GL_TEXTURE_LIGHTING_MODE_HP       0x8167
+#define GL_TEXTURE_POST_SPECULAR_HP       0x8168
+#define GL_TEXTURE_PRE_SPECULAR_HP        0x8169
+#endif
+
+#ifndef GL_EXT_draw_range_elements
+#define GL_MAX_ELEMENTS_VERTICES_EXT      0x80E8
+#define GL_MAX_ELEMENTS_INDICES_EXT       0x80E9
+#endif
+
+#ifndef GL_WIN_phong_shading
+#define GL_PHONG_WIN                      0x80EA
+#define GL_PHONG_HINT_WIN                 0x80EB
+#endif
+
+#ifndef GL_WIN_specular_fog
+#define GL_FOG_SPECULAR_TEXTURE_WIN       0x80EC
+#endif
+
+#ifndef GL_EXT_light_texture
+#define GL_FRAGMENT_MATERIAL_EXT          0x8349
+#define GL_FRAGMENT_NORMAL_EXT            0x834A
+#define GL_FRAGMENT_COLOR_EXT             0x834C
+#define GL_ATTENUATION_EXT                0x834D
+#define GL_SHADOW_ATTENUATION_EXT         0x834E
+#define GL_TEXTURE_APPLICATION_MODE_EXT   0x834F
+#define GL_TEXTURE_LIGHT_EXT              0x8350
+#define GL_TEXTURE_MATERIAL_FACE_EXT      0x8351
+#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
+/* reuse GL_FRAGMENT_DEPTH_EXT */
+#endif
+
+#ifndef GL_SGIX_blend_alpha_minmax
+#define GL_ALPHA_MIN_SGIX                 0x8320
+#define GL_ALPHA_MAX_SGIX                 0x8321
+#endif
+
+#ifndef GL_SGIX_impact_pixel_texture
+#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX   0x8184
+#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX     0x8185
+#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX     0x8186
+#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187
+#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188
+#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX    0x8189
+#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX    0x818A
+#endif
+
+#ifndef GL_EXT_bgra
+#define GL_BGR_EXT                        0x80E0
+#define GL_BGRA_EXT                       0x80E1
+#endif
+
+#ifndef GL_SGIX_async
+#define GL_ASYNC_MARKER_SGIX              0x8329
+#endif
+
+#ifndef GL_SGIX_async_pixel
+#define GL_ASYNC_TEX_IMAGE_SGIX           0x835C
+#define GL_ASYNC_DRAW_PIXELS_SGIX         0x835D
+#define GL_ASYNC_READ_PIXELS_SGIX         0x835E
+#define GL_MAX_ASYNC_TEX_IMAGE_SGIX       0x835F
+#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX     0x8360
+#define GL_MAX_ASYNC_READ_PIXELS_SGIX     0x8361
+#endif
+
+#ifndef GL_SGIX_async_histogram
+#define GL_ASYNC_HISTOGRAM_SGIX           0x832C
+#define GL_MAX_ASYNC_HISTOGRAM_SGIX       0x832D
+#endif
+
+#ifndef GL_INTEL_texture_scissor
+#endif
+
+#ifndef GL_INTEL_parallel_arrays
+#define GL_PARALLEL_ARRAYS_INTEL          0x83F4
+#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
+#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
+#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
+#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
+#endif
+
+#ifndef GL_HP_occlusion_test
+#define GL_OCCLUSION_TEST_HP              0x8165
+#define GL_OCCLUSION_TEST_RESULT_HP       0x8166
+#endif
+
+#ifndef GL_EXT_pixel_transform
+#define GL_PIXEL_TRANSFORM_2D_EXT         0x8330
+#define GL_PIXEL_MAG_FILTER_EXT           0x8331
+#define GL_PIXEL_MIN_FILTER_EXT           0x8332
+#define GL_PIXEL_CUBIC_WEIGHT_EXT         0x8333
+#define GL_CUBIC_EXT                      0x8334
+#define GL_AVERAGE_EXT                    0x8335
+#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
+#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
+#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT  0x8338
+#endif
+
+#ifndef GL_EXT_pixel_transform_color_table
+#endif
+
+#ifndef GL_EXT_shared_texture_palette
+#define GL_SHARED_TEXTURE_PALETTE_EXT     0x81FB
+#endif
+
+#ifndef GL_EXT_separate_specular_color
+#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT  0x81F8
+#define GL_SINGLE_COLOR_EXT               0x81F9
+#define GL_SEPARATE_SPECULAR_COLOR_EXT    0x81FA
+#endif
+
+#ifndef GL_EXT_secondary_color
+#define GL_COLOR_SUM_EXT                  0x8458
+#define GL_CURRENT_SECONDARY_COLOR_EXT    0x8459
+#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
+#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
+#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
+#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
+#define GL_SECONDARY_COLOR_ARRAY_EXT      0x845E
+#endif
+
+#ifndef GL_EXT_texture_perturb_normal
+#define GL_PERTURB_EXT                    0x85AE
+#define GL_TEXTURE_NORMAL_EXT             0x85AF
+#endif
+
+#ifndef GL_EXT_multi_draw_arrays
+#endif
+
+#ifndef GL_EXT_fog_coord
+#define GL_FOG_COORDINATE_SOURCE_EXT      0x8450
+#define GL_FOG_COORDINATE_EXT             0x8451
+#define GL_FRAGMENT_DEPTH_EXT             0x8452
+#define GL_CURRENT_FOG_COORDINATE_EXT     0x8453
+#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT  0x8454
+#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
+#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
+#define GL_FOG_COORDINATE_ARRAY_EXT       0x8457
+#endif
+
+#ifndef GL_REND_screen_coordinates
+#define GL_SCREEN_COORDINATES_REND        0x8490
+#define GL_INVERTED_SCREEN_W_REND         0x8491
+#endif
+
+#ifndef GL_EXT_coordinate_frame
+#define GL_TANGENT_ARRAY_EXT              0x8439
+#define GL_BINORMAL_ARRAY_EXT             0x843A
+#define GL_CURRENT_TANGENT_EXT            0x843B
+#define GL_CURRENT_BINORMAL_EXT           0x843C
+#define GL_TANGENT_ARRAY_TYPE_EXT         0x843E
+#define GL_TANGENT_ARRAY_STRIDE_EXT       0x843F
+#define GL_BINORMAL_ARRAY_TYPE_EXT        0x8440
+#define GL_BINORMAL_ARRAY_STRIDE_EXT      0x8441
+#define GL_TANGENT_ARRAY_POINTER_EXT      0x8442
+#define GL_BINORMAL_ARRAY_POINTER_EXT     0x8443
+#define GL_MAP1_TANGENT_EXT               0x8444
+#define GL_MAP2_TANGENT_EXT               0x8445
+#define GL_MAP1_BINORMAL_EXT              0x8446
+#define GL_MAP2_BINORMAL_EXT              0x8447
+#endif
+
+#ifndef GL_EXT_texture_env_combine
+#define GL_COMBINE_EXT                    0x8570
+#define GL_COMBINE_RGB_EXT                0x8571
+#define GL_COMBINE_ALPHA_EXT              0x8572
+#define GL_RGB_SCALE_EXT                  0x8573
+#define GL_ADD_SIGNED_EXT                 0x8574
+#define GL_INTERPOLATE_EXT                0x8575
+#define GL_CONSTANT_EXT                   0x8576
+#define GL_PRIMARY_COLOR_EXT              0x8577
+#define GL_PREVIOUS_EXT                   0x8578
+#define GL_SOURCE0_RGB_EXT                0x8580
+#define GL_SOURCE1_RGB_EXT                0x8581
+#define GL_SOURCE2_RGB_EXT                0x8582
+#define GL_SOURCE0_ALPHA_EXT              0x8588
+#define GL_SOURCE1_ALPHA_EXT              0x8589
+#define GL_SOURCE2_ALPHA_EXT              0x858A
+#define GL_OPERAND0_RGB_EXT               0x8590
+#define GL_OPERAND1_RGB_EXT               0x8591
+#define GL_OPERAND2_RGB_EXT               0x8592
+#define GL_OPERAND0_ALPHA_EXT             0x8598
+#define GL_OPERAND1_ALPHA_EXT             0x8599
+#define GL_OPERAND2_ALPHA_EXT             0x859A
+#endif
+
+#ifndef GL_APPLE_specular_vector
+#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
+#endif
+
+#ifndef GL_APPLE_transform_hint
+#define GL_TRANSFORM_HINT_APPLE           0x85B1
+#endif
+
+#ifndef GL_SGIX_fog_scale
+#define GL_FOG_SCALE_SGIX                 0x81FC
+#define GL_FOG_SCALE_VALUE_SGIX           0x81FD
+#endif
+
+#ifndef GL_SUNX_constant_data
+#define GL_UNPACK_CONSTANT_DATA_SUNX      0x81D5
+#define GL_TEXTURE_CONSTANT_DATA_SUNX     0x81D6
+#endif
+
+#ifndef GL_SUN_global_alpha
+#define GL_GLOBAL_ALPHA_SUN               0x81D9
+#define GL_GLOBAL_ALPHA_FACTOR_SUN        0x81DA
+#endif
+
+#ifndef GL_SUN_triangle_list
+#define GL_RESTART_SUN                    0x0001
+#define GL_REPLACE_MIDDLE_SUN             0x0002
+#define GL_REPLACE_OLDEST_SUN             0x0003
+#define GL_TRIANGLE_LIST_SUN              0x81D7
+#define GL_REPLACEMENT_CODE_SUN           0x81D8
+#define GL_REPLACEMENT_CODE_ARRAY_SUN     0x85C0
+#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
+#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
+#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
+#define GL_R1UI_V3F_SUN                   0x85C4
+#define GL_R1UI_C4UB_V3F_SUN              0x85C5
+#define GL_R1UI_C3F_V3F_SUN               0x85C6
+#define GL_R1UI_N3F_V3F_SUN               0x85C7
+#define GL_R1UI_C4F_N3F_V3F_SUN           0x85C8
+#define GL_R1UI_T2F_V3F_SUN               0x85C9
+#define GL_R1UI_T2F_N3F_V3F_SUN           0x85CA
+#define GL_R1UI_T2F_C4F_N3F_V3F_SUN       0x85CB
+#endif
+
+#ifndef GL_SUN_vertex
+#endif
+
+#ifndef GL_EXT_blend_func_separate
+#define GL_BLEND_DST_RGB_EXT              0x80C8
+#define GL_BLEND_SRC_RGB_EXT              0x80C9
+#define GL_BLEND_DST_ALPHA_EXT            0x80CA
+#define GL_BLEND_SRC_ALPHA_EXT            0x80CB
+#endif
+
+#ifndef GL_INGR_color_clamp
+#define GL_RED_MIN_CLAMP_INGR             0x8560
+#define GL_GREEN_MIN_CLAMP_INGR           0x8561
+#define GL_BLUE_MIN_CLAMP_INGR            0x8562
+#define GL_ALPHA_MIN_CLAMP_INGR           0x8563
+#define GL_RED_MAX_CLAMP_INGR             0x8564
+#define GL_GREEN_MAX_CLAMP_INGR           0x8565
+#define GL_BLUE_MAX_CLAMP_INGR            0x8566
+#define GL_ALPHA_MAX_CLAMP_INGR           0x8567
+#endif
+
+#ifndef GL_INGR_interlace_read
+#define GL_INTERLACE_READ_INGR            0x8568
+#endif
+
+#ifndef GL_EXT_stencil_wrap
+#define GL_INCR_WRAP_EXT                  0x8507
+#define GL_DECR_WRAP_EXT                  0x8508
+#endif
+
+#ifndef GL_EXT_422_pixels
+#define GL_422_EXT                        0x80CC
+#define GL_422_REV_EXT                    0x80CD
+#define GL_422_AVERAGE_EXT                0x80CE
+#define GL_422_REV_AVERAGE_EXT            0x80CF
+#endif
+
+#ifndef GL_NV_texgen_reflection
+#define GL_NORMAL_MAP_NV                  0x8511
+#define GL_REFLECTION_MAP_NV              0x8512
+#endif
+
+#ifndef GL_EXT_texture_cube_map
+#define GL_NORMAL_MAP_EXT                 0x8511
+#define GL_REFLECTION_MAP_EXT             0x8512
+#define GL_TEXTURE_CUBE_MAP_EXT           0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP_EXT   0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP_EXT     0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT  0x851C
+#endif
+
+#ifndef GL_SUN_convolution_border_modes
+#define GL_WRAP_BORDER_SUN                0x81D4
+#endif
+
+#ifndef GL_EXT_texture_env_add
+#endif
+
+#ifndef GL_EXT_texture_lod_bias
+#define GL_MAX_TEXTURE_LOD_BIAS_EXT       0x84FD
+#define GL_TEXTURE_FILTER_CONTROL_EXT     0x8500
+#define GL_TEXTURE_LOD_BIAS_EXT           0x8501
+#endif
+
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_TEXTURE_MAX_ANISOTROPY_EXT     0x84FE
+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
+#endif
+
+#ifndef GL_EXT_vertex_weighting
+#define GL_MODELVIEW0_STACK_DEPTH_EXT     GL_MODELVIEW_STACK_DEPTH
+#define GL_MODELVIEW1_STACK_DEPTH_EXT     0x8502
+#define GL_MODELVIEW0_MATRIX_EXT          GL_MODELVIEW_MATRIX
+#define GL_MODELVIEW1_MATRIX_EXT          0x8506
+#define GL_VERTEX_WEIGHTING_EXT           0x8509
+#define GL_MODELVIEW0_EXT                 GL_MODELVIEW
+#define GL_MODELVIEW1_EXT                 0x850A
+#define GL_CURRENT_VERTEX_WEIGHT_EXT      0x850B
+#define GL_VERTEX_WEIGHT_ARRAY_EXT        0x850C
+#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT   0x850D
+#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT   0x850E
+#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
+#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
+#endif
+
+#ifndef GL_NV_light_max_exponent
+#define GL_MAX_SHININESS_NV               0x8504
+#define GL_MAX_SPOT_EXPONENT_NV           0x8505
+#endif
+
+#ifndef GL_NV_vertex_array_range
+#define GL_VERTEX_ARRAY_RANGE_NV          0x851D
+#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV   0x851E
+#define GL_VERTEX_ARRAY_RANGE_VALID_NV    0x851F
+#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
+#define GL_VERTEX_ARRAY_RANGE_POINTER_NV  0x8521
+#endif
+
+#ifndef GL_NV_register_combiners
+#define GL_REGISTER_COMBINERS_NV          0x8522
+#define GL_VARIABLE_A_NV                  0x8523
+#define GL_VARIABLE_B_NV                  0x8524
+#define GL_VARIABLE_C_NV                  0x8525
+#define GL_VARIABLE_D_NV                  0x8526
+#define GL_VARIABLE_E_NV                  0x8527
+#define GL_VARIABLE_F_NV                  0x8528
+#define GL_VARIABLE_G_NV                  0x8529
+#define GL_CONSTANT_COLOR0_NV             0x852A
+#define GL_CONSTANT_COLOR1_NV             0x852B
+#define GL_PRIMARY_COLOR_NV               0x852C
+#define GL_SECONDARY_COLOR_NV             0x852D
+#define GL_SPARE0_NV                      0x852E
+#define GL_SPARE1_NV                      0x852F
+#define GL_DISCARD_NV                     0x8530
+#define GL_E_TIMES_F_NV                   0x8531
+#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
+#define GL_UNSIGNED_IDENTITY_NV           0x8536
+#define GL_UNSIGNED_INVERT_NV             0x8537
+#define GL_EXPAND_NORMAL_NV               0x8538
+#define GL_EXPAND_NEGATE_NV               0x8539
+#define GL_HALF_BIAS_NORMAL_NV            0x853A
+#define GL_HALF_BIAS_NEGATE_NV            0x853B
+#define GL_SIGNED_IDENTITY_NV             0x853C
+#define GL_SIGNED_NEGATE_NV               0x853D
+#define GL_SCALE_BY_TWO_NV                0x853E
+#define GL_SCALE_BY_FOUR_NV               0x853F
+#define GL_SCALE_BY_ONE_HALF_NV           0x8540
+#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV   0x8541
+#define GL_COMBINER_INPUT_NV              0x8542
+#define GL_COMBINER_MAPPING_NV            0x8543
+#define GL_COMBINER_COMPONENT_USAGE_NV    0x8544
+#define GL_COMBINER_AB_DOT_PRODUCT_NV     0x8545
+#define GL_COMBINER_CD_DOT_PRODUCT_NV     0x8546
+#define GL_COMBINER_MUX_SUM_NV            0x8547
+#define GL_COMBINER_SCALE_NV              0x8548
+#define GL_COMBINER_BIAS_NV               0x8549
+#define GL_COMBINER_AB_OUTPUT_NV          0x854A
+#define GL_COMBINER_CD_OUTPUT_NV          0x854B
+#define GL_COMBINER_SUM_OUTPUT_NV         0x854C
+#define GL_MAX_GENERAL_COMBINERS_NV       0x854D
+#define GL_NUM_GENERAL_COMBINERS_NV       0x854E
+#define GL_COLOR_SUM_CLAMP_NV             0x854F
+#define GL_COMBINER0_NV                   0x8550
+#define GL_COMBINER1_NV                   0x8551
+#define GL_COMBINER2_NV                   0x8552
+#define GL_COMBINER3_NV                   0x8553
+#define GL_COMBINER4_NV                   0x8554
+#define GL_COMBINER5_NV                   0x8555
+#define GL_COMBINER6_NV                   0x8556
+#define GL_COMBINER7_NV                   0x8557
+/* reuse GL_TEXTURE0_ARB */
+/* reuse GL_TEXTURE1_ARB */
+/* reuse GL_ZERO */
+/* reuse GL_NONE */
+/* reuse GL_FOG */
+#endif
+
+#ifndef GL_NV_fog_distance
+#define GL_FOG_DISTANCE_MODE_NV           0x855A
+#define GL_EYE_RADIAL_NV                  0x855B
+#define GL_EYE_PLANE_ABSOLUTE_NV          0x855C
+/* reuse GL_EYE_PLANE */
+#endif
+
+#ifndef GL_NV_texgen_emboss
+#define GL_EMBOSS_LIGHT_NV                0x855D
+#define GL_EMBOSS_CONSTANT_NV             0x855E
+#define GL_EMBOSS_MAP_NV                  0x855F
+#endif
+
+#ifndef GL_NV_blend_square
+#endif
+
+#ifndef GL_NV_texture_env_combine4
+#define GL_COMBINE4_NV                    0x8503
+#define GL_SOURCE3_RGB_NV                 0x8583
+#define GL_SOURCE3_ALPHA_NV               0x858B
+#define GL_OPERAND3_RGB_NV                0x8593
+#define GL_OPERAND3_ALPHA_NV              0x859B
+#endif
+
+#ifndef GL_MESA_resize_buffers
+#endif
+
+#ifndef GL_MESA_window_pos
+#endif
+
+#ifndef GL_EXT_texture_compression_s3tc
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT   0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT  0x83F1
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT  0x83F2
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT  0x83F3
+#endif
+
+#ifndef GL_IBM_cull_vertex
+#define GL_CULL_VERTEX_IBM                103050
+#endif
+
+#ifndef GL_IBM_multimode_draw_arrays
+#endif
+
+#ifndef GL_IBM_vertex_array_lists
+#define GL_VERTEX_ARRAY_LIST_IBM          103070
+#define GL_NORMAL_ARRAY_LIST_IBM          103071
+#define GL_COLOR_ARRAY_LIST_IBM           103072
+#define GL_INDEX_ARRAY_LIST_IBM           103073
+#define GL_TEXTURE_COORD_ARRAY_LIST_IBM   103074
+#define GL_EDGE_FLAG_ARRAY_LIST_IBM       103075
+#define GL_FOG_COORDINATE_ARRAY_LIST_IBM  103076
+#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
+#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM   103080
+#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM   103081
+#define GL_COLOR_ARRAY_LIST_STRIDE_IBM    103082
+#define GL_INDEX_ARRAY_LIST_STRIDE_IBM    103083
+#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
+#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
+#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
+#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
+#endif
+
+#ifndef GL_SGIX_subsample
+#define GL_PACK_SUBSAMPLE_RATE_SGIX       0x85A0
+#define GL_UNPACK_SUBSAMPLE_RATE_SGIX     0x85A1
+#define GL_PIXEL_SUBSAMPLE_4444_SGIX      0x85A2
+#define GL_PIXEL_SUBSAMPLE_2424_SGIX      0x85A3
+#define GL_PIXEL_SUBSAMPLE_4242_SGIX      0x85A4
+#endif
+
+#ifndef GL_SGIX_ycrcb_subsample
+#endif
+
+#ifndef GL_SGIX_ycrcba
+#define GL_YCRCB_SGIX                     0x8318
+#define GL_YCRCBA_SGIX                    0x8319
+#endif
+
+#ifndef GL_SGI_depth_pass_instrument
+#define GL_DEPTH_PASS_INSTRUMENT_SGIX     0x8310
+#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311
+#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312
+#endif
+
+#ifndef GL_3DFX_texture_compression_FXT1
+#define GL_COMPRESSED_RGB_FXT1_3DFX       0x86B0
+#define GL_COMPRESSED_RGBA_FXT1_3DFX      0x86B1
+#endif
+
+#ifndef GL_3DFX_multisample
+#define GL_MULTISAMPLE_3DFX               0x86B2
+#define GL_SAMPLE_BUFFERS_3DFX            0x86B3
+#define GL_SAMPLES_3DFX                   0x86B4
+#define GL_MULTISAMPLE_BIT_3DFX           0x20000000
+#endif
+
+#ifndef GL_3DFX_tbuffer
+#endif
+
+#ifndef GL_EXT_multisample
+#define GL_MULTISAMPLE_EXT                0x809D
+#define GL_SAMPLE_ALPHA_TO_MASK_EXT       0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE_EXT        0x809F
+#define GL_SAMPLE_MASK_EXT                0x80A0
+#define GL_1PASS_EXT                      0x80A1
+#define GL_2PASS_0_EXT                    0x80A2
+#define GL_2PASS_1_EXT                    0x80A3
+#define GL_4PASS_0_EXT                    0x80A4
+#define GL_4PASS_1_EXT                    0x80A5
+#define GL_4PASS_2_EXT                    0x80A6
+#define GL_4PASS_3_EXT                    0x80A7
+#define GL_SAMPLE_BUFFERS_EXT             0x80A8
+#define GL_SAMPLES_EXT                    0x80A9
+#define GL_SAMPLE_MASK_VALUE_EXT          0x80AA
+#define GL_SAMPLE_MASK_INVERT_EXT         0x80AB
+#define GL_SAMPLE_PATTERN_EXT             0x80AC
+#define GL_MULTISAMPLE_BIT_EXT            0x20000000
+#endif
+
+#ifndef GL_SGIX_vertex_preclip
+#define GL_VERTEX_PRECLIP_SGIX            0x83EE
+#define GL_VERTEX_PRECLIP_HINT_SGIX       0x83EF
+#endif
+
+#ifndef GL_SGIX_convolution_accuracy
+#define GL_CONVOLUTION_HINT_SGIX          0x8316
+#endif
+
+#ifndef GL_SGIX_resample
+#define GL_PACK_RESAMPLE_SGIX             0x842C
+#define GL_UNPACK_RESAMPLE_SGIX           0x842D
+#define GL_RESAMPLE_REPLICATE_SGIX        0x842E
+#define GL_RESAMPLE_ZERO_FILL_SGIX        0x842F
+#define GL_RESAMPLE_DECIMATE_SGIX         0x8430
+#endif
+
+#ifndef GL_SGIS_point_line_texgen
+#define GL_EYE_DISTANCE_TO_POINT_SGIS     0x81F0
+#define GL_OBJECT_DISTANCE_TO_POINT_SGIS  0x81F1
+#define GL_EYE_DISTANCE_TO_LINE_SGIS      0x81F2
+#define GL_OBJECT_DISTANCE_TO_LINE_SGIS   0x81F3
+#define GL_EYE_POINT_SGIS                 0x81F4
+#define GL_OBJECT_POINT_SGIS              0x81F5
+#define GL_EYE_LINE_SGIS                  0x81F6
+#define GL_OBJECT_LINE_SGIS               0x81F7
+#endif
+
+#ifndef GL_SGIS_texture_color_mask
+#define GL_TEXTURE_COLOR_WRITEMASK_SGIS   0x81EF
+#endif
+
+#ifndef GL_EXT_texture_env_dot3
+#define GL_DOT3_RGB_EXT                   0x8740
+#define GL_DOT3_RGBA_EXT                  0x8741
+#endif
+
+#ifndef GL_ATI_texture_mirror_once
+#define GL_MIRROR_CLAMP_ATI               0x8742
+#define GL_MIRROR_CLAMP_TO_EDGE_ATI       0x8743
+#endif
+
+#ifndef GL_NV_fence
+#define GL_ALL_COMPLETED_NV               0x84F2
+#define GL_FENCE_STATUS_NV                0x84F3
+#define GL_FENCE_CONDITION_NV             0x84F4
+#endif
+
+#ifndef GL_IBM_texture_mirrored_repeat
+#define GL_MIRRORED_REPEAT_IBM            0x8370
+#endif
+
+#ifndef GL_NV_evaluators
+#define GL_EVAL_2D_NV                     0x86C0
+#define GL_EVAL_TRIANGULAR_2D_NV          0x86C1
+#define GL_MAP_TESSELLATION_NV            0x86C2
+#define GL_MAP_ATTRIB_U_ORDER_NV          0x86C3
+#define GL_MAP_ATTRIB_V_ORDER_NV          0x86C4
+#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
+#define GL_EVAL_VERTEX_ATTRIB0_NV         0x86C6
+#define GL_EVAL_VERTEX_ATTRIB1_NV         0x86C7
+#define GL_EVAL_VERTEX_ATTRIB2_NV         0x86C8
+#define GL_EVAL_VERTEX_ATTRIB3_NV         0x86C9
+#define GL_EVAL_VERTEX_ATTRIB4_NV         0x86CA
+#define GL_EVAL_VERTEX_ATTRIB5_NV         0x86CB
+#define GL_EVAL_VERTEX_ATTRIB6_NV         0x86CC
+#define GL_EVAL_VERTEX_ATTRIB7_NV         0x86CD
+#define GL_EVAL_VERTEX_ATTRIB8_NV         0x86CE
+#define GL_EVAL_VERTEX_ATTRIB9_NV         0x86CF
+#define GL_EVAL_VERTEX_ATTRIB10_NV        0x86D0
+#define GL_EVAL_VERTEX_ATTRIB11_NV        0x86D1
+#define GL_EVAL_VERTEX_ATTRIB12_NV        0x86D2
+#define GL_EVAL_VERTEX_ATTRIB13_NV        0x86D3
+#define GL_EVAL_VERTEX_ATTRIB14_NV        0x86D4
+#define GL_EVAL_VERTEX_ATTRIB15_NV        0x86D5
+#define GL_MAX_MAP_TESSELLATION_NV        0x86D6
+#define GL_MAX_RATIONAL_EVAL_ORDER_NV     0x86D7
+#endif
+
+#ifndef GL_NV_packed_depth_stencil
+#define GL_DEPTH_STENCIL_NV               0x84F9
+#define GL_UNSIGNED_INT_24_8_NV           0x84FA
+#endif
+
+#ifndef GL_NV_register_combiners2
+#define GL_PER_STAGE_CONSTANTS_NV         0x8535
+#endif
+
+#ifndef GL_NV_texture_compression_vtc
+#endif
+
+#ifndef GL_NV_texture_rectangle
+#define GL_TEXTURE_RECTANGLE_NV           0x84F5
+#define GL_TEXTURE_BINDING_RECTANGLE_NV   0x84F6
+#define GL_PROXY_TEXTURE_RECTANGLE_NV     0x84F7
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV  0x84F8
+#endif
+
+#ifndef GL_NV_texture_shader
+#define GL_OFFSET_TEXTURE_RECTANGLE_NV    0x864C
+#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
+#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
+#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
+#define GL_UNSIGNED_INT_S8_S8_8_8_NV      0x86DA
+#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV  0x86DB
+#define GL_DSDT_MAG_INTENSITY_NV          0x86DC
+#define GL_SHADER_CONSISTENT_NV           0x86DD
+#define GL_TEXTURE_SHADER_NV              0x86DE
+#define GL_SHADER_OPERATION_NV            0x86DF
+#define GL_CULL_MODES_NV                  0x86E0
+#define GL_OFFSET_TEXTURE_MATRIX_NV       0x86E1
+#define GL_OFFSET_TEXTURE_SCALE_NV        0x86E2
+#define GL_OFFSET_TEXTURE_BIAS_NV         0x86E3
+#define GL_OFFSET_TEXTURE_2D_MATRIX_NV    GL_OFFSET_TEXTURE_MATRIX_NV
+#define GL_OFFSET_TEXTURE_2D_SCALE_NV     GL_OFFSET_TEXTURE_SCALE_NV
+#define GL_OFFSET_TEXTURE_2D_BIAS_NV      GL_OFFSET_TEXTURE_BIAS_NV
+#define GL_PREVIOUS_TEXTURE_INPUT_NV      0x86E4
+#define GL_CONST_EYE_NV                   0x86E5
+#define GL_PASS_THROUGH_NV                0x86E6
+#define GL_CULL_FRAGMENT_NV               0x86E7
+#define GL_OFFSET_TEXTURE_2D_NV           0x86E8
+#define GL_DEPENDENT_AR_TEXTURE_2D_NV     0x86E9
+#define GL_DEPENDENT_GB_TEXTURE_2D_NV     0x86EA
+#define GL_DOT_PRODUCT_NV                 0x86EC
+#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV   0x86ED
+#define GL_DOT_PRODUCT_TEXTURE_2D_NV      0x86EE
+#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
+#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
+#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
+#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
+#define GL_HILO_NV                        0x86F4
+#define GL_DSDT_NV                        0x86F5
+#define GL_DSDT_MAG_NV                    0x86F6
+#define GL_DSDT_MAG_VIB_NV                0x86F7
+#define GL_HILO16_NV                      0x86F8
+#define GL_SIGNED_HILO_NV                 0x86F9
+#define GL_SIGNED_HILO16_NV               0x86FA
+#define GL_SIGNED_RGBA_NV                 0x86FB
+#define GL_SIGNED_RGBA8_NV                0x86FC
+#define GL_SIGNED_RGB_NV                  0x86FE
+#define GL_SIGNED_RGB8_NV                 0x86FF
+#define GL_SIGNED_LUMINANCE_NV            0x8701
+#define GL_SIGNED_LUMINANCE8_NV           0x8702
+#define GL_SIGNED_LUMINANCE_ALPHA_NV      0x8703
+#define GL_SIGNED_LUMINANCE8_ALPHA8_NV    0x8704
+#define GL_SIGNED_ALPHA_NV                0x8705
+#define GL_SIGNED_ALPHA8_NV               0x8706
+#define GL_SIGNED_INTENSITY_NV            0x8707
+#define GL_SIGNED_INTENSITY8_NV           0x8708
+#define GL_DSDT8_NV                       0x8709
+#define GL_DSDT8_MAG8_NV                  0x870A
+#define GL_DSDT8_MAG8_INTENSITY8_NV       0x870B
+#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV   0x870C
+#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
+#define GL_HI_SCALE_NV                    0x870E
+#define GL_LO_SCALE_NV                    0x870F
+#define GL_DS_SCALE_NV                    0x8710
+#define GL_DT_SCALE_NV                    0x8711
+#define GL_MAGNITUDE_SCALE_NV             0x8712
+#define GL_VIBRANCE_SCALE_NV              0x8713
+#define GL_HI_BIAS_NV                     0x8714
+#define GL_LO_BIAS_NV                     0x8715
+#define GL_DS_BIAS_NV                     0x8716
+#define GL_DT_BIAS_NV                     0x8717
+#define GL_MAGNITUDE_BIAS_NV              0x8718
+#define GL_VIBRANCE_BIAS_NV               0x8719
+#define GL_TEXTURE_BORDER_VALUES_NV       0x871A
+#define GL_TEXTURE_HI_SIZE_NV             0x871B
+#define GL_TEXTURE_LO_SIZE_NV             0x871C
+#define GL_TEXTURE_DS_SIZE_NV             0x871D
+#define GL_TEXTURE_DT_SIZE_NV             0x871E
+#define GL_TEXTURE_MAG_SIZE_NV            0x871F
+#endif
+
+#ifndef GL_NV_texture_shader2
+#define GL_DOT_PRODUCT_TEXTURE_3D_NV      0x86EF
+#endif
+
+#ifndef GL_NV_vertex_array_range2
+#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
+#endif
+
+#ifndef GL_NV_vertex_program
+#define GL_VERTEX_PROGRAM_NV              0x8620
+#define GL_VERTEX_STATE_PROGRAM_NV        0x8621
+#define GL_ATTRIB_ARRAY_SIZE_NV           0x8623
+#define GL_ATTRIB_ARRAY_STRIDE_NV         0x8624
+#define GL_ATTRIB_ARRAY_TYPE_NV           0x8625
+#define GL_CURRENT_ATTRIB_NV              0x8626
+#define GL_PROGRAM_LENGTH_NV              0x8627
+#define GL_PROGRAM_STRING_NV              0x8628
+#define GL_MODELVIEW_PROJECTION_NV        0x8629
+#define GL_IDENTITY_NV                    0x862A
+#define GL_INVERSE_NV                     0x862B
+#define GL_TRANSPOSE_NV                   0x862C
+#define GL_INVERSE_TRANSPOSE_NV           0x862D
+#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
+#define GL_MAX_TRACK_MATRICES_NV          0x862F
+#define GL_MATRIX0_NV                     0x8630
+#define GL_MATRIX1_NV                     0x8631
+#define GL_MATRIX2_NV                     0x8632
+#define GL_MATRIX3_NV                     0x8633
+#define GL_MATRIX4_NV                     0x8634
+#define GL_MATRIX5_NV                     0x8635
+#define GL_MATRIX6_NV                     0x8636
+#define GL_MATRIX7_NV                     0x8637
+#define GL_CURRENT_MATRIX_STACK_DEPTH_NV  0x8640
+#define GL_CURRENT_MATRIX_NV              0x8641
+#define GL_VERTEX_PROGRAM_POINT_SIZE_NV   0x8642
+#define GL_VERTEX_PROGRAM_TWO_SIDE_NV     0x8643
+#define GL_PROGRAM_PARAMETER_NV           0x8644
+#define GL_ATTRIB_ARRAY_POINTER_NV        0x8645
+#define GL_PROGRAM_TARGET_NV              0x8646
+#define GL_PROGRAM_RESIDENT_NV            0x8647
+#define GL_TRACK_MATRIX_NV                0x8648
+#define GL_TRACK_MATRIX_TRANSFORM_NV      0x8649
+#define GL_VERTEX_PROGRAM_BINDING_NV      0x864A
+#define GL_PROGRAM_ERROR_POSITION_NV      0x864B
+#define GL_VERTEX_ATTRIB_ARRAY0_NV        0x8650
+#define GL_VERTEX_ATTRIB_ARRAY1_NV        0x8651
+#define GL_VERTEX_ATTRIB_ARRAY2_NV        0x8652
+#define GL_VERTEX_ATTRIB_ARRAY3_NV        0x8653
+#define GL_VERTEX_ATTRIB_ARRAY4_NV        0x8654
+#define GL_VERTEX_ATTRIB_ARRAY5_NV        0x8655
+#define GL_VERTEX_ATTRIB_ARRAY6_NV        0x8656
+#define GL_VERTEX_ATTRIB_ARRAY7_NV        0x8657
+#define GL_VERTEX_ATTRIB_ARRAY8_NV        0x8658
+#define GL_VERTEX_ATTRIB_ARRAY9_NV        0x8659
+#define GL_VERTEX_ATTRIB_ARRAY10_NV       0x865A
+#define GL_VERTEX_ATTRIB_ARRAY11_NV       0x865B
+#define GL_VERTEX_ATTRIB_ARRAY12_NV       0x865C
+#define GL_VERTEX_ATTRIB_ARRAY13_NV       0x865D
+#define GL_VERTEX_ATTRIB_ARRAY14_NV       0x865E
+#define GL_VERTEX_ATTRIB_ARRAY15_NV       0x865F
+#define GL_MAP1_VERTEX_ATTRIB0_4_NV       0x8660
+#define GL_MAP1_VERTEX_ATTRIB1_4_NV       0x8661
+#define GL_MAP1_VERTEX_ATTRIB2_4_NV       0x8662
+#define GL_MAP1_VERTEX_ATTRIB3_4_NV       0x8663
+#define GL_MAP1_VERTEX_ATTRIB4_4_NV       0x8664
+#define GL_MAP1_VERTEX_ATTRIB5_4_NV       0x8665
+#define GL_MAP1_VERTEX_ATTRIB6_4_NV       0x8666
+#define GL_MAP1_VERTEX_ATTRIB7_4_NV       0x8667
+#define GL_MAP1_VERTEX_ATTRIB8_4_NV       0x8668
+#define GL_MAP1_VERTEX_ATTRIB9_4_NV       0x8669
+#define GL_MAP1_VERTEX_ATTRIB10_4_NV      0x866A
+#define GL_MAP1_VERTEX_ATTRIB11_4_NV      0x866B
+#define GL_MAP1_VERTEX_ATTRIB12_4_NV      0x866C
+#define GL_MAP1_VERTEX_ATTRIB13_4_NV      0x866D
+#define GL_MAP1_VERTEX_ATTRIB14_4_NV      0x866E
+#define GL_MAP1_VERTEX_ATTRIB15_4_NV      0x866F
+#define GL_MAP2_VERTEX_ATTRIB0_4_NV       0x8670
+#define GL_MAP2_VERTEX_ATTRIB1_4_NV       0x8671
+#define GL_MAP2_VERTEX_ATTRIB2_4_NV       0x8672
+#define GL_MAP2_VERTEX_ATTRIB3_4_NV       0x8673
+#define GL_MAP2_VERTEX_ATTRIB4_4_NV       0x8674
+#define GL_MAP2_VERTEX_ATTRIB5_4_NV       0x8675
+#define GL_MAP2_VERTEX_ATTRIB6_4_NV       0x8676
+#define GL_MAP2_VERTEX_ATTRIB7_4_NV       0x8677
+#define GL_MAP2_VERTEX_ATTRIB8_4_NV       0x8678
+#define GL_MAP2_VERTEX_ATTRIB9_4_NV       0x8679
+#define GL_MAP2_VERTEX_ATTRIB10_4_NV      0x867A
+#define GL_MAP2_VERTEX_ATTRIB11_4_NV      0x867B
+#define GL_MAP2_VERTEX_ATTRIB12_4_NV      0x867C
+#define GL_MAP2_VERTEX_ATTRIB13_4_NV      0x867D
+#define GL_MAP2_VERTEX_ATTRIB14_4_NV      0x867E
+#define GL_MAP2_VERTEX_ATTRIB15_4_NV      0x867F
+#endif
+
+#ifndef GL_SGIX_texture_coordinate_clamp
+#define GL_TEXTURE_MAX_CLAMP_S_SGIX       0x8369
+#define GL_TEXTURE_MAX_CLAMP_T_SGIX       0x836A
+#define GL_TEXTURE_MAX_CLAMP_R_SGIX       0x836B
+#endif
+
+#ifndef GL_SGIX_scalebias_hint
+#define GL_SCALEBIAS_HINT_SGIX            0x8322
+#endif
+
+#ifndef GL_OML_interlace
+#define GL_INTERLACE_OML                  0x8980
+#define GL_INTERLACE_READ_OML             0x8981
+#endif
+
+#ifndef GL_OML_subsample
+#define GL_FORMAT_SUBSAMPLE_24_24_OML     0x8982
+#define GL_FORMAT_SUBSAMPLE_244_244_OML   0x8983
+#endif
+
+#ifndef GL_OML_resample
+#define GL_PACK_RESAMPLE_OML              0x8984
+#define GL_UNPACK_RESAMPLE_OML            0x8985
+#define GL_RESAMPLE_REPLICATE_OML         0x8986
+#define GL_RESAMPLE_ZERO_FILL_OML         0x8987
+#define GL_RESAMPLE_AVERAGE_OML           0x8988
+#define GL_RESAMPLE_DECIMATE_OML          0x8989
+#endif
+
+#ifndef GL_NV_copy_depth_to_color
+#define GL_DEPTH_STENCIL_TO_RGBA_NV       0x886E
+#define GL_DEPTH_STENCIL_TO_BGRA_NV       0x886F
+#endif
+
+#ifndef GL_ATI_envmap_bumpmap
+#define GL_BUMP_ROT_MATRIX_ATI            0x8775
+#define GL_BUMP_ROT_MATRIX_SIZE_ATI       0x8776
+#define GL_BUMP_NUM_TEX_UNITS_ATI         0x8777
+#define GL_BUMP_TEX_UNITS_ATI             0x8778
+#define GL_DUDV_ATI                       0x8779
+#define GL_DU8DV8_ATI                     0x877A
+#define GL_BUMP_ENVMAP_ATI                0x877B
+#define GL_BUMP_TARGET_ATI                0x877C
+#endif
+
+#ifndef GL_ATI_fragment_shader
+#define GL_FRAGMENT_SHADER_ATI            0x8920
+#define GL_REG_0_ATI                      0x8921
+#define GL_REG_1_ATI                      0x8922
+#define GL_REG_2_ATI                      0x8923
+#define GL_REG_3_ATI                      0x8924
+#define GL_REG_4_ATI                      0x8925
+#define GL_REG_5_ATI                      0x8926
+#define GL_REG_6_ATI                      0x8927
+#define GL_REG_7_ATI                      0x8928
+#define GL_REG_8_ATI                      0x8929
+#define GL_REG_9_ATI                      0x892A
+#define GL_REG_10_ATI                     0x892B
+#define GL_REG_11_ATI                     0x892C
+#define GL_REG_12_ATI                     0x892D
+#define GL_REG_13_ATI                     0x892E
+#define GL_REG_14_ATI                     0x892F
+#define GL_REG_15_ATI                     0x8930
+#define GL_REG_16_ATI                     0x8931
+#define GL_REG_17_ATI                     0x8932
+#define GL_REG_18_ATI                     0x8933
+#define GL_REG_19_ATI                     0x8934
+#define GL_REG_20_ATI                     0x8935
+#define GL_REG_21_ATI                     0x8936
+#define GL_REG_22_ATI                     0x8937
+#define GL_REG_23_ATI                     0x8938
+#define GL_REG_24_ATI                     0x8939
+#define GL_REG_25_ATI                     0x893A
+#define GL_REG_26_ATI                     0x893B
+#define GL_REG_27_ATI                     0x893C
+#define GL_REG_28_ATI                     0x893D
+#define GL_REG_29_ATI                     0x893E
+#define GL_REG_30_ATI                     0x893F
+#define GL_REG_31_ATI                     0x8940
+#define GL_CON_0_ATI                      0x8941
+#define GL_CON_1_ATI                      0x8942
+#define GL_CON_2_ATI                      0x8943
+#define GL_CON_3_ATI                      0x8944
+#define GL_CON_4_ATI                      0x8945
+#define GL_CON_5_ATI                      0x8946
+#define GL_CON_6_ATI                      0x8947
+#define GL_CON_7_ATI                      0x8948
+#define GL_CON_8_ATI                      0x8949
+#define GL_CON_9_ATI                      0x894A
+#define GL_CON_10_ATI                     0x894B
+#define GL_CON_11_ATI                     0x894C
+#define GL_CON_12_ATI                     0x894D
+#define GL_CON_13_ATI                     0x894E
+#define GL_CON_14_ATI                     0x894F
+#define GL_CON_15_ATI                     0x8950
+#define GL_CON_16_ATI                     0x8951
+#define GL_CON_17_ATI                     0x8952
+#define GL_CON_18_ATI                     0x8953
+#define GL_CON_19_ATI                     0x8954
+#define GL_CON_20_ATI                     0x8955
+#define GL_CON_21_ATI                     0x8956
+#define GL_CON_22_ATI                     0x8957
+#define GL_CON_23_ATI                     0x8958
+#define GL_CON_24_ATI                     0x8959
+#define GL_CON_25_ATI                     0x895A
+#define GL_CON_26_ATI                     0x895B
+#define GL_CON_27_ATI                     0x895C
+#define GL_CON_28_ATI                     0x895D
+#define GL_CON_29_ATI                     0x895E
+#define GL_CON_30_ATI                     0x895F
+#define GL_CON_31_ATI                     0x8960
+#define GL_MOV_ATI                        0x8961
+#define GL_ADD_ATI                        0x8963
+#define GL_MUL_ATI                        0x8964
+#define GL_SUB_ATI                        0x8965
+#define GL_DOT3_ATI                       0x8966
+#define GL_DOT4_ATI                       0x8967
+#define GL_MAD_ATI                        0x8968
+#define GL_LERP_ATI                       0x8969
+#define GL_CND_ATI                        0x896A
+#define GL_CND0_ATI                       0x896B
+#define GL_DOT2_ADD_ATI                   0x896C
+#define GL_SECONDARY_INTERPOLATOR_ATI     0x896D
+#define GL_NUM_FRAGMENT_REGISTERS_ATI     0x896E
+#define GL_NUM_FRAGMENT_CONSTANTS_ATI     0x896F
+#define GL_NUM_PASSES_ATI                 0x8970
+#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI  0x8971
+#define GL_NUM_INSTRUCTIONS_TOTAL_ATI     0x8972
+#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
+#define GL_NUM_LOOPBACK_COMPONENTS_ATI    0x8974
+#define GL_COLOR_ALPHA_PAIRING_ATI        0x8975
+#define GL_SWIZZLE_STR_ATI                0x8976
+#define GL_SWIZZLE_STQ_ATI                0x8977
+#define GL_SWIZZLE_STR_DR_ATI             0x8978
+#define GL_SWIZZLE_STQ_DQ_ATI             0x8979
+#define GL_SWIZZLE_STRQ_ATI               0x897A
+#define GL_SWIZZLE_STRQ_DQ_ATI            0x897B
+#define GL_RED_BIT_ATI                    0x00000001
+#define GL_GREEN_BIT_ATI                  0x00000002
+#define GL_BLUE_BIT_ATI                   0x00000004
+#define GL_2X_BIT_ATI                     0x00000001
+#define GL_4X_BIT_ATI                     0x00000002
+#define GL_8X_BIT_ATI                     0x00000004
+#define GL_HALF_BIT_ATI                   0x00000008
+#define GL_QUARTER_BIT_ATI                0x00000010
+#define GL_EIGHTH_BIT_ATI                 0x00000020
+#define GL_SATURATE_BIT_ATI               0x00000040
+#define GL_COMP_BIT_ATI                   0x00000002
+#define GL_NEGATE_BIT_ATI                 0x00000004
+#define GL_BIAS_BIT_ATI                   0x00000008
+#endif
+
+#ifndef GL_ATI_pn_triangles
+#define GL_PN_TRIANGLES_ATI               0x87F0
+#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
+#define GL_PN_TRIANGLES_POINT_MODE_ATI    0x87F2
+#define GL_PN_TRIANGLES_NORMAL_MODE_ATI   0x87F3
+#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
+#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
+#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
+#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
+#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
+#endif
+
+#ifndef GL_ATI_vertex_array_object
+#define GL_STATIC_ATI                     0x8760
+#define GL_DYNAMIC_ATI                    0x8761
+#define GL_PRESERVE_ATI                   0x8762
+#define GL_DISCARD_ATI                    0x8763
+#define GL_OBJECT_BUFFER_SIZE_ATI         0x8764
+#define GL_OBJECT_BUFFER_USAGE_ATI        0x8765
+#define GL_ARRAY_OBJECT_BUFFER_ATI        0x8766
+#define GL_ARRAY_OBJECT_OFFSET_ATI        0x8767
+#endif
+
+#ifndef GL_EXT_vertex_shader
+#define GL_VERTEX_SHADER_EXT              0x8780
+#define GL_VERTEX_SHADER_BINDING_EXT      0x8781
+#define GL_OP_INDEX_EXT                   0x8782
+#define GL_OP_NEGATE_EXT                  0x8783
+#define GL_OP_DOT3_EXT                    0x8784
+#define GL_OP_DOT4_EXT                    0x8785
+#define GL_OP_MUL_EXT                     0x8786
+#define GL_OP_ADD_EXT                     0x8787
+#define GL_OP_MADD_EXT                    0x8788
+#define GL_OP_FRAC_EXT                    0x8789
+#define GL_OP_MAX_EXT                     0x878A
+#define GL_OP_MIN_EXT                     0x878B
+#define GL_OP_SET_GE_EXT                  0x878C
+#define GL_OP_SET_LT_EXT                  0x878D
+#define GL_OP_CLAMP_EXT                   0x878E
+#define GL_OP_FLOOR_EXT                   0x878F
+#define GL_OP_ROUND_EXT                   0x8790
+#define GL_OP_EXP_BASE_2_EXT              0x8791
+#define GL_OP_LOG_BASE_2_EXT              0x8792
+#define GL_OP_POWER_EXT                   0x8793
+#define GL_OP_RECIP_EXT                   0x8794
+#define GL_OP_RECIP_SQRT_EXT              0x8795
+#define GL_OP_SUB_EXT                     0x8796
+#define GL_OP_CROSS_PRODUCT_EXT           0x8797
+#define GL_OP_MULTIPLY_MATRIX_EXT         0x8798
+#define GL_OP_MOV_EXT                     0x8799
+#define GL_OUTPUT_VERTEX_EXT              0x879A
+#define GL_OUTPUT_COLOR0_EXT              0x879B
+#define GL_OUTPUT_COLOR1_EXT              0x879C
+#define GL_OUTPUT_TEXTURE_COORD0_EXT      0x879D
+#define GL_OUTPUT_TEXTURE_COORD1_EXT      0x879E
+#define GL_OUTPUT_TEXTURE_COORD2_EXT      0x879F
+#define GL_OUTPUT_TEXTURE_COORD3_EXT      0x87A0
+#define GL_OUTPUT_TEXTURE_COORD4_EXT      0x87A1
+#define GL_OUTPUT_TEXTURE_COORD5_EXT      0x87A2
+#define GL_OUTPUT_TEXTURE_COORD6_EXT      0x87A3
+#define GL_OUTPUT_TEXTURE_COORD7_EXT      0x87A4
+#define GL_OUTPUT_TEXTURE_COORD8_EXT      0x87A5
+#define GL_OUTPUT_TEXTURE_COORD9_EXT      0x87A6
+#define GL_OUTPUT_TEXTURE_COORD10_EXT     0x87A7
+#define GL_OUTPUT_TEXTURE_COORD11_EXT     0x87A8
+#define GL_OUTPUT_TEXTURE_COORD12_EXT     0x87A9
+#define GL_OUTPUT_TEXTURE_COORD13_EXT     0x87AA
+#define GL_OUTPUT_TEXTURE_COORD14_EXT     0x87AB
+#define GL_OUTPUT_TEXTURE_COORD15_EXT     0x87AC
+#define GL_OUTPUT_TEXTURE_COORD16_EXT     0x87AD
+#define GL_OUTPUT_TEXTURE_COORD17_EXT     0x87AE
+#define GL_OUTPUT_TEXTURE_COORD18_EXT     0x87AF
+#define GL_OUTPUT_TEXTURE_COORD19_EXT     0x87B0
+#define GL_OUTPUT_TEXTURE_COORD20_EXT     0x87B1
+#define GL_OUTPUT_TEXTURE_COORD21_EXT     0x87B2
+#define GL_OUTPUT_TEXTURE_COORD22_EXT     0x87B3
+#define GL_OUTPUT_TEXTURE_COORD23_EXT     0x87B4
+#define GL_OUTPUT_TEXTURE_COORD24_EXT     0x87B5
+#define GL_OUTPUT_TEXTURE_COORD25_EXT     0x87B6
+#define GL_OUTPUT_TEXTURE_COORD26_EXT     0x87B7
+#define GL_OUTPUT_TEXTURE_COORD27_EXT     0x87B8
+#define GL_OUTPUT_TEXTURE_COORD28_EXT     0x87B9
+#define GL_OUTPUT_TEXTURE_COORD29_EXT     0x87BA
+#define GL_OUTPUT_TEXTURE_COORD30_EXT     0x87BB
+#define GL_OUTPUT_TEXTURE_COORD31_EXT     0x87BC
+#define GL_OUTPUT_FOG_EXT                 0x87BD
+#define GL_SCALAR_EXT                     0x87BE
+#define GL_VECTOR_EXT                     0x87BF
+#define GL_MATRIX_EXT                     0x87C0
+#define GL_VARIANT_EXT                    0x87C1
+#define GL_INVARIANT_EXT                  0x87C2
+#define GL_LOCAL_CONSTANT_EXT             0x87C3
+#define GL_LOCAL_EXT                      0x87C4
+#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
+#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
+#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
+#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
+#define GL_MAX_VERTEX_SHADER_LOCALS_EXT   0x87C9
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
+#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
+#define GL_VERTEX_SHADER_VARIANTS_EXT     0x87D0
+#define GL_VERTEX_SHADER_INVARIANTS_EXT   0x87D1
+#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
+#define GL_VERTEX_SHADER_LOCALS_EXT       0x87D3
+#define GL_VERTEX_SHADER_OPTIMIZED_EXT    0x87D4
+#define GL_X_EXT                          0x87D5
+#define GL_Y_EXT                          0x87D6
+#define GL_Z_EXT                          0x87D7
+#define GL_W_EXT                          0x87D8
+#define GL_NEGATIVE_X_EXT                 0x87D9
+#define GL_NEGATIVE_Y_EXT                 0x87DA
+#define GL_NEGATIVE_Z_EXT                 0x87DB
+#define GL_NEGATIVE_W_EXT                 0x87DC
+#define GL_ZERO_EXT                       0x87DD
+#define GL_ONE_EXT                        0x87DE
+#define GL_NEGATIVE_ONE_EXT               0x87DF
+#define GL_NORMALIZED_RANGE_EXT           0x87E0
+#define GL_FULL_RANGE_EXT                 0x87E1
+#define GL_CURRENT_VERTEX_EXT             0x87E2
+#define GL_MVP_MATRIX_EXT                 0x87E3
+#define GL_VARIANT_VALUE_EXT              0x87E4
+#define GL_VARIANT_DATATYPE_EXT           0x87E5
+#define GL_VARIANT_ARRAY_STRIDE_EXT       0x87E6
+#define GL_VARIANT_ARRAY_TYPE_EXT         0x87E7
+#define GL_VARIANT_ARRAY_EXT              0x87E8
+#define GL_VARIANT_ARRAY_POINTER_EXT      0x87E9
+#define GL_INVARIANT_VALUE_EXT            0x87EA
+#define GL_INVARIANT_DATATYPE_EXT         0x87EB
+#define GL_LOCAL_CONSTANT_VALUE_EXT       0x87EC
+#define GL_LOCAL_CONSTANT_DATATYPE_EXT    0x87ED
+#endif
+
+#ifndef GL_ATI_vertex_streams
+#define GL_MAX_VERTEX_STREAMS_ATI         0x876B
+#define GL_VERTEX_STREAM0_ATI             0x876C
+#define GL_VERTEX_STREAM1_ATI             0x876D
+#define GL_VERTEX_STREAM2_ATI             0x876E
+#define GL_VERTEX_STREAM3_ATI             0x876F
+#define GL_VERTEX_STREAM4_ATI             0x8770
+#define GL_VERTEX_STREAM5_ATI             0x8771
+#define GL_VERTEX_STREAM6_ATI             0x8772
+#define GL_VERTEX_STREAM7_ATI             0x8773
+#define GL_VERTEX_SOURCE_ATI              0x8774
+#endif
+
+#ifndef GL_ATI_element_array
+#define GL_ELEMENT_ARRAY_ATI              0x8768
+#define GL_ELEMENT_ARRAY_TYPE_ATI         0x8769
+#define GL_ELEMENT_ARRAY_POINTER_ATI      0x876A
+#endif
+
+#ifndef GL_SUN_mesh_array
+#define GL_QUAD_MESH_SUN                  0x8614
+#define GL_TRIANGLE_MESH_SUN              0x8615
+#endif
+
+#ifndef GL_SUN_slice_accum
+#define GL_SLICE_ACCUM_SUN                0x85CC
+#endif
+
+#ifndef GL_NV_multisample_filter_hint
+#define GL_MULTISAMPLE_FILTER_HINT_NV     0x8534
+#endif
+
+#ifndef GL_NV_depth_clamp
+#define GL_DEPTH_CLAMP_NV                 0x864F
+#endif
+
+#ifndef GL_NV_occlusion_query
+#define GL_PIXEL_COUNTER_BITS_NV          0x8864
+#define GL_CURRENT_OCCLUSION_QUERY_ID_NV  0x8865
+#define GL_PIXEL_COUNT_NV                 0x8866
+#define GL_PIXEL_COUNT_AVAILABLE_NV       0x8867
+#endif
+
+#ifndef GL_NV_point_sprite
+#define GL_POINT_SPRITE_NV                0x8861
+#define GL_COORD_REPLACE_NV               0x8862
+#define GL_POINT_SPRITE_R_MODE_NV         0x8863
+#endif
+
+#ifndef GL_NV_texture_shader3
+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
+#define GL_OFFSET_HILO_TEXTURE_2D_NV      0x8854
+#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
+#define GL_DEPENDENT_HILO_TEXTURE_2D_NV   0x8858
+#define GL_DEPENDENT_RGB_TEXTURE_3D_NV    0x8859
+#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
+#define GL_DOT_PRODUCT_PASS_THROUGH_NV    0x885B
+#define GL_DOT_PRODUCT_TEXTURE_1D_NV      0x885C
+#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
+#define GL_HILO8_NV                       0x885E
+#define GL_SIGNED_HILO8_NV                0x885F
+#define GL_FORCE_BLUE_TO_ONE_NV           0x8860
+#endif
+
+#ifndef GL_NV_vertex_program1_1
+#endif
+
+#ifndef GL_EXT_shadow_funcs
+#endif
+
+#ifndef GL_EXT_stencil_two_side
+#define GL_STENCIL_TEST_TWO_SIDE_EXT      0x8910
+#define GL_ACTIVE_STENCIL_FACE_EXT        0x8911
+#endif
+
+#ifndef GL_ATI_text_fragment_shader
+#define GL_TEXT_FRAGMENT_SHADER_ATI       0x8200
+#endif
+
+#ifndef GL_APPLE_client_storage
+#define GL_UNPACK_CLIENT_STORAGE_APPLE    0x85B2
+#endif
+
+#ifndef GL_APPLE_element_array
+#define GL_ELEMENT_ARRAY_APPLE            0x8768
+#define GL_ELEMENT_ARRAY_TYPE_APPLE       0x8769
+#define GL_ELEMENT_ARRAY_POINTER_APPLE    0x876A
+#endif
+
+#ifndef GL_APPLE_fence
+#define GL_DRAW_PIXELS_APPLE              0x8A0A
+#define GL_FENCE_APPLE                    0x8A0B
+#endif
+
+#ifndef GL_APPLE_vertex_array_object
+#define GL_VERTEX_ARRAY_BINDING_APPLE     0x85B5
+#endif
+
+#ifndef GL_APPLE_vertex_array_range
+#define GL_VERTEX_ARRAY_RANGE_APPLE       0x851D
+#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
+#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
+#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
+#define GL_STORAGE_CACHED_APPLE           0x85BE
+#define GL_STORAGE_SHARED_APPLE           0x85BF
+#endif
+
+#ifndef GL_APPLE_ycbcr_422
+#define GL_YCBCR_422_APPLE                0x85B9
+#define GL_UNSIGNED_SHORT_8_8_APPLE       0x85BA
+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE   0x85BB
+#endif
+
+#ifndef GL_S3_s3tc
+#define GL_RGB_S3TC                       0x83A0
+#define GL_RGB4_S3TC                      0x83A1
+#define GL_RGBA_S3TC                      0x83A2
+#define GL_RGBA4_S3TC                     0x83A3
+#endif
+
+#ifndef GL_ATI_draw_buffers
+#define GL_MAX_DRAW_BUFFERS_ATI           0x8824
+#define GL_DRAW_BUFFER0_ATI               0x8825
+#define GL_DRAW_BUFFER1_ATI               0x8826
+#define GL_DRAW_BUFFER2_ATI               0x8827
+#define GL_DRAW_BUFFER3_ATI               0x8828
+#define GL_DRAW_BUFFER4_ATI               0x8829
+#define GL_DRAW_BUFFER5_ATI               0x882A
+#define GL_DRAW_BUFFER6_ATI               0x882B
+#define GL_DRAW_BUFFER7_ATI               0x882C
+#define GL_DRAW_BUFFER8_ATI               0x882D
+#define GL_DRAW_BUFFER9_ATI               0x882E
+#define GL_DRAW_BUFFER10_ATI              0x882F
+#define GL_DRAW_BUFFER11_ATI              0x8830
+#define GL_DRAW_BUFFER12_ATI              0x8831
+#define GL_DRAW_BUFFER13_ATI              0x8832
+#define GL_DRAW_BUFFER14_ATI              0x8833
+#define GL_DRAW_BUFFER15_ATI              0x8834
+#endif
+
+#ifndef GL_ATI_pixel_format_float
+#define GL_TYPE_RGBA_FLOAT_ATI            0x8820
+#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
+#endif
+
+#ifndef GL_ATI_texture_env_combine3
+#define GL_MODULATE_ADD_ATI               0x8744
+#define GL_MODULATE_SIGNED_ADD_ATI        0x8745
+#define GL_MODULATE_SUBTRACT_ATI          0x8746
+#endif
+
+#ifndef GL_ATI_texture_float
+#define GL_RGBA_FLOAT32_ATI               0x8814
+#define GL_RGB_FLOAT32_ATI                0x8815
+#define GL_ALPHA_FLOAT32_ATI              0x8816
+#define GL_INTENSITY_FLOAT32_ATI          0x8817
+#define GL_LUMINANCE_FLOAT32_ATI          0x8818
+#define GL_LUMINANCE_ALPHA_FLOAT32_ATI    0x8819
+#define GL_RGBA_FLOAT16_ATI               0x881A
+#define GL_RGB_FLOAT16_ATI                0x881B
+#define GL_ALPHA_FLOAT16_ATI              0x881C
+#define GL_INTENSITY_FLOAT16_ATI          0x881D
+#define GL_LUMINANCE_FLOAT16_ATI          0x881E
+#define GL_LUMINANCE_ALPHA_FLOAT16_ATI    0x881F
+#endif
+
+#ifndef GL_NV_float_buffer
+#define GL_FLOAT_R_NV                     0x8880
+#define GL_FLOAT_RG_NV                    0x8881
+#define GL_FLOAT_RGB_NV                   0x8882
+#define GL_FLOAT_RGBA_NV                  0x8883
+#define GL_FLOAT_R16_NV                   0x8884
+#define GL_FLOAT_R32_NV                   0x8885
+#define GL_FLOAT_RG16_NV                  0x8886
+#define GL_FLOAT_RG32_NV                  0x8887
+#define GL_FLOAT_RGB16_NV                 0x8888
+#define GL_FLOAT_RGB32_NV                 0x8889
+#define GL_FLOAT_RGBA16_NV                0x888A
+#define GL_FLOAT_RGBA32_NV                0x888B
+#define GL_TEXTURE_FLOAT_COMPONENTS_NV    0x888C
+#define GL_FLOAT_CLEAR_COLOR_VALUE_NV     0x888D
+#define GL_FLOAT_RGBA_MODE_NV             0x888E
+#endif
+
+#ifndef GL_NV_fragment_program
+#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
+#define GL_FRAGMENT_PROGRAM_NV            0x8870
+#define GL_MAX_TEXTURE_COORDS_NV          0x8871
+#define GL_MAX_TEXTURE_IMAGE_UNITS_NV     0x8872
+#define GL_FRAGMENT_PROGRAM_BINDING_NV    0x8873
+#define GL_PROGRAM_ERROR_STRING_NV        0x8874
+#endif
+
+#ifndef GL_NV_half_float
+#define GL_HALF_FLOAT_NV                  0x140B
+#endif
+
+#ifndef GL_NV_pixel_data_range
+#define GL_WRITE_PIXEL_DATA_RANGE_NV      0x8878
+#define GL_READ_PIXEL_DATA_RANGE_NV       0x8879
+#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
+#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
+#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
+#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
+#endif
+
+#ifndef GL_NV_primitive_restart
+#define GL_PRIMITIVE_RESTART_NV           0x8558
+#define GL_PRIMITIVE_RESTART_INDEX_NV     0x8559
+#endif
+
+#ifndef GL_NV_texture_expand_normal
+#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
+#endif
+
+#ifndef GL_NV_vertex_program2
+#endif
+
+#ifndef GL_ATI_map_object_buffer
+#endif
+
+#ifndef GL_ATI_separate_stencil
+#define GL_STENCIL_BACK_FUNC_ATI          0x8800
+#define GL_STENCIL_BACK_FAIL_ATI          0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
+#endif
+
+#ifndef GL_ATI_vertex_attrib_array_object
+#endif
+
+#ifndef GL_OES_read_format
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
+#endif
+
+#ifndef GL_EXT_depth_bounds_test
+#define GL_DEPTH_BOUNDS_TEST_EXT          0x8890
+#define GL_DEPTH_BOUNDS_EXT               0x8891
+#endif
+
+#ifndef GL_EXT_texture_mirror_clamp
+#define GL_MIRROR_CLAMP_EXT               0x8742
+#define GL_MIRROR_CLAMP_TO_EDGE_EXT       0x8743
+#define GL_MIRROR_CLAMP_TO_BORDER_EXT     0x8912
+#endif
+
+#ifndef GL_EXT_blend_equation_separate
+#define GL_BLEND_EQUATION_RGB_EXT         GL_BLEND_EQUATION
+#define GL_BLEND_EQUATION_ALPHA_EXT       0x883D
+#endif
+
+#ifndef GL_MESA_pack_invert
+#define GL_PACK_INVERT_MESA               0x8758
+#endif
+
+#ifndef GL_MESA_ycbcr_texture
+#define GL_UNSIGNED_SHORT_8_8_MESA        0x85BA
+#define GL_UNSIGNED_SHORT_8_8_REV_MESA    0x85BB
+#define GL_YCBCR_MESA                     0x8757
+#endif
+
+#ifndef GL_EXT_pixel_buffer_object
+#define GL_PIXEL_PACK_BUFFER_EXT          0x88EB
+#define GL_PIXEL_UNPACK_BUFFER_EXT        0x88EC
+#define GL_PIXEL_PACK_BUFFER_BINDING_EXT  0x88ED
+#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
+#endif
+
+#ifndef GL_NV_fragment_program_option
+#endif
+
+#ifndef GL_NV_fragment_program2
+#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
+#define GL_MAX_PROGRAM_CALL_DEPTH_NV      0x88F5
+#define GL_MAX_PROGRAM_IF_DEPTH_NV        0x88F6
+#define GL_MAX_PROGRAM_LOOP_DEPTH_NV      0x88F7
+#define GL_MAX_PROGRAM_LOOP_COUNT_NV      0x88F8
+#endif
+
+#ifndef GL_NV_vertex_program2_option
+/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
+/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */
+#endif
+
+#ifndef GL_NV_vertex_program3
+/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
+#endif
+
+#ifndef GL_EXT_framebuffer_object
+#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
+#define GL_MAX_RENDERBUFFER_SIZE_EXT      0x84E8
+#define GL_FRAMEBUFFER_BINDING_EXT        0x8CA6
+#define GL_RENDERBUFFER_BINDING_EXT       0x8CA7
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
+#define GL_FRAMEBUFFER_COMPLETE_EXT       0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
+#define GL_FRAMEBUFFER_UNSUPPORTED_EXT    0x8CDD
+#define GL_MAX_COLOR_ATTACHMENTS_EXT      0x8CDF
+#define GL_COLOR_ATTACHMENT0_EXT          0x8CE0
+#define GL_COLOR_ATTACHMENT1_EXT          0x8CE1
+#define GL_COLOR_ATTACHMENT2_EXT          0x8CE2
+#define GL_COLOR_ATTACHMENT3_EXT          0x8CE3
+#define GL_COLOR_ATTACHMENT4_EXT          0x8CE4
+#define GL_COLOR_ATTACHMENT5_EXT          0x8CE5
+#define GL_COLOR_ATTACHMENT6_EXT          0x8CE6
+#define GL_COLOR_ATTACHMENT7_EXT          0x8CE7
+#define GL_COLOR_ATTACHMENT8_EXT          0x8CE8
+#define GL_COLOR_ATTACHMENT9_EXT          0x8CE9
+#define GL_COLOR_ATTACHMENT10_EXT         0x8CEA
+#define GL_COLOR_ATTACHMENT11_EXT         0x8CEB
+#define GL_COLOR_ATTACHMENT12_EXT         0x8CEC
+#define GL_COLOR_ATTACHMENT13_EXT         0x8CED
+#define GL_COLOR_ATTACHMENT14_EXT         0x8CEE
+#define GL_COLOR_ATTACHMENT15_EXT         0x8CEF
+#define GL_DEPTH_ATTACHMENT_EXT           0x8D00
+#define GL_STENCIL_ATTACHMENT_EXT         0x8D20
+#define GL_FRAMEBUFFER_EXT                0x8D40
+#define GL_RENDERBUFFER_EXT               0x8D41
+#define GL_RENDERBUFFER_WIDTH_EXT         0x8D42
+#define GL_RENDERBUFFER_HEIGHT_EXT        0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
+#define GL_STENCIL_INDEX1_EXT             0x8D46
+#define GL_STENCIL_INDEX4_EXT             0x8D47
+#define GL_STENCIL_INDEX8_EXT             0x8D48
+#define GL_STENCIL_INDEX16_EXT            0x8D49
+#define GL_RENDERBUFFER_RED_SIZE_EXT      0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE_EXT    0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE_EXT     0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE_EXT    0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE_EXT    0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE_EXT  0x8D55
+#endif
+
+#ifndef GL_GREMEDY_string_marker
+#endif
+
+#ifndef GL_EXT_packed_depth_stencil
+#define GL_DEPTH_STENCIL_EXT              0x84F9
+#define GL_UNSIGNED_INT_24_8_EXT          0x84FA
+#define GL_DEPTH24_STENCIL8_EXT           0x88F0
+#define GL_TEXTURE_STENCIL_SIZE_EXT       0x88F1
+#endif
+
+#ifndef GL_EXT_stencil_clear_tag
+#define GL_STENCIL_TAG_BITS_EXT           0x88F2
+#define GL_STENCIL_CLEAR_TAG_VALUE_EXT    0x88F3
+#endif
+
+#ifndef GL_EXT_texture_sRGB
+#define GL_SRGB_EXT                       0x8C40
+#define GL_SRGB8_EXT                      0x8C41
+#define GL_SRGB_ALPHA_EXT                 0x8C42
+#define GL_SRGB8_ALPHA8_EXT               0x8C43
+#define GL_SLUMINANCE_ALPHA_EXT           0x8C44
+#define GL_SLUMINANCE8_ALPHA8_EXT         0x8C45
+#define GL_SLUMINANCE_EXT                 0x8C46
+#define GL_SLUMINANCE8_EXT                0x8C47
+#define GL_COMPRESSED_SRGB_EXT            0x8C48
+#define GL_COMPRESSED_SRGB_ALPHA_EXT      0x8C49
+#define GL_COMPRESSED_SLUMINANCE_EXT      0x8C4A
+#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
+#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT  0x8C4C
+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
+#endif
+
+#ifndef GL_EXT_framebuffer_blit
+#define GL_READ_FRAMEBUFFER_EXT           0x8CA8
+#define GL_DRAW_FRAMEBUFFER_EXT           0x8CA9
+#define GL_READ_FRAMEBUFFER_BINDING_EXT   GL_FRAMEBUFFER_BINDING_EXT
+#define GL_DRAW_FRAMEBUFFER_BINDING_EXT   0x8CAA
+#endif
+
+#ifndef GL_EXT_framebuffer_multisample
+#define GL_RENDERBUFFER_SAMPLES_EXT       0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
+#define GL_MAX_SAMPLES_EXT                0x8D57
+#endif
+
+#ifndef GL_MESAX_texture_stack
+#define GL_TEXTURE_1D_STACK_MESAX         0x8759
+#define GL_TEXTURE_2D_STACK_MESAX         0x875A
+#define GL_PROXY_TEXTURE_1D_STACK_MESAX   0x875B
+#define GL_PROXY_TEXTURE_2D_STACK_MESAX   0x875C
+#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
+#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
+#endif
+
+#ifndef GL_EXT_timer_query
+#define GL_TIME_ELAPSED_EXT               0x88BF
+#endif
+
+#ifndef GL_EXT_gpu_program_parameters
+#endif
+
+#ifndef GL_APPLE_flush_buffer_range
+#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
+#define GL_BUFFER_FLUSHING_UNMAP_APPLE    0x8A13
+#endif
+
+#ifndef GL_NV_gpu_program4
+#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV    0x8904
+#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV    0x8905
+#define GL_PROGRAM_ATTRIB_COMPONENTS_NV   0x8906
+#define GL_PROGRAM_RESULT_COMPONENTS_NV   0x8907
+#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
+#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
+#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
+#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
+#endif
+
+#ifndef GL_NV_geometry_program4
+#define GL_LINES_ADJACENCY_EXT            0x000A
+#define GL_LINE_STRIP_ADJACENCY_EXT       0x000B
+#define GL_TRIANGLES_ADJACENCY_EXT        0x000C
+#define GL_TRIANGLE_STRIP_ADJACENCY_EXT   0x000D
+#define GL_GEOMETRY_PROGRAM_NV            0x8C26
+#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
+#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
+#define GL_GEOMETRY_VERTICES_OUT_EXT      0x8DDA
+#define GL_GEOMETRY_INPUT_TYPE_EXT        0x8DDB
+#define GL_GEOMETRY_OUTPUT_TYPE_EXT       0x8DDC
+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
+#define GL_PROGRAM_POINT_SIZE_EXT         0x8642
+#endif
+
+#ifndef GL_EXT_geometry_shader4
+#define GL_GEOMETRY_SHADER_EXT            0x8DD9
+/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */
+/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */
+/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */
+/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */
+#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
+#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
+#define GL_MAX_VARYING_COMPONENTS_EXT     0x8B4B
+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
+/* reuse GL_LINES_ADJACENCY_EXT */
+/* reuse GL_LINE_STRIP_ADJACENCY_EXT */
+/* reuse GL_TRIANGLES_ADJACENCY_EXT */
+/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */
+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */
+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
+/* reuse GL_PROGRAM_POINT_SIZE_EXT */
+#endif
+
+#ifndef GL_NV_vertex_program4
+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
+#endif
+
+#ifndef GL_EXT_gpu_shader4
+#define GL_SAMPLER_1D_ARRAY_EXT           0x8DC0
+#define GL_SAMPLER_2D_ARRAY_EXT           0x8DC1
+#define GL_SAMPLER_BUFFER_EXT             0x8DC2
+#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT    0x8DC3
+#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT    0x8DC4
+#define GL_SAMPLER_CUBE_SHADOW_EXT        0x8DC5
+#define GL_UNSIGNED_INT_VEC2_EXT          0x8DC6
+#define GL_UNSIGNED_INT_VEC3_EXT          0x8DC7
+#define GL_UNSIGNED_INT_VEC4_EXT          0x8DC8
+#define GL_INT_SAMPLER_1D_EXT             0x8DC9
+#define GL_INT_SAMPLER_2D_EXT             0x8DCA
+#define GL_INT_SAMPLER_3D_EXT             0x8DCB
+#define GL_INT_SAMPLER_CUBE_EXT           0x8DCC
+#define GL_INT_SAMPLER_2D_RECT_EXT        0x8DCD
+#define GL_INT_SAMPLER_1D_ARRAY_EXT       0x8DCE
+#define GL_INT_SAMPLER_2D_ARRAY_EXT       0x8DCF
+#define GL_INT_SAMPLER_BUFFER_EXT         0x8DD0
+#define GL_UNSIGNED_INT_SAMPLER_1D_EXT    0x8DD1
+#define GL_UNSIGNED_INT_SAMPLER_2D_EXT    0x8DD2
+#define GL_UNSIGNED_INT_SAMPLER_3D_EXT    0x8DD3
+#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT  0x8DD4
+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
+#endif
+
+#ifndef GL_EXT_draw_instanced
+#endif
+
+#ifndef GL_EXT_packed_float
+#define GL_R11F_G11F_B10F_EXT             0x8C3A
+#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
+#define GL_RGBA_SIGNED_COMPONENTS_EXT     0x8C3C
+#endif
+
+#ifndef GL_EXT_texture_array
+#define GL_TEXTURE_1D_ARRAY_EXT           0x8C18
+#define GL_PROXY_TEXTURE_1D_ARRAY_EXT     0x8C19
+#define GL_TEXTURE_2D_ARRAY_EXT           0x8C1A
+#define GL_PROXY_TEXTURE_2D_ARRAY_EXT     0x8C1B
+#define GL_TEXTURE_BINDING_1D_ARRAY_EXT   0x8C1C
+#define GL_TEXTURE_BINDING_2D_ARRAY_EXT   0x8C1D
+#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT   0x88FF
+#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
+#endif
+
+#ifndef GL_EXT_texture_buffer_object
+#define GL_TEXTURE_BUFFER_EXT             0x8C2A
+#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT    0x8C2B
+#define GL_TEXTURE_BINDING_BUFFER_EXT     0x8C2C
+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
+#define GL_TEXTURE_BUFFER_FORMAT_EXT      0x8C2E
+#endif
+
+#ifndef GL_EXT_texture_compression_latc
+#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
+#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
+#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
+#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
+#endif
+
+#ifndef GL_EXT_texture_compression_rgtc
+#define GL_COMPRESSED_RED_RGTC1_EXT       0x8DBB
+#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
+#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
+#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
+#endif
+
+#ifndef GL_EXT_texture_shared_exponent
+#define GL_RGB9_E5_EXT                    0x8C3D
+#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT   0x8C3E
+#define GL_TEXTURE_SHARED_SIZE_EXT        0x8C3F
+#endif
+
+#ifndef GL_NV_depth_buffer_float
+#define GL_DEPTH_COMPONENT32F_NV          0x8DAB
+#define GL_DEPTH32F_STENCIL8_NV           0x8DAC
+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
+#define GL_DEPTH_BUFFER_FLOAT_MODE_NV     0x8DAF
+#endif
+
+#ifndef GL_NV_fragment_program4
+#endif
+
+#ifndef GL_NV_framebuffer_multisample_coverage
+#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
+#define GL_RENDERBUFFER_COLOR_SAMPLES_NV  0x8E10
+#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
+#define GL_MULTISAMPLE_COVERAGE_MODES_NV  0x8E12
+#endif
+
+#ifndef GL_EXT_framebuffer_sRGB
+#define GL_FRAMEBUFFER_SRGB_EXT           0x8DB9
+#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT   0x8DBA
+#endif
+
+#ifndef GL_NV_geometry_shader4
+#endif
+
+#ifndef GL_NV_parameter_buffer_object
+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
+#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
+#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
+#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
+#endif
+
+#ifndef GL_EXT_draw_buffers2
+#endif
+
+#ifndef GL_NV_transform_feedback
+#define GL_BACK_PRIMARY_COLOR_NV          0x8C77
+#define GL_BACK_SECONDARY_COLOR_NV        0x8C78
+#define GL_TEXTURE_COORD_NV               0x8C79
+#define GL_CLIP_DISTANCE_NV               0x8C7A
+#define GL_VERTEX_ID_NV                   0x8C7B
+#define GL_PRIMITIVE_ID_NV                0x8C7C
+#define GL_GENERIC_ATTRIB_NV              0x8C7D
+#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV  0x8C7E
+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
+#define GL_ACTIVE_VARYINGS_NV             0x8C81
+#define GL_ACTIVE_VARYING_MAX_LENGTH_NV   0x8C82
+#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
+#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
+#define GL_TRANSFORM_FEEDBACK_RECORD_NV   0x8C86
+#define GL_PRIMITIVES_GENERATED_NV        0x8C87
+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
+#define GL_RASTERIZER_DISCARD_NV          0x8C89
+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
+#define GL_INTERLEAVED_ATTRIBS_NV         0x8C8C
+#define GL_SEPARATE_ATTRIBS_NV            0x8C8D
+#define GL_TRANSFORM_FEEDBACK_BUFFER_NV   0x8C8E
+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
+#endif
+
+#ifndef GL_EXT_bindable_uniform
+#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
+#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
+#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
+#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT  0x8DED
+#define GL_UNIFORM_BUFFER_EXT             0x8DEE
+#define GL_UNIFORM_BUFFER_BINDING_EXT     0x8DEF
+#endif
+
+#ifndef GL_EXT_texture_integer
+#define GL_RGBA32UI_EXT                   0x8D70
+#define GL_RGB32UI_EXT                    0x8D71
+#define GL_ALPHA32UI_EXT                  0x8D72
+#define GL_INTENSITY32UI_EXT              0x8D73
+#define GL_LUMINANCE32UI_EXT              0x8D74
+#define GL_LUMINANCE_ALPHA32UI_EXT        0x8D75
+#define GL_RGBA16UI_EXT                   0x8D76
+#define GL_RGB16UI_EXT                    0x8D77
+#define GL_ALPHA16UI_EXT                  0x8D78
+#define GL_INTENSITY16UI_EXT              0x8D79
+#define GL_LUMINANCE16UI_EXT              0x8D7A
+#define GL_LUMINANCE_ALPHA16UI_EXT        0x8D7B
+#define GL_RGBA8UI_EXT                    0x8D7C
+#define GL_RGB8UI_EXT                     0x8D7D
+#define GL_ALPHA8UI_EXT                   0x8D7E
+#define GL_INTENSITY8UI_EXT               0x8D7F
+#define GL_LUMINANCE8UI_EXT               0x8D80
+#define GL_LUMINANCE_ALPHA8UI_EXT         0x8D81
+#define GL_RGBA32I_EXT                    0x8D82
+#define GL_RGB32I_EXT                     0x8D83
+#define GL_ALPHA32I_EXT                   0x8D84
+#define GL_INTENSITY32I_EXT               0x8D85
+#define GL_LUMINANCE32I_EXT               0x8D86
+#define GL_LUMINANCE_ALPHA32I_EXT         0x8D87
+#define GL_RGBA16I_EXT                    0x8D88
+#define GL_RGB16I_EXT                     0x8D89
+#define GL_ALPHA16I_EXT                   0x8D8A
+#define GL_INTENSITY16I_EXT               0x8D8B
+#define GL_LUMINANCE16I_EXT               0x8D8C
+#define GL_LUMINANCE_ALPHA16I_EXT         0x8D8D
+#define GL_RGBA8I_EXT                     0x8D8E
+#define GL_RGB8I_EXT                      0x8D8F
+#define GL_ALPHA8I_EXT                    0x8D90
+#define GL_INTENSITY8I_EXT                0x8D91
+#define GL_LUMINANCE8I_EXT                0x8D92
+#define GL_LUMINANCE_ALPHA8I_EXT          0x8D93
+#define GL_RED_INTEGER_EXT                0x8D94
+#define GL_GREEN_INTEGER_EXT              0x8D95
+#define GL_BLUE_INTEGER_EXT               0x8D96
+#define GL_ALPHA_INTEGER_EXT              0x8D97
+#define GL_RGB_INTEGER_EXT                0x8D98
+#define GL_RGBA_INTEGER_EXT               0x8D99
+#define GL_BGR_INTEGER_EXT                0x8D9A
+#define GL_BGRA_INTEGER_EXT               0x8D9B
+#define GL_LUMINANCE_INTEGER_EXT          0x8D9C
+#define GL_LUMINANCE_ALPHA_INTEGER_EXT    0x8D9D
+#define GL_RGBA_INTEGER_MODE_EXT          0x8D9E
+#endif
+
+
+/*************************************************************/
+
+#include <stddef.h>
+#ifndef GL_VERSION_2_0
+/* GL type for program/shader text */
+typedef char GLchar;			/* native character */
+#endif
+
+#ifndef GL_VERSION_1_5
+/* GL types for handling large vertex buffer objects */
+typedef ptrdiff_t GLintptr;
+typedef ptrdiff_t GLsizeiptr;
+#endif
+
+#ifndef GL_ARB_vertex_buffer_object
+/* GL types for handling large vertex buffer objects */
+typedef ptrdiff_t GLintptrARB;
+typedef ptrdiff_t GLsizeiptrARB;
+#endif
+
+#ifndef GL_ARB_shader_objects
+/* GL types for handling shader object handles and program/shader text */
+typedef char GLcharARB;		/* native character */
+typedef unsigned int GLhandleARB;	/* shader object handle */
+#endif
+
+/* GL types for "half" precision (s10e5) float data in host memory */
+#ifndef GL_ARB_half_float_pixel
+typedef unsigned short GLhalfARB;
+#endif
+
+#ifndef GL_NV_half_float
+typedef unsigned short GLhalfNV;
+#endif
+
+#ifndef GLEXT_64_TYPES_DEFINED
+/* This code block is duplicated in glext.h, so must be protected */
+#define GLEXT_64_TYPES_DEFINED
+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
+/* (as used in the GL_EXT_timer_query extension). */
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#include <inttypes.h>
+#elif defined(__sun__)
+#include <inttypes.h>
+#if defined(__STDC__)
+#if defined(__arch64__)
+typedef long int int64_t;
+typedef unsigned long int uint64_t;
+#else
+typedef long long int int64_t;
+typedef unsigned long long int uint64_t;
+#endif /* __arch64__ */
+#endif /* __STDC__ */
+#elif defined( __VMS )
+#include <inttypes.h>
+#elif defined(__SCO__) || defined(__USLC__)
+#include <stdint.h>
+#elif defined(__UNIXOS2__) || defined(__SOL64__)
+typedef long int int32_t;
+typedef long long int int64_t;
+typedef unsigned long long int uint64_t;
+#elif defined(_WIN32) && defined(__GNUC__)
+#include <stdint.h>
+#elif defined(_WIN32)
+typedef __int32 int32_t;
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#else
+#include <inttypes.h>     /* Fallback option */
+#endif
+#endif
+
+#ifndef GL_EXT_timer_query
+typedef int64_t GLint64EXT;
+typedef uint64_t GLuint64EXT;
+#endif
+
+#ifndef GL_VERSION_1_2
+#define GL_VERSION_1_2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf);
+GLAPI void APIENTRY glBlendEquation (GLenum);
+GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
+GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei);
+GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei);
+GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat);
+GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint);
+GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei);
+GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
+GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
+GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
+GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean);
+GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean);
+GLAPI void APIENTRY glResetHistogram (GLenum);
+GLAPI void APIENTRY glResetMinmax (GLenum);
+GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+#endif
+
+#ifndef GL_VERSION_1_3
+#define GL_VERSION_1_3 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glActiveTexture (GLenum);
+GLAPI void APIENTRY glClientActiveTexture (GLenum);
+GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble);
+GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *);
+GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat);
+GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *);
+GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint);
+GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *);
+GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort);
+GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *);
+GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble);
+GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *);
+GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat);
+GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *);
+GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint);
+GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *);
+GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort);
+GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *);
+GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *);
+GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *);
+GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint);
+GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *);
+GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *);
+GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *);
+GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *);
+GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *);
+GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *);
+GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *);
+GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *);
+GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *);
+GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *);
+GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean);
+GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
+#endif
+
+#ifndef GL_VERSION_1_4
+#define GL_VERSION_1_4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum);
+GLAPI void APIENTRY glFogCoordf (GLfloat);
+GLAPI void APIENTRY glFogCoordfv (const GLfloat *);
+GLAPI void APIENTRY glFogCoordd (GLdouble);
+GLAPI void APIENTRY glFogCoorddv (const GLdouble *);
+GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei);
+GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
+GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat);
+GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *);
+GLAPI void APIENTRY glPointParameteri (GLenum, GLint);
+GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *);
+GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte);
+GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *);
+GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *);
+GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *);
+GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint);
+GLAPI void APIENTRY glSecondaryColor3iv (const GLint *);
+GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *);
+GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte);
+GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *);
+GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *);
+GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort);
+GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *);
+GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble);
+GLAPI void APIENTRY glWindowPos2dv (const GLdouble *);
+GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat);
+GLAPI void APIENTRY glWindowPos2fv (const GLfloat *);
+GLAPI void APIENTRY glWindowPos2i (GLint, GLint);
+GLAPI void APIENTRY glWindowPos2iv (const GLint *);
+GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort);
+GLAPI void APIENTRY glWindowPos2sv (const GLshort *);
+GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glWindowPos3dv (const GLdouble *);
+GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glWindowPos3fv (const GLfloat *);
+GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint);
+GLAPI void APIENTRY glWindowPos3iv (const GLint *);
+GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glWindowPos3sv (const GLshort *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
+typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
+typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
+typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
+#endif
+
+#ifndef GL_VERSION_1_5
+#define GL_VERSION_1_5 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *);
+GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *);
+GLAPI GLboolean APIENTRY glIsQuery (GLuint);
+GLAPI void APIENTRY glBeginQuery (GLenum, GLuint);
+GLAPI void APIENTRY glEndQuery (GLenum);
+GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *);
+GLAPI void APIENTRY glBindBuffer (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *);
+GLAPI GLboolean APIENTRY glIsBuffer (GLuint);
+GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum);
+GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *);
+GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *);
+GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum);
+GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum);
+GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
+typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
+typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
+typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
+typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
+typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
+typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
+typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
+typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
+#endif
+
+#ifndef GL_VERSION_2_0
+#define GL_VERSION_2_0 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum);
+GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *);
+GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum);
+GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint);
+GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint);
+GLAPI void APIENTRY glAttachShader (GLuint, GLuint);
+GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *);
+GLAPI void APIENTRY glCompileShader (GLuint);
+GLAPI GLuint APIENTRY glCreateProgram (void);
+GLAPI GLuint APIENTRY glCreateShader (GLenum);
+GLAPI void APIENTRY glDeleteProgram (GLuint);
+GLAPI void APIENTRY glDeleteShader (GLuint);
+GLAPI void APIENTRY glDetachShader (GLuint, GLuint);
+GLAPI void APIENTRY glDisableVertexAttribArray (GLuint);
+GLAPI void APIENTRY glEnableVertexAttribArray (GLuint);
+GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
+GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
+GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *);
+GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *);
+GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
+GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
+GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *);
+GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *);
+GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *);
+GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *);
+GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *);
+GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *);
+GLAPI GLboolean APIENTRY glIsProgram (GLuint);
+GLAPI GLboolean APIENTRY glIsShader (GLuint);
+GLAPI void APIENTRY glLinkProgram (GLuint);
+GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *);
+GLAPI void APIENTRY glUseProgram (GLuint);
+GLAPI void APIENTRY glUniform1f (GLint, GLfloat);
+GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform1i (GLint, GLint);
+GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glValidateProgram (GLuint);
+GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble);
+GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat);
+GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort);
+GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *);
+GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *);
+GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
+GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *);
+GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *);
+GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *);
+GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *);
+GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *);
+GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *);
+GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
+typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
+typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
+typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
+typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
+typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
+typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
+typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
+typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
+typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
+typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
+typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
+typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
+typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_VERSION_2_1
+#define GL_VERSION_2_1 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glUniformMatrix2x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix3x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix2x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix4x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix3x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix4x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+#endif
+
+#ifndef GL_ARB_multitexture
+#define GL_ARB_multitexture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glActiveTextureARB (GLenum);
+GLAPI void APIENTRY glClientActiveTextureARB (GLenum);
+GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
+GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
+GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
+GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
+GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
+GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
+GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
+GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
+GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
+GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
+GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
+GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
+GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
+GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
+GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
+GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
+GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
+GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
+GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
+GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
+GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
+GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
+GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
+GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
+GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
+#endif
+
+#ifndef GL_ARB_transpose_matrix
+#define GL_ARB_transpose_matrix 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *);
+GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *);
+GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *);
+GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
+#endif
+
+#ifndef GL_ARB_multisample
+#define GL_ARB_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
+#endif
+
+#ifndef GL_ARB_texture_env_add
+#define GL_ARB_texture_env_add 1
+#endif
+
+#ifndef GL_ARB_texture_cube_map
+#define GL_ARB_texture_cube_map 1
+#endif
+
+#ifndef GL_ARB_texture_compression
+#define GL_ARB_texture_compression 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img);
+#endif
+
+#ifndef GL_ARB_texture_border_clamp
+#define GL_ARB_texture_border_clamp 1
+#endif
+
+#ifndef GL_ARB_point_parameters
+#define GL_ARB_point_parameters 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat);
+GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
+#endif
+
+#ifndef GL_ARB_vertex_blend
+#define GL_ARB_vertex_blend 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *);
+GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *);
+GLAPI void APIENTRY glWeightivARB (GLint, const GLint *);
+GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *);
+GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *);
+GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *);
+GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *);
+GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *);
+GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glVertexBlendARB (GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
+typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
+typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
+typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
+typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
+typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
+typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
+typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
+typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
+#endif
+
+#ifndef GL_ARB_matrix_palette
+#define GL_ARB_matrix_palette 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint);
+GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *);
+GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *);
+GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *);
+GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
+typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
+typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
+typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
+typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_ARB_texture_env_combine
+#define GL_ARB_texture_env_combine 1
+#endif
+
+#ifndef GL_ARB_texture_env_crossbar
+#define GL_ARB_texture_env_crossbar 1
+#endif
+
+#ifndef GL_ARB_texture_env_dot3
+#define GL_ARB_texture_env_dot3 1
+#endif
+
+#ifndef GL_ARB_texture_mirrored_repeat
+#define GL_ARB_texture_mirrored_repeat 1
+#endif
+
+#ifndef GL_ARB_depth_texture
+#define GL_ARB_depth_texture 1
+#endif
+
+#ifndef GL_ARB_shadow
+#define GL_ARB_shadow 1
+#endif
+
+#ifndef GL_ARB_shadow_ambient
+#define GL_ARB_shadow_ambient 1
+#endif
+
+#ifndef GL_ARB_window_pos
+#define GL_ARB_window_pos 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble);
+GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *);
+GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat);
+GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *);
+GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint);
+GLAPI void APIENTRY glWindowPos2ivARB (const GLint *);
+GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort);
+GLAPI void APIENTRY glWindowPos2svARB (const GLshort *);
+GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *);
+GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *);
+GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint);
+GLAPI void APIENTRY glWindowPos3ivARB (const GLint *);
+GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glWindowPos3svARB (const GLshort *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
+#endif
+
+#ifndef GL_ARB_vertex_program
+#define GL_ARB_vertex_program 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble);
+GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat);
+GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort);
+GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *);
+GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *);
+GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
+GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *);
+GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *);
+GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *);
+GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *);
+GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *);
+GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *);
+GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint);
+GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint);
+GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *);
+GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *);
+GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *);
+GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *);
+GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *);
+GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *);
+GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *);
+GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *);
+GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *);
+GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *);
+GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *);
+GLAPI GLboolean APIENTRY glIsProgramARB (GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
+typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
+typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
+typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
+typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
+#endif
+
+#ifndef GL_ARB_fragment_program
+#define GL_ARB_fragment_program 1
+/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
+#endif
+
+#ifndef GL_ARB_vertex_buffer_object
+#define GL_ARB_vertex_buffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *);
+GLAPI GLboolean APIENTRY glIsBufferARB (GLuint);
+GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
+GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
+GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
+GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum);
+GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum);
+GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
+typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
+typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
+typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
+typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params);
+#endif
+
+#ifndef GL_ARB_occlusion_query
+#define GL_ARB_occlusion_query 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *);
+GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *);
+GLAPI GLboolean APIENTRY glIsQueryARB (GLuint);
+GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint);
+GLAPI void APIENTRY glEndQueryARB (GLenum);
+GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
+typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
+typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
+typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
+#endif
+
+#ifndef GL_ARB_shader_objects
+#define GL_ARB_shader_objects 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB);
+GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum);
+GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB);
+GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum);
+GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
+GLAPI void APIENTRY glCompileShaderARB (GLhandleARB);
+GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
+GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB);
+GLAPI void APIENTRY glLinkProgramARB (GLhandleARB);
+GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB);
+GLAPI void APIENTRY glValidateProgramARB (GLhandleARB);
+GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat);
+GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform1iARB (GLint, GLint);
+GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *);
+GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
+GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
+GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *);
+GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
+GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *);
+GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *);
+GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
+typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
+typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
+typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
+typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
+typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
+typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
+typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
+typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
+typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
+typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
+typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
+typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
+typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
+typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
+typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
+typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
+#endif
+
+#ifndef GL_ARB_vertex_shader
+#define GL_ARB_vertex_shader 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *);
+GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
+GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
+#endif
+
+#ifndef GL_ARB_fragment_shader
+#define GL_ARB_fragment_shader 1
+#endif
+
+#ifndef GL_ARB_shading_language_100
+#define GL_ARB_shading_language_100 1
+#endif
+
+#ifndef GL_ARB_texture_non_power_of_two
+#define GL_ARB_texture_non_power_of_two 1
+#endif
+
+#ifndef GL_ARB_point_sprite
+#define GL_ARB_point_sprite 1
+#endif
+
+#ifndef GL_ARB_fragment_program_shadow
+#define GL_ARB_fragment_program_shadow 1
+#endif
+
+#ifndef GL_ARB_draw_buffers
+#define GL_ARB_draw_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
+#endif
+
+#ifndef GL_ARB_texture_rectangle
+#define GL_ARB_texture_rectangle 1
+#endif
+
+#ifndef GL_ARB_color_buffer_float
+#define GL_ARB_color_buffer_float 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glClampColorARB (GLenum, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
+#endif
+
+#ifndef GL_ARB_half_float_pixel
+#define GL_ARB_half_float_pixel 1
+#endif
+
+#ifndef GL_ARB_texture_float
+#define GL_ARB_texture_float 1
+#endif
+
+#ifndef GL_ARB_pixel_buffer_object
+#define GL_ARB_pixel_buffer_object 1
+#endif
+
+#ifndef GL_EXT_abgr
+#define GL_EXT_abgr 1
+#endif
+
+#ifndef GL_EXT_blend_color
+#define GL_EXT_blend_color 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+#endif
+
+#ifndef GL_EXT_polygon_offset
+#define GL_EXT_polygon_offset 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
+#endif
+
+#ifndef GL_EXT_texture
+#define GL_EXT_texture 1
+#endif
+
+#ifndef GL_EXT_texture3D
+#define GL_EXT_texture3D 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+#endif
+
+#ifndef GL_SGIS_texture_filter4
+#define GL_SGIS_texture_filter4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
+typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
+#endif
+
+#ifndef GL_EXT_subtexture
+#define GL_EXT_subtexture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+#endif
+
+#ifndef GL_EXT_copy_texture
+#define GL_EXT_copy_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
+GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
+GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei);
+GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
+GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+#endif
+
+#ifndef GL_EXT_histogram
+#define GL_EXT_histogram 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean);
+GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean);
+GLAPI void APIENTRY glResetHistogramEXT (GLenum);
+GLAPI void APIENTRY glResetMinmaxEXT (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
+typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
+#endif
+
+#ifndef GL_EXT_convolution
+#define GL_EXT_convolution 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat);
+GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint);
+GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei);
+GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
+GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
+GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
+#endif
+
+#ifndef GL_SGI_color_matrix
+#define GL_SGI_color_matrix 1
+#endif
+
+#ifndef GL_SGI_color_table
+#define GL_SGI_color_table 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei);
+GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_SGIX_pixel_texture
+#define GL_SGIX_pixel_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPixelTexGenSGIX (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
+#endif
+
+#ifndef GL_SGIS_pixel_texture
+#define GL_SGIS_pixel_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint);
+GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *);
+GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat);
+GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *);
+GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *);
+GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
+#endif
+
+#ifndef GL_SGIS_texture4D
+#define GL_SGIS_texture4D 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels);
+#endif
+
+#ifndef GL_SGI_texture_color_table
+#define GL_SGI_texture_color_table 1
+#endif
+
+#ifndef GL_EXT_cmyka
+#define GL_EXT_cmyka 1
+#endif
+
+#ifndef GL_EXT_texture_object
+#define GL_EXT_texture_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *);
+GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *);
+GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint);
+GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
+typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
+typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
+typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
+typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
+typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
+#endif
+
+#ifndef GL_SGIS_detail_texture
+#define GL_SGIS_detail_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
+typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
+#endif
+
+#ifndef GL_SGIS_sharpen_texture
+#define GL_SGIS_sharpen_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
+typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
+#endif
+
+#ifndef GL_EXT_packed_pixels
+#define GL_EXT_packed_pixels 1
+#endif
+
+#ifndef GL_SGIS_texture_lod
+#define GL_SGIS_texture_lod 1
+#endif
+
+#ifndef GL_SGIS_multisample
+#define GL_SGIS_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean);
+GLAPI void APIENTRY glSamplePatternSGIS (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
+typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
+#endif
+
+#ifndef GL_EXT_rescale_normal
+#define GL_EXT_rescale_normal 1
+#endif
+
+#ifndef GL_EXT_vertex_array
+#define GL_EXT_vertex_array 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glArrayElementEXT (GLint);
+GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei);
+GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *);
+GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *);
+GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
+typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
+typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
+typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+#endif
+
+#ifndef GL_EXT_misc_attribute
+#define GL_EXT_misc_attribute 1
+#endif
+
+#ifndef GL_SGIS_generate_mipmap
+#define GL_SGIS_generate_mipmap 1
+#endif
+
+#ifndef GL_SGIX_clipmap
+#define GL_SGIX_clipmap 1
+#endif
+
+#ifndef GL_SGIX_shadow
+#define GL_SGIX_shadow 1
+#endif
+
+#ifndef GL_SGIS_texture_edge_clamp
+#define GL_SGIS_texture_edge_clamp 1
+#endif
+
+#ifndef GL_SGIS_texture_border_clamp
+#define GL_SGIS_texture_border_clamp 1
+#endif
+
+#ifndef GL_EXT_blend_minmax
+#define GL_EXT_blend_minmax 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendEquationEXT (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
+#endif
+
+#ifndef GL_EXT_blend_subtract
+#define GL_EXT_blend_subtract 1
+#endif
+
+#ifndef GL_EXT_blend_logic_op
+#define GL_EXT_blend_logic_op 1
+#endif
+
+#ifndef GL_SGIX_interlace
+#define GL_SGIX_interlace 1
+#endif
+
+#ifndef GL_SGIX_pixel_tiles
+#define GL_SGIX_pixel_tiles 1
+#endif
+
+#ifndef GL_SGIX_texture_select
+#define GL_SGIX_texture_select 1
+#endif
+
+#ifndef GL_SGIX_sprite
+#define GL_SGIX_sprite 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat);
+GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *);
+GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint);
+GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
+#endif
+
+#ifndef GL_SGIX_texture_multi_buffer
+#define GL_SGIX_texture_multi_buffer 1
+#endif
+
+#ifndef GL_EXT_point_parameters
+#define GL_EXT_point_parameters 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat);
+GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *);
+/* ERO Begin */
+GLAPI void APIENTRY glPointParameteriEXT (GLenum, GLint);
+GLAPI void APIENTRY glPointParameterivEXT (GLenum, const GLint *);
+/* ERO end */
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
+#endif
+
+#ifndef GL_SGIS_point_parameters
+#define GL_SGIS_point_parameters 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat);
+GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
+#endif
+
+#ifndef GL_SGIX_instruments
+#define GL_SGIX_instruments 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
+GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *);
+GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *);
+GLAPI void APIENTRY glReadInstrumentsSGIX (GLint);
+GLAPI void APIENTRY glStartInstrumentsSGIX (void);
+GLAPI void APIENTRY glStopInstrumentsSGIX (GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
+typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
+typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
+typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
+typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
+typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
+#endif
+
+#ifndef GL_SGIX_texture_scale_bias
+#define GL_SGIX_texture_scale_bias 1
+#endif
+
+#ifndef GL_SGIX_framezoom
+#define GL_SGIX_framezoom 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFrameZoomSGIX (GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
+#endif
+
+#ifndef GL_SGIX_tag_sample_buffer
+#define GL_SGIX_tag_sample_buffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTagSampleBufferSGIX (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
+#endif
+
+#ifndef GL_SGIX_polynomial_ffd
+#define GL_SGIX_polynomial_ffd 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
+GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
+GLAPI void APIENTRY glDeformSGIX (GLbitfield);
+GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
+typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
+typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
+typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
+#endif
+
+#ifndef GL_SGIX_reference_plane
+#define GL_SGIX_reference_plane 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
+#endif
+
+#ifndef GL_SGIX_flush_raster
+#define GL_SGIX_flush_raster 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFlushRasterSGIX (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
+#endif
+
+#ifndef GL_SGIX_depth_texture
+#define GL_SGIX_depth_texture 1
+#endif
+
+#ifndef GL_SGIS_fog_function
+#define GL_SGIS_fog_function 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *);
+GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
+typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
+#endif
+
+#ifndef GL_SGIX_fog_offset
+#define GL_SGIX_fog_offset 1
+#endif
+
+#ifndef GL_HP_image_transform
+#define GL_HP_image_transform 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint);
+GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat);
+GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
+#endif
+
+#ifndef GL_HP_convolution_border_modes
+#define GL_HP_convolution_border_modes 1
+#endif
+
+#ifndef GL_SGIX_texture_add_env
+#define GL_SGIX_texture_add_env 1
+#endif
+
+#ifndef GL_EXT_color_subtable
+#define GL_EXT_color_subtable 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+#endif
+
+#ifndef GL_PGI_vertex_hints
+#define GL_PGI_vertex_hints 1
+#endif
+
+#ifndef GL_PGI_misc_hints
+#define GL_PGI_misc_hints 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glHintPGI (GLenum, GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
+#endif
+
+#ifndef GL_EXT_paletted_texture
+#define GL_EXT_paletted_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
+#endif
+
+#ifndef GL_EXT_clip_volume_hint
+#define GL_EXT_clip_volume_hint 1
+#endif
+
+#ifndef GL_SGIX_list_priority
+#define GL_SGIX_list_priority 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat);
+GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *);
+GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint);
+GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
+#endif
+
+#ifndef GL_SGIX_ir_instrument1
+#define GL_SGIX_ir_instrument1 1
+#endif
+
+#ifndef GL_SGIX_calligraphic_fragment
+#define GL_SGIX_calligraphic_fragment 1
+#endif
+
+#ifndef GL_SGIX_texture_lod_bias
+#define GL_SGIX_texture_lod_bias 1
+#endif
+
+#ifndef GL_SGIX_shadow_ambient
+#define GL_SGIX_shadow_ambient 1
+#endif
+
+#ifndef GL_EXT_index_texture
+#define GL_EXT_index_texture 1
+#endif
+
+#ifndef GL_EXT_index_material
+#define GL_EXT_index_material 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
+#endif
+
+#ifndef GL_EXT_index_func
+#define GL_EXT_index_func 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
+#endif
+
+#ifndef GL_EXT_index_array_formats
+#define GL_EXT_index_array_formats 1
+#endif
+
+#ifndef GL_EXT_compiled_vertex_array
+#define GL_EXT_compiled_vertex_array 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei);
+GLAPI void APIENTRY glUnlockArraysEXT (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
+typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
+#endif
+
+#ifndef GL_EXT_cull_vertex
+#define GL_EXT_cull_vertex 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *);
+GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
+#endif
+
+#ifndef GL_SGIX_ycrcb
+#define GL_SGIX_ycrcb 1
+#endif
+
+#ifndef GL_SGIX_fragment_lighting
+#define GL_SGIX_fragment_lighting 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum);
+GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat);
+GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint);
+GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat);
+GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *);
+GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint);
+GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *);
+GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat);
+GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint);
+GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
+#endif
+
+#ifndef GL_IBM_rasterpos_clip
+#define GL_IBM_rasterpos_clip 1
+#endif
+
+#ifndef GL_HP_texture_lighting
+#define GL_HP_texture_lighting 1
+#endif
+
+#ifndef GL_EXT_draw_range_elements
+#define GL_EXT_draw_range_elements 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+#endif
+
+#ifndef GL_WIN_phong_shading
+#define GL_WIN_phong_shading 1
+#endif
+
+#ifndef GL_WIN_specular_fog
+#define GL_WIN_specular_fog 1
+#endif
+
+#ifndef GL_EXT_light_texture
+#define GL_EXT_light_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glApplyTextureEXT (GLenum);
+GLAPI void APIENTRY glTextureLightEXT (GLenum);
+GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
+typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
+typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
+#endif
+
+#ifndef GL_SGIX_blend_alpha_minmax
+#define GL_SGIX_blend_alpha_minmax 1
+#endif
+
+#ifndef GL_EXT_bgra
+#define GL_EXT_bgra 1
+#endif
+
+#ifndef GL_SGIX_async
+#define GL_SGIX_async 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint);
+GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *);
+GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *);
+GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei);
+GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei);
+GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
+typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
+typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
+typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
+typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
+typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
+#endif
+
+#ifndef GL_SGIX_async_pixel
+#define GL_SGIX_async_pixel 1
+#endif
+
+#ifndef GL_SGIX_async_histogram
+#define GL_SGIX_async_histogram 1
+#endif
+
+#ifndef GL_INTEL_parallel_arrays
+#define GL_INTEL_parallel_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *);
+GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *);
+GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *);
+GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
+typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer);
+typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
+#endif
+
+#ifndef GL_HP_occlusion_test
+#define GL_HP_occlusion_test 1
+#endif
+
+#ifndef GL_EXT_pixel_transform
+#define GL_EXT_pixel_transform 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint);
+GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat);
+GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *);
+/* ERO Begin */
+GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum, GLenum, GLfloat *);
+/* ERO End */
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
+/* ERO Begin */
+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
+/* ERO End */
+#endif
+
+#ifndef GL_EXT_pixel_transform_color_table
+#define GL_EXT_pixel_transform_color_table 1
+#endif
+
+#ifndef GL_EXT_shared_texture_palette
+#define GL_EXT_shared_texture_palette 1
+#endif
+
+#ifndef GL_EXT_separate_specular_color
+#define GL_EXT_separate_specular_color 1
+#endif
+
+#ifndef GL_EXT_secondary_color
+#define GL_EXT_secondary_color 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte);
+GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *);
+GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *);
+GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *);
+GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint);
+GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *);
+GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *);
+GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte);
+GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *);
+GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *);
+GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort);
+GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *);
+GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_EXT_texture_perturb_normal
+#define GL_EXT_texture_perturb_normal 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTextureNormalEXT (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
+#endif
+
+#ifndef GL_EXT_multi_draw_arrays
+#define GL_EXT_multi_draw_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
+GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+#endif
+
+#ifndef GL_EXT_fog_coord
+#define GL_EXT_fog_coord 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFogCoordfEXT (GLfloat);
+GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *);
+GLAPI void APIENTRY glFogCoorddEXT (GLdouble);
+GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *);
+GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
+typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
+typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
+typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
+typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_REND_screen_coordinates
+#define GL_REND_screen_coordinates 1
+#endif
+
+#ifndef GL_EXT_coordinate_frame
+#define GL_EXT_coordinate_frame 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte);
+GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *);
+GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *);
+GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *);
+GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint);
+GLAPI void APIENTRY glTangent3ivEXT (const GLint *);
+GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glTangent3svEXT (const GLshort *);
+GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte);
+GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *);
+GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *);
+GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *);
+GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint);
+GLAPI void APIENTRY glBinormal3ivEXT (const GLint *);
+GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glBinormal3svEXT (const GLshort *);
+GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
+typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
+typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
+typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
+typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
+typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
+typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
+typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
+typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
+typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
+typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
+typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
+typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_EXT_texture_env_combine
+#define GL_EXT_texture_env_combine 1
+#endif
+
+#ifndef GL_APPLE_specular_vector
+#define GL_APPLE_specular_vector 1
+#endif
+
+#ifndef GL_APPLE_transform_hint
+#define GL_APPLE_transform_hint 1
+#endif
+
+#ifndef GL_SGIX_fog_scale
+#define GL_SGIX_fog_scale 1
+#endif
+
+#ifndef GL_SUNX_constant_data
+#define GL_SUNX_constant_data 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFinishTextureSUNX (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
+#endif
+
+#ifndef GL_SUN_global_alpha
+#define GL_SUN_global_alpha 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte);
+GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort);
+GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint);
+GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat);
+GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble);
+GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte);
+GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort);
+GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
+#endif
+
+#ifndef GL_SUN_triangle_list
+#define GL_SUN_triangle_list 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint);
+GLAPI void APIENTRY glReplacementCodeusSUN (GLushort);
+GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte);
+GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *);
+GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *);
+GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *);
+GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer);
+#endif
+
+#ifndef GL_SUN_vertex
+#define GL_SUN_vertex 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat);
+GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *);
+GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *);
+GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *);
+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *);
+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *);
+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+#endif
+
+#ifndef GL_EXT_blend_func_separate
+#define GL_EXT_blend_func_separate 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+#endif
+
+#ifndef GL_INGR_blend_func_separate
+#define GL_INGR_blend_func_separate 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+#endif
+
+#ifndef GL_INGR_color_clamp
+#define GL_INGR_color_clamp 1
+#endif
+
+#ifndef GL_INGR_interlace_read
+#define GL_INGR_interlace_read 1
+#endif
+
+#ifndef GL_EXT_stencil_wrap
+#define GL_EXT_stencil_wrap 1
+#endif
+
+#ifndef GL_EXT_422_pixels
+#define GL_EXT_422_pixels 1
+#endif
+
+#ifndef GL_NV_texgen_reflection
+#define GL_NV_texgen_reflection 1
+#endif
+
+#ifndef GL_SUN_convolution_border_modes
+#define GL_SUN_convolution_border_modes 1
+#endif
+
+#ifndef GL_EXT_texture_env_add
+#define GL_EXT_texture_env_add 1
+#endif
+
+#ifndef GL_EXT_texture_lod_bias
+#define GL_EXT_texture_lod_bias 1
+#endif
+
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_EXT_texture_filter_anisotropic 1
+#endif
+
+#ifndef GL_EXT_vertex_weighting
+#define GL_EXT_vertex_weighting 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexWeightfEXT (GLfloat);
+GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *);
+GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
+typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_NV_light_max_exponent
+#define GL_NV_light_max_exponent 1
+#endif
+
+#ifndef GL_NV_vertex_array_range
+#define GL_NV_vertex_array_range 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
+GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer);
+#endif
+
+#ifndef GL_NV_register_combiners
+#define GL_NV_register_combiners 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *);
+GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
+GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *);
+GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint);
+GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
+GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
+GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
+GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
+typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_NV_fog_distance
+#define GL_NV_fog_distance 1
+#endif
+
+#ifndef GL_NV_texgen_emboss
+#define GL_NV_texgen_emboss 1
+#endif
+
+#ifndef GL_NV_blend_square
+#define GL_NV_blend_square 1
+#endif
+
+#ifndef GL_NV_texture_env_combine4
+#define GL_NV_texture_env_combine4 1
+#endif
+
+#ifndef GL_MESA_resize_buffers
+#define GL_MESA_resize_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glResizeBuffersMESA (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
+#endif
+
+#ifndef GL_MESA_window_pos
+#define GL_MESA_window_pos 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble);
+GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *);
+GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat);
+GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *);
+GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint);
+GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *);
+GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort);
+GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *);
+GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *);
+GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *);
+GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint);
+GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *);
+GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *);
+GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *);
+GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *);
+GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *);
+GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
+typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
+#endif
+
+#ifndef GL_IBM_cull_vertex
+#define GL_IBM_cull_vertex 1
+#endif
+
+#ifndef GL_IBM_multimode_draw_arrays
+#define GL_IBM_multimode_draw_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint);
+GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
+typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride);
+#endif
+
+#ifndef GL_IBM_vertex_array_lists
+#define GL_IBM_vertex_array_lists 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
+GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
+GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint);
+GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
+GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
+GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
+GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
+GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+#endif
+
+#ifndef GL_SGIX_subsample
+#define GL_SGIX_subsample 1
+#endif
+
+#ifndef GL_SGIX_ycrcba
+#define GL_SGIX_ycrcba 1
+#endif
+
+#ifndef GL_SGIX_ycrcb_subsample
+#define GL_SGIX_ycrcb_subsample 1
+#endif
+
+#ifndef GL_SGIX_depth_pass_instrument
+#define GL_SGIX_depth_pass_instrument 1
+#endif
+
+#ifndef GL_3DFX_texture_compression_FXT1
+#define GL_3DFX_texture_compression_FXT1 1
+#endif
+
+#ifndef GL_3DFX_multisample
+#define GL_3DFX_multisample 1
+#endif
+
+#ifndef GL_3DFX_tbuffer
+#define GL_3DFX_tbuffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTbufferMask3DFX (GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
+#endif
+
+#ifndef GL_EXT_multisample
+#define GL_EXT_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean);
+GLAPI void APIENTRY glSamplePatternEXT (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
+typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
+#endif
+
+#ifndef GL_SGIX_vertex_preclip
+#define GL_SGIX_vertex_preclip 1
+#endif
+
+#ifndef GL_SGIX_convolution_accuracy
+#define GL_SGIX_convolution_accuracy 1
+#endif
+
+#ifndef GL_SGIX_resample
+#define GL_SGIX_resample 1
+#endif
+
+#ifndef GL_SGIS_point_line_texgen
+#define GL_SGIS_point_line_texgen 1
+#endif
+
+#ifndef GL_SGIS_texture_color_mask
+#define GL_SGIS_texture_color_mask 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+#endif
+
+#ifndef GL_SGIX_igloo_interface
+#define GL_SGIX_igloo_interface 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
+#endif
+
+#ifndef GL_EXT_texture_env_dot3
+#define GL_EXT_texture_env_dot3 1
+#endif
+
+#ifndef GL_ATI_texture_mirror_once
+#define GL_ATI_texture_mirror_once 1
+#endif
+
+#ifndef GL_NV_fence
+#define GL_NV_fence 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *);
+GLAPI GLboolean APIENTRY glIsFenceNV (GLuint);
+GLAPI GLboolean APIENTRY glTestFenceNV (GLuint);
+GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glFinishFenceNV (GLuint);
+GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
+typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
+typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
+typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
+typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
+typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
+#endif
+
+#ifndef GL_NV_evaluators
+#define GL_NV_evaluators 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *);
+GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *);
+GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);
+typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);
+typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
+#endif
+
+#ifndef GL_NV_packed_depth_stencil
+#define GL_NV_packed_depth_stencil 1
+#endif
+
+#ifndef GL_NV_register_combiners2
+#define GL_NV_register_combiners2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
+#endif
+
+#ifndef GL_NV_texture_compression_vtc
+#define GL_NV_texture_compression_vtc 1
+#endif
+
+#ifndef GL_NV_texture_rectangle
+#define GL_NV_texture_rectangle 1
+#endif
+
+#ifndef GL_NV_texture_shader
+#define GL_NV_texture_shader 1
+#endif
+
+#ifndef GL_NV_texture_shader2
+#define GL_NV_texture_shader2 1
+#endif
+
+#ifndef GL_NV_vertex_array_range2
+#define GL_NV_vertex_array_range2 1
+#endif
+
+#ifndef GL_NV_vertex_program
+#define GL_NV_vertex_program 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *);
+GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *);
+GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *);
+GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *);
+GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *);
+GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *);
+GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *);
+GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *);
+GLAPI GLboolean APIENTRY glIsProgramNV (GLuint);
+GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *);
+GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *);
+GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *);
+GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *);
+GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *);
+GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *);
+GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum);
+GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble);
+GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat);
+GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort);
+GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
+GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *);
+GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *);
+GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *);
+GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *);
+GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *);
+GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *);
+GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *);
+GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *);
+GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
+typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
+typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
+typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
+typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
+typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
+typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
+#endif
+
+#ifndef GL_SGIX_texture_coordinate_clamp
+#define GL_SGIX_texture_coordinate_clamp 1
+#endif
+
+#ifndef GL_SGIX_scalebias_hint
+#define GL_SGIX_scalebias_hint 1
+#endif
+
+#ifndef GL_OML_interlace
+#define GL_OML_interlace 1
+#endif
+
+#ifndef GL_OML_subsample
+#define GL_OML_subsample 1
+#endif
+
+#ifndef GL_OML_resample
+#define GL_OML_resample 1
+#endif
+
+#ifndef GL_NV_copy_depth_to_color
+#define GL_NV_copy_depth_to_color 1
+#endif
+
+#ifndef GL_ATI_envmap_bumpmap
+#define GL_ATI_envmap_bumpmap 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *);
+GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *);
+GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *);
+GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
+#endif
+
+#ifndef GL_ATI_fragment_shader
+#define GL_ATI_fragment_shader 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint);
+GLAPI void APIENTRY glBindFragmentShaderATI (GLuint);
+GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint);
+GLAPI void APIENTRY glBeginFragmentShaderATI (void);
+GLAPI void APIENTRY glEndFragmentShaderATI (void);
+GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum);
+GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum);
+GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
+typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
+typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
+typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
+typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
+#endif
+
+#ifndef GL_ATI_pn_triangles
+#define GL_ATI_pn_triangles 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint);
+GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
+#endif
+
+#ifndef GL_ATI_vertex_array_object
+#define GL_ATI_vertex_array_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum);
+GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint);
+GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum);
+GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glFreeObjectBufferATI (GLuint);
+/* ERO Begin */
+GLAPI void APIENTRY glDeleteObjectBufferATI (GLuint);
+/* ERO End */
+GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint);
+GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint);
+GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);
+typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
+typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_EXT_vertex_shader
+#define GL_EXT_vertex_shader 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBeginVertexShaderEXT (void);
+GLAPI void APIENTRY glEndVertexShaderEXT (void);
+GLAPI void APIENTRY glBindVertexShaderEXT (GLuint);
+GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint);
+GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint);
+GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint);
+GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
+GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
+GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint);
+GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint);
+GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *);
+GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *);
+GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *);
+GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *);
+GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *);
+GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *);
+GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *);
+GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *);
+GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint);
+GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint);
+GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum);
+GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum);
+GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum);
+GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum);
+GLAPI GLuint APIENTRY glBindParameterEXT (GLenum);
+GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum);
+GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *);
+GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *);
+GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *);
+GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *);
+GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
+typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
+typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
+typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
+typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
+typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
+typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
+typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
+typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
+typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
+typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
+typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
+typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
+typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
+typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
+typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
+typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
+typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
+typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
+typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
+typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
+typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
+typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);
+typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
+typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
+typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
+typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
+typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
+typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
+typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
+typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
+typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
+typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
+typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data);
+typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
+typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
+typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
+#endif
+
+#ifndef GL_ATI_vertex_streams
+#define GL_ATI_vertex_streams 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort);
+GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *);
+GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint);
+GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *);
+GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat);
+GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *);
+GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble);
+GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *);
+GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort);
+GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *);
+GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint);
+GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *);
+GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *);
+GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *);
+GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *);
+GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint);
+GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *);
+GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *);
+GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *);
+GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *);
+GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *);
+GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *);
+GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *);
+GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte);
+GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *);
+GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *);
+GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint);
+GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *);
+GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *);
+GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *);
+GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum);
+GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint);
+GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
+typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
+#endif
+
+#ifndef GL_ATI_element_array
+#define GL_ATI_element_array 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *);
+GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei);
+GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
+#endif
+
+#ifndef GL_SUN_mesh_array
+#define GL_SUN_mesh_array 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
+#endif
+
+#ifndef GL_SUN_slice_accum
+#define GL_SUN_slice_accum 1
+#endif
+
+#ifndef GL_NV_multisample_filter_hint
+#define GL_NV_multisample_filter_hint 1
+#endif
+
+#ifndef GL_NV_depth_clamp
+#define GL_NV_depth_clamp 1
+#endif
+
+#ifndef GL_NV_occlusion_query
+#define GL_NV_occlusion_query 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *);
+GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *);
+GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint);
+GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint);
+GLAPI void APIENTRY glEndOcclusionQueryNV (void);
+GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
+typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
+typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
+#endif
+
+#ifndef GL_NV_point_sprite
+#define GL_NV_point_sprite 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint);
+GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
+#endif
+
+#ifndef GL_NV_texture_shader3
+#define GL_NV_texture_shader3 1
+#endif
+
+#ifndef GL_NV_vertex_program1_1
+#define GL_NV_vertex_program1_1 1
+#endif
+
+#ifndef GL_EXT_shadow_funcs
+#define GL_EXT_shadow_funcs 1
+#endif
+
+#ifndef GL_EXT_stencil_two_side
+#define GL_EXT_stencil_two_side 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
+#endif
+
+#ifndef GL_ATI_text_fragment_shader
+#define GL_ATI_text_fragment_shader 1
+#endif
+
+#ifndef GL_APPLE_client_storage
+#define GL_APPLE_client_storage 1
+#endif
+
+#ifndef GL_APPLE_element_array
+#define GL_APPLE_element_array 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *);
+GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei);
+GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei);
+GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei);
+GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
+#endif
+
+#ifndef GL_APPLE_fence
+#define GL_APPLE_fence 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *);
+GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *);
+GLAPI void APIENTRY glSetFenceAPPLE (GLuint);
+GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint);
+GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint);
+GLAPI void APIENTRY glFinishFenceAPPLE (GLuint);
+GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint);
+GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
+typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
+typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
+typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
+typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
+typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
+typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
+typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
+#endif
+
+#ifndef GL_APPLE_vertex_array_object
+#define GL_APPLE_vertex_array_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
+GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
+GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
+typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
+typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
+typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
+#endif
+
+#ifndef GL_APPLE_vertex_array_range
+#define GL_APPLE_vertex_array_range 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *);
+GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *);
+GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
+typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
+#endif
+
+#ifndef GL_APPLE_ycbcr_422
+#define GL_APPLE_ycbcr_422 1
+#endif
+
+#ifndef GL_S3_s3tc
+#define GL_S3_s3tc 1
+#endif
+
+#ifndef GL_ATI_draw_buffers
+#define GL_ATI_draw_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
+#endif
+
+#ifndef GL_ATI_pixel_format_float
+#define GL_ATI_pixel_format_float 1
+/* This is really a WGL extension, but defines some associated GL enums.
+ * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string.
+ */
+#endif
+
+#ifndef GL_ATI_texture_env_combine3
+#define GL_ATI_texture_env_combine3 1
+#endif
+
+#ifndef GL_ATI_texture_float
+#define GL_ATI_texture_float 1
+#endif
+
+#ifndef GL_NV_float_buffer
+#define GL_NV_float_buffer 1
+#endif
+
+#ifndef GL_NV_fragment_program
+#define GL_NV_fragment_program 1
+/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *);
+GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *);
+GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *);
+GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
+#endif
+
+#ifndef GL_NV_half_float
+#define GL_NV_half_float 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV);
+GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV);
+GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *);
+GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *);
+GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *);
+GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *);
+GLAPI void APIENTRY glFogCoordhNV (GLhalfNV);
+GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *);
+GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *);
+GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV);
+GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *);
+GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV);
+GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *);
+GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *);
+GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *);
+GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
+GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *);
+GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *);
+GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *);
+GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *);
+GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
+typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
+typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
+typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
+typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
+typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
+typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
+typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
+typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
+typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
+typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
+typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
+#endif
+
+#ifndef GL_NV_pixel_data_range
+#define GL_NV_pixel_data_range 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *);
+GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer);
+typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
+#endif
+
+#ifndef GL_NV_primitive_restart
+#define GL_NV_primitive_restart 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPrimitiveRestartNV (void);
+GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
+#endif
+
+#ifndef GL_NV_texture_expand_normal
+#define GL_NV_texture_expand_normal 1
+#endif
+
+#ifndef GL_NV_vertex_program2
+#define GL_NV_vertex_program2 1
+#endif
+
+#ifndef GL_ATI_map_object_buffer
+#define GL_ATI_map_object_buffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint);
+GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
+#endif
+
+#ifndef GL_ATI_separate_stencil
+#define GL_ATI_separate_stencil 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum);
+GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+#endif
+
+#ifndef GL_ATI_vertex_attrib_array_object
+#define GL_ATI_vertex_attrib_array_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint);
+GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_OES_read_format
+#define GL_OES_read_format 1
+#endif
+
+#ifndef GL_EXT_depth_bounds_test
+#define GL_EXT_depth_bounds_test 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
+#endif
+
+#ifndef GL_EXT_texture_mirror_clamp
+#define GL_EXT_texture_mirror_clamp 1
+#endif
+
+#ifndef GL_EXT_blend_equation_separate
+#define GL_EXT_blend_equation_separate 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
+#endif
+
+#ifndef GL_MESA_pack_invert
+#define GL_MESA_pack_invert 1
+#endif
+
+#ifndef GL_MESA_ycbcr_texture
+#define GL_MESA_ycbcr_texture 1
+#endif
+
+#ifndef GL_EXT_pixel_buffer_object
+#define GL_EXT_pixel_buffer_object 1
+#endif
+
+#ifndef GL_NV_fragment_program_option
+#define GL_NV_fragment_program_option 1
+#endif
+
+#ifndef GL_NV_fragment_program2
+#define GL_NV_fragment_program2 1
+#endif
+
+#ifndef GL_NV_vertex_program2_option
+#define GL_NV_vertex_program2_option 1
+#endif
+
+#ifndef GL_NV_vertex_program3
+#define GL_NV_vertex_program3 1
+#endif
+
+#ifndef GL_EXT_framebuffer_object
+#define GL_EXT_framebuffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint);
+GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *);
+GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei);
+GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *);
+GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint);
+GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *);
+GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum);
+GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
+GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
+GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
+GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint);
+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGenerateMipmapEXT (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
+#endif
+
+#ifndef GL_GREMEDY_string_marker
+#define GL_GREMEDY_string_marker 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
+#endif
+
+#ifndef GL_EXT_packed_depth_stencil
+#define GL_EXT_packed_depth_stencil 1
+#endif
+
+#ifndef GL_EXT_stencil_clear_tag
+#define GL_EXT_stencil_clear_tag 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glStencilClearTagEXT (GLsizei, GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
+#endif
+
+#ifndef GL_EXT_texture_sRGB
+#define GL_EXT_texture_sRGB 1
+#endif
+
+#ifndef GL_EXT_framebuffer_blit
+#define GL_EXT_framebuffer_blit 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlitFramebufferEXT (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+
+#ifndef GL_EXT_framebuffer_multisample
+#define GL_EXT_framebuffer_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+
+#ifndef GL_MESAX_texture_stack
+#define GL_MESAX_texture_stack 1
+#endif
+
+#ifndef GL_EXT_timer_query
+#define GL_EXT_timer_query 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint, GLenum, GLint64EXT *);
+GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint, GLenum, GLuint64EXT *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
+#endif
+
+#ifndef GL_EXT_gpu_program_parameters
+#define GL_EXT_gpu_program_parameters 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+#endif
+
+#ifndef GL_APPLE_flush_buffer_range
+#define GL_APPLE_flush_buffer_range 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum, GLenum, GLint);
+GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum, GLintptr, GLsizeiptr);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
+#endif
+
+#ifndef GL_NV_gpu_program4
+#define GL_NV_gpu_program4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum, GLuint, const GLint *);
+GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
+GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum, GLuint, const GLuint *);
+GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
+GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum, GLuint, const GLint *);
+GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
+GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum, GLuint, const GLuint *);
+GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
+GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum, GLuint, GLint *);
+GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum, GLuint, GLuint *);
+GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum, GLuint, GLint *);
+GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum, GLuint, GLuint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
+#endif
+
+#ifndef GL_NV_geometry_program4
+#define GL_NV_geometry_program4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProgramVertexLimitNV (GLenum, GLint);
+GLAPI void APIENTRY glFramebufferTextureEXT (GLenum, GLenum, GLuint, GLint);
+GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum, GLenum, GLuint, GLint, GLint);
+GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum, GLenum, GLuint, GLint, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
+#endif
+
+#ifndef GL_EXT_geometry_shader4
+#define GL_EXT_geometry_shader4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProgramParameteriEXT (GLuint, GLenum, GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
+#endif
+
+#ifndef GL_NV_vertex_program4
+#define GL_NV_vertex_program4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint, GLint);
+GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint, GLint, GLint);
+GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint, GLint, GLint, GLint);
+GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint, GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint, GLuint);
+GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint, const GLint *);
+GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint, const GLint *);
+GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint, const GLint *);
+GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint, const GLint *);
+GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint, const GLuint *);
+GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint, const GLuint *);
+GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint, const GLuint *);
+GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint, const GLuint *);
+GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint, const GLbyte *);
+GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint, const GLushort *);
+GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint, GLenum, GLuint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
+#endif
+
+#ifndef GL_EXT_gpu_shader4
+#define GL_EXT_gpu_shader4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetUniformuivEXT (GLuint, GLint, GLuint *);
+GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint, GLuint, const GLchar *);
+GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint, const GLchar *);
+GLAPI void APIENTRY glUniform1uiEXT (GLint, GLuint);
+GLAPI void APIENTRY glUniform2uiEXT (GLint, GLuint, GLuint);
+GLAPI void APIENTRY glUniform3uiEXT (GLint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glUniform4uiEXT (GLint, GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glUniform1uivEXT (GLint, GLsizei, const GLuint *);
+GLAPI void APIENTRY glUniform2uivEXT (GLint, GLsizei, const GLuint *);
+GLAPI void APIENTRY glUniform3uivEXT (GLint, GLsizei, const GLuint *);
+GLAPI void APIENTRY glUniform4uivEXT (GLint, GLsizei, const GLuint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
+typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
+typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
+typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
+typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
+#endif
+
+#ifndef GL_EXT_draw_instanced
+#define GL_EXT_draw_instanced 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum, GLint, GLsizei, GLsizei);
+GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+#endif
+
+#ifndef GL_EXT_packed_float
+#define GL_EXT_packed_float 1
+#endif
+
+#ifndef GL_EXT_texture_array
+#define GL_EXT_texture_array 1
+#endif
+
+#ifndef GL_EXT_texture_buffer_object
+#define GL_EXT_texture_buffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexBufferEXT (GLenum, GLenum, GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
+#endif
+
+#ifndef GL_EXT_texture_compression_latc
+#define GL_EXT_texture_compression_latc 1
+#endif
+
+#ifndef GL_EXT_texture_compression_rgtc
+#define GL_EXT_texture_compression_rgtc 1
+#endif
+
+#ifndef GL_EXT_texture_shared_exponent
+#define GL_EXT_texture_shared_exponent 1
+#endif
+
+#ifndef GL_NV_depth_buffer_float
+#define GL_NV_depth_buffer_float 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDepthRangedNV (GLdouble, GLdouble);
+GLAPI void APIENTRY glClearDepthdNV (GLdouble);
+GLAPI void APIENTRY glDepthBoundsdNV (GLdouble, GLdouble);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
+typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
+typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
+#endif
+
+#ifndef GL_NV_fragment_program4
+#define GL_NV_fragment_program4 1
+#endif
+
+#ifndef GL_NV_framebuffer_multisample_coverage
+#define GL_NV_framebuffer_multisample_coverage 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+
+#ifndef GL_EXT_framebuffer_sRGB
+#define GL_EXT_framebuffer_sRGB 1
+#endif
+
+#ifndef GL_NV_geometry_shader4
+#define GL_NV_geometry_shader4 1
+#endif
+
+#ifndef GL_NV_parameter_buffer_object
+#define GL_NV_parameter_buffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum, GLuint, GLuint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum, GLuint, GLuint, GLsizei, const GLint *);
+GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum, GLuint, GLuint, GLsizei, const GLuint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
+#endif
+
+#ifndef GL_EXT_draw_buffers2
+#define GL_EXT_draw_buffers2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint, GLboolean, GLboolean, GLboolean, GLboolean);
+GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum, GLuint, GLboolean *);
+GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum, GLuint, GLint *);
+GLAPI void APIENTRY glEnableIndexedEXT (GLenum, GLuint);
+GLAPI void APIENTRY glDisableIndexedEXT (GLenum, GLuint);
+GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum, GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
+typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
+typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
+typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
+typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
+#endif
+
+#ifndef GL_NV_transform_feedback
+#define GL_NV_transform_feedback 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum);
+GLAPI void APIENTRY glEndTransformFeedbackNV (void);
+GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint, const GLint *, GLenum);
+GLAPI void APIENTRY glBindBufferRangeNV (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
+GLAPI void APIENTRY glBindBufferOffsetNV (GLenum, GLuint, GLuint, GLintptr);
+GLAPI void APIENTRY glBindBufferBaseNV (GLenum, GLuint, GLuint);
+GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint, GLsizei, const GLint *, GLenum);
+GLAPI void APIENTRY glActiveVaryingNV (GLuint, const GLchar *);
+GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint, const GLchar *);
+GLAPI void APIENTRY glGetActiveVaryingNV (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
+GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint, GLuint, GLint *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
+typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
+typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
+typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
+typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
+#endif
+
+#ifndef GL_EXT_bindable_uniform
+#define GL_EXT_bindable_uniform 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glUniformBufferEXT (GLuint, GLint, GLuint);
+GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint, GLint);
+GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint, GLint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
+typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
+typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
+#endif
+
+#ifndef GL_EXT_texture_integer
+#define GL_EXT_texture_integer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexParameterIivEXT (GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glTexParameterIuivEXT (GLenum, GLenum, const GLuint *);
+GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum, GLenum, GLuint *);
+GLAPI void APIENTRY glClearColorIiEXT (GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glClearColorIuiEXT (GLuint, GLuint, GLuint, GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
+typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
+typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+/* ERO */
+GLAPI void GLAPIENTRY fake_gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data);
Index: git/target-i386/mesa_glu.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/mesa_glu.h	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,354 @@
+/*
+** License Applicability. Except to the extent portions of this file are
+** made subject to an alternative license as permitted in the SGI Free
+** Software License B, Version 1.1 (the "License"), the contents of this
+** file are subject only to the provisions of the License. You may not use
+** this file except in compliance with the License. You may obtain a copy
+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
+**
+** http://oss.sgi.com/projects/FreeB
+**
+** Note that, as provided in the License, the Software is distributed on an
+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
+**
+** Original Code. The Original Code is: OpenGL Sample Implementation,
+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
+** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
+** Copyright in any portions created by third parties is as indicated
+** elsewhere herein. All Rights Reserved.
+**
+** Additional Notice Provisions: This software was created using the
+** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
+** not been independently verified as being compliant with the OpenGL(R)
+** version 1.2.1 Specification.
+*/
+
+#ifndef __glu_h__
+#define __glu_h__
+
+#if defined(USE_MGL_NAMESPACE)
+#include "glu_mangle.h"
+#endif
+
+//#include <GL/gl.h>
+#include "mesa_gl.h"
+
+#ifndef GLAPIENTRY
+#define GLAPIENTRY
+#endif
+
+#ifndef GLAPIENTRYP
+#define GLAPIENTRYP GLAPIENTRY *
+#endif
+
+#ifdef GLAPI
+#undef GLAPI
+#endif
+
+#  if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
+#    define GLAPI __declspec(dllexport)
+#  elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
+#    define GLAPI __declspec(dllimport)
+#  else /* for use with static link lib build of Win32 edition only */
+#    define GLAPI extern
+#  endif /* _STATIC_MESA support */
+
+
+#ifndef GLAPI
+#define GLAPI
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*************************************************************/
+
+/* Extensions */
+#define GLU_EXT_object_space_tess          1
+#define GLU_EXT_nurbs_tessellator          1
+
+/* Boolean */
+#define GLU_FALSE                          0
+#define GLU_TRUE                           1
+
+/* Version */
+#define GLU_VERSION_1_1                    1
+#define GLU_VERSION_1_2                    1
+#define GLU_VERSION_1_3                    1
+
+/* StringName */
+#define GLU_VERSION                        100800
+#define GLU_EXTENSIONS                     100801
+
+/* ErrorCode */
+#define GLU_INVALID_ENUM                   100900
+#define GLU_INVALID_VALUE                  100901
+#define GLU_OUT_OF_MEMORY                  100902
+#define GLU_INCOMPATIBLE_GL_VERSION        100903
+#define GLU_INVALID_OPERATION              100904
+
+/* NurbsDisplay */
+/*      GLU_FILL */
+#define GLU_OUTLINE_POLYGON                100240
+#define GLU_OUTLINE_PATCH                  100241
+
+/* NurbsCallback */
+#define GLU_NURBS_ERROR                    100103
+#define GLU_ERROR                          100103
+#define GLU_NURBS_BEGIN                    100164
+#define GLU_NURBS_BEGIN_EXT                100164
+#define GLU_NURBS_VERTEX                   100165
+#define GLU_NURBS_VERTEX_EXT               100165
+#define GLU_NURBS_NORMAL                   100166
+#define GLU_NURBS_NORMAL_EXT               100166
+#define GLU_NURBS_COLOR                    100167
+#define GLU_NURBS_COLOR_EXT                100167
+#define GLU_NURBS_TEXTURE_COORD            100168
+#define GLU_NURBS_TEX_COORD_EXT            100168
+#define GLU_NURBS_END                      100169
+#define GLU_NURBS_END_EXT                  100169
+#define GLU_NURBS_BEGIN_DATA               100170
+#define GLU_NURBS_BEGIN_DATA_EXT           100170
+#define GLU_NURBS_VERTEX_DATA              100171
+#define GLU_NURBS_VERTEX_DATA_EXT          100171
+#define GLU_NURBS_NORMAL_DATA              100172
+#define GLU_NURBS_NORMAL_DATA_EXT          100172
+#define GLU_NURBS_COLOR_DATA               100173
+#define GLU_NURBS_COLOR_DATA_EXT           100173
+#define GLU_NURBS_TEXTURE_COORD_DATA       100174
+#define GLU_NURBS_TEX_COORD_DATA_EXT       100174
+#define GLU_NURBS_END_DATA                 100175
+#define GLU_NURBS_END_DATA_EXT             100175
+
+/* NurbsError */
+#define GLU_NURBS_ERROR1                   100251
+#define GLU_NURBS_ERROR2                   100252
+#define GLU_NURBS_ERROR3                   100253
+#define GLU_NURBS_ERROR4                   100254
+#define GLU_NURBS_ERROR5                   100255
+#define GLU_NURBS_ERROR6                   100256
+#define GLU_NURBS_ERROR7                   100257
+#define GLU_NURBS_ERROR8                   100258
+#define GLU_NURBS_ERROR9                   100259
+#define GLU_NURBS_ERROR10                  100260
+#define GLU_NURBS_ERROR11                  100261
+#define GLU_NURBS_ERROR12                  100262
+#define GLU_NURBS_ERROR13                  100263
+#define GLU_NURBS_ERROR14                  100264
+#define GLU_NURBS_ERROR15                  100265
+#define GLU_NURBS_ERROR16                  100266
+#define GLU_NURBS_ERROR17                  100267
+#define GLU_NURBS_ERROR18                  100268
+#define GLU_NURBS_ERROR19                  100269
+#define GLU_NURBS_ERROR20                  100270
+#define GLU_NURBS_ERROR21                  100271
+#define GLU_NURBS_ERROR22                  100272
+#define GLU_NURBS_ERROR23                  100273
+#define GLU_NURBS_ERROR24                  100274
+#define GLU_NURBS_ERROR25                  100275
+#define GLU_NURBS_ERROR26                  100276
+#define GLU_NURBS_ERROR27                  100277
+#define GLU_NURBS_ERROR28                  100278
+#define GLU_NURBS_ERROR29                  100279
+#define GLU_NURBS_ERROR30                  100280
+#define GLU_NURBS_ERROR31                  100281
+#define GLU_NURBS_ERROR32                  100282
+#define GLU_NURBS_ERROR33                  100283
+#define GLU_NURBS_ERROR34                  100284
+#define GLU_NURBS_ERROR35                  100285
+#define GLU_NURBS_ERROR36                  100286
+#define GLU_NURBS_ERROR37                  100287
+
+/* NurbsProperty */
+#define GLU_AUTO_LOAD_MATRIX               100200
+#define GLU_CULLING                        100201
+#define GLU_SAMPLING_TOLERANCE             100203
+#define GLU_DISPLAY_MODE                   100204
+#define GLU_PARAMETRIC_TOLERANCE           100202
+#define GLU_SAMPLING_METHOD                100205
+#define GLU_U_STEP                         100206
+#define GLU_V_STEP                         100207
+#define GLU_NURBS_MODE                     100160
+#define GLU_NURBS_MODE_EXT                 100160
+#define GLU_NURBS_TESSELLATOR              100161
+#define GLU_NURBS_TESSELLATOR_EXT          100161
+#define GLU_NURBS_RENDERER                 100162
+#define GLU_NURBS_RENDERER_EXT             100162
+
+/* NurbsSampling */
+#define GLU_OBJECT_PARAMETRIC_ERROR        100208
+#define GLU_OBJECT_PARAMETRIC_ERROR_EXT    100208
+#define GLU_OBJECT_PATH_LENGTH             100209
+#define GLU_OBJECT_PATH_LENGTH_EXT         100209
+#define GLU_PATH_LENGTH                    100215
+#define GLU_PARAMETRIC_ERROR               100216
+#define GLU_DOMAIN_DISTANCE                100217
+
+/* NurbsTrim */
+#define GLU_MAP1_TRIM_2                    100210
+#define GLU_MAP1_TRIM_3                    100211
+
+/* QuadricDrawStyle */
+#define GLU_POINT                          100010
+#define GLU_LINE                           100011
+#define GLU_FILL                           100012
+#define GLU_SILHOUETTE                     100013
+
+/* QuadricCallback */
+/*      GLU_ERROR */
+
+/* QuadricNormal */
+#define GLU_SMOOTH                         100000
+#define GLU_FLAT                           100001
+#define GLU_NONE                           100002
+
+/* QuadricOrientation */
+#define GLU_OUTSIDE                        100020
+#define GLU_INSIDE                         100021
+
+/* TessCallback */
+#define GLU_TESS_BEGIN                     100100
+#define GLU_BEGIN                          100100
+#define GLU_TESS_VERTEX                    100101
+#define GLU_VERTEX                         100101
+#define GLU_TESS_END                       100102
+#define GLU_END                            100102
+#define GLU_TESS_ERROR                     100103
+#define GLU_TESS_EDGE_FLAG                 100104
+#define GLU_EDGE_FLAG                      100104
+#define GLU_TESS_COMBINE                   100105
+#define GLU_TESS_BEGIN_DATA                100106
+#define GLU_TESS_VERTEX_DATA               100107
+#define GLU_TESS_END_DATA                  100108
+#define GLU_TESS_ERROR_DATA                100109
+#define GLU_TESS_EDGE_FLAG_DATA            100110
+#define GLU_TESS_COMBINE_DATA              100111
+
+/* TessContour */
+#define GLU_CW                             100120
+#define GLU_CCW                            100121
+#define GLU_INTERIOR                       100122
+#define GLU_EXTERIOR                       100123
+#define GLU_UNKNOWN                        100124
+
+/* TessProperty */
+#define GLU_TESS_WINDING_RULE              100140
+#define GLU_TESS_BOUNDARY_ONLY             100141
+#define GLU_TESS_TOLERANCE                 100142
+
+/* TessError */
+#define GLU_TESS_ERROR1                    100151
+#define GLU_TESS_ERROR2                    100152
+#define GLU_TESS_ERROR3                    100153
+#define GLU_TESS_ERROR4                    100154
+#define GLU_TESS_ERROR5                    100155
+#define GLU_TESS_ERROR6                    100156
+#define GLU_TESS_ERROR7                    100157
+#define GLU_TESS_ERROR8                    100158
+#define GLU_TESS_MISSING_BEGIN_POLYGON     100151
+#define GLU_TESS_MISSING_BEGIN_CONTOUR     100152
+#define GLU_TESS_MISSING_END_POLYGON       100153
+#define GLU_TESS_MISSING_END_CONTOUR       100154
+#define GLU_TESS_COORD_TOO_LARGE           100155
+#define GLU_TESS_NEED_COMBINE_CALLBACK     100156
+
+/* TessWinding */
+#define GLU_TESS_WINDING_ODD               100130
+#define GLU_TESS_WINDING_NONZERO           100131
+#define GLU_TESS_WINDING_POSITIVE          100132
+#define GLU_TESS_WINDING_NEGATIVE          100133
+#define GLU_TESS_WINDING_ABS_GEQ_TWO       100134
+
+/*************************************************************/
+
+
+#ifdef __cplusplus
+class GLUnurbs;
+class GLUquadric;
+class GLUtesselator;
+#else
+typedef struct GLUnurbs GLUnurbs;
+typedef struct GLUquadric GLUquadric;
+typedef struct GLUtesselator GLUtesselator;
+#endif
+
+typedef GLUnurbs GLUnurbsObj;
+typedef GLUquadric GLUquadricObj;
+typedef GLUtesselator GLUtesselatorObj;
+typedef GLUtesselator GLUtriangulatorObj;
+
+#define GLU_TESS_MAX_COORD 1.0e150
+
+/* Internal convenience typedefs */
+typedef void (GLAPIENTRYP _GLUfuncptr)();
+
+GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
+GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
+GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
+GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
+GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
+GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
+GLAPI GLint GLAPIENTRY gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
+GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
+GLAPI GLint GLAPIENTRY gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
+GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
+GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
+GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
+GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
+GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
+GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
+GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
+GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
+GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
+GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
+GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
+GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
+GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
+GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
+GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
+GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
+GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
+GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
+GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
+GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
+GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
+GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
+GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
+GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
+GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
+GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
+GLAPI void GLAPIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
+GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
+GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
+GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
+GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
+GLAPI GLint GLAPIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
+GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
+GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
+GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
+GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
+GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
+GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
+GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
+GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
+GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
+GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
+GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
+GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
+GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
+GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
+GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
+GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
+GLAPI GLint GLAPIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
+GLAPI GLint GLAPIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __glu_h__ */
Index: git/target-i386/mesa_glx.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/mesa_glx.h	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,510 @@
+/*
+ * Mesa 3-D graphics library
+ * Version:  6.5
+ *
+ * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef GLX_H
+#define GLX_H
+
+
+#ifdef __VMS
+#include <GL/vms_x_fix.h>
+# ifdef __cplusplus
+/* VMS Xlib.h gives problems with C++.
+ * this avoids a bunch of trivial warnings */
+#pragma message disable nosimpint
+#endif
+#endif
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#ifdef __VMS
+# ifdef __cplusplus
+#pragma message enable nosimpint
+#endif
+#endif
+#include <mesa_gl.h>
+
+
+#if defined(USE_MGL_NAMESPACE)
+#include "glx_mangle.h"
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define GLX_VERSION_1_1		1
+#define GLX_VERSION_1_2		1
+#define GLX_VERSION_1_3		1
+#define GLX_VERSION_1_4		1
+
+#define GLX_EXTENSION_NAME   "GLX"
+
+
+
+/*
+ * Tokens for glXChooseVisual and glXGetConfig:
+ */
+#define GLX_USE_GL		1
+#define GLX_BUFFER_SIZE		2
+#define GLX_LEVEL		3
+#define GLX_RGBA		4
+#define GLX_DOUBLEBUFFER	5
+#define GLX_STEREO		6
+#define GLX_AUX_BUFFERS		7
+#define GLX_RED_SIZE		8
+#define GLX_GREEN_SIZE		9
+#define GLX_BLUE_SIZE		10
+#define GLX_ALPHA_SIZE		11
+#define GLX_DEPTH_SIZE		12
+#define GLX_STENCIL_SIZE	13
+#define GLX_ACCUM_RED_SIZE	14
+#define GLX_ACCUM_GREEN_SIZE	15
+#define GLX_ACCUM_BLUE_SIZE	16
+#define GLX_ACCUM_ALPHA_SIZE	17
+
+
+/*
+ * Error codes returned by glXGetConfig:
+ */
+#define GLX_BAD_SCREEN		1
+#define GLX_BAD_ATTRIBUTE	2
+#define GLX_NO_EXTENSION	3
+#define GLX_BAD_VISUAL		4
+#define GLX_BAD_CONTEXT		5
+#define GLX_BAD_VALUE       	6
+#define GLX_BAD_ENUM		7
+
+
+/*
+ * GLX 1.1 and later:
+ */
+#define GLX_VENDOR		1
+#define GLX_VERSION		2
+#define GLX_EXTENSIONS 		3
+
+
+/*
+ * GLX 1.3 and later:
+ */
+#define GLX_CONFIG_CAVEAT		0x20
+#define GLX_DONT_CARE			0xFFFFFFFF
+#define GLX_X_VISUAL_TYPE		0x22
+#define GLX_TRANSPARENT_TYPE		0x23
+#define GLX_TRANSPARENT_INDEX_VALUE	0x24
+#define GLX_TRANSPARENT_RED_VALUE	0x25
+#define GLX_TRANSPARENT_GREEN_VALUE	0x26
+#define GLX_TRANSPARENT_BLUE_VALUE	0x27
+#define GLX_TRANSPARENT_ALPHA_VALUE	0x28
+#define GLX_WINDOW_BIT			0x00000001
+#define GLX_PIXMAP_BIT			0x00000002
+#define GLX_PBUFFER_BIT			0x00000004
+#define GLX_AUX_BUFFERS_BIT		0x00000010
+#define GLX_FRONT_LEFT_BUFFER_BIT	0x00000001
+#define GLX_FRONT_RIGHT_BUFFER_BIT	0x00000002
+#define GLX_BACK_LEFT_BUFFER_BIT	0x00000004
+#define GLX_BACK_RIGHT_BUFFER_BIT	0x00000008
+#define GLX_DEPTH_BUFFER_BIT		0x00000020
+#define GLX_STENCIL_BUFFER_BIT		0x00000040
+#define GLX_ACCUM_BUFFER_BIT		0x00000080
+#define GLX_NONE			0x8000
+#define GLX_SLOW_CONFIG			0x8001
+#define GLX_TRUE_COLOR			0x8002
+#define GLX_DIRECT_COLOR		0x8003
+#define GLX_PSEUDO_COLOR		0x8004
+#define GLX_STATIC_COLOR		0x8005
+#define GLX_GRAY_SCALE			0x8006
+#define GLX_STATIC_GRAY			0x8007
+#define GLX_TRANSPARENT_RGB		0x8008
+#define GLX_TRANSPARENT_INDEX		0x8009
+#define GLX_VISUAL_ID			0x800B
+#define GLX_SCREEN			0x800C
+#define GLX_NON_CONFORMANT_CONFIG	0x800D
+#define GLX_DRAWABLE_TYPE		0x8010
+#define GLX_RENDER_TYPE			0x8011
+#define GLX_X_RENDERABLE		0x8012
+#define GLX_FBCONFIG_ID			0x8013
+#define GLX_RGBA_TYPE			0x8014
+#define GLX_COLOR_INDEX_TYPE		0x8015
+#define GLX_MAX_PBUFFER_WIDTH		0x8016
+#define GLX_MAX_PBUFFER_HEIGHT		0x8017
+#define GLX_MAX_PBUFFER_PIXELS		0x8018
+#define GLX_PRESERVED_CONTENTS		0x801B
+#define GLX_LARGEST_PBUFFER		0x801C
+#define GLX_WIDTH			0x801D
+#define GLX_HEIGHT			0x801E
+#define GLX_EVENT_MASK			0x801F
+#define GLX_DAMAGED			0x8020
+#define GLX_SAVED			0x8021
+#define GLX_WINDOW			0x8022
+#define GLX_PBUFFER			0x8023
+#define GLX_PBUFFER_HEIGHT              0x8040
+#define GLX_PBUFFER_WIDTH               0x8041
+#define GLX_RGBA_BIT			0x00000001
+#define GLX_COLOR_INDEX_BIT		0x00000002
+#define GLX_PBUFFER_CLOBBER_MASK	0x08000000
+
+
+/*
+ * GLX 1.4 and later:
+ */
+#define GLX_SAMPLE_BUFFERS              0x186a0 /*100000*/
+#define GLX_SAMPLES                     0x186a1 /*100001*/
+
+
+
+typedef struct __GLXcontextRec *GLXContext;
+typedef XID GLXPixmap;
+typedef XID GLXDrawable;
+/* GLX 1.3 and later */
+typedef struct __GLXFBConfigRec *GLXFBConfig;
+typedef XID GLXFBConfigID;
+typedef XID GLXContextID;
+typedef XID GLXWindow;
+typedef XID GLXPbuffer;
+
+
+
+extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
+				     int *attribList );
+
+extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
+				    GLXContext shareList, Bool direct );
+
+extern void glXDestroyContext( Display *dpy, GLXContext ctx );
+
+extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
+			    GLXContext ctx);
+
+extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
+			    unsigned long mask );
+
+extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
+
+extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual,
+				     Pixmap pixmap );
+
+extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
+
+extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event );
+
+extern Bool glXQueryVersion( Display *dpy, int *maj, int *min );
+
+extern Bool glXIsDirect( Display *dpy, GLXContext ctx );
+
+extern int glXGetConfig( Display *dpy, XVisualInfo *visual,
+			 int attrib, int *value );
+
+extern GLXContext glXGetCurrentContext( void );
+
+extern GLXDrawable glXGetCurrentDrawable( void );
+
+extern void glXWaitGL( void );
+
+extern void glXWaitX( void );
+
+extern void glXUseXFont( Font font, int first, int count, int list );
+
+
+
+/* GLX 1.1 and later */
+extern const char *glXQueryExtensionsString( Display *dpy, int screen );
+
+extern const char *glXQueryServerString( Display *dpy, int screen, int name );
+
+extern const char *glXGetClientString( Display *dpy, int name );
+
+
+/* GLX 1.2 and later */
+extern Display *glXGetCurrentDisplay( void );
+
+
+/* GLX 1.3 and later */
+extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
+                                       const int *attribList, int *nitems );
+
+extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
+                                 int attribute, int *value );
+
+extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
+                                     int *nelements );
+
+extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
+                                              GLXFBConfig config );
+
+extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
+                                  Window win, const int *attribList );
+
+extern void glXDestroyWindow( Display *dpy, GLXWindow window );
+
+extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
+                                  Pixmap pixmap, const int *attribList );
+
+extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
+
+extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
+                                    const int *attribList );
+
+extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
+
+extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
+                              unsigned int *value );
+
+extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
+                                       int renderType, GLXContext shareList,
+                                       Bool direct );
+
+extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
+                                   GLXDrawable read, GLXContext ctx );
+
+extern GLXDrawable glXGetCurrentReadDrawable( void );
+
+extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
+                            int *value );
+
+extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
+                            unsigned long mask );
+
+extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
+                                 unsigned long *mask );
+
+
+/* GLX 1.4 and later */
+extern void (*glXGetProcAddress(const GLubyte *procname))( void );
+
+
+#ifndef GLX_GLXEXT_LEGACY
+
+#include <mesa_glxext.h>
+
+#else
+
+
+
+/*
+ * ARB 2. GLX_ARB_get_proc_address
+ */
+#ifndef GLX_ARB_get_proc_address
+#define GLX_ARB_get_proc_address 1
+
+typedef void (*__GLXextFuncPtr)(void);
+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
+
+#endif /* GLX_ARB_get_proc_address */
+
+
+
+#endif /* GLX_GLXEXT_LEGACY */
+
+
+/**
+ ** The following aren't in glxext.h yet.
+ **/
+
+
+/*
+ * ???. GLX_NV_vertex_array_range
+ */
+#ifndef GLX_NV_vertex_array_range
+#define GLX_NV_vertex_array_range
+
+extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
+extern void glXFreeMemoryNV(GLvoid *pointer);
+typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
+typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
+
+#endif /* GLX_NV_vertex_array_range */
+
+
+/*
+ * ???. GLX_MESA_allocate_memory
+ */
+#ifndef GLX_MESA_allocate_memory
+#define GLX_MESA_allocate_memory 1
+
+extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
+extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
+extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer);
+typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
+typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer);
+typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer);
+
+#endif /* GLX_MESA_allocate_memory */
+
+
+/*
+ * ARB ?. GLX_ARB_render_texture
+ * XXX This was never finalized!
+ */
+#ifndef GLX_ARB_render_texture
+#define GLX_ARB_render_texture 1
+
+extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
+extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
+extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList);
+
+#endif /* GLX_ARB_render_texture */
+
+
+#ifndef GLX_ATI_render_texture
+#define GLX_ATI_render_texture 1
+
+extern void glXBindTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
+extern void glXReleaseTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
+extern void glXDrawableAttribATI(Display *dpy, GLXDrawable draw, const int *attribList);
+
+#endif /* GLX_ATI_render_texture */
+
+
+/*
+ * Remove this when glxext.h is updated.
+ */
+#ifndef GLX_NV_float_buffer
+#define GLX_NV_float_buffer 1
+
+#define GLX_FLOAT_COMPONENTS_NV         0x20B0
+
+#endif /* GLX_NV_float_buffer */
+
+
+
+/*
+ * #?. GLX_MESA_swap_frame_usage
+ */
+#ifndef GLX_MESA_swap_frame_usage
+#define GLX_MESA_swap_frame_usage 1
+
+extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage);
+extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
+extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
+extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
+
+typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage);
+typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
+typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
+typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
+
+#endif /* GLX_MESA_swap_frame_usage */
+
+
+
+/*
+ * #?. GLX_MESA_swap_control
+ */
+#ifndef GLX_MESA_swap_control
+#define GLX_MESA_swap_control 1
+
+extern int glXSwapIntervalMESA(unsigned int interval);
+extern int glXGetSwapIntervalMESA(void);
+
+typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
+typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
+
+#endif /* GLX_MESA_swap_control */
+
+
+
+/*
+ * #?. GLX_EXT_texture_from_pixmap
+ * XXX not finished?
+ */
+#ifndef GLX_EXT_texture_from_pixmap
+#define GLX_EXT_texture_from_pixmap 1
+
+#define GLX_BIND_TO_TEXTURE_RGB_EXT        0x20D0
+#define GLX_BIND_TO_TEXTURE_RGBA_EXT       0x20D1
+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT     0x20D2
+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT    0x20D3
+#define GLX_Y_INVERTED_EXT                 0x20D4
+
+#define GLX_TEXTURE_FORMAT_EXT             0x20D5
+#define GLX_TEXTURE_TARGET_EXT             0x20D6
+#define GLX_MIPMAP_TEXTURE_EXT             0x20D7
+
+#define GLX_TEXTURE_FORMAT_NONE_EXT        0x20D8
+#define GLX_TEXTURE_FORMAT_RGB_EXT         0x20D9
+#define GLX_TEXTURE_FORMAT_RGBA_EXT        0x20DA
+
+#define GLX_TEXTURE_1D_BIT_EXT             0x00000001
+#define GLX_TEXTURE_2D_BIT_EXT             0x00000002
+#define GLX_TEXTURE_RECTANGLE_BIT_EXT      0x00000004
+
+#define GLX_TEXTURE_1D_EXT                 0x20DB
+#define GLX_TEXTURE_2D_EXT                 0x20DC
+#define GLX_TEXTURE_RECTANGLE_EXT          0x20DD
+
+#define GLX_FRONT_LEFT_EXT                 0x20DE
+#define GLX_FRONT_RIGHT_EXT                0x20DF
+#define GLX_BACK_LEFT_EXT                  0x20E0
+#define GLX_BACK_RIGHT_EXT                 0x20E1
+#define GLX_FRONT_EXT                      GLX_FRONT_LEFT_EXT
+#define GLX_BACK_EXT                       GLX_BACK_LEFT_EXT
+#define GLX_AUX0_EXT                       0x20E2
+#define GLX_AUX1_EXT                       0x20E3
+#define GLX_AUX2_EXT                       0x20E4
+#define GLX_AUX3_EXT                       0x20E5
+#define GLX_AUX4_EXT                       0x20E6
+#define GLX_AUX5_EXT                       0x20E7
+#define GLX_AUX6_EXT                       0x20E8
+#define GLX_AUX7_EXT                       0x20E9
+#define GLX_AUX8_EXT                       0x20EA
+#define GLX_AUX9_EXT                       0x20EB
+
+extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
+extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer);
+
+#endif /* GLX_EXT_texture_from_pixmap */
+
+
+
+
+/*** Should these go here, or in another header? */
+/*
+** GLX Events
+*/
+typedef struct {
+    int event_type;		/* GLX_DAMAGED or GLX_SAVED */
+    int draw_type;		/* GLX_WINDOW or GLX_PBUFFER */
+    unsigned long serial;	/* # of last request processed by server */
+    Bool send_event;		/* true if this came for SendEvent request */
+    Display *display;		/* display the event was read from */
+    GLXDrawable drawable;	/* XID of Drawable */
+    unsigned int buffer_mask;	/* mask indicating which buffers are affected */
+    unsigned int aux_buffer;	/* which aux buffer was affected */
+    int x, y;
+    int width, height;
+    int count;			/* if nonzero, at least this many more */
+} GLXPbufferClobberEvent;
+
+typedef union __GLXEvent {
+    GLXPbufferClobberEvent glxpbufferclobber;
+    long pad[24];
+} GLXEvent;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: git/target-i386/mesa_glxext.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/mesa_glxext.h	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,785 @@
+#ifndef __glxext_h_
+#define __glxext_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2007 The Khronos Group Inc.
+** 
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+** 
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+** 
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+#define WIN32_LEAN_AND_MEAN 1
+#include <windows.h>
+#endif
+
+#ifndef APIENTRY
+#define APIENTRY
+#endif
+#ifndef APIENTRYP
+#define APIENTRYP APIENTRY *
+#endif
+#ifndef GLAPI
+#define GLAPI extern
+#endif
+
+/*************************************************************/
+
+/* Header file version number, required by OpenGL ABI for Linux */
+/* glxext.h last updated 2007/04/21 */
+/* Current version at http://www.opengl.org/registry/ */
+#define GLX_GLXEXT_VERSION 19
+
+#ifndef GLX_VERSION_1_3
+#define GLX_WINDOW_BIT                     0x00000001
+#define GLX_PIXMAP_BIT                     0x00000002
+#define GLX_PBUFFER_BIT                    0x00000004
+#define GLX_RGBA_BIT                       0x00000001
+#define GLX_COLOR_INDEX_BIT                0x00000002
+#define GLX_PBUFFER_CLOBBER_MASK           0x08000000
+#define GLX_FRONT_LEFT_BUFFER_BIT          0x00000001
+#define GLX_FRONT_RIGHT_BUFFER_BIT         0x00000002
+#define GLX_BACK_LEFT_BUFFER_BIT           0x00000004
+#define GLX_BACK_RIGHT_BUFFER_BIT          0x00000008
+#define GLX_AUX_BUFFERS_BIT                0x00000010
+#define GLX_DEPTH_BUFFER_BIT               0x00000020
+#define GLX_STENCIL_BUFFER_BIT             0x00000040
+#define GLX_ACCUM_BUFFER_BIT               0x00000080
+#define GLX_CONFIG_CAVEAT                  0x20
+#define GLX_X_VISUAL_TYPE                  0x22
+#define GLX_TRANSPARENT_TYPE               0x23
+#define GLX_TRANSPARENT_INDEX_VALUE        0x24
+#define GLX_TRANSPARENT_RED_VALUE          0x25
+#define GLX_TRANSPARENT_GREEN_VALUE        0x26
+#define GLX_TRANSPARENT_BLUE_VALUE         0x27
+#define GLX_TRANSPARENT_ALPHA_VALUE        0x28
+#define GLX_DONT_CARE                      0xFFFFFFFF
+#define GLX_NONE                           0x8000
+#define GLX_SLOW_CONFIG                    0x8001
+#define GLX_TRUE_COLOR                     0x8002
+#define GLX_DIRECT_COLOR                   0x8003
+#define GLX_PSEUDO_COLOR                   0x8004
+#define GLX_STATIC_COLOR                   0x8005
+#define GLX_GRAY_SCALE                     0x8006
+#define GLX_STATIC_GRAY                    0x8007
+#define GLX_TRANSPARENT_RGB                0x8008
+#define GLX_TRANSPARENT_INDEX              0x8009
+#define GLX_VISUAL_ID                      0x800B
+#define GLX_SCREEN                         0x800C
+#define GLX_NON_CONFORMANT_CONFIG          0x800D
+#define GLX_DRAWABLE_TYPE                  0x8010
+#define GLX_RENDER_TYPE                    0x8011
+#define GLX_X_RENDERABLE                   0x8012
+#define GLX_FBCONFIG_ID                    0x8013
+#define GLX_RGBA_TYPE                      0x8014
+#define GLX_COLOR_INDEX_TYPE               0x8015
+#define GLX_MAX_PBUFFER_WIDTH              0x8016
+#define GLX_MAX_PBUFFER_HEIGHT             0x8017
+#define GLX_MAX_PBUFFER_PIXELS             0x8018
+#define GLX_PRESERVED_CONTENTS             0x801B
+#define GLX_LARGEST_PBUFFER                0x801C
+#define GLX_WIDTH                          0x801D
+#define GLX_HEIGHT                         0x801E
+#define GLX_EVENT_MASK                     0x801F
+#define GLX_DAMAGED                        0x8020
+#define GLX_SAVED                          0x8021
+#define GLX_WINDOW                         0x8022
+#define GLX_PBUFFER                        0x8023
+#define GLX_PBUFFER_HEIGHT                 0x8040
+#define GLX_PBUFFER_WIDTH                  0x8041
+#endif
+
+#ifndef GLX_VERSION_1_4
+#define GLX_SAMPLE_BUFFERS                 100000
+#define GLX_SAMPLES                        100001
+#endif
+
+#ifndef GLX_ARB_get_proc_address
+#endif
+
+#ifndef GLX_ARB_multisample
+#define GLX_SAMPLE_BUFFERS_ARB             100000
+#define GLX_SAMPLES_ARB                    100001
+#endif
+
+#ifndef GLX_ARB_fbconfig_float
+#define GLX_RGBA_FLOAT_TYPE_ARB            0x20B9
+#define GLX_RGBA_FLOAT_BIT_ARB             0x00000004
+#endif
+
+#ifndef GLX_SGIS_multisample
+#define GLX_SAMPLE_BUFFERS_SGIS            100000
+#define GLX_SAMPLES_SGIS                   100001
+#endif
+
+#ifndef GLX_EXT_visual_info
+#define GLX_X_VISUAL_TYPE_EXT              0x22
+#define GLX_TRANSPARENT_TYPE_EXT           0x23
+#define GLX_TRANSPARENT_INDEX_VALUE_EXT    0x24
+#define GLX_TRANSPARENT_RED_VALUE_EXT      0x25
+#define GLX_TRANSPARENT_GREEN_VALUE_EXT    0x26
+#define GLX_TRANSPARENT_BLUE_VALUE_EXT     0x27
+#define GLX_TRANSPARENT_ALPHA_VALUE_EXT    0x28
+#define GLX_NONE_EXT                       0x8000
+#define GLX_TRUE_COLOR_EXT                 0x8002
+#define GLX_DIRECT_COLOR_EXT               0x8003
+#define GLX_PSEUDO_COLOR_EXT               0x8004
+#define GLX_STATIC_COLOR_EXT               0x8005
+#define GLX_GRAY_SCALE_EXT                 0x8006
+#define GLX_STATIC_GRAY_EXT                0x8007
+#define GLX_TRANSPARENT_RGB_EXT            0x8008
+#define GLX_TRANSPARENT_INDEX_EXT          0x8009
+#endif
+
+#ifndef GLX_SGI_swap_control
+#endif
+
+#ifndef GLX_SGI_video_sync
+#endif
+
+#ifndef GLX_SGI_make_current_read
+#endif
+
+#ifndef GLX_SGIX_video_source
+#endif
+
+#ifndef GLX_EXT_visual_rating
+#define GLX_VISUAL_CAVEAT_EXT              0x20
+#define GLX_SLOW_VISUAL_EXT                0x8001
+#define GLX_NON_CONFORMANT_VISUAL_EXT      0x800D
+/* reuse GLX_NONE_EXT */
+#endif
+
+#ifndef GLX_EXT_import_context
+#define GLX_SHARE_CONTEXT_EXT              0x800A
+#define GLX_VISUAL_ID_EXT                  0x800B
+#define GLX_SCREEN_EXT                     0x800C
+#endif
+
+#ifndef GLX_SGIX_fbconfig
+#define GLX_WINDOW_BIT_SGIX                0x00000001
+#define GLX_PIXMAP_BIT_SGIX                0x00000002
+#define GLX_RGBA_BIT_SGIX                  0x00000001
+#define GLX_COLOR_INDEX_BIT_SGIX           0x00000002
+#define GLX_DRAWABLE_TYPE_SGIX             0x8010
+#define GLX_RENDER_TYPE_SGIX               0x8011
+#define GLX_X_RENDERABLE_SGIX              0x8012
+#define GLX_FBCONFIG_ID_SGIX               0x8013
+#define GLX_RGBA_TYPE_SGIX                 0x8014
+#define GLX_COLOR_INDEX_TYPE_SGIX          0x8015
+/* reuse GLX_SCREEN_EXT */
+#endif
+
+#ifndef GLX_SGIX_pbuffer
+#define GLX_PBUFFER_BIT_SGIX               0x00000004
+#define GLX_BUFFER_CLOBBER_MASK_SGIX       0x08000000
+#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX     0x00000001
+#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX    0x00000002
+#define GLX_BACK_LEFT_BUFFER_BIT_SGIX      0x00000004
+#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX     0x00000008
+#define GLX_AUX_BUFFERS_BIT_SGIX           0x00000010
+#define GLX_DEPTH_BUFFER_BIT_SGIX          0x00000020
+#define GLX_STENCIL_BUFFER_BIT_SGIX        0x00000040
+#define GLX_ACCUM_BUFFER_BIT_SGIX          0x00000080
+#define GLX_SAMPLE_BUFFERS_BIT_SGIX        0x00000100
+#define GLX_MAX_PBUFFER_WIDTH_SGIX         0x8016
+#define GLX_MAX_PBUFFER_HEIGHT_SGIX        0x8017
+#define GLX_MAX_PBUFFER_PIXELS_SGIX        0x8018
+#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX     0x8019
+#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX    0x801A
+#define GLX_PRESERVED_CONTENTS_SGIX        0x801B
+#define GLX_LARGEST_PBUFFER_SGIX           0x801C
+#define GLX_WIDTH_SGIX                     0x801D
+#define GLX_HEIGHT_SGIX                    0x801E
+#define GLX_EVENT_MASK_SGIX                0x801F
+#define GLX_DAMAGED_SGIX                   0x8020
+#define GLX_SAVED_SGIX                     0x8021
+#define GLX_WINDOW_SGIX                    0x8022
+#define GLX_PBUFFER_SGIX                   0x8023
+#endif
+
+#ifndef GLX_SGI_cushion
+#endif
+
+#ifndef GLX_SGIX_video_resize
+#define GLX_SYNC_FRAME_SGIX                0x00000000
+#define GLX_SYNC_SWAP_SGIX                 0x00000001
+#endif
+
+#ifndef GLX_SGIX_dmbuffer
+#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX     0x8024
+#endif
+
+#ifndef GLX_SGIX_swap_group
+#endif
+
+#ifndef GLX_SGIX_swap_barrier
+#endif
+
+#ifndef GLX_SGIS_blended_overlay
+#define GLX_BLENDED_RGBA_SGIS              0x8025
+#endif
+
+#ifndef GLX_SGIS_shared_multisample
+#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
+#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
+#endif
+
+#ifndef GLX_SUN_get_transparent_index
+#endif
+
+#ifndef GLX_3DFX_multisample
+#define GLX_SAMPLE_BUFFERS_3DFX            0x8050
+#define GLX_SAMPLES_3DFX                   0x8051
+#endif
+
+#ifndef GLX_MESA_copy_sub_buffer
+#endif
+
+#ifndef GLX_MESA_pixmap_colormap
+#endif
+
+#ifndef GLX_MESA_release_buffers
+#endif
+
+#ifndef GLX_MESA_set_3dfx_mode
+#define GLX_3DFX_WINDOW_MODE_MESA          0x1
+#define GLX_3DFX_FULLSCREEN_MODE_MESA      0x2
+#endif
+
+#ifndef GLX_SGIX_visual_select_group
+#define GLX_VISUAL_SELECT_GROUP_SGIX       0x8028
+#endif
+
+#ifndef GLX_OML_swap_method
+#define GLX_SWAP_METHOD_OML                0x8060
+#define GLX_SWAP_EXCHANGE_OML              0x8061
+#define GLX_SWAP_COPY_OML                  0x8062
+#define GLX_SWAP_UNDEFINED_OML             0x8063
+#endif
+
+#ifndef GLX_OML_sync_control
+#endif
+
+#ifndef GLX_NV_float_buffer
+#define GLX_FLOAT_COMPONENTS_NV            0x20B0
+#endif
+
+#ifndef GLX_SGIX_hyperpipe
+#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
+#define GLX_BAD_HYPERPIPE_CONFIG_SGIX      91
+#define GLX_BAD_HYPERPIPE_SGIX             92
+#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX    0x00000001
+#define GLX_HYPERPIPE_RENDER_PIPE_SGIX     0x00000002
+#define GLX_PIPE_RECT_SGIX                 0x00000001
+#define GLX_PIPE_RECT_LIMITS_SGIX          0x00000002
+#define GLX_HYPERPIPE_STEREO_SGIX          0x00000003
+#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX   0x00000004
+#define GLX_HYPERPIPE_ID_SGIX              0x8030
+#endif
+
+#ifndef GLX_MESA_agp_offset
+#endif
+
+#ifndef GLX_EXT_fbconfig_packed_float
+#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT   0x20B1
+#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT    0x00000008
+#endif
+
+#ifndef GLX_EXT_framebuffer_sRGB
+#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT   0x20B2
+#endif
+
+#ifndef GLX_EXT_texture_from_pixmap
+#define GLX_TEXTURE_1D_BIT_EXT             0x00000001
+#define GLX_TEXTURE_2D_BIT_EXT             0x00000002
+#define GLX_TEXTURE_RECTANGLE_BIT_EXT      0x00000004
+#define GLX_BIND_TO_TEXTURE_RGB_EXT        0x20D0
+#define GLX_BIND_TO_TEXTURE_RGBA_EXT       0x20D1
+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT     0x20D2
+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT    0x20D3
+#define GLX_Y_INVERTED_EXT                 0x20D4
+#define GLX_TEXTURE_FORMAT_EXT             0x20D5
+#define GLX_TEXTURE_TARGET_EXT             0x20D6
+#define GLX_MIPMAP_TEXTURE_EXT             0x20D7
+#define GLX_TEXTURE_FORMAT_NONE_EXT        0x20D8
+#define GLX_TEXTURE_FORMAT_RGB_EXT         0x20D9
+#define GLX_TEXTURE_FORMAT_RGBA_EXT        0x20DA
+#define GLX_TEXTURE_1D_EXT                 0x20DB
+#define GLX_TEXTURE_2D_EXT                 0x20DC
+#define GLX_TEXTURE_RECTANGLE_EXT          0x20DD
+#define GLX_FRONT_LEFT_EXT                 0x20DE
+#define GLX_FRONT_RIGHT_EXT                0x20DF
+#define GLX_BACK_LEFT_EXT                  0x20E0
+#define GLX_BACK_RIGHT_EXT                 0x20E1
+#define GLX_FRONT_EXT                      GLX_FRONT_LEFT_EXT
+#define GLX_BACK_EXT                       GLX_BACK_LEFT_EXT
+#define GLX_AUX0_EXT                       0x20E2
+#define GLX_AUX1_EXT                       0x20E3
+#define GLX_AUX2_EXT                       0x20E4
+#define GLX_AUX3_EXT                       0x20E5
+#define GLX_AUX4_EXT                       0x20E6
+#define GLX_AUX5_EXT                       0x20E7
+#define GLX_AUX6_EXT                       0x20E8
+#define GLX_AUX7_EXT                       0x20E9
+#define GLX_AUX8_EXT                       0x20EA
+#define GLX_AUX9_EXT                       0x20EB
+#endif
+
+
+/*************************************************************/
+
+#ifndef GLX_ARB_get_proc_address
+typedef void (*__GLXextFuncPtr)(void);
+#endif
+
+#ifndef GLX_SGIX_video_source
+typedef XID GLXVideoSourceSGIX;
+#endif
+
+#ifndef GLX_SGIX_fbconfig
+typedef XID GLXFBConfigIDSGIX;
+typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
+#endif
+
+#ifndef GLX_SGIX_pbuffer
+typedef XID GLXPbufferSGIX;
+typedef struct {
+    int type;
+    unsigned long serial;	  /* # of last request processed by server */
+    Bool send_event;		  /* true if this came for SendEvent request */
+    Display *display;		  /* display the event was read from */
+    GLXDrawable drawable;	  /* i.d. of Drawable */
+    int event_type;		  /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
+    int draw_type;		  /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
+    unsigned int mask;	  /* mask indicating which buffers are affected*/
+    int x, y;
+    int width, height;
+    int count;		  /* if nonzero, at least this many more */
+} GLXBufferClobberEventSGIX;
+#endif
+
+#ifndef GLEXT_64_TYPES_DEFINED
+/* This code block is duplicated in glxext.h, so must be protected */
+#define GLEXT_64_TYPES_DEFINED
+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
+/* (as used in the GLX_OML_sync_control extension). */
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#include <inttypes.h>
+#elif defined(__sun__) || defined(__digital__)
+#include <inttypes.h>
+#if defined(__STDC__)
+#if defined(__arch64__)
+typedef long int int64_t;
+typedef unsigned long int uint64_t;
+#else
+typedef long long int int64_t;
+typedef unsigned long long int uint64_t;
+#endif /* __arch64__ */
+#endif /* __STDC__ */
+#elif defined( __VMS )
+#include <inttypes.h>
+#elif defined(__SCO__) || defined(__USLC__)
+#include <stdint.h>
+#elif defined(__UNIXOS2__) || defined(__SOL64__)
+typedef long int int32_t;
+typedef long long int int64_t;
+typedef unsigned long long int uint64_t;
+#elif defined(_WIN32) && defined(__GNUC__)
+#include <stdint.h>
+#elif defined(_WIN32)
+typedef __int32 int32_t;
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#else
+#include <inttypes.h>     /* Fallback option */
+#endif
+#endif
+
+#ifndef GLX_VERSION_1_3
+#define GLX_VERSION_1_3 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
+extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
+extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
+extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
+extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
+extern void glXDestroyWindow (Display *, GLXWindow);
+extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
+extern void glXDestroyPixmap (Display *, GLXPixmap);
+extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
+extern void glXDestroyPbuffer (Display *, GLXPbuffer);
+extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
+extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
+extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
+extern GLXDrawable glXGetCurrentReadDrawable (void);
+extern Display * glXGetCurrentDisplay (void);
+extern int glXQueryContext (Display *, GLXContext, int, int *);
+extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
+extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
+typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
+typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
+typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
+typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
+typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
+typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
+typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
+typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
+typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
+typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
+typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
+typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
+typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
+typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
+typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
+#endif
+
+#ifndef GLX_VERSION_1_4
+#define GLX_VERSION_1_4 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
+#endif
+
+#ifndef GLX_ARB_get_proc_address
+#define GLX_ARB_get_proc_address 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
+#endif
+
+#ifndef GLX_ARB_multisample
+#define GLX_ARB_multisample 1
+#endif
+
+#ifndef GLX_ARB_fbconfig_float
+#define GLX_ARB_fbconfig_float 1
+#endif
+
+#ifndef GLX_SGIS_multisample
+#define GLX_SGIS_multisample 1
+#endif
+
+#ifndef GLX_EXT_visual_info
+#define GLX_EXT_visual_info 1
+#endif
+
+#ifndef GLX_SGI_swap_control
+#define GLX_SGI_swap_control 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern int glXSwapIntervalSGI (int);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
+#endif
+
+#ifndef GLX_SGI_video_sync
+#define GLX_SGI_video_sync 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern int glXGetVideoSyncSGI (unsigned int *);
+extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
+typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
+#endif
+
+#ifndef GLX_SGI_make_current_read
+#define GLX_SGI_make_current_read 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
+extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
+#endif
+
+#ifndef GLX_SGIX_video_source
+#define GLX_SGIX_video_source 1
+#ifdef _VL_H
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
+extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
+typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
+#endif /* _VL_H */
+#endif
+
+#ifndef GLX_EXT_visual_rating
+#define GLX_EXT_visual_rating 1
+#endif
+
+#ifndef GLX_EXT_import_context
+#define GLX_EXT_import_context 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern Display * glXGetCurrentDisplayEXT (void);
+extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
+extern GLXContextID glXGetContextIDEXT (const GLXContext);
+extern GLXContext glXImportContextEXT (Display *, GLXContextID);
+extern void glXFreeContextEXT (Display *, GLXContext);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
+typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
+typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
+typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
+typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
+#endif
+
+#ifndef GLX_SGIX_fbconfig
+#define GLX_SGIX_fbconfig 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
+extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
+extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
+extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
+extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
+extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
+typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
+typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
+typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
+#endif
+
+#ifndef GLX_SGIX_pbuffer
+#define GLX_SGIX_pbuffer 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
+extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
+extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
+extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
+extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
+typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
+typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
+typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
+typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
+#endif
+
+#ifndef GLX_SGI_cushion
+#define GLX_SGI_cushion 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern void glXCushionSGI (Display *, Window, float);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
+#endif
+
+#ifndef GLX_SGIX_video_resize
+#define GLX_SGIX_video_resize 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
+extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
+extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
+extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
+extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
+typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
+typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
+typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
+typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
+#endif
+
+#ifndef GLX_SGIX_dmbuffer
+#define GLX_SGIX_dmbuffer 1
+#ifdef _DM_BUFFER_H_
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
+#endif /* _DM_BUFFER_H_ */
+#endif
+
+#ifndef GLX_SGIX_swap_group
+#define GLX_SGIX_swap_group 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
+#endif
+
+#ifndef GLX_SGIX_swap_barrier
+#define GLX_SGIX_swap_barrier 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
+extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
+typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
+#endif
+
+#ifndef GLX_SUN_get_transparent_index
+#define GLX_SUN_get_transparent_index 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
+#endif
+
+#ifndef GLX_MESA_copy_sub_buffer
+#define GLX_MESA_copy_sub_buffer 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
+#endif
+
+#ifndef GLX_MESA_pixmap_colormap
+#define GLX_MESA_pixmap_colormap 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
+#endif
+
+#ifndef GLX_MESA_release_buffers
+#define GLX_MESA_release_buffers 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
+#endif
+
+#ifndef GLX_MESA_set_3dfx_mode
+#define GLX_MESA_set_3dfx_mode 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern Bool glXSet3DfxModeMESA (int);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
+#endif
+
+#ifndef GLX_SGIX_visual_select_group
+#define GLX_SGIX_visual_select_group 1
+#endif
+
+#ifndef GLX_OML_swap_method
+#define GLX_OML_swap_method 1
+#endif
+
+#ifndef GLX_OML_sync_control
+#define GLX_OML_sync_control 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
+extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
+extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
+extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
+extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
+typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
+typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
+typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
+typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
+#endif
+
+#ifndef GLX_NV_float_buffer
+#define GLX_NV_float_buffer 1
+#endif
+
+#ifndef GLX_SGIX_hyperpipe
+#define GLX_SGIX_hyperpipe 1
+
+typedef struct {
+    char    pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
+    int     networkId;
+} GLXHyperpipeNetworkSGIX;
+
+typedef struct {
+    char    pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
+    int     channel;
+    unsigned int
+      participationType;
+    int     timeSlice;
+} GLXHyperpipeConfigSGIX;
+
+typedef struct {
+    char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
+    int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
+    int destXOrigin, destYOrigin, destWidth, destHeight;
+} GLXPipeRect;
+
+typedef struct {
+    char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
+    int XOrigin, YOrigin, maxHeight, maxWidth;
+} GLXPipeRectLimits;
+
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
+extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
+extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
+extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
+extern int glXBindHyperpipeSGIX (Display *, int);
+extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
+extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
+extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
+typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
+typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
+typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
+typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
+typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
+typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
+typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
+#endif
+
+#ifndef GLX_MESA_agp_offset
+#define GLX_MESA_agp_offset 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern unsigned int glXGetAGPOffsetMESA (const void *);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
+#endif
+
+#ifndef GLX_EXT_fbconfig_packed_float
+#define GLX_EXT_fbconfig_packed_float 1
+#endif
+
+#ifndef GLX_EXT_framebuffer_sRGB
+#define GLX_EXT_framebuffer_sRGB 1
+#endif
+
+#ifndef GLX_EXT_texture_from_pixmap
+#define GLX_EXT_texture_from_pixmap 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *);
+extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
+typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: git/target-i386/mesa_mipmap.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/mesa_mipmap.c	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,824 @@
+
+/*
+ * Mesa 3-D graphics library
+ * Version:  3.4
+ * Copyright (C) 1995-2000  Brian Paul
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#ifdef PC_HEADER
+#include "all.h"
+#else
+#include <assert.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+//#include "gluP.h"
+#endif
+
+
+/*
+ * Compute ceiling of integer quotient of A divided by B:
+ */
+#define CEILING( A, B )  ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
+
+
+
+#ifdef EPSILON
+#undef EPSILON
+#endif
+#define EPSILON 0.001
+
+
+/* To work around optimizer bug in MSVC4.1 */
+#if defined(__WIN32__) && !defined(OPENSTEP)
+void
+dummy(GLuint j, GLuint k)
+{
+}
+#else
+#define dummy(J, K)
+#endif
+
+
+static GLint GLAPIENTRY
+mesa_gluScaleImage(GLenum format,
+	      GLsizei widthin, GLsizei heightin,
+	      GLenum typein, const void *datain,
+	      GLsizei widthout, GLsizei heightout,
+	      GLenum typeout, void *dataout)
+{
+   GLint components, i, j, k;
+   GLfloat *tempin, *tempout;
+   GLfloat sx, sy;
+   GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
+   GLint packrowlength, packalignment, packskiprows, packskippixels;
+   GLint sizein, sizeout;
+   GLint rowstride, rowlen;
+
+
+   /* Determine number of components per pixel */
+   switch (format) {
+   case GL_COLOR_INDEX:
+   case GL_STENCIL_INDEX:
+   case GL_DEPTH_COMPONENT:
+   case GL_RED:
+   case GL_GREEN:
+   case GL_BLUE:
+   case GL_ALPHA:
+   case GL_LUMINANCE:
+      components = 1;
+      break;
+   case GL_LUMINANCE_ALPHA:
+      components = 2;
+      break;
+   case GL_RGB:
+   case GL_BGR:
+      components = 3;
+      break;
+   case GL_RGBA:
+   case GL_BGRA:
+#ifdef GL_EXT_abgr
+   case GL_ABGR_EXT:
+#endif
+      components = 4;
+      break;
+   default:
+      return GLU_INVALID_ENUM;
+   }
+
+   /* Determine bytes per input datum */
+   switch (typein) {
+   case GL_UNSIGNED_BYTE:
+      sizein = sizeof(GLubyte);
+      break;
+   case GL_BYTE:
+      sizein = sizeof(GLbyte);
+      break;
+   case GL_UNSIGNED_SHORT:
+      sizein = sizeof(GLushort);
+      break;
+   case GL_SHORT:
+      sizein = sizeof(GLshort);
+      break;
+   case GL_UNSIGNED_INT:
+      sizein = sizeof(GLuint);
+      break;
+   case GL_INT:
+      sizein = sizeof(GLint);
+      break;
+   case GL_FLOAT:
+      sizein = sizeof(GLfloat);
+      break;
+   case GL_BITMAP:
+      /* not implemented yet */
+   default:
+      return GL_INVALID_ENUM;
+   }
+
+   /* Determine bytes per output datum */
+   switch (typeout) {
+   case GL_UNSIGNED_BYTE:
+      sizeout = sizeof(GLubyte);
+      break;
+   case GL_BYTE:
+      sizeout = sizeof(GLbyte);
+      break;
+   case GL_UNSIGNED_SHORT:
+      sizeout = sizeof(GLushort);
+      break;
+   case GL_SHORT:
+      sizeout = sizeof(GLshort);
+      break;
+   case GL_UNSIGNED_INT:
+      sizeout = sizeof(GLuint);
+      break;
+   case GL_INT:
+      sizeout = sizeof(GLint);
+      break;
+   case GL_FLOAT:
+      sizeout = sizeof(GLfloat);
+      break;
+   case GL_BITMAP:
+      /* not implemented yet */
+   default:
+      return GL_INVALID_ENUM;
+   }
+
+   /* Get glPixelStore state */
+   glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
+   glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
+   glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
+   glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
+   glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
+   glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
+   glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
+   glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
+
+   /* Allocate storage for intermediate images */
+   tempin = (GLfloat *) malloc(widthin * heightin
+			       * components * sizeof(GLfloat));
+   if (!tempin) {
+      return GLU_OUT_OF_MEMORY;
+   }
+   tempout = (GLfloat *) malloc(widthout * heightout
+				* components * sizeof(GLfloat));
+   if (!tempout) {
+      free(tempin);
+      return GLU_OUT_OF_MEMORY;
+   }
+
+
+   /*
+    * Unpack the pixel data and convert to floating point
+    */
+
+   if (unpackrowlength > 0) {
+      rowlen = unpackrowlength;
+   }
+   else {
+      rowlen = widthin;
+   }
+   if (sizein >= unpackalignment) {
+      rowstride = components * rowlen;
+   }
+   else {
+      rowstride = unpackalignment / sizein
+	 * CEILING(components * rowlen * sizein, unpackalignment);
+   }
+
+   switch (typein) {
+   case GL_UNSIGNED_BYTE:
+      k = 0;
+      for (i = 0; i < heightin; i++) {
+	 GLubyte *ubptr = (GLubyte *) datain
+	    + i * rowstride
+	    + unpackskiprows * rowstride + unpackskippixels * components;
+	 for (j = 0; j < widthin * components; j++) {
+	    dummy(j, k);
+	    tempin[k++] = (GLfloat) * ubptr++;
+	 }
+      }
+      break;
+   case GL_BYTE:
+      k = 0;
+      for (i = 0; i < heightin; i++) {
+	 GLbyte *bptr = (GLbyte *) datain
+	    + i * rowstride
+	    + unpackskiprows * rowstride + unpackskippixels * components;
+	 for (j = 0; j < widthin * components; j++) {
+	    dummy(j, k);
+	    tempin[k++] = (GLfloat) * bptr++;
+	 }
+      }
+      break;
+   case GL_UNSIGNED_SHORT:
+      k = 0;
+      for (i = 0; i < heightin; i++) {
+	 GLushort *usptr = (GLushort *) datain
+	    + i * rowstride
+	    + unpackskiprows * rowstride + unpackskippixels * components;
+	 for (j = 0; j < widthin * components; j++) {
+	    dummy(j, k);
+	    tempin[k++] = (GLfloat) * usptr++;
+	 }
+      }
+      break;
+   case GL_SHORT:
+      k = 0;
+      for (i = 0; i < heightin; i++) {
+	 GLshort *sptr = (GLshort *) datain
+	    + i * rowstride
+	    + unpackskiprows * rowstride + unpackskippixels * components;
+	 for (j = 0; j < widthin * components; j++) {
+	    dummy(j, k);
+	    tempin[k++] = (GLfloat) * sptr++;
+	 }
+      }
+      break;
+   case GL_UNSIGNED_INT:
+      k = 0;
+      for (i = 0; i < heightin; i++) {
+	 GLuint *uiptr = (GLuint *) datain
+	    + i * rowstride
+	    + unpackskiprows * rowstride + unpackskippixels * components;
+	 for (j = 0; j < widthin * components; j++) {
+	    dummy(j, k);
+	    tempin[k++] = (GLfloat) * uiptr++;
+	 }
+      }
+      break;
+   case GL_INT:
+      k = 0;
+      for (i = 0; i < heightin; i++) {
+	 GLint *iptr = (GLint *) datain
+	    + i * rowstride
+	    + unpackskiprows * rowstride + unpackskippixels * components;
+	 for (j = 0; j < widthin * components; j++) {
+	    dummy(j, k);
+	    tempin[k++] = (GLfloat) * iptr++;
+	 }
+      }
+      break;
+   case GL_FLOAT:
+      k = 0;
+      for (i = 0; i < heightin; i++) {
+	 GLfloat *fptr = (GLfloat *) datain
+	    + i * rowstride
+	    + unpackskiprows * rowstride + unpackskippixels * components;
+	 for (j = 0; j < widthin * components; j++) {
+	    dummy(j, k);
+	    tempin[k++] = *fptr++;
+	 }
+      }
+      break;
+   default:
+      return GLU_INVALID_ENUM;
+   }
+
+
+   /*
+    * Scale the image!
+    */
+
+   if (widthout > 1)
+      sx = (GLfloat) (widthin - 1) / (GLfloat) (widthout - 1);
+   else
+      sx = (GLfloat) (widthin - 1);
+   if (heightout > 1)
+      sy = (GLfloat) (heightin - 1) / (GLfloat) (heightout - 1);
+   else
+      sy = (GLfloat) (heightin - 1);
+
+/*#define POINT_SAMPLE*/
+#ifdef POINT_SAMPLE
+   for (i = 0; i < heightout; i++) {
+      GLint ii = i * sy;
+      for (j = 0; j < widthout; j++) {
+	 GLint jj = j * sx;
+
+	 GLfloat *src = tempin + (ii * widthin + jj) * components;
+	 GLfloat *dst = tempout + (i * widthout + j) * components;
+
+	 for (k = 0; k < components; k++) {
+	    *dst++ = *src++;
+	 }
+      }
+   }
+#else
+   if (sx < 1.0 && sy < 1.0) {
+      /* magnify both width and height:  use weighted sample of 4 pixels */
+      GLint i0, i1, j0, j1;
+      GLfloat alpha, beta;
+      GLfloat *src00, *src01, *src10, *src11;
+      GLfloat s1, s2;
+      GLfloat *dst;
+
+      for (i = 0; i < heightout; i++) {
+	 i0 = i * sy;
+	 i1 = i0 + 1;
+	 if (i1 >= heightin)
+	    i1 = heightin - 1;
+/*	 i1 = (i+1) * sy - EPSILON;*/
+	 alpha = i * sy - i0;
+	 for (j = 0; j < widthout; j++) {
+	    j0 = j * sx;
+	    j1 = j0 + 1;
+	    if (j1 >= widthin)
+	       j1 = widthin - 1;
+/*	    j1 = (j+1) * sx - EPSILON; */
+	    beta = j * sx - j0;
+
+	    /* compute weighted average of pixels in rect (i0,j0)-(i1,j1) */
+	    src00 = tempin + (i0 * widthin + j0) * components;
+	    src01 = tempin + (i0 * widthin + j1) * components;
+	    src10 = tempin + (i1 * widthin + j0) * components;
+	    src11 = tempin + (i1 * widthin + j1) * components;
+
+	    dst = tempout + (i * widthout + j) * components;
+
+	    for (k = 0; k < components; k++) {
+	       s1 = *src00++ * (1.0 - beta) + *src01++ * beta;
+	       s2 = *src10++ * (1.0 - beta) + *src11++ * beta;
+	       *dst++ = s1 * (1.0 - alpha) + s2 * alpha;
+	    }
+	 }
+      }
+   }
+   else {
+      /* shrink width and/or height:  use an unweighted box filter */
+      GLint i0, i1;
+      GLint j0, j1;
+      GLint ii, jj;
+      GLfloat sum, *dst;
+
+      for (i = 0; i < heightout; i++) {
+	 i0 = i * sy;
+	 i1 = i0 + 1;
+	 if (i1 >= heightin)
+	    i1 = heightin - 1;
+/*	 i1 = (i+1) * sy - EPSILON; */
+	 for (j = 0; j < widthout; j++) {
+	    j0 = j * sx;
+	    j1 = j0 + 1;
+	    if (j1 >= widthin)
+	       j1 = widthin - 1;
+/*	    j1 = (j+1) * sx - EPSILON; */
+
+	    dst = tempout + (i * widthout + j) * components;
+
+	    /* compute average of pixels in the rectangle (i0,j0)-(i1,j1) */
+	    for (k = 0; k < components; k++) {
+	       sum = 0.0;
+	       for (ii = i0; ii <= i1; ii++) {
+		  for (jj = j0; jj <= j1; jj++) {
+		     sum += *(tempin + (ii * widthin + jj) * components + k);
+		  }
+	       }
+	       sum /= (j1 - j0 + 1) * (i1 - i0 + 1);
+	       *dst++ = sum;
+	    }
+	 }
+      }
+   }
+#endif
+
+
+   /*
+    * Return output image
+    */
+
+   if (packrowlength > 0) {
+      rowlen = packrowlength;
+   }
+   else {
+      rowlen = widthout;
+   }
+   if (sizeout >= packalignment) {
+      rowstride = components * rowlen;
+   }
+   else {
+      rowstride = packalignment / sizeout
+	 * CEILING(components * rowlen * sizeout, packalignment);
+   }
+
+   switch (typeout) {
+   case GL_UNSIGNED_BYTE:
+      k = 0;
+      for (i = 0; i < heightout; i++) {
+	 GLubyte *ubptr = (GLubyte *) dataout
+	    + i * rowstride
+	    + packskiprows * rowstride + packskippixels * components;
+	 for (j = 0; j < widthout * components; j++) {
+	    dummy(j, k + i);
+	    *ubptr++ = (GLubyte) tempout[k++];
+	 }
+      }
+      break;
+   case GL_BYTE:
+      k = 0;
+      for (i = 0; i < heightout; i++) {
+	 GLbyte *bptr = (GLbyte *) dataout
+	    + i * rowstride
+	    + packskiprows * rowstride + packskippixels * components;
+	 for (j = 0; j < widthout * components; j++) {
+	    dummy(j, k + i);
+	    *bptr++ = (GLbyte) tempout[k++];
+	 }
+      }
+      break;
+   case GL_UNSIGNED_SHORT:
+      k = 0;
+      for (i = 0; i < heightout; i++) {
+	 GLushort *usptr = (GLushort *) dataout
+	    + i * rowstride
+	    + packskiprows * rowstride + packskippixels * components;
+	 for (j = 0; j < widthout * components; j++) {
+	    dummy(j, k + i);
+	    *usptr++ = (GLushort) tempout[k++];
+	 }
+      }
+      break;
+   case GL_SHORT:
+      k = 0;
+      for (i = 0; i < heightout; i++) {
+	 GLshort *sptr = (GLshort *) dataout
+	    + i * rowstride
+	    + packskiprows * rowstride + packskippixels * components;
+	 for (j = 0; j < widthout * components; j++) {
+	    dummy(j, k + i);
+	    *sptr++ = (GLshort) tempout[k++];
+	 }
+      }
+      break;
+   case GL_UNSIGNED_INT:
+      k = 0;
+      for (i = 0; i < heightout; i++) {
+	 GLuint *uiptr = (GLuint *) dataout
+	    + i * rowstride
+	    + packskiprows * rowstride + packskippixels * components;
+	 for (j = 0; j < widthout * components; j++) {
+	    dummy(j, k + i);
+	    *uiptr++ = (GLuint) tempout[k++];
+	 }
+      }
+      break;
+   case GL_INT:
+      k = 0;
+      for (i = 0; i < heightout; i++) {
+	 GLint *iptr = (GLint *) dataout
+	    + i * rowstride
+	    + packskiprows * rowstride + packskippixels * components;
+	 for (j = 0; j < widthout * components; j++) {
+	    dummy(j, k + i);
+	    *iptr++ = (GLint) tempout[k++];
+	 }
+      }
+      break;
+   case GL_FLOAT:
+      k = 0;
+      for (i = 0; i < heightout; i++) {
+	 GLfloat *fptr = (GLfloat *) dataout
+	    + i * rowstride
+	    + packskiprows * rowstride + packskippixels * components;
+	 for (j = 0; j < widthout * components; j++) {
+	    dummy(j, k + i);
+	    *fptr++ = tempout[k++];
+	 }
+      }
+      break;
+   default:
+      return GLU_INVALID_ENUM;
+   }
+
+
+   /* free temporary image storage */
+   free(tempin);
+   free(tempout);
+
+   return 0;
+}
+
+
+
+/*
+ * Return the largest k such that 2^k <= n.
+ */
+static GLint
+ilog2(GLint n)
+{
+   GLint k;
+
+   if (n <= 0)
+      return 0;
+   for (k = 0; n >>= 1; k++);
+   return k;
+}
+
+
+
+/*
+ * Find the value nearest to n which is also a power of two.
+ */
+static GLint
+round2(GLint n)
+{
+   GLint m;
+
+   for (m = 1; m < n; m *= 2);
+
+   /* m>=n */
+   if (m - n <= n - m / 2) {
+      return m;
+   }
+   else {
+      return m / 2;
+   }
+}
+
+
+/*
+ * Given an pixel format and datatype, return the number of bytes to
+ * store one pixel.
+ */
+static GLint
+bytes_per_pixel(GLenum format, GLenum type)
+{
+   GLint n, m;
+
+   switch (format) {
+   case GL_COLOR_INDEX:
+   case GL_STENCIL_INDEX:
+   case GL_DEPTH_COMPONENT:
+   case GL_RED:
+   case GL_GREEN:
+   case GL_BLUE:
+   case GL_ALPHA:
+   case GL_LUMINANCE:
+      n = 1;
+      break;
+   case GL_LUMINANCE_ALPHA:
+      n = 2;
+      break;
+   case GL_RGB:
+   case GL_BGR:
+      n = 3;
+      break;
+   case GL_RGBA:
+   case GL_BGRA:
+#ifdef GL_EXT_abgr
+   case GL_ABGR_EXT:
+#endif
+      n = 4;
+      break;
+   default:
+      n = 0;
+   }
+
+   switch (type) {
+   case GL_UNSIGNED_BYTE:
+      m = sizeof(GLubyte);
+      break;
+   case GL_BYTE:
+      m = sizeof(GLbyte);
+      break;
+   case GL_BITMAP:
+      m = 1;
+      break;
+   case GL_UNSIGNED_SHORT:
+      m = sizeof(GLushort);
+      break;
+   case GL_SHORT:
+      m = sizeof(GLshort);
+      break;
+   case GL_UNSIGNED_INT:
+      m = sizeof(GLuint);
+      break;
+   case GL_INT:
+      m = sizeof(GLint);
+      break;
+   case GL_FLOAT:
+      m = sizeof(GLfloat);
+      break;
+   default:
+      m = 0;
+   }
+
+   return n * m;
+}
+
+
+
+/*
+ * WARNING: This function isn't finished and has never been tested!!!!
+ */
+GLint GLAPIENTRY
+mesa_gluBuild1DMipmaps(GLenum target, GLint components,
+		  GLsizei width, GLenum format, GLenum type, const void *data)
+{
+   GLubyte *texture;
+   GLint levels, max_levels;
+   GLint new_width, max_width;
+   GLint i, j, k, l;
+
+   if (width < 1)
+      return GLU_INVALID_VALUE;
+
+   glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_width);
+   max_levels = ilog2(max_width) + 1;
+
+   /* Compute how many mipmap images to make */
+   levels = ilog2(width) + 1;
+   if (levels > max_levels) {
+      levels = max_levels;
+   }
+
+   new_width = 1 << (levels - 1);
+
+   texture = (GLubyte *) malloc(new_width * components);
+   if (!texture) {
+      return GLU_OUT_OF_MEMORY;
+   }
+
+   if (width != new_width) {
+      /* initial rescaling */
+      switch (type) {
+      case GL_UNSIGNED_BYTE:
+	 {
+	    GLubyte *ub_data = (GLubyte *) data;
+	    for (i = 0; i < new_width; i++) {
+	       j = i * width / new_width;
+	       for (k = 0; k < components; k++) {
+		  texture[i * components + k] = ub_data[j * components + k];
+	       }
+	    }
+	 }
+	 break;
+      default:
+	 /* Not implemented */
+	 return GLU_ERROR;
+      }
+   }
+
+   /* generate and load mipmap images */
+   for (l = 0; l < levels; l++) {
+      glTexImage1D(GL_TEXTURE_1D, l, components, new_width, 0,
+		   format, GL_UNSIGNED_BYTE, texture);
+
+      /* Scale image down to 1/2 size */
+      new_width = new_width / 2;
+      for (i = 0; i < new_width; i++) {
+	 for (k = 0; k < components; k++) {
+	    GLint sample1, sample2;
+	    sample1 = (GLint) texture[i * 2 * components + k];
+	    sample2 = (GLint) texture[(i * 2 + 1) * components + k];
+	    texture[i * components + k] = (GLubyte) ((sample1 + sample2) / 2);
+	 }
+      }
+   }
+
+   free(texture);
+
+   return 0;
+}
+
+
+
+GLint GLAPIENTRY
+mesa_gluBuild2DMipmaps(GLenum target, GLint components,
+		  GLsizei width, GLsizei height, GLenum format,
+		  GLenum type, const void *data)
+{
+   GLint w, h, maxsize;
+   void *image, *newimage;
+   GLint neww, newh, level, bpp;
+   int error;
+   GLboolean done;
+   GLint retval = 0;
+   GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
+   GLint packrowlength, packalignment, packskiprows, packskippixels;
+
+   if (width < 1 || height < 1)
+      return GLU_INVALID_VALUE;
+
+   glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize);
+
+   w = round2(width);
+   if (w > maxsize) {
+      w = maxsize;
+   }
+   h = round2(height);
+   if (h > maxsize) {
+      h = maxsize;
+   }
+
+   bpp = bytes_per_pixel(format, type);
+   if (bpp == 0) {
+      /* probably a bad format or type enum */
+      return GLU_INVALID_ENUM;
+   }
+
+   /* Get current glPixelStore values */
+   glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
+   glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
+   glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
+   glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
+   glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
+   glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
+   glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
+   glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
+
+   /* set pixel packing */
+   glPixelStorei(GL_PACK_ROW_LENGTH, 0);
+   glPixelStorei(GL_PACK_ALIGNMENT, 1);
+   glPixelStorei(GL_PACK_SKIP_ROWS, 0);
+   glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
+
+   done = GL_FALSE;
+
+   if (w != width || h != height) {
+      /* must rescale image to get "top" mipmap texture image */
+      image = malloc((w + 4) * h * bpp);
+      if (!image) {
+	 return GLU_OUT_OF_MEMORY;
+      }
+      error = mesa_gluScaleImage(format, width, height, type, data,
+			    w, h, type, image);
+      if (error) {
+	 retval = error;
+	 done = GL_TRUE;
+      }
+   }
+   else {
+      image = (void *) data;
+   }
+
+   level = 0;
+   while (!done) {
+      if (image != data) {
+	 /* set pixel unpacking */
+	 glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
+	 glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+	 glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
+	 glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
+      }
+
+      glTexImage2D(target, level, components, w, h, 0, format, type, image);
+
+      if (w == 1 && h == 1)
+	 break;
+
+      neww = (w < 2) ? 1 : w / 2;
+      newh = (h < 2) ? 1 : h / 2;
+      newimage = malloc((neww + 4) * newh * bpp);
+      if (!newimage) {
+	 return GLU_OUT_OF_MEMORY;
+      }
+
+      error = mesa_gluScaleImage(format, w, h, type, image,
+			    neww, newh, type, newimage);
+      if (error) {
+	 retval = error;
+	 done = GL_TRUE;
+      }
+
+      if (image != data) {
+	 free(image);
+      }
+      image = newimage;
+
+      w = neww;
+      h = newh;
+      level++;
+   }
+
+   if (image != data) {
+      free(image);
+   }
+
+   /* Restore original glPixelStore state */
+   glPixelStorei(GL_UNPACK_ROW_LENGTH, unpackrowlength);
+   glPixelStorei(GL_UNPACK_ALIGNMENT, unpackalignment);
+   glPixelStorei(GL_UNPACK_SKIP_ROWS, unpackskiprows);
+   glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpackskippixels);
+   glPixelStorei(GL_PACK_ROW_LENGTH, packrowlength);
+   glPixelStorei(GL_PACK_ALIGNMENT, packalignment);
+   glPixelStorei(GL_PACK_SKIP_ROWS, packskiprows);
+   glPixelStorei(GL_PACK_SKIP_PIXELS, packskippixels);
+
+   return retval;
+}
Index: git/target-i386/opengl_exec.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/opengl_exec.c	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,3931 @@
+/*
+ *  Host-side implementation of GL/GLX API
+ *
+ *  Copyright (c) 2006,2007 Even Rouault
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <string.h>
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+#define GL_GLEXT_PROTOTYPES
+#define GLX_GLXEXT_PROTOTYPES
+
+#include <mesa_gl.h>
+#include <mesa_glx.h>
+
+// TODO
+typedef long unsigned int target_phys_addr_t;
+
+#include "opengl_func.h"
+
+#include "mesa_glu.h"
+#include "mesa_mipmap.c"
+
+#include "../qemu-common.h"
+
+//#define SYSTEMATIC_ERROR_CHECK
+#define BUFFER_BEGINEND
+#define glGetError() 0
+
+#define GET_EXT_PTR(type, funcname, args_decl) \
+      static int detect_##funcname = 0; \
+      static type(*ptr_func_##funcname)args_decl = NULL; \
+      if (detect_##funcname == 0) \
+      { \
+        detect_##funcname = 1; \
+        ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
+        assert (ptr_func_##funcname); \
+      }
+
+#define GET_EXT_PTR_NO_FAIL(type, funcname, args_decl) \
+      static int detect_##funcname = 0; \
+      static type(*ptr_func_##funcname)args_decl = NULL; \
+      if (detect_##funcname == 0) \
+      { \
+        detect_##funcname = 1; \
+        ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
+      }
+
+#ifndef WIN32
+#include <dlfcn.h>
+#endif
+
+static void *get_glu_ptr(const char *name)
+{
+    static void *handle = (void *) -1;
+
+    if (handle == (void *) -1) {
+#ifndef WIN32
+        handle = dlopen("libGLU.so", RTLD_LAZY);
+        if (!handle)
+            fprintf(stderr, "can't load libGLU.so : %s\n", dlerror());
+#else
+        handle = (void *) LoadLibrary("glu32.dll");
+        if (!handle)
+            fprintf(stderr, "can't load glu32.dll\n");
+#endif
+    }
+    if (handle) {
+#ifndef WIN32
+        return dlsym(handle, name);
+#else
+        return GetProcAddress(handle, name);
+#endif
+    }
+    return NULL;
+}
+
+#define GET_GLU_PTR(type, funcname, args_decl) \
+      static int detect_##funcname = 0; \
+      static type(*ptr_func_##funcname)args_decl = NULL; \
+      if (detect_##funcname == 0) \
+      { \
+        detect_##funcname = 1; \
+        ptr_func_##funcname = (type(*)args_decl)get_glu_ptr(#funcname); \
+      }
+
+int display_function_call = 0;
+
+static const int defaultAttribList[] = {
+    GLX_RGBA,
+    GLX_RED_SIZE, 1,
+    GLX_GREEN_SIZE, 1,
+    GLX_BLUE_SIZE, 1,
+    GLX_DOUBLEBUFFER,
+    None
+};
+
+static XVisualInfo *get_default_visual(Display *dpy)
+{
+    static XVisualInfo *vis = NULL;
+    XVisualInfo theTemplate;
+    int numVisuals;
+
+    if (vis)
+        return vis;
+    fprintf(stderr, "get_default_visual\n");
+    /* if (vis == NULL) vis = glXChooseVisual(dpy, 0,
+     * (int*)defaultAttribList); */
+    theTemplate.screen = 0;
+    vis = XGetVisualInfo(dpy, VisualScreenMask, &theTemplate, &numVisuals);
+
+    return vis;
+}
+
+
+static Display *parent_dpy = NULL;
+static Window qemu_parent_window = 0;
+
+static Window active_win = 0;   /* FIXME */
+static int active_win_x = 0;
+static int active_win_y = 0;
+
+void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window)
+{
+    parent_dpy = _dpy;
+    qemu_parent_window = _parent_window;
+    if (active_win)
+        XReparentWindow(_dpy, active_win, _parent_window, active_win_x,
+                        active_win_y);
+}
+
+static int local_connection = 0;
+void opengl_exec_set_local_connection()
+{
+    local_connection = 1;
+}
+
+static GLXDrawable create_window(Display *dpy, Window local_parent_window,
+                XVisualInfo *vis, const char *name,
+                int x, int y, int width, int height)
+{
+    int scrnum;
+    XSetWindowAttributes attr = { 0 };
+    unsigned long mask;
+    Window root;
+    Window win;
+
+    scrnum = DefaultScreen(dpy);
+    root = RootWindow(dpy, scrnum);
+
+    /* window attributes */
+    attr.background_pixel = 0xff000000;
+    attr.border_pixel = 0;
+    attr.colormap = XCreateColormap(dpy, root, vis->visual, AllocNone);
+    attr.event_mask = 0; /* StructureNotifyMask | ExposureMask | KeyPressMask */
+    attr.save_under = True;
+    // if (local_parent_window == NULL && qemu_parent_window == NULL)
+    attr.override_redirect = True;
+    // else
+    // attr.override_redirect = True;
+    attr.cursor = None;
+    mask =
+        CWBackPixel | CWBorderPixel | CWColormap | CWEventMask |
+        CWOverrideRedirect | CWSaveUnder;
+
+    if (local_parent_window)
+        win = XCreateWindow(dpy, local_parent_window, 0, 0, width, height, 0,
+                        vis->depth, InputOutput, vis->visual, mask, &attr);
+    else if (qemu_parent_window)
+        win = XCreateWindow(dpy, qemu_parent_window, 0, 0, width, height, 0,
+                        vis->depth, InputOutput, vis->visual, mask, &attr);
+    else
+        win = XCreateWindow(dpy, root, 0, 0, width, height, 0, vis->depth,
+                        InputOutput, vis->visual, mask, &attr);
+
+    /* set hints and properties */
+    {
+        XSizeHints sizehints;
+
+        sizehints.x = x;
+        sizehints.y = y;
+        sizehints.width = width;
+        sizehints.height = height;
+        sizehints.flags = USSize | USPosition;
+        XSetWMNormalHints(dpy, win, &sizehints);
+        XSetStandardProperties(dpy, win, name, name, None,
+                        (char **) NULL, 0, &sizehints);
+    }
+
+    XSync(dpy, 0);
+
+    /* 
+     * int loop = 1; while (loop) { while (XPending(dpy) > 0) { XEvent event;
+     * XNextEvent(dpy, &event); switch (event.type) { case CreateNotify: { if
+     * (((XCreateWindowEvent*)&event)->window == win) { loop = 0; } break; } }
+     * } } */
+
+    /* TODO */
+    if (!active_win)
+        active_win = win;
+
+    return win;
+}
+
+typedef struct {
+    void *key;
+    void *value;
+} Assoc;
+
+#define MAX_HANDLED_PROCESS 100
+#define MAX_ASSOC_SIZE 100
+
+#define MAX_FBCONFIG 10
+
+#include "opengl_utils.h"
+
+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
+
+
+typedef struct {
+    int x;
+    int y;
+    int width;
+    int height;
+    int map_state;
+} WindowPosStruct;
+
+typedef struct {
+    GLbitfield mask;
+    int activeTextureIndex;
+} ClientState;
+
+#define MAX_CLIENT_STATE_STACK_SIZE 16
+
+typedef struct {
+    int ref;
+    int fake_ctxt;
+    int fake_shareList;
+    GLXContext context;
+    GLXDrawable drawable;
+
+    void *vertexPointer;
+    void *normalPointer;
+    void *colorPointer;
+    void *secondaryColorPointer;
+    void *indexPointer;
+    void *texCoordPointer[NB_MAX_TEXTURES];
+    void *edgeFlagPointer;
+    void *vertexAttribPointer[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
+    void *vertexAttribPointerNV[MY_GL_MAX_VERTEX_ATTRIBS_NV];
+    void *weightPointer;
+    void *matrixIndexPointer;
+    void *fogCoordPointer;
+    void *variantPointerEXT[MY_GL_MAX_VARIANT_POINTER_EXT];
+    void *interleavedArrays;
+    void *elementPointerATI;
+
+    int vertexPointerSize;
+    int normalPointerSize;
+    int colorPointerSize;
+    int secondaryColorPointerSize;
+    int indexPointerSize;
+    int texCoordPointerSize[NB_MAX_TEXTURES];
+    int edgeFlagPointerSize;
+    int vertexAttribPointerSize[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
+    int vertexAttribPointerNVSize[MY_GL_MAX_VERTEX_ATTRIBS_NV];
+    int weightPointerSize;
+    int matrixIndexPointerSize;
+    int fogCoordPointerSize;
+    int variantPointerEXTSize[MY_GL_MAX_VARIANT_POINTER_EXT];
+    int interleavedArraysSize;
+    int elementPointerATISize;
+
+    int selectBufferSize;
+    void *selectBufferPtr;
+    int feedbackBufferSize;
+    void *feedbackBufferPtr;
+
+    ClientState clientStateStack[MAX_CLIENT_STATE_STACK_SIZE];
+    int clientStateSp;
+    int activeTextureIndex;
+
+    unsigned int ownTabTextures[32768];
+    unsigned int *tabTextures;
+    RangeAllocator ownTextureAllocator;
+    RangeAllocator *textureAllocator;
+
+    unsigned int ownTabBuffers[32768];
+    unsigned int *tabBuffers;
+    RangeAllocator ownBufferAllocator;
+    RangeAllocator *bufferAllocator;
+
+    unsigned int ownTabLists[32768];
+    unsigned int *tabLists;
+    RangeAllocator ownListAllocator;
+    RangeAllocator *listAllocator;
+
+#ifdef SYSTEMATIC_ERROR_CHECK
+    int last_error;
+#endif
+} GLState;
+
+typedef struct {
+    int process_id;
+    int instr_counter;
+
+    int x, y, width, height;
+    WindowPosStruct currentDrawablePos;
+
+    int next_available_context_number;
+    int next_available_pbuffer_number;
+
+    int nb_states;
+    GLState default_state;
+    GLState **glstates;
+    GLState *current_state;
+
+    int nfbconfig;
+    GLXFBConfig *fbconfigs[MAX_FBCONFIG];
+    int fbconfigs_max[MAX_FBCONFIG];
+    int nfbconfig_total;
+
+    Assoc association_fakecontext_glxcontext[MAX_ASSOC_SIZE];
+    Assoc association_fakepbuffer_pbuffer[MAX_ASSOC_SIZE];
+    Assoc association_clientdrawable_serverdrawable[MAX_ASSOC_SIZE];
+    Assoc association_fakecontext_visual[MAX_ASSOC_SIZE];
+
+    Display *dpy;
+
+    int began;
+    int primitive;
+    int bufsize;
+    int bufstart;
+    arg_t *cmdbuf;
+} ProcessStruct;
+
+static ProcessStruct processes[MAX_HANDLED_PROCESS];
+
+void init_process_tab()
+{
+    memset(processes, 0, sizeof(processes));
+}
+
+#define ARG_TO_CHAR(x)                (char)(x)
+#define ARG_TO_UNSIGNED_CHAR(x)       (unsigned char)(x)
+#define ARG_TO_SHORT(x)               (short)(x)
+#define ARG_TO_UNSIGNED_SHORT(x)      (unsigned short)(x)
+#define ARG_TO_INT(x)                 (int)(x)
+#define ARG_TO_UNSIGNED_INT(x)        (unsigned int)(x)
+#define ARG_TO_FLOAT(x)               (*(float*)&(x))
+#define ARG_TO_DOUBLE(x)              (*(double*)(x))
+
+#include "server_stub.c"
+
+/* ---- */
+
+#ifdef BUFFER_BEGINEND
+/* A user of the following two functions must not buffer any calls that
+ * may throw an error (i.e. errors conditions must be checked before
+ * storing in the buffer) or return values.  */
+static inline arg_t *cmd_buffer_alloc(ProcessStruct *process, size_t elems)
+{
+    arg_t *ret;
+
+    if (unlikely(process->bufstart + elems > process->bufsize)) {
+        process->bufsize = (process->bufsize ?: 0x100) << 1;
+        process->cmdbuf = qemu_realloc(process->cmdbuf,
+                        process->bufsize * sizeof(arg_t));
+    }
+
+    ret = process->cmdbuf + process->bufstart;
+    process->bufstart += elems;
+    return ret;
+}
+
+static inline void cmd_buffer_replay(ProcessStruct *process)
+{
+    Signature *sig;
+    int func_number;
+    int ret_int;
+    char ret_char;
+    arg_t *call = process->cmdbuf;
+
+    while (process->bufstart) {
+        func_number = *call ++;
+        sig = (Signature *) tab_opengl_calls[func_number];
+
+        execute_func(func_number, call, &ret_int, &ret_char);
+
+        call += sig->nb_args;
+        process->bufstart -= sig->nb_args + 1;
+    }
+}
+#endif
+
+/* ---- */
+
+typedef void *ClientGLXDrawable;
+static inline ClientGLXDrawable to_drawable(arg_t arg)
+{
+#ifdef TARGET_X86_64
+    if (arg > (unsigned long) -1) {
+        fprintf(stderr, "GLXDrawable too big for this implementation\n");
+        exit(-1);
+    }
+#endif
+    return (void *) (unsigned long) arg;
+}
+
+GLXContext get_association_fakecontext_glxcontext(
+                ProcessStruct *process, int fakecontext)
+{
+    int i;
+
+    for (i = 0;
+         i < MAX_ASSOC_SIZE &&
+         process->association_fakecontext_glxcontext[i].key; i++)
+        if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
+                        fakecontext)
+            return (GLXContext)
+                    process->association_fakecontext_glxcontext[i].value;
+
+    return NULL;
+}
+
+void set_association_fakecontext_glxcontext(
+                ProcessStruct *process, int fakecontext, GLXContext glxcontext)
+{
+    int i;
+
+    for (i = 0;
+         i < MAX_ASSOC_SIZE &&
+         process->association_fakecontext_glxcontext[i].key; i++)
+        if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
+                        fakecontext)
+            break;
+
+    if (i < MAX_ASSOC_SIZE) {
+        process->association_fakecontext_glxcontext[i].key =
+                (void *) (long) fakecontext;
+        process->association_fakecontext_glxcontext[i].value =
+                (void *) glxcontext;
+    } else
+        fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
+}
+
+void unset_association_fakecontext_glxcontext(
+                ProcessStruct *process, int fakecontext)
+{
+    int i;
+
+    for (i = 0;
+         i < MAX_ASSOC_SIZE &&
+         process->association_fakecontext_glxcontext[i].key; i++)
+        if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
+                        fakecontext) {
+            memmove(&process->association_fakecontext_glxcontext[i],
+                    &process->association_fakecontext_glxcontext[i + 1],
+                    sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
+            return;
+        }
+}
+
+/* ---- */
+
+XVisualInfo *get_association_fakecontext_visual(
+                ProcessStruct *process, int fakecontext)
+{
+    int i;
+
+    for (i = 0;
+         i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
+         i++)
+        if ((int) (long) process->association_fakecontext_visual[i].key ==
+                        fakecontext)
+            return process->association_fakecontext_visual[i].value;
+
+    return NULL;
+}
+
+void set_association_fakecontext_visual(ProcessStruct *process,
+                int fakecontext, XVisualInfo *visual)
+{
+    int i;
+
+    for (i = 0;
+         i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
+         i++)
+        if ((int) (long) process->association_fakecontext_visual[i].key ==
+                        fakecontext)
+            break;
+
+    if (i < MAX_ASSOC_SIZE) {
+        process->association_fakecontext_visual[i].key =
+                (void *) (long) fakecontext;
+        process->association_fakecontext_visual[i].value = (void *) visual;
+    } else
+        fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
+}
+
+/* ---- */
+
+GLXPbuffer get_association_fakepbuffer_pbuffer(
+                ProcessStruct *process, ClientGLXDrawable fakepbuffer)
+{
+    int i;
+
+    for (i = 0; i < MAX_ASSOC_SIZE &&
+                    process->association_fakepbuffer_pbuffer[i].key; i ++)
+        if ((ClientGLXDrawable)
+                        process->association_fakepbuffer_pbuffer[i].key ==
+                        fakepbuffer)
+            return (GLXPbuffer)
+                    process->association_fakepbuffer_pbuffer[i].value;
+
+    return 0;
+}
+
+void set_association_fakepbuffer_pbuffer(ProcessStruct *process,
+                ClientGLXDrawable fakepbuffer, GLXPbuffer pbuffer)
+{
+    int i;
+
+    for (i = 0;
+         i < MAX_ASSOC_SIZE &&
+         process->association_fakepbuffer_pbuffer[i].key; i++)
+        if ((ClientGLXDrawable)
+                        process->association_fakepbuffer_pbuffer[i].key ==
+                        fakepbuffer)
+            break;
+
+    if (i < MAX_ASSOC_SIZE) {
+        process->association_fakepbuffer_pbuffer[i].key = (void *) fakepbuffer;
+        process->association_fakepbuffer_pbuffer[i].value = (void *) pbuffer;
+    } else
+        fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
+}
+
+void unset_association_fakepbuffer_pbuffer(ProcessStruct *process,
+                ClientGLXDrawable fakepbuffer)
+{
+    int i;
+
+    for (i = 0; i < MAX_ASSOC_SIZE &&
+                    process->association_fakepbuffer_pbuffer[i].key; i++)
+        if ((ClientGLXDrawable)
+                        process->association_fakepbuffer_pbuffer[i].key ==
+                        fakepbuffer) {
+            memmove(&process->association_fakepbuffer_pbuffer[i],
+                    &process->association_fakepbuffer_pbuffer[i + 1],
+                    sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
+            return;
+        }
+}
+
+/* ---- */
+
+GLXDrawable get_association_clientdrawable_serverdrawable(
+                ProcessStruct *process, ClientGLXDrawable clientdrawable)
+{
+    int i;
+
+    for (i = 0; i < MAX_ASSOC_SIZE &&
+                    process->association_clientdrawable_serverdrawable[i].key;
+                    i++)
+        if ((ClientGLXDrawable) process->
+                        association_clientdrawable_serverdrawable[i].key ==
+                        clientdrawable)
+            return (GLXDrawable) process->
+                association_clientdrawable_serverdrawable[i].value;
+
+    return (GLXDrawable) 0;
+}
+
+ClientGLXDrawable get_association_serverdrawable_clientdrawable(
+                ProcessStruct *process, GLXDrawable serverdrawable)
+{
+    int i;
+
+    for (i = 0; i < MAX_ASSOC_SIZE &&
+                    process->association_clientdrawable_serverdrawable[i].key;
+                    i ++)
+        if ((GLXDrawable) process->
+                        association_clientdrawable_serverdrawable[i].value ==
+                        serverdrawable)
+            return (ClientGLXDrawable)
+                    process->association_clientdrawable_serverdrawable[i].key;
+
+    return NULL;
+}
+
+void set_association_clientdrawable_serverdrawable(
+                ProcessStruct *process, ClientGLXDrawable clientdrawable,
+                GLXDrawable serverdrawable)
+{
+    int i;
+
+    for (i = 0; process->association_clientdrawable_serverdrawable[i].key;
+                    i ++)
+        if ((ClientGLXDrawable) process->
+                        association_clientdrawable_serverdrawable[i].key ==
+                        clientdrawable)
+            break;
+
+    if (i < MAX_ASSOC_SIZE) {
+        process->association_clientdrawable_serverdrawable[i].key =
+                (void *) clientdrawable;
+        process->association_clientdrawable_serverdrawable[i].value =
+                (void *) serverdrawable;
+    } else
+        fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
+}
+
+static void _get_window_pos(Display *dpy, Window win, WindowPosStruct *pos)
+{
+    XWindowAttributes window_attributes_return;
+    Window child;
+    int x, y;
+    Window root = DefaultRootWindow(dpy);
+
+    XGetWindowAttributes(dpy, win, &window_attributes_return);
+    XTranslateCoordinates(dpy, win, root, 0, 0, &x, &y, &child);
+    /* printf("%d %d %d %d\n", x, y, window_attributes_return.width,
+     * window_attributes_return.height); */
+    pos->x = x;
+    pos->y = y;
+    pos->width = window_attributes_return.width;
+    pos->height = window_attributes_return.height;
+    pos->map_state = window_attributes_return.map_state;
+}
+
+static int is_gl_vendor_ati(Display *dpy)
+{
+    static int is_gl_vendor_ati_flag = 0;
+    static int has_init = 0;
+
+    if (has_init == 0) {
+        has_init = 1;
+        is_gl_vendor_ati_flag =
+            (strncmp(glXGetClientString(dpy, GLX_VENDOR), "ATI", 3) == 0);
+    }
+    return is_gl_vendor_ati_flag;
+}
+
+static int get_server_texture(ProcessStruct *process,
+                              unsigned int client_texture)
+{
+    unsigned int server_texture = 0;
+
+    if (client_texture < 32768) {
+        server_texture = process->current_state->tabTextures[client_texture];
+    } else {
+        fprintf(stderr, "invalid texture name %d\n", client_texture);
+    }
+    return server_texture;
+}
+
+static int get_server_buffer(ProcessStruct *process,
+                             unsigned int client_buffer)
+{
+    unsigned int server_buffer = 0;
+
+    if (client_buffer < 32768) {
+        server_buffer = process->current_state->tabBuffers[client_buffer];
+    } else {
+        fprintf(stderr, "invalid buffer name %d\n", client_buffer);
+    }
+    return server_buffer;
+}
+
+
+static int get_server_list(ProcessStruct *process, unsigned int client_list)
+{
+    unsigned int server_list = 0;
+
+    if (client_list < 32768) {
+        server_list = process->current_state->tabLists[client_list];
+    } else {
+        fprintf(stderr, "invalid list name %d\n", client_list);
+    }
+    return server_list;
+}
+
+GLXFBConfig get_fbconfig(ProcessStruct *process, int client_fbconfig)
+{
+    int i;
+    int nbtotal = 0;
+
+    for (i = 0; i < process->nfbconfig; i++) {
+        assert(client_fbconfig >= 1 + nbtotal);
+        if (client_fbconfig <= nbtotal + process->fbconfigs_max[i]) {
+            return process->fbconfigs[i][client_fbconfig - 1 - nbtotal];
+        }
+        nbtotal += process->fbconfigs_max[i];
+    }
+    return 0;
+}
+
+typedef struct {
+    int attribListLength;
+    int *attribList;
+    XVisualInfo *visInfo;
+} AssocAttribListVisual;
+
+static int nTabAssocAttribListVisual = 0;
+static AssocAttribListVisual *tabAssocAttribListVisual = NULL;
+
+static int _compute_length_of_attrib_list_including_zero(const int *attribList,
+                                                         int
+                                                         booleanMustHaveValue)
+{
+    int i = 0;
+
+    while (attribList[i]) {
+        if (booleanMustHaveValue ||
+            !(attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
+              attribList[i] == GLX_DOUBLEBUFFER ||
+              attribList[i] == GLX_STEREO)) {
+            i += 2;
+        } else {
+            i++;
+        }
+    }
+    return i + 1;
+}
+
+static int glXChooseVisualFunc(Display *dpy, const int *_attribList)
+{
+    if (_attribList == NULL)
+        return 0;
+    int attribListLength =
+        _compute_length_of_attrib_list_including_zero(_attribList, 0);
+    int i;
+
+    int *attribList = malloc(sizeof(int) * attribListLength);
+    memcpy(attribList, _attribList, sizeof(int) * attribListLength);
+
+    i = 0;
+    while (attribList[i]) {
+        if (!
+            (attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
+             attribList[i] == GLX_DOUBLEBUFFER ||
+             attribList[i] == GLX_STEREO)) {
+            if (attribList[i] == GLX_SAMPLE_BUFFERS && attribList[i + 1] != 0
+                && getenv("DISABLE_SAMPLE_BUFFERS")) {
+                fprintf(stderr, "Disabling GLX_SAMPLE_BUFFERS\n");
+                attribList[i + 1] = 0;
+            }
+            i += 2;
+        } else {
+            i++;
+        }
+    }
+
+    for (i = 0; i < nTabAssocAttribListVisual; i++) {
+        if (tabAssocAttribListVisual[i].attribListLength == attribListLength
+            && memcmp(tabAssocAttribListVisual[i].attribList, attribList,
+                      attribListLength * sizeof(int)) == 0) {
+            free(attribList);
+            return (tabAssocAttribListVisual[i].
+                    visInfo) ? tabAssocAttribListVisual[i].visInfo->
+                visualid : 0;
+        }
+    }
+    XVisualInfo *visInfo = glXChooseVisual(dpy, 0, attribList);
+
+    tabAssocAttribListVisual = realloc(
+                    tabAssocAttribListVisual, sizeof(AssocAttribListVisual) *
+                    (nTabAssocAttribListVisual + 1));
+    tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength =
+        attribListLength;
+    tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList =
+        (int *) malloc(sizeof(int) * attribListLength);
+    memcpy(tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList,
+           attribList, sizeof(int) * attribListLength);
+    tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
+    nTabAssocAttribListVisual++;
+    free(attribList);
+    return (visInfo) ? visInfo->visualid : 0;
+}
+
+static XVisualInfo *get_visual_info_from_visual_id(Display *dpy,
+                                                   int visualid)
+{
+    int i, n;
+    XVisualInfo template;
+    XVisualInfo *visInfo;
+
+    for (i = 0; i < nTabAssocAttribListVisual; i++) {
+        if (tabAssocAttribListVisual[i].visInfo &&
+            tabAssocAttribListVisual[i].visInfo->visualid == visualid) {
+            return tabAssocAttribListVisual[i].visInfo;
+        }
+    }
+    template.visualid = visualid;
+    visInfo = XGetVisualInfo(dpy, VisualIDMask, &template, &n);
+    tabAssocAttribListVisual =
+        realloc(tabAssocAttribListVisual,
+                sizeof(AssocAttribListVisual) * (nTabAssocAttribListVisual +
+                                                 1));
+    tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength = 0;
+    tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList = NULL;
+    tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
+    nTabAssocAttribListVisual++;
+    return visInfo;
+}
+
+typedef struct {
+    int x;
+    int y;
+    int width;
+    int height;
+    int xhot;
+    int yhot;
+    int *pixels;
+} ClientCursor;
+
+#if 0
+static ClientCursor client_cursor = { 0 };
+#endif
+
+static void do_glClientActiveTextureARB(int texture)
+{
+    GET_EXT_PTR_NO_FAIL(void, glClientActiveTextureARB, (int));
+
+    if (ptr_func_glClientActiveTextureARB) {
+        ptr_func_glClientActiveTextureARB(texture);
+    }
+}
+
+#ifdef CURSOR_TRICK
+static void do_glActiveTextureARB(int texture)
+{
+    GET_EXT_PTR_NO_FAIL(void, glActiveTextureARB, (int));
+
+    if (ptr_func_glActiveTextureARB) {
+        ptr_func_glActiveTextureARB(texture);
+    }
+}
+
+static void do_glUseProgramObjectARB(GLhandleARB programObj)
+{
+    GET_EXT_PTR_NO_FAIL(void, glUseProgramObjectARB, (GLhandleARB));
+
+    if (ptr_func_glUseProgramObjectARB) {
+        ptr_func_glUseProgramObjectARB(programObj);
+    }
+}
+#endif
+
+static void destroy_gl_state(GLState *state)
+{
+    int i;
+
+    if (state->vertexPointer)
+        free(state->vertexPointer);
+    if (state->normalPointer)
+        free(state->normalPointer);
+    if (state->indexPointer)
+        free(state->indexPointer);
+    if (state->colorPointer)
+        free(state->colorPointer);
+    if (state->secondaryColorPointer)
+        free(state->secondaryColorPointer);
+    for (i = 0; i < NB_MAX_TEXTURES; i++) {
+        if (state->texCoordPointer[i])
+            free(state->texCoordPointer[i]);
+    }
+    for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_ARB; i++) {
+        if (state->vertexAttribPointer[i])
+            free(state->vertexAttribPointer[i]);
+    }
+    for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_NV; i++) {
+        if (state->vertexAttribPointerNV[i])
+            free(state->vertexAttribPointerNV[i]);
+    }
+    if (state->weightPointer)
+        free(state->weightPointer);
+    if (state->matrixIndexPointer)
+        free(state->matrixIndexPointer);
+    if (state->fogCoordPointer)
+        free(state->fogCoordPointer);
+    for (i = 0; i < MY_GL_MAX_VARIANT_POINTER_EXT; i++) {
+        if (state->variantPointerEXT[i])
+            free(state->variantPointerEXT[i]);
+    }
+    if (state->interleavedArrays)
+        free(state->interleavedArrays);
+    if (state->elementPointerATI)
+        free(state->elementPointerATI);
+}
+
+static void init_gl_state(GLState *state)
+{
+    state->textureAllocator = &state->ownTextureAllocator;
+    state->tabTextures = state->ownTabTextures;
+    state->bufferAllocator = &state->ownBufferAllocator;
+    state->tabBuffers = state->ownTabBuffers;
+    state->listAllocator = &state->ownListAllocator;
+    state->tabLists = state->ownTabLists;
+}
+
+/*
+ * Translate the nth element of list from type to GLuint.
+ */
+static GLuint translate_id(GLsizei n, GLenum type, const GLvoid *list)
+{
+    GLbyte *bptr;
+    GLubyte *ubptr;
+    GLshort *sptr;
+    GLushort *usptr;
+    GLint *iptr;
+    GLuint *uiptr;
+    GLfloat *fptr;
+
+    switch (type) {
+    case GL_BYTE:
+        bptr = (GLbyte *) list;
+        return (GLuint) *(bptr + n);
+    case GL_UNSIGNED_BYTE:
+        ubptr = (GLubyte *) list;
+        return (GLuint) *(ubptr + n);
+    case GL_SHORT:
+        sptr = (GLshort *) list;
+        return (GLuint) *(sptr + n);
+    case GL_UNSIGNED_SHORT:
+        usptr = (GLushort *) list;
+        return (GLuint) *(usptr + n);
+    case GL_INT:
+        iptr = (GLint *) list;
+        return (GLuint) *(iptr + n);
+    case GL_UNSIGNED_INT:
+        uiptr = (GLuint *) list;
+        return (GLuint) *(uiptr + n);
+    case GL_FLOAT:
+        fptr = (GLfloat *) list;
+        return (GLuint) *(fptr + n);
+    case GL_2_BYTES:
+        ubptr = ((GLubyte *) list) + 2 * n;
+        return (GLuint) *ubptr * 256 + (GLuint) *(ubptr + 1);
+    case GL_3_BYTES:
+        ubptr = ((GLubyte *) list) + 3 * n;
+        return (GLuint) *ubptr * 65536 + (GLuint) *(ubptr + 1) * 256 +
+            (GLuint) *(ubptr + 2);
+    case GL_4_BYTES:
+        ubptr = ((GLubyte *) list) + 4 * n;
+        return (GLuint) *ubptr * 16777216 + (GLuint) *(ubptr + 1) * 65536 +
+            (GLuint) *(ubptr + 2) * 256 + (GLuint) *(ubptr + 3);
+    default:
+        return 0;
+    }
+}
+
+void _create_context(ProcessStruct *process, GLXContext ctxt, int fake_ctxt,
+                     GLXContext shareList, int fake_shareList)
+{
+    process->glstates =
+        realloc(process->glstates,
+                (process->nb_states + 1) * sizeof(GLState *));
+    process->glstates[process->nb_states] = malloc(sizeof(GLState));
+    memset(process->glstates[process->nb_states], 0, sizeof(GLState));
+    process->glstates[process->nb_states]->ref = 1;
+    process->glstates[process->nb_states]->context = ctxt;
+    process->glstates[process->nb_states]->fake_ctxt = fake_ctxt;
+    process->glstates[process->nb_states]->fake_shareList = fake_shareList;
+    init_gl_state(process->glstates[process->nb_states]);
+    if (shareList && fake_shareList) {
+        int i;
+
+        for (i = 0; i < process->nb_states; i++) {
+            if (process->glstates[i]->fake_ctxt == fake_shareList) {
+                process->glstates[i]->ref++;
+                process->glstates[process->nb_states]->textureAllocator =
+                    process->glstates[i]->textureAllocator;
+                process->glstates[process->nb_states]->tabTextures =
+                    process->glstates[i]->tabTextures;
+                process->glstates[process->nb_states]->bufferAllocator =
+                    process->glstates[i]->bufferAllocator;
+                process->glstates[process->nb_states]->tabBuffers =
+                    process->glstates[i]->tabBuffers;
+                process->glstates[process->nb_states]->listAllocator =
+                    process->glstates[i]->listAllocator;
+                process->glstates[process->nb_states]->tabLists =
+                    process->glstates[i]->tabLists;
+                break;
+            }
+        }
+    }
+    process->nb_states++;
+}
+
+static ProcessStruct *process;
+
+void do_disconnect_current(void)
+{
+    int i;
+    Display *dpy = process->dpy;
+
+    glXMakeCurrent(dpy, 0, NULL);
+
+    for (i = 0; i < MAX_ASSOC_SIZE &&
+                    process->association_fakecontext_glxcontext[i].key; i ++) {
+        GLXContext ctxt = process->association_fakecontext_glxcontext[i].value;
+
+        fprintf(stderr, "Destroy context corresponding to fake_context"
+                        " = %ld\n", (long) process->
+                        association_fakecontext_glxcontext[i].key);
+        glXDestroyContext(dpy, ctxt);
+    }
+
+    GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
+
+    for (i = 0; i < MAX_ASSOC_SIZE &&
+                    process->association_fakepbuffer_pbuffer[i].key; i ++) {
+        GLXPbuffer pbuffer = (GLXPbuffer)
+                process->association_fakepbuffer_pbuffer[i].value;
+
+        fprintf(stderr, "Destroy pbuffer corresponding to fake_pbuffer"
+                        " = %ld\n", (long) process->
+                        association_fakepbuffer_pbuffer[i].key);
+        if (!is_gl_vendor_ati(dpy))
+            ptr_func_glXDestroyPbuffer(dpy, pbuffer);
+    }
+
+    for (i = 0; i < MAX_ASSOC_SIZE && process->
+                    association_clientdrawable_serverdrawable[i].key; i ++) {
+        Window win = (Window) process->
+                association_clientdrawable_serverdrawable[i].value;
+
+        fprintf(stderr, "Destroy window %x corresponding to client_drawable "
+                        "= %p\n", (int) win, process->
+                        association_clientdrawable_serverdrawable[i].key);
+
+        XDestroyWindow(dpy, win);
+        if (active_win == win)
+            active_win = 0;
+
+        int loop = 1; // 1;
+        while (loop) {
+            while (XPending(dpy) > 0) {
+                XEvent event;
+
+                XNextEvent(dpy, &event);
+                switch (event.type) {
+                case DestroyNotify:
+                    {
+                        if (((XDestroyWindowEvent *) &event)->window == win)
+                            loop = 0;
+                        break;
+                    }
+                }
+            }
+            break; /* TODO */
+        }
+    }
+
+    for (i = 0; i < process->nb_states; i++) {
+        destroy_gl_state(process->glstates[i]);
+        free(process->glstates[i]);
+    }
+    destroy_gl_state(&process->default_state);
+    free(process->glstates);
+
+    if (process->cmdbuf)
+        qemu_free(process->cmdbuf);
+
+    for (i = 0; &processes[i] != process; i ++);
+    memmove(&processes[i], &processes[i + 1],
+                    (MAX_HANDLED_PROCESS - 1 - i) * sizeof(ProcessStruct));
+}
+
+static const int beginend_allowed[GL_N_CALLS] = {
+#undef MAGIC_MACRO
+#define MAGIC_MACRO(name) [name ## _func] = 1,
+#include "gl_beginend.h"
+};
+
+void do_context_switch(Display *dpy, pid_t pid, int call)
+{
+    int i;
+
+    for (i = 0; i < MAX_HANDLED_PROCESS; i ++)
+        if (processes[i].process_id == pid) {
+            process = &processes[i];
+            break;
+        } else if (processes[i].process_id == 0) {
+            process = &processes[i];
+            memset(process, 0, sizeof(ProcessStruct));
+            process->process_id = pid;
+            init_gl_state(&process->default_state);
+            process->current_state = &process->default_state;
+            process->dpy = dpy;
+            break;
+        }
+    if (process == NULL) {
+        fprintf(stderr, "Too many processes !\n");
+        exit(-1);
+    }
+
+    switch (call) {
+    case _init32_func:
+    case _init64_func:
+    case _exit_process_func:
+    case glXMakeCurrent_func:
+        /* Do nothing */
+        break;
+
+    default:
+#if 0
+        glFlush();
+        glFinish();
+        glXSwapBuffers(dpy, drawable);
+        if (process->current_state == &process->default_state)
+            /* Where do commands like glViewport go when no drawable or
+             * context are current - i.e. after a call to
+             * glXMakeCurrent(dpy, 0, 0) ? */;
+        else
+#endif
+            glXMakeCurrent(dpy, process->current_state->drawable,
+                            process->current_state->context);
+    }
+}
+
+int do_function_call(int func_number, arg_t *args, char *ret_string)
+{
+    char ret_char = 0;
+    int ret_int = 0;
+    const char *ret_str = NULL;
+    Display *dpy = process->dpy;
+    Signature *signature = (Signature *) tab_opengl_calls[func_number];
+    int ret_type = signature->ret_type;
+
+    if (parent_dpy)
+        dpy = parent_dpy;
+
+    process->instr_counter++;
+    if (display_function_call)
+        fprintf(stderr, "[%d]> %s\n", process->instr_counter,
+                tab_opengl_calls_name[func_number]);
+
+#ifdef BUFFER_BEGINEND
+    if (process->began) {
+        /* Need to check for any errors now because later we won't have
+         * a chance to report them.  */
+        if (beginend_allowed[func_number]) {
+            arg_t *buf = cmd_buffer_alloc(process, signature->nb_args + 1);
+
+            /* TODO: pointer arguments */
+            buf[0] = func_number;
+            memcpy(buf + 1, args, signature->nb_args * sizeof(arg_t));
+        } else if (likely(func_number == glEnd_func)) {
+            process->began = 0;
+
+            glBegin(process->primitive);
+            cmd_buffer_replay(process);
+            glEnd();
+        } else {
+            /* TODO: properly report */
+#ifdef SYSTEMATIC_ERROR_CHECK
+            process->current_state->last_error = INVALID_OPERATION;
+#endif
+        }
+
+        func_number = -1;
+    }
+#endif
+
+    switch (func_number) {
+    case -1:
+        break;
+
+    case _init_func:
+        *(int *) args[1] = 1;
+        break;
+
+    case _synchronize_func:
+        ret_int = 1;
+        break;
+
+    case _exit_process_func:
+        do_disconnect_current();
+        break;
+
+    case _changeWindowState_func:
+        {
+            ClientGLXDrawable client_drawable = to_drawable(args[0]);
+
+            if (display_function_call)
+                fprintf(stderr, "client_drawable=%p\n",
+                        (void *) client_drawable);
+
+            GLXDrawable drawable =
+                    get_association_clientdrawable_serverdrawable(
+                                    process, client_drawable);
+            if (drawable) {
+                if (args[1] == IsViewable) {
+                    WindowPosStruct pos;
+
+                    _get_window_pos(dpy, drawable, &pos);
+                    if (pos.map_state != args[1]) {
+                        XMapWindow(dpy, drawable);
+
+                        int loop = 1;   // 1;
+
+                        while (loop) {
+                            while (XPending(dpy) > 0) {
+                                XEvent event;
+
+                                XNextEvent(dpy, &event);
+                                switch (event.type) {
+                                case ConfigureNotify:
+                                    {
+                                        if (((XConfigureEvent *) &event)->
+                                            window == drawable) {
+                                            loop = 0;
+                                        }
+                                        break;
+                                    }
+                                }
+                            }
+                            break; /* TODO */
+                        }
+                    }
+                }
+            }
+
+            break;
+        }
+
+    case _moveResizeWindow_func:
+        {
+            int *params = (int *) args[1];
+            ClientGLXDrawable client_drawable = to_drawable(args[0]);
+
+            if (display_function_call)
+                fprintf(stderr, "client_drawable=%p\n",
+                        (void *) client_drawable);
+
+            GLXDrawable drawable =
+                    get_association_clientdrawable_serverdrawable(
+                                    process, client_drawable);
+            if (drawable) {
+                WindowPosStruct pos;
+
+                _get_window_pos(dpy, drawable, &pos);
+                if (!
+                    (params[0] == pos.x && params[1] == pos.y &&
+                     params[2] == pos.width && params[3] == pos.height)) {
+                    int redim = !(params[2] == pos.width &&
+                                  params[3] == pos.height);
+                    active_win_x = params[0];
+                    active_win_y = params[1];
+
+                    fprintf(stderr, "old x=%d y=%d width=%d height=%d\n",
+                            pos.x, pos.y, pos.width, pos.height);
+                    fprintf(stderr, "new x=%d y=%d width=%d height=%d\n",
+                            params[0], params[1], params[2], params[3]);
+                    XMoveResizeWindow(dpy, drawable, params[0], params[1],
+                                      params[2], params[3]);
+                    int loop = 0;       // = 1
+
+                    while (loop) {
+                        while (XPending(dpy) > 0) {
+                            XEvent event;
+
+                            XNextEvent(dpy, &event);
+                            switch (event.type) {
+                            case ConfigureNotify:
+                                {
+                                    if (((XConfigureEvent *) &event)->
+                                        window == drawable) {
+                                        loop = 0;
+                                    }
+                                    break;
+                                }
+                            }
+                        }
+                    }
+                    /* The window should have resized by now, but force the
+                     * new size anyway.  */
+                    _get_window_pos(dpy, drawable, &pos);
+                    pos.width = params[2];
+                    pos.height = params[3];
+                    process->currentDrawablePos = pos;
+                    // if (getenv("FORCE_GL_VIEWPORT"))
+                    if (redim)
+                        glViewport(0, 0, pos.width, pos.height);
+                }
+            }
+            break;
+        }
+
+    case _send_cursor_func:
+        {
+#if 0
+            int x = args[0];
+            int y = args[1];
+            int width = args[2];
+            int height = args[3];
+            int xhot = args[4];
+            int yhot = args[5];
+            int *pixels = (int *) args[6];
+
+            client_cursor.x = x;
+            client_cursor.y = y;
+            client_cursor.width = width;
+            client_cursor.height = height;
+            client_cursor.xhot = xhot;
+            client_cursor.yhot = yhot;
+            if (pixels) {
+                client_cursor.pixels =
+                    realloc(client_cursor.pixels,
+                            client_cursor.width * client_cursor.height *
+                            sizeof(int));
+                memcpy(client_cursor.pixels, pixels,
+                       client_cursor.width * client_cursor.height *
+                       sizeof(int));
+            }
+            int in_window = (x >= 0 && y >= 0 &&
+                             x < process->currentDrawablePos.width &&
+                             y < process->currentDrawablePos.height);
+            // fprintf(stderr, "cursor at %d %d (%s)\n", x, y, (in_window) ?
+            // "in window" : "not in window");
+#endif
+            break;
+        }
+
+#ifdef BUFFER_BEGINEND
+    case glBegin_func:
+        process->began = 1;
+        process->primitive = args[0];
+        break;
+#endif
+
+    case glXWaitGL_func:
+        {
+            glXWaitGL();
+            ret_int = 0;
+            break;
+        }
+
+    case glXWaitX_func:
+        {
+            glXWaitX();
+            ret_int = 0;
+            break;
+        }
+
+    case glXChooseVisual_func:
+        {
+            ret_int = glXChooseVisualFunc(dpy, (int *) args[2]);
+            break;
+        }
+
+    case glXQueryExtensionsString_func:
+        {
+            ret_str = glXQueryExtensionsString(dpy, 0);
+            break;
+        }
+
+    case glXQueryServerString_func:
+        {
+            ret_str = glXQueryServerString(dpy, 0, args[2]);
+            break;
+        }
+
+    case glXGetClientString_func:
+        {
+            ret_str = glXGetClientString(dpy, args[1]);
+            break;
+        }
+
+    case glXGetScreenDriver_func:
+        {
+            GET_EXT_PTR(const char *, glXGetScreenDriver, (Display *, int));
+
+            ret_str = ptr_func_glXGetScreenDriver(dpy, 0);
+            break;
+        }
+
+    case glXGetDriverConfig_func:
+        {
+            GET_EXT_PTR(const char *, glXGetDriverConfig, (const char *));
+
+            ret_str = ptr_func_glXGetDriverConfig((const char *) args[0]);
+            break;
+        }
+
+    case glXCreateContext_func:
+        {
+            int visualid = (int) args[1];
+            int fake_shareList = (int) args[2];
+
+            if (1 || display_function_call)
+                fprintf(stderr, "visualid=%d, fake_shareList=%d\n", visualid,
+                        fake_shareList);
+
+            GLXContext shareList = get_association_fakecontext_glxcontext(
+                            process, fake_shareList);
+            XVisualInfo *vis = get_visual_info_from_visual_id(dpy, visualid);
+            GLXContext ctxt;
+
+            if (vis) {
+                ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
+            } else {
+                vis = get_default_visual(dpy);
+                int saved_visualid = vis->visualid;
+
+                vis->visualid = visualid ?: saved_visualid;
+                ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
+                vis->visualid = saved_visualid;
+            }
+
+            if (ctxt) {
+                int fake_ctxt =++ process->next_available_context_number;
+
+                set_association_fakecontext_visual(process, fake_ctxt, vis);
+                set_association_fakecontext_glxcontext(process,
+                                fake_ctxt, ctxt);
+                ret_int = fake_ctxt;
+
+                _create_context(process, ctxt, fake_ctxt, shareList,
+                                fake_shareList);
+            } else {
+                ret_int = 0;
+            }
+
+            break;
+        }
+
+
+    case glXCreateNewContext_func:
+        {
+            GET_EXT_PTR(GLXContext, glXCreateNewContext,
+                        (Display *, GLXFBConfig, int, GLXContext, int));
+            int client_fbconfig = args[1];
+
+            ret_int = 0;
+            GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
+
+            if (fbconfig) {
+                int fake_shareList = args[3];
+                GLXContext shareList = get_association_fakecontext_glxcontext(
+                                process, fake_shareList);
+                process->next_available_context_number++;
+                int fake_ctxt = process->next_available_context_number;
+                GLXContext ctxt = ptr_func_glXCreateNewContext(
+                                dpy, fbconfig, args[2], shareList, args[4]);
+                set_association_fakecontext_glxcontext(
+                                process, fake_ctxt, ctxt);
+                ret_int = fake_ctxt;
+
+                _create_context(process, ctxt, fake_ctxt, shareList,
+                                fake_shareList);
+            }
+            break;
+        }
+
+    case glXCopyContext_func:
+        {
+            int fake_src_ctxt = (int) args[1];
+            int fake_dst_ctxt = (int) args[2];
+            GLXContext src_ctxt;
+            GLXContext dst_ctxt;
+
+            if (display_function_call)
+                fprintf(stderr, "fake_src_ctxt=%i, fake_dst_ctxt=%i\n",
+                        fake_src_ctxt, fake_dst_ctxt);
+
+            if (!(src_ctxt = get_association_fakecontext_glxcontext(
+                                            process, fake_src_ctxt)))
+                fprintf(stderr, "invalid fake_src_ctxt (%i) !\n",
+                                fake_src_ctxt);
+            else
+                if (!(dst_ctxt = get_association_fakecontext_glxcontext(
+                                                process, fake_dst_ctxt))) {
+                fprintf(stderr, "invalid fake_dst_ctxt (%i) !\n",
+                                fake_dst_ctxt);
+            } else
+                glXCopyContext(dpy, src_ctxt, dst_ctxt, args[3]);
+
+            break;
+        }
+
+    case glXDestroyContext_func:
+        {
+            int fake_ctxt = (int) args[1];
+
+            if (display_function_call)
+                fprintf(stderr, "fake_ctxt=%d\n", fake_ctxt);
+
+            GLXContext ctxt = get_association_fakecontext_glxcontext(
+                            process, fake_ctxt);
+            if (ctxt == NULL) {
+                fprintf(stderr, "invalid fake_ctxt (%p) !\n",
+                        (void *) (long) fake_ctxt);
+            } else {
+                int i;
+
+                for (i = 0; i < process->nb_states; i ++) {
+                    if (process->glstates[i]->fake_ctxt == fake_ctxt) {
+                        if (ctxt == process->current_state->context)
+                            process->current_state = &process->default_state;
+
+                        int fake_shareList =
+                            process->glstates[i]->fake_shareList;
+                        process->glstates[i]->ref--;
+                        if (process->glstates[i]->ref == 0) {
+                            fprintf(stderr,
+                                    "destroy_gl_state fake_ctxt = %d\n",
+                                    process->glstates[i]->fake_ctxt);
+                            destroy_gl_state(process->glstates[i]);
+                            free(process->glstates[i]);
+                            memmove(&process->glstates[i],
+                                    &process->glstates[i + 1],
+                                    (process->nb_states - i - 1) *
+                                    sizeof(GLState *));
+                            process->nb_states --;
+                        }
+
+                        if (fake_shareList) {
+                            for (i = 0; i < process->nb_states; i++) {
+                                if (process->glstates[i]->fake_ctxt ==
+                                    fake_shareList) {
+                                    process->glstates[i]->ref--;
+                                    if (process->glstates[i]->ref == 0) {
+                                        fprintf(stderr,
+                                                "destroy_gl_state fake_ctxt = %d\n",
+                                                process->glstates[i]->
+                                                fake_ctxt);
+                                        destroy_gl_state(process->
+                                                         glstates[i]);
+                                        free(process->glstates[i]);
+                                        memmove(&process->glstates[i],
+                                                &process->glstates[i + 1],
+                                                (process->nb_states - i - 1) *
+                                                sizeof(GLState *));
+                                        process->nb_states --;
+                                    }
+                                    break;
+                                }
+                            }
+                        }
+
+                        glXDestroyContext(dpy, ctxt);
+                        unset_association_fakecontext_glxcontext(
+                                        process, fake_ctxt);
+
+                        break;
+                    }
+                }
+            }
+            break;
+        }
+
+    case glXQueryVersion_func:
+        {
+            ret_int = glXQueryVersion(dpy, (int *) args[1], (int *) args[2]);
+            break;
+        }
+
+    case glGetString_func:
+        {
+            ret_str = (char *) glGetString(args[0]);
+            break;
+        }
+
+    case glXMakeCurrent_func:
+        {
+            int i;
+            ClientGLXDrawable client_drawable = to_drawable(args[1]);
+            GLXDrawable drawable = 0;
+            int fake_ctxt = (int) args[2];
+
+            if (display_function_call)
+                fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
+                        (void *) client_drawable, fake_ctxt);
+
+            if (client_drawable == 0 && fake_ctxt == 0) {
+                ret_int = glXMakeCurrent(dpy, 0, NULL);
+                process->current_state = &process->default_state;
+            } else if ((drawable = (GLXDrawable)
+                                    get_association_fakepbuffer_pbuffer(
+                                            process, client_drawable))) {
+                GLXContext ctxt = get_association_fakecontext_glxcontext(
+                                process, fake_ctxt);
+                if (ctxt == NULL) {
+                    fprintf(stderr, "invalid fake_ctxt (%d) (*)!\n",
+                                    fake_ctxt);
+                    ret_int = 0;
+                } else
+                    ret_int = glXMakeCurrent(dpy, drawable, ctxt);
+            } else {
+                GLXContext ctxt = get_association_fakecontext_glxcontext(
+                                process, fake_ctxt);
+                if (ctxt == NULL) {
+                    fprintf(stderr, "invalid fake_ctxt (%d)!\n", fake_ctxt);
+                    ret_int = 0;
+                } else {
+                    drawable = get_association_clientdrawable_serverdrawable(
+                                    process, client_drawable);
+                    if (drawable == 0) {
+                        XVisualInfo *vis = get_association_fakecontext_visual(
+                                        process, fake_ctxt);
+                        if (vis == NULL)
+                            vis = get_default_visual(dpy);
+                        /* if (local_connection) drawable = client_drawable;
+                         * else */
+                        {
+                            if ((int) (long) client_drawable ==
+                                            RootWindow(dpy, 0) &&
+                                            local_connection) {
+                                drawable = (GLXDrawable) client_drawable;
+                            } else {
+                                drawable = create_window(
+                                                dpy, local_connection ?
+                                                (Window) client_drawable :
+                                                0, vis, "", 0, 0, 16, 16);
+                            }
+                        }
+                        set_association_clientdrawable_serverdrawable(process,
+                                        client_drawable, drawable);
+                    }
+
+                    ret_int = glXMakeCurrent(dpy, drawable, ctxt);
+                }
+            }
+
+            if (ret_int) {
+                for (i = 0; i < process->nb_states; i ++) {
+                    if (process->glstates[i]->fake_ctxt == fake_ctxt) {
+                        /* HACK !!! REMOVE */
+                        process->current_state = process->glstates[i];
+                        process->current_state->drawable = drawable;
+                        break;
+                    }
+                }
+
+                if (i == process->nb_states) {
+                    fprintf(stderr, "error remembering the new context\n");
+                    exit(-1);
+                }
+            }
+            break;
+        }
+
+    case glXSwapBuffers_func:
+        {
+            ClientGLXDrawable client_drawable = to_drawable(args[1]);
+
+            if (display_function_call)
+                fprintf(stderr, "client_drawable=%p\n", client_drawable);
+
+            GLXDrawable drawable =
+                get_association_clientdrawable_serverdrawable(
+                                process, client_drawable);
+            if (!drawable) {
+                fprintf(stderr, "unknown client_drawable (%p) !\n",
+                        (void *) client_drawable);
+            } else {
+#ifdef CURSOR_TRICK
+                if (client_cursor.pixels && local_connection == 0) {
+                    glPushAttrib(GL_ALL_ATTRIB_BITS);
+                    glPushClientAttrib(GL_ALL_ATTRIB_BITS);
+
+                    glMatrixMode(GL_PROJECTION);
+                    glPushMatrix();
+                    glLoadIdentity();
+                    glOrtho(0, process->currentDrawablePos.width,
+                            process->currentDrawablePos.height, 0, -1, 1);
+                    glMatrixMode(GL_MODELVIEW);
+                    glPushMatrix();
+                    glLoadIdentity();
+                    glPixelZoom(1, -1);
+
+                    glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
+                    glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
+                    glPixelStorei(GL_UNPACK_SWAP_BYTES, 0);
+                    glPixelStorei(GL_UNPACK_LSB_FIRST, 0);
+                    glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
+                    glShadeModel(GL_SMOOTH);
+
+                    glEnable(GL_BLEND);
+                    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+                    glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+
+                    int i, numUnits;
+
+                    glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &numUnits);
+                    for (i = 0; i < numUnits; i++) {
+                        do_glActiveTextureARB(GL_TEXTURE0_ARB + i);
+                        glDisable(GL_TEXTURE_1D);
+                        glDisable(GL_TEXTURE_2D);
+                        glDisable(GL_TEXTURE_3D);
+                    }
+                    glDisable(GL_ALPHA_TEST);
+                    glDisable(GL_DEPTH_TEST);
+                    glDisable(GL_STENCIL_TEST);
+                    glDisable(GL_SCISSOR_TEST);
+                    glDisable(GL_FRAGMENT_PROGRAM_ARB);
+                    glDisable(GL_VERTEX_PROGRAM_ARB);
+                    do_glUseProgramObjectARB(0);
+
+                    // memset(client_cursor.pixels, 255, client_cursor.width
+                    // * client_cursor.height * sizeof(int));
+
+                    glRasterPos2d(client_cursor.x - client_cursor.xhot,
+                                  client_cursor.y - client_cursor.yhot);
+                    glDrawPixels(client_cursor.width, client_cursor.height,
+                                 GL_BGRA, GL_UNSIGNED_BYTE,
+                                 client_cursor.pixels);
+
+                    glMatrixMode(GL_MODELVIEW);
+                    glPopMatrix();
+
+                    glMatrixMode(GL_PROJECTION);
+                    glPopMatrix();
+
+                    glPopClientAttrib();
+                    glPopAttrib();
+                }
+#endif
+
+                ////////// HORRIBLE HORRIBLE HACK
+                if (drawable != active_win && active_win) {
+                    glXMakeCurrent(dpy, active_win,
+                                    processes[0].current_state->context);
+                    glXSwapBuffers(dpy, active_win);
+                    glXMakeCurrent(dpy, process->current_state->drawable,
+                                    process->current_state->context);
+                }
+                glXSwapBuffers(dpy, drawable);
+            }
+            break;
+        }
+
+    case glXIsDirect_func:
+        {
+            int fake_ctxt = (int) args[1];
+
+            if (display_function_call)
+                fprintf(stderr, "fake_ctx=%x\n", fake_ctxt);
+            GLXContext ctxt =
+                get_association_fakecontext_glxcontext(process, fake_ctxt);
+            if (ctxt == NULL) {
+                fprintf(stderr, "invalid fake_ctxt (%x) !\n", fake_ctxt);
+                ret_char = False;
+            } else {
+                ret_char = glXIsDirect(dpy, ctxt);
+            }
+            break;
+        }
+
+    case glXGetConfig_func:
+        {
+            int visualid = args[1];
+            XVisualInfo *vis = NULL;
+
+            if (visualid)
+                vis = get_visual_info_from_visual_id(dpy, visualid);
+            if (vis == NULL)
+                vis = get_default_visual(dpy);
+            ret_int = glXGetConfig(dpy, vis, args[2], (int *) args[3]);
+            break;
+        }
+
+    case glXGetConfig_extended_func:
+        {
+            int visualid = args[1];
+            int n = args[2];
+            int i;
+            XVisualInfo *vis = NULL;
+            int *attribs = (int *) args[3];
+            int *values = (int *) args[4];
+            int *res = (int *) args[5];
+
+            if (visualid)
+                vis = get_visual_info_from_visual_id(dpy, visualid);
+            if (vis == NULL)
+                vis = get_default_visual(dpy);
+
+            for (i = 0; i < n; i++) {
+                res[i] = glXGetConfig(dpy, vis, attribs[i], &values[i]);
+            }
+            break;
+        }
+
+    case glXUseXFont_func:
+        {
+            /* implementation is client-side only :-) */
+            break;
+        }
+
+    case glXQueryExtension_func:
+        {
+            ret_int =
+                glXQueryExtension(dpy, (int *) args[1], (int *) args[2]);
+            break;
+        }
+
+    case glXChooseFBConfig_func:
+        {
+            GET_EXT_PTR(GLXFBConfig *, glXChooseFBConfig,
+                        (Display *, int, int *, int *));
+            if (process->nfbconfig == MAX_FBCONFIG) {
+                *(int *) args[3] = 0;
+                ret_int = 0;
+            } else {
+                GLXFBConfig *fbconfigs =
+                    ptr_func_glXChooseFBConfig(dpy, args[1], (int *) args[2],
+                                               (int *) args[3]);
+                if (fbconfigs) {
+                    process->fbconfigs[process->nfbconfig] = fbconfigs;
+                    process->fbconfigs_max[process->nfbconfig] =
+                        *(int *) args[3];
+                    process->nfbconfig++;
+                    ret_int = 1 + process->nfbconfig_total;
+                    process->nfbconfig_total +=
+                        process->fbconfigs_max[process->nfbconfig];
+                } else {
+                    ret_int = 0;
+                }
+            }
+            break;
+        }
+
+    case glXChooseFBConfigSGIX_func:
+        {
+            GET_EXT_PTR(GLXFBConfigSGIX *, glXChooseFBConfigSGIX,
+                        (Display *, int, int *, int *));
+            if (process->nfbconfig == MAX_FBCONFIG) {
+                *(int *) args[3] = 0;
+                ret_int = 0;
+            } else {
+                GLXFBConfigSGIX *fbconfigs =
+                    ptr_func_glXChooseFBConfigSGIX(dpy, args[1],
+                                                   (int *) args[2],
+                                                   (int *) args[3]);
+                if (fbconfigs) {
+                    process->fbconfigs[process->nfbconfig] = fbconfigs;
+                    process->fbconfigs_max[process->nfbconfig] =
+                        *(int *) args[3];
+                    process->nfbconfig++;
+                    ret_int = 1 + process->nfbconfig_total;
+                    process->nfbconfig_total +=
+                        process->fbconfigs_max[process->nfbconfig];
+                } else {
+                    ret_int = 0;
+                }
+            }
+            break;
+        }
+
+    case glXGetFBConfigs_func:
+        {
+            GET_EXT_PTR(GLXFBConfig *, glXGetFBConfigs,
+                        (Display *, int, int *));
+            if (process->nfbconfig == MAX_FBCONFIG) {
+                *(int *) args[2] = 0;
+                ret_int = 0;
+            } else {
+                GLXFBConfig *fbconfigs =
+                    ptr_func_glXGetFBConfigs(dpy, args[1], (int *) args[2]);
+                if (fbconfigs) {
+                    process->fbconfigs[process->nfbconfig] = fbconfigs;
+                    process->fbconfigs_max[process->nfbconfig] =
+                        *(int *) args[2];
+                    process->nfbconfig++;
+                    ret_int = 1 + process->nfbconfig_total;
+                    process->nfbconfig_total +=
+                        process->fbconfigs_max[process->nfbconfig];
+                } else {
+                    ret_int = 0;
+                }
+            }
+            break;
+        }
+
+    case glXCreatePbuffer_func:
+        {
+            GET_EXT_PTR(GLXPbuffer, glXCreatePbuffer,
+                        (Display *, GLXFBConfig, int *));
+            int client_fbconfig = args[1];
+
+            ret_int = 0;
+            GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
+
+            if (fbconfig) {
+                GLXPbuffer pbuffer =
+                    ptr_func_glXCreatePbuffer(dpy, fbconfig, (int *) args[2]);
+                fprintf(stderr, "glXCreatePbuffer --> %x\n", (int) pbuffer);
+                if (pbuffer) {
+                    ClientGLXDrawable fake_pbuffer = to_drawable(
+                                    ++ process->next_available_pbuffer_number);
+
+                    set_association_fakepbuffer_pbuffer(
+                                    process, fake_pbuffer, pbuffer);
+                    fprintf(stderr,
+                            "set_association_fakepbuffer_pbuffer(%p, %x)\n",
+                            fake_pbuffer, (int) (long) pbuffer);
+                    ret_int = (int) (long) fake_pbuffer;
+                }
+            }
+            break;
+        }
+
+    case glXCreateGLXPbufferSGIX_func:
+        {
+            GET_EXT_PTR(GLXPbufferSGIX, glXCreateGLXPbufferSGIX,
+                        (Display *, GLXFBConfig, int, int, int *));
+            int client_fbconfig = args[1];
+
+            ret_int = 0;
+            GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
+
+            if (fbconfig) {
+                GLXPbufferSGIX pbuffer = ptr_func_glXCreateGLXPbufferSGIX(
+                                dpy, fbconfig,
+                                args[2], args[3], (int *) args[4]);
+                if (pbuffer) {
+                    ClientGLXDrawable fake_pbuffer = to_drawable(
+                                    ++ process->next_available_pbuffer_number);
+
+                    set_association_fakepbuffer_pbuffer(
+                                    process, fake_pbuffer, pbuffer);
+                    ret_int = (int) (long) fake_pbuffer;
+                }
+            }
+            break;
+        }
+
+    case glXDestroyPbuffer_func:
+        {
+            GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
+            ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
+
+            if (display_function_call)
+                fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
+
+            GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
+                            process, fake_pbuffer);
+            if (pbuffer == 0) {
+                fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
+                                fake_pbuffer);
+            } else {
+                if (!is_gl_vendor_ati(dpy))
+                    ptr_func_glXDestroyPbuffer(dpy, pbuffer);
+                unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
+            }
+            break;
+        }
+
+    case glXDestroyGLXPbufferSGIX_func:
+        {
+            GET_EXT_PTR(void, glXDestroyGLXPbufferSGIX,
+                        (Display *, GLXPbuffer));
+            ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
+
+            if (display_function_call)
+                fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
+
+            GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
+                            process, fake_pbuffer);
+            if (pbuffer == 0) {
+                fprintf(stderr, "invalid fake_pbuffer (%p)  !\n",
+                        fake_pbuffer);
+            } else {
+                if (!is_gl_vendor_ati(dpy))
+                    ptr_func_glXDestroyGLXPbufferSGIX(dpy, pbuffer);
+                unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
+            }
+            break;
+        }
+
+    case glXBindTexImageATI_func:
+        {
+            GET_EXT_PTR(void, glXBindTexImageATI,
+                        (Display *, GLXPbuffer, int));
+            ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
+
+            if (display_function_call)
+                fprintf(stderr, "fake_pbuffer=%p\n",
+                                fake_pbuffer);
+
+            GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
+                                process, fake_pbuffer);
+            if (pbuffer == 0) {
+                fprintf(stderr,
+                        "glXBindTexImageATI : invalid fake_pbuffer (%p) !\n",
+                        fake_pbuffer);
+            } else {
+                ptr_func_glXBindTexImageATI(dpy, pbuffer, args[2]);
+            }
+            break;
+        }
+
+    case glXReleaseTexImageATI_func:
+        {
+            GET_EXT_PTR(void, glXReleaseTexImageATI,
+                        (Display *, GLXPbuffer, int));
+            ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
+
+            if (display_function_call)
+                fprintf(stderr, "fake_pbuffer=%d\n",
+                                (int) (long) fake_pbuffer);
+
+            GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
+                            process, fake_pbuffer);
+            if (pbuffer == 0) {
+                fprintf(stderr,
+                        "glXReleaseTexImageATI : invalid fake_pbuffer (%d) !\n",
+                        (int) (long) fake_pbuffer);
+            } else {
+                ptr_func_glXReleaseTexImageATI(dpy, pbuffer, args[2]);
+            }
+            break;
+        }
+
+    case glXBindTexImageARB_func:
+        {
+            GET_EXT_PTR(Bool, glXBindTexImageARB,
+                        (Display *, GLXPbuffer, int));
+            ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
+
+            if (display_function_call)
+                fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
+
+            GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
+                            process, fake_pbuffer);
+            if (pbuffer == 0) {
+                fprintf(stderr,
+                        "glXBindTexImageARB : invalid fake_pbuffer (%p) !\n",
+                        fake_pbuffer);
+                ret_int = 0;
+            } else {
+                ret_int = ptr_func_glXBindTexImageARB(dpy, pbuffer, args[2]);
+            }
+            break;
+        }
+
+    case glXReleaseTexImageARB_func:
+        {
+            GET_EXT_PTR(Bool, glXReleaseTexImageARB,
+                        (Display *, GLXPbuffer, int));
+            ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
+
+            if (display_function_call)
+                fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
+
+            GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
+                            process, fake_pbuffer);
+            if (pbuffer == 0) {
+                fprintf(stderr,
+                        "glXReleaseTexImageARB : invalid fake_pbuffer (%p) !\n",
+                        fake_pbuffer);
+                ret_int = 0;
+            } else {
+                ret_int =
+                    ptr_func_glXReleaseTexImageARB(dpy, pbuffer, args[2]);
+            }
+            break;
+        }
+
+    case glXGetFBConfigAttrib_func:
+        {
+            GET_EXT_PTR(int, glXGetFBConfigAttrib,
+                        (Display *, GLXFBConfig, int, int *));
+            int client_fbconfig = args[1];
+
+            ret_int = 0;
+            GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
+
+            if (fbconfig)
+                ret_int =
+                    ptr_func_glXGetFBConfigAttrib(dpy, fbconfig, args[2],
+                                                  (int *) args[3]);
+            break;
+        }
+
+    case glXGetFBConfigAttrib_extended_func:
+        {
+            GET_EXT_PTR(int, glXGetFBConfigAttrib,
+                        (Display *, GLXFBConfig, int, int *));
+            int client_fbconfig = args[1];
+            int n = args[2];
+            int i;
+            int *attribs = (int *) args[3];
+            int *values = (int *) args[4];
+            int *res = (int *) args[5];
+            GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
+
+            for (i = 0; i < n; i++) {
+                if (fbconfig) {
+                    res[i] =
+                        ptr_func_glXGetFBConfigAttrib(dpy, fbconfig,
+                                                      attribs[i], &values[i]);
+                } else {
+                    res[i] = 0;
+                }
+            }
+            break;
+        }
+
+    case glXGetFBConfigAttribSGIX_func:
+        {
+            GET_EXT_PTR(int, glXGetFBConfigAttribSGIX,
+                        (Display *, GLXFBConfigSGIX, int, int *));
+            int client_fbconfig = args[1];
+
+            ret_int = 0;
+            GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
+
+            if (fbconfig)
+                ret_int =
+                    ptr_func_glXGetFBConfigAttribSGIX(dpy,
+                                                      (GLXFBConfigSGIX)
+                                                      fbconfig, args[2],
+                                                      (int *) args[3]);
+            break;
+        }
+
+    case glXQueryContext_func:
+        {
+            GET_EXT_PTR(int, glXQueryContext,
+                        (Display *, GLXContext, int, int *));
+            int fake_ctxt = (int) args[1];
+
+            if (display_function_call)
+                fprintf(stderr, "fake_ctx=%i\n", fake_ctxt);
+            GLXContext ctxt =
+                get_association_fakecontext_glxcontext(process, fake_ctxt);
+            if (ctxt == NULL) {
+                fprintf(stderr, "invalid fake_ctxt (%i) !\n", fake_ctxt);
+                ret_int = 0;
+            } else {
+                ret_int =
+                    ptr_func_glXQueryContext(dpy, ctxt, args[2],
+                                             (int *) args[3]);
+            }
+            break;
+        }
+
+    case glXQueryDrawable_func:
+        {
+            GET_EXT_PTR(void, glXQueryDrawable,
+                        (Display *, GLXDrawable, int, int *));
+            ClientGLXDrawable client_drawable = to_drawable(args[1]);
+            GLXDrawable drawable =
+                    get_association_clientdrawable_serverdrawable(
+                                    process, client_drawable);
+
+            if (display_function_call)
+                fprintf(stderr, "client_drawable=%p\n",
+                                client_drawable);
+
+            if (!drawable)
+                fprintf(stderr, "invalid client_drawable (%p) !\n",
+                                client_drawable);
+            else
+                ptr_func_glXQueryDrawable(dpy, drawable,
+                                args[2], (int *) args[3]);
+
+            break;
+        }
+
+    case glXQueryGLXPbufferSGIX_func:
+        {
+            GET_EXT_PTR(int, glXQueryGLXPbufferSGIX,
+                        (Display *, GLXFBConfigSGIX, int, int *));
+            int client_fbconfig = args[1];
+
+            ret_int = 0;
+            GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
+
+            if (fbconfig)
+                ret_int = ptr_func_glXQueryGLXPbufferSGIX(dpy,
+                                (GLXFBConfigSGIX) fbconfig,
+                                args[2], (int *) args[3]);
+            break;
+        }
+
+    case glXCreateContextWithConfigSGIX_func:
+        {
+            GET_EXT_PTR(GLXContext, glXCreateContextWithConfigSGIX,
+                        (Display *, GLXFBConfigSGIX, int, GLXContext, int));
+            int client_fbconfig = args[1];
+
+            ret_int = 0;
+            GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
+
+            if (fbconfig) {
+                GLXContext shareList = get_association_fakecontext_glxcontext(
+                                process, (int) args[3]);
+                process->next_available_context_number++;
+                int fake_ctxt = process->next_available_context_number;
+                GLXContext ctxt = ptr_func_glXCreateContextWithConfigSGIX(
+                                dpy, (GLXFBConfigSGIX) fbconfig, args[2],
+                                shareList, args[4]);
+                set_association_fakecontext_glxcontext(
+                                process, fake_ctxt, ctxt);
+                ret_int = fake_ctxt;
+            }
+            break;
+        }
+
+    case glXGetVisualFromFBConfig_func:
+        {
+            GET_EXT_PTR(XVisualInfo *, glXGetVisualFromFBConfig,
+                        (Display *, GLXFBConfig));
+            int client_fbconfig = args[1];
+
+            ret_int = 0;
+            GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
+
+            if (fbconfig) {
+                XVisualInfo *vis =
+                    ptr_func_glXGetVisualFromFBConfig(dpy, fbconfig);
+                ret_int = (vis) ? vis->visualid : 0;
+                if (vis) {
+                    tabAssocAttribListVisual =
+                        realloc(tabAssocAttribListVisual,
+                                sizeof(AssocAttribListVisual) *
+                                (nTabAssocAttribListVisual + 1));
+                    tabAssocAttribListVisual[nTabAssocAttribListVisual].
+                        attribListLength = 0;
+                    tabAssocAttribListVisual[nTabAssocAttribListVisual].
+                        attribList = NULL;
+                    tabAssocAttribListVisual[nTabAssocAttribListVisual].
+                        visInfo = vis;
+                    nTabAssocAttribListVisual++;
+                }
+                if (display_function_call)
+                    fprintf(stderr, "visualid = %d\n", ret_int);
+            }
+            break;
+        }
+
+    case glXSwapIntervalSGI_func:
+        {
+            GET_EXT_PTR(int, glXSwapIntervalSGI, (int));
+
+            ret_int = ptr_func_glXSwapIntervalSGI(args[0]);
+            break;
+        }
+
+    case glXGetProcAddress_fake_func:
+        {
+            if (display_function_call)
+                fprintf(stderr, "%s\n", (char *) args[0]);
+            ret_int = glXGetProcAddressARB((const GLubyte *) args[0]) != NULL;
+            break;
+        }
+
+    case glXGetProcAddress_global_fake_func:
+        {
+            int nbElts = args[0];
+            char *huge_buffer = (char *) args[1];
+            char *result = (char *) args[2];
+            int i;
+
+            for (i = 0; i < nbElts; i++) {
+                int len = strlen(huge_buffer);
+
+                result[i] =
+                    glXGetProcAddressARB((const GLubyte *) huge_buffer) !=
+                    NULL;
+                huge_buffer += len + 1;
+            }
+            break;
+        }
+
+/* Begin of texture stuff */
+    case glBindTexture_func:
+    case glBindTextureEXT_func:
+        {
+            int target = args[0];
+            unsigned int client_texture = args[1];
+            unsigned int server_texture;
+
+            if (client_texture == 0) {
+                glBindTexture(target, 0);
+            } else {
+                alloc_value(process->current_state->textureAllocator,
+                            client_texture);
+                server_texture =
+                    process->current_state->tabTextures[client_texture];
+                if (server_texture == 0) {
+                    glGenTextures(1, &server_texture);
+                    process->current_state->tabTextures[client_texture] =
+                        server_texture;
+                }
+                glBindTexture(target, server_texture);
+            }
+            break;
+        }
+
+    case glGenTextures_fake_func:
+        {
+            GET_EXT_PTR(void, glGenTextures, (GLsizei n, GLuint *textures));
+            int i;
+            int n = args[0];
+            unsigned int *clientTabTextures = malloc(n * sizeof(int));
+            unsigned int *serverTabTextures = malloc(n * sizeof(int));
+
+            alloc_range(process->current_state->textureAllocator, n,
+                        clientTabTextures);
+
+            ptr_func_glGenTextures(n, serverTabTextures);
+            for (i = 0; i < n; i++) {
+                process->current_state->tabTextures[clientTabTextures[i]] =
+                    serverTabTextures[i];
+            }
+
+            free(clientTabTextures);
+            free(serverTabTextures);
+            break;
+        }
+
+
+    case glDeleteTextures_func:
+        {
+            GET_EXT_PTR(void, glDeleteTextures,
+                        (GLsizei n, const GLuint *textures));
+            int i;
+            int n = args[0];
+            unsigned int *clientTabTextures = (unsigned int *) args[1];
+
+            delete_range(process->current_state->textureAllocator, n,
+                         clientTabTextures);
+
+            unsigned int *serverTabTextures = malloc(n * sizeof(int));
+
+            for (i = 0; i < n; i++) {
+                serverTabTextures[i] =
+                    get_server_texture(process, clientTabTextures[i]);
+            }
+            ptr_func_glDeleteTextures(n, serverTabTextures);
+            for (i = 0; i < n; i++) {
+                process->current_state->tabTextures[clientTabTextures[i]] = 0;
+            }
+            free(serverTabTextures);
+            break;
+        }
+
+    case glPrioritizeTextures_func:
+        {
+            GET_EXT_PTR(void, glPrioritizeTextures,
+                        (GLsizei n, const GLuint *textures,
+                         const GLclampf *priorities));
+
+            int i;
+            int n = args[0];
+            unsigned int *textures = (unsigned int *) args[1];
+
+            for (i = 0; i < n; i++) {
+                textures[i] = get_server_texture(process, textures[i]);
+            }
+            ptr_func_glPrioritizeTextures(n, textures,
+                                          (const GLclampf *) args[2]);
+            break;
+        }
+
+    case glAreTexturesResident_func:
+        {
+            GET_EXT_PTR(void, glAreTexturesResident,
+                        (GLsizei n, const GLuint *textures,
+                         GLboolean *residences));
+            int i;
+            int n = args[0];
+            unsigned int *textures = (unsigned int *) args[1];
+
+            for (i = 0; i < n; i++) {
+                textures[i] = get_server_texture(process, textures[i]);
+            }
+            ptr_func_glAreTexturesResident(n, textures,
+                                           (GLboolean *) args[2]);
+            break;
+        }
+
+    case glIsTexture_func:
+    case glIsTextureEXT_func:
+        {
+            GET_EXT_PTR(GLboolean, glIsTexture, (GLuint texture));
+            unsigned int client_texture = args[0];
+            unsigned int server_texture =
+                get_server_texture(process, client_texture);
+            if (server_texture)
+                ret_char = ptr_func_glIsTexture(server_texture);
+            else
+                ret_char = 0;
+            break;
+        }
+
+    case glFramebufferTexture1DEXT_func:
+        {
+            GET_EXT_PTR(void, glFramebufferTexture1DEXT,
+                        (int, int, int, int, int));
+            unsigned int client_texture = args[3];
+            unsigned int server_texture =
+                get_server_texture(process, client_texture);
+            if (server_texture)
+                ptr_func_glFramebufferTexture1DEXT(args[0], args[1], args[2],
+                                                   server_texture, args[4]);
+            break;
+        }
+
+    case glFramebufferTexture2DEXT_func:
+        {
+            GET_EXT_PTR(void, glFramebufferTexture2DEXT,
+                        (int, int, int, int, int));
+            unsigned int client_texture = args[3];
+            unsigned int server_texture =
+                get_server_texture(process, client_texture);
+            if (server_texture)
+                ptr_func_glFramebufferTexture2DEXT(args[0], args[1], args[2],
+                                                   server_texture, args[4]);
+            break;
+        }
+
+    case glFramebufferTexture3DEXT_func:
+        {
+            GET_EXT_PTR(void, glFramebufferTexture3DEXT,
+                        (int, int, int, int, int, int));
+            unsigned int client_texture = args[3];
+            unsigned int server_texture =
+                get_server_texture(process, client_texture);
+            if (server_texture)
+                ptr_func_glFramebufferTexture3DEXT(args[0], args[1], args[2],
+                                                   server_texture, args[4],
+                                                   args[5]);
+            break;
+        }
+/* End of texture stuff */
+
+/* Begin of list stuff */
+    case glIsList_func:
+        {
+            unsigned int client_list = args[0];
+            unsigned int server_list = get_server_list(process, client_list);
+
+            if (server_list)
+                ret_char = glIsList(server_list);
+            else
+                ret_char = 0;
+            break;
+        }
+
+    case glDeleteLists_func:
+        {
+            int i;
+            unsigned int first_client = args[0];
+            int n = args[1];
+
+            unsigned int first_server =
+                get_server_list(process, first_client);
+            for (i = 0; i < n; i++) {
+                if (get_server_list(process, first_client + i) !=
+                    first_server + i)
+                    break;
+            }
+            if (i == n) {
+                glDeleteLists(first_server, n);
+            } else {
+                for (i = 0; i < n; i++) {
+                    glDeleteLists(get_server_list(process, first_client + i),
+                                  1);
+                }
+            }
+
+            for (i = 0; i < n; i++) {
+                process->current_state->tabLists[first_client + i] = 0;
+            }
+            delete_consecutive_values(process->current_state->listAllocator,
+                                      first_client, n);
+            break;
+        }
+
+    case glGenLists_fake_func:
+        {
+            int i;
+            int n = args[0];
+            unsigned int server_first = glGenLists(n);
+
+            if (server_first) {
+                unsigned int client_first =
+                    alloc_range(process->current_state->listAllocator, n,
+                                NULL);
+                for (i = 0; i < n; i++) {
+                    process->current_state->tabLists[client_first + i] =
+                        server_first + i;
+                }
+            }
+            break;
+        }
+
+    case glNewList_func:
+        {
+            unsigned int client_list = args[0];
+            int mode = args[1];
+
+            alloc_value(process->current_state->listAllocator, client_list);
+            unsigned int server_list = get_server_list(process, client_list);
+
+            if (server_list == 0) {
+                server_list = glGenLists(1);
+                process->current_state->tabLists[client_list] = server_list;
+            }
+            glNewList(server_list, mode);
+            break;
+        }
+
+    case glCallList_func:
+        {
+            unsigned int client_list = args[0];
+            unsigned int server_list = get_server_list(process, client_list);
+
+            glCallList(server_list);
+            break;
+        }
+
+    case glCallLists_func:
+        {
+            int i;
+            int n = args[0];
+            int type = args[1];
+            const GLvoid *lists = (const GLvoid *) args[2];
+            int *new_lists = malloc(sizeof(int) * n);
+
+            for (i = 0; i < n; i++) {
+                new_lists[i] =
+                    get_server_list(process, translate_id(i, type, lists));
+            }
+            glCallLists(n, GL_UNSIGNED_INT, new_lists);
+            free(new_lists);
+            break;
+        }
+
+
+/* End of list stuff */
+
+/* Begin of buffer stuff */
+    case glBindBufferARB_func:
+        {
+            GET_EXT_PTR(void, glBindBufferARB, (int, int));
+            int target = args[0];
+            unsigned int client_buffer = args[1];
+            unsigned int server_buffer;
+
+            if (client_buffer == 0) {
+                ptr_func_glBindBufferARB(target, 0);
+            } else {
+                server_buffer = get_server_buffer(process, client_buffer);
+                ptr_func_glBindBufferARB(target, server_buffer);
+            }
+            break;
+        }
+
+    case glGenBuffersARB_fake_func:
+        {
+            GET_EXT_PTR(void, glGenBuffersARB, (int, unsigned int *));
+            int i;
+            int n = args[0];
+            unsigned int *clientTabBuffers = malloc(n * sizeof(int));
+            unsigned int *serverTabBuffers = malloc(n * sizeof(int));
+
+            alloc_range(process->current_state->bufferAllocator, n,
+                        clientTabBuffers);
+
+            ptr_func_glGenBuffersARB(n, serverTabBuffers);
+            for (i = 0; i < n; i++) {
+                process->current_state->tabBuffers[clientTabBuffers[i]] =
+                    serverTabBuffers[i];
+            }
+
+            free(clientTabBuffers);
+            free(serverTabBuffers);
+            break;
+        }
+
+
+    case glDeleteBuffersARB_func:
+        {
+            GET_EXT_PTR(void, glDeleteBuffersARB, (int, int *));
+            int i;
+            int n = args[0];
+            unsigned int *clientTabBuffers = (unsigned int *) args[1];
+
+            delete_range(process->current_state->bufferAllocator, n,
+                         clientTabBuffers);
+
+            int *serverTabBuffers = malloc(n * sizeof(int));
+
+            for (i = 0; i < n; i++) {
+                serverTabBuffers[i] =
+                    get_server_buffer(process, clientTabBuffers[i]);
+            }
+            ptr_func_glDeleteBuffersARB(n, serverTabBuffers);
+            for (i = 0; i < n; i++) {
+                process->current_state->tabBuffers[clientTabBuffers[i]] = 0;
+            }
+            free(serverTabBuffers);
+            break;
+        }
+
+    case glIsBufferARB_func:
+        {
+            GET_EXT_PTR(int, glIsBufferARB, (int));
+            unsigned int client_buffer = args[0];
+            unsigned int server_buffer =
+                get_server_buffer(process, client_buffer);
+            if (server_buffer)
+                ret_int = ptr_func_glIsBufferARB(server_buffer);
+            else
+                ret_int = 0;
+            break;
+        }
+
+/* End of buffer stuff */
+
+    case glShaderSourceARB_fake_func:
+        {
+            GET_EXT_PTR(void, glShaderSourceARB, (int, int, char **, void *));
+            int size = args[1];
+            int i;
+            int acc_length = 0;
+            GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
+            int *tab_length = (int *) args[3];
+
+            for (i = 0; i < size; i++) {
+                tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
+                acc_length += tab_length[i];
+            }
+            ptr_func_glShaderSourceARB(args[0], args[1], tab_prog,
+                                       tab_length);
+            free(tab_prog);
+            break;
+        }
+
+    case glShaderSource_fake_func:
+        {
+            GET_EXT_PTR(void, glShaderSource, (int, int, char **, void *));
+            int size = args[1];
+            int i;
+            int acc_length = 0;
+            GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
+            int *tab_length = (int *) args[3];
+
+            for (i = 0; i < size; i++) {
+                tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
+                acc_length += tab_length[i];
+            }
+            ptr_func_glShaderSource(args[0], args[1], tab_prog, tab_length);
+            free(tab_prog);
+            break;
+        }
+
+    case glVertexPointer_fake_func:
+        {
+            int offset = args[0];
+            int size = args[1];
+            int type = args[2];
+            int stride = args[3];
+            int bytes_size = args[4];
+
+            process->current_state->vertexPointerSize =
+                MAX(process->current_state->vertexPointerSize,
+                    offset + bytes_size);
+            process->current_state->vertexPointer =
+                realloc(process->current_state->vertexPointer,
+                        process->current_state->vertexPointerSize);
+            memcpy(process->current_state->vertexPointer + offset,
+                   (void *) args[5], bytes_size);
+            /* fprintf(stderr, "glVertexPointer_fake_func size=%d, type=%d,
+             * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
+            glVertexPointer(size, type, stride,
+                            process->current_state->vertexPointer);
+            break;
+        }
+
+    case glNormalPointer_fake_func:
+        {
+            int offset = args[0];
+            int type = args[1];
+            int stride = args[2];
+            int bytes_size = args[3];
+
+            process->current_state->normalPointerSize =
+                MAX(process->current_state->normalPointerSize,
+                    offset + bytes_size);
+            process->current_state->normalPointer =
+                realloc(process->current_state->normalPointer,
+                        process->current_state->normalPointerSize);
+            memcpy(process->current_state->normalPointer + offset,
+                   (void *) args[4], bytes_size);
+            // fprintf(stderr, "glNormalPointer_fake_func type=%d, stride=%d, 
+            // byte_size=%d\n", type, stride, bytes_size);
+            glNormalPointer(type, stride,
+                            process->current_state->normalPointer);
+            break;
+        }
+
+    case glIndexPointer_fake_func:
+        {
+            int offset = args[0];
+            int type = args[1];
+            int stride = args[2];
+            int bytes_size = args[3];
+
+            process->current_state->indexPointerSize =
+                MAX(process->current_state->indexPointerSize,
+                    offset + bytes_size);
+            process->current_state->indexPointer =
+                realloc(process->current_state->indexPointer,
+                        process->current_state->indexPointerSize);
+            memcpy(process->current_state->indexPointer + offset,
+                   (void *) args[4], bytes_size);
+            // fprintf(stderr, "glIndexPointer_fake_func type=%d, stride=%d,
+            // byte_size=%d\n", type, stride, bytes_size);
+            glIndexPointer(type, stride,
+                           process->current_state->indexPointer);
+            break;
+        }
+
+    case glEdgeFlagPointer_fake_func:
+        {
+            int offset = args[0];
+            int stride = args[1];
+            int bytes_size = args[2];
+
+            process->current_state->edgeFlagPointerSize =
+                MAX(process->current_state->edgeFlagPointerSize,
+                    offset + bytes_size);
+            process->current_state->edgeFlagPointer =
+                realloc(process->current_state->edgeFlagPointer,
+                        process->current_state->edgeFlagPointerSize);
+            memcpy(process->current_state->edgeFlagPointer + offset,
+                   (void *) args[3], bytes_size);
+            // fprintf(stderr, "glEdgeFlagPointer_fake_func stride = %d,
+            // bytes_size=%d\n", stride, bytes_size);
+            glEdgeFlagPointer(stride,
+                              process->current_state->edgeFlagPointer);
+            break;
+        }
+
+    case glVertexAttribPointerARB_fake_func:
+        {
+            GET_EXT_PTR(void, glVertexAttribPointerARB,
+                        (int, int, int, int, int, void *));
+            int offset = args[0];
+            int index = args[1];
+            int size = args[2];
+            int type = args[3];
+            int normalized = args[4];
+            int stride = args[5];
+            int bytes_size = args[6];
+
+            process->current_state->vertexAttribPointerSize[index] =
+                MAX(process->current_state->vertexAttribPointerSize[index],
+                    offset + bytes_size);
+            process->current_state->vertexAttribPointer[index] =
+                realloc(process->current_state->vertexAttribPointer[index],
+                        process->current_state->
+                        vertexAttribPointerSize[index]);
+            memcpy(process->current_state->vertexAttribPointer[index] +
+                   offset, (void *) args[7], bytes_size);
+            ptr_func_glVertexAttribPointerARB(index, size, type, normalized,
+                                              stride,
+                                              process->current_state->
+                                              vertexAttribPointer[index]);
+            break;
+        }
+
+    case glVertexAttribPointerNV_fake_func:
+        {
+            GET_EXT_PTR(void, glVertexAttribPointerNV,
+                        (int, int, int, int, void *));
+            int offset = args[0];
+            int index = args[1];
+            int size = args[2];
+            int type = args[3];
+            int stride = args[4];
+            int bytes_size = args[5];
+
+            process->current_state->vertexAttribPointerNVSize[index] =
+                MAX(process->current_state->vertexAttribPointerNVSize[index],
+                    offset + bytes_size);
+            process->current_state->vertexAttribPointerNV[index] =
+                realloc(process->current_state->vertexAttribPointerNV[index],
+                        process->current_state->
+                        vertexAttribPointerNVSize[index]);
+            memcpy(process->current_state->vertexAttribPointerNV[index] +
+                   offset, (void *) args[6], bytes_size);
+            ptr_func_glVertexAttribPointerNV(index, size, type, stride,
+                                             process->current_state->
+                                             vertexAttribPointerNV[index]);
+            break;
+        }
+
+    case glColorPointer_fake_func:
+        {
+            int offset = args[0];
+            int size = args[1];
+            int type = args[2];
+            int stride = args[3];
+            int bytes_size = args[4];
+
+            process->current_state->colorPointerSize =
+                MAX(process->current_state->colorPointerSize,
+                    offset + bytes_size);
+            process->current_state->colorPointer =
+                realloc(process->current_state->colorPointer,
+                        process->current_state->colorPointerSize);
+            memcpy(process->current_state->colorPointer + offset,
+                   (void *) args[5], bytes_size);
+            // fprintf(stderr, "glColorPointer_fake_func bytes_size = %d\n",
+            // bytes_size);
+            glColorPointer(size, type, stride,
+                           process->current_state->colorPointer);
+
+            break;
+        }
+
+    case glSecondaryColorPointer_fake_func:
+        {
+            GET_EXT_PTR(void, glSecondaryColorPointer,
+                        (int, int, int, void *));
+            int offset = args[0];
+            int size = args[1];
+            int type = args[2];
+            int stride = args[3];
+            int bytes_size = args[4];
+
+            process->current_state->secondaryColorPointerSize =
+                MAX(process->current_state->secondaryColorPointerSize,
+                    offset + bytes_size);
+            process->current_state->secondaryColorPointer =
+                realloc(process->current_state->secondaryColorPointer,
+                        process->current_state->secondaryColorPointerSize);
+            memcpy(process->current_state->secondaryColorPointer + offset,
+                   (void *) args[5], bytes_size);
+            // fprintf(stderr, "glSecondaryColorPointer_fake_func bytes_size
+            // = %d\n", bytes_size);
+            ptr_func_glSecondaryColorPointer(size, type, stride,
+                                             process->current_state->
+                                             secondaryColorPointer);
+
+            break;
+        }
+
+    case glPushClientAttrib_func:
+        {
+            int mask = args[0];
+
+            if (process->current_state->clientStateSp <
+                MAX_CLIENT_STATE_STACK_SIZE) {
+                process->current_state->clientStateStack[process->
+                                                         current_state->
+                                                         clientStateSp].mask =
+                    mask;
+                if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
+                    process->current_state->clientStateStack[process->
+                                                             current_state->
+                                                             clientStateSp].
+                        activeTextureIndex =
+                        process->current_state->activeTextureIndex;
+                }
+                process->current_state->clientStateSp++;
+            }
+            glPushClientAttrib(mask);
+            break;
+        }
+
+    case glPopClientAttrib_func:
+        {
+            if (process->current_state->clientStateSp > 0) {
+                process->current_state->clientStateSp--;
+                if (process->current_state->
+                    clientStateStack[process->current_state->clientStateSp].
+                    mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
+                    process->current_state->activeTextureIndex =
+                        process->current_state->clientStateStack[process->
+                                                                 current_state->
+                                                                 clientStateSp].
+                        activeTextureIndex;
+                }
+            }
+            glPopClientAttrib();
+            break;
+        }
+
+    case glClientActiveTexture_func:
+    case glClientActiveTextureARB_func:
+        {
+            int activeTexture = args[0];
+
+            process->current_state->activeTextureIndex =
+                activeTexture - GL_TEXTURE0_ARB;
+            do_glClientActiveTextureARB(activeTexture);
+            break;
+        }
+
+    case glTexCoordPointer_fake_func:
+        {
+            int offset = args[0];
+            int index = args[1];
+            int size = args[2];
+            int type = args[3];
+            int stride = args[4];
+            int bytes_size = args[5];
+
+            process->current_state->texCoordPointerSize[index] =
+                MAX(process->current_state->texCoordPointerSize[index],
+                    offset + bytes_size);
+            process->current_state->texCoordPointer[index] =
+                realloc(process->current_state->texCoordPointer[index],
+                        process->current_state->texCoordPointerSize[index]);
+            memcpy(process->current_state->texCoordPointer[index] + offset,
+                   (void *) args[6], bytes_size);
+            /* fprintf(stderr, "glTexCoordPointer_fake_func size=%d, type=%d, 
+             * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + index);
+            glTexCoordPointer(size, type, stride,
+                              process->current_state->texCoordPointer[index]);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
+                                        process->current_state->
+                                        activeTextureIndex);
+            break;
+        }
+
+    case glWeightPointerARB_fake_func:
+        {
+            GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
+            int offset = args[0];
+            int size = args[1];
+            int type = args[2];
+            int stride = args[3];
+            int bytes_size = args[4];
+
+            process->current_state->weightPointerSize =
+                MAX(process->current_state->weightPointerSize,
+                    offset + bytes_size);
+            process->current_state->weightPointer =
+                realloc(process->current_state->weightPointer,
+                        process->current_state->weightPointerSize);
+            memcpy(process->current_state->weightPointer + offset,
+                   (void *) args[5], bytes_size);
+            /* fprintf(stderr, "glWeightPointerARB_fake_func size=%d,
+             * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
+             * bytes_size); */
+            ptr_func_glWeightPointerARB(size, type, stride,
+                                        process->current_state->
+                                        weightPointer);
+            break;
+        }
+
+    case glMatrixIndexPointerARB_fake_func:
+        {
+            GET_EXT_PTR(void, glMatrixIndexPointerARB,
+                        (int, int, int, void *));
+            int offset = args[0];
+            int size = args[1];
+            int type = args[2];
+            int stride = args[3];
+            int bytes_size = args[4];
+
+            process->current_state->matrixIndexPointerSize =
+                MAX(process->current_state->matrixIndexPointerSize,
+                    offset + bytes_size);
+            process->current_state->matrixIndexPointer =
+                realloc(process->current_state->matrixIndexPointer,
+                        process->current_state->matrixIndexPointerSize);
+            memcpy(process->current_state->matrixIndexPointer + offset,
+                   (void *) args[5], bytes_size);
+            /* fprintf(stderr, "glMatrixIndexPointerARB_fake_func size=%d,
+             * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
+             * bytes_size); */
+            ptr_func_glMatrixIndexPointerARB(size, type, stride,
+                                             process->current_state->
+                                             matrixIndexPointer);
+            break;
+        }
+
+    case glFogCoordPointer_fake_func:
+        {
+            GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
+            int offset = args[0];
+            int type = args[1];
+            int stride = args[2];
+            int bytes_size = args[3];
+
+            process->current_state->fogCoordPointerSize =
+                MAX(process->current_state->fogCoordPointerSize,
+                    offset + bytes_size);
+            process->current_state->fogCoordPointer =
+                realloc(process->current_state->fogCoordPointer,
+                        process->current_state->fogCoordPointerSize);
+            memcpy(process->current_state->fogCoordPointer + offset,
+                   (void *) args[4], bytes_size);
+            // fprintf(stderr, "glFogCoordPointer_fake_func type=%d,
+            // stride=%d, byte_size=%d\n", type, stride, bytes_size);
+            ptr_func_glFogCoordPointer(type, stride,
+                                       process->current_state->
+                                       fogCoordPointer);
+            break;
+        }
+
+    case glVariantPointerEXT_fake_func:
+        {
+            GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
+            int offset = args[0];
+            int id = args[1];
+            int type = args[2];
+            int stride = args[3];
+            int bytes_size = args[4];
+
+            process->current_state->variantPointerEXTSize[id] =
+                MAX(process->current_state->variantPointerEXTSize[id],
+                    offset + bytes_size);
+            process->current_state->variantPointerEXT[id] =
+                realloc(process->current_state->variantPointerEXT[id],
+                        process->current_state->variantPointerEXTSize[id]);
+            memcpy(process->current_state->variantPointerEXT[id] + offset,
+                   (void *) args[5], bytes_size);
+            // fprintf(stderr, "glVariantPointerEXT_fake_func[%d] type=%d,
+            // stride=%d, byte_size=%d\n", id, type, stride, bytes_size);
+            ptr_func_glVariantPointerEXT(id, type, stride,
+                                         process->current_state->
+                                         variantPointerEXT[id]);
+            break;
+        }
+
+    case glInterleavedArrays_fake_func:
+        {
+            GET_EXT_PTR(void, glInterleavedArrays, (int, int, void *));
+            int offset = args[0];
+            int format = args[1];
+            int stride = args[2];
+            int bytes_size = args[3];
+
+            process->current_state->interleavedArraysSize =
+                MAX(process->current_state->interleavedArraysSize,
+                    offset + bytes_size);
+            process->current_state->interleavedArrays =
+                realloc(process->current_state->interleavedArrays,
+                        process->current_state->interleavedArraysSize);
+            memcpy(process->current_state->interleavedArrays + offset,
+                   (void *) args[4], bytes_size);
+            // fprintf(stderr, "glInterleavedArrays_fake_func format=%d,
+            // stride=%d, byte_size=%d\n", format, stride, bytes_size);
+            ptr_func_glInterleavedArrays(format, stride,
+                                         process->current_state->
+                                         interleavedArrays);
+            break;
+        }
+
+    case glElementPointerATI_fake_func:
+        {
+            GET_EXT_PTR(void, glElementPointerATI, (int, void *));
+            int type = args[0];
+            int bytes_size = args[1];
+
+            process->current_state->elementPointerATISize = bytes_size;
+            process->current_state->elementPointerATI =
+                realloc(process->current_state->elementPointerATI,
+                        process->current_state->elementPointerATISize);
+            memcpy(process->current_state->elementPointerATI,
+                   (void *) args[2], bytes_size);
+            // fprintf(stderr, "glElementPointerATI_fake_func type=%d,
+            // byte_size=%d\n", type, bytes_size);
+            ptr_func_glElementPointerATI(type,
+                                         process->current_state->
+                                         elementPointerATI);
+            break;
+        }
+
+    case glTexCoordPointer01_fake_func:
+        {
+            int size = args[0];
+            int type = args[1];
+            int stride = args[2];
+            int bytes_size = args[3];
+
+            process->current_state->texCoordPointerSize[0] = bytes_size;
+            process->current_state->texCoordPointer[0] =
+                realloc(process->current_state->texCoordPointer[0],
+                        bytes_size);
+            memcpy(process->current_state->texCoordPointer[0],
+                   (void *) args[4], bytes_size);
+            /* fprintf(stderr, "glTexCoordPointer01_fake_func size=%d,
+             * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
+             * bytes_size); */
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
+            glTexCoordPointer(size, type, stride,
+                              process->current_state->texCoordPointer[0]);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
+            glTexCoordPointer(size, type, stride,
+                              process->current_state->texCoordPointer[0]);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
+                                        process->current_state->
+                                        activeTextureIndex);
+            break;
+        }
+
+    case glTexCoordPointer012_fake_func:
+        {
+            int size = args[0];
+            int type = args[1];
+            int stride = args[2];
+            int bytes_size = args[3];
+
+            process->current_state->texCoordPointerSize[0] = bytes_size;
+            process->current_state->texCoordPointer[0] =
+                realloc(process->current_state->texCoordPointer[0],
+                        bytes_size);
+            memcpy(process->current_state->texCoordPointer[0],
+                   (void *) args[4], bytes_size);
+            /* fprintf(stderr, "glTexCoordPointer012_fake_func size=%d,
+             * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
+             * bytes_size); */
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
+            glTexCoordPointer(size, type, stride,
+                              process->current_state->texCoordPointer[0]);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
+            glTexCoordPointer(size, type, stride,
+                              process->current_state->texCoordPointer[0]);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
+            glTexCoordPointer(size, type, stride,
+                              process->current_state->texCoordPointer[0]);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
+                                        process->current_state->
+                                        activeTextureIndex);
+            break;
+        }
+
+    case glVertexAndNormalPointer_fake_func:
+        {
+            int vertexPointerSize = args[0];
+            int vertexPointerType = args[1];
+            int vertexPointerStride = args[2];
+            int normalPointerType = args[3];
+            int normalPointerStride = args[4];
+            int bytes_size = args[5];
+            void *ptr = (void *) args[6];
+
+            process->current_state->vertexPointerSize = bytes_size;
+            process->current_state->vertexPointer =
+                realloc(process->current_state->vertexPointer, bytes_size);
+            memcpy(process->current_state->vertexPointer, ptr, bytes_size);
+            glVertexPointer(vertexPointerSize, vertexPointerType,
+                            vertexPointerStride,
+                            process->current_state->vertexPointer);
+            glNormalPointer(normalPointerType, normalPointerStride,
+                            process->current_state->vertexPointer);
+            break;
+        }
+
+    case glVertexNormalPointerInterlaced_fake_func:
+        {
+            int i = 0;
+            int offset = args[i++];
+            int vertexPointerSize = args[i++];
+            int vertexPointerType = args[i++];
+            int stride = args[i++];
+            int normalPointerOffset = args[i++];
+            int normalPointerType = args[i++];
+            int bytes_size = args[i++];
+            void *ptr = (void *) args[i++];
+
+            process->current_state->vertexPointerSize =
+                MAX(process->current_state->vertexPointerSize,
+                    offset + bytes_size);
+            process->current_state->vertexPointer =
+                realloc(process->current_state->vertexPointer,
+                        process->current_state->vertexPointerSize);
+            memcpy(process->current_state->vertexPointer + offset, ptr,
+                   bytes_size);
+            glVertexPointer(vertexPointerSize, vertexPointerType, stride,
+                            process->current_state->vertexPointer);
+            glNormalPointer(normalPointerType, stride,
+                            process->current_state->vertexPointer +
+                            normalPointerOffset);
+            break;
+        }
+
+    case glTuxRacerDrawElements_fake_func:
+        {
+            int mode = args[0];
+            int count = args[1];
+            int isColorEnabled = args[2];
+            void *ptr = (void *) args[3];
+            int stride =
+                6 * sizeof(float) +
+                ((isColorEnabled) ? 4 * sizeof(unsigned char) : 0);
+            glVertexPointer(3, GL_FLOAT, stride, ptr);
+            glNormalPointer(GL_FLOAT, stride, ptr + 3 * sizeof(float));
+            if (isColorEnabled)
+                glColorPointer(4, GL_UNSIGNED_BYTE, stride,
+                               ptr + 6 * sizeof(float));
+            glDrawArrays(mode, 0, count);
+            break;
+        }
+
+    case glVertexNormalColorPointerInterlaced_fake_func:
+        {
+            int i = 0;
+            int offset = args[i++];
+            int vertexPointerSize = args[i++];
+            int vertexPointerType = args[i++];
+            int stride = args[i++];
+            int normalPointerOffset = args[i++];
+            int normalPointerType = args[i++];
+            int colorPointerOffset = args[i++];
+            int colorPointerSize = args[i++];
+            int colorPointerType = args[i++];
+            int bytes_size = args[i++];
+            void *ptr = (void *) args[i++];
+
+            process->current_state->vertexPointerSize =
+                MAX(process->current_state->vertexPointerSize,
+                    offset + bytes_size);
+            process->current_state->vertexPointer =
+                realloc(process->current_state->vertexPointer,
+                        process->current_state->vertexPointerSize);
+            memcpy(process->current_state->vertexPointer + offset, ptr,
+                   bytes_size);
+            glVertexPointer(vertexPointerSize, vertexPointerType, stride,
+                            process->current_state->vertexPointer);
+            glNormalPointer(normalPointerType, stride,
+                            process->current_state->vertexPointer +
+                            normalPointerOffset);
+            glColorPointer(colorPointerSize, colorPointerType, stride,
+                           process->current_state->vertexPointer +
+                           colorPointerOffset);
+            break;
+        }
+
+    case glVertexColorTexCoord0PointerInterlaced_fake_func:
+        {
+            int i = 0;
+            int offset = args[i++];
+            int vertexPointerSize = args[i++];
+            int vertexPointerType = args[i++];
+            int stride = args[i++];
+            int colorPointerOffset = args[i++];
+            int colorPointerSize = args[i++];
+            int colorPointerType = args[i++];
+            int texCoord0PointerOffset = args[i++];
+            int texCoord0PointerSize = args[i++];
+            int texCoord0PointerType = args[i++];
+            int bytes_size = args[i++];
+            void *ptr = (void *) args[i++];
+
+            process->current_state->vertexPointerSize =
+                MAX(process->current_state->vertexPointerSize,
+                    offset + bytes_size);
+            process->current_state->vertexPointer =
+                realloc(process->current_state->vertexPointer,
+                        process->current_state->vertexPointerSize);
+            memcpy(process->current_state->vertexPointer + offset, ptr,
+                   bytes_size);
+            glVertexPointer(vertexPointerSize, vertexPointerType, stride,
+                            process->current_state->vertexPointer);
+            glColorPointer(colorPointerSize, colorPointerType, stride,
+                           process->current_state->vertexPointer +
+                           colorPointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
+            glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
+                              stride,
+                              process->current_state->vertexPointer +
+                              texCoord0PointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
+                                        process->current_state->
+                                        activeTextureIndex);
+            break;
+        }
+
+    case glVertexNormalTexCoord0PointerInterlaced_fake_func:
+        {
+            int i = 0;
+            int offset = args[i++];
+            int vertexPointerSize = args[i++];
+            int vertexPointerType = args[i++];
+            int stride = args[i++];
+            int normalPointerOffset = args[i++];
+            int normalPointerType = args[i++];
+            int texCoord0PointerOffset = args[i++];
+            int texCoord0PointerSize = args[i++];
+            int texCoord0PointerType = args[i++];
+            int bytes_size = args[i++];
+            void *ptr = (void *) args[i++];
+
+            process->current_state->vertexPointerSize =
+                MAX(process->current_state->vertexPointerSize,
+                    offset + bytes_size);
+            process->current_state->vertexPointer =
+                realloc(process->current_state->vertexPointer,
+                        process->current_state->vertexPointerSize);
+            memcpy(process->current_state->vertexPointer + offset, ptr,
+                   bytes_size);
+            glVertexPointer(vertexPointerSize, vertexPointerType, stride,
+                            process->current_state->vertexPointer);
+            glNormalPointer(normalPointerType, stride,
+                            process->current_state->vertexPointer +
+                            normalPointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
+            glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
+                              stride,
+                              process->current_state->vertexPointer +
+                              texCoord0PointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
+                                        process->current_state->
+                                        activeTextureIndex);
+            break;
+        }
+
+    case glVertexNormalTexCoord01PointerInterlaced_fake_func:
+        {
+            int i = 0;
+            int offset = args[i++];
+            int vertexPointerSize = args[i++];
+            int vertexPointerType = args[i++];
+            int stride = args[i++];
+            int normalPointerOffset = args[i++];
+            int normalPointerType = args[i++];
+            int texCoord0PointerOffset = args[i++];
+            int texCoord0PointerSize = args[i++];
+            int texCoord0PointerType = args[i++];
+            int texCoord1PointerOffset = args[i++];
+            int texCoord1PointerSize = args[i++];
+            int texCoord1PointerType = args[i++];
+            int bytes_size = args[i++];
+            void *ptr = (void *) args[i++];
+
+            process->current_state->vertexPointerSize =
+                MAX(process->current_state->vertexPointerSize,
+                    offset + bytes_size);
+            process->current_state->vertexPointer =
+                realloc(process->current_state->vertexPointer,
+                        process->current_state->vertexPointerSize);
+            memcpy(process->current_state->vertexPointer + offset, ptr,
+                   bytes_size);
+            glVertexPointer(vertexPointerSize, vertexPointerType, stride,
+                            process->current_state->vertexPointer);
+            glNormalPointer(normalPointerType, stride,
+                            process->current_state->vertexPointer +
+                            normalPointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
+            glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
+                              stride,
+                              process->current_state->vertexPointer +
+                              texCoord0PointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
+            glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
+                              stride,
+                              process->current_state->vertexPointer +
+                              texCoord1PointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
+                                        process->current_state->
+                                        activeTextureIndex);
+            break;
+        }
+
+    case glVertexNormalTexCoord012PointerInterlaced_fake_func:
+        {
+            int i = 0;
+            int offset = args[i++];
+            int vertexPointerSize = args[i++];
+            int vertexPointerType = args[i++];
+            int stride = args[i++];
+            int normalPointerOffset = args[i++];
+            int normalPointerType = args[i++];
+            int texCoord0PointerOffset = args[i++];
+            int texCoord0PointerSize = args[i++];
+            int texCoord0PointerType = args[i++];
+            int texCoord1PointerOffset = args[i++];
+            int texCoord1PointerSize = args[i++];
+            int texCoord1PointerType = args[i++];
+            int texCoord2PointerOffset = args[i++];
+            int texCoord2PointerSize = args[i++];
+            int texCoord2PointerType = args[i++];
+            int bytes_size = args[i++];
+            void *ptr = (void *) args[i++];
+
+            process->current_state->vertexPointerSize =
+                MAX(process->current_state->vertexPointerSize,
+                    offset + bytes_size);
+            process->current_state->vertexPointer =
+                realloc(process->current_state->vertexPointer,
+                        process->current_state->vertexPointerSize);
+            memcpy(process->current_state->vertexPointer + offset, ptr,
+                   bytes_size);
+            glVertexPointer(vertexPointerSize, vertexPointerType, stride,
+                            process->current_state->vertexPointer);
+            glNormalPointer(normalPointerType, stride,
+                            process->current_state->vertexPointer +
+                            normalPointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
+            glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
+                              stride,
+                              process->current_state->vertexPointer +
+                              texCoord0PointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
+            glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
+                              stride,
+                              process->current_state->vertexPointer +
+                              texCoord1PointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
+            glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
+                              stride,
+                              process->current_state->vertexPointer +
+                              texCoord2PointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
+                                        process->current_state->
+                                        activeTextureIndex);
+            break;
+        }
+
+    case glVertexNormalColorTexCoord0PointerInterlaced_fake_func:
+        {
+            int i = 0;
+            int offset = args[i++];
+            int vertexPointerSize = args[i++];
+            int vertexPointerType = args[i++];
+            int stride = args[i++];
+            int normalPointerOffset = args[i++];
+            int normalPointerType = args[i++];
+            int colorPointerOffset = args[i++];
+            int colorPointerSize = args[i++];
+            int colorPointerType = args[i++];
+            int texCoord0PointerOffset = args[i++];
+            int texCoord0PointerSize = args[i++];
+            int texCoord0PointerType = args[i++];
+            int bytes_size = args[i++];
+            void *ptr = (void *) args[i++];
+
+            process->current_state->vertexPointerSize =
+                MAX(process->current_state->vertexPointerSize,
+                    offset + bytes_size);
+            process->current_state->vertexPointer =
+                realloc(process->current_state->vertexPointer,
+                        process->current_state->vertexPointerSize);
+            memcpy(process->current_state->vertexPointer + offset, ptr,
+                   bytes_size);
+            glVertexPointer(vertexPointerSize, vertexPointerType, stride,
+                            process->current_state->vertexPointer);
+            glNormalPointer(normalPointerType, stride,
+                            process->current_state->vertexPointer +
+                            normalPointerOffset);
+            glColorPointer(colorPointerSize, colorPointerType, stride,
+                           process->current_state->vertexPointer +
+                           colorPointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
+            glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
+                              stride,
+                              process->current_state->vertexPointer +
+                              texCoord0PointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
+                                        process->current_state->
+                                        activeTextureIndex);
+            break;
+        }
+
+    case glVertexNormalColorTexCoord01PointerInterlaced_fake_func:
+        {
+            int i = 0;
+            int offset = args[i++];
+            int vertexPointerSize = args[i++];
+            int vertexPointerType = args[i++];
+            int stride = args[i++];
+            int normalPointerOffset = args[i++];
+            int normalPointerType = args[i++];
+            int colorPointerOffset = args[i++];
+            int colorPointerSize = args[i++];
+            int colorPointerType = args[i++];
+            int texCoord0PointerOffset = args[i++];
+            int texCoord0PointerSize = args[i++];
+            int texCoord0PointerType = args[i++];
+            int texCoord1PointerOffset = args[i++];
+            int texCoord1PointerSize = args[i++];
+            int texCoord1PointerType = args[i++];
+            int bytes_size = args[i++];
+            void *ptr = (void *) args[i++];
+
+            process->current_state->vertexPointerSize =
+                MAX(process->current_state->vertexPointerSize,
+                    offset + bytes_size);
+            process->current_state->vertexPointer =
+                realloc(process->current_state->vertexPointer,
+                        process->current_state->vertexPointerSize);
+            memcpy(process->current_state->vertexPointer + offset, ptr,
+                   bytes_size);
+            glVertexPointer(vertexPointerSize, vertexPointerType, stride,
+                            process->current_state->vertexPointer);
+            glNormalPointer(normalPointerType, stride,
+                            process->current_state->vertexPointer +
+                            normalPointerOffset);
+            glColorPointer(colorPointerSize, colorPointerType, stride,
+                           process->current_state->vertexPointer +
+                           colorPointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
+            glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
+                              stride,
+                              process->current_state->vertexPointer +
+                              texCoord0PointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
+            glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
+                              stride,
+                              process->current_state->vertexPointer +
+                              texCoord1PointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
+                                        process->current_state->
+                                        activeTextureIndex);
+            break;
+        }
+
+    case glVertexNormalColorTexCoord012PointerInterlaced_fake_func:
+        {
+            int i = 0;
+            int offset = args[i++];
+            int vertexPointerSize = args[i++];
+            int vertexPointerType = args[i++];
+            int stride = args[i++];
+            int normalPointerOffset = args[i++];
+            int normalPointerType = args[i++];
+            int colorPointerOffset = args[i++];
+            int colorPointerSize = args[i++];
+            int colorPointerType = args[i++];
+            int texCoord0PointerOffset = args[i++];
+            int texCoord0PointerSize = args[i++];
+            int texCoord0PointerType = args[i++];
+            int texCoord1PointerOffset = args[i++];
+            int texCoord1PointerSize = args[i++];
+            int texCoord1PointerType = args[i++];
+            int texCoord2PointerOffset = args[i++];
+            int texCoord2PointerSize = args[i++];
+            int texCoord2PointerType = args[i++];
+            int bytes_size = args[i++];
+            void *ptr = (void *) args[i++];
+
+            process->current_state->vertexPointerSize =
+                MAX(process->current_state->vertexPointerSize,
+                    offset + bytes_size);
+            process->current_state->vertexPointer =
+                realloc(process->current_state->vertexPointer,
+                        process->current_state->vertexPointerSize);
+            memcpy(process->current_state->vertexPointer + offset, ptr,
+                   bytes_size);
+            glVertexPointer(vertexPointerSize, vertexPointerType, stride,
+                            process->current_state->vertexPointer);
+            glNormalPointer(normalPointerType, stride,
+                            process->current_state->vertexPointer +
+                            normalPointerOffset);
+            glColorPointer(colorPointerSize, colorPointerType, stride,
+                           process->current_state->vertexPointer +
+                           colorPointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
+            glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
+                              stride,
+                              process->current_state->vertexPointer +
+                              texCoord0PointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
+            glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
+                              stride,
+                              process->current_state->vertexPointer +
+                              texCoord1PointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
+            glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
+                              stride,
+                              process->current_state->vertexPointer +
+                              texCoord2PointerOffset);
+            do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
+                                        process->current_state->
+                                        activeTextureIndex);
+            break;
+        }
+
+    case _glVertexPointer_buffer_func:
+        {
+            glVertexPointer(args[0], args[1], args[2], (void *) args[3]);
+            break;
+        }
+
+    case _glNormalPointer_buffer_func:
+        {
+            glNormalPointer(args[0], args[1], (void *) args[2]);
+            break;
+        }
+
+    case _glColorPointer_buffer_func:
+        {
+            glColorPointer(args[0], args[1], args[2], (void *) args[3]);
+            break;
+        }
+
+    case _glSecondaryColorPointer_buffer_func:
+        {
+            GET_EXT_PTR(void, glSecondaryColorPointer,
+                        (int, int, int, void *));
+            ptr_func_glSecondaryColorPointer(args[0], args[1], args[2],
+                                             (void *) args[3]);
+            break;
+        }
+
+    case _glIndexPointer_buffer_func:
+        {
+            glIndexPointer(args[0], args[1], (void *) args[2]);
+            break;
+        }
+
+    case _glTexCoordPointer_buffer_func:
+        {
+            glTexCoordPointer(args[0], args[1], args[2], (void *) args[3]);
+            break;
+        }
+
+    case _glEdgeFlagPointer_buffer_func:
+        {
+            glEdgeFlagPointer(args[0], (void *) args[1]);
+            break;
+        }
+
+    case _glVertexAttribPointerARB_buffer_func:
+        {
+            GET_EXT_PTR(void, glVertexAttribPointerARB,
+                        (int, int, int, int, int, void *));
+            ptr_func_glVertexAttribPointerARB(args[0], args[1], args[2],
+                                              args[3], args[4],
+                                              (void *) args[5]);
+            break;
+        }
+
+    case _glWeightPointerARB_buffer_func:
+        {
+            GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
+
+            ptr_func_glWeightPointerARB(args[0], args[1], args[2],
+                                        (void *) args[3]);
+            break;
+        }
+
+    case _glMatrixIndexPointerARB_buffer_func:
+        {
+            GET_EXT_PTR(void, glMatrixIndexPointerARB,
+                        (int, int, int, void *));
+            ptr_func_glMatrixIndexPointerARB(args[0], args[1], args[2],
+                                             (void *) args[3]);
+            break;
+        }
+
+    case _glFogCoordPointer_buffer_func:
+        {
+            GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
+
+            ptr_func_glFogCoordPointer(args[0], args[1], (void *) args[2]);
+            break;
+        }
+
+    case _glVariantPointerEXT_buffer_func:
+        {
+            GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
+
+            ptr_func_glVariantPointerEXT(args[0], args[1], args[2],
+                                         (void *) args[3]);
+            break;
+        }
+
+    case _glDrawElements_buffer_func:
+        {
+            glDrawElements(args[0], args[1], args[2], (void *) args[3]);
+            break;
+        }
+
+    case _glDrawRangeElements_buffer_func:
+        {
+            glDrawRangeElements(args[0], args[1], args[2], args[3], args[4],
+                                (void *) args[5]);
+            break;
+        }
+
+    case _glMultiDrawElements_buffer_func:
+        {
+            GET_EXT_PTR(void, glMultiDrawElements,
+                        (int, int *, int, void **, int));
+            ptr_func_glMultiDrawElements(args[0], (int *) args[1], args[2],
+                                         (void **) args[3], args[4]);
+            break;
+        }
+
+    case _glGetError_fake_func:
+        {
+            break;
+        }
+
+    case glGetIntegerv_func:
+        {
+            glGetIntegerv(args[0], (int *) args[1]);
+            fprintf(stderr, "glGetIntegerv(%x)=%d\n", (int) args[0],
+                    *(int *) args[1]);
+            break;
+        }
+
+    case _glReadPixels_pbo_func:
+        {
+            glReadPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
+                         ARG_TO_INT(args[2]), ARG_TO_INT(args[3]),
+                         ARG_TO_UNSIGNED_INT(args[4]),
+                         ARG_TO_UNSIGNED_INT(args[5]), (void *) (args[6]));
+            break;
+        }
+
+    case _glDrawPixels_pbo_func:
+        {
+            glDrawPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
+                         ARG_TO_UNSIGNED_INT(args[2]),
+                         ARG_TO_UNSIGNED_INT(args[3]),
+                         (const void *) (args[4]));
+            break;
+        }
+
+    case _glMapBufferARB_fake_func:
+        {
+            GET_EXT_PTR(GLvoid *, glMapBufferARB, (GLenum, GLenum));
+            GET_EXT_PTR(GLboolean, glUnmapBufferARB, (GLenum));
+            int target = args[0];
+            int size = args[1];
+            void *dst_ptr = (void *) args[2];
+            void *src_ptr = ptr_func_glMapBufferARB(target, GL_READ_ONLY);
+
+            if (src_ptr) {
+                memcpy(dst_ptr, src_ptr, size);
+                ret_int = ptr_func_glUnmapBufferARB(target);
+            } else {
+                ret_int = 0;
+            }
+            break;
+        }
+
+    case fake_gluBuild2DMipmaps_func:
+        {
+            GET_GLU_PTR(GLint, gluBuild2DMipmaps,
+                        (GLenum arg_0, GLint arg_1, GLsizei arg_2,
+                         GLsizei arg_3, GLenum arg_4, GLenum arg_5,
+                         const GLvoid *arg_6));
+            if (ptr_func_gluBuild2DMipmaps == NULL)
+                ptr_func_gluBuild2DMipmaps = mesa_gluBuild2DMipmaps;
+            ptr_func_gluBuild2DMipmaps(ARG_TO_UNSIGNED_INT(args[0]),
+                                       ARG_TO_INT(args[1]),
+                                       ARG_TO_INT(args[2]),
+                                       ARG_TO_INT(args[3]),
+                                       ARG_TO_UNSIGNED_INT(args[4]),
+                                       ARG_TO_UNSIGNED_INT(args[5]),
+                                       (const void *) (args[6]));
+            break;
+        }
+
+    case _glSelectBuffer_fake_func:
+        {
+            process->current_state->selectBufferSize = args[0] * 4;
+            process->current_state->selectBufferPtr =
+                realloc(process->current_state->selectBufferPtr,
+                        process->current_state->selectBufferSize);
+            glSelectBuffer(args[0], process->current_state->selectBufferPtr);
+            break;
+        }
+
+    case _glGetSelectBuffer_fake_func:
+        {
+            void *ptr = (void *) args[0];
+
+            memcpy(ptr, process->current_state->selectBufferPtr,
+                   process->current_state->selectBufferSize);
+            break;
+        }
+
+    case _glFeedbackBuffer_fake_func:
+        {
+            process->current_state->feedbackBufferSize = args[0] * 4;
+            process->current_state->feedbackBufferPtr =
+                realloc(process->current_state->feedbackBufferPtr,
+                        process->current_state->feedbackBufferSize);
+            glFeedbackBuffer(args[0], args[1],
+                             process->current_state->feedbackBufferPtr);
+            break;
+        }
+
+    case _glGetFeedbackBuffer_fake_func:
+        {
+            void *ptr = (void *) args[0];
+
+            memcpy(ptr, process->current_state->feedbackBufferPtr,
+                   process->current_state->feedbackBufferSize);
+            break;
+        }
+
+        /* 
+         * case glEnableClientState_func: { if (display_function_call)
+         * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
+         * GL_VERTEX_ARRAY]); glEnableClientState(args[0]); break; }
+         * 
+         * case glDisableClientState_func: { if (display_function_call)
+         * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
+         * GL_VERTEX_ARRAY]); glDisableClientState(args[0]); break; }
+         * 
+         * case glClientActiveTexture_func: case
+         * glClientActiveTextureARB_func: { if (display_function_call)
+         * fprintf(stderr, "client activeTexture %d\n", args[0] -
+         * GL_TEXTURE0_ARB); glClientActiveTextureARB(args[0]); break; }
+         * 
+         * case glActiveTextureARB_func: { if (display_function_call)
+         * fprintf(stderr, "server activeTexture %d\n", args[0] -
+         * GL_TEXTURE0_ARB); glActiveTextureARB(args[0]); break; }
+         * 
+         * case glLockArraysEXT_func: break;
+         * 
+         * case glUnlockArraysEXT_func: break;
+         * 
+         * case glArrayElement_func: { glArrayElement(args[0]); break; }
+         * 
+         * case glDrawArrays_func: { glDrawArrays(args[0],args[1],args[2]);
+         * break; }
+         * 
+         * case glDrawElements_func: {
+         * glDrawElements(args[0],args[1],args[2],(void*)args[3]); break; }
+         * 
+         * case glDrawRangeElements_func: {
+         * glDrawRangeElements(args[0],args[1],args[2],args[3],args[4],(void*)args[5]);
+         * break; } */
+
+    case glGetError_func:
+        {
+#ifdef SYSTEMATIC_ERROR_CHECK
+            ret_int = process->current_state->last_error;
+#else
+            ret_int = glGetError();
+#endif
+            break;
+        }
+
+    case glNewObjectBufferATI_func:
+        {
+            GET_EXT_PTR(int, glNewObjectBufferATI, (int, void *, int));
+
+            ret_int = ptr_func_glNewObjectBufferATI(args[0],
+                            (void *) args[1], args[2]);
+            break;
+        }
+
+    case glClear_func:
+        /* HACK workaround for an unexplainable issue */
+        if (args[0] & GL_COLOR_BUFFER_BIT)
+            glClear(GL_COLOR_BUFFER_BIT);
+        if (args[0] & GL_STENCIL_BUFFER_BIT)
+            glClear(GL_STENCIL_BUFFER_BIT);
+        if (args[0] & GL_DEPTH_BUFFER_BIT)
+            glClear(GL_DEPTH_BUFFER_BIT);
+        if (args[0] & GL_ACCUM_BUFFER_BIT)
+            glClear(GL_ACCUM_BUFFER_BIT);
+        break;
+
+    default:
+        execute_func(func_number, args, &ret_int, &ret_char);
+        break;
+    }
+
+#ifdef SYSTEMATIC_ERROR_CHECK
+    if (func_number == glGetError_func) {
+        process->current_state->last_error = 0;
+    } else {
+        process->current_state->last_error = glGetError();
+        if (process->current_state->last_error != 0) {
+            printf("error %s 0x%x\n", tab_opengl_calls_name[func_number],
+                   process->current_state->last_error);
+        }
+    }
+#endif
+
+    switch (ret_type) {
+    case TYPE_NONE:
+        break;
+
+    case TYPE_CHAR:
+    case TYPE_UNSIGNED_CHAR:
+        ret_int = ret_char;
+        break;
+
+    case TYPE_INT:
+    case TYPE_UNSIGNED_INT:
+        break;
+
+    case TYPE_CONST_CHAR:
+        {
+            strncpy(ret_string, (ret_str) ? ret_str : "", 32768);
+            break;
+        }
+
+    default:
+        fprintf(stderr, "unexpected ret type : %d\n", ret_type);
+        exit(-1);
+        break;
+    }
+
+    if (display_function_call)
+        fprintf(stderr, "[%d]< %s\n", process->instr_counter,
+                tab_opengl_calls_name[func_number]);
+
+    return ret_int;
+}
Index: git/target-i386/opengl_func.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/opengl_func.h	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,1108 @@
+/*
+ *  Main header for both host and guest sides
+ *
+ *  Copyright (c) 2006,2007 Even Rouault
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "mesa_gl.h"
+#include "mesa_glext.h"
+
+/* Argument list are internally of a type that can hold a target pointer
+ * or a host pointer.  */
+typedef target_phys_addr_t arg_t;
+
+enum {
+    TYPE_NONE,
+    TYPE_CHAR,
+    TYPE_UNSIGNED_CHAR,
+    TYPE_SHORT,
+    TYPE_UNSIGNED_SHORT,
+    TYPE_INT,
+    TYPE_UNSIGNED_INT,
+    TYPE_FLOAT,
+    TYPE_DOUBLE,
+    TYPE_1CHAR,
+    TYPE_2CHAR,
+    TYPE_3CHAR,
+    TYPE_4CHAR,
+    TYPE_128UCHAR,
+    TYPE_1SHORT,
+    TYPE_2SHORT,
+    TYPE_3SHORT,
+    TYPE_4SHORT,
+    TYPE_1INT,
+    TYPE_2INT,
+    TYPE_3INT,
+    TYPE_4INT,
+    TYPE_1FLOAT,
+    TYPE_2FLOAT,
+    TYPE_3FLOAT,
+    TYPE_4FLOAT,
+    TYPE_16FLOAT,
+    TYPE_1DOUBLE,
+    TYPE_2DOUBLE,
+    TYPE_3DOUBLE,
+    TYPE_4DOUBLE,
+    TYPE_16DOUBLE,
+    TYPE_OUT_1INT,
+    TYPE_OUT_1FLOAT,
+    TYPE_OUT_4CHAR,
+    TYPE_OUT_4INT,
+    TYPE_OUT_4FLOAT,
+    TYPE_OUT_4DOUBLE,
+    TYPE_OUT_128UCHAR,
+    TYPE_CONST_CHAR,
+    TYPE_ARRAY_CHAR,
+    TYPE_ARRAY_SHORT,
+    TYPE_ARRAY_INT,
+    TYPE_ARRAY_FLOAT,
+    TYPE_ARRAY_DOUBLE,
+    TYPE_IN_IGNORED_POINTER,
+    TYPE_OUT_ARRAY_CHAR,
+    TYPE_OUT_ARRAY_SHORT,
+    TYPE_OUT_ARRAY_INT,
+    TYPE_OUT_ARRAY_FLOAT,
+    TYPE_OUT_ARRAY_DOUBLE,
+    TYPE_NULL_TERMINATED_STRING,
+
+    TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    /* .... */
+    TYPE_LAST,
+    /* .... */
+    TYPE_1UCHAR = TYPE_CHAR,
+    TYPE_1USHORT = TYPE_1SHORT,
+    TYPE_1UINT = TYPE_1INT,
+    TYPE_OUT_1UINT = TYPE_OUT_1INT,
+    TYPE_OUT_4UCHAR = TYPE_OUT_4CHAR,
+    TYPE_ARRAY_VOID = TYPE_ARRAY_CHAR,
+    TYPE_ARRAY_SIGNED_CHAR = TYPE_ARRAY_CHAR,
+    TYPE_ARRAY_UNSIGNED_CHAR = TYPE_ARRAY_CHAR,
+    TYPE_ARRAY_UNSIGNED_SHORT = TYPE_ARRAY_SHORT,
+    TYPE_ARRAY_UNSIGNED_INT = TYPE_ARRAY_INT,
+    TYPE_OUT_ARRAY_VOID = TYPE_OUT_ARRAY_CHAR,
+    TYPE_OUT_ARRAY_SIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
+    TYPE_OUT_ARRAY_UNSIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
+    TYPE_OUT_ARRAY_UNSIGNED_SHORT = TYPE_OUT_ARRAY_SHORT,
+    TYPE_OUT_ARRAY_UNSIGNED_INT = TYPE_OUT_ARRAY_INT,
+    TYPE_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
+        TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
+        TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
+        TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
+        TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
+        TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_OUT_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
+        TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_OUT_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
+        TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_OUT_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
+        TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_OUT_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
+        TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+    TYPE_OUT_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
+        TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
+};
+
+#define CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
+  case TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
+  case TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
+  case TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
+  case TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
+  case TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
+
+#define CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
+  case TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
+  case TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
+  case TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
+  case TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
+  case TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
+
+#define CASE_IN_UNKNOWN_SIZE_POINTERS \
+  case TYPE_ARRAY_CHAR: \
+  case TYPE_ARRAY_SHORT: \
+  case TYPE_ARRAY_INT: \
+  case TYPE_ARRAY_FLOAT: \
+  case TYPE_ARRAY_DOUBLE
+
+#define CASE_IN_KNOWN_SIZE_POINTERS \
+  case TYPE_1CHAR:\
+  case TYPE_2CHAR:\
+  case TYPE_3CHAR:\
+  case TYPE_4CHAR:\
+  case TYPE_128UCHAR:\
+  case TYPE_1SHORT:\
+  case TYPE_2SHORT:\
+  case TYPE_3SHORT:\
+  case TYPE_4SHORT:\
+  case TYPE_1INT:\
+  case TYPE_2INT:\
+  case TYPE_3INT:\
+  case TYPE_4INT:\
+  case TYPE_1FLOAT:\
+  case TYPE_2FLOAT:\
+  case TYPE_3FLOAT:\
+  case TYPE_4FLOAT:\
+  case TYPE_16FLOAT:\
+  case TYPE_1DOUBLE:\
+  case TYPE_2DOUBLE:\
+  case TYPE_3DOUBLE:\
+  case TYPE_4DOUBLE:\
+  case TYPE_16DOUBLE
+
+#define CASE_OUT_UNKNOWN_SIZE_POINTERS \
+  case TYPE_OUT_ARRAY_CHAR: \
+  case TYPE_OUT_ARRAY_SHORT: \
+  case TYPE_OUT_ARRAY_INT: \
+  case TYPE_OUT_ARRAY_FLOAT: \
+  case TYPE_OUT_ARRAY_DOUBLE
+
+#define CASE_OUT_KNOWN_SIZE_POINTERS \
+  case TYPE_OUT_1INT: \
+  case TYPE_OUT_1FLOAT: \
+  case TYPE_OUT_4CHAR: \
+  case TYPE_OUT_4INT: \
+  case TYPE_OUT_4FLOAT: \
+  case TYPE_OUT_4DOUBLE: \
+  case TYPE_OUT_128UCHAR \
+
+#define CASE_IN_POINTERS CASE_IN_UNKNOWN_SIZE_POINTERS: CASE_IN_KNOWN_SIZE_POINTERS: CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
+#define CASE_OUT_POINTERS CASE_OUT_UNKNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS: CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
+
+#define CASE_POINTERS CASE_IN_POINTERS: CASE_OUT_POINTERS
+#define CASE_KNOWN_SIZE_POINTERS CASE_IN_KNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS
+
+
+#define IS_ARRAY_CHAR(type)  (type == TYPE_ARRAY_CHAR || type == TYPE_1CHAR || type == TYPE_2CHAR || type == TYPE_3CHAR || type == TYPE_4CHAR || type == TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS)
+#define IS_ARRAY_SHORT(type)  (type == TYPE_ARRAY_SHORT || type == TYPE_1SHORT || type == TYPE_2SHORT || type == TYPE_3SHORT || type == TYPE_4SHORT || type == TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS)
+#define IS_ARRAY_INT(type)  (type == TYPE_ARRAY_INT || type == TYPE_1INT || type == TYPE_2INT || type == TYPE_3INT || type == TYPE_4INT || type == TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS)
+#define IS_ARRAY_FLOAT(type)  (type == TYPE_ARRAY_FLOAT || type == TYPE_1FLOAT || type == TYPE_2FLOAT || type == TYPE_3FLOAT || type == TYPE_4FLOAT || type == TYPE_16FLOAT || type == TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS)
+#define IS_ARRAY_DOUBLE(type)  (type == TYPE_ARRAY_DOUBLE || type == TYPE_1DOUBLE || type == TYPE_2DOUBLE || type == TYPE_3DOUBLE || type == TYPE_4DOUBLE || type == TYPE_16DOUBLE || type == TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS)
+
+#define NB_MAX_TEXTURES 16
+#define MY_GL_MAX_VERTEX_ATTRIBS_ARB 16
+#define MY_GL_MAX_VERTEX_ATTRIBS_NV 16
+#define MY_GL_MAX_VARIANT_POINTER_EXT 16
+
+static int tab_args_type_length[] = {
+    0,
+    sizeof(char),
+    sizeof(unsigned char),
+    sizeof(short),
+    sizeof(unsigned short),
+    sizeof(int),
+    sizeof(unsigned int),
+    sizeof(float),
+    sizeof(double),
+    1 * sizeof(char),
+    2 * sizeof(char),
+    3 * sizeof(char),
+    4 * sizeof(char),
+    128 * sizeof(char),
+    1 * sizeof(short),
+    2 * sizeof(short),
+    3 * sizeof(short),
+    4 * sizeof(short),
+    1 * sizeof(int),
+    2 * sizeof(int),
+    3 * sizeof(int),
+    4 * sizeof(int),
+    1 * sizeof(float),
+    2 * sizeof(float),
+    3 * sizeof(float),
+    4 * sizeof(float),
+    16 * sizeof(float),
+    1 * sizeof(double),
+    2 * sizeof(double),
+    3 * sizeof(double),
+    4 * sizeof(double),
+    16 * sizeof(double),
+    sizeof(int),
+    sizeof(float),
+    4 * sizeof(char),
+    4 * sizeof(int),
+    4 * sizeof(float),
+    4 * sizeof(double),
+    128 * sizeof(char),
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+
+    /* the following sizes are the size of 1 element of the array */
+    sizeof(char),
+    sizeof(short),
+    sizeof(int),
+    sizeof(float),
+    sizeof(double),
+    sizeof(char),
+    sizeof(short),
+    sizeof(int),
+    sizeof(float),
+    sizeof(double),
+};
+
+typedef struct {
+    int ret_type;
+    int has_out_parameters;
+    int nb_args;
+    int args_type[0];
+} Signature;
+
+static const int _init32_signature[] =
+    { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
+static const int _init64_signature[] =
+    { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
+
+static const int _synchronize_signature[] = { TYPE_INT, 0, 0 };
+
+static const int _serialized_calls_signature[] =
+    { TYPE_NONE, 0, 1, TYPE_ARRAY_CHAR };
+
+static const int _exit_process_signature[] = { TYPE_NONE, 0, 0 };
+
+static const int _changeWindowState_signature[] =
+    { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
+
+static const int _moveResizeWindow_signature[] =
+    { TYPE_NONE, 0, 2, TYPE_INT, TYPE_4INT };
+
+static const int _send_cursor_signature[] =
+    { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT,
+    TYPE_INT, TYPE_INT,
+    TYPE_INT, TYPE_INT,
+    TYPE_ARRAY_INT
+};
+
+/* XVisualInfo* glXChooseVisual( Display *dpy, int screen, int *attribList ) */
+static const int glXChooseVisual_signature[] =
+    { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
+
+/*GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
+                             GLXContext shareList, Bool direct )*/
+static const int glXCreateContext_signature[] =
+    { TYPE_INT, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT };
+
+static const int glXCopyContext_signature[] =
+    { TYPE_NONE, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
+TYPE_INT };
+
+/* void glXDestroyContext( Display *dpy, GLXContext ctx ) */
+static const int glXDestroyContext_signature[] =
+    { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
+
+/* Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx) */
+//static const int glXMakeCurrent_signature[] = {TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT};
+/* making it asynchronous */
+static const int glXMakeCurrent_signature[] =
+    { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
+
+/*int glXGetConfig( Display *dpy, XVisualInfo *visual,
+                  int attrib, int *value )*/
+static const int glXGetConfig_signature[] =
+    { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
+TYPE_OUT_1INT };
+
+/* "glXGetConfig_extended"(dpy, visual_id, int n, int* attribs, int* values, int* rets) */
+static const int glXGetConfig_extended_signature[] =
+    { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
+
+/* void glXSwapBuffers( Display *dpy, GLXDrawable drawable ); */
+static const int glXSwapBuffers_signature[] =
+    { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
+
+/* Bool glXQueryVersion( Display *dpy, int *maj, int *min ) */
+static const int glXQueryVersion_signature[] =
+    { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
+
+/* Bool glXQueryExtension( Display *dpy, int *errorBase, int *eventBase ) */
+static const int glXQueryExtension_signature[] =
+    { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
+
+static const int glXWaitGL_signature[] = { TYPE_INT, 0, 0 };
+static const int glXWaitX_signature[] = { TYPE_INT, 0, 0 };
+
+/* GLX 1.1 and later */
+
+/* const char *glXGetClientString( Display *dpy, int name ) */
+static const int glXGetClientString_signature[] =
+    { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
+
+/*const char *glXQueryExtensionsString( Display *dpy, int screen ) */
+static const int glXQueryExtensionsString_signature[] =
+    { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
+
+/* const char *glXQueryServerString( Display *dpy, int screen, int name ) */
+static const int glXQueryServerString_signature[] =
+    { TYPE_CONST_CHAR, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
+
+
+static const int glXGetProcAddress_fake_signature[] =
+    { TYPE_INT, 0, 1, TYPE_NULL_TERMINATED_STRING };
+
+static const int glXGetProcAddress_global_fake_signature[] =
+    { TYPE_NONE, 1, 3, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_OUT_ARRAY_CHAR };
+
+
+/* GLX 1.3 and later */
+
+/*
+GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
+                                       const int *attribList, int *nitems ); */
+static const int glXChooseFBConfig_signature[] =
+    { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
+TYPE_OUT_1INT };
+
+static const int glXChooseFBConfigSGIX_signature[] =
+    { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
+TYPE_OUT_1INT };
+
+static const int glXGetFBConfigs_signature[] =
+    { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_OUT_1INT };
+
+/* "glXGetFBConfigAttrib_extended"(dpy, fbconfig, int n, int* attribs, int* values, int* rets) */
+static const int glXGetFBConfigAttrib_extended_signature[] =
+    { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
+
+
+/* GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
+                             const int *attribList ) */
+static const int glXCreatePbuffer_signature[] =
+    { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
+
+static const int glXCreateGLXPbufferSGIX_signature[] =
+    { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_ARRAY_INT };
+
+static const int glXDestroyPbuffer_signature[] =
+    { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
+
+static const int glXDestroyGLXPbufferSGIX_signature[] =
+    { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
+
+/* GLXContext glXCreateNewContext(Display * dpy
+                               GLXFBConfig  config
+                               int  renderType
+                               GLXContext  ShareList
+                               Bool  Direct) */
+static const int glXCreateNewContext_signature[] =
+    { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT };
+
+static const int glXCreateContextWithConfigSGIX_signature[] =
+    { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT };
+
+/*XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ) */
+static const int glXGetVisualFromFBConfig_signature[] =
+    { TYPE_INT, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
+
+/*int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig  config, int attribute, int *value)*/
+static const int glXGetFBConfigAttrib_signature[] =
+    { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
+TYPE_OUT_1INT };
+
+static const int glXGetFBConfigAttribSGIX_signature[] =
+    { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
+TYPE_OUT_1INT };
+
+static const int glXQueryContext_signature[] =
+    { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
+TYPE_OUT_1INT };
+
+static const int glXQueryGLXPbufferSGIX_signature[] =
+    { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
+TYPE_OUT_1INT };
+
+static const int glXQueryDrawable_signature[] =
+    { TYPE_NONE, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
+TYPE_OUT_1INT };
+
+/* void glXUseXFont( Font font, int first, int count, int list ) */
+static const int glXUseXFont_signature[] =
+    { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
+
+/* Bool glXIsDirect( Display *dpy, GLXContext ctx ) */
+static const int glXIsDirect_signature[] =
+    { TYPE_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
+
+static const int glXGetScreenDriver_signature[] =
+    { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
+
+static const int glXGetDriverConfig_signature[] =
+    { TYPE_CONST_CHAR, 0, 1, TYPE_NULL_TERMINATED_STRING };
+
+
+static const int glXWaitVideoSyncSGI_signature[] =
+    { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_1INT };
+
+static const int glXGetVideoSyncSGI_signature[] =
+    { TYPE_INT, 1, 1, TYPE_OUT_1INT };
+
+static const int glXSwapIntervalSGI_signature[] =
+    { TYPE_INT, 0, 1, TYPE_INT };
+
+static const int glXBindTexImageATI_signature[] =
+    { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
+static const int glXReleaseTexImageATI_signature[] =
+    { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
+static const int glXBindTexImageARB_signature[] =
+    { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
+static const int glXReleaseTexImageARB_signature[] =
+    { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
+
+/* const GLubyte * glGetString( GLenum name ) */
+static const int glGetString_signature[] =
+    { TYPE_CONST_CHAR, 0, 1, TYPE_INT };
+
+/* void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* *p_tab_prog, const GLint * tab_length) */
+/* --> void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* all_progs, const GLint * tab_length) */
+static const int glShaderSourceARB_fake_signature[] =
+    { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
+static const int glShaderSource_fake_signature[] =
+    { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
+
+static const int glVertexPointer_fake_signature[] =
+    { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_ARRAY_CHAR };
+static const int glNormalPointer_fake_signature[] =
+    { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_ARRAY_CHAR };
+static const int glColorPointer_fake_signature[] =
+    { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_ARRAY_CHAR };
+static const int glSecondaryColorPointer_fake_signature[] =
+    { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_ARRAY_CHAR };
+static const int glIndexPointer_fake_signature[] =
+    { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_ARRAY_CHAR };
+static const int glTexCoordPointer_fake_signature[] =
+    { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT, TYPE_ARRAY_CHAR };
+static const int glEdgeFlagPointer_fake_signature[] =
+    { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
+static const int glVertexAttribPointerARB_fake_signature[] =
+    { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
+static const int glVertexAttribPointerNV_fake_signature[] =
+    { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT, TYPE_ARRAY_CHAR };
+static const int glWeightPointerARB_fake_signature[] =
+    { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_ARRAY_CHAR };
+static const int glMatrixIndexPointerARB_fake_signature[] =
+    { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_ARRAY_CHAR };
+static const int glFogCoordPointer_fake_signature[] =
+    { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_ARRAY_CHAR };
+static const int glInterleavedArrays_fake_signature[] =
+    { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_ARRAY_CHAR };
+static const int glElementPointerATI_fake_signature[] =
+    { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
+static const int glVariantPointerEXT_fake_signature[] =
+    { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_ARRAY_CHAR };
+static const int glTuxRacerDrawElements_fake_signature[] =
+    { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
+static const int glVertexAndNormalPointer_fake_signature[] =
+    { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT, TYPE_ARRAY_CHAR };
+static const int glTexCoordPointer01_fake_signature[] =
+    { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_ARRAY_CHAR };
+static const int glTexCoordPointer012_fake_signature[] =
+    { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_ARRAY_CHAR };
+static const int glVertexNormalPointerInterlaced_fake_signature[] =
+    { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
+static const int glVertexNormalColorPointerInterlaced_fake_signature[] =
+    { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
+static const int glVertexColorTexCoord0PointerInterlaced_fake_signature[] =
+    { TYPE_NONE, 0, 12, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
+static const int glVertexNormalTexCoord0PointerInterlaced_fake_signature[] =
+    { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
+static const int glVertexNormalTexCoord01PointerInterlaced_fake_signature[] =
+    { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
+static const int glVertexNormalTexCoord012PointerInterlaced_fake_signature[] =
+    { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
+static const int
+    glVertexNormalColorTexCoord0PointerInterlaced_fake_signature[] =
+    { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_ARRAY_CHAR };
+static const int
+    glVertexNormalColorTexCoord01PointerInterlaced_fake_signature[] =
+    { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
+static const int
+    glVertexNormalColorTexCoord012PointerInterlaced_fake_signature[] =
+    { TYPE_NONE, 0, 20, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
+
+static const int glGenTextures_fake_signature[] =
+    { TYPE_NONE, 0, 1, TYPE_INT };
+static const int glGenBuffersARB_fake_signature[] =
+    { TYPE_NONE, 0, 1, TYPE_INT };
+static const int glGenLists_fake_signature[] = { TYPE_NONE, 0, 1, TYPE_INT };
+
+static const int _glDrawElements_buffer_signature[] =
+    { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
+static const int _glDrawRangeElements_buffer_signature[] =
+    { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT };
+static const int _glMultiDrawElements_buffer_signature[] =
+    { TYPE_NONE, 0, 5, TYPE_INT, TYPE_ARRAY_INT, TYPE_INT, TYPE_ARRAY_INT,
+TYPE_INT };
+
+static const int _glVertexPointer_buffer_signature[] =
+    { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
+static const int _glNormalPointer_buffer_signature[] =
+    { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
+static const int _glColorPointer_buffer_signature[] =
+    { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
+static const int _glSecondaryColorPointer_buffer_signature[] =
+    { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
+static const int _glIndexPointer_buffer_signature[] =
+    { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
+static const int _glTexCoordPointer_buffer_signature[] =
+    { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
+static const int _glEdgeFlagPointer_buffer_signature[] =
+    { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
+static const int _glVertexAttribPointerARB_buffer_signature[] =
+    { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT };
+static const int _glWeightPointerARB_buffer_signature[] =
+    { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
+static const int _glMatrixIndexPointerARB_buffer_signature[] =
+    { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
+static const int _glFogCoordPointer_buffer_signature[] =
+    { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
+static const int _glVariantPointerEXT_buffer_signature[] =
+    { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
+
+static const int _glReadPixels_pbo_signature[] =
+    { TYPE_INT, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
+TYPE_INT, TYPE_INT };
+static const int _glDrawPixels_pbo_signature[] =
+    { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
+static const int _glMapBufferARB_fake_signature[] =
+    { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_ARRAY_CHAR };
+
+static const int _glSelectBuffer_fake_signature[] =
+    { TYPE_NONE, 0, 1, TYPE_INT };
+static const int _glGetSelectBuffer_fake_signature[] =
+    { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
+static const int _glFeedbackBuffer_fake_signature[] =
+    { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
+static const int _glGetFeedbackBuffer_fake_signature[] =
+    { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
+
+static const int _glGetError_fake_signature[] = { TYPE_NONE, 0, 0 };
+
+#define timesynchro_func    -1
+#define memorize_array_func -2
+#define reuse_array_func    -3
+
+#include "gl_func.h"
+
+static GLint __glTexParameter_size(FILE *err_file, GLenum pname)
+{
+    switch (pname) {
+    case GL_TEXTURE_MAG_FILTER:
+    case GL_TEXTURE_MIN_FILTER:
+    case GL_TEXTURE_WRAP_S:
+    case GL_TEXTURE_WRAP_T:
+    case GL_TEXTURE_PRIORITY:
+    case GL_TEXTURE_WRAP_R:
+    case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
+/*      case GL_SHADOW_AMBIENT_SGIX:*/
+    case GL_TEXTURE_MIN_LOD:
+    case GL_TEXTURE_MAX_LOD:
+    case GL_TEXTURE_BASE_LEVEL:
+    case GL_TEXTURE_MAX_LEVEL:
+    case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
+    case GL_TEXTURE_LOD_BIAS_S_SGIX:
+    case GL_TEXTURE_LOD_BIAS_T_SGIX:
+    case GL_TEXTURE_LOD_BIAS_R_SGIX:
+    case GL_GENERATE_MIPMAP:
+/*      case GL_GENERATE_MIPMAP_SGIS:*/
+    case GL_TEXTURE_COMPARE_SGIX:
+    case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
+    case GL_TEXTURE_MAX_CLAMP_S_SGIX:
+    case GL_TEXTURE_MAX_CLAMP_T_SGIX:
+    case GL_TEXTURE_MAX_CLAMP_R_SGIX:
+    case GL_TEXTURE_MAX_ANISOTROPY_EXT:
+    case GL_TEXTURE_LOD_BIAS:
+/*      case GL_TEXTURE_LOD_BIAS_EXT:*/
+    case GL_DEPTH_TEXTURE_MODE:
+/*      case GL_DEPTH_TEXTURE_MODE_ARB:*/
+    case GL_TEXTURE_COMPARE_MODE:
+/*      case GL_TEXTURE_COMPARE_MODE_ARB:*/
+    case GL_TEXTURE_COMPARE_FUNC:
+/*      case GL_TEXTURE_COMPARE_FUNC_ARB:*/
+    case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
+        return 1;
+    case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
+    case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
+        return 2;
+    case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
+        return 3;
+    case GL_TEXTURE_BORDER_COLOR:
+    case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
+    case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
+        return 4;
+    default:
+        fprintf(err_file, "unhandled pname = %d\n", pname);
+        return 0;
+    }
+}
+
+static int __glLight_size(FILE *err_file, GLenum pname)
+{
+    switch (pname) {
+    case GL_AMBIENT:
+    case GL_DIFFUSE:
+    case GL_SPECULAR:
+    case GL_POSITION:
+        return 4;
+        break;
+
+    case GL_SPOT_DIRECTION:
+        return 3;
+        break;
+
+    case GL_SPOT_EXPONENT:
+    case GL_SPOT_CUTOFF:
+    case GL_CONSTANT_ATTENUATION:
+    case GL_LINEAR_ATTENUATION:
+    case GL_QUADRATIC_ATTENUATION:
+        return 1;
+        break;
+
+    default:
+        fprintf(err_file, "unhandled pname = %d\n", pname);
+        return 0;
+    }
+}
+
+static int __glMaterial_size(FILE *err_file, GLenum pname)
+{
+    switch (pname) {
+    case GL_AMBIENT:
+    case GL_DIFFUSE:
+    case GL_SPECULAR:
+    case GL_EMISSION:
+    case GL_AMBIENT_AND_DIFFUSE:
+        return 4;
+        break;
+
+    case GL_SHININESS:
+        return 1;
+        break;
+
+    case GL_COLOR_INDEXES:
+        return 3;
+        break;
+
+    default:
+        fprintf(err_file, "unhandled pname = %d\n", pname);
+        return 0;
+    }
+}
+
+static inline int compute_arg_length(FILE *err_file, int func_number,
+                                     int arg_i, arg_t *args)
+{
+    Signature *signature = (Signature *) tab_opengl_calls[func_number];
+    int *args_type = signature->args_type;
+
+    switch (func_number) {
+    case glProgramNamedParameter4fNV_func:
+    case glProgramNamedParameter4dNV_func:
+    case glProgramNamedParameter4fvNV_func:
+    case glProgramNamedParameter4dvNV_func:
+    case glGetProgramNamedParameterfvNV_func:
+    case glGetProgramNamedParameterdvNV_func:
+        if (arg_i == 2)
+            return 1 * args[arg_i - 1] *
+                    tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glProgramStringARB_func:
+    case glLoadProgramNV_func:
+    case glGenProgramsNV_func:
+    case glDeleteProgramsNV_func:
+    case glGenProgramsARB_func:
+    case glDeleteProgramsARB_func:
+    case glRequestResidentProgramsNV_func:
+    case glDrawBuffers_func:
+    case glDrawBuffersARB_func:
+    case glDrawBuffersATI_func:
+    case glDeleteBuffers_func:
+    case glDeleteBuffersARB_func:
+    case glDeleteTextures_func:
+    case glDeleteTexturesEXT_func:
+    case glGenFramebuffersEXT_func:
+    case glDeleteFramebuffersEXT_func:
+    case glGenRenderbuffersEXT_func:
+    case glDeleteRenderbuffersEXT_func:
+    case glGenQueries_func:
+    case glGenQueriesARB_func:
+    case glDeleteQueries_func:
+    case glDeleteQueriesARB_func:
+    case glGenOcclusionQueriesNV_func:
+    case glDeleteOcclusionQueriesNV_func:
+    case glGenFencesNV_func:
+    case glDeleteFencesNV_func:
+    case glUniform1fv_func:
+    case glUniform1iv_func:
+    case glUniform1fvARB_func:
+    case glUniform1ivARB_func:
+    case glUniform1uivEXT_func:
+    case glVertexAttribs1dvNV_func:
+    case glVertexAttribs1fvNV_func:
+    case glVertexAttribs1svNV_func:
+    case glVertexAttribs1hvNV_func:
+    case glWeightbvARB_func:
+    case glWeightsvARB_func:
+    case glWeightivARB_func:
+    case glWeightfvARB_func:
+    case glWeightdvARB_func:
+    case glWeightubvARB_func:
+    case glWeightusvARB_func:
+    case glWeightuivARB_func:
+    case glPixelMapfv_func:
+    case glPixelMapuiv_func:
+    case glPixelMapusv_func:
+    case glProgramBufferParametersfvNV_func:
+    case glProgramBufferParametersIivNV_func:
+    case glProgramBufferParametersIuivNV_func:
+    case glTransformFeedbackAttribsNV_func:
+    case glTransformFeedbackVaryingsNV_func:
+        if (arg_i == signature->nb_args - 1)
+            return 1 * args[arg_i - 1] *
+                    tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glUniform2fv_func:
+    case glUniform2iv_func:
+    case glUniform2fvARB_func:
+    case glUniform2ivARB_func:
+    case glUniform2uivEXT_func:
+    case glVertexAttribs2dvNV_func:
+    case glVertexAttribs2fvNV_func:
+    case glVertexAttribs2svNV_func:
+    case glVertexAttribs2hvNV_func:
+    case glDetailTexFuncSGIS_func:
+    case glSharpenTexFuncSGIS_func:
+        if (arg_i == signature->nb_args - 1)
+            return 2 * args[arg_i - 1] *
+                    tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glUniform3fv_func:
+    case glUniform3iv_func:
+    case glUniform3fvARB_func:
+    case glUniform3ivARB_func:
+    case glUniform3uivEXT_func:
+    case glVertexAttribs3dvNV_func:
+    case glVertexAttribs3fvNV_func:
+    case glVertexAttribs3svNV_func:
+    case glVertexAttribs3hvNV_func:
+        if (arg_i == signature->nb_args - 1)
+            return 3 * args[arg_i - 1] *
+                    tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glUniform4fv_func:
+    case glUniform4iv_func:
+    case glUniform4fvARB_func:
+    case glUniform4ivARB_func:
+    case glUniform4uivEXT_func:
+    case glVertexAttribs4dvNV_func:
+    case glVertexAttribs4fvNV_func:
+    case glVertexAttribs4svNV_func:
+    case glVertexAttribs4hvNV_func:
+    case glVertexAttribs4ubvNV_func:
+    case glProgramParameters4fvNV_func:
+    case glProgramParameters4dvNV_func:
+    case glProgramLocalParameters4fvEXT_func:
+    case glProgramEnvParameters4fvEXT_func:
+    case glProgramLocalParametersI4ivNV_func:
+    case glProgramLocalParametersI4uivNV_func:
+    case glProgramEnvParametersI4ivNV_func:
+    case glProgramEnvParametersI4uivNV_func:
+        if (arg_i == signature->nb_args - 1)
+            return 4 * args[arg_i - 1] *
+                    tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glPrioritizeTextures_func:
+    case glPrioritizeTexturesEXT_func:
+    case glAreProgramsResidentNV_func:
+    case glAreTexturesResident_func:
+    case glAreTexturesResidentEXT_func:
+        if (arg_i == 1 || arg_i == 2)
+            return args[0] * tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glLightfv_func:
+    case glLightiv_func:
+    case glGetLightfv_func:
+    case glGetLightiv_func:
+    case glFragmentLightfvSGIX_func:
+    case glFragmentLightivSGIX_func:
+    case glGetFragmentLightfvSGIX_func:
+    case glGetFragmentLightivSGIX_func:
+        if (arg_i == signature->nb_args - 1)
+            return __glLight_size(err_file,
+                                  args[arg_i -
+                                       1]) *
+                tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glLightModelfv_func:
+    case glLightModeliv_func:
+        if (arg_i == signature->nb_args - 1)
+            return ((args[arg_i - 1] ==
+                     GL_LIGHT_MODEL_AMBIENT) ? 4 : 1) *
+                tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glFragmentLightModelfvSGIX_func:
+    case glFragmentLightModelivSGIX_func:
+        if (arg_i == signature->nb_args - 1)
+            return ((args[arg_i - 1] ==
+                     GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX) ? 4 : 1) *
+                tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glMaterialfv_func:
+    case glMaterialiv_func:
+    case glGetMaterialfv_func:
+    case glGetMaterialiv_func:
+    case glFragmentMaterialfvSGIX_func:
+    case glFragmentMaterialivSGIX_func:
+    case glGetFragmentMaterialfvSGIX_func:
+    case glGetFragmentMaterialivSGIX_func:
+        if (arg_i == signature->nb_args - 1)
+            return __glMaterial_size(err_file,
+                                     args[arg_i -
+                                          1]) *
+                tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glTexParameterfv_func:
+    case glTexParameteriv_func:
+    case glGetTexParameterfv_func:
+    case glGetTexParameteriv_func:
+    case glTexParameterIivEXT_func:
+    case glTexParameterIuivEXT_func:
+    case glGetTexParameterIivEXT_func:
+    case glGetTexParameterIuivEXT_func:
+        if (arg_i == signature->nb_args - 1)
+            return __glTexParameter_size(err_file,
+                                         args[arg_i -
+                                              1]) *
+                tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glFogiv_func:
+    case glFogfv_func:
+        if (arg_i == signature->nb_args - 1)
+            return ((args[arg_i - 1] ==
+                     GL_FOG_COLOR) ? 4 : 1) *
+                tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glTexGendv_func:
+    case glTexGenfv_func:
+    case glTexGeniv_func:
+    case glGetTexGendv_func:
+    case glGetTexGenfv_func:
+    case glGetTexGeniv_func:
+        if (arg_i == signature->nb_args - 1)
+            return ((args[arg_i - 1] ==
+                     GL_TEXTURE_GEN_MODE) ? 1 : 4) *
+                tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glTexEnvfv_func:
+    case glTexEnviv_func:
+    case glGetTexEnvfv_func:
+    case glGetTexEnviv_func:
+        if (arg_i == signature->nb_args - 1)
+            return ((args[arg_i - 1] ==
+                     GL_TEXTURE_ENV_MODE) ? 1 : 4) *
+                tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glConvolutionParameterfv_func:
+    case glConvolutionParameteriv_func:
+    case glGetConvolutionParameterfv_func:
+    case glGetConvolutionParameteriv_func:
+    case glConvolutionParameterfvEXT_func:
+    case glConvolutionParameterivEXT_func:
+    case glGetConvolutionParameterfvEXT_func:
+    case glGetConvolutionParameterivEXT_func:
+        if (arg_i == signature->nb_args - 1)
+            return ((args[arg_i - 1] == GL_CONVOLUTION_BORDER_COLOR ||
+                     args[arg_i - 1] == GL_CONVOLUTION_FILTER_SCALE ||
+                     args[arg_i - 1] ==
+                     GL_CONVOLUTION_FILTER_BIAS) ? 4 : 1) *
+                tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glGetVertexAttribfvARB_func:
+    case glGetVertexAttribfvNV_func:
+    case glGetVertexAttribfv_func:
+    case glGetVertexAttribdvARB_func:
+    case glGetVertexAttribdvNV_func:
+    case glGetVertexAttribdv_func:
+    case glGetVertexAttribivARB_func:
+    case glGetVertexAttribivNV_func:
+    case glGetVertexAttribiv_func:
+    case glGetVertexAttribIivEXT_func:
+    case glGetVertexAttribIuivEXT_func:
+        if (arg_i == signature->nb_args - 1)
+            return ((args[arg_i - 1] ==
+                     GL_CURRENT_VERTEX_ATTRIB_ARB) ? 4 : 1) *
+                tab_args_type_length[args_type[arg_i]];
+        break;
+
+
+    case glPointParameterfv_func:
+    case glPointParameterfvEXT_func:
+    case glPointParameterfvARB_func:
+    case glPointParameterfvSGIS_func:
+    case glPointParameteriv_func:
+    case glPointParameterivEXT_func:
+        if (arg_i == signature->nb_args - 1)
+            return ((args[arg_i - 1] ==
+                     GL_POINT_DISTANCE_ATTENUATION) ? 3 : 1) *
+                tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glUniformMatrix2fv_func:
+    case glUniformMatrix2fvARB_func:
+        if (arg_i == signature->nb_args - 1)
+            return 2 * 2 * args[1] * tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glUniformMatrix3fv_func:
+    case glUniformMatrix3fvARB_func:
+        if (arg_i == signature->nb_args - 1)
+            return 3 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glUniformMatrix4fv_func:
+    case glUniformMatrix4fvARB_func:
+        if (arg_i == signature->nb_args - 1)
+            return 4 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glUniformMatrix2x3fv_func:
+    case glUniformMatrix3x2fv_func:
+        if (arg_i == signature->nb_args - 1)
+            return 2 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glUniformMatrix2x4fv_func:
+    case glUniformMatrix4x2fv_func:
+        if (arg_i == signature->nb_args - 1)
+            return 2 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glUniformMatrix3x4fv_func:
+    case glUniformMatrix4x3fv_func:
+        if (arg_i == signature->nb_args - 1)
+            return 3 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
+        break;
+
+    case glSpriteParameterivSGIX_func:
+    case glSpriteParameterfvSGIX_func:
+        if (arg_i == signature->nb_args - 1)
+            return ((args[arg_i - 1] ==
+                     GL_SPRITE_MODE_SGIX) ? 1 : 3) *
+                tab_args_type_length[args_type[arg_i]];
+        break;
+
+    default:
+        break;
+    }
+
+    fprintf(err_file,
+            "invalid combination for compute_arg_length : func_number=%d, arg_i=%d\n",
+            func_number, arg_i);
+    return 0;
+}
+
+#define IS_NULL_POINTER_OK_FOR_FUNC(func_number) \
+                 (func_number == glBitmap_func || \
+                  func_number == _send_cursor_func || \
+                  func_number == glTexImage1D_func || \
+                  func_number == glTexImage2D_func || \
+                  func_number == glTexImage3D_func || \
+                  func_number == glBufferDataARB_func || \
+                  func_number == glNewObjectBufferATI_func)
+
+#ifdef __amd64__
+#define _init_func _init64_func
+#else
+#ifdef __i386__
+#define _init_func _init32_func
+#else
+#error Unsupported ABI
+#endif
+#endif
Index: git/target-i386/opengl_player.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/opengl_player.c	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,1461 @@
+/*
+ *  Plays a sequence of OpenGL calls recorded either under qemu or with opengl_server
+ *
+ *  Copyright (c) 2007 Even Rouault
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+/* gcc -O2 -g -Wall opengl_player.c opengl_exec.c -o opengl_player -I../i386-softmmu -I. -I.. -lGL */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include <unistd.h>
+#include <sys/time.h>
+#include <math.h>
+
+#include <GL/gl.h>
+#include <X11/Xlib.h>
+
+// TODO
+typedef long unsigned int target_phys_addr_t;
+
+#include "opengl_func.h"
+#include "opengl_utils.h"
+
+//#include "ffmpeg/avcodec.h"
+
+extern void init_process_tab(void);
+extern int do_function_call(int, arg_t *, char *);
+
+void do_disconnect_current(void);
+void do_context_switch(Display *dpy, pid_t pid, int call);
+
+typedef struct {
+    int n_used;
+    unsigned int crc;
+    int size;
+    long long last_use;
+} RecordBufferedArray;
+
+typedef struct {
+    int size;
+    long file_offset;
+} ReplayBufferedArray;
+
+#define N_BUFFERED_ARRAYS 1024
+RecordBufferedArray recordBufferedArrays[N_BUFFERED_ARRAYS];
+
+#define INSTR_WINDOW_SIZE 65536
+short instrWindow[INSTR_WINDOW_SIZE];
+int instrWindowCount = 0;
+int instrWindowPtr = 0;
+int instrWindowBeginPtr = 0;
+
+#include "ghash.c"
+
+#define PRIME     131
+
+typedef struct {
+    int iFirstOccur;
+    int nbOccur;
+    int hash;
+} SeqDesc;
+
+typedef struct {
+    int hash;
+    int offset;
+} HashElt;
+
+int sort_hash_N;
+short *sort_hash_tab;
+int count_compar;
+int collision_detected;
+
+static int sort_hash(const void *ptrA, const void *ptrB)
+{
+    const HashElt *a = (const HashElt *) ptrA;
+    const HashElt *b = (const HashElt *) ptrB;
+
+    count_compar++;
+    if (a->hash == b->hash) {
+        int j;
+
+        for (j = 0; j < sort_hash_N; j++) {
+            if (sort_hash_tab[a->offset + j] != sort_hash_tab[b->offset + j]) {
+                collision_detected = 1;
+                // fprintf(stderr, "collision de hash !\n");
+                return sort_hash_tab[a->offset + j] <
+                    sort_hash_tab[b->offset + j] ? -1 : 1;
+            }
+        }
+        return a->offset - b->offset;
+    } else if (a->hash < b->hash)
+        return -1;
+    else
+        return 1;
+}
+
+static int sort_seq_desc_by_occur(const void *ptrA, const void *ptrB)
+{
+    const SeqDesc *a = (const SeqDesc *) ptrA;
+    const SeqDesc *b = (const SeqDesc *) ptrB;
+
+    return b->nbOccur - a->nbOccur;
+}
+
+static int sort_seq_desc_by_offset(const void *ptrA, const void *ptrB)
+{
+    const SeqDesc *a = (const SeqDesc *) ptrA;
+    const SeqDesc *b = (const SeqDesc *) ptrB;
+
+    return a->iFirstOccur - b->iFirstOccur;
+}
+
+void find_repeated_seq(short *tab, int iStart, int length)
+{
+    // SimpleHashTable* tableHash = simple_hash_table_new(free);
+    int N = 10;
+    int i;
+    int hash = 0;
+    int primeN = 1;
+    HashElt *tabHash = malloc(sizeof(HashElt) * (length - N + 1));
+
+    short *new_tab = malloc(sizeof(short) * length);
+    memcpy(&new_tab[0], &tab[iStart], sizeof(short) * (length - iStart));
+    memcpy(&new_tab[length - iStart], &tab[0], sizeof(short) * iStart);
+    tab = new_tab;
+
+    sort_hash_N = N;
+    sort_hash_tab = tab;
+
+    fprintf(stderr, "(start) iStart = %d\n", iStart);
+    for (i = 0; i < N; i++) {
+        primeN *= PRIME;
+    }
+    for (i = 0; i < length; i++) {
+        hash = hash * PRIME + tab[i];
+        if (i >= N) {
+            hash -= tab[i - N] * primeN;
+        }
+        if (i >= N - 1) {
+            tabHash[i - (N - 1)].offset = i - (N - 1);
+            tabHash[i - (N - 1)].hash =
+                /* (i == 100) ? tabHash[0].hash : */ hash;
+#if 0
+            void **p_n_occurences =
+                simple_hash_table_lookup_pointer(tableHash, hash);
+            if (p_n_occurences == NULL) {
+                SeqDesc *seqDesc = malloc(sizeof(SeqDesc));
+
+                seqDesc->iFirstOccur = i - (N - 1);
+                seqDesc->nbOccur = 1;
+                simple_hash_table_insert(tableHash, hash, seqDesc);
+            } else {
+                SeqDesc *seqDesc = (SeqDesc *) (*p_n_occurences);
+                int j;
+
+                for (j = 0; j < N; j++) {
+                    if (tab[(iStart + seqDesc->iFirstOccur + j) % length] !=
+                        tab[(iStart + i - (N - 1) + j) % length])
+                        break;
+                }
+                if (j != N)
+                    fprintf(stderr, "arg\n");
+                seqDesc->nbOccur++;
+                // fprintf(stderr, "iStart = %d, i = %d, iFirstOccur = %d,
+                // nbOccur = %d\n", iStart, i, seqDesc->iFirstOccur,
+                // seqDesc->nbOccur);
+            }
+#endif
+        }
+    }
+    collision_detected = 0;
+    count_compar = 0;
+    qsort(tabHash, length - N + 1, sizeof(HashElt), sort_hash);
+    if (!collision_detected) {
+        SeqDesc *tabSeqDesc = (SeqDesc *) malloc(sizeof(SeqDesc) * length);
+        int nbSeqDesc = 0;
+        int lastI = 0;
+        int prevHash = tabHash[0].hash;
+
+        for (i = 1; i < length - N + 1; i++) {
+            if (tabHash[i].hash != prevHash) {
+                tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
+                tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
+                tabSeqDesc[nbSeqDesc].hash = prevHash;
+                nbSeqDesc++;
+                lastI = i;
+                prevHash = tabHash[i].hash;
+            }
+        }
+        tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
+        tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
+        nbSeqDesc++;
+        qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
+        for (i = 0; i < nbSeqDesc; i++) {
+            if (tabSeqDesc[i].nbOccur < 10)
+                break;
+            // fprintf(stderr, "%d %d\n", tabSeqDesc[i].iFirstOccur,
+            // tabSeqDesc[i].nbOccur);
+        }
+        nbSeqDesc = i;
+        qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc),
+              sort_seq_desc_by_offset);
+        lastI = tabSeqDesc[0].iFirstOccur;
+        int maxI = 0;
+        int j = 0;
+
+        for (i = 1; i < nbSeqDesc; i++) {
+            if (tabSeqDesc[i].iFirstOccur - lastI <= N) {
+                if (tabSeqDesc[i].nbOccur > tabSeqDesc[maxI].nbOccur) {
+                    maxI = i;
+                }
+            } else {
+                tabSeqDesc[j].iFirstOccur = tabSeqDesc[maxI].iFirstOccur;
+                tabSeqDesc[j].nbOccur = tabSeqDesc[maxI].nbOccur;
+                j++;
+#define MAX(a,b) (((a)>(b)) ? (a) : (b))
+                lastI = tabSeqDesc[maxI].iFirstOccur;
+                while (i < nbSeqDesc &&
+                       tabSeqDesc[i].iFirstOccur - lastI <= N)
+                    i++;
+                if (i == nbSeqDesc)
+                    break;
+                maxI = i;
+            }
+        }
+        nbSeqDesc = j;
+        qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
+        for (i = 0; i < nbSeqDesc; i++) {
+            fprintf(stderr, "offset=%d occurNb=%d hash=%d:",
+                    tabSeqDesc[i].iFirstOccur, tabSeqDesc[i].nbOccur,
+                    tabSeqDesc[i].hash);
+            for (j = 0; j < N; j++)
+                fprintf(stderr, "%d ", tab[tabSeqDesc[i].iFirstOccur + j]);
+            fprintf(stderr, "\n");
+        }
+        free(tabSeqDesc);
+    } else {
+        fprintf(stderr, "collision de hash !\n");
+    }
+
+    fprintf(stderr, "(end) iStart = %d (count_compar = %d)\n", iStart,
+            count_compar);
+    // simple_hash_table_foreach(tableHash,
+    free(tabHash);
+    free(tab);
+#if 0
+    simple_hash_table_destroy(tableHash);
+#endif
+#if 0
+    int i, j, k;
+
+    for (i = 0; i < length; i++) {
+        int nMaxContiguous = 0;
+        int jMax = 0;
+
+        for (j = 0; j < length; j++) {
+            int nContiguous = 0;
+
+            for (k = 0; k < j - i; k++) {
+                if (tab[(iStart + i + k) % length] ==
+                    tab[(iStart + i + j + k) % length]) {
+                    nContiguous++;
+                } else
+                    break;
+            }
+            if (nContiguous >= nMaxContiguous) {
+                nMaxContiguous = nContiguous;
+                jMax = j;
+            }
+        }
+        fprintf(stderr, "iStart = %d, i = %d, j = %d, nContiguous = %d\n",
+                iStart, i, i + jMax, nMaxContiguous);
+    }
+#endif
+}
+
+#define MAX_SERVER_STATE_STACK_SIZE 16
+
+typedef struct {
+    GLbitfield mask;
+    int matrixMode;
+    int lastMatrixOp;
+} ServerState;
+
+typedef struct {
+    ServerState stackAttrib[MAX_SERVER_STATE_STACK_SIZE];
+    int stackAttribPtr;
+    int matrixMode;
+    int lastMatrixOp;
+} GLState;
+
+#define NB_STATES       100
+GLState states[NB_STATES];
+
+void usage()
+{
+    printf("Usage : opengl_player [OPTION] filename\n\n");
+    printf
+        ("filename is the file where to read the OpenGL flow ('/tmp/debug_gl.bin' by default)\n");
+    printf("'-' is supported and stands for standard input\n\n");
+    printf("The following options are available :\n");
+    printf
+        ("--debug                       : output debugging trace on stderr\n");
+    printf("--disable-real-time-play-back : play as fast as possible\n");
+    printf
+        ("--show-hard-disk-bandwidth    : displays regularly the data bandwidth\n");
+    printf("--h or --help                 : display this help\n");
+}
+
+int main(int argc, char *argv[])
+{
+    static int args_size[50];
+    int i;
+    int visualid_fbconfig_read = -1;
+    int visualid_fbconfig_real = 0;
+    char *filename = "/tmp/debug_gl.bin";
+    int slowdown = 0;
+    int debug = 0;
+    char *ret_string;
+    arg_t args[50];
+    struct timeval start_time, last_time, current_time;
+    int noplay = 0;
+    int count_last_time = 0, count_current = 0;
+    int refresh_rate = 500;
+    int disable_real_time_play_back = 0;
+    int show_hard_disk_bandwith = 0;
+    int last_offset = 0;
+    int resize = 0;
+    int window_width = 0, window_height = 0;
+    int orig_window_width = 0;
+    int show_offset = 0;
+    int show_diff_offset = 0;
+    int last_cmd_offset = 0;
+    FILE *compressed_file = NULL;
+    int sizeBufferedArraysPlay = 0;
+    ReplayBufferedArray *replayBufferedArrays = NULL;
+    int currentState = 0;
+
+    memset(recordBufferedArrays, 0, sizeof(recordBufferedArrays));
+    memset(states, 0, sizeof(states));
+    for (i = 0; i < NB_STATES; i++) {
+        states[i].matrixMode = GL_MODELVIEW;
+        states[i].lastMatrixOp = -1;
+    }
+
+    /* avcodec_init(); AVCodec* avCodec =
+     * avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); AVCodecContext*
+     * avCodecContext = avcodec_alloc_context(); */
+
+    for (i = 1; i < argc; i++) {
+        if (argv[i][0] == '-' && argv[i][1] == '-')
+            argv[i] = argv[i] + 1;
+
+        if (strncmp(argv[i], "-slowdown=", strlen("-slowdown=")) == 0) {
+            slowdown = atoi(argv[i] + strlen("-slowdown="));
+        } else if (strcmp(argv[i], "-noplay") == 0) {
+            noplay = 1;
+        } else if (strcmp(argv[i], "-debug") == 0) {
+            debug = 1;
+        } else if (strcmp(argv[i], "-disable-real-time-play-back") == 0) {
+            disable_real_time_play_back = 1;
+        } else if (strcmp(argv[i], "-show-hard-disk-bandwidth") == 0) {
+            show_hard_disk_bandwith = 1;
+        } else if (strcmp(argv[i], "-show-offset") == 0) {
+            show_offset = 1;
+        } else
+            if (strncmp
+                (argv[i], "-show-diff-offset",
+                 strlen("-show-diff-offset")) == 0) {
+            show_diff_offset = atoi(argv[i] + strlen("-show-diff-offset="));
+        } else if (strncmp(argv[i], "-width=", strlen("-width=")) == 0) {
+            window_width = atoi(argv[i] + strlen("-width="));
+            resize = 1;
+        } else if (strncmp(argv[i], "-refreshrate=", strlen("-refreshrate="))
+                   == 0) {
+            refresh_rate = atoi(argv[i] + strlen("-refreshrate="));
+        } else
+            if (strncmp
+                (argv[i], "-output-compressed-filename=",
+                 strlen("-output-compressed-filename=")) == 0) {
+            char *compressed_filename =
+                argv[i] + strlen("-output-compressed-filename=");
+            compressed_file = fopen(compressed_filename, "wb");
+        } else if (strcmp(argv[i], "-") == 0) {
+            filename = NULL;
+        } else if (strcmp(argv[i], "-h") == 0 ||
+                   strcmp(argv[i], "-help") == 0) {
+            usage();
+            return 0;
+        } else
+            filename = argv[i];
+    }
+    FILE *f = (filename) ? fopen(filename, "rb") : stdin;
+
+    if (f == NULL) {
+        fprintf(stderr, "cannot open %s\n", filename);
+        return 0;
+    }
+    // FILE* fout = fopen("/tmp/raw", "wb");
+
+    init_process_tab();
+    ret_string = malloc(32768);
+
+    gettimeofday(&start_time, NULL);
+    gettimeofday(&last_time, NULL);
+
+//  void* buffer= NULL;
+#define WRITE_UNSIGNED_CHAR(x) do { unsigned char myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
+#define WRITE_SHORT(x) do { short myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
+#define WRITE_INT(x) do { int myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
+#define WRITE_LONGLONG(x) do { long long myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
+#define WRITE_FLOAT(x) do { float myvar = (float)x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
+#define WRITE_3DOUBLE_AS_3FLOAT(x) do { float myfloats[] = { x[0], x[1], x[2] }; fwrite(myfloats, sizeof(myvar), 1, compressed_file); } while(0)
+
+    // FILE* fopcodes = fopen("/tmp/opcodes.bin", "wb");
+    do_context_switch(XOpenDisplay(NULL), 1, _init32_func);
+
+    long long instr_count = 0;
+
+    while (1) {
+        short func_number;
+        short memorize_array_play = -1;
+        short reuse_array_play = -1;
+
+      begin:
+        if (fread(&func_number, sizeof(short), 1, f) == 0)
+            break;
+        if (func_number == _exit_process_func)
+            break;
+
+        if (func_number == _serialized_calls_func) {
+            continue;
+        }
+        // fwrite(&func_number, sizeof(short), 1, fopcodes);
+
+        /* 
+         * instrWindow[instrWindowPtr] = func_number; instrWindowPtr++; if
+         * (instrWindowPtr == INSTR_WINDOW_SIZE) instrWindowPtr = 0;
+         * instrWindowCount++; if (instrWindowCount >= INSTR_WINDOW_SIZE) {
+         * if ((instrWindowCount % (INSTR_WINDOW_SIZE / 2)) == 0)
+         * find_repeated_seq(instrWindow, instrWindowBeginPtr,
+         * INSTR_WINDOW_SIZE); instrWindowBeginPtr++; if (instrWindowBeginPtr 
+         * == INSTR_WINDOW_SIZE) instrWindowBeginPtr = 0; } */
+
+        /* -1 is special code that indicates time synchro */
+        if (func_number == timesynchro_func) {
+            long long ts_file;
+            fread(&ts_file, sizeof(long long), 1, f);
+
+            if (compressed_file) {
+                WRITE_SHORT(timesynchro_func);
+                WRITE_LONGLONG(ts_file);
+            }
+
+            if (!disable_real_time_play_back) {
+                gettimeofday(&current_time, NULL);
+                long long ts_real =
+                    (current_time.tv_sec -
+                     start_time.tv_sec) * (long long) 1000000 +
+                    current_time.tv_usec - start_time.tv_usec;
+                // fprintf(stderr, "%d %d\n", (int)ts_real, (int)ts_file);
+                if (ts_real < ts_file/* && ts_file - ts_real > 100 * 1000 */) {
+                    /* we're playing too fast */
+                    // fprintf(stderr, "waiting %d usec\n", (int)(ts_file -
+                    // ts_real));
+                    usleep((int) (ts_file - ts_real));
+                }
+            }
+            continue;
+        } else if (func_number == memorize_array_func) {
+            fread(&memorize_array_play, sizeof(short), 1, f);
+            goto begin;
+        } else if (func_number == reuse_array_func) {
+            fread(&reuse_array_play, sizeof(short), 1, f);
+            goto begin;
+        }
+
+        assert(func_number >= 0);
+
+        Signature *signature = (Signature *) tab_opengl_calls[func_number];
+        int nb_args = signature->nb_args;
+        int *args_type = signature->args_type;
+
+        for (i = 0; i < nb_args; i++) {
+            switch (args_type[i]) {
+#if 0
+            case TYPE_UNSIGNED_CHAR:
+            case TYPE_CHAR:
+                {
+                    char c;
+
+                    fread(&c, sizeof(c), 1, f);
+                    args[i] = c;
+                    break;
+                }
+
+            case TYPE_UNSIGNED_SHORT:
+            case TYPE_SHORT:
+                {
+                    short s;
+
+                    fread(&s, sizeof(s), 1, f);
+                    args[i] = s;
+                    break;
+                }
+
+            case TYPE_FLOAT:
+                fread(&args[i], sizeof(int), 1, f);
+                break;
+
+#endif
+            case TYPE_UNSIGNED_CHAR:
+            case TYPE_CHAR:
+            case TYPE_UNSIGNED_INT:
+            case TYPE_INT:
+            case TYPE_UNSIGNED_SHORT:
+            case TYPE_SHORT:
+            case TYPE_FLOAT:
+                {
+                    int n;
+                    fread(&n, sizeof(int), 1, f);
+                    args[i] = n;
+                    break;
+                }
+
+            case TYPE_NULL_TERMINATED_STRING:
+              CASE_IN_UNKNOWN_SIZE_POINTERS:
+                fread(&args_size[i], sizeof(int), 1, f);
+                if (args_size[i]) {
+                    args[i] = (long) malloc(args_size[i]);
+                    fread((void *) args[i], args_size[i], 1, f);
+                } else {
+                    if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
+                        fprintf(stderr, "call %s arg %d\n",
+                                tab_opengl_calls_name[func_number], i);
+                    }
+                    args[i] = 0;
+                }
+                if (reuse_array_play >= 0) {
+                    long current_pos = ftell(f);
+
+                    args_size[i] =
+                        replayBufferedArrays[reuse_array_play].size;
+                    args[i] = (long) malloc(args_size[i]);
+                    fseek(f,
+                          replayBufferedArrays[reuse_array_play].file_offset,
+                          SEEK_SET);
+                    fread((void *) args[i], args_size[i], 1, f);
+                    fseek(f, current_pos, SEEK_SET);
+                }
+                if (memorize_array_play >= 0) {
+                    assert(memorize_array_play <= sizeBufferedArraysPlay);
+                    if (memorize_array_play == sizeBufferedArraysPlay) {
+                        sizeBufferedArraysPlay++;
+                        replayBufferedArrays =
+                            realloc(replayBufferedArrays,
+                                    sizeBufferedArraysPlay *
+                                    sizeof(ReplayBufferedArray));
+                        replayBufferedArrays[sizeBufferedArraysPlay -
+                                             1].file_offset = 0;
+                    }
+                    replayBufferedArrays[memorize_array_play].file_offset =
+                        ftell(f) - args_size[i];
+                    replayBufferedArrays[memorize_array_play].size =
+                        args_size[i];
+                }
+                break;
+
+              CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
+                {
+                    args_size[i] =
+                        compute_arg_length(stderr, func_number, i, args);
+                    args[i] =
+                        (args_size[i]) ? (long) malloc(args_size[i]) : 0;
+                    fread((void *) args[i], args_size[i], 1, f);
+                    break;
+                }
+
+              CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
+                {
+                    args_size[i] =
+                        compute_arg_length(stderr, func_number, i, args);
+                    args[i] = (long) malloc(args_size[i]);
+                    break;
+                }
+
+              CASE_OUT_UNKNOWN_SIZE_POINTERS:
+                {
+                    fread(&args_size[i], sizeof(int), 1, f);
+                    if (args_size[i]) {
+                        args[i] = (long) malloc(args_size[i]);
+                    } else {
+                        if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
+                            fprintf(stderr, "call %s arg %d\n",
+                                    tab_opengl_calls_name[func_number], i);
+                        }
+                        args[i] = 0;
+                    }
+                    break;
+                }
+
+              CASE_OUT_KNOWN_SIZE_POINTERS:
+                {
+                    args_size[i] = tab_args_type_length[args_type[i]];
+                    assert(args_size[i]);
+                    args[i] = (long) malloc(args_size[i]);
+                    break;
+                }
+
+            case TYPE_DOUBLE:
+              CASE_IN_KNOWN_SIZE_POINTERS:
+                args_size[i] = tab_args_type_length[args_type[i]];
+                args[i] = (long) malloc(args_size[i]);
+                fread((void *) args[i], args_size[i], 1, f);
+                break;
+
+            case TYPE_IN_IGNORED_POINTER:
+                args[i] = 0;
+                break;
+
+            default:
+                fprintf(stderr, "shouldn't happen : call %s arg %d\n",
+                        tab_opengl_calls_name[func_number], i);
+                do_disconnect_current();
+                return 0;
+            }
+        }
+        if (debug)
+            display_gl_call(stderr, func_number, args, args_size);
+
+        if (debug && reuse_array_play != -1)
+            fprintf(stderr, "reuse_array_play %d\n", reuse_array_play);
+        if (debug && memorize_array_play != -1)
+            fprintf(stderr, "memorize_array_play %d\n", memorize_array_play);
+
+        if (compressed_file) {
+            int reuse_array = -1;
+            int memorize_array = -1;
+            void *ptr = NULL;
+            int bytes_size = 0;
+            int do_default = 1;
+
+            switch (func_number) {
+            case glXMakeCurrent_func:
+                {
+                    currentState = args[2];
+                    assert(currentState >= 0 && currentState < NB_STATES);
+                    break;
+                }
+
+            case glMatrixMode_func:
+                {
+                    if (states[currentState].matrixMode == args[0]) {
+                        do_default = 0;
+                    } else {
+                        states[currentState].matrixMode = args[0];
+                    }
+                    break;
+                }
+
+            case glLoadIdentity_func:
+            case glLoadMatrixd_func:
+            case glLoadMatrixf_func:
+            case glMultMatrixd_func:
+            case glMultMatrixf_func:
+            case glOrtho_func:
+            case glFrustum_func:
+            case glRotated_func:
+            case glRotatef_func:
+            case glScaled_func:
+            case glScalef_func:
+            case glTranslated_func:
+            case glTranslatef_func:
+            case glPushMatrix_func:
+            case glPopMatrix_func:
+                {
+                    if (states[currentState].matrixMode == 5890) {
+                        if (states[currentState].lastMatrixOp ==
+                            glLoadIdentity_func &&
+                            func_number == glLoadIdentity_func) {
+                            do_default = 0;
+                        }
+                        states[currentState].lastMatrixOp = func_number;
+                    }
+                    break;
+                }
+
+            case glPushAttrib_func:
+                {
+                    if (states[currentState].stackAttribPtr <
+                        MAX_SERVER_STATE_STACK_SIZE) {
+                        int mask = args[0];
+
+                        states[currentState].stackAttrib[states[currentState].
+                                                         stackAttribPtr].
+                            mask = mask;
+                        if (mask & GL_TRANSFORM_BIT) {
+                            states[currentState].
+                                stackAttrib[states[currentState].
+                                            stackAttribPtr].matrixMode =
+                                states[currentState].matrixMode;
+                            states[currentState].
+                                stackAttrib[states[currentState].
+                                            stackAttribPtr].lastMatrixOp =
+                                states[currentState].lastMatrixOp;
+                        }
+                        states[currentState].stackAttribPtr++;
+                    }
+                    break;
+                }
+
+            case glPopAttrib_func:
+                {
+                    if (states[currentState].stackAttribPtr > 0) {
+                        --states[currentState].stackAttribPtr;
+                        if (states[currentState].
+                            stackAttrib[states[currentState].stackAttribPtr].
+                            mask & GL_TRANSFORM_BIT) {
+                            states[currentState].matrixMode =
+                                states[currentState].
+                                stackAttrib[states[currentState].
+                                            stackAttribPtr].matrixMode;
+                            states[currentState].lastMatrixOp =
+                                states[currentState].
+                                stackAttrib[states[currentState].
+                                            stackAttribPtr].lastMatrixOp;
+                        }
+                    }
+                    break;
+                }
+
+            case glBufferDataARB_func:
+                {
+                    ptr = (void *) args[2];
+                    bytes_size = args_size[2];
+                    break;
+                }
+
+            case glVertexPointer_fake_func:
+            case glTexCoordPointer_fake_func:
+            case glTexCoordPointer01_fake_func:
+            case glDrawElements_func:
+                {
+                    ptr = (void *) args[nb_args - 1];
+                    bytes_size = args_size[nb_args - 1];
+                    break;
+                }
+
+            default:
+                break;
+            }
+
+            if (ptr) {
+                unsigned int crc = calc_checksum(ptr, bytes_size, 0xFFFFFFFF);
+                long long minInterest = 0x7FFFFFFFFFFFFFFFLL;
+                int iMinUsed = -1;
+
+                instr_count++;
+
+                for (i = 0; i < N_BUFFERED_ARRAYS; i++) {
+                    if (recordBufferedArrays[i].crc == crc) {
+                        // fprintf(stderr, "reusing %d for crc %d\n", i,
+                        // crc);
+                        reuse_array = i;
+                        // fprintf(stderr, "reuse_array %d\n", i);
+                        recordBufferedArrays[i].n_used++;
+                        recordBufferedArrays[i].last_use = instr_count;
+                        break;
+                    } else if (recordBufferedArrays[i].n_used == 0) {
+                        // fprintf(stderr, "memorize_array %d\n", i);
+                        memorize_array = i;
+                        recordBufferedArrays[i].n_used = 1;
+                        recordBufferedArrays[i].crc = crc;
+                        recordBufferedArrays[i].size = bytes_size;
+                        recordBufferedArrays[i].last_use = instr_count;
+                        break;
+                    } else {
+                        long long interest =
+                            N_BUFFERED_ARRAYS *
+                            recordBufferedArrays[i].n_used / (instr_count -
+                                                              recordBufferedArrays
+                                                              [i].
+                                                              last_use)
+                            /** recordBufferedArrays[i].size*/ ;
+                        if (interest < minInterest) {
+                            iMinUsed = i;
+                            minInterest = interest;
+                        }
+                    }
+                }
+                static unsigned int *discardedCrcs = NULL;
+                static int nDiscardedCrcs = 0;
+
+                if (i == N_BUFFERED_ARRAYS) {
+                    int j;
+
+                    for (j = 0; j < nDiscardedCrcs; j++) {
+                        if (discardedCrcs[j] == crc) {
+                            fprintf(stderr,
+                                    "%x was discarded before and is asked now...\n",
+                                    crc);
+                            discardedCrcs[j] =
+                                recordBufferedArrays[iMinUsed].crc;
+                            break;
+                        }
+                    }
+                    if (j == nDiscardedCrcs) {
+                        discardedCrcs =
+                            realloc(discardedCrcs,
+                                    sizeof(int) * (nDiscardedCrcs + 1));
+                        discardedCrcs[nDiscardedCrcs++] =
+                            recordBufferedArrays[iMinUsed].crc;
+                    }
+                    fprintf(stderr, "discarding %x\n",
+                            recordBufferedArrays[iMinUsed].crc);
+
+                    memorize_array = iMinUsed;
+                    recordBufferedArrays[iMinUsed].n_used = 1;
+                    recordBufferedArrays[iMinUsed].crc = crc;
+                    recordBufferedArrays[iMinUsed].size = bytes_size;
+                    recordBufferedArrays[iMinUsed].last_use = instr_count;
+                }
+
+                if (reuse_array != -1) {
+                    WRITE_SHORT(reuse_array_func);
+                    WRITE_SHORT(reuse_array);
+                } else if (memorize_array != -1) {
+                    WRITE_SHORT(memorize_array_func);
+                    WRITE_SHORT(memorize_array);
+                }
+            }
+
+            switch (func_number) {
+            case glXChooseVisual_func:
+            case glXQueryVersion_func:
+            case glXQueryExtension_func:
+            case glXGetClientString_func:
+            case glXQueryExtensionsString_func:
+            case glXQueryServerString_func:
+            case glXGetProcAddress_fake_func:
+            case glXGetProcAddress_global_fake_func:
+            case glXGetConfig_func:
+            case glXGetConfig_extended_func:
+            case glGetIntegerv_func:
+            case glGetFloatv_func:
+            case glGetBooleanv_func:
+            case glGetDoublev_func:
+            case glIsEnabled_func:
+            case _glGetError_fake_func:
+            case glGetString_func:
+                {
+                    do_default = 0;
+                    break;
+                }
+
+            case glLoadMatrixd_func:
+                {
+                    int j;
+
+                    WRITE_SHORT(glLoadMatrixf_func);
+                    double *ptr = (double *) args[0];
+
+                    for (j = 0; j < 16; j++) {
+                        WRITE_FLOAT(ptr[j]);
+                    }
+                    do_default = 0;
+                    break;
+                }
+
+            case glMultMatrixd_func:
+                {
+                    int j;
+
+                    WRITE_SHORT(glMultMatrixf_func);
+                    double *ptr = (double *) args[0];
+
+                    for (j = 0; j < 16; j++) {
+                        WRITE_FLOAT(ptr[j]);
+                    }
+                    do_default = 0;
+                    break;
+                }
+
+            case glTranslated_func:
+                {
+                    WRITE_SHORT(glTranslatef_func);
+                    WRITE_FLOAT(*(double *) args[0]);
+                    WRITE_FLOAT(*(double *) args[1]);
+                    WRITE_FLOAT(*(double *) args[2]);
+                    do_default = 0;
+                    break;
+                }
+
+            case glScalef_func:
+                {
+                    if (*(float *) &args[0] == 1 && *(float *) &args[1] == 1
+                        && *(float *) &args[2] == 1)
+                        do_default = 0;
+                    break;
+                }
+
+            case glScaled_func:
+                {
+                    if (!
+                        (*(double *) args[0] == 1 && *(double *) args[1] == 1
+                         && *(double *) args[2] == 1)) {
+                        WRITE_SHORT(glScalef_func);
+                        WRITE_FLOAT(*(double *) args[0]);
+                        WRITE_FLOAT(*(double *) args[1]);
+                        WRITE_FLOAT(*(double *) args[2]);
+                    }
+                    do_default = 0;
+                    break;
+                }
+
+            case glRotated_func:
+                {
+                    WRITE_SHORT(glRotatef_func);
+                    WRITE_FLOAT(*(double *) args[0]);
+                    WRITE_FLOAT(*(double *) args[1]);
+                    WRITE_FLOAT(*(double *) args[2]);
+                    WRITE_FLOAT(*(double *) args[3]);
+                    do_default = 0;
+                    break;
+                }
+#define IS_SHORT(x) ((x) >= -32768 && (x) < 32768)
+
+            case glRasterPos2i_func:
+                {
+                    if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
+                        WRITE_SHORT(glRasterPos2s_func);
+                        WRITE_SHORT(args[0]);
+                        WRITE_SHORT(args[1]);
+                        do_default = 0;
+                    }
+                    break;
+                }
+
+            case glVertex2i_func:
+                {
+                    if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
+                        WRITE_SHORT(glVertex2s_func);
+                        WRITE_SHORT(args[0]);
+                        WRITE_SHORT(args[1]);
+                        do_default = 0;
+                    }
+                    break;
+                }
+
+            case glTexCoord2i_func:
+                {
+                    if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
+                        WRITE_SHORT(glTexCoord2s_func);
+                        WRITE_SHORT(args[0]);
+                        WRITE_SHORT(args[1]);
+                        do_default = 0;
+                    }
+                    break;
+                }
+
+            case glTexCoord2fv_func:
+                {
+                    float *ptr = (float *) args[0];
+                    float u = ptr[0];
+                    float v = ptr[1];
+
+                    if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
+                        int ui = (int) u;
+                        int vi = (int) v;
+
+                        if (IS_SHORT(ui) && IS_SHORT(vi)) {
+                            WRITE_SHORT(glTexCoord2s_func);
+                            WRITE_SHORT(ui);
+                            WRITE_SHORT(vi);
+                            do_default = 0;
+                        }
+                    }
+                    break;
+                }
+
+            case glTexCoord2f_func:
+                {
+                    float u = *(float *) &args[0];
+                    float v = *(float *) &args[1];
+
+                    if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
+                        int ui = (int) u;
+                        int vi = (int) v;
+
+                        if (IS_SHORT(ui) && IS_SHORT(vi)) {
+                            WRITE_SHORT(glTexCoord2s_func);
+                            WRITE_SHORT(ui);
+                            WRITE_SHORT(vi);
+                            do_default = 0;
+                        }
+                    }
+                    break;
+                }
+
+            case glColor3f_func:
+                {
+                    WRITE_SHORT(glColor3ub_func);
+                    WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
+                    WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
+                    WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
+                    do_default = 0;
+                    break;
+                }
+
+            case glColor4f_func:
+                {
+                    if (*(float *) &args[3] == 1) {
+                        WRITE_SHORT(glColor3ub_func);
+                        WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
+                        WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
+                        WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
+                    } else {
+                        WRITE_SHORT(glColor4ub_func);
+                        WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
+                        WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
+                        WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
+                        WRITE_UNSIGNED_CHAR(255 * *(float *) &args[3]);
+                    }
+                    do_default = 0;
+                    break;
+                }
+
+            case glColor4fv_func:
+                {
+                    float *ptr = (float *) args[0];
+
+                    if (ptr[3] == 1) {
+                        WRITE_SHORT(glColor3ub_func);
+                        WRITE_UNSIGNED_CHAR(255 * ptr[0]);
+                        WRITE_UNSIGNED_CHAR(255 * ptr[1]);
+                        WRITE_UNSIGNED_CHAR(255 * ptr[2]);
+                    } else {
+                        WRITE_SHORT(glColor4ub_func);
+                        WRITE_UNSIGNED_CHAR(255 * ptr[0]);
+                        WRITE_UNSIGNED_CHAR(255 * ptr[1]);
+                        WRITE_UNSIGNED_CHAR(255 * ptr[2]);
+                        WRITE_UNSIGNED_CHAR(255 * ptr[3]);
+                    }
+                    do_default = 0;
+                    break;
+                }
+
+            case glColor3d_func:
+                {
+                    WRITE_SHORT(glColor3ub_func);
+                    WRITE_UNSIGNED_CHAR(255 * *(double *) args[0]);
+                    WRITE_UNSIGNED_CHAR(255 * *(double *) args[1]);
+                    WRITE_UNSIGNED_CHAR(255 * *(double *) args[2]);
+                    do_default = 0;
+                    break;
+                }
+
+            case glVertex3f_func:
+                {
+                    if (*(float *) &args[2] == 0) {
+                        WRITE_SHORT(glVertex2f_func);
+                        WRITE_FLOAT(*(float *) &args[0]);
+                        WRITE_FLOAT(*(float *) &args[1]);
+                        do_default = 0;
+                    }
+                    break;
+                }
+
+            case glVertex3d_func:
+                {
+                    WRITE_SHORT(glVertex3f_func);
+                    WRITE_FLOAT(*(double *) args[0]);
+                    WRITE_FLOAT(*(double *) args[1]);
+                    WRITE_FLOAT(*(double *) args[2]);
+                    do_default = 0;
+                    break;
+                }
+
+            case glNormal3fv_func:
+                {
+                    float *ptr = (float *) args[0];
+                    float u = ptr[0];
+                    float v = ptr[1];
+                    float w = ptr[2];
+
+                    if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7
+                        && fabs(w - (int) w) < 1e-7) {
+                        int ui = (int) u;
+                        int vi = (int) v;
+                        int wi = (int) w;
+
+                        if (IS_SHORT(ui) && IS_SHORT(vi) && IS_SHORT(wi)) {
+                            WRITE_SHORT(glNormal3sv_func);
+                            WRITE_SHORT(ui);
+                            WRITE_SHORT(vi);
+                            WRITE_SHORT(wi);
+                            do_default = 0;
+                        }
+                    }
+                    break;
+                }
+
+            case glNormal3d_func:
+                {
+                    WRITE_SHORT(glNormal3f_func);
+                    WRITE_FLOAT(*(double *) args[0]);
+                    WRITE_FLOAT(*(double *) args[1]);
+                    WRITE_FLOAT(*(double *) args[2]);
+                    do_default = 0;
+                    break;
+                }
+
+            case glDrawElements_func:
+                {
+                    int mode = args[0];
+                    int count = args[1];
+                    int type = args[2];
+
+                    if (type == GL_UNSIGNED_INT) {
+                        int j;
+                        unsigned int *ptr = (unsigned int *) args[3];
+
+                        for (j = 0; j < count; j++) {
+                            if ((ptr[j] >> 16) != 0)
+                                break;
+                        }
+                        if (j == count) {
+                            WRITE_SHORT(func_number);
+                            WRITE_INT(mode);
+                            WRITE_INT(count);
+                            WRITE_INT(GL_UNSIGNED_SHORT);
+                            if (reuse_array != -1) {
+                                WRITE_INT(0);
+                            } else {
+                                WRITE_INT(count * sizeof(short));
+                                for (j = 0; j < count; j++) {
+                                    WRITE_SHORT(ptr[j]);
+                                }
+                            }
+                            do_default = 0;
+                        } else
+                            do_default = 1;
+                    } else if (reuse_array != -1) {
+                        WRITE_SHORT(func_number);
+                        WRITE_INT(mode);
+                        WRITE_INT(count);
+                        WRITE_INT(type);
+                        WRITE_INT(0);
+                        do_default = 0;
+                    } else
+                        do_default = 1;
+                    break;
+                }
+
+            case glBufferDataARB_func:
+                {
+                    if (reuse_array != -1) {
+                        WRITE_SHORT(glBufferDataARB_func);
+                        WRITE_INT(args[0]);
+                        WRITE_INT(args[1]);
+                        WRITE_INT(0);
+                        WRITE_INT(args[3]);
+                        do_default = 0;
+                    }
+                    break;
+                }
+
+            case glVertexPointer_fake_func:
+            case glTexCoordPointer_fake_func:
+            case glTexCoordPointer01_fake_func:
+                {
+                    int offset = 0, index = 0, size, type, stride, bytes_size;
+                    void *ptr;
+                    int countarg = 0;
+
+                    if (func_number == glVertexPointer_fake_func ||
+                        func_number == glTexCoordPointer_fake_func)
+                        offset = args[countarg++];
+                    if (func_number == glTexCoordPointer_fake_func)
+                        index = args[countarg++];
+                    size = args[countarg++];
+                    type = args[countarg++];
+                    stride = args[countarg++];
+                    bytes_size = args[countarg++];
+                    ptr = (void *) args[countarg++];
+                    if (type == GL_DOUBLE) {
+                        int count;
+                        int j, k;
+
+                        if (stride == 0)
+                            stride = size * sizeof(double);
+                        assert((bytes_size % stride) == 0);
+                        assert((offset % stride) == 0);
+                        offset = (offset / stride) * size * sizeof(float);
+                        count = bytes_size / stride;
+                        WRITE_SHORT(func_number);
+                        if (func_number == glVertexPointer_fake_func ||
+                            func_number == glTexCoordPointer_fake_func)
+                            WRITE_INT(offset);
+                        if (func_number == glTexCoordPointer_fake_func)
+                            WRITE_INT(index);
+                        WRITE_INT(size);
+                        WRITE_INT(GL_FLOAT);
+                        WRITE_INT(0);
+                        WRITE_INT(count * size * sizeof(float));
+                        if (reuse_array != -1) {
+                            WRITE_INT(0);
+                        } else {
+                            WRITE_INT(count * size * sizeof(float));
+                            for (j = 0; j < count; j++) {
+                                for (k = 0; k < size; k++) {
+                                    WRITE_FLOAT(*(double *)
+                                                (ptr + j * stride +
+                                                 k * sizeof(double)));
+                                }
+                            }
+                        }
+                        do_default = 0;
+                    } else if (reuse_array != -1) {
+                        WRITE_SHORT(func_number);
+                        if (func_number == glVertexPointer_fake_func ||
+                            func_number == glTexCoordPointer_fake_func)
+                            WRITE_INT(offset);
+                        if (func_number == glTexCoordPointer_fake_func)
+                            WRITE_INT(index);
+                        WRITE_INT(size);
+                        WRITE_INT(type);
+                        WRITE_INT(stride);
+                        WRITE_INT(bytes_size);
+                        WRITE_INT(0);
+                        do_default = 0;
+                    } else
+                        do_default = 1;
+                    break;
+                }
+
+            default:
+                break;
+            }
+
+            if (do_default) {
+                fwrite(&func_number, sizeof(short), 1, compressed_file);
+                for (i = 0; i < nb_args; i++) {
+                    switch (args_type[i]) {
+                    case TYPE_UNSIGNED_CHAR:
+                    case TYPE_CHAR:
+                        {
+                            char c = args[i];
+
+                            fwrite(&c, sizeof(c), 1, compressed_file);
+                            break;
+                        }
+
+                    case TYPE_UNSIGNED_SHORT:
+                    case TYPE_SHORT:
+                        {
+                            short s = args[i];
+
+                            fwrite(&s, sizeof(s), 1, compressed_file);
+                            break;
+                        }
+
+                    case TYPE_UNSIGNED_INT:
+                    case TYPE_INT:
+                    case TYPE_FLOAT:{
+                            int n = args[i];
+                            fwrite(&n, sizeof(int), 1, compressed_file);
+                            break;
+                        }
+
+                    case TYPE_NULL_TERMINATED_STRING:
+                      CASE_IN_UNKNOWN_SIZE_POINTERS:
+                        fwrite(&args_size[i], sizeof(int), 1,
+                               compressed_file);
+                        if (args_size[i]) {
+                            fwrite((void *) args[i], args_size[i], 1,
+                                   compressed_file);
+                        }
+                        break;
+
+                      CASE_OUT_UNKNOWN_SIZE_POINTERS:
+                        {
+                            fwrite(&args_size[i], sizeof(int), 1,
+                                   compressed_file);
+                            break;
+                        }
+
+                      CASE_OUT_KNOWN_SIZE_POINTERS:
+                      CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
+                        {
+                            break;
+                        }
+
+                    case TYPE_DOUBLE:
+                      CASE_IN_KNOWN_SIZE_POINTERS:
+                      CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
+                        fwrite((void *) args[i], args_size[i], 1,
+                               compressed_file);
+                        break;
+
+                    case TYPE_IN_IGNORED_POINTER:
+                        break;
+
+                    default:
+                        fprintf(stderr, "shouldn't happen : call %s arg %d\n",
+                                tab_opengl_calls_name[func_number], i);
+                        do_disconnect_current();
+                        return 0;
+                    }
+                }
+            }
+        }
+
+        int new_offset = ftell(f);
+
+        if (show_offset ||
+            (show_diff_offset &&
+             new_offset - last_cmd_offset >= show_diff_offset)) {
+            fprintf(stderr, "offset = %d, diff=%d\n", new_offset,
+                    new_offset - last_cmd_offset);
+        }
+        last_cmd_offset = new_offset;
+
+        if (func_number == glXCreateContext_func &&
+            args[1] == visualid_fbconfig_read) {
+            args[1] = visualid_fbconfig_real;
+        }
+        if (debug) {
+            if (func_number == glBindProgramARB_func) {
+                fprintf(stderr, "glBindProgramARB_func(y, x) : x = %d\n",
+                        (int) args[1]);
+            } else if (func_number == glXGetProcAddress_fake_func) {
+                fprintf(stderr, "glXGetProcAddress_fake(%s)\n",
+                        (char *) args[0]);
+            }
+        }
+
+        if (debug && func_number == glEnable_func) {
+            fprintf(stderr, "enable(0x%x)\n", (int) args[0]);
+        } else if (debug && func_number == glDisable_func) {
+            fprintf(stderr, "disable(0x%x)\n", (int) args[0]);
+        }
+
+        if (resize) {
+            if (func_number == _moveResizeWindow_func) {
+                int *params = (int *) args[1];
+
+                orig_window_width = params[2];
+                window_height = params[3] =
+                    params[3] * window_width / params[2];
+                params[2] = window_width;
+                // buffer = malloc(4 * window_width * window_height);
+            } else if (func_number == glViewport_func ||
+                       func_number == glScissor_func) {
+                args[0] = args[0] * window_width / orig_window_width;
+                args[1] = args[1] * window_width / orig_window_width;
+                args[2] = args[2] * window_width / orig_window_width;
+                args[3] = args[3] * window_width / orig_window_width;
+            }
+        } else if (func_number == _moveResizeWindow_func) {
+            int *params = (int *) args[1];
+
+            window_width = params[2];
+            window_height = params[3];
+            // buffer = malloc(4 * window_width * window_height);
+        }
+
+        int ret =
+            (noplay) ? 0 : do_function_call(func_number, args, ret_string);
+
+        if (func_number == glXSwapBuffers_func) {
+            /* glReadPixels(0, 0, window_width, window_height, GL_RGBA,
+             * GL_UNSIGNED_BYTE, buffer); fwrite(buffer, 4 * window_width *
+             * window_height, 1, fout); */
+
+            int diff_time;
+
+            count_current++;
+            gettimeofday(&current_time, NULL);
+            diff_time =
+                (current_time.tv_sec - last_time.tv_sec) * 1000 +
+                (current_time.tv_usec - last_time.tv_usec) / 1000;
+            if (diff_time > refresh_rate) {
+                printf("%d frames in %.1f seconds = %.3f FPS\n",
+                       count_current - count_last_time, diff_time / 1000.,
+                       (count_current - count_last_time) * 1000. / diff_time);
+                if (show_hard_disk_bandwith) {
+                    int current_offset = ftell(f);
+
+                    printf("bandwidth : %.1f MB/s\n",
+                           (current_offset - last_offset) * 1e-6);
+                    last_offset = current_offset;
+                }
+                last_time.tv_sec = current_time.tv_sec;
+                last_time.tv_usec = current_time.tv_usec;
+                count_last_time = count_current;
+            }
+            usleep(slowdown * 50000);
+        }
+        if (debug && func_number == glGenProgramsARB_func && args[0] == 1) {
+            fprintf(stderr, "glGenProgramsARB_func(1, &x) : x = %d\n",
+                    *(int *) args[1]);
+        }
+
+        if (func_number == glXGetVisualFromFBConfig_func) {
+            fread(&visualid_fbconfig_read, sizeof(int), 1, f);
+            visualid_fbconfig_real = ret;
+        }
+
+        for (i = 0; i < nb_args; i++) {
+            switch (args_type[i]) {
+            case TYPE_UNSIGNED_INT:
+            case TYPE_INT:
+            case TYPE_UNSIGNED_CHAR:
+            case TYPE_CHAR:
+            case TYPE_UNSIGNED_SHORT:
+            case TYPE_SHORT:
+            case TYPE_FLOAT:
+                break;
+
+            case TYPE_NULL_TERMINATED_STRING:
+              CASE_POINTERS:
+            case TYPE_DOUBLE:
+                if (args[i])
+                    free((void *) args[i]);
+                break;
+
+            case TYPE_IN_IGNORED_POINTER:
+                args[i] = 0;
+                break;
+
+            default:
+                fprintf(stderr, "shouldn't happen : call %s arg %d\n",
+                        tab_opengl_calls_name[func_number], i);
+                do_disconnect_current();
+                return 0;
+            }
+        }
+    }
+    return 0;
+}
Index: git/target-i386/opengl_server.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/opengl_server.c	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,826 @@
+/*
+ *  TCP/IP OpenGL server
+ *
+ *  Copyright (c) 2007 Even Rouault
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+/* gcc -Wall -O2 -g opengl_server.c opengl_exec.c -o opengl_server -I../i386-softmmu -I. -I.. -lGL */
+
+#include <stdio.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <assert.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#include <netdb.h>
+#include <arpa/inet.h>
+#include <sys/time.h>
+#include <signal.h>
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+#define PORT    5555
+
+#define ENABLE_GL_LOG
+
+#include "opengl_func.h"
+#include "opengl_utils.h"
+
+static int refresh_rate = 1000;
+static int must_save = 0;
+static int timestamp = 1; /* only valid if must_save == 1. include timestamps in the save file to enable real-time playback */
+
+extern int display_function_call;
+extern void init_process_tab(void);
+extern int do_function_call(Display *, int, int, arg_t *, char *);
+extern void opengl_exec_set_local_connection(void);
+extern void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window);
+
+#ifdef ENABLE_GL_LOG
+static FILE* f = NULL;
+
+static char* filename = "/tmp/debug_gl.bin";
+
+#define write_gl_debug_init() do { if (f == NULL) f = fopen(filename, "wb"); } while(0)
+
+static void inline  write_gl_debug_cmd_char(char my_int)
+{
+  write_gl_debug_init();
+  fwrite(&my_int, sizeof(my_int), 1, f);
+}
+
+static void inline  write_gl_debug_cmd_short(short my_int)
+{
+  write_gl_debug_init();
+  fwrite(&my_int, sizeof(my_int), 1, f);
+}
+
+static void inline write_gl_debug_cmd_int(int my_int)
+{
+  write_gl_debug_init();
+  fwrite(&my_int, sizeof(my_int), 1, f);
+}
+
+static void inline  write_gl_debug_cmd_longlong(long long my_longlong)
+{
+  write_gl_debug_init();
+  fwrite(&my_longlong, sizeof(my_longlong), 1, f);
+}
+
+static void inline  write_gl_debug_cmd_buffer_with_size(int size, void* buffer)
+{
+  write_gl_debug_init();
+  fwrite(&size, sizeof(int), 1, f);
+  if (size)
+    fwrite(buffer, size, 1, f);
+}
+
+static void inline  write_gl_debug_cmd_buffer_without_size(int size, void* buffer)
+{
+  write_gl_debug_init();
+  if (size)
+    fwrite(buffer, size, 1, f);
+}
+
+static void inline  write_gl_debug_end()
+{
+  write_gl_debug_init();
+  fclose(f);
+  f = NULL;
+}
+
+#endif
+
+static void write_sock_data(int sock, void* data, int len)
+{
+  if (len && data)
+  {
+    int offset = 0;
+    while(offset < len)
+    {
+      int nwritten = write(sock, data + offset, len - offset);
+      if (nwritten == -1)
+      {
+        if (errno == EINTR)
+          continue;
+        perror("write");
+        assert(nwritten != -1);
+      }
+      offset += nwritten;
+    }
+  }
+}
+
+static void inline write_sock_int(int sock, int my_int)
+{
+  write_sock_data(sock, &my_int, sizeof(int));
+}
+
+static int total_read = 0;
+static void read_sock_data(int sock, void* data, int len)
+{
+  if (len)
+  {
+    int offset = 0;
+    while(offset < len)
+    {
+      int nread = read(sock, data + offset, len - offset);
+      if (nread == -1)
+      {
+        if (errno == EINTR)
+          continue;
+        perror("read");
+        assert(nread != -1);
+      }
+      if (nread == 0)
+      {
+        fprintf(stderr, "nread = 0\n");
+      }
+      assert(nread > 0);
+      offset += nread;
+      total_read += nread;
+    }
+  }
+}
+
+static int inline read_sock_int(int sock)
+{
+  int ret;
+  read_sock_data(sock, &ret, sizeof(int));
+  return ret;
+}
+
+static short inline read_sock_short(int sock)
+{
+  short ret;
+  read_sock_data(sock, &ret, sizeof(short));
+  return ret;
+}
+
+
+static Display* dpy = NULL;
+static int parent_xid = -1;
+
+
+static struct timeval last_time, current_time, time_stamp_start;
+static int count_last_time = 0, count_current = 0;
+
+static struct timeval last_read_time, current_read_time;
+
+int has_x_error = 0;
+
+int
+read_from_client (int sock)
+{
+  arg_t args[50];
+  int args_size[50];
+  char ret_string[32768];
+  char command_buffer[65536*16];
+
+  if (dpy == NULL)
+  {
+    init_process_tab();
+    dpy = XOpenDisplay(NULL);
+    if (parent_xid != -1)
+    {
+      opengl_exec_set_parent_window(dpy, parent_xid);
+    }
+  }
+
+  int i;
+  int func_number = read_sock_short(sock);
+
+  Signature* signature = (Signature*)tab_opengl_calls[func_number];
+  int ret_type = signature->ret_type;
+  int nb_args = signature->nb_args;
+  int* args_type = signature->args_type;
+  int pid = 0;
+
+  if (func_number == _serialized_calls_func)
+  {
+    int command_buffer_size = read_sock_int(sock);
+    int commmand_buffer_offset = 0;
+    read_sock_data(sock, command_buffer, command_buffer_size);
+    /* TODO: must convert if client is different word size */
+
+#ifdef ENABLE_GL_LOG
+    if (must_save) write_gl_debug_cmd_short(_serialized_calls_func);
+#endif
+
+    while(commmand_buffer_offset < command_buffer_size)
+    {
+      func_number = *(short*)(command_buffer + commmand_buffer_offset);
+      if( ! (func_number >= 0 && func_number < GL_N_CALLS) )
+      {
+        fprintf(stderr, "func_number >= 0 && func_number < GL_N_CALLS failed at "
+                        "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
+                        commmand_buffer_offset, command_buffer_size);
+        exit(-1);
+      }
+
+#ifdef ENABLE_GL_LOG
+      if (must_save) write_gl_debug_cmd_short(func_number);
+#endif
+      commmand_buffer_offset += sizeof(short);
+
+
+      signature = (Signature*)tab_opengl_calls[func_number];
+      ret_type = signature->ret_type;
+      assert(ret_type == TYPE_NONE);
+      nb_args = signature->nb_args;
+      args_type = signature->args_type;
+
+      for(i=0;i<nb_args;i++)
+      {
+        switch(args_type[i])
+        {
+          case TYPE_UNSIGNED_CHAR:
+          case TYPE_CHAR:
+          {
+            args[i] = *(int*)(command_buffer + commmand_buffer_offset);
+#ifdef ENABLE_GL_LOG
+            if (must_save) write_gl_debug_cmd_char(args[i]);
+#endif
+            commmand_buffer_offset += sizeof(int);
+            break;
+          }
+
+          case TYPE_UNSIGNED_SHORT:
+          case TYPE_SHORT:
+          {
+            args[i] = *(int*)(command_buffer + commmand_buffer_offset);
+#ifdef ENABLE_GL_LOG
+            if (must_save) write_gl_debug_cmd_short(args[i]);
+#endif
+            commmand_buffer_offset += sizeof(int);
+            break;
+          }
+
+          case TYPE_UNSIGNED_INT:
+          case TYPE_INT:
+          case TYPE_FLOAT:
+          {
+            args[i] = *(int*)(command_buffer + commmand_buffer_offset);
+#ifdef ENABLE_GL_LOG
+            if (must_save) write_gl_debug_cmd_int(args[i]);
+#endif
+            commmand_buffer_offset += sizeof(int);
+            break;
+          }
+
+          case TYPE_NULL_TERMINATED_STRING:
+          CASE_IN_UNKNOWN_SIZE_POINTERS:
+          {
+            args_size[i] = *(int*)(command_buffer + commmand_buffer_offset);
+            commmand_buffer_offset += sizeof(int);
+
+            if (args_size[i] == 0)
+            {
+              args[i] = 0;
+            }
+            else
+            {
+              args[i] = (long)(command_buffer + commmand_buffer_offset);
+            }
+
+            if (args[i] == 0)
+            {
+              if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
+              {
+                fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
+                return 0;
+              }
+            }
+#ifdef ENABLE_GL_LOG
+            if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
+#endif
+            commmand_buffer_offset += args_size[i];
+
+            break;
+          }
+
+          CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
+          {
+            args_size[i] = compute_arg_length(stderr, func_number, i, args);
+            args[i] = (args_size[i]) ? (long)(command_buffer + commmand_buffer_offset) : 0;
+#ifdef ENABLE_GL_LOG
+            if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
+#endif
+            commmand_buffer_offset += args_size[i];
+            break;
+          }
+
+          CASE_OUT_POINTERS:
+          {
+            fprintf(stderr, "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
+            return 0;
+            break;
+          }
+
+          case TYPE_DOUBLE:
+          CASE_IN_KNOWN_SIZE_POINTERS:
+            args[i] = (long)(command_buffer + commmand_buffer_offset);
+            args_size[i] = tab_args_type_length[args_type[i]];
+#ifdef ENABLE_GL_LOG
+            if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
+#endif
+            commmand_buffer_offset += tab_args_type_length[args_type[i]];
+            break;
+
+          case TYPE_IN_IGNORED_POINTER:
+            args[i] = 0;
+            break;
+
+          default:
+            fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
+            return 0;
+            break;
+        }
+      }
+
+      if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
+
+      do_function_call(dpy, func_number, 1, args, ret_string);
+    }
+  }
+  else
+  {
+#ifdef ENABLE_GL_LOG
+    if (must_save && func_number != _synchronize_func) write_gl_debug_cmd_short(func_number);
+#endif
+
+    for(i=0;i<nb_args;i++)
+    {
+      switch(args_type[i])
+      {
+        case TYPE_UNSIGNED_CHAR:
+        case TYPE_CHAR:
+          args[i] = read_sock_int(sock);
+#ifdef ENABLE_GL_LOG
+          if (must_save) write_gl_debug_cmd_char(args[i]);
+#endif
+          break;
+
+        case TYPE_UNSIGNED_SHORT:
+        case TYPE_SHORT:
+          args[i] = read_sock_int(sock);
+#ifdef ENABLE_GL_LOG
+          if (must_save) write_gl_debug_cmd_short(args[i]);
+#endif
+          break;
+
+        case TYPE_UNSIGNED_INT:
+        case TYPE_INT:
+        case TYPE_FLOAT:
+          args[i] = read_sock_int(sock);
+#ifdef ENABLE_GL_LOG
+          if (must_save) write_gl_debug_cmd_int(args[i]);
+#endif
+          break;
+
+        case TYPE_NULL_TERMINATED_STRING:
+        CASE_IN_UNKNOWN_SIZE_POINTERS:
+        {
+          args_size[i] = read_sock_int(sock);
+          if (args_size[i])
+          {
+            args[i] = (long)malloc(args_size[i]);
+            read_sock_data(sock, (void*)args[i], args_size[i]);
+          }
+          else
+          {
+            args[i] = 0;
+            if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
+            {
+              fprintf(stderr, "call %s arg %d\n", tab_opengl_calls_name[func_number], i);
+              return 0;
+            }
+          }
+#ifdef ENABLE_GL_LOG
+          if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
+#endif
+          break;
+        }
+
+        CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
+        {
+          args_size[i] = compute_arg_length(stderr, func_number, i, args);
+          args[i] = (args_size[i]) ? (long)malloc(args_size[i]) : 0;
+          read_sock_data(sock, (void*)args[i], args_size[i]);
+#ifdef ENABLE_GL_LOG
+          if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
+#endif
+          break;
+        }
+
+        CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
+        {
+          args_size[i] = compute_arg_length(stderr, func_number, i, args);
+          args[i] = (long)malloc(args_size[i]);
+          break;
+        }
+
+        CASE_OUT_UNKNOWN_SIZE_POINTERS:
+        {
+          args_size[i] = read_sock_int(sock);
+          if (func_number == glGetProgramLocalParameterdvARB_func)
+          {
+            fprintf(stderr, "size = %d\n", args_size[i]);
+          }
+          if (args_size[i])
+          {
+            args[i] = (long)malloc(args_size[i]);
+          }
+          else
+          {
+            if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
+            {
+              fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
+              return 0;
+            };
+            args[i] = 0;
+          }
+          //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
+#ifdef ENABLE_GL_LOG
+          if (must_save) write_gl_debug_cmd_int(args_size[i]);
+#endif
+          break;
+        }
+
+        CASE_OUT_KNOWN_SIZE_POINTERS:
+        {
+          args_size[i] = tab_args_type_length[args_type[i]];
+          assert(args_size[i]);
+          args[i] = (long)malloc(args_size[i]);
+          //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
+          break;
+        }
+
+        case TYPE_DOUBLE:
+        CASE_IN_KNOWN_SIZE_POINTERS:
+          args_size[i] = tab_args_type_length[args_type[i]];
+          args[i] = (long)malloc(args_size[i]);
+          read_sock_data(sock, (void*)args[i], args_size[i]);
+#ifdef ENABLE_GL_LOG
+          if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
+#endif
+          break;
+
+        case TYPE_IN_IGNORED_POINTER:
+          args[i] = 0;
+          break;
+
+        default:
+          fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
+          return 0;
+          break;
+      }
+    }
+
+    if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
+
+    if (getenv("ALWAYS_FLUSH")) fflush(f);
+
+    int ret = do_function_call(dpy, func_number, 1, args, ret_string);
+#ifdef ENABLE_GL_LOG
+    if (must_save && func_number == glXGetVisualFromFBConfig_func)
+    {
+      write_gl_debug_cmd_int(ret);
+    }
+#endif
+
+    for(i=0;i<nb_args;i++)
+    {
+      switch(args_type[i])
+      {
+        case TYPE_UNSIGNED_INT:
+        case TYPE_INT:
+        case TYPE_UNSIGNED_CHAR:
+        case TYPE_CHAR:
+        case TYPE_UNSIGNED_SHORT:
+        case TYPE_SHORT:
+        case TYPE_FLOAT:
+          break;
+
+        case TYPE_NULL_TERMINATED_STRING:
+        case TYPE_DOUBLE:
+        CASE_IN_POINTERS:
+          if (args[i]) free((void*)args[i]);
+          break;
+
+        CASE_OUT_POINTERS:
+          //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
+          write_sock_data(sock, (void*)args[i], args_size[i]);
+          if (display_function_call)
+          {
+            if (args_type[i] == TYPE_OUT_1INT)
+            {
+              fprintf(stderr, "out[%d] : %d\n", i, *(int*)args[i]);
+            }
+            else if (args_type[i] == TYPE_OUT_1FLOAT)
+            {
+              fprintf(stderr, "out[%d] : %f\n", i, *(float*)args[i]);
+            }
+          }
+          if (args[i]) free((void*)args[i]);
+          break;
+
+        case TYPE_IN_IGNORED_POINTER:
+          args[i] = 0;
+          break;
+
+        default:
+          fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
+          return 0;
+          break;
+      }
+    }
+
+    if (signature->ret_type == TYPE_CONST_CHAR)
+    {
+      write_sock_int(sock, strlen(ret_string) + 1);
+      write_sock_data(sock, ret_string, strlen(ret_string) + 1);
+    }
+    else if (signature->ret_type != TYPE_NONE)
+    {
+      write_sock_int(sock, ret);
+    }
+
+#ifdef ENABLE_GL_LOG
+    if (must_save && func_number == _exit_process_func)
+    {
+      write_gl_debug_end();
+    }
+#endif
+    if (func_number == _exit_process_func)
+    {
+      return -1;
+    }
+    else if (func_number == glXSwapBuffers_func)
+    {
+      int diff_time;
+      count_current++;
+      gettimeofday(&current_time, NULL);
+#ifdef ENABLE_GL_LOG
+      if (must_save && timestamp)
+      {
+        long long ts = (current_time.tv_sec - time_stamp_start.tv_sec) * (long long)1000000 + current_time.tv_usec - time_stamp_start.tv_usec;
+        /* -1 is special code that indicates time synchro */
+        write_gl_debug_cmd_short(timesynchro_func);
+        write_gl_debug_cmd_longlong(ts);
+      }
+#endif
+      diff_time = (current_time.tv_sec - last_time.tv_sec) * 1000 + (current_time.tv_usec - last_time.tv_usec) / 1000;
+      if (diff_time > refresh_rate)
+      {
+#ifdef ENABLE_GL_LOG
+        fflush(f);
+#endif
+        printf("%d frames in %.1f seconds = %.3f FPS\n",
+               count_current - count_last_time,
+               diff_time / 1000.,
+               (count_current - count_last_time) * 1000. / diff_time);
+        last_time.tv_sec = current_time.tv_sec;
+        last_time.tv_usec = current_time.tv_usec;
+        count_last_time = count_current;
+      }
+    }
+  }
+  return 0;
+}
+
+int
+make_socket (uint16_t port)
+{
+  int sock;
+  struct sockaddr_in name;
+
+  /* Create the socket. */
+  sock = socket (PF_INET, SOCK_STREAM, 0);
+  if (sock < 0)
+    {
+      perror ("socket");
+      exit (EXIT_FAILURE);
+    }
+
+  /* Give the socket a name. */
+  name.sin_family = AF_INET;
+  name.sin_port = htons (port);
+  name.sin_addr.s_addr = htonl (INADDR_ANY);
+  if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0)
+    {
+      perror ("bind");
+      exit (EXIT_FAILURE);
+    }
+
+  return sock;
+}
+
+static int x_error_handler(Display     *display,
+                           XErrorEvent *error)
+{
+  char buf[64];
+  XGetErrorText(display, error->error_code, buf, 63);
+  fprintf (stderr, "The program received an X Window System error.\n"
+          "This probably reflects a bug in the program.\n"
+          "The error was '%s'.\n"
+          "  (Details: serial %ld error_code %d request_code %d minor_code %d)\n",
+          buf,
+          error->serial,
+          error->error_code,
+          error->request_code,
+          error->minor_code);
+  has_x_error = 1;
+  return 0;
+}
+
+void usage()
+{
+  printf("Usage : opengl_server [OPTION]\n\n");
+  printf("The following options are available :\n");
+  printf("--port=XXXX         : set XXX as the port number for the TCP/IP server (default : 5555)\n");
+  printf("--debug             : output debugging trace on stderr\n");
+  printf("--save              : dump the serialialized OpenGL flow in a file (default : /tmp/debug_gl.bin)\n");
+  printf("--filename=X        : the file where to write the serailized OpenGL flow\n");
+  printf("--different-windows : even if the client is on 127.0.0.1, display OpenGL on a new X window\n");
+  printf("--parent-xid=XXX    : use XXX as the XID of the parent X window where to display the OpenGL flow\n");
+  printf("                     This is useful if you want to run accelerated OpenGL inside a non-patched QEMU\n");
+  printf("                     or from another emulator, through TCP/IP\n");
+  printf("--h or --help       : display this help\n");
+}
+
+int
+main (int argc, char* argv[])
+{
+  int sock;
+  fd_set active_fd_set, read_fd_set;
+  int i;
+  struct sockaddr_in clientname;
+  socklen_t size;
+  int port = PORT;
+  int different_windows = 0;
+
+  for(i=1;i<argc;i++)
+  {
+    if (argv[i][0] == '-' && argv[i][1] == '-')
+      argv[i] = argv[i]+1;
+
+    if (strcmp(argv[i], "-debug") == 0)
+    {
+      display_function_call = 1;
+    }
+    else if (strcmp(argv[i], "-save") == 0)
+    {
+      must_save = 1;
+    }
+    else if (strncmp(argv[i], "-port=",6) == 0)
+    {
+      port = atoi(argv[i] + 6);
+    }
+    else if (strncmp(argv[i], "-filename=",strlen("-filename=")) == 0)
+    {
+      filename = argv[i] + strlen("-filename=");
+    }
+    else if (strncmp(argv[i], "-parent-xid=",strlen("-parent-xid=")) == 0)
+    {
+      char* c = argv[i] + strlen("-parent-xid=");
+      parent_xid = strtol(c, NULL, 0);
+      different_windows = 1;
+    }
+    else if (strcmp(argv[i], "-different-windows") == 0)
+    {
+      different_windows = 1;
+    }
+    else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0)
+    {
+      usage();
+      return 0;
+    }
+    else
+    {
+      fprintf(stderr, "unknown parameter : %s\n", argv[i]);
+      usage();
+      return -1;
+    }
+  }
+
+  /* Create the socket and set it up to accept connections. */
+  sock = make_socket (port);
+
+  int flag = 1;
+  if (setsockopt(sock, IPPROTO_IP, SO_REUSEADDR,(char *)&flag, sizeof(int)) != 0)
+  {
+    perror("setsockopt SO_REUSEADDR");
+  }
+  if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,(char *)&flag, sizeof(int)) != 0)
+  {
+    perror("setsockopt TCP_NODELAY");
+  }
+
+  if (listen (sock, 1) < 0)
+  {
+    perror ("listen");
+    exit (EXIT_FAILURE);
+  }
+
+  struct sigaction action;
+  action.sa_handler = SIG_IGN;
+  action.sa_flags = SA_NOCLDWAIT;
+  sigaction(SIGCHLD,&action,NULL);
+
+  FD_ZERO (&active_fd_set);
+  FD_SET (sock, &active_fd_set);
+
+  while(1)
+  {
+    int new, pid;
+
+    read_fd_set = active_fd_set;
+    if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0)
+    {
+      perror ("select");
+      exit (EXIT_FAILURE);
+    }
+
+    size = sizeof (clientname);
+    new = accept (sock, (struct sockaddr *) &clientname, &size);
+    if (new < 0)
+    {
+      perror ("accept");
+      exit (EXIT_FAILURE);
+    }
+    pid = fork();
+    if (pid == -1)
+    {
+      perror ("fork");
+      exit(EXIT_FAILURE);
+    }
+    if (pid == 0)
+    {
+      close(sock);
+
+      fprintf (stderr, "Server: connect from host %s, port %hd.\n",
+                  inet_ntoa (clientname.sin_addr),
+                  ntohs (clientname.sin_port));
+
+      gettimeofday(&last_time, NULL);
+      gettimeofday(&last_read_time, NULL);
+
+      if (strcmp(inet_ntoa(clientname.sin_addr), "127.0.0.1") == 0 &&
+          different_windows == 0)
+      {
+        opengl_exec_set_local_connection();
+      }
+
+      if (timestamp)
+      {
+        gettimeofday(&time_stamp_start, NULL);
+      }
+
+      XSetErrorHandler(x_error_handler);
+
+      while(1)
+      {
+        if (read_from_client (new) < 0)
+        {
+          do_function_call(dpy, _exit_process_func, 1, NULL, NULL);
+
+          fprintf (stderr, "Server: disconnect from host %s, port %hd.\n",
+                  inet_ntoa (clientname.sin_addr),
+                  ntohs (clientname.sin_port));
+
+          return 0;
+        }
+      }
+    }
+    else
+    {
+      close(new);
+    }
+  }
+
+  return 0;
+}
Index: git/target-i386/opengl_utils.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/opengl_utils.h	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,453 @@
+/*
+ *  Functions used by host & client sides
+ *
+ *  Copyright (c) 2007 Even Rouault
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+
+#ifndef _OPENGL_UTILS
+#define _OPENGL_UTILS
+
+typedef struct {
+    unsigned int *values;
+    int nbValues;
+} RangeAllocator;
+
+/*
+static void print_range(RangeAllocator* range)
+{
+  int i;
+  printf("%s", "table : ");
+  for(i=0;i<range->nbValues;i++)
+  {
+    printf("%d ", range->values[i]);
+  }
+  printf("\n");
+}
+*/
+
+static inline void alloc_value(RangeAllocator *range, unsigned int value)
+{
+    if (value == 0)
+        return;
+    if (range->nbValues >= 1) {
+        int lower = 0;
+        int upper = range->nbValues - 1;
+
+        while (1) {
+            int mid = (lower + upper) / 2;
+
+            if (range->values[mid] > value)
+                upper = mid;
+            else if (range->values[mid] < value)
+                lower = mid;
+            else
+                break;
+            if (upper - lower <= 1) {
+                if (value < range->values[lower]) {
+                    range->values =
+                        realloc(range->values,
+                                (range->nbValues + 1) * sizeof(int));
+                    memmove(&range->values[lower + 1], &range->values[lower],
+                            (range->nbValues - lower) * sizeof(int));
+                    range->values[lower] = value;
+                    range->nbValues++;
+                } else if (value == range->values[lower]) {
+                } else if (value < range->values[upper]) {
+                    range->values =
+                        realloc(range->values,
+                                (range->nbValues + 1) * sizeof(int));
+                    memmove(&range->values[upper + 1], &range->values[upper],
+                            (range->nbValues - upper) * sizeof(int));
+                    range->values[upper] = value;
+                    range->nbValues++;
+                } else if (value == range->values[upper]) {
+                } else {
+                    upper++;
+
+                    range->values =
+                        realloc(range->values,
+                                (range->nbValues + 1) * sizeof(int));
+                    memmove(&range->values[upper + 1], &range->values[upper],
+                            (range->nbValues - upper) * sizeof(int));
+                    range->values[upper] = value;
+                    range->nbValues++;
+                }
+                break;
+            }
+        }
+    } else {
+        range->values = malloc(sizeof(int));
+        range->values[0] = value;
+        range->nbValues = 1;
+    }
+}
+
+/* return first value */
+static inline unsigned int alloc_range(RangeAllocator *range, int n,
+                unsigned int *values)
+{
+    int i, j;
+
+    if (range->nbValues == 0) {
+        range->nbValues = n;
+        range->values = malloc(n * sizeof(int));
+        for (i = 0; i < n; i++) {
+            range->values[i] = i + 1;
+            if (values)
+                values[i] = range->values[i];
+        }
+        return 1;
+    } else {
+        int lastValue = 1;
+
+        for (i = 0; i < range->nbValues; i++) {
+            if ((int) range->values[i] - (int) lastValue - 1 >= n) {
+                range->values =
+                    realloc(range->values,
+                            (range->nbValues + n) * sizeof(int));
+                memmove(&range->values[i + n], &range->values[i],
+                        (range->nbValues - i) * sizeof(int));
+                for (j = 0; j < n; j++) {
+                    range->values[i + j] = lastValue + 1 + j;
+                    if (values)
+                        values[j] = range->values[i + j];
+                }
+                range->nbValues += n;
+                break;
+            } else
+                lastValue = range->values[i];
+        }
+        if (i == range->nbValues) {
+            range->values =
+                realloc(range->values, (range->nbValues + n) * sizeof(int));
+            for (j = 0; j < n; j++) {
+                range->values[i + j] = lastValue + 1 + j;
+                if (values)
+                    values[j] = range->values[i + j];
+            }
+            range->nbValues += n;
+        }
+        return lastValue + 1;
+    }
+}
+
+static inline void delete_value(RangeAllocator *range, unsigned int value)
+{
+    if (value == 0)
+        return;
+    if (range->nbValues >= 1) {
+        int lower = 0;
+        int upper = range->nbValues - 1;
+
+        while (1) {
+            int mid = (lower + upper) / 2;
+
+            if (range->values[mid] > value)
+                upper = mid;
+            else if (range->values[mid] < value)
+                lower = mid;
+            else {
+                lower = upper = mid;
+            }
+            if (upper - lower <= 1) {
+                if (value == range->values[lower]) {
+                    memmove(&range->values[lower], &range->values[lower + 1],
+                            (range->nbValues - lower - 1) * sizeof(int));
+                    range->nbValues--;
+                } else if (value == range->values[upper]) {
+                    memmove(&range->values[upper], &range->values[upper + 1],
+                            (range->nbValues - upper - 1) * sizeof(int));
+                    range->nbValues--;
+                }
+                break;
+            }
+        }
+    }
+}
+
+static inline void delete_range(RangeAllocator *range, int n,
+                const unsigned int *values)
+{
+    int i;
+
+    for (i = 0; i < n; i++) {
+        delete_value(range, values[i]);
+    }
+}
+
+static inline void delete_consecutive_values(RangeAllocator *range,
+                unsigned int first, int n)
+{
+    int i;
+
+    for (i = 0; i < n; i++) {
+        delete_value(range, first + i);
+    }
+}
+
+
+/*****************************************************************/
+/*                                                               */
+/* CRC LOOKUP TABLE                                              */
+/* ================                                              */
+/* The following CRC lookup table was generated automagically    */
+/* by the Rocksoft^tm Model CRC Algorithm Table Generation       */
+/* Program V1.0 using the following model parameters:            */
+/*                                                               */
+/*    Width   : 4 bytes.                                         */
+/*    Poly    : 0x04C11DB7L                                      */
+/*    Reverse : TRUE.                                            */
+/*                                                               */
+/* For more information on the Rocksoft^tm Model CRC Algorithm,  */
+/* see the document titled "A Painless Guide to CRC Error        */
+/* Detection Algorithms" by Ross Williams                        */
+/* (ross@guest.adelaide.edu.au.). This document is likely to be  */
+/* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft".        */
+/*                                                               */
+/*****************************************************************/
+
+static const unsigned int crctable[256] = {
+    0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
+    0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
+    0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
+    0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
+    0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
+    0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
+    0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
+    0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
+    0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
+    0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
+    0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
+    0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
+    0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
+    0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
+    0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
+    0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
+    0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
+    0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
+    0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
+    0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
+    0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
+    0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
+    0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
+    0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
+    0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
+    0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
+    0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
+    0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
+    0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
+    0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
+    0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
+    0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
+    0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
+    0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
+    0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
+    0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
+    0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
+    0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
+    0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
+    0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
+    0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
+    0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
+    0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
+    0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
+    0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
+    0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
+    0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
+    0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
+    0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
+    0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
+    0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
+    0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
+    0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
+    0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
+    0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
+    0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
+    0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
+    0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
+    0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
+    0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
+    0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
+    0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
+    0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
+    0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
+};
+
+static unsigned int calc_checksum(const void *_ptr, int length,
+                                  unsigned int seed)
+{
+    int i;
+    unsigned int crc = seed;
+    unsigned char *ptr = (unsigned char *) _ptr;
+
+    if (ptr == NULL)
+        return -1;
+    for (i = 0; i < length; i++) {
+        crc = crctable[(crc ^ *ptr++) & 0xFF] ^ (crc >> 8);
+    }
+    return crc;
+}
+
+
+static inline void display_gl_call(FILE *f,
+                int func_number, arg_t *args, int *args_size)
+{
+    int i;
+
+    if (func_number < 0) {
+        fprintf(f, "unknown call : %d\n", func_number);
+        return;
+    }
+    Signature *signature = (Signature *) tab_opengl_calls[func_number];
+    int nb_args = signature->nb_args;
+    int *args_type = signature->args_type;
+
+    fprintf(f, "%s(", tab_opengl_calls_name[func_number]);
+
+    for (i = 0; i < nb_args; i++) {
+        switch (args_type[i]) {
+        case TYPE_UNSIGNED_CHAR:
+        case TYPE_CHAR:
+            {
+                fprintf(f, "%d", (char) args[i]);
+                break;
+            }
+
+        case TYPE_UNSIGNED_SHORT:
+        case TYPE_SHORT:
+            {
+                fprintf(f, "%d", (short) args[i]);
+                break;
+            }
+
+        case TYPE_UNSIGNED_INT:
+        case TYPE_INT:
+            {
+                fprintf(f, "%d", (int) args[i]);
+                break;
+            }
+
+        case TYPE_FLOAT:
+            fprintf(f, "%f", *(float *) &args[i]);
+            break;
+
+        case TYPE_DOUBLE:
+          CASE_IN_KNOWN_SIZE_POINTERS:
+        case TYPE_NULL_TERMINATED_STRING:
+          CASE_IN_UNKNOWN_SIZE_POINTERS:
+          CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
+            if (args_type[i] == TYPE_NULL_TERMINATED_STRING) {
+                fprintf(f, "\"%s\"", (char *) args[i]);
+            } else if (args_type[i] == TYPE_DOUBLE)
+                fprintf(f, "%f", *(double *) args[i]);
+            else if (IS_ARRAY_CHAR(args_type[i]) &&
+                     args_size[i] <= 4 * sizeof(char)) {
+                int j;
+                int n = args_size[i] / sizeof(char);
+
+                fprintf(f, "(");
+                for (j = 0; j < n; j++) {
+                    fprintf(f, "%d", ((unsigned char *) args[i])[j]);
+                    if (j != n - 1)
+                        fprintf(f, ", ");
+                }
+                fprintf(f, ")");
+            } else if (IS_ARRAY_SHORT(args_type[i]) &&
+                       args_size[i] <= 4 * sizeof(short)) {
+                int j;
+                int n = args_size[i] / sizeof(short);
+
+                fprintf(f, "(");
+                for (j = 0; j < n; j++) {
+                    fprintf(f, "%d", ((short *) args[i])[j]);
+                    if (j != n - 1)
+                        fprintf(f, ", ");
+                }
+                fprintf(f, ")");
+            } else if (IS_ARRAY_INT(args_type[i]) &&
+                       args_size[i] <= 4 * sizeof(int)) {
+                int j;
+                int n = args_size[i] / sizeof(int);
+
+                fprintf(f, "(");
+                for (j = 0; j < n; j++) {
+                    fprintf(f, "%d", ((int *) args[i])[j]);
+                    if (j != n - 1)
+                        fprintf(f, ", ");
+                }
+                fprintf(f, ")");
+            } else if (IS_ARRAY_FLOAT(args_type[i]) &&
+                       args_size[i] <= 4 * sizeof(float)) {
+                int j;
+                int n = args_size[i] / sizeof(float);
+
+                fprintf(f, "(");
+                for (j = 0; j < n; j++) {
+                    fprintf(f, "%f", ((float *) args[i])[j]);
+                    if (j != n - 1)
+                        fprintf(f, ", ");
+                }
+                fprintf(f, ")");
+            } else if (IS_ARRAY_DOUBLE(args_type[i]) &&
+                       args_size[i] <= 4 * sizeof(double)) {
+                int j;
+                int n = args_size[i] / sizeof(double);
+
+                fprintf(f, "(");
+                for (j = 0; j < n; j++) {
+                    fprintf(f, "%f", ((double *) args[i])[j]);
+                    if (j != n - 1)
+                        fprintf(f, ", ");
+                }
+                fprintf(f, ")");
+            } else {
+                fprintf(f, "%d bytes", args_size[i]);
+                fprintf(f, "(crc = 0x%x)",
+                        calc_checksum((void *) args[i], args_size[i],
+                                      0xFFFFFFFF));
+            }
+            break;
+
+          CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
+          CASE_OUT_UNKNOWN_SIZE_POINTERS:
+          CASE_OUT_KNOWN_SIZE_POINTERS:
+            {
+                fprintf(f, "%d bytes (OUT)", args_size[i]);
+                break;
+            }
+
+        case TYPE_IN_IGNORED_POINTER:
+            break;
+
+        default:
+            fprintf(f, "shouldn't happen : call %s arg %d\n",
+                    tab_opengl_calls_name[func_number], i);
+            return;
+            break;
+        }
+        if (i < nb_args - 1)
+            fprintf(f, ", ");
+    }
+    fprintf(f, ")\n");
+}
+
+#endif
Index: git/target-i386/parse_gl_h.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/parse_gl_h.c	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,1496 @@
+/*
+ *  Parse gl.h et glx.h to auto-generate source code
+ *
+ *  Copyright (c) 2006,2007 Even Rouault
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+/* gcc -g parse_gl_h.c -o parse_gl_h && ./parse_gl_h */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+int isExtByName(const char* name)
+{
+  return (strstr(name, "ARB") != NULL) ||
+         (strstr(name, "IBM") != NULL) ||
+         (strstr(name, "EXT") != NULL) ||
+         (strstr(name, "ATI") != NULL) ||
+         (strstr(name, "NV") != NULL) ||
+         (strstr(name, "MESA") != NULL) ||
+         (strstr(name, "APPLE") != NULL) ||
+         (strstr(name, "SUN") != NULL) ||
+         (strstr(name, "SGI") != NULL);
+}
+
+char* get_arg_type(char* s)
+{
+  while(*s == ' ' || *s == '\t') s++;
+  char* n = s;
+  char* c = strstr(n, "const");
+  if (c)
+    n += 6;
+
+  char* t = strstr(n, " ");
+  if (t)
+  {
+    if (t[1] == '*')
+      t += 2;
+    t[0] = 0;
+    char* ori = t;
+    t = strstr(t+1, "[");
+    if (t)
+    {
+      memmove(ori, t, strlen(t));
+      strstr(ori, "]")[1] = 0;
+    }
+  }
+  return strdup(s);
+}
+
+typedef struct
+{
+  char* type;
+  char* name;
+  int nargs;
+  char** args;
+  int ok;
+  int just_for_server_side;
+  int has_out_parameters;
+  int isExt;
+} FuncDesc;
+
+int isExt(FuncDesc* func)
+{
+  return func->isExt;
+}
+
+char* get_type_string(char* type)
+{
+  if (strstr(type, "[16]"))
+  {
+    if (strstr(type, "float"))
+      return ("TYPE_16FLOAT");
+    else if (strstr(type, "double"))
+      return ("TYPE_16DOUBLE");
+    else
+    {
+      printf("inconnu %s\n", type);
+      exit(-1);
+    }
+  }
+  else if (strstr(type, "[128]") && strstr(type, "GLubyte"))
+    return strstr(type, "const") ? "TYPE_128UCHAR" : "TYPE_OUT_128UCHAR";
+  else if (strstr(type, "const GLvoid *"))
+    return "TYPE_ARRAY_VOID";
+  else if (strstr(type, "const GLchar *") ||
+           strstr(type, "const GLcharARB *"))
+    return "TYPE_NULL_TERMINATED_STRING";
+  else if (strstr(type, "const GLbyte *"))
+    return "TYPE_ARRAY_SIGNED_CHAR";
+  else if (strstr(type, "const GLubyte *"))
+    return "TYPE_ARRAY_UNSIGNED_CHAR";
+  else if (strstr(type, "const GLshort *"))
+    return "TYPE_ARRAY_SHORT";
+  else if (strstr(type, "const GLushort *") ||
+           strstr(type, "const GLhalfNV *"))
+    return "TYPE_ARRAY_UNSIGNED_SHORT";
+  else if (strstr(type, "const GLint *"))
+    return "TYPE_ARRAY_INT";
+  else if (strstr(type, "const GLuint *") ||
+           strstr(type, "const GLenum *"))
+    return "TYPE_ARRAY_UNSIGNED_INT";
+  else if (strstr(type, "const GLfloat *") ||
+           strstr(type, "const GLclampf *"))
+    return "TYPE_ARRAY_FLOAT";
+  else if (strstr(type, "const GLdouble *"))
+    return "TYPE_ARRAY_DOUBLE";
+  else if (strstr(type, "GLvoid *"))
+    return "TYPE_OUT_ARRAY_VOID";
+  else if (strstr(type, "GLboolean *") ||
+           strstr(type, "GLubyte *"))
+    return "TYPE_OUT_ARRAY_UNSIGNED_CHAR";
+  else if (strstr(type, "GLcharARB *") ||
+           strstr(type, "GLchar *"))
+    return "TYPE_OUT_ARRAY_CHAR";
+  else if (strstr(type, "GLshort *"))
+    return "TYPE_OUT_ARRAY_SHORT";
+  else if (strstr(type, "GLushort *"))
+    return "TYPE_OUT_ARRAY_UNSIGNED_SHORT";
+  else if (strstr(type, "GLint *")||
+           strstr(type, "GLsizei *"))
+    return "TYPE_OUT_ARRAY_INT";
+  else if (strstr(type, "GLuint *") ||
+           strstr(type, "GLenum *") ||
+           strstr(type, "GLhandleARB *"))
+    return "TYPE_OUT_ARRAY_UNSIGNED_INT";
+  else if (strstr(type, "GLfloat *"))
+    return "TYPE_OUT_ARRAY_FLOAT";
+  else if (strstr(type, "GLdouble *"))
+    return "TYPE_OUT_ARRAY_DOUBLE";
+  else if (strcmp(type, "void") == 0)
+    return("TYPE_NONE");
+  else if (strcmp(type, "GLbyte") == 0)
+    return("TYPE_CHAR");
+  else if (strcmp(type, "GLubyte") == 0 ||
+           strcmp(type, "GLboolean") == 0)
+    return("TYPE_UNSIGNED_CHAR");
+  else if (strcmp(type, "GLshort") == 0)
+    return("TYPE_SHORT");
+  else if (strcmp(type, "GLushort") == 0 ||
+           strcmp(type, "GLhalfNV") == 0)
+    return("TYPE_UNSIGNED_SHORT");
+  else if (strcmp(type, "GLint") == 0 ||
+           strcmp(type, "GLsizei") == 0 ||
+           strcmp(type, "GLintptr") == 0 ||
+           strcmp(type, "GLsizeiptr") == 0 ||
+           strcmp(type, "GLintptrARB") == 0 ||
+           strcmp(type, "GLsizeiptrARB") == 0)
+    return("TYPE_INT");
+  else if (strcmp(type, "GLenum") == 0 ||
+           strcmp(type, "GLuint") == 0 ||
+           strcmp(type, "GLhandleARB") == 0 ||
+           strcmp(type, "GLbitfield") == 0)
+    return("TYPE_UNSIGNED_INT");
+  else if (strcmp(type, "GLfloat") == 0 ||
+           strcmp(type, "GLclampf") == 0)
+    return("TYPE_FLOAT");
+  else if (strcmp(type, "GLdouble") == 0 ||
+           strcmp(type, "GLclampd") == 0)
+    return("TYPE_DOUBLE");
+  else
+  {
+    printf("inconnu %s\n", type);
+    exit(-1);
+  }
+}
+
+typedef struct
+{
+  char* letter;
+  char* signature_type_name;
+  char* gl_c_type_name;
+  char* c_type_name;
+} ForIsKnownArgVector;
+
+#define N_ELEMENTS(x)  (sizeof(x)/sizeof(x[0]))
+#define N_FIELDS_IN_ARG_VECTOR  4
+
+
+typedef struct
+{
+  char* func_name;
+  char* signature_type_name;
+} KnownLastArgFunc;
+
+static KnownLastArgFunc knownLastArgFuncs[] =
+{
+{"glFogCoordfv", "TYPE_1FLOAT"},
+{"glFogCoorddv", "TYPE_1DOUBLE"},
+{"glFogCoordfvEXT", "TYPE_1FLOAT"},
+{"glFogCoorddvEXT", "TYPE_1DOUBLE"},
+{"glFogCoordhvNV", "TYPE_1USHORT"},
+
+{"glGetFenceivNV", "TYPE_OUT_1INT"},
+
+{"glGetTexLevelParameteriv", "TYPE_OUT_1INT" },
+{"glGetTexLevelParameterfv", "TYPE_OUT_1FLOAT" },
+
+{"glGetRenderbufferParameterivEXT", "TYPE_OUT_1INT"},
+{"glGetFramebufferAttachmentParameterivEXT", "TYPE_OUT_1INT"},
+{"glGetFinalCombinerInputParameterivNV", "TYPE_OUT_1INT"},
+{"glGetCombinerOutputParameterivNV", "TYPE_OUT_1INT"},
+{"glGetCombinerInputParameterivNV", "TYPE_OUT_1INT"},
+{"glGetOcclusionQueryivNV", "TYPE_OUT_1INT"},
+{"glGetOcclusionQueryuivNV", "TYPE_OUT_1UINT"},
+{"glGetObjectParameterivARB", "TYPE_OUT_1INT"},
+{"glGetQueryivARB", "TYPE_OUT_1INT"},
+{"glGetQueryiv", "TYPE_OUT_1INT"},
+{"glGetQueryObjectivARB", "TYPE_OUT_1INT"},
+{"glGetQueryObjectiv", "TYPE_OUT_1INT"},
+{"glGetQueryObjectuivARB", "TYPE_OUT_1UINT"},
+{"glGetQueryObjectuiv", "TYPE_OUT_1UINT"},
+{"glGetProgramivARB", "TYPE_OUT_1INT"},
+{"glGetProgramiv", "TYPE_OUT_1INT"},
+{"glGetProgramivNV", "TYPE_OUT_1INT"},
+{"glGetShaderiv", "TYPE_OUT_1INT"},
+
+{"glCombinerParameterfvNV", "TYPE_1FLOAT"},
+{"glCombinerParameterivNV", "TYPE_1INT"},
+
+{"glGetFinalCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
+{"glGetCombinerOutputParameterfvNV", "TYPE_OUT_1FLOAT"},
+{"glGetCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
+{"glGetObjectParameterfvARB", "TYPE_OUT_1FLOAT"},
+
+{"glCombinerStageParameterfvNV", "TYPE_4FLOAT"},
+{"glGetCombinerStageParameterfvNV", "TYPE_OUT_4FLOAT"},
+
+{"glTexBumpParameterivATI", "TYPE_1INT"},
+{"glTexBumpParameterfvATI", "TYPE_1FLOAT"},
+{"glGetTexBumpParameterivATI", "TYPE_OUT_1INT"},
+{"glGetTexBumpParameterfvATI", "TYPE_OUT_1FLOAT"},
+
+{"glGetProgramLocalParameterfvARB", "TYPE_OUT_4FLOAT"},
+{"glGetProgramLocalParameterdvARB", "TYPE_OUT_4DOUBLE"},
+{"glGetProgramEnvParameterfvARB", "TYPE_OUT_4FLOAT"},
+{"glGetProgramEnvParameterdvARB", "TYPE_OUT_4DOUBLE"},
+{"glGetProgramLocalParameterIivNV", "TYPE_OUT_1INT"},
+{"glGetProgramLocalParameterIuivNV", "TYPE_OUT_1UINT"},
+{"glGetProgramEnvParameterIivNV", "TYPE_OUT_1INT"},
+{"glGetProgramEnvParameterIuivNV", "TYPE_OUT_1UINT"},
+
+{"glGetProgramParameterfvNV", "TYPE_OUT_4FLOAT"},
+{"glGetProgramParameterdvNV", "TYPE_OUT_4DOUBLE"},
+{"glGetProgramNamedParameterfvNV", "TYPE_OUT_4FLOAT"},
+{"glGetProgramNamedParameterdvNV", "TYPE_OUT_4DOUBLE"},
+
+{"glCullParameterfvEXT", "TYPE_4FLOAT"},
+{"glCullParameterdvEXT", "TYPE_4DOUBLE"},
+
+{"glGetTrackMatrixivNV", "TYPE_OUT_1INT"},
+{"glExecuteProgramNV", "TYPE_4FLOAT"},
+
+{"glEdgeFlagv", "TYPE_1UCHAR"},
+
+{"glClipPlane", "TYPE_4DOUBLE"},
+{"glGetClipPlane", "TYPE_OUT_4DOUBLE"},
+
+{"glSetFragmentShaderConstantATI", "TYPE_4FLOAT"},
+
+{"glGetObjectBufferfvATI", "TYPE_OUT_1FLOAT"},
+{"glGetObjectBufferivATI", "TYPE_OUT_1INT"},
+{"glGetArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
+{"glGetArrayObjectivATI", "TYPE_OUT_1INT"},
+{"glGetVariantArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
+{"glGetVariantArrayObjectivATI", "TYPE_OUT_1INT"},
+{"glGetVertexAttribArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
+{"glGetVertexAttribArrayObjectivATI", "TYPE_OUT_1INT"},
+
+{"glPixelTransformParameterivEXT", "TYPE_1INT"},
+{"glPixelTransformParameterfvEXT", "TYPE_1FLOAT"},
+{"glGetPixelTransformParameterivEXT", "TYPE_OUT_1INT"},
+{"glGetPixelTransformParameterfvEXT", "TYPE_OUT_1FLOAT"},
+
+{"glColorTableParameterfv", "TYPE_4FLOAT"},
+{"glColorTableParameteriv", "TYPE_4INT"},
+{"glGetColorTableParameterfv", "TYPE_OUT_4FLOAT"},
+{"glGetColorTableParameteriv", "TYPE_OUT_4INT"},
+{"glColorTableParameterfvEXT", "TYPE_4FLOAT"},
+{"glColorTableParameterivEXT", "TYPE_4INT"},
+{"glGetColorTableParameterfvEXT", "TYPE_OUT_4FLOAT"},
+{"glGetColorTableParameterivEXT", "TYPE_OUT_4INT"},
+
+{"glGetMinmaxParameterfv", "TYPE_OUT_1FLOAT"},
+{"glGetMinmaxParameteriv", "TYPE_OUT_1INT"},
+{"glGetHistogramParameterfv", "TYPE_OUT_1FLOAT"},
+{"glGetHistogramParameteriv", "TYPE_OUT_1INT"},
+{"glGetMinmaxParameterfvEXT", "TYPE_OUT_1FLOAT"},
+{"glGetMinmaxParameterivEXT", "TYPE_OUT_1INT"},
+{"glGetHistogramParameterfvEXT", "TYPE_OUT_1FLOAT"},
+{"glGetHistogramParameterivEXT", "TYPE_OUT_1INT"},
+
+/* Not sure at all for the 2 followingo ones ! */
+{"glGetBooleanIndexedvEXT", "TYPE_OUT_4UCHAR"},
+{"glGetIntegerIndexedvEXT", "TYPE_OUT_4INT"},
+
+{"glReferencePlaneSGIX", "TYPE_4DOUBLE"},
+
+{"glGetTransformFeedbackVaryingNV", "TYPE_OUT_1INT"},
+
+};
+
+int is_known_arg_vector(FuncDesc* desc, char** p_signature_type_name, char** p_c_type_name)
+{
+  static ForIsKnownArgVector my_tab[] =
+  {
+    { "b", "CHAR", "GLbyte", "signed char" },
+    { "Boolean", "CHAR", "GLboolean", "unsigned char" },
+    { "s", "SHORT", "GLshort", "short" },
+    { "i", "INT", "GLint", "int" },
+    { "Integer", "INT", "GLint", "int" },
+    { "ub", "CHAR", "GLubyte", "unsigned char" },
+    { "h", "SHORT", "GLhalf", "unsigned short" },
+    { "us", "SHORT", "GLushort", "unsigned short" },
+    { "ui", "INT", "GLuint", "unsigned int" },
+    { "Nb", "CHAR", "GLbyte", "signed char" },
+    { "Ns", "SHORT", "GLshort", "short" },
+    { "Ni", "INT", "GLint", "int" },
+    { "Nub", "CHAR", "GLubyte", "unsigned char" },
+    { "Nus", "SHORT", "GLushort", "unsigned short" },
+    { "Nui", "INT", "GLuint", "unsigned int" },
+
+    { "f", "FLOAT", "GLfloat", "float" },
+    { "Float", "FLOAT", "GLfloat", "float" },
+    { "d", "DOUBLE", "GLdouble", "double" },
+  };
+
+  if (desc->nargs == 0)
+    return 0;
+
+  int i , j;
+
+  if (strstr(desc->name, "glVertexAttribs") ||
+      strstr(desc->name, "glProgramParameters") ||
+      strstr(desc->name, "glProgramEnvParameters") ||
+      strstr(desc->name, "glProgramLocalParameters") ||
+      (strstr(desc->name, "glUniform") && (strstr(desc->name, "iv") || strstr(desc->name, "fv"))))
+    return 0;
+
+  static char signatures[N_ELEMENTS(my_tab)][N_FIELDS_IN_ARG_VECTOR][20] = {0};
+  char signature[10];
+
+  for(i=0;i<N_ELEMENTS(knownLastArgFuncs);i++)
+  {
+    if (strcmp(desc->name, knownLastArgFuncs[i].func_name) == 0)
+    {
+      if (p_signature_type_name)
+      {
+        *p_signature_type_name = knownLastArgFuncs[i].signature_type_name;
+      }
+      if (p_c_type_name)
+      {
+        if (strstr(knownLastArgFuncs[i].signature_type_name, "FLOAT"))
+          *p_c_type_name = "float";
+        else if (strstr(knownLastArgFuncs[i].signature_type_name, "DOUBLE"))
+          *p_c_type_name = "double";
+        else if (strstr(knownLastArgFuncs[i].signature_type_name, "UINT"))
+          *p_c_type_name = "unsigned int";
+        else if (strstr(knownLastArgFuncs[i].signature_type_name, "INT"))
+          *p_c_type_name = "int";
+        else if (strstr(knownLastArgFuncs[i].signature_type_name, "USHORT"))
+          *p_c_type_name = "unsigned short";
+        else if (strstr(knownLastArgFuncs[i].signature_type_name, "SHORT"))
+          *p_c_type_name = "short";
+        else if (strstr(knownLastArgFuncs[i].signature_type_name, "UCHAR"))
+          *p_c_type_name = "unsigned char";
+        else if (strstr(knownLastArgFuncs[i].signature_type_name, "CHAR"))
+          *p_c_type_name = "char";
+        else
+          assert(0);
+      }
+      return 1;
+    }
+  }
+
+  for(i=0;i<N_ELEMENTS(my_tab);i++)
+  {
+    for(j=1;j<=N_FIELDS_IN_ARG_VECTOR;j++)
+    {
+      if (strstr(desc->name, "glIndex") && strstr(desc->name, "v"))
+        sprintf(signature, "%sv", my_tab[i].letter);
+      else
+        sprintf(signature, "%d%sv", j, my_tab[i].letter);
+      if (strstr(desc->name, signature) &&
+          strstr(desc->args[desc->nargs - 1], my_tab[i].gl_c_type_name) &&
+          strstr(desc->args[desc->nargs - 1], "*"))
+      {
+        if (p_signature_type_name)
+        {
+          if (signatures[i][j-1][0] == 0)
+            sprintf(signatures[i][j-1], "TYPE_%d%s", j, my_tab[i].signature_type_name);
+          *p_signature_type_name = signatures[i][j-1];
+        }
+        if (p_c_type_name) *p_c_type_name = my_tab[i].c_type_name;
+        return 1;
+      }
+    }
+  }
+  return 0;
+}
+
+static void print_server_side_argument(FILE* server_stub, int j, char* glType)
+{
+  const char* symbolic_type = get_type_string(glType);
+  if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
+    fprintf(server_stub, "ARG_TO_CHAR(args[%d])", j);
+  else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
+    fprintf(server_stub, "ARG_TO_UNSIGNED_CHAR(args[%d])", j);
+  else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
+    fprintf(server_stub, "ARG_TO_SHORT(args[%d])", j);
+  else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
+    fprintf(server_stub, "ARG_TO_UNSIGNED_SHORT(args[%d])", j);
+  else if (strcmp(symbolic_type, "TYPE_INT") == 0)
+    fprintf(server_stub, "ARG_TO_INT(args[%d])", j);
+  else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
+    fprintf(server_stub, "ARG_TO_UNSIGNED_INT(args[%d])", j);
+  else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
+    fprintf(server_stub, "ARG_TO_FLOAT(args[%d])", j);
+  else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
+    fprintf(server_stub, "(const float*)(args[%d])", j);
+  else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
+    fprintf(server_stub, "ARG_TO_DOUBLE(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
+    fprintf(server_stub, "(const double*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
+    fprintf(server_stub, "(unsigned char*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0)
+    fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_NULL_TERMINATED_STRING") == 0)
+    fprintf(server_stub, "(const char*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_ARRAY_SHORT") == 0)
+    fprintf(server_stub, "(const short*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_SHORT") == 0)
+    fprintf(server_stub, "(const unsigned short*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_ARRAY_INT") == 0)
+    fprintf(server_stub, "(const int*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_INT") == 0)
+    fprintf(server_stub, "(const unsigned int*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_ARRAY_FLOAT") == 0)
+    fprintf(server_stub, "(const float*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_ARRAY_DOUBLE") == 0)
+    fprintf(server_stub, "(const double*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_ARRAY_CHAR") == 0)
+    fprintf(server_stub, "(const char*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_ARRAY_SIGNED_CHAR") == 0)
+    fprintf(server_stub, "(const signed char*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_ARRAY_VOID") == 0)
+    fprintf(server_stub, "(const void*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_CHAR") == 0)
+    fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_SHORT") == 0)
+    fprintf(server_stub, "(short*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_SHORT") == 0)
+    fprintf(server_stub, "(unsigned short*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_INT") == 0)
+    fprintf(server_stub, "(int*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_INT") == 0)
+    fprintf(server_stub, "(unsigned int*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_FLOAT") == 0)
+    fprintf(server_stub, "(float*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_DOUBLE") == 0)
+    fprintf(server_stub, "(double*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_VOID") == 0)
+    fprintf(server_stub, "(void*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_CHAR") == 0)
+    fprintf(server_stub, "(char*)(args[%d])", j);
+  else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_CHAR") == 0)
+    fprintf(server_stub, "(unsigned char*)(args[%d])", j);
+
+  else
+  {
+    fprintf(stderr, "Unknown : %s\n", symbolic_type);
+    assert(0);
+  }
+}
+
+static const char* func_dealt_by_hand[500] = { NULL };
+
+
+static const char* ignore_func[] =
+{
+  "glGetPointerv",
+  "glRectdv",
+  "glRectfv",
+  "glRectiv",
+  "glRectsv",
+  "glMultiDrawArrays",
+  "glMultiDrawArraysEXT",
+  "glMultiDrawElements",
+  "glMultiDrawElementsEXT",
+  "glUnmapBuffer",
+  "glUnmapBufferARB",
+  "glLoadTransposeMatrixf",
+  "glLoadTransposeMatrixd",
+  "glMultTransposeMatrixf",
+  "glMultTransposeMatrixd",
+  "glLoadTransposeMatrixfARB",
+  "glLoadTransposeMatrixdARB",
+  "glMultTransposeMatrixfARB",
+  "glMultTransposeMatrixdARB",
+
+  "glPixelDataRangeNV",
+  "glFlushPixelDataRangeNV",
+  "glVertexArrayRangeNV",
+  "glFlushVertexArrayRangeNV",
+  "glVertexWeightfEXT",
+
+  "glGetBufferPointerv",
+  "glGetBufferPointervARB",
+  "glGetVertexAttribPointerv",
+  "glGetVertexAttribPointervARB",
+  "glVertexAttribPointer",
+  "glVertexAttribPointerARB",
+  "glGetVariantPointervEXT",
+  NULL,
+};
+
+void get_func_dealt_by_hand()
+{
+  FILE* f = fopen("../target-i386/gl_func_perso.h", "r");
+  char buffer[256];
+  int i = 0;
+  char* c;
+  while(fgets(buffer, 256, f))
+  {
+    if (strstr(buffer, "MAGIC_MACRO("))
+    {
+      func_dealt_by_hand[i] = strdup(strstr(buffer, "MAGIC_MACRO(") + strlen("MAGIC_MACRO("));
+      * strstr(func_dealt_by_hand[i], ")") = 0;
+      c = strstr(func_dealt_by_hand[i], "_");
+      if (c && c != func_dealt_by_hand[i]) *c = 0;
+      i ++;
+    }
+  }
+  fclose(f);
+
+  int j = 0;
+  while(ignore_func[j])
+  {
+    func_dealt_by_hand[i] = ignore_func[j];
+    i++;
+    j++;
+  }
+}
+
+static const char* just_for_server_side_list[] =
+{
+  "glEnableClientState",
+  "glDisableClientState",
+  "glPushClientAttrib",
+  "glPopClientAttrib",
+  "glPixelStorei",
+  "glPixelStoref",
+  "glClientActiveTexture",
+  "glClientActiveTextureARB",
+  "glEnableVertexAttribArray",
+  "glEnableVertexAttribArrayARB",
+  "glDisableVertexAttribArray",
+  "glDisableVertexAttribArrayARB",
+  "glDrawElementArrayATI",
+  "glDrawRangeElementArrayATI",
+  "glGenSymbolsEXT",
+  "glFreeObjectBufferATI",
+  "glUnmapObjectBufferATI",
+  "glLockArraysEXT",
+  "glUnlockArraysEXT",
+  "glDepthFunc",
+  "glFogf",
+  "glFogi",
+  "glClipPlane",
+  "glGetClipPlane",
+
+/* begin of openquartz optimization */
+#if 1
+  "glMatrixMode",
+  "glOrtho",
+  "glFrustum",
+  "glPushMatrix",
+  "glPopMatrix",
+  "glLoadIdentity",
+  "glLoadMatrixd",
+  "glLoadMatrixf",
+  "glMultMatrixd",
+  "glMultMatrixf",
+  "glRotated",
+  "glRotatef",
+  "glScaled",
+  "glScalef",
+  "glTranslated",
+  "glTranslatef",
+#endif
+/* end of openquartz optimization */
+
+  "glGetError",
+  "glActiveTextureARB",
+
+  "glViewport",
+  "glScissor",
+
+  "glBindBufferARB",
+  "glDeleteBuffersARB",
+  "glGenBuffersARB",
+  "glBufferDataARB",
+  "glBufferSubDataARB",
+  "glGetBufferSubDataARB",
+  "glGetBufferParameterivARB",
+  "glBindBuffer",
+  "glDeleteBuffers",
+  "glGenBuffers",
+  "glBufferData",
+  "glBufferSubData",
+  "glGetBufferSubData",
+  "glGetBufferParameteriv",
+
+  "glPushAttrib",
+  "glPopAttrib",
+  "glEnable",
+  "glDisable",
+  "glIsEnabled",
+  "glBindTexture",
+  "glBindTextureEXT",
+  "glFogfv",
+  "glFogiv",
+  "glBitmap",
+  "glGetTexImage",
+  "glReadPixels",
+  "glDrawPixels",
+  "glSelectBuffer",
+  "glFeedbackBuffer",
+
+  "glTexImage1D",
+  "glTexImage2D",
+  "glTexImage3D",
+  "glTexSubImage1D",
+  "glTexSubImage2D",
+  "glTexSubImage3D",
+
+  "glTexImage3DEXT",
+  "glTexSubImage1DEXT",
+  "glTexSubImage2DEXT",
+  "glTexSubImage3DEXT",
+
+  "glGetCompressedTexImage",
+  "glCompressedTexImage1D",
+  "glCompressedTexImage2D",
+  "glCompressedTexImage3D",
+  "glCompressedTexSubImage1D",
+  "glCompressedTexSubImage2D",
+  "glCompressedTexSubImage3D",
+
+  "glGetCompressedTexImageARB",
+  "glCompressedTexImage1DARB",
+  "glCompressedTexImage2DARB",
+  "glCompressedTexImage3DARB",
+  "glCompressedTexSubImage1DARB",
+  "glCompressedTexSubImage2DARB",
+  "glCompressedTexSubImage3DARB",
+
+  "glCallLists",
+  "glNewList",
+  "glDeleteLists",
+  "glGenLists",
+
+  "glGenTextures",
+  "glDeleteTextures",
+  "glDeleteTexturesEXT",
+  "glMap1f",
+  "glMap1d",
+  "glMap2f",
+  "glMap2d",
+  "glGetMapdv",
+  "glGetMapfv",
+  "glGetMapiv",
+  "glGetBooleanv",
+  "glGetIntegerv",
+  "glGetFloatv",
+  "glGetDoublev",
+
+  "glGetPixelMapfv",
+  "glGetPixelMapuiv",
+  "glGetPixelMapusv",
+  "glGetProgramStringARB",
+  "glGetProgramStringNV",
+  "glArrayElement",
+  "glDrawArrays",
+  "glDrawElements",
+  "glDrawRangeElements",
+  "glDrawRangeElementsEXT",
+  "glGetProgramInfoLog",
+  "glGetTexLevelParameteriv",
+  "glGetInfoLogARB",
+  "glGetShaderInfoLog",
+  "glGetAttachedObjectsARB",
+  "glGetAttachedShaders",
+  "glGetActiveUniformARB",
+  "glGetActiveUniform",
+  "glGetUniformLocationARB",
+  "glGetUniformLocation",
+  "glGetUniformfvARB",
+  "glGetUniformfv",
+  "glGetUniformivARB",
+  "glGetUniformiv",
+  "glGetUniformuivEXT",
+  "glGetShaderSourceARB",
+  "glGetShaderSource",
+  "glGetActiveAttribARB",
+  "glGetActiveAttrib",
+  "glGetAttribLocationARB",
+  "glGetAttribLocation",
+
+  "glNewObjectBufferATI",
+  "glUpdateObjectBufferATI",
+
+  "glSetLocalConstantEXT",
+  "glSetInvariantEXT",
+  "glVariantbvEXT",
+  "glVariantsvEXT",
+  "glVariantivEXT",
+  "glVariantfvEXT",
+  "glVariantdvEXT",
+  "glVariantubvEXT",
+  "glVariantusvEXT",
+  "glVariantuivEXT",
+  "glGetVariantBooleanvEXT",
+  "glGetVariantIntegervEXT",
+  "glGetVariantFloatvEXT",
+  "glGetInvariantBooleanvEXT",
+  "glGetInvariantIntegervEXT",
+  "glGetInvariantFloatvEXT",
+  "glGetLocalConstantBooleanvEXT",
+  "glGetLocalConstantIntegervEXT",
+  "glGetLocalConstantFloatvEXT",
+
+  "glMatrixIndexubvARB",
+  "glMatrixIndexusvARB",
+  "glMatrixIndexuivARB",
+
+  "glColorTable",
+  "glColorSubTable",
+  "glGetColorTable",
+  "glConvolutionFilter1D",
+  "glConvolutionFilter2D",
+  "glGetConvolutionFilter",
+  "glSeparableFilter2D",
+  "glGetSeparableFilter",
+  "glGetHistogram",
+  "glGetMinmax",
+  "glColorTableEXT",
+  "glColorSubTableEXT",
+  "glGetColorTableEXT",
+  "glConvolutionFilter1DEXT",
+  "glConvolutionFilter2DEXT",
+  "glGetConvolutionFilterEXT",
+  "glSeparableFilter2DEXT",
+  "glGetSeparableFilterEXT",
+  "glGetHistogramEXT",
+  "glGetMinmaxEXT",
+
+  "glGetTexParameterfv",
+
+  "glGetVertexAttribivARB",
+  "glGetVertexAttribfvARB",
+  "glGetVertexAttribdvARB",
+  "glGetVertexAttribiv",
+  "glGetVertexAttribfv",
+  "glGetVertexAttribdv",
+
+  "glGetDetailTexFuncSGIS",
+  "glGetSharpenTexFuncSGIS",
+
+  "fake_gluBuild2DMipmaps",
+
+  "glRenderMode",
+
+  "glEnableVariantClientStateEXT",
+  "glDisableVariantClientStateEXT",
+
+  "glGetActiveVaryingNV",
+
+  NULL,
+};
+
+static int just_for_server_side_func(char* funcname)
+{
+  int i;
+  for(i=0;just_for_server_side_list[i];i++)
+  {
+    if (strcmp(just_for_server_side_list[i], funcname) == 0)
+      return 1;
+  }
+  return 0;
+}
+
+int parse(FILE* f, FuncDesc* funcDesc, int funcDescCount, int ignoreEXT)
+{
+  char buffer[256];
+  while(fgets(buffer, 256, f))
+  {
+
+    if (strncmp(buffer, "GLAPI", 5) == 0 && strstr(buffer, "APIENTRY") && strstr(buffer, "("))
+    {
+      int i = 0;
+      int skip = 0;
+      if (func_dealt_by_hand[0] == 0)
+      {
+        get_func_dealt_by_hand();
+      }
+      while (func_dealt_by_hand[i])
+      {
+        if (strstr(buffer, func_dealt_by_hand[i]))
+        {
+          skip = 1;
+          break;
+        }
+        i++;
+      }
+      if (skip)
+        continue;
+
+      char** args = malloc(15 * sizeof(char*));
+      int narg = 0;
+      char* type = buffer + 6;
+      char* n = strstr(type, "GLAPIENTRY") ? strstr(type, "GLAPIENTRY") : strstr(type, "APIENTRY");
+      int skip_length = strstr(type, "GLAPIENTRY") ? 11 : 9;
+      n[-1] = 0;
+      type = strdup(type);
+      n += skip_length;
+      char* fonc = n;
+      n = strstr(n, "(");
+      if (n[-1] == ' ') n[-1] = 0;
+      n[0] = 0;
+      fonc = strdup(fonc);
+      /*if (strstr(fonc, "glLockArraysEXT") || strstr(fonc, "glUnlockArraysEXT"))
+      {
+      }
+      else*/
+
+
+      if (ignoreEXT == 1 && isExtByName(fonc))
+      {
+        free(type);
+        free(fonc);
+        continue;
+      }
+      n++;
+      while(1)
+      {
+        char* virg = strstr(n, ",");
+        if (virg)
+        {
+          args[narg] = n;
+          virg[0] = 0;
+          args[narg] = get_arg_type(args[narg]);
+          narg++;
+          n = virg+1;
+        }
+        else
+          break;
+      }
+      while (strstr(n, ")") == 0)
+      {
+        fgets(buffer, 256, f);
+        n = buffer;
+        while(1)
+        {
+          char* virg = strstr(n, ",");
+          if (virg)
+          {
+            args[narg] = n;
+            virg[0] = 0;
+            args[narg] = get_arg_type(args[narg]);
+            narg++;
+            n = virg+1;
+          }
+          else
+            break;
+        }
+      }
+      char* par = strstr(n, ")");
+      args[narg] = n;
+      par[0] = 0;
+      args[narg] = get_arg_type(args[narg]);
+      narg++;
+
+
+      /*printf("%s %s (", type, fonc);
+      for(i=0;i<narg;i++)
+      {
+      printf("%s,", args[i]);
+    }
+      printf(")\n");*/
+
+      for(i=0;i<funcDescCount;i++)
+      {
+        if (strcmp(funcDesc[i].name, fonc) == 0)
+        {
+          if (ignoreEXT == 0)
+            funcDesc[i].isExt = 1;
+          break;
+        }
+      }
+      if (i == funcDescCount)
+      {
+        funcDesc[funcDescCount].type = type;
+        funcDesc[funcDescCount].name = fonc;
+        funcDesc[funcDescCount].nargs = narg;
+        funcDesc[funcDescCount].args = args;
+        funcDesc[funcDescCount].isExt = ignoreEXT == 0;
+        funcDescCount++;
+      }
+      else
+      {
+        free(fonc);
+        free(args);
+        free(type);
+      }
+      /*
+      for(i=0;i<narg;i++)
+      {
+      free(args[i]);
+    }
+      free(fonc);
+      free(type);*/
+    }
+  }
+  return funcDescCount;
+}
+
+typedef struct
+{
+  char* str;
+  int i;
+} StringIntStruct;
+
+StringIntStruct argDependingOnPreviousArgTab[] =
+{
+  { "glLoadProgramNV", 3},
+  { "ProgramNamedParameter", 2},
+  { "glDeleteBuffers", 1},
+  { "glDrawBuffers", 1},
+  { "glGenPrograms", 1},
+  { "glDeletePrograms", 1},
+  { "glGenQueries", 1},
+  { "glDeleteQueries", 1},
+  { "glGenFencesNV", 1},
+  { "glDeleteFencesNV", 1},
+  { "glGenOcclusionQueriesNV", 1},
+  { "glDeleteOcclusionQueriesNV", 1},
+  { "glRequestResidentProgramsNV", 1},
+  { "glDeleteTextures", 1},
+  { "glGenFramebuffersEXT", 1},
+  { "glDeleteFramebuffersEXT", 1},
+  { "glGenRenderbuffersEXT", 1},
+  { "glDeleteRenderbuffersEXT", 1},
+  { "glUniform1fv", 2},
+  { "glUniform2fv", 2},
+  { "glUniform3fv", 2},
+  { "glUniform4fv", 2},
+  { "glUniform1iv", 2},
+  { "glUniform2iv", 2},
+  { "glUniform3iv", 2},
+  { "glUniform4iv", 2},
+  { "glUniform1uivEXT", 2},
+  { "glUniform2uivEXT", 2},
+  { "glUniform3uivEXT", 2},
+  { "glUniform4uivEXT", 2},
+  { "glProgramParameters4fvNV", 3},
+  { "glProgramParameters4dvNV", 3},
+  { "glProgramLocalParameters4fvEXT", 3},
+  { "glProgramLocalParametersI4ivNV", 3},
+  { "glProgramLocalParametersI4uivNV", 3},
+  { "glProgramEnvParameters4fvEXT", 3},
+  { "glProgramEnvParametersI4ivNV", 3},
+  { "glProgramEnvParametersI4uivNV", 3},
+  { "glAreProgramsResidentNV", 1} ,
+  { "glAreProgramsResidentNV", 2} ,
+  { "glAreTexturesResident", 1} ,
+  { "glAreTexturesResident", 2} ,
+  { "glPrioritizeTextures", 1} ,
+  { "glPrioritizeTextures", 2} ,
+  { "glProgramStringARB", 3} ,
+
+  { "glVertexAttribs", 2},
+
+  { "glUniformMatrix", 3 },
+
+  { "glGetVertexAttribfv", 2},
+  { "glGetVertexAttribiv", 2},
+  { "glGetVertexAttribdv", 2},
+  { "glGetVertexAttribIivEXT", 2},
+  { "glGetVertexAttribIuivEXT", 2},
+
+  { "glPointParameterfv", 1},
+  { "glPointParameteriv", 1},
+
+  { "glWeightbvARB", 1},
+  { "glWeightsvARB", 1},
+  { "glWeightivARB", 1},
+  { "glWeightfvARB", 1},
+  { "glWeightdvARB", 1},
+  { "glWeightubvARB", 1},
+  { "glWeightusvARB", 1},
+  { "glWeightuivARB", 1},
+
+  { "glTexEnvfv", 2},
+  { "glTexEnviv", 2},
+  { "glGetTexEnvfv", 2},
+  { "glGetTexEnviv", 2},
+  { "glTexGendv", 2},
+  { "glTexGenfv", 2},
+  { "glTexGeniv", 2},
+  { "glGetTexGendv", 2},
+  { "glGetTexGenfv", 2},
+  { "glGetTexGeniv", 2},
+
+  { "glLightfv", 2},
+  { "glLightiv", 2},
+  { "glGetLightfv", 2},
+  { "glGetLightiv", 2},
+  { "glFragmentLightfvSGIX", 2},
+  { "glFragmentLightivSGIX", 2},
+  { "glGetFragmentLightfvSGIX", 2},
+  { "glGetFragmentLightivSGIX", 2},
+
+
+  { "glLightModelfv", 1},
+  { "glLightModeliv", 1},
+  { "glFragmentLightModelfvSGIX", 1},
+  { "glFragmentLightModelivSGIX", 1},
+
+  { "glMaterialfv", 2},
+  { "glMaterialiv", 2},
+  { "glGetMaterialfv", 2},
+  { "glGetMaterialiv", 2},
+  { "glFragmentMaterialfvSGIX", 2},
+  { "glFragmentMaterialivSGIX", 2},
+  { "glGetFragmentMaterialfvSGIX", 2},
+  { "glGetFragmentMaterialivSGIX", 2},
+
+  { "glFogiv", 1},
+  { "glFogfv", 1},
+
+  { "glTexParameterfv", 2},
+  { "glTexParameteriv", 2},
+  { "glGetTexParameterfv", 2},
+  { "glGetTexParameteriv", 2},
+
+  { "glTexParameterIivEXT", 2},
+  { "glTexParameterIuivEXT", 2},
+  { "glGetTexParameterIivEXT", 2},
+  { "glGetTexParameterIuivEXT", 2},
+
+  { "glPixelMapfv", 2},
+  { "glPixelMapuiv", 2},
+  { "glPixelMapusv", 2},
+
+  { "glDetailTexFuncSGIS", 2 },
+  { "glSharpenTexFuncSGIS", 2 },
+
+  { "glSpriteParameterfvSGIX", 1 },
+  { "glSpriteParameterivSGIX", 1 },
+
+  { "ConvolutionParameter", 2},
+
+  { "glProgramBufferParametersfvNV", 4},
+  { "glProgramBufferParametersIivNV", 4},
+  { "glProgramBufferParametersIuivNV", 4},
+
+  { "glTransformFeedbackAttribsNV", 1},
+  { "glTransformFeedbackVaryingsNV", 2},
+};
+
+int is_arg_of_length_depending_on_previous_args(FuncDesc* funcDesc, int j)
+{
+  int i;
+  if (strstr(funcDesc->args[j], "*") == NULL)
+    return 0;
+  for(i=0;i< N_ELEMENTS(argDependingOnPreviousArgTab); i++)
+  {
+    if (strstr(funcDesc->name, argDependingOnPreviousArgTab[i].str) && j == argDependingOnPreviousArgTab[i].i)
+      return 1;
+  }
+  return 0;
+}
+
+static void fprintf_prototype_args(FILE* f, FuncDesc* funcDesc)
+{
+  int j;
+  for(j=0;j<funcDesc->nargs;j++)
+  {
+    if (j != 0) fprintf(f,", ");
+    if (strstr(funcDesc->args[j], "[16]"))
+    {
+      if (strstr(funcDesc->args[j], "float"))
+      {
+        fprintf(f, "const GLfloat arg_%d[16]", j);
+      }
+      else if (strstr(funcDesc->args[j], "double"))
+      {
+        fprintf(f, "const GLdouble arg_%d[16]", j);
+      }
+      else
+      {
+        exit(-1);
+      }
+    }
+    else if (strstr(funcDesc->args[j], "[128]") && strstr(funcDesc->args[j], "GLubyte"))
+      fprintf(f, (strstr(funcDesc->args[j], "const")) ? "const GLubyte* arg_%d" : "GLubyte* arg_%d", j);
+    else
+      fprintf(f, "%s arg_%d", funcDesc->args[j], j);
+  }
+}
+
+int main(int argc, char* argv[])
+{
+  FuncDesc funcDesc[3000];
+  int funcDescCount = 0;
+  FILE* f;
+
+  f = fopen("../target-i386/mesa_gl.h", "r");
+  assert(f);
+  /*if (!f)
+    f = fopen("/usr/include/GL/gl.h", "r");*/
+  funcDescCount = parse(f, funcDesc, 0, 1);
+  fclose(f);
+
+  f = fopen("../target-i386/mesa_glext.h", "r");
+  assert(f);
+  /*if (!f)
+    f = fopen("/usr/include/GL/glext.h", "r");*/
+  funcDescCount = parse(f, funcDesc, funcDescCount, 0);
+  fclose(f);
+
+  FILE* header = fopen("gl_func.h", "w");
+  FILE* client_stub = fopen("client_stub.c", "w");
+  FILE* server_stub = fopen("server_stub.c", "w");
+
+  fprintf(header, "/* This is a generated file. DO NOT EDIT ! */\n\n");
+  fprintf(header, "#define COMPOSE(x,y) x##y\n");
+  fprintf(header, "#define MAGIC_MACRO(x)  COMPOSE(x,_func)\n");
+  fprintf(header, "enum {\n"
+                  "#include \"gl_func_perso.h\"\n");
+
+  fprintf(client_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
+
+  fprintf(server_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
+
+  int i;
+  for(i=0;i<funcDescCount;i++)
+  {
+    funcDesc[i].ok = 0;
+    char* name = funcDesc[i].name;
+    char* type = funcDesc[i].type;
+    if ((strcmp(type, "void") == 0 || strcmp(type, "GLboolean") == 0 ||
+         strcmp(type, "GLuint") == 0 || strcmp(type, "GLint") == 0 ||
+         strcmp(type, "GLenum") == 0) || strcmp(type, "GLhandleARB") == 0 ||
+         strcmp(type, "GLhalf") == 0 || strcmp(type, "GLhalfNV") == 0)
+    {
+      int pointer_of_unknown_size = 0;
+      int j;
+
+      if (funcDesc[i].nargs == 1 && strcmp(funcDesc[i].args[0], "void") == 0)
+      {
+        funcDesc[i].nargs = 0;
+      }
+      for(j=0;j<funcDesc[i].nargs-1;j++)
+      {
+        if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
+            strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
+            strstr(funcDesc[i].args[j], "[16]") == NULL)
+        {
+          pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
+          pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
+        }
+      }
+
+      if (pointer_of_unknown_size == 0)
+      {
+        char* signature_type_name;
+        if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
+        {
+          if (strstr(signature_type_name, "TYPE_OUT"))
+            funcDesc[i].has_out_parameters = 1;
+        }
+        else
+        {
+          if (funcDesc[i].nargs-1 >= 0)
+          {
+            j = funcDesc[i].nargs-1;
+            if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
+                strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
+                strstr(funcDesc[i].args[j], "[16]") == NULL)
+            {
+              pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
+              pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
+            }
+          }
+        }
+      }
+      if (pointer_of_unknown_size && funcDesc[i].nargs == 1)
+      {
+        if (strstr(funcDesc[i].name, "Matrixf") || strstr(funcDesc[i].name, "Matrixd"))
+        {
+          free(funcDesc[i].args[0]);
+          if (strstr(funcDesc[i].name, "Matrixf"))
+            funcDesc[i].args[0] = strdup("GLfloat m[16]");
+          else
+            funcDesc[i].args[0] = strdup("GLdouble m[16]");
+          pointer_of_unknown_size = 0;
+        }
+        else if (strcmp(funcDesc[i].name, "glPolygonStipple") == 0)
+        {
+          free(funcDesc[i].args[0]);
+          funcDesc[i].args[0] = strdup("const GLubyte mask[128]");
+          pointer_of_unknown_size = 0;
+        }
+        else if (strcmp(funcDesc[i].name, "glGetPolygonStipple") == 0)
+        {
+          free(funcDesc[i].args[0]);
+          funcDesc[i].args[0] = strdup("GLubyte mask[128]");
+          funcDesc[i].has_out_parameters = 1;
+          pointer_of_unknown_size = 0;
+        }
+      }
+      if (just_for_server_side_func(name) || pointer_of_unknown_size == 0)
+      {
+        fprintf(header, "  %s_func,\n", funcDesc[i].name);
+        funcDesc[i].ok = 1;
+        if (just_for_server_side_func(name))
+          funcDesc[i].just_for_server_side = 1;
+        for(j=0;j<funcDesc[i].nargs;j++)
+        {
+          if (strstr(get_type_string(funcDesc[i].args[j]), "OUT"))
+            funcDesc[i].has_out_parameters = 1;
+        }
+      }
+      else
+      {
+        fprintf(stderr, "not handled either manually or automatically : %s\n", funcDesc[i].name);
+      }
+    }
+  }
+
+  fprintf(header, "  GL_N_CALLS\n};\n");
+
+
+  fprintf(server_stub, "void execute_func(int func_number, arg_t *args, int *pret_int, char *pret_char)\n");
+  fprintf(server_stub, "{\n");
+  fprintf(server_stub, "  switch(func_number)\n");
+  fprintf(server_stub, "  {\n");
+
+
+  for(i=0;i<funcDescCount;i++)
+  {
+    if (funcDesc[i].ok)
+    {
+      fprintf(header, "static const int %s_signature[] = { %s, %d, ",
+              funcDesc[i].name,
+              get_type_string(funcDesc[i].type),
+              funcDesc[i].has_out_parameters);
+      fprintf(header, "%d", funcDesc[i].nargs);
+      int j;
+      char* signature_type_name;
+      int n_args_to_check = is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL) ? funcDesc[i].nargs - 1 : funcDesc[i].nargs;
+
+      for(j=0;j<n_args_to_check;j++)
+      {
+        if (is_arg_of_length_depending_on_previous_args(&funcDesc[i], j))
+        {
+          fprintf(header, ", %s_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS", get_type_string(funcDesc[i].args[j]));
+        }
+        else
+          fprintf(header, ", %s", get_type_string(funcDesc[i].args[j]));
+      }
+
+      if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
+      {
+        fprintf(header, ", %s", signature_type_name);
+      }
+      fprintf(header, "};\n");
+
+
+      if (funcDesc[i].just_for_server_side == 0)
+      {
+        if (isExt(&funcDesc[i]))
+          fprintf(client_stub, "GLAPI %s APIENTRY EXT_FUNC(%s) (", funcDesc[i].type, funcDesc[i].name);
+        else
+          fprintf(client_stub, "GLAPI %s APIENTRY %s(", funcDesc[i].type, funcDesc[i].name);
+        fprintf_prototype_args(client_stub, &funcDesc[i]);
+        fprintf(client_stub, ")\n");
+        fprintf(client_stub, "{\n");
+        if (strcmp(funcDesc[i].type, "void") != 0)
+        {
+          fprintf(client_stub, "  %s ret;\n", funcDesc[i].type);
+          if (isExt(&funcDesc[i]))
+            fprintf(client_stub, "  CHECK_PROC_WITH_RET(%s);\n", funcDesc[i].name);
+        }
+        else
+        {
+          if (isExt(&funcDesc[i]))
+            fprintf(client_stub, "  CHECK_PROC(%s);\n", funcDesc[i].name);
+        }
+
+        /*
+        fprintf(client_stub, "  do_opengl_call(%s_func, %s",
+                funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret");
+        for(j=0;j<funcDesc[i].nargs;j++)
+        {
+          fprintf(client_stub, ", arg_%d", j);
+        }
+        fprintf(client_stub, ");\n");
+        */
+
+        if (funcDesc[i].nargs)
+        {
+          fprintf(client_stub, "  long args[] = { ");
+          for(j=0;j<funcDesc[i].nargs;j++)
+          {
+            if (j > 0) fprintf(client_stub, ", ");
+            if (strstr(funcDesc[i].args[j], "*"))
+            {
+              fprintf(client_stub, "POINTER_TO_ARG(arg_%d)", j);
+            }
+            else
+            {
+              const char* symbolic_type = get_type_string(funcDesc[i].args[j]);
+              if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
+                fprintf(client_stub, "CHAR_TO_ARG");
+              else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
+                fprintf(client_stub, "UNSIGNED_CHAR_TO_ARG");
+              else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
+                fprintf(client_stub, "SHORT_TO_ARG");
+              else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
+                fprintf(client_stub, "UNSIGNED_SHORT_TO_ARG");
+              else if (strcmp(symbolic_type, "TYPE_INT") == 0)
+                fprintf(client_stub, "INT_TO_ARG");
+              else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
+                fprintf(client_stub, "UNSIGNED_INT_TO_ARG");
+              else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
+                fprintf(client_stub, "FLOAT_TO_ARG");
+              else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
+                fprintf(client_stub, "POINTER_TO_ARG");
+              else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
+                fprintf(client_stub, "DOUBLE_TO_ARG");
+              else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
+                fprintf(client_stub, "POINTER_TO_ARG");
+              else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0 || strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
+                fprintf(client_stub, "POINTER_TO_ARG");
+              else
+              {
+                fprintf(stderr, "Unknown : %s\n", symbolic_type);
+                assert(0);
+              }
+              fprintf(client_stub, "(arg_%d)", j);
+            }
+          }
+          fprintf(client_stub, "};\n");
+        }
+
+        fprintf(client_stub, "  do_opengl_call(%s_func, %s, %s, NULL);\n",
+                funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret",
+                (funcDesc[i].nargs) ? "args" : "NULL");
+
+        if (strcmp(funcDesc[i].type, "void") != 0)
+        {
+          fprintf(client_stub, "  return ret;\n");
+        }
+        fprintf(client_stub, "}\n\n");
+      }
+
+      fprintf(server_stub, "    case %s_func:\n", funcDesc[i].name);
+      fprintf(server_stub, "    {\n");
+
+      if (isExt(&funcDesc[i]))
+      {
+        fprintf(server_stub, "      GET_EXT_PTR(%s, %s, (", funcDesc[i].type, funcDesc[i].name);
+        fprintf_prototype_args(server_stub, &funcDesc[i]);
+        fprintf(server_stub, "));\n");
+      }
+
+      fprintf(server_stub, "      ");
+
+      if (strcmp(funcDesc[i].type, "void") == 0)
+        ;
+      else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_INT") == 0 ||
+               strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_INT") == 0)
+        fprintf(server_stub, "*pret_int = ");
+      else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_CHAR") == 0 ||
+               strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_CHAR") == 0)
+        fprintf(server_stub, "*pret_char = ");
+      else
+      {
+        fprintf(stderr, "unknown ret type = %s\n", get_type_string(funcDesc[i].type));
+        exit(-1);
+      }
+      /*if (strstr(funcDesc[i].name, "EXT"))
+      {
+        char* dup = strdup(funcDesc[i].name);
+        *strstr(dup, "EXT") = 0;
+        fprintf(server_stub, "%s(", dup);
+        free(dup);
+      }
+      else*/
+      {
+        if (isExt(&funcDesc[i]))
+          fprintf(server_stub, "ptr_func_%s(", funcDesc[i].name);
+        else
+          fprintf(server_stub, "%s(", funcDesc[i].name);
+      }
+      char* c_type_name;
+      if (is_known_arg_vector(&funcDesc[i], NULL, &c_type_name))
+      {
+        for(j=0;j<funcDesc[i].nargs - 1;j++)
+        {
+          if (j != 0) fprintf(server_stub,", ");
+          print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
+        }
+        if (j != 0) fprintf(server_stub,", ");
+        if (strstr(funcDesc[i].args[funcDesc[i].nargs - 1], "const"))
+          fprintf(server_stub, "(const %s*)args[%d]", c_type_name, j);
+        else
+          fprintf(server_stub, "(%s*)args[%d]", c_type_name, j);
+      }
+      else
+      {
+        for(j=0;j<funcDesc[i].nargs;j++)
+        {
+          if (j != 0) fprintf(server_stub,", ");
+          print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
+        }
+      }
+      fprintf(server_stub, ");\n");
+
+      fprintf(server_stub, "      break;\n");
+      fprintf(server_stub, "    }\n");
+    }
+  }
+
+  fprintf(server_stub, "    default:\n");
+  fprintf(server_stub, "      fprintf(stderr, \"unknown=%%d\", func_number);\n");
+  fprintf(server_stub, "      break;\n");
+  fprintf(server_stub, "  }\n");
+  fprintf(server_stub, "}\n");
+
+  fprintf(header, "#undef MAGIC_MACRO\n");
+  fprintf(header, "#define MAGIC_MACRO(x)  COMPOSE(x,_signature)\n");
+  fprintf(header, "static const int* tab_opengl_calls[GL_N_CALLS] =\n");
+  fprintf(header, "{\n");
+  fprintf(header, "#include \"gl_func_perso.h\"\n");
+  for(i=0;i<funcDescCount;i++)
+  {
+    if (funcDesc[i].ok)
+    {
+      fprintf(header, "  %s_signature,\n", funcDesc[i].name);
+    }
+  }
+  fprintf(header, "};\n\n");
+
+  fprintf(header, "#undef MAGIC_MACRO\n");
+  fprintf(header, "#define MAGIC_MACRO(x)  #x\n");
+  fprintf(header, "static const char* tab_opengl_calls_name[GL_N_CALLS] =\n");
+  fprintf(header, "{\n");
+  fprintf(header, "#include \"gl_func_perso.h\"\n");
+  for(i=0;i<funcDescCount;i++)
+  {
+    if (funcDesc[i].ok)
+    {
+      fprintf(header, "  \"%s\",\n", funcDesc[i].name);
+    }
+  }
+  fprintf(header, "};\n\n");
+
+  fclose(header);
+  fclose(server_stub);
+  fclose(client_stub);
+
+  return 0;
+}
Index: git/target-i386/parse_mesa_get_c.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/target-i386/parse_mesa_get_c.c	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,225 @@
+/*
+ *  Parse the "get.c" from mesa source tree to generate "glgetv_cst.h"
+ *
+ *  Copyright (c) 2007 Even Rouault
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+// gcc -Wall parse_mesa_get_c.c -o parse_mesa_get_c -I. && ./parse_mesa_get_c
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include "mesa_gl.h"
+#include "mesa_glext.h"
+
+/* #include "mesa_enums.c" */
+
+int gl_lookup_enum_by_name(const char* name)
+{
+  FILE* f;
+  char buffer[256];
+  char template1[256];
+  char template2[256];
+  int i;
+  sprintf(template1, "#define %s\t", name);
+  sprintf(template2, "#define %s ", name);
+  for(i=0;i<2;i++)
+  {
+    if (i == 0)
+      f = fopen("mesa_gl.h", "r");
+    else
+      f = fopen("mesa_glext.h", "r");
+    while(fgets(buffer, 256, f))
+    {
+      if (strstr(buffer, template1) || strstr(buffer, template2))
+      {
+        char* c = strstr(buffer, "0x");
+        assert(c);
+        int ret;
+        ret = strtol(c, NULL, 16);
+        return ret;
+      }
+    }
+    fclose(f);
+  }
+
+  return -1;
+}
+
+typedef struct
+{
+  int value;
+  char* name;
+  int nb_elts;
+} Token;
+
+int compare_func(Token* a, Token* b)
+{
+  return a->value - b->value;
+}
+
+typedef struct
+{
+  int i;
+  char* str;
+} Cpl;
+#define CPL(x) {x, #x}
+
+Cpl constantsOneVal[] =
+{
+  CPL(GL_MAX_GENERAL_COMBINERS_NV),
+  CPL(GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT),
+  CPL(GL_MAX_VERTEX_SHADER_VARIANTS_EXT),
+  CPL(GL_MAX_VERTEX_SHADER_INVARIANTS_EXT),
+  CPL(GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
+  CPL(GL_MAX_VERTEX_SHADER_LOCALS_EXT),
+  CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT),
+  CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT),
+  CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT),
+  CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
+  CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
+};
+#define NB_CONSTANTS_ONE_VAL  11
+
+int main(int argc, char* argv[])
+{
+  FILE* f = fopen("mesa_get.c", "r");
+  char buffer[256];
+  int state = 0;
+  char name[256];
+  int count = 0;
+  char template[256];
+  Token tokens[1000];
+  int ntoken = 0;
+  int i;
+  FILE* outf = fopen("glgetv_cst.h", "w");
+
+  fprintf(outf, "/* This is a generated file. Do not edit !*/\n");
+  fprintf(outf, "typedef struct {\n");
+  fprintf(outf, "  GLuint count;\n");
+  fprintf(outf, "  GLenum token;\n");
+  fprintf(outf, "  const char *name;\n");
+  fprintf(outf, "} GlGetConstant ;\n");
+  fprintf(outf, "static const GlGetConstant gl_get_constants[] = {\n");
+
+  while(fgets(buffer, 256, f))
+  {
+    if (strstr(buffer, "_mesa_GetBooleanv"))
+    {
+      state = 1;
+    }
+    else if (state == 1)
+    {
+      if (strstr(buffer, "_mesa_GetFloatv"))
+      {
+        break;
+      }
+      else if (strstr(buffer, "case GL_"))
+      {
+        strcpy(name, strstr(buffer, "case GL_") + 5);
+        *strstr(name, ":") = 0;
+        count = 0;
+        strcpy(template, "params[0]");
+      }
+      else if (strstr(buffer, template))
+      {
+        count ++;
+        sprintf(template, "params[%d]", count);
+      }
+      else if (strstr(buffer, "break"))
+      {
+        if (count > 0)
+        {
+          int gl_lookup = gl_lookup_enum_by_name(name);
+          /*
+          int mesa_lookup = _mesa_lookup_enum_by_name(name);
+          if (mesa_lookup != -1)
+          {
+            if(mesa_lookup != gl_lookup)
+            {
+              fprintf(stderr, "wrong : %s %d %d !\n", name, mesa_lookup, gl_lookup);
+              exit(-1);
+            }
+          }*/
+          if (gl_lookup == -1)
+          {
+            fprintf(stderr, "not found in includes : %s\n", name);
+            //fprintf(outf, "/*  { %d, unknown value, \"%s\" },*/\n", count, name);
+          }
+          else
+          {
+            //fprintf(outf, "  { %d, 0x%04x, \"%s\" },\n", count, gl_lookup, name);
+            tokens[ntoken].value = gl_lookup;
+            tokens[ntoken].nb_elts = count;
+            tokens[ntoken].name = strdup(name);
+            ntoken++;
+          }
+          /*fprintf(outf, "#ifdef %s\n", name);
+          fprintf(outf, "  { %d, MAKE_TOKEN_NAME(%s) },\n", count, name);
+          fprintf(outf, "#endif\n");*/
+        }
+        else
+          fprintf(stderr, "not recognized : %s\n", name);
+      }
+    }
+  }
+
+  for(i=0;i<NB_CONSTANTS_ONE_VAL;i++)
+  {
+    tokens[ntoken].value = constantsOneVal[i].i;
+    tokens[ntoken].nb_elts = 1;
+    tokens[ntoken].name = strdup(constantsOneVal[i].str);
+    ntoken++;
+  }
+
+  tokens[ntoken].value = GL_SPRITE_MODE_SGIX;
+  tokens[ntoken].nb_elts = 1;
+  tokens[ntoken].name = strdup("GL_SPRITE_MODE_SGIX");
+  ntoken++;
+
+  tokens[ntoken].value = GL_SPRITE_AXIS_SGIX ;
+  tokens[ntoken].nb_elts = 3;
+  tokens[ntoken].name = strdup("GL_SPRITE_AXIS_SGIX ");
+  ntoken++;
+
+  tokens[ntoken].value = GL_SPRITE_TRANSLATION_SGIX;
+  tokens[ntoken].nb_elts = 3;
+  tokens[ntoken].name = strdup("GL_SPRITE_TRANSLATION_SGIX");
+  ntoken++;
+
+  tokens[ntoken].value = GL_REFERENCE_PLANE_EQUATION_SGIX;
+  tokens[ntoken].nb_elts = 4;
+  tokens[ntoken].name = strdup("GL_REFERENCE_PLANE_EQUATION_SGIX");
+  ntoken++;
+
+
+  qsort(tokens, ntoken, sizeof(Token), compare_func);
+  for(i=0;i<ntoken;i++)
+  {
+    fprintf(outf, "  { %d, 0x%04x, \"%s\" },\n", tokens[i].nb_elts, tokens[i].value, tokens[i].name);
+  }
+  fprintf(outf, "};\n");
+  fclose(f);
+  fclose(outf);
+  return 0;
+}
Index: git/target-i386/translate.c
===================================================================
--- git.orig/target-i386/translate.c	2009-05-23 11:22:16.000000000 +0100
+++ git/target-i386/translate.c	2009-05-23 11:22:17.000000000 +0100
@@ -2592,11 +2592,18 @@
     s->is_jmp = 3;
 }
 
+int enable_gl = 0;
+
 /* an interrupt is different from an exception because of the
    privilege checks */
 static void gen_interrupt(DisasContext *s, int intno,
                           target_ulong cur_eip, target_ulong next_eip)
 {
+    if (enable_gl && intno == 0x99) {
+        gen_helper_opengl();
+        return;
+    }
+
     if (s->cc_op != CC_OP_DYNAMIC)
         gen_op_set_cc_op(s->cc_op);
     gen_jmp_im(cur_eip);
Index: git/vl.c
===================================================================
--- git.orig/vl.c	2009-05-23 11:22:16.000000000 +0100
+++ git/vl.c	2009-05-23 11:23:18.000000000 +0100
@@ -253,6 +253,7 @@
 #endif
 int nb_drives_opt;
 struct drive_opt drives_opt[MAX_DRIVES];
+extern int enable_gl;
 
 static CPUState *cur_cpu;
 static CPUState *next_cpu;
@@ -4214,6 +4215,7 @@
     QEMU_OPTION_show_cursor,
     QEMU_OPTION_semihosting,
     QEMU_OPTION_old_param,
+    QEMU_OPTION_enable_gl,
     QEMU_OPTION_tb_size,
     QEMU_OPTION_incoming,
     QEMU_OPTION_chroot,
@@ -4345,6 +4347,7 @@
     { "old-param", 0, QEMU_OPTION_old_param },
 #endif
     { "tb-size", HAS_ARG, QEMU_OPTION_tb_size },
+    { "enable-gl", 0, QEMU_OPTION_enable_gl },
     { "incoming", HAS_ARG, QEMU_OPTION_incoming },
     { "chroot", HAS_ARG, QEMU_OPTION_chroot },
     { "runas", HAS_ARG, QEMU_OPTION_runas },
@@ -5261,6 +5264,11 @@
                     }
                 }
                 break;
+#ifdef TARGET_OPENGL_OK
+            case QEMU_OPTION_enable_gl:
+                enable_gl = 1;
+                break;
+#endif
             case QEMU_OPTION_tb_size:
                 tb_size = strtol(optarg, NULL, 0);
                 if (tb_size < 0)
Index: git/hw/opengl_dummy.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ git/hw/opengl_dummy.c	2009-05-23 11:22:17.000000000 +0100
@@ -0,0 +1,9 @@
+#include "../qemu-common.h"
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window)
+{
+	return;
+}