summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/bindings/d/funcs.d
blob: 71f9e51be5632a7a732fcb41becb18355eb47a4d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
/*
 *
 * AUTO GENERATED! DO NOT EDIT!
 *
 */

module bindbc.bgfx.funcs;

private import bindbc.bgfx.types;

extern(C) @nogc nothrow:

version(BindBgfx_Static)
{
	/**
	 * Init attachment.
	 * Params:
	 * _handle = Render target texture handle.
	 * _access = Access. See `Access::Enum`.
	 * _layer = Cubemap side or depth layer/slice.
	 * _mip = Mip level.
	 * _resolve = Resolve flags. See: `BGFX_RESOLVE_*`
	 */
	void bgfx_attachment_init(bgfx_attachment_t* _this, bgfx_texture_handle_t _handle, bgfx_access_t _access, ushort _layer, ushort _mip, byte _resolve);
	
	/**
	 * Start VertexLayout.
	 */
	bgfx_vertex_layout_t* bgfx_vertex_layout_begin(bgfx_vertex_layout_t* _this, bgfx_renderer_type_t _rendererType);
	
	/**
	 * Add attribute to VertexLayout.
	 * Remarks: Must be called between begin/end.
	 * Params:
	 * _attrib = Attribute semantics. See: `bgfx::Attrib`
	 * _num = Number of elements 1, 2, 3 or 4.
	 * _type = Element type.
	 * _normalized = When using fixed point AttribType (f.e. Uint8)
	 * value will be normalized for vertex shader usage. When normalized
	 * is set to true, AttribType::Uint8 value in range 0-255 will be
	 * in range 0.0-1.0 in vertex shader.
	 * _asInt = Packaging rule for vertexPack, vertexUnpack, and
	 * vertexConvert for AttribType::Uint8 and AttribType::Int16.
	 * Unpacking code must be implemented inside vertex shader.
	 */
	bgfx_vertex_layout_t* bgfx_vertex_layout_add(bgfx_vertex_layout_t* _this, bgfx_attrib_t _attrib, byte _num, bgfx_attrib_type_t _type, bool _normalized, bool _asInt);
	
	/**
	 * Decode attribute.
	 * Params:
	 * _attrib = Attribute semantics. See: `bgfx::Attrib`
	 * _num = Number of elements.
	 * _type = Element type.
	 * _normalized = Attribute is normalized.
	 * _asInt = Attribute is packed as int.
	 */
	void bgfx_vertex_layout_decode(const(bgfx_vertex_layout_t)* _this, bgfx_attrib_t _attrib, byte* _num, bgfx_attrib_type_t* _type, bool* _normalized, bool* _asInt);
	
	/**
	 * Returns true if VertexLayout contains attribute.
	 * Params:
	 * _attrib = Attribute semantics. See: `bgfx::Attrib`
	 */
	bool bgfx_vertex_layout_has(const(bgfx_vertex_layout_t)* _this, bgfx_attrib_t _attrib);
	
	/**
	 * Skip `_num` bytes in vertex stream.
	 */
	bgfx_vertex_layout_t* bgfx_vertex_layout_skip(bgfx_vertex_layout_t* _this, byte _num);
	
	/**
	 * End VertexLayout.
	 */
	void bgfx_vertex_layout_end(bgfx_vertex_layout_t* _this);
	
	/**
	 * Pack vertex attribute into vertex stream format.
	 * Params:
	 * _input = Value to be packed into vertex stream.
	 * _inputNormalized = `true` if input value is already normalized.
	 * _attr = Attribute to pack.
	 * _layout = Vertex stream layout.
	 * _data = Destination vertex stream where data will be packed.
	 * _index = Vertex index that will be modified.
	 */
	void bgfx_vertex_pack(const float[4] _input, bool _inputNormalized, bgfx_attrib_t _attr, const(bgfx_vertex_layout_t)* _layout, void* _data, uint _index);
	
	/**
	 * Unpack vertex attribute from vertex stream format.
	 * Params:
	 * _output = Result of unpacking.
	 * _attr = Attribute to unpack.
	 * _layout = Vertex stream layout.
	 * _data = Source vertex stream from where data will be unpacked.
	 * _index = Vertex index that will be unpacked.
	 */
	void bgfx_vertex_unpack(float[4] _output, bgfx_attrib_t _attr, const(bgfx_vertex_layout_t)* _layout, const(void)* _data, uint _index);
	
	/**
	 * Converts vertex stream data from one vertex stream format to another.
	 * Params:
	 * _dstLayout = Destination vertex stream layout.
	 * _dstData = Destination vertex stream.
	 * _srcLayout = Source vertex stream layout.
	 * _srcData = Source vertex stream data.
	 * _num = Number of vertices to convert from source to destination.
	 */
	void bgfx_vertex_convert(const(bgfx_vertex_layout_t)* _dstLayout, void* _dstData, const(bgfx_vertex_layout_t)* _srcLayout, const(void)* _srcData, uint _num);
	
	/**
	 * Weld vertices.
	 * Params:
	 * _output = Welded vertices remapping table. The size of buffer
	 * must be the same as number of vertices.
	 * _layout = Vertex stream layout.
	 * _data = Vertex stream.
	 * _num = Number of vertices in vertex stream.
	 * _epsilon = Error tolerance for vertex position comparison.
	 */
	ushort bgfx_weld_vertices(ushort* _output, const(bgfx_vertex_layout_t)* _layout, const(void)* _data, ushort _num, float _epsilon);
	
	/**
	 * Convert index buffer for use with different primitive topologies.
	 * Params:
	 * _conversion = Conversion type, see `TopologyConvert::Enum`.
	 * _dst = Destination index buffer. If this argument is NULL
	 * function will return number of indices after conversion.
	 * _dstSize = Destination index buffer in bytes. It must be
	 * large enough to contain output indices. If destination size is
	 * insufficient index buffer will be truncated.
	 * _indices = Source indices.
	 * _numIndices = Number of input indices.
	 * _index32 = Set to `true` if input indices are 32-bit.
	 */
	uint bgfx_topology_convert(bgfx_topology_convert_t _conversion, void* _dst, uint _dstSize, const(void)* _indices, uint _numIndices, bool _index32);
	
	/**
	 * Sort indices.
	 * Params:
	 * _sort = Sort order, see `TopologySort::Enum`.
	 * _dst = Destination index buffer.
	 * _dstSize = Destination index buffer in bytes. It must be
	 * large enough to contain output indices. If destination size is
	 * insufficient index buffer will be truncated.
	 * _dir = Direction (vector must be normalized).
	 * _pos = Position.
	 * _vertices = Pointer to first vertex represented as
	 * float x, y, z. Must contain at least number of vertices
	 * referencende by index buffer.
	 * _stride = Vertex stride.
	 * _indices = Source indices.
	 * _numIndices = Number of input indices.
	 * _index32 = Set to `true` if input indices are 32-bit.
	 */
	void bgfx_topology_sort_tri_list(bgfx_topology_sort_t _sort, void* _dst, uint _dstSize, const float[3] _dir, const float[3] _pos, const(void)* _vertices, uint _stride, const(void)* _indices, uint _numIndices, bool _index32);
	
	/**
	 * Returns supported backend API renderers.
	 * Params:
	 * _max = Maximum number of elements in _enum array.
	 * _enum = Array where supported renderers will be written.
	 */
	byte bgfx_get_supported_renderers(byte _max, bgfx_renderer_type_t* _enum);
	
	/**
	 * Returns name of renderer.
	 * Params:
	 * _type = Renderer backend type. See: `bgfx::RendererType`
	 */
	const(char)* bgfx_get_renderer_name(bgfx_renderer_type_t _type);
	
	void bgfx_init_ctor(bgfx_init_t* _init);
	
	/**
	 * Initialize bgfx library.
	 * Params:
	 * _init = Initialization parameters. See: `bgfx::Init` for more info.
	 */
	bool bgfx_init(const(bgfx_init_t)* _init);
	
	/**
	 * Shutdown bgfx library.
	 */
	void bgfx_shutdown();
	
	/**
	 * Reset graphic settings and back-buffer size.
	 * Attention: This call doesn't actually change window size, it just
	 *   resizes back-buffer. Windowing code has to change window size.
	 * Params:
	 * _width = Back-buffer width.
	 * _height = Back-buffer height.
	 * _flags = See: `BGFX_RESET_*` for more info.
	 *   - `BGFX_RESET_NONE` - No reset flags.
	 *   - `BGFX_RESET_FULLSCREEN` - Not supported yet.
	 *   - `BGFX_RESET_MSAA_X[2/4/8/16]` - Enable 2, 4, 8 or 16 x MSAA.
	 *   - `BGFX_RESET_VSYNC` - Enable V-Sync.
	 *   - `BGFX_RESET_MAXANISOTROPY` - Turn on/off max anisotropy.
	 *   - `BGFX_RESET_CAPTURE` - Begin screen capture.
	 *   - `BGFX_RESET_FLUSH_AFTER_RENDER` - Flush rendering after submitting to GPU.
	 *   - `BGFX_RESET_FLIP_AFTER_RENDER` - This flag  specifies where flip
	 *     occurs. Default behavior is that flip occurs before rendering new
	 *     frame. This flag only has effect when `BGFX_CONFIG_MULTITHREADED=0`.
	 *   - `BGFX_RESET_SRGB_BACKBUFFER` - Enable sRGB backbuffer.
	 * _format = Texture format. See: `TextureFormat::Enum`.
	 */
	void bgfx_reset(uint _width, uint _height, uint _flags, bgfx_texture_format_t _format);
	
	/**
	 * Advance to next frame. When using multithreaded renderer, this call
	 * just swaps internal buffers, kicks render thread, and returns. In
	 * singlethreaded renderer this call does frame rendering.
	 * Params:
	 * _capture = Capture frame with graphics debugger.
	 */
	uint bgfx_frame(bool _capture);
	
	/**
	 * Returns current renderer backend API type.
	 * Remarks:
	 *   Library must be initialized.
	 */
	bgfx_renderer_type_t bgfx_get_renderer_type();
	
	/**
	 * Returns renderer capabilities.
	 * Remarks:
	 *   Library must be initialized.
	 */
	const(bgfx_caps_t)* bgfx_get_caps();
	
	/**
	 * Returns performance counters.
	 * Attention: Pointer returned is valid until `bgfx::frame` is called.
	 */
	const(bgfx_stats_t)* bgfx_get_stats();
	
	/**
	 * Allocate buffer to pass to bgfx calls. Data will be freed inside bgfx.
	 * Params:
	 * _size = Size to allocate.
	 */
	const(bgfx_memory_t)* bgfx_alloc(uint _size);
	
	/**
	 * Allocate buffer and copy data into it. Data will be freed inside bgfx.
	 * Params:
	 * _data = Pointer to data to be copied.
	 * _size = Size of data to be copied.
	 */
	const(bgfx_memory_t)* bgfx_copy(const(void)* _data, uint _size);
	
	/**
	 * Make reference to data to pass to bgfx. Unlike `bgfx::alloc`, this call
	 * doesn't allocate memory for data. It just copies the _data pointer. You
	 * can pass `ReleaseFn` function pointer to release this memory after it's
	 * consumed, otherwise you must make sure _data is available for at least 2
	 * `bgfx::frame` calls. `ReleaseFn` function must be able to be called
	 * from any thread.
	 * Attention: Data passed must be available for at least 2 `bgfx::frame` calls.
	 * Params:
	 * _data = Pointer to data.
	 * _size = Size of data.
	 */
	const(bgfx_memory_t)* bgfx_make_ref(const(void)* _data, uint _size);
	
	/**
	 * Make reference to data to pass to bgfx. Unlike `bgfx::alloc`, this call
	 * doesn't allocate memory for data. It just copies the _data pointer. You
	 * can pass `ReleaseFn` function pointer to release this memory after it's
	 * consumed, otherwise you must make sure _data is available for at least 2
	 * `bgfx::frame` calls. `ReleaseFn` function must be able to be called
	 * from any thread.
	 * Attention: Data passed must be available for at least 2 `bgfx::frame` calls.
	 * Params:
	 * _data = Pointer to data.
	 * _size = Size of data.
	 * _releaseFn = Callback function to release memory after use.
	 * _userData = User data to be passed to callback function.
	 */
	const(bgfx_memory_t)* bgfx_make_ref_release(const(void)* _data, uint _size, void* _releaseFn, void* _userData);
	
	/**
	 * Set debug flags.
	 * Params:
	 * _debug = Available flags:
	 *   - `BGFX_DEBUG_IFH` - Infinitely fast hardware. When this flag is set
	 *     all rendering calls will be skipped. This is useful when profiling
	 *     to quickly assess potential bottlenecks between CPU and GPU.
	 *   - `BGFX_DEBUG_PROFILER` - Enable profiler.
	 *   - `BGFX_DEBUG_STATS` - Display internal statistics.
	 *   - `BGFX_DEBUG_TEXT` - Display debug text.
	 *   - `BGFX_DEBUG_WIREFRAME` - Wireframe rendering. All rendering
	 *     primitives will be rendered as lines.
	 */
	void bgfx_set_debug(uint _debug);
	
	/**
	 * Clear internal debug text buffer.
	 * Params:
	 * _attr = Background color.
	 * _small = Default 8x16 or 8x8 font.
	 */
	void bgfx_dbg_text_clear(byte _attr, bool _small);
	
	/**
	 * Print formatted data to internal debug text character-buffer (VGA-compatible text mode).
	 * Params:
	 * _x = Position x from the left corner of the window.
	 * _y = Position y from the top corner of the window.
	 * _attr = Color palette. Where top 4-bits represent index of background, and bottom
	 * 4-bits represent foreground color from standard VGA text palette (ANSI escape codes).
	 * _format = `printf` style format.
	 */
	void bgfx_dbg_text_printf(ushort _x, ushort _y, byte _attr, const(char)* _format, ... );
	
	/**
	 * Print formatted data from variable argument list to internal debug text character-buffer (VGA-compatible text mode).
	 * Params:
	 * _x = Position x from the left corner of the window.
	 * _y = Position y from the top corner of the window.
	 * _attr = Color palette. Where top 4-bits represent index of background, and bottom
	 * 4-bits represent foreground color from standard VGA text palette (ANSI escape codes).
	 * _format = `printf` style format.
	 * _argList = Variable arguments list for format string.
	 */
	void bgfx_dbg_text_vprintf(ushort _x, ushort _y, byte _attr, const(char)* _format, va_list _argList);
	
	/**
	 * Draw image into internal debug text buffer.
	 * Params:
	 * _x = Position x from the left corner of the window.
	 * _y = Position y from the top corner of the window.
	 * _width = Image width.
	 * _height = Image height.
	 * _data = Raw image data (character/attribute raw encoding).
	 * _pitch = Image pitch in bytes.
	 */
	void bgfx_dbg_text_image(ushort _x, ushort _y, ushort _width, ushort _height, const(void)* _data, ushort _pitch);
	
	/**
	 * Create static index buffer.
	 * Params:
	 * _mem = Index buffer data.
	 * _flags = Buffer creation flags.
	 *   - `BGFX_BUFFER_NONE` - No flags.
	 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
	 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
	 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
	 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
	 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
	 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
	 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
	 *       buffers.
	 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
	 *       index buffers.
	 */
	bgfx_index_buffer_handle_t bgfx_create_index_buffer(const(bgfx_memory_t)* _mem, ushort _flags);
	
	/**
	 * Set static index buffer debug name.
	 * Params:
	 * _handle = Static index buffer handle.
	 * _name = Static index buffer name.
	 * _len = Static index buffer name length (if length is INT32_MAX, it's expected
	 * that _name is zero terminated string.
	 */
	void bgfx_set_index_buffer_name(bgfx_index_buffer_handle_t _handle, const(char)* _name, int _len);
	
	/**
	 * Destroy static index buffer.
	 * Params:
	 * _handle = Static index buffer handle.
	 */
	void bgfx_destroy_index_buffer(bgfx_index_buffer_handle_t _handle);
	
	/**
	 * Create vertex layout.
	 * Params:
	 * _layout = Vertex layout.
	 */
	bgfx_vertex_layout_handle_t bgfx_create_vertex_layout(const(bgfx_vertex_layout_t)* _layout);
	
	/**
	 * Destroy vertex layout.
	 * Params:
	 * _layoutHandle = Vertex layout handle.
	 */
	void bgfx_destroy_vertex_layout(bgfx_vertex_layout_handle_t _layoutHandle);
	
	/**
	 * Create static vertex buffer.
	 * Params:
	 * _mem = Vertex buffer data.
	 * _layout = Vertex layout.
	 * _flags = Buffer creation flags.
	 *  - `BGFX_BUFFER_NONE` - No flags.
	 *  - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
	 *  - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
	 *      is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
	 *  - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
	 *  - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
	 *      data is passed. If this flag is not specified, and more data is passed on update, the buffer
	 *      will be trimmed to fit the existing buffer size. This flag has effect only on dynamic buffers.
	 *  - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on index buffers.
	 */
	bgfx_vertex_buffer_handle_t bgfx_create_vertex_buffer(const(bgfx_memory_t)* _mem, const(bgfx_vertex_layout_t)* _layout, ushort _flags);
	
	/**
	 * Set static vertex buffer debug name.
	 * Params:
	 * _handle = Static vertex buffer handle.
	 * _name = Static vertex buffer name.
	 * _len = Static vertex buffer name length (if length is INT32_MAX, it's expected
	 * that _name is zero terminated string.
	 */
	void bgfx_set_vertex_buffer_name(bgfx_vertex_buffer_handle_t _handle, const(char)* _name, int _len);
	
	/**
	 * Destroy static vertex buffer.
	 * Params:
	 * _handle = Static vertex buffer handle.
	 */
	void bgfx_destroy_vertex_buffer(bgfx_vertex_buffer_handle_t _handle);
	
	/**
	 * Create empty dynamic index buffer.
	 * Params:
	 * _num = Number of indices.
	 * _flags = Buffer creation flags.
	 *   - `BGFX_BUFFER_NONE` - No flags.
	 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
	 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
	 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
	 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
	 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
	 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
	 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
	 *       buffers.
	 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
	 *       index buffers.
	 */
	bgfx_dynamic_index_buffer_handle_t bgfx_create_dynamic_index_buffer(uint _num, ushort _flags);
	
	/**
	 * Create dynamic index buffer and initialized it.
	 * Params:
	 * _mem = Index buffer data.
	 * _flags = Buffer creation flags.
	 *   - `BGFX_BUFFER_NONE` - No flags.
	 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
	 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
	 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
	 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
	 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
	 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
	 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
	 *       buffers.
	 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
	 *       index buffers.
	 */
	bgfx_dynamic_index_buffer_handle_t bgfx_create_dynamic_index_buffer_mem(const(bgfx_memory_t)* _mem, ushort _flags);
	
	/**
	 * Update dynamic index buffer.
	 * Params:
	 * _handle = Dynamic index buffer handle.
	 * _startIndex = Start index.
	 * _mem = Index buffer data.
	 */
	void bgfx_update_dynamic_index_buffer(bgfx_dynamic_index_buffer_handle_t _handle, uint _startIndex, const(bgfx_memory_t)* _mem);
	
	/**
	 * Destroy dynamic index buffer.
	 * Params:
	 * _handle = Dynamic index buffer handle.
	 */
	void bgfx_destroy_dynamic_index_buffer(bgfx_dynamic_index_buffer_handle_t _handle);
	
	/**
	 * Create empty dynamic vertex buffer.
	 * Params:
	 * _num = Number of vertices.
	 * _layout = Vertex layout.
	 * _flags = Buffer creation flags.
	 *   - `BGFX_BUFFER_NONE` - No flags.
	 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
	 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
	 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
	 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
	 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
	 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
	 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
	 *       buffers.
	 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
	 *       index buffers.
	 */
	bgfx_dynamic_vertex_buffer_handle_t bgfx_create_dynamic_vertex_buffer(uint _num, const(bgfx_vertex_layout_t)* _layout, ushort _flags);
	
	/**
	 * Create dynamic vertex buffer and initialize it.
	 * Params:
	 * _mem = Vertex buffer data.
	 * _layout = Vertex layout.
	 * _flags = Buffer creation flags.
	 *   - `BGFX_BUFFER_NONE` - No flags.
	 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
	 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
	 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
	 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
	 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
	 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
	 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
	 *       buffers.
	 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
	 *       index buffers.
	 */
	bgfx_dynamic_vertex_buffer_handle_t bgfx_create_dynamic_vertex_buffer_mem(const(bgfx_memory_t)* _mem, const(bgfx_vertex_layout_t)* _layout, ushort _flags);
	
	/**
	 * Update dynamic vertex buffer.
	 * Params:
	 * _handle = Dynamic vertex buffer handle.
	 * _startVertex = Start vertex.
	 * _mem = Vertex buffer data.
	 */
	void bgfx_update_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, const(bgfx_memory_t)* _mem);
	
	/**
	 * Destroy dynamic vertex buffer.
	 * Params:
	 * _handle = Dynamic vertex buffer handle.
	 */
	void bgfx_destroy_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_handle_t _handle);
	
	/**
	 * Returns number of requested or maximum available indices.
	 * Params:
	 * _num = Number of required indices.
	 */
	uint bgfx_get_avail_transient_index_buffer(uint _num);
	
	/**
	 * Returns number of requested or maximum available vertices.
	 * Params:
	 * _num = Number of required vertices.
	 * _layout = Vertex layout.
	 */
	uint bgfx_get_avail_transient_vertex_buffer(uint _num, const(bgfx_vertex_layout_t)* _layout);
	
	/**
	 * Returns number of requested or maximum available instance buffer slots.
	 * Params:
	 * _num = Number of required instances.
	 * _stride = Stride per instance.
	 */
	uint bgfx_get_avail_instance_data_buffer(uint _num, ushort _stride);
	
	/**
	 * Allocate transient index buffer.
	 * Remarks:
	 *   Only 16-bit index buffer is supported.
	 * Params:
	 * _tib = TransientIndexBuffer structure is filled and is valid
	 * for the duration of frame, and it can be reused for multiple draw
	 * calls.
	 * _num = Number of indices to allocate.
	 */
	void bgfx_alloc_transient_index_buffer(bgfx_transient_index_buffer_t* _tib, uint _num);
	
	/**
	 * Allocate transient vertex buffer.
	 * Params:
	 * _tvb = TransientVertexBuffer structure is filled and is valid
	 * for the duration of frame, and it can be reused for multiple draw
	 * calls.
	 * _num = Number of vertices to allocate.
	 * _layout = Vertex layout.
	 */
	void bgfx_alloc_transient_vertex_buffer(bgfx_transient_vertex_buffer_t* _tvb, uint _num, const(bgfx_vertex_layout_t)* _layout);
	
	/**
	 * Check for required space and allocate transient vertex and index
	 * buffers. If both space requirements are satisfied function returns
	 * true.
	 * Remarks:
	 *   Only 16-bit index buffer is supported.
	 * Params:
	 * _tvb = TransientVertexBuffer structure is filled and is valid
	 * for the duration of frame, and it can be reused for multiple draw
	 * calls.
	 * _layout = Vertex layout.
	 * _numVertices = Number of vertices to allocate.
	 * _tib = TransientIndexBuffer structure is filled and is valid
	 * for the duration of frame, and it can be reused for multiple draw
	 * calls.
	 * _numIndices = Number of indices to allocate.
	 */
	bool bgfx_alloc_transient_buffers(bgfx_transient_vertex_buffer_t* _tvb, const(bgfx_vertex_layout_t)* _layout, uint _numVertices, bgfx_transient_index_buffer_t* _tib, uint _numIndices);
	
	/**
	 * Allocate instance data buffer.
	 * Params:
	 * _idb = InstanceDataBuffer structure is filled and is valid
	 * for duration of frame, and it can be reused for multiple draw
	 * calls.
	 * _num = Number of instances.
	 * _stride = Instance stride. Must be multiple of 16.
	 */
	void bgfx_alloc_instance_data_buffer(bgfx_instance_data_buffer_t* _idb, uint _num, ushort _stride);
	
	/**
	 * Create draw indirect buffer.
	 * Params:
	 * _num = Number of indirect calls.
	 */
	bgfx_indirect_buffer_handle_t bgfx_create_indirect_buffer(uint _num);
	
	/**
	 * Destroy draw indirect buffer.
	 * Params:
	 * _handle = Indirect buffer handle.
	 */
	void bgfx_destroy_indirect_buffer(bgfx_indirect_buffer_handle_t _handle);
	
	/**
	 * Create shader from memory buffer.
	 * Params:
	 * _mem = Shader binary.
	 */
	bgfx_shader_handle_t bgfx_create_shader(const(bgfx_memory_t)* _mem);
	
	/**
	 * Returns the number of uniforms and uniform handles used inside a shader.
	 * Remarks:
	 *   Only non-predefined uniforms are returned.
	 * Params:
	 * _handle = Shader handle.
	 * _uniforms = UniformHandle array where data will be stored.
	 * _max = Maximum capacity of array.
	 */
	ushort bgfx_get_shader_uniforms(bgfx_shader_handle_t _handle, bgfx_uniform_handle_t* _uniforms, ushort _max);
	
	/**
	 * Set shader debug name.
	 * Params:
	 * _handle = Shader handle.
	 * _name = Shader name.
	 * _len = Shader name length (if length is INT32_MAX, it's expected
	 * that _name is zero terminated string).
	 */
	void bgfx_set_shader_name(bgfx_shader_handle_t _handle, const(char)* _name, int _len);
	
	/**
	 * Destroy shader.
	 * Remarks: Once a shader program is created with _handle,
	 *   it is safe to destroy that shader.
	 * Params:
	 * _handle = Shader handle.
	 */
	void bgfx_destroy_shader(bgfx_shader_handle_t _handle);
	
	/**
	 * Create program with vertex and fragment shaders.
	 * Params:
	 * _vsh = Vertex shader.
	 * _fsh = Fragment shader.
	 * _destroyShaders = If true, shaders will be destroyed when program is destroyed.
	 */
	bgfx_program_handle_t bgfx_create_program(bgfx_shader_handle_t _vsh, bgfx_shader_handle_t _fsh, bool _destroyShaders);
	
	/**
	 * Create program with compute shader.
	 * Params:
	 * _csh = Compute shader.
	 * _destroyShaders = If true, shaders will be destroyed when program is destroyed.
	 */
	bgfx_program_handle_t bgfx_create_compute_program(bgfx_shader_handle_t _csh, bool _destroyShaders);
	
	/**
	 * Destroy program.
	 * Params:
	 * _handle = Program handle.
	 */
	void bgfx_destroy_program(bgfx_program_handle_t _handle);
	
	/**
	 * Validate texture parameters.
	 * Params:
	 * _depth = Depth dimension of volume texture.
	 * _cubeMap = Indicates that texture contains cubemap.
	 * _numLayers = Number of layers in texture array.
	 * _format = Texture format. See: `TextureFormat::Enum`.
	 * _flags = Texture flags. See `BGFX_TEXTURE_*`.
	 */
	bool bgfx_is_texture_valid(ushort _depth, bool _cubeMap, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags);
	
	/**
	 * Calculate amount of memory required for texture.
	 * Params:
	 * _info = Resulting texture info structure. See: `TextureInfo`.
	 * _width = Width.
	 * _height = Height.
	 * _depth = Depth dimension of volume texture.
	 * _cubeMap = Indicates that texture contains cubemap.
	 * _hasMips = Indicates that texture contains full mip-map chain.
	 * _numLayers = Number of layers in texture array.
	 * _format = Texture format. See: `TextureFormat::Enum`.
	 */
	void bgfx_calc_texture_size(bgfx_texture_info_t* _info, ushort _width, ushort _height, ushort _depth, bool _cubeMap, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format);
	
	/**
	 * Create texture from memory buffer.
	 * Params:
	 * _mem = DDS, KTX or PVR texture binary data.
	 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
	 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
	 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
	 *   mode.
	 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
	 *   sampling.
	 * _skip = Skip top level mips when parsing texture.
	 * _info = When non-`NULL` is specified it returns parsed texture information.
	 */
	bgfx_texture_handle_t bgfx_create_texture(const(bgfx_memory_t)* _mem, ulong _flags, byte _skip, bgfx_texture_info_t* _info);
	
	/**
	 * Create 2D texture.
	 * Params:
	 * _width = Width.
	 * _height = Height.
	 * _hasMips = Indicates that texture contains full mip-map chain.
	 * _numLayers = Number of layers in texture array. Must be 1 if caps
	 * `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
	 * _format = Texture format. See: `TextureFormat::Enum`.
	 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
	 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
	 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
	 *   mode.
	 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
	 *   sampling.
	 * _mem = Texture data. If `_mem` is non-NULL, created texture will be immutable. If
	 * `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
	 * 1, expected memory layout is texture and all mips together for each array element.
	 */
	bgfx_texture_handle_t bgfx_create_texture_2d(ushort _width, ushort _height, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags, const(bgfx_memory_t)* _mem);
	
	/**
	 * Create texture with size based on backbuffer ratio. Texture will maintain ratio
	 * if back buffer resolution changes.
	 * Params:
	 * _ratio = Texture size in respect to back-buffer size. See: `BackbufferRatio::Enum`.
	 * _hasMips = Indicates that texture contains full mip-map chain.
	 * _numLayers = Number of layers in texture array. Must be 1 if caps
	 * `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
	 * _format = Texture format. See: `TextureFormat::Enum`.
	 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
	 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
	 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
	 *   mode.
	 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
	 *   sampling.
	 */
	bgfx_texture_handle_t bgfx_create_texture_2d_scaled(bgfx_backbuffer_ratio_t _ratio, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags);
	
	/**
	 * Create 3D texture.
	 * Params:
	 * _width = Width.
	 * _height = Height.
	 * _depth = Depth.
	 * _hasMips = Indicates that texture contains full mip-map chain.
	 * _format = Texture format. See: `TextureFormat::Enum`.
	 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
	 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
	 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
	 *   mode.
	 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
	 *   sampling.
	 * _mem = Texture data. If `_mem` is non-NULL, created texture will be immutable. If
	 * `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
	 * 1, expected memory layout is texture and all mips together for each array element.
	 */
	bgfx_texture_handle_t bgfx_create_texture_3d(ushort _width, ushort _height, ushort _depth, bool _hasMips, bgfx_texture_format_t _format, ulong _flags, const(bgfx_memory_t)* _mem);
	
	/**
	 * Create Cube texture.
	 * Params:
	 * _size = Cube side size.
	 * _hasMips = Indicates that texture contains full mip-map chain.
	 * _numLayers = Number of layers in texture array. Must be 1 if caps
	 * `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
	 * _format = Texture format. See: `TextureFormat::Enum`.
	 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
	 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
	 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
	 *   mode.
	 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
	 *   sampling.
	 * _mem = Texture data. If `_mem` is non-NULL, created texture will be immutable. If
	 * `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
	 * 1, expected memory layout is texture and all mips together for each array element.
	 */
	bgfx_texture_handle_t bgfx_create_texture_cube(ushort _size, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags, const(bgfx_memory_t)* _mem);
	
	/**
	 * Update 2D texture.
	 * Attention: It's valid to update only mutable texture. See `bgfx::createTexture2D` for more info.
	 * Params:
	 * _handle = Texture handle.
	 * _layer = Layer in texture array.
	 * _mip = Mip level.
	 * _x = X offset in texture.
	 * _y = Y offset in texture.
	 * _width = Width of texture block.
	 * _height = Height of texture block.
	 * _mem = Texture update data.
	 * _pitch = Pitch of input image (bytes). When _pitch is set to
	 * UINT16_MAX, it will be calculated internally based on _width.
	 */
	void bgfx_update_texture_2d(bgfx_texture_handle_t _handle, ushort _layer, byte _mip, ushort _x, ushort _y, ushort _width, ushort _height, const(bgfx_memory_t)* _mem, ushort _pitch);
	
	/**
	 * Update 3D texture.
	 * Attention: It's valid to update only mutable texture. See `bgfx::createTexture3D` for more info.
	 * Params:
	 * _handle = Texture handle.
	 * _mip = Mip level.
	 * _x = X offset in texture.
	 * _y = Y offset in texture.
	 * _z = Z offset in texture.
	 * _width = Width of texture block.
	 * _height = Height of texture block.
	 * _depth = Depth of texture block.
	 * _mem = Texture update data.
	 */
	void bgfx_update_texture_3d(bgfx_texture_handle_t _handle, byte _mip, ushort _x, ushort _y, ushort _z, ushort _width, ushort _height, ushort _depth, const(bgfx_memory_t)* _mem);
	
	/**
	 * Update Cube texture.
	 * Attention: It's valid to update only mutable texture. See `bgfx::createTextureCube` for more info.
	 * Params:
	 * _handle = Texture handle.
	 * _layer = Layer in texture array.
	 * _side = Cubemap side `BGFX_CUBE_MAP_<POSITIVE or NEGATIVE>_<X, Y or Z>`,
	 *   where 0 is +X, 1 is -X, 2 is +Y, 3 is -Y, 4 is +Z, and 5 is -Z.
	 *                  +----------+
	 *                  |-z       2|
	 *                  | ^  +y    |
	 *                  | |        |    Unfolded cube:
	 *                  | +---->+x |
	 *       +----------+----------+----------+----------+
	 *       |+y       1|+y       4|+y       0|+y       5|
	 *       | ^  -x    | ^  +z    | ^  +x    | ^  -z    |
	 *       | |        | |        | |        | |        |
	 *       | +---->+z | +---->+x | +---->-z | +---->-x |
	 *       +----------+----------+----------+----------+
	 *                  |+z       3|
	 *                  | ^  -y    |
	 *                  | |        |
	 *                  | +---->+x |
	 *                  +----------+
	 * _mip = Mip level.
	 * _x = X offset in texture.
	 * _y = Y offset in texture.
	 * _width = Width of texture block.
	 * _height = Height of texture block.
	 * _mem = Texture update data.
	 * _pitch = Pitch of input image (bytes). When _pitch is set to
	 * UINT16_MAX, it will be calculated internally based on _width.
	 */
	void bgfx_update_texture_cube(bgfx_texture_handle_t _handle, ushort _layer, byte _side, byte _mip, ushort _x, ushort _y, ushort _width, ushort _height, const(bgfx_memory_t)* _mem, ushort _pitch);
	
	/**
	 * Read back texture content.
	 * Attention: Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
	 * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
	 * Params:
	 * _handle = Texture handle.
	 * _data = Destination buffer.
	 * _mip = Mip level.
	 */
	uint bgfx_read_texture(bgfx_texture_handle_t _handle, void* _data, byte _mip);
	
	/**
	 * Set texture debug name.
	 * Params:
	 * _handle = Texture handle.
	 * _name = Texture name.
	 * _len = Texture name length (if length is INT32_MAX, it's expected
	 * that _name is zero terminated string.
	 */
	void bgfx_set_texture_name(bgfx_texture_handle_t _handle, const(char)* _name, int _len);
	
	/**
	 * Returns texture direct access pointer.
	 * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_DIRECT_ACCESS`. This feature
	 *   is available on GPUs that have unified memory architecture (UMA) support.
	 * Params:
	 * _handle = Texture handle.
	 */
	void* bgfx_get_direct_access_ptr(bgfx_texture_handle_t _handle);
	
	/**
	 * Destroy texture.
	 * Params:
	 * _handle = Texture handle.
	 */
	void bgfx_destroy_texture(bgfx_texture_handle_t _handle);
	
	/**
	 * Create frame buffer (simple).
	 * Params:
	 * _width = Texture width.
	 * _height = Texture height.
	 * _format = Texture format. See: `TextureFormat::Enum`.
	 * _textureFlags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
	 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
	 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
	 *   mode.
	 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
	 *   sampling.
	 */
	bgfx_frame_buffer_handle_t bgfx_create_frame_buffer(ushort _width, ushort _height, bgfx_texture_format_t _format, ulong _textureFlags);
	
	/**
	 * Create frame buffer with size based on backbuffer ratio. Frame buffer will maintain ratio
	 * if back buffer resolution changes.
	 * Params:
	 * _ratio = Frame buffer size in respect to back-buffer size. See:
	 * `BackbufferRatio::Enum`.
	 * _format = Texture format. See: `TextureFormat::Enum`.
	 * _textureFlags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
	 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
	 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
	 *   mode.
	 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
	 *   sampling.
	 */
	bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_scaled(bgfx_backbuffer_ratio_t _ratio, bgfx_texture_format_t _format, ulong _textureFlags);
	
	/**
	 * Create MRT frame buffer from texture handles (simple).
	 * Params:
	 * _num = Number of texture handles.
	 * _handles = Texture attachments.
	 * _destroyTexture = If true, textures will be destroyed when
	 * frame buffer is destroyed.
	 */
	bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_handles(byte _num, const(bgfx_texture_handle_t)* _handles, bool _destroyTexture);
	
	/**
	 * Create MRT frame buffer from texture handles with specific layer and
	 * mip level.
	 * Params:
	 * _num = Number of attachements.
	 * _attachment = Attachment texture info. See: `bgfx::Attachment`.
	 * _destroyTexture = If true, textures will be destroyed when
	 * frame buffer is destroyed.
	 */
	bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_attachment(byte _num, const(bgfx_attachment_t)* _attachment, bool _destroyTexture);
	
	/**
	 * Create frame buffer for multiple window rendering.
	 * Remarks:
	 *   Frame buffer cannot be used for sampling.
	 * Attention: Availability depends on: `BGFX_CAPS_SWAP_CHAIN`.
	 * Params:
	 * _nwh = OS' target native window handle.
	 * _width = Window back buffer width.
	 * _height = Window back buffer height.
	 * _format = Window back buffer color format.
	 * _depthFormat = Window back buffer depth format.
	 */
	bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_nwh(void* _nwh, ushort _width, ushort _height, bgfx_texture_format_t _format, bgfx_texture_format_t _depthFormat);
	
	/**
	 * Set frame buffer debug name.
	 * Params:
	 * _handle = Frame buffer handle.
	 * _name = Frame buffer name.
	 * _len = Frame buffer name length (if length is INT32_MAX, it's expected
	 * that _name is zero terminated string.
	 */
	void bgfx_set_frame_buffer_name(bgfx_frame_buffer_handle_t _handle, const(char)* _name, int _len);
	
	/**
	 * Obtain texture handle of frame buffer attachment.
	 * Params:
	 * _handle = Frame buffer handle.
	 */
	bgfx_texture_handle_t bgfx_get_texture(bgfx_frame_buffer_handle_t _handle, byte _attachment);
	
	/**
	 * Destroy frame buffer.
	 * Params:
	 * _handle = Frame buffer handle.
	 */
	void bgfx_destroy_frame_buffer(bgfx_frame_buffer_handle_t _handle);
	
	/**
	 * Create shader uniform parameter.
	 * Remarks:
	 *   1. Uniform names are unique. It's valid to call `bgfx::createUniform`
	 *      multiple times with the same uniform name. The library will always
	 *      return the same handle, but the handle reference count will be
	 *      incremented. This means that the same number of `bgfx::destroyUniform`
	 *      must be called to properly destroy the uniform.
	 *   2. Predefined uniforms (declared in `bgfx_shader.sh`):
	 *      - `u_viewRect vec4(x, y, width, height)` - view rectangle for current
	 *        view, in pixels.
	 *      - `u_viewTexel vec4(1.0/width, 1.0/height, undef, undef)` - inverse
	 *        width and height
	 *      - `u_view mat4` - view matrix
	 *      - `u_invView mat4` - inverted view matrix
	 *      - `u_proj mat4` - projection matrix
	 *      - `u_invProj mat4` - inverted projection matrix
	 *      - `u_viewProj mat4` - concatenated view projection matrix
	 *      - `u_invViewProj mat4` - concatenated inverted view projection matrix
	 *      - `u_model mat4[BGFX_CONFIG_MAX_BONES]` - array of model matrices.
	 *      - `u_modelView mat4` - concatenated model view matrix, only first
	 *        model matrix from array is used.
	 *      - `u_modelViewProj mat4` - concatenated model view projection matrix.
	 *      - `u_alphaRef float` - alpha reference value for alpha test.
	 * Params:
	 * _name = Uniform name in shader.
	 * _type = Type of uniform (See: `bgfx::UniformType`).
	 * _num = Number of elements in array.
	 */
	bgfx_uniform_handle_t bgfx_create_uniform(const(char)* _name, bgfx_uniform_type_t _type, ushort _num);
	
	/**
	 * Retrieve uniform info.
	 * Params:
	 * _handle = Handle to uniform object.
	 * _info = Uniform info.
	 */
	void bgfx_get_uniform_info(bgfx_uniform_handle_t _handle, bgfx_uniform_info_t* _info);
	
	/**
	 * Destroy shader uniform parameter.
	 * Params:
	 * _handle = Handle to uniform object.
	 */
	void bgfx_destroy_uniform(bgfx_uniform_handle_t _handle);
	
	/**
	 * Create occlusion query.
	 */
	bgfx_occlusion_query_handle_t bgfx_create_occlusion_query();
	
	/**
	 * Retrieve occlusion query result from previous frame.
	 * Params:
	 * _handle = Handle to occlusion query object.
	 * _result = Number of pixels that passed test. This argument
	 * can be `NULL` if result of occlusion query is not needed.
	 */
	bgfx_occlusion_query_result_t bgfx_get_result(bgfx_occlusion_query_handle_t _handle, int* _result);
	
	/**
	 * Destroy occlusion query.
	 * Params:
	 * _handle = Handle to occlusion query object.
	 */
	void bgfx_destroy_occlusion_query(bgfx_occlusion_query_handle_t _handle);
	
	/**
	 * Set palette color value.
	 * Params:
	 * _index = Index into palette.
	 * _rgba = RGBA floating point values.
	 */
	void bgfx_set_palette_color(byte _index, const float[4] _rgba);
	
	/**
	 * Set palette color value.
	 * Params:
	 * _index = Index into palette.
	 * _rgba = Packed 32-bit RGBA value.
	 */
	void bgfx_set_palette_color_rgba8(byte _index, uint _rgba);
	
	/**
	 * Set view name.
	 * Remarks:
	 *   This is debug only feature.
	 *   In graphics debugger view name will appear as:
	 *       "nnnc <view name>"
	 *        ^  ^ ^
	 *        |  +--- compute (C)
	 *        +------ view id
	 * Params:
	 * _id = View id.
	 * _name = View name.
	 */
	void bgfx_set_view_name(bgfx_view_id_t _id, const(char)* _name);
	
	/**
	 * Set view rectangle. Draw primitive outside view will be clipped.
	 * Params:
	 * _id = View id.
	 * _x = Position x from the left corner of the window.
	 * _y = Position y from the top corner of the window.
	 * _width = Width of view port region.
	 * _height = Height of view port region.
	 */
	void bgfx_set_view_rect(bgfx_view_id_t _id, ushort _x, ushort _y, ushort _width, ushort _height);
	
	/**
	 * Set view rectangle. Draw primitive outside view will be clipped.
	 * Params:
	 * _id = View id.
	 * _x = Position x from the left corner of the window.
	 * _y = Position y from the top corner of the window.
	 * _ratio = Width and height will be set in respect to back-buffer size.
	 * See: `BackbufferRatio::Enum`.
	 */
	void bgfx_set_view_rect_ratio(bgfx_view_id_t _id, ushort _x, ushort _y, bgfx_backbuffer_ratio_t _ratio);
	
	/**
	 * Set view scissor. Draw primitive outside view will be clipped. When
	 * _x, _y, _width and _height are set to 0, scissor will be disabled.
	 * Params:
	 * _id = View id.
	 * _x = Position x from the left corner of the window.
	 * _y = Position y from the top corner of the window.
	 * _width = Width of view scissor region.
	 * _height = Height of view scissor region.
	 */
	void bgfx_set_view_scissor(bgfx_view_id_t _id, ushort _x, ushort _y, ushort _width, ushort _height);
	
	/**
	 * Set view clear flags.
	 * Params:
	 * _id = View id.
	 * _flags = Clear flags. Use `BGFX_CLEAR_NONE` to remove any clear
	 * operation. See: `BGFX_CLEAR_*`.
	 * _rgba = Color clear value.
	 * _depth = Depth clear value.
	 * _stencil = Stencil clear value.
	 */
	void bgfx_set_view_clear(bgfx_view_id_t _id, ushort _flags, uint _rgba, float _depth, byte _stencil);
	
	/**
	 * Set view clear flags with different clear color for each
	 * frame buffer texture. Must use `bgfx::setPaletteColor` to setup clear color
	 * palette.
	 * Params:
	 * _id = View id.
	 * _flags = Clear flags. Use `BGFX_CLEAR_NONE` to remove any clear
	 * operation. See: `BGFX_CLEAR_*`.
	 * _depth = Depth clear value.
	 * _stencil = Stencil clear value.
	 * _c0 = Palette index for frame buffer attachment 0.
	 * _c1 = Palette index for frame buffer attachment 1.
	 * _c2 = Palette index for frame buffer attachment 2.
	 * _c3 = Palette index for frame buffer attachment 3.
	 * _c4 = Palette index for frame buffer attachment 4.
	 * _c5 = Palette index for frame buffer attachment 5.
	 * _c6 = Palette index for frame buffer attachment 6.
	 * _c7 = Palette index for frame buffer attachment 7.
	 */
	void bgfx_set_view_clear_mrt(bgfx_view_id_t _id, ushort _flags, float _depth, byte _stencil, byte _c0, byte _c1, byte _c2, byte _c3, byte _c4, byte _c5, byte _c6, byte _c7);
	
	/**
	 * Set view sorting mode.
	 * Remarks:
	 *   View mode must be set prior calling `bgfx::submit` for the view.
	 * Params:
	 * _id = View id.
	 * _mode = View sort mode. See `ViewMode::Enum`.
	 */
	void bgfx_set_view_mode(bgfx_view_id_t _id, bgfx_view_mode_t _mode);
	
	/**
	 * Set view frame buffer.
	 * Remarks:
	 *   Not persistent after `bgfx::reset` call.
	 * Params:
	 * _id = View id.
	 * _handle = Frame buffer handle. Passing `BGFX_INVALID_HANDLE` as
	 * frame buffer handle will draw primitives from this view into
	 * default back buffer.
	 */
	void bgfx_set_view_frame_buffer(bgfx_view_id_t _id, bgfx_frame_buffer_handle_t _handle);
	
	/**
	 * Set view view and projection matrices, all draw primitives in this
	 * view will use these matrices.
	 * Params:
	 * _id = View id.
	 * _view = View matrix.
	 * _proj = Projection matrix.
	 */
	void bgfx_set_view_transform(bgfx_view_id_t _id, const(void)* _view, const(void)* _proj);
	
	/**
	 * Post submit view reordering.
	 * Params:
	 * _id = First view id.
	 * _num = Number of views to remap.
	 * _order = View remap id table. Passing `NULL` will reset view ids
	 * to default state.
	 */
	void bgfx_set_view_order(bgfx_view_id_t _id, ushort _num, const(bgfx_view_id_t)* _order);
	
	/**
	 * Begin submitting draw calls from thread.
	 * Params:
	 * _forThread = Explicitly request an encoder for a worker thread.
	 */
	bgfx_encoder_t* bgfx_encoder_begin(bool _forThread);
	
	/**
	 * End submitting draw calls from thread.
	 * Params:
	 * _encoder = Encoder.
	 */
	void bgfx_encoder_end(bgfx_encoder_t* _encoder);
	
	/**
	 * Sets a debug marker. This allows you to group graphics calls together for easy browsing in
	 * graphics debugging tools.
	 * Params:
	 * _marker = Marker string.
	 */
	void bgfx_encoder_set_marker(bgfx_encoder_t* _this, const(char)* _marker);
	
	/**
	 * Set render states for draw primitive.
	 * Remarks:
	 *   1. To setup more complex states use:
	 *      `BGFX_STATE_ALPHA_REF(_ref)`,
	 *      `BGFX_STATE_POINT_SIZE(_size)`,
	 *      `BGFX_STATE_BLEND_FUNC(_src, _dst)`,
	 *      `BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)`,
	 *      `BGFX_STATE_BLEND_EQUATION(_equation)`,
	 *      `BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)`
	 *   2. `BGFX_STATE_BLEND_EQUATION_ADD` is set when no other blend
	 *      equation is specified.
	 * Params:
	 * _state = State flags. Default state for primitive type is
	 *   triangles. See: `BGFX_STATE_DEFAULT`.
	 *   - `BGFX_STATE_DEPTH_TEST_*` - Depth test function.
	 *   - `BGFX_STATE_BLEND_*` - See remark 1 about BGFX_STATE_BLEND_FUNC.
	 *   - `BGFX_STATE_BLEND_EQUATION_*` - See remark 2.
	 *   - `BGFX_STATE_CULL_*` - Backface culling mode.
	 *   - `BGFX_STATE_WRITE_*` - Enable R, G, B, A or Z write.
	 *   - `BGFX_STATE_MSAA` - Enable hardware multisample antialiasing.
	 *   - `BGFX_STATE_PT_[TRISTRIP/LINES/POINTS]` - Primitive type.
	 * _rgba = Sets blend factor used by `BGFX_STATE_BLEND_FACTOR` and
	 *   `BGFX_STATE_BLEND_INV_FACTOR` blend modes.
	 */
	void bgfx_encoder_set_state(bgfx_encoder_t* _this, ulong _state, uint _rgba);
	
	/**
	 * Set condition for rendering.
	 * Params:
	 * _handle = Occlusion query handle.
	 * _visible = Render if occlusion query is visible.
	 */
	void bgfx_encoder_set_condition(bgfx_encoder_t* _this, bgfx_occlusion_query_handle_t _handle, bool _visible);
	
	/**
	 * Set stencil test state.
	 * Params:
	 * _fstencil = Front stencil state.
	 * _bstencil = Back stencil state. If back is set to `BGFX_STENCIL_NONE`
	 * _fstencil is applied to both front and back facing primitives.
	 */
	void bgfx_encoder_set_stencil(bgfx_encoder_t* _this, uint _fstencil, uint _bstencil);
	
	/**
	 * Set scissor for draw primitive.
	 * Remarks:
	 *   To scissor for all primitives in view see `bgfx::setViewScissor`.
	 * Params:
	 * _x = Position x from the left corner of the window.
	 * _y = Position y from the top corner of the window.
	 * _width = Width of view scissor region.
	 * _height = Height of view scissor region.
	 */
	ushort bgfx_encoder_set_scissor(bgfx_encoder_t* _this, ushort _x, ushort _y, ushort _width, ushort _height);
	
	/**
	 * Set scissor from cache for draw primitive.
	 * Remarks:
	 *   To scissor for all primitives in view see `bgfx::setViewScissor`.
	 * Params:
	 * _cache = Index in scissor cache.
	 */
	void bgfx_encoder_set_scissor_cached(bgfx_encoder_t* _this, ushort _cache);
	
	/**
	 * Set model matrix for draw primitive. If it is not called,
	 * the model will be rendered with an identity model matrix.
	 * Params:
	 * _mtx = Pointer to first matrix in array.
	 * _num = Number of matrices in array.
	 */
	uint bgfx_encoder_set_transform(bgfx_encoder_t* _this, const(void)* _mtx, ushort _num);
	
	/**
	 *  Set model matrix from matrix cache for draw primitive.
	 * Params:
	 * _cache = Index in matrix cache.
	 * _num = Number of matrices from cache.
	 */
	void bgfx_encoder_set_transform_cached(bgfx_encoder_t* _this, uint _cache, ushort _num);
	
	/**
	 * Reserve matrices in internal matrix cache.
	 * Attention: Pointer returned can be modifed until `bgfx::frame` is called.
	 * Params:
	 * _transform = Pointer to `Transform` structure.
	 * _num = Number of matrices.
	 */
	uint bgfx_encoder_alloc_transform(bgfx_encoder_t* _this, bgfx_transform_t* _transform, ushort _num);
	
	/**
	 * Set shader uniform parameter for draw primitive.
	 * Params:
	 * _handle = Uniform.
	 * _value = Pointer to uniform data.
	 * _num = Number of elements. Passing `UINT16_MAX` will
	 * use the _num passed on uniform creation.
	 */
	void bgfx_encoder_set_uniform(bgfx_encoder_t* _this, bgfx_uniform_handle_t _handle, const(void)* _value, ushort _num);
	
	/**
	 * Set index buffer for draw primitive.
	 * Params:
	 * _handle = Index buffer.
	 * _firstIndex = First index to render.
	 * _numIndices = Number of indices to render.
	 */
	void bgfx_encoder_set_index_buffer(bgfx_encoder_t* _this, bgfx_index_buffer_handle_t _handle, uint _firstIndex, uint _numIndices);
	
	/**
	 * Set index buffer for draw primitive.
	 * Params:
	 * _handle = Dynamic index buffer.
	 * _firstIndex = First index to render.
	 * _numIndices = Number of indices to render.
	 */
	void bgfx_encoder_set_dynamic_index_buffer(bgfx_encoder_t* _this, bgfx_dynamic_index_buffer_handle_t _handle, uint _firstIndex, uint _numIndices);
	
	/**
	 * Set index buffer for draw primitive.
	 * Params:
	 * _tib = Transient index buffer.
	 * _firstIndex = First index to render.
	 * _numIndices = Number of indices to render.
	 */
	void bgfx_encoder_set_transient_index_buffer(bgfx_encoder_t* _this, const(bgfx_transient_index_buffer_t)* _tib, uint _firstIndex, uint _numIndices);
	
	/**
	 * Set vertex buffer for draw primitive.
	 * Params:
	 * _stream = Vertex stream.
	 * _handle = Vertex buffer.
	 * _startVertex = First vertex to render.
	 * _numVertices = Number of vertices to render.
	 * _layoutHandle = Vertex layout for aliasing vertex buffer.
	 */
	void bgfx_encoder_set_vertex_buffer(bgfx_encoder_t* _this, byte _stream, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
	
	/**
	 * Set vertex buffer for draw primitive.
	 * Params:
	 * _stream = Vertex stream.
	 * _handle = Dynamic vertex buffer.
	 * _startVertex = First vertex to render.
	 * _numVertices = Number of vertices to render.
	 * _layoutHandle = Vertex layout for aliasing vertex buffer.
	 */
	void bgfx_encoder_set_dynamic_vertex_buffer(bgfx_encoder_t* _this, byte _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
	
	/**
	 * Set vertex buffer for draw primitive.
	 * Params:
	 * _stream = Vertex stream.
	 * _tvb = Transient vertex buffer.
	 * _startVertex = First vertex to render.
	 * _numVertices = Number of vertices to render.
	 * _layoutHandle = Vertex layout for aliasing vertex buffer.
	 */
	void bgfx_encoder_set_transient_vertex_buffer(bgfx_encoder_t* _this, byte _stream, const(bgfx_transient_vertex_buffer_t)* _tvb, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
	
	/**
	 * Set number of vertices for auto generated vertices use in conjuction
	 * with gl_VertexID.
	 * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
	 * Params:
	 * _numVertices = Number of vertices.
	 */
	void bgfx_encoder_set_vertex_count(bgfx_encoder_t* _this, uint _numVertices);
	
	/**
	 * Set instance data buffer for draw primitive.
	 * Params:
	 * _idb = Transient instance data buffer.
	 * _start = First instance data.
	 * _num = Number of data instances.
	 */
	void bgfx_encoder_set_instance_data_buffer(bgfx_encoder_t* _this, const(bgfx_instance_data_buffer_t)* _idb, uint _start, uint _num);
	
	/**
	 * Set instance data buffer for draw primitive.
	 * Params:
	 * _handle = Vertex buffer.
	 * _startVertex = First instance data.
	 * _num = Number of data instances.
	 * Set instance data buffer for draw primitive.
	 */
	void bgfx_encoder_set_instance_data_from_vertex_buffer(bgfx_encoder_t* _this, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _num);
	
	/**
	 * Set instance data buffer for draw primitive.
	 * Params:
	 * _handle = Dynamic vertex buffer.
	 * _startVertex = First instance data.
	 * _num = Number of data instances.
	 */
	void bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer(bgfx_encoder_t* _this, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _num);
	
	/**
	 * Set number of instances for auto generated instances use in conjuction
	 * with gl_InstanceID.
	 * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
	 */
	void bgfx_encoder_set_instance_count(bgfx_encoder_t* _this, uint _numInstances);
	
	/**
	 * Set texture stage for draw primitive.
	 * Params:
	 * _stage = Texture unit.
	 * _sampler = Program sampler.
	 * _handle = Texture handle.
	 * _flags = Texture sampling mode. Default value UINT32_MAX uses
	 *   texture sampling settings from the texture.
	 *   - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
	 *     mode.
	 *   - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
	 *     sampling.
	 */
	void bgfx_encoder_set_texture(bgfx_encoder_t* _this, byte _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint _flags);
	
	/**
	 * Submit an empty primitive for rendering. Uniforms and draw state
	 * will be applied but no geometry will be submitted.
	 * Remarks:
	 *   These empty draw calls will sort before ordinary draw calls.
	 * Params:
	 * _id = View id.
	 */
	void bgfx_encoder_touch(bgfx_encoder_t* _this, bgfx_view_id_t _id);
	
	/**
	 * Submit primitive for rendering.
	 * Params:
	 * _id = View id.
	 * _program = Program.
	 * _depth = Depth for sorting.
	 * _preserveState = Preserve internal draw state for next draw call submit.
	 */
	void bgfx_encoder_submit(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, bool _preserveState);
	
	/**
	 * Submit primitive with occlusion query for rendering.
	 * Params:
	 * _id = View id.
	 * _program = Program.
	 * _occlusionQuery = Occlusion query.
	 * _depth = Depth for sorting.
	 * _preserveState = Preserve internal draw state for next draw call submit.
	 */
	void bgfx_encoder_submit_occlusion_query(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, bool _preserveState);
	
	/**
	 * Submit primitive for rendering with index and instance data info from
	 * indirect buffer.
	 * Params:
	 * _id = View id.
	 * _program = Program.
	 * _indirectHandle = Indirect buffer.
	 * _start = First element in indirect buffer.
	 * _num = Number of dispatches.
	 * _depth = Depth for sorting.
	 * _preserveState = Preserve internal draw state for next draw call submit.
	 */
	void bgfx_encoder_submit_indirect(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, bool _preserveState);
	
	/**
	 * Set compute index buffer.
	 * Params:
	 * _stage = Compute stage.
	 * _handle = Index buffer handle.
	 * _access = Buffer access. See `Access::Enum`.
	 */
	void bgfx_encoder_set_compute_index_buffer(bgfx_encoder_t* _this, byte _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access);
	
	/**
	 * Set compute vertex buffer.
	 * Params:
	 * _stage = Compute stage.
	 * _handle = Vertex buffer handle.
	 * _access = Buffer access. See `Access::Enum`.
	 */
	void bgfx_encoder_set_compute_vertex_buffer(bgfx_encoder_t* _this, byte _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access);
	
	/**
	 * Set compute dynamic index buffer.
	 * Params:
	 * _stage = Compute stage.
	 * _handle = Dynamic index buffer handle.
	 * _access = Buffer access. See `Access::Enum`.
	 */
	void bgfx_encoder_set_compute_dynamic_index_buffer(bgfx_encoder_t* _this, byte _stage, bgfx_dynamic_index_buffer_handle_t _handle, bgfx_access_t _access);
	
	/**
	 * Set compute dynamic vertex buffer.
	 * Params:
	 * _stage = Compute stage.
	 * _handle = Dynamic vertex buffer handle.
	 * _access = Buffer access. See `Access::Enum`.
	 */
	void bgfx_encoder_set_compute_dynamic_vertex_buffer(bgfx_encoder_t* _this, byte _stage, bgfx_dynamic_vertex_buffer_handle_t _handle, bgfx_access_t _access);
	
	/**
	 * Set compute indirect buffer.
	 * Params:
	 * _stage = Compute stage.
	 * _handle = Indirect buffer handle.
	 * _access = Buffer access. See `Access::Enum`.
	 */
	void bgfx_encoder_set_compute_indirect_buffer(bgfx_encoder_t* _this, byte _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access);
	
	/**
	 * Set compute image from texture.
	 * Params:
	 * _stage = Compute stage.
	 * _handle = Texture handle.
	 * _mip = Mip level.
	 * _access = Image access. See `Access::Enum`.
	 * _format = Texture format. See: `TextureFormat::Enum`.
	 */
	void bgfx_encoder_set_image(bgfx_encoder_t* _this, byte _stage, bgfx_texture_handle_t _handle, byte _mip, bgfx_access_t _access, bgfx_texture_format_t _format);
	
	/**
	 * Dispatch compute.
	 * Params:
	 * _id = View id.
	 * _program = Compute program.
	 * _numX = Number of groups X.
	 * _numY = Number of groups Y.
	 * _numZ = Number of groups Z.
	 */
	void bgfx_encoder_dispatch(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _numX, uint _numY, uint _numZ);
	
	/**
	 * Dispatch compute indirect.
	 * Params:
	 * _id = View id.
	 * _program = Compute program.
	 * _indirectHandle = Indirect buffer.
	 * _start = First element in indirect buffer.
	 * _num = Number of dispatches.
	 */
	void bgfx_encoder_dispatch_indirect(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num);
	
	/**
	 * Discard all previously set state for draw or compute call.
	 */
	void bgfx_encoder_discard(bgfx_encoder_t* _this);
	
	/**
	 * Blit 2D texture region between two 2D textures.
	 * Attention: Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
	 * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
	 * Params:
	 * _id = View id.
	 * _dst = Destination texture handle.
	 * _dstMip = Destination texture mip level.
	 * _dstX = Destination texture X position.
	 * _dstY = Destination texture Y position.
	 * _dstZ = If texture is 2D this argument should be 0. If destination texture is cube
	 * this argument represents destination texture cube face. For 3D texture this argument
	 * represents destination texture Z position.
	 * _src = Source texture handle.
	 * _srcMip = Source texture mip level.
	 * _srcX = Source texture X position.
	 * _srcY = Source texture Y position.
	 * _srcZ = If texture is 2D this argument should be 0. If source texture is cube
	 * this argument represents source texture cube face. For 3D texture this argument
	 * represents source texture Z position.
	 * _width = Width of region.
	 * _height = Height of region.
	 * _depth = If texture is 3D this argument represents depth of region, otherwise it's
	 * unused.
	 */
	void bgfx_encoder_blit(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_texture_handle_t _dst, byte _dstMip, ushort _dstX, ushort _dstY, ushort _dstZ, bgfx_texture_handle_t _src, byte _srcMip, ushort _srcX, ushort _srcY, ushort _srcZ, ushort _width, ushort _height, ushort _depth);
	
	/**
	 * Request screen shot of window back buffer.
	 * Remarks:
	 *   `bgfx::CallbackI::screenShot` must be implemented.
	 * Attention: Frame buffer handle must be created with OS' target native window handle.
	 * Params:
	 * _handle = Frame buffer handle. If handle is `BGFX_INVALID_HANDLE` request will be
	 * made for main window back buffer.
	 * _filePath = Will be passed to `bgfx::CallbackI::screenShot` callback.
	 */
	void bgfx_request_screen_shot(bgfx_frame_buffer_handle_t _handle, const(char)* _filePath);
	
	/**
	 * Render frame.
	 * Attention: `bgfx::renderFrame` is blocking call. It waits for
	 *   `bgfx::frame` to be called from API thread to process frame.
	 *   If timeout value is passed call will timeout and return even
	 *   if `bgfx::frame` is not called.
	 * Warning: This call should be only used on platforms that don't
	 *   allow creating separate rendering thread. If it is called before
	 *   to bgfx::init, render thread won't be created by bgfx::init call.
	 * Params:
	 * _msecs = Timeout in milliseconds.
	 */
	bgfx_render_frame_t bgfx_render_frame(int _msecs);
	
	/**
	 * Set platform data.
	 * Warning: Must be called before `bgfx::init`.
	 * Params:
	 * _data = Platform data.
	 */
	void bgfx_set_platform_data(const(bgfx_platform_data_t)* _data);
	
	/**
	 * Get internal data for interop.
	 * Attention: It's expected you understand some bgfx internals before you
	 *   use this call.
	 * Warning: Must be called only on render thread.
	 */
	const(bgfx_internal_data_t)* bgfx_get_internal_data();
	
	/**
	 * Override internal texture with externally created texture. Previously
	 * created internal texture will released.
	 * Attention: It's expected you understand some bgfx internals before you
	 *   use this call.
	 * Warning: Must be called only on render thread.
	 * Params:
	 * _handle = Texture handle.
	 * _ptr = Native API pointer to texture.
	 */
	ulong bgfx_override_internal_texture_ptr(bgfx_texture_handle_t _handle, ulong _ptr);
	
	/**
	 * Override internal texture by creating new texture. Previously created
	 * internal texture will released.
	 * Attention: It's expected you understand some bgfx internals before you
	 *   use this call.
	 * Returns: Native API pointer to texture. If result is 0, texture is not created yet from the
	 *   main thread.
	 * Warning: Must be called only on render thread.
	 * Params:
	 * _handle = Texture handle.
	 * _width = Width.
	 * _height = Height.
	 * _numMips = Number of mip-maps.
	 * _format = Texture format. See: `TextureFormat::Enum`.
	 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
	 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
	 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
	 *   mode.
	 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
	 *   sampling.
	 */
	ulong bgfx_override_internal_texture(bgfx_texture_handle_t _handle, ushort _width, ushort _height, byte _numMips, bgfx_texture_format_t _format, ulong _flags);
	
	/**
	 * Sets a debug marker. This allows you to group graphics calls together for easy browsing in
	 * graphics debugging tools.
	 * Params:
	 * _marker = Marker string.
	 */
	void bgfx_set_marker(const(char)* _marker);
	
	/**
	 * Set render states for draw primitive.
	 * Remarks:
	 *   1. To setup more complex states use:
	 *      `BGFX_STATE_ALPHA_REF(_ref)`,
	 *      `BGFX_STATE_POINT_SIZE(_size)`,
	 *      `BGFX_STATE_BLEND_FUNC(_src, _dst)`,
	 *      `BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)`,
	 *      `BGFX_STATE_BLEND_EQUATION(_equation)`,
	 *      `BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)`
	 *   2. `BGFX_STATE_BLEND_EQUATION_ADD` is set when no other blend
	 *      equation is specified.
	 * Params:
	 * _state = State flags. Default state for primitive type is
	 *   triangles. See: `BGFX_STATE_DEFAULT`.
	 *   - `BGFX_STATE_DEPTH_TEST_*` - Depth test function.
	 *   - `BGFX_STATE_BLEND_*` - See remark 1 about BGFX_STATE_BLEND_FUNC.
	 *   - `BGFX_STATE_BLEND_EQUATION_*` - See remark 2.
	 *   - `BGFX_STATE_CULL_*` - Backface culling mode.
	 *   - `BGFX_STATE_WRITE_*` - Enable R, G, B, A or Z write.
	 *   - `BGFX_STATE_MSAA` - Enable hardware multisample antialiasing.
	 *   - `BGFX_STATE_PT_[TRISTRIP/LINES/POINTS]` - Primitive type.
	 * _rgba = Sets blend factor used by `BGFX_STATE_BLEND_FACTOR` and
	 *   `BGFX_STATE_BLEND_INV_FACTOR` blend modes.
	 */
	void bgfx_set_state(ulong _state, uint _rgba);
	
	/**
	 * Set condition for rendering.
	 * Params:
	 * _handle = Occlusion query handle.
	 * _visible = Render if occlusion query is visible.
	 */
	void bgfx_set_condition(bgfx_occlusion_query_handle_t _handle, bool _visible);
	
	/**
	 * Set stencil test state.
	 * Params:
	 * _fstencil = Front stencil state.
	 * _bstencil = Back stencil state. If back is set to `BGFX_STENCIL_NONE`
	 * _fstencil is applied to both front and back facing primitives.
	 */
	void bgfx_set_stencil(uint _fstencil, uint _bstencil);
	
	/**
	 * Set scissor for draw primitive.
	 * Remarks:
	 *   To scissor for all primitives in view see `bgfx::setViewScissor`.
	 * Params:
	 * _x = Position x from the left corner of the window.
	 * _y = Position y from the top corner of the window.
	 * _width = Width of view scissor region.
	 * _height = Height of view scissor region.
	 */
	ushort bgfx_set_scissor(ushort _x, ushort _y, ushort _width, ushort _height);
	
	/**
	 * Set scissor from cache for draw primitive.
	 * Remarks:
	 *   To scissor for all primitives in view see `bgfx::setViewScissor`.
	 * Params:
	 * _cache = Index in scissor cache.
	 */
	void bgfx_set_scissor_cached(ushort _cache);
	
	/**
	 * Set model matrix for draw primitive. If it is not called,
	 * the model will be rendered with an identity model matrix.
	 * Params:
	 * _mtx = Pointer to first matrix in array.
	 * _num = Number of matrices in array.
	 */
	uint bgfx_set_transform(const(void)* _mtx, ushort _num);
	
	/**
	 *  Set model matrix from matrix cache for draw primitive.
	 * Params:
	 * _cache = Index in matrix cache.
	 * _num = Number of matrices from cache.
	 */
	void bgfx_set_transform_cached(uint _cache, ushort _num);
	
	/**
	 * Reserve matrices in internal matrix cache.
	 * Attention: Pointer returned can be modifed until `bgfx::frame` is called.
	 * Params:
	 * _transform = Pointer to `Transform` structure.
	 * _num = Number of matrices.
	 */
	uint bgfx_alloc_transform(bgfx_transform_t* _transform, ushort _num);
	
	/**
	 * Set shader uniform parameter for draw primitive.
	 * Params:
	 * _handle = Uniform.
	 * _value = Pointer to uniform data.
	 * _num = Number of elements. Passing `UINT16_MAX` will
	 * use the _num passed on uniform creation.
	 */
	void bgfx_set_uniform(bgfx_uniform_handle_t _handle, const(void)* _value, ushort _num);
	
	/**
	 * Set index buffer for draw primitive.
	 * Params:
	 * _handle = Index buffer.
	 * _firstIndex = First index to render.
	 * _numIndices = Number of indices to render.
	 */
	void bgfx_set_index_buffer(bgfx_index_buffer_handle_t _handle, uint _firstIndex, uint _numIndices);
	
	/**
	 * Set index buffer for draw primitive.
	 * Params:
	 * _handle = Dynamic index buffer.
	 * _firstIndex = First index to render.
	 * _numIndices = Number of indices to render.
	 */
	void bgfx_set_dynamic_index_buffer(bgfx_dynamic_index_buffer_handle_t _handle, uint _firstIndex, uint _numIndices);
	
	/**
	 * Set index buffer for draw primitive.
	 * Params:
	 * _tib = Transient index buffer.
	 * _firstIndex = First index to render.
	 * _numIndices = Number of indices to render.
	 */
	void bgfx_set_transient_index_buffer(const(bgfx_transient_index_buffer_t)* _tib, uint _firstIndex, uint _numIndices);
	
	/**
	 * Set vertex buffer for draw primitive.
	 * Params:
	 * _stream = Vertex stream.
	 * _handle = Vertex buffer.
	 * _startVertex = First vertex to render.
	 * _numVertices = Number of vertices to render.
	 */
	void bgfx_set_vertex_buffer(byte _stream, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices);
	
	/**
	 * Set vertex buffer for draw primitive.
	 * Params:
	 * _stream = Vertex stream.
	 * _handle = Dynamic vertex buffer.
	 * _startVertex = First vertex to render.
	 * _numVertices = Number of vertices to render.
	 */
	void bgfx_set_dynamic_vertex_buffer(byte _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices);
	
	/**
	 * Set vertex buffer for draw primitive.
	 * Params:
	 * _stream = Vertex stream.
	 * _tvb = Transient vertex buffer.
	 * _startVertex = First vertex to render.
	 * _numVertices = Number of vertices to render.
	 */
	void bgfx_set_transient_vertex_buffer(byte _stream, const(bgfx_transient_vertex_buffer_t)* _tvb, uint _startVertex, uint _numVertices);
	
	/**
	 * Set number of vertices for auto generated vertices use in conjuction
	 * with gl_VertexID.
	 * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
	 * Params:
	 * _numVertices = Number of vertices.
	 */
	void bgfx_set_vertex_count(uint _numVertices);
	
	/**
	 * Set instance data buffer for draw primitive.
	 * Params:
	 * _idb = Transient instance data buffer.
	 * _start = First instance data.
	 * _num = Number of data instances.
	 */
	void bgfx_set_instance_data_buffer(const(bgfx_instance_data_buffer_t)* _idb, uint _start, uint _num);
	
	/**
	 * Set instance data buffer for draw primitive.
	 * Params:
	 * _handle = Vertex buffer.
	 * _startVertex = First instance data.
	 * _num = Number of data instances.
	 * Set instance data buffer for draw primitive.
	 */
	void bgfx_set_instance_data_from_vertex_buffer(bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _num);
	
	/**
	 * Set instance data buffer for draw primitive.
	 * Params:
	 * _handle = Dynamic vertex buffer.
	 * _startVertex = First instance data.
	 * _num = Number of data instances.
	 */
	void bgfx_set_instance_data_from_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _num);
	
	/**
	 * Set number of instances for auto generated instances use in conjuction
	 * with gl_InstanceID.
	 * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
	 */
	void bgfx_set_instance_count(uint _numInstances);
	
	/**
	 * Set texture stage for draw primitive.
	 * Params:
	 * _stage = Texture unit.
	 * _sampler = Program sampler.
	 * _handle = Texture handle.
	 * _flags = Texture sampling mode. Default value UINT32_MAX uses
	 *   texture sampling settings from the texture.
	 *   - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
	 *     mode.
	 *   - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
	 *     sampling.
	 */
	void bgfx_set_texture(byte _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint _flags);
	
	/**
	 * Submit an empty primitive for rendering. Uniforms and draw state
	 * will be applied but no geometry will be submitted.
	 * Remarks:
	 *   These empty draw calls will sort before ordinary draw calls.
	 * Params:
	 * _id = View id.
	 */
	void bgfx_touch(bgfx_view_id_t _id);
	
	/**
	 * Submit primitive for rendering.
	 * Params:
	 * _id = View id.
	 * _program = Program.
	 * _depth = Depth for sorting.
	 * _preserveState = Preserve internal draw state for next draw call submit.
	 */
	void bgfx_submit(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, bool _preserveState);
	
	/**
	 * Submit primitive with occlusion query for rendering.
	 * Params:
	 * _id = View id.
	 * _program = Program.
	 * _occlusionQuery = Occlusion query.
	 * _depth = Depth for sorting.
	 * _preserveState = Preserve internal draw state for next draw call submit.
	 */
	void bgfx_submit_occlusion_query(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, bool _preserveState);
	
	/**
	 * Submit primitive for rendering with index and instance data info from
	 * indirect buffer.
	 * Params:
	 * _id = View id.
	 * _program = Program.
	 * _indirectHandle = Indirect buffer.
	 * _start = First element in indirect buffer.
	 * _num = Number of dispatches.
	 * _depth = Depth for sorting.
	 * _preserveState = Preserve internal draw state for next draw call submit.
	 */
	void bgfx_submit_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, bool _preserveState);
	
	/**
	 * Set compute index buffer.
	 * Params:
	 * _stage = Compute stage.
	 * _handle = Index buffer handle.
	 * _access = Buffer access. See `Access::Enum`.
	 */
	void bgfx_set_compute_index_buffer(byte _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access);
	
	/**
	 * Set compute vertex buffer.
	 * Params:
	 * _stage = Compute stage.
	 * _handle = Vertex buffer handle.
	 * _access = Buffer access. See `Access::Enum`.
	 */
	void bgfx_set_compute_vertex_buffer(byte _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access);
	
	/**
	 * Set compute dynamic index buffer.
	 * Params:
	 * _stage = Compute stage.
	 * _handle = Dynamic index buffer handle.
	 * _access = Buffer access. See `Access::Enum`.
	 */
	void bgfx_set_compute_dynamic_index_buffer(byte _stage, bgfx_dynamic_index_buffer_handle_t _handle, bgfx_access_t _access);
	
	/**
	 * Set compute dynamic vertex buffer.
	 * Params:
	 * _stage = Compute stage.
	 * _handle = Dynamic vertex buffer handle.
	 * _access = Buffer access. See `Access::Enum`.
	 */
	void bgfx_set_compute_dynamic_vertex_buffer(byte _stage, bgfx_dynamic_vertex_buffer_handle_t _handle, bgfx_access_t _access);
	
	/**
	 * Set compute indirect buffer.
	 * Params:
	 * _stage = Compute stage.
	 * _handle = Indirect buffer handle.
	 * _access = Buffer access. See `Access::Enum`.
	 */
	void bgfx_set_compute_indirect_buffer(byte _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access);
	
	/**
	 * Set compute image from texture.
	 * Params:
	 * _stage = Compute stage.
	 * _handle = Texture handle.
	 * _mip = Mip level.
	 * _access = Image access. See `Access::Enum`.
	 * _format = Texture format. See: `TextureFormat::Enum`.
	 */
	void bgfx_set_image(byte _stage, bgfx_texture_handle_t _handle, byte _mip, bgfx_access_t _access, bgfx_texture_format_t _format);
	
	/**
	 * Dispatch compute.
	 * Params:
	 * _id = View id.
	 * _program = Compute program.
	 * _numX = Number of groups X.
	 * _numY = Number of groups Y.
	 * _numZ = Number of groups Z.
	 */
	void bgfx_dispatch(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _numX, uint _numY, uint _numZ);
	
	/**
	 * Dispatch compute indirect.
	 * Params:
	 * _id = View id.
	 * _program = Compute program.
	 * _indirectHandle = Indirect buffer.
	 * _start = First element in indirect buffer.
	 * _num = Number of dispatches.
	 */
	void bgfx_dispatch_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num);
	
	/**
	 * Discard all previously set state for draw or compute call.
	 */
	void bgfx_discard();
	
	/**
	 * Blit 2D texture region between two 2D textures.
	 * Attention: Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
	 * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
	 * Params:
	 * _id = View id.
	 * _dst = Destination texture handle.
	 * _dstMip = Destination texture mip level.
	 * _dstX = Destination texture X position.
	 * _dstY = Destination texture Y position.
	 * _dstZ = If texture is 2D this argument should be 0. If destination texture is cube
	 * this argument represents destination texture cube face. For 3D texture this argument
	 * represents destination texture Z position.
	 * _src = Source texture handle.
	 * _srcMip = Source texture mip level.
	 * _srcX = Source texture X position.
	 * _srcY = Source texture Y position.
	 * _srcZ = If texture is 2D this argument should be 0. If source texture is cube
	 * this argument represents source texture cube face. For 3D texture this argument
	 * represents source texture Z position.
	 * _width = Width of region.
	 * _height = Height of region.
	 * _depth = If texture is 3D this argument represents depth of region, otherwise it's
	 * unused.
	 */
	void bgfx_blit(bgfx_view_id_t _id, bgfx_texture_handle_t _dst, byte _dstMip, ushort _dstX, ushort _dstY, ushort _dstZ, bgfx_texture_handle_t _src, byte _srcMip, ushort _srcX, ushort _srcY, ushort _srcZ, ushort _width, ushort _height, ushort _depth);
	
}
else
{
	__gshared
	{
		/**
		 * Init attachment.
		 * Params:
		 * _handle = Render target texture handle.
		 * _access = Access. See `Access::Enum`.
		 * _layer = Cubemap side or depth layer/slice.
		 * _mip = Mip level.
		 * _resolve = Resolve flags. See: `BGFX_RESOLVE_*`
		 */
		alias da_bgfx_attachment_init = void function(bgfx_attachment_t* _this, bgfx_texture_handle_t _handle, bgfx_access_t _access, ushort _layer, ushort _mip, byte _resolve);
		da_bgfx_attachment_init bgfx_attachment_init;
		
		/**
		 * Start VertexLayout.
		 */
		alias da_bgfx_vertex_layout_begin = bgfx_vertex_layout_t* function(bgfx_vertex_layout_t* _this, bgfx_renderer_type_t _rendererType);
		da_bgfx_vertex_layout_begin bgfx_vertex_layout_begin;
		
		/**
		 * Add attribute to VertexLayout.
		 * Remarks: Must be called between begin/end.
		 * Params:
		 * _attrib = Attribute semantics. See: `bgfx::Attrib`
		 * _num = Number of elements 1, 2, 3 or 4.
		 * _type = Element type.
		 * _normalized = When using fixed point AttribType (f.e. Uint8)
		 * value will be normalized for vertex shader usage. When normalized
		 * is set to true, AttribType::Uint8 value in range 0-255 will be
		 * in range 0.0-1.0 in vertex shader.
		 * _asInt = Packaging rule for vertexPack, vertexUnpack, and
		 * vertexConvert for AttribType::Uint8 and AttribType::Int16.
		 * Unpacking code must be implemented inside vertex shader.
		 */
		alias da_bgfx_vertex_layout_add = bgfx_vertex_layout_t* function(bgfx_vertex_layout_t* _this, bgfx_attrib_t _attrib, byte _num, bgfx_attrib_type_t _type, bool _normalized, bool _asInt);
		da_bgfx_vertex_layout_add bgfx_vertex_layout_add;
		
		/**
		 * Decode attribute.
		 * Params:
		 * _attrib = Attribute semantics. See: `bgfx::Attrib`
		 * _num = Number of elements.
		 * _type = Element type.
		 * _normalized = Attribute is normalized.
		 * _asInt = Attribute is packed as int.
		 */
		alias da_bgfx_vertex_layout_decode = void function(const(bgfx_vertex_layout_t)* _this, bgfx_attrib_t _attrib, byte* _num, bgfx_attrib_type_t* _type, bool* _normalized, bool* _asInt);
		da_bgfx_vertex_layout_decode bgfx_vertex_layout_decode;
		
		/**
		 * Returns true if VertexLayout contains attribute.
		 * Params:
		 * _attrib = Attribute semantics. See: `bgfx::Attrib`
		 */
		alias da_bgfx_vertex_layout_has = bool function(const(bgfx_vertex_layout_t)* _this, bgfx_attrib_t _attrib);
		da_bgfx_vertex_layout_has bgfx_vertex_layout_has;
		
		/**
		 * Skip `_num` bytes in vertex stream.
		 */
		alias da_bgfx_vertex_layout_skip = bgfx_vertex_layout_t* function(bgfx_vertex_layout_t* _this, byte _num);
		da_bgfx_vertex_layout_skip bgfx_vertex_layout_skip;
		
		/**
		 * End VertexLayout.
		 */
		alias da_bgfx_vertex_layout_end = void function(bgfx_vertex_layout_t* _this);
		da_bgfx_vertex_layout_end bgfx_vertex_layout_end;
		
		/**
		 * Pack vertex attribute into vertex stream format.
		 * Params:
		 * _input = Value to be packed into vertex stream.
		 * _inputNormalized = `true` if input value is already normalized.
		 * _attr = Attribute to pack.
		 * _layout = Vertex stream layout.
		 * _data = Destination vertex stream where data will be packed.
		 * _index = Vertex index that will be modified.
		 */
		alias da_bgfx_vertex_pack = void function(const float[4] _input, bool _inputNormalized, bgfx_attrib_t _attr, const(bgfx_vertex_layout_t)* _layout, void* _data, uint _index);
		da_bgfx_vertex_pack bgfx_vertex_pack;
		
		/**
		 * Unpack vertex attribute from vertex stream format.
		 * Params:
		 * _output = Result of unpacking.
		 * _attr = Attribute to unpack.
		 * _layout = Vertex stream layout.
		 * _data = Source vertex stream from where data will be unpacked.
		 * _index = Vertex index that will be unpacked.
		 */
		alias da_bgfx_vertex_unpack = void function(float[4] _output, bgfx_attrib_t _attr, const(bgfx_vertex_layout_t)* _layout, const(void)* _data, uint _index);
		da_bgfx_vertex_unpack bgfx_vertex_unpack;
		
		/**
		 * Converts vertex stream data from one vertex stream format to another.
		 * Params:
		 * _dstLayout = Destination vertex stream layout.
		 * _dstData = Destination vertex stream.
		 * _srcLayout = Source vertex stream layout.
		 * _srcData = Source vertex stream data.
		 * _num = Number of vertices to convert from source to destination.
		 */
		alias da_bgfx_vertex_convert = void function(const(bgfx_vertex_layout_t)* _dstLayout, void* _dstData, const(bgfx_vertex_layout_t)* _srcLayout, const(void)* _srcData, uint _num);
		da_bgfx_vertex_convert bgfx_vertex_convert;
		
		/**
		 * Weld vertices.
		 * Params:
		 * _output = Welded vertices remapping table. The size of buffer
		 * must be the same as number of vertices.
		 * _layout = Vertex stream layout.
		 * _data = Vertex stream.
		 * _num = Number of vertices in vertex stream.
		 * _epsilon = Error tolerance for vertex position comparison.
		 */
		alias da_bgfx_weld_vertices = ushort function(ushort* _output, const(bgfx_vertex_layout_t)* _layout, const(void)* _data, ushort _num, float _epsilon);
		da_bgfx_weld_vertices bgfx_weld_vertices;
		
		/**
		 * Convert index buffer for use with different primitive topologies.
		 * Params:
		 * _conversion = Conversion type, see `TopologyConvert::Enum`.
		 * _dst = Destination index buffer. If this argument is NULL
		 * function will return number of indices after conversion.
		 * _dstSize = Destination index buffer in bytes. It must be
		 * large enough to contain output indices. If destination size is
		 * insufficient index buffer will be truncated.
		 * _indices = Source indices.
		 * _numIndices = Number of input indices.
		 * _index32 = Set to `true` if input indices are 32-bit.
		 */
		alias da_bgfx_topology_convert = uint function(bgfx_topology_convert_t _conversion, void* _dst, uint _dstSize, const(void)* _indices, uint _numIndices, bool _index32);
		da_bgfx_topology_convert bgfx_topology_convert;
		
		/**
		 * Sort indices.
		 * Params:
		 * _sort = Sort order, see `TopologySort::Enum`.
		 * _dst = Destination index buffer.
		 * _dstSize = Destination index buffer in bytes. It must be
		 * large enough to contain output indices. If destination size is
		 * insufficient index buffer will be truncated.
		 * _dir = Direction (vector must be normalized).
		 * _pos = Position.
		 * _vertices = Pointer to first vertex represented as
		 * float x, y, z. Must contain at least number of vertices
		 * referencende by index buffer.
		 * _stride = Vertex stride.
		 * _indices = Source indices.
		 * _numIndices = Number of input indices.
		 * _index32 = Set to `true` if input indices are 32-bit.
		 */
		alias da_bgfx_topology_sort_tri_list = void function(bgfx_topology_sort_t _sort, void* _dst, uint _dstSize, const float[3] _dir, const float[3] _pos, const(void)* _vertices, uint _stride, const(void)* _indices, uint _numIndices, bool _index32);
		da_bgfx_topology_sort_tri_list bgfx_topology_sort_tri_list;
		
		/**
		 * Returns supported backend API renderers.
		 * Params:
		 * _max = Maximum number of elements in _enum array.
		 * _enum = Array where supported renderers will be written.
		 */
		alias da_bgfx_get_supported_renderers = byte function(byte _max, bgfx_renderer_type_t* _enum);
		da_bgfx_get_supported_renderers bgfx_get_supported_renderers;
		
		/**
		 * Returns name of renderer.
		 * Params:
		 * _type = Renderer backend type. See: `bgfx::RendererType`
		 */
		alias da_bgfx_get_renderer_name = const(char)* function(bgfx_renderer_type_t _type);
		da_bgfx_get_renderer_name bgfx_get_renderer_name;
		
		alias da_bgfx_init_ctor = void function(bgfx_init_t* _init);
		da_bgfx_init_ctor bgfx_init_ctor;
		
		/**
		 * Initialize bgfx library.
		 * Params:
		 * _init = Initialization parameters. See: `bgfx::Init` for more info.
		 */
		alias da_bgfx_init = bool function(const(bgfx_init_t)* _init);
		da_bgfx_init bgfx_init;
		
		/**
		 * Shutdown bgfx library.
		 */
		alias da_bgfx_shutdown = void function();
		da_bgfx_shutdown bgfx_shutdown;
		
		/**
		 * Reset graphic settings and back-buffer size.
		 * Attention: This call doesn't actually change window size, it just
		 *   resizes back-buffer. Windowing code has to change window size.
		 * Params:
		 * _width = Back-buffer width.
		 * _height = Back-buffer height.
		 * _flags = See: `BGFX_RESET_*` for more info.
		 *   - `BGFX_RESET_NONE` - No reset flags.
		 *   - `BGFX_RESET_FULLSCREEN` - Not supported yet.
		 *   - `BGFX_RESET_MSAA_X[2/4/8/16]` - Enable 2, 4, 8 or 16 x MSAA.
		 *   - `BGFX_RESET_VSYNC` - Enable V-Sync.
		 *   - `BGFX_RESET_MAXANISOTROPY` - Turn on/off max anisotropy.
		 *   - `BGFX_RESET_CAPTURE` - Begin screen capture.
		 *   - `BGFX_RESET_FLUSH_AFTER_RENDER` - Flush rendering after submitting to GPU.
		 *   - `BGFX_RESET_FLIP_AFTER_RENDER` - This flag  specifies where flip
		 *     occurs. Default behavior is that flip occurs before rendering new
		 *     frame. This flag only has effect when `BGFX_CONFIG_MULTITHREADED=0`.
		 *   - `BGFX_RESET_SRGB_BACKBUFFER` - Enable sRGB backbuffer.
		 * _format = Texture format. See: `TextureFormat::Enum`.
		 */
		alias da_bgfx_reset = void function(uint _width, uint _height, uint _flags, bgfx_texture_format_t _format);
		da_bgfx_reset bgfx_reset;
		
		/**
		 * Advance to next frame. When using multithreaded renderer, this call
		 * just swaps internal buffers, kicks render thread, and returns. In
		 * singlethreaded renderer this call does frame rendering.
		 * Params:
		 * _capture = Capture frame with graphics debugger.
		 */
		alias da_bgfx_frame = uint function(bool _capture);
		da_bgfx_frame bgfx_frame;
		
		/**
		 * Returns current renderer backend API type.
		 * Remarks:
		 *   Library must be initialized.
		 */
		alias da_bgfx_get_renderer_type = bgfx_renderer_type_t function();
		da_bgfx_get_renderer_type bgfx_get_renderer_type;
		
		/**
		 * Returns renderer capabilities.
		 * Remarks:
		 *   Library must be initialized.
		 */
		alias da_bgfx_get_caps = const(bgfx_caps_t)* function();
		da_bgfx_get_caps bgfx_get_caps;
		
		/**
		 * Returns performance counters.
		 * Attention: Pointer returned is valid until `bgfx::frame` is called.
		 */
		alias da_bgfx_get_stats = const(bgfx_stats_t)* function();
		da_bgfx_get_stats bgfx_get_stats;
		
		/**
		 * Allocate buffer to pass to bgfx calls. Data will be freed inside bgfx.
		 * Params:
		 * _size = Size to allocate.
		 */
		alias da_bgfx_alloc = const(bgfx_memory_t)* function(uint _size);
		da_bgfx_alloc bgfx_alloc;
		
		/**
		 * Allocate buffer and copy data into it. Data will be freed inside bgfx.
		 * Params:
		 * _data = Pointer to data to be copied.
		 * _size = Size of data to be copied.
		 */
		alias da_bgfx_copy = const(bgfx_memory_t)* function(const(void)* _data, uint _size);
		da_bgfx_copy bgfx_copy;
		
		/**
		 * Make reference to data to pass to bgfx. Unlike `bgfx::alloc`, this call
		 * doesn't allocate memory for data. It just copies the _data pointer. You
		 * can pass `ReleaseFn` function pointer to release this memory after it's
		 * consumed, otherwise you must make sure _data is available for at least 2
		 * `bgfx::frame` calls. `ReleaseFn` function must be able to be called
		 * from any thread.
		 * Attention: Data passed must be available for at least 2 `bgfx::frame` calls.
		 * Params:
		 * _data = Pointer to data.
		 * _size = Size of data.
		 */
		alias da_bgfx_make_ref = const(bgfx_memory_t)* function(const(void)* _data, uint _size);
		da_bgfx_make_ref bgfx_make_ref;
		
		/**
		 * Make reference to data to pass to bgfx. Unlike `bgfx::alloc`, this call
		 * doesn't allocate memory for data. It just copies the _data pointer. You
		 * can pass `ReleaseFn` function pointer to release this memory after it's
		 * consumed, otherwise you must make sure _data is available for at least 2
		 * `bgfx::frame` calls. `ReleaseFn` function must be able to be called
		 * from any thread.
		 * Attention: Data passed must be available for at least 2 `bgfx::frame` calls.
		 * Params:
		 * _data = Pointer to data.
		 * _size = Size of data.
		 * _releaseFn = Callback function to release memory after use.
		 * _userData = User data to be passed to callback function.
		 */
		alias da_bgfx_make_ref_release = const(bgfx_memory_t)* function(const(void)* _data, uint _size, void* _releaseFn, void* _userData);
		da_bgfx_make_ref_release bgfx_make_ref_release;
		
		/**
		 * Set debug flags.
		 * Params:
		 * _debug = Available flags:
		 *   - `BGFX_DEBUG_IFH` - Infinitely fast hardware. When this flag is set
		 *     all rendering calls will be skipped. This is useful when profiling
		 *     to quickly assess potential bottlenecks between CPU and GPU.
		 *   - `BGFX_DEBUG_PROFILER` - Enable profiler.
		 *   - `BGFX_DEBUG_STATS` - Display internal statistics.
		 *   - `BGFX_DEBUG_TEXT` - Display debug text.
		 *   - `BGFX_DEBUG_WIREFRAME` - Wireframe rendering. All rendering
		 *     primitives will be rendered as lines.
		 */
		alias da_bgfx_set_debug = void function(uint _debug);
		da_bgfx_set_debug bgfx_set_debug;
		
		/**
		 * Clear internal debug text buffer.
		 * Params:
		 * _attr = Background color.
		 * _small = Default 8x16 or 8x8 font.
		 */
		alias da_bgfx_dbg_text_clear = void function(byte _attr, bool _small);
		da_bgfx_dbg_text_clear bgfx_dbg_text_clear;
		
		/**
		 * Print formatted data to internal debug text character-buffer (VGA-compatible text mode).
		 * Params:
		 * _x = Position x from the left corner of the window.
		 * _y = Position y from the top corner of the window.
		 * _attr = Color palette. Where top 4-bits represent index of background, and bottom
		 * 4-bits represent foreground color from standard VGA text palette (ANSI escape codes).
		 * _format = `printf` style format.
		 */
		alias da_bgfx_dbg_text_printf = void function(ushort _x, ushort _y, byte _attr, const(char)* _format, ... );
		da_bgfx_dbg_text_printf bgfx_dbg_text_printf;
		
		/**
		 * Print formatted data from variable argument list to internal debug text character-buffer (VGA-compatible text mode).
		 * Params:
		 * _x = Position x from the left corner of the window.
		 * _y = Position y from the top corner of the window.
		 * _attr = Color palette. Where top 4-bits represent index of background, and bottom
		 * 4-bits represent foreground color from standard VGA text palette (ANSI escape codes).
		 * _format = `printf` style format.
		 * _argList = Variable arguments list for format string.
		 */
		alias da_bgfx_dbg_text_vprintf = void function(ushort _x, ushort _y, byte _attr, const(char)* _format, va_list _argList);
		da_bgfx_dbg_text_vprintf bgfx_dbg_text_vprintf;
		
		/**
		 * Draw image into internal debug text buffer.
		 * Params:
		 * _x = Position x from the left corner of the window.
		 * _y = Position y from the top corner of the window.
		 * _width = Image width.
		 * _height = Image height.
		 * _data = Raw image data (character/attribute raw encoding).
		 * _pitch = Image pitch in bytes.
		 */
		alias da_bgfx_dbg_text_image = void function(ushort _x, ushort _y, ushort _width, ushort _height, const(void)* _data, ushort _pitch);
		da_bgfx_dbg_text_image bgfx_dbg_text_image;
		
		/**
		 * Create static index buffer.
		 * Params:
		 * _mem = Index buffer data.
		 * _flags = Buffer creation flags.
		 *   - `BGFX_BUFFER_NONE` - No flags.
		 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
		 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
		 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
		 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
		 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
		 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
		 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
		 *       buffers.
		 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
		 *       index buffers.
		 */
		alias da_bgfx_create_index_buffer = bgfx_index_buffer_handle_t function(const(bgfx_memory_t)* _mem, ushort _flags);
		da_bgfx_create_index_buffer bgfx_create_index_buffer;
		
		/**
		 * Set static index buffer debug name.
		 * Params:
		 * _handle = Static index buffer handle.
		 * _name = Static index buffer name.
		 * _len = Static index buffer name length (if length is INT32_MAX, it's expected
		 * that _name is zero terminated string.
		 */
		alias da_bgfx_set_index_buffer_name = void function(bgfx_index_buffer_handle_t _handle, const(char)* _name, int _len);
		da_bgfx_set_index_buffer_name bgfx_set_index_buffer_name;
		
		/**
		 * Destroy static index buffer.
		 * Params:
		 * _handle = Static index buffer handle.
		 */
		alias da_bgfx_destroy_index_buffer = void function(bgfx_index_buffer_handle_t _handle);
		da_bgfx_destroy_index_buffer bgfx_destroy_index_buffer;
		
		/**
		 * Create vertex layout.
		 * Params:
		 * _layout = Vertex layout.
		 */
		alias da_bgfx_create_vertex_layout = bgfx_vertex_layout_handle_t function(const(bgfx_vertex_layout_t)* _layout);
		da_bgfx_create_vertex_layout bgfx_create_vertex_layout;
		
		/**
		 * Destroy vertex layout.
		 * Params:
		 * _layoutHandle = Vertex layout handle.
		 */
		alias da_bgfx_destroy_vertex_layout = void function(bgfx_vertex_layout_handle_t _layoutHandle);
		da_bgfx_destroy_vertex_layout bgfx_destroy_vertex_layout;
		
		/**
		 * Create static vertex buffer.
		 * Params:
		 * _mem = Vertex buffer data.
		 * _layout = Vertex layout.
		 * _flags = Buffer creation flags.
		 *  - `BGFX_BUFFER_NONE` - No flags.
		 *  - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
		 *  - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
		 *      is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
		 *  - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
		 *  - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
		 *      data is passed. If this flag is not specified, and more data is passed on update, the buffer
		 *      will be trimmed to fit the existing buffer size. This flag has effect only on dynamic buffers.
		 *  - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on index buffers.
		 */
		alias da_bgfx_create_vertex_buffer = bgfx_vertex_buffer_handle_t function(const(bgfx_memory_t)* _mem, const(bgfx_vertex_layout_t)* _layout, ushort _flags);
		da_bgfx_create_vertex_buffer bgfx_create_vertex_buffer;
		
		/**
		 * Set static vertex buffer debug name.
		 * Params:
		 * _handle = Static vertex buffer handle.
		 * _name = Static vertex buffer name.
		 * _len = Static vertex buffer name length (if length is INT32_MAX, it's expected
		 * that _name is zero terminated string.
		 */
		alias da_bgfx_set_vertex_buffer_name = void function(bgfx_vertex_buffer_handle_t _handle, const(char)* _name, int _len);
		da_bgfx_set_vertex_buffer_name bgfx_set_vertex_buffer_name;
		
		/**
		 * Destroy static vertex buffer.
		 * Params:
		 * _handle = Static vertex buffer handle.
		 */
		alias da_bgfx_destroy_vertex_buffer = void function(bgfx_vertex_buffer_handle_t _handle);
		da_bgfx_destroy_vertex_buffer bgfx_destroy_vertex_buffer;
		
		/**
		 * Create empty dynamic index buffer.
		 * Params:
		 * _num = Number of indices.
		 * _flags = Buffer creation flags.
		 *   - `BGFX_BUFFER_NONE` - No flags.
		 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
		 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
		 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
		 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
		 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
		 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
		 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
		 *       buffers.
		 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
		 *       index buffers.
		 */
		alias da_bgfx_create_dynamic_index_buffer = bgfx_dynamic_index_buffer_handle_t function(uint _num, ushort _flags);
		da_bgfx_create_dynamic_index_buffer bgfx_create_dynamic_index_buffer;
		
		/**
		 * Create dynamic index buffer and initialized it.
		 * Params:
		 * _mem = Index buffer data.
		 * _flags = Buffer creation flags.
		 *   - `BGFX_BUFFER_NONE` - No flags.
		 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
		 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
		 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
		 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
		 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
		 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
		 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
		 *       buffers.
		 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
		 *       index buffers.
		 */
		alias da_bgfx_create_dynamic_index_buffer_mem = bgfx_dynamic_index_buffer_handle_t function(const(bgfx_memory_t)* _mem, ushort _flags);
		da_bgfx_create_dynamic_index_buffer_mem bgfx_create_dynamic_index_buffer_mem;
		
		/**
		 * Update dynamic index buffer.
		 * Params:
		 * _handle = Dynamic index buffer handle.
		 * _startIndex = Start index.
		 * _mem = Index buffer data.
		 */
		alias da_bgfx_update_dynamic_index_buffer = void function(bgfx_dynamic_index_buffer_handle_t _handle, uint _startIndex, const(bgfx_memory_t)* _mem);
		da_bgfx_update_dynamic_index_buffer bgfx_update_dynamic_index_buffer;
		
		/**
		 * Destroy dynamic index buffer.
		 * Params:
		 * _handle = Dynamic index buffer handle.
		 */
		alias da_bgfx_destroy_dynamic_index_buffer = void function(bgfx_dynamic_index_buffer_handle_t _handle);
		da_bgfx_destroy_dynamic_index_buffer bgfx_destroy_dynamic_index_buffer;
		
		/**
		 * Create empty dynamic vertex buffer.
		 * Params:
		 * _num = Number of vertices.
		 * _layout = Vertex layout.
		 * _flags = Buffer creation flags.
		 *   - `BGFX_BUFFER_NONE` - No flags.
		 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
		 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
		 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
		 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
		 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
		 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
		 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
		 *       buffers.
		 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
		 *       index buffers.
		 */
		alias da_bgfx_create_dynamic_vertex_buffer = bgfx_dynamic_vertex_buffer_handle_t function(uint _num, const(bgfx_vertex_layout_t)* _layout, ushort _flags);
		da_bgfx_create_dynamic_vertex_buffer bgfx_create_dynamic_vertex_buffer;
		
		/**
		 * Create dynamic vertex buffer and initialize it.
		 * Params:
		 * _mem = Vertex buffer data.
		 * _layout = Vertex layout.
		 * _flags = Buffer creation flags.
		 *   - `BGFX_BUFFER_NONE` - No flags.
		 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
		 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
		 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
		 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
		 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
		 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
		 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
		 *       buffers.
		 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
		 *       index buffers.
		 */
		alias da_bgfx_create_dynamic_vertex_buffer_mem = bgfx_dynamic_vertex_buffer_handle_t function(const(bgfx_memory_t)* _mem, const(bgfx_vertex_layout_t)* _layout, ushort _flags);
		da_bgfx_create_dynamic_vertex_buffer_mem bgfx_create_dynamic_vertex_buffer_mem;
		
		/**
		 * Update dynamic vertex buffer.
		 * Params:
		 * _handle = Dynamic vertex buffer handle.
		 * _startVertex = Start vertex.
		 * _mem = Vertex buffer data.
		 */
		alias da_bgfx_update_dynamic_vertex_buffer = void function(bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, const(bgfx_memory_t)* _mem);
		da_bgfx_update_dynamic_vertex_buffer bgfx_update_dynamic_vertex_buffer;
		
		/**
		 * Destroy dynamic vertex buffer.
		 * Params:
		 * _handle = Dynamic vertex buffer handle.
		 */
		alias da_bgfx_destroy_dynamic_vertex_buffer = void function(bgfx_dynamic_vertex_buffer_handle_t _handle);
		da_bgfx_destroy_dynamic_vertex_buffer bgfx_destroy_dynamic_vertex_buffer;
		
		/**
		 * Returns number of requested or maximum available indices.
		 * Params:
		 * _num = Number of required indices.
		 */
		alias da_bgfx_get_avail_transient_index_buffer = uint function(uint _num);
		da_bgfx_get_avail_transient_index_buffer bgfx_get_avail_transient_index_buffer;
		
		/**
		 * Returns number of requested or maximum available vertices.
		 * Params:
		 * _num = Number of required vertices.
		 * _layout = Vertex layout.
		 */
		alias da_bgfx_get_avail_transient_vertex_buffer = uint function(uint _num, const(bgfx_vertex_layout_t)* _layout);
		da_bgfx_get_avail_transient_vertex_buffer bgfx_get_avail_transient_vertex_buffer;
		
		/**
		 * Returns number of requested or maximum available instance buffer slots.
		 * Params:
		 * _num = Number of required instances.
		 * _stride = Stride per instance.
		 */
		alias da_bgfx_get_avail_instance_data_buffer = uint function(uint _num, ushort _stride);
		da_bgfx_get_avail_instance_data_buffer bgfx_get_avail_instance_data_buffer;
		
		/**
		 * Allocate transient index buffer.
		 * Remarks:
		 *   Only 16-bit index buffer is supported.
		 * Params:
		 * _tib = TransientIndexBuffer structure is filled and is valid
		 * for the duration of frame, and it can be reused for multiple draw
		 * calls.
		 * _num = Number of indices to allocate.
		 */
		alias da_bgfx_alloc_transient_index_buffer = void function(bgfx_transient_index_buffer_t* _tib, uint _num);
		da_bgfx_alloc_transient_index_buffer bgfx_alloc_transient_index_buffer;
		
		/**
		 * Allocate transient vertex buffer.
		 * Params:
		 * _tvb = TransientVertexBuffer structure is filled and is valid
		 * for the duration of frame, and it can be reused for multiple draw
		 * calls.
		 * _num = Number of vertices to allocate.
		 * _layout = Vertex layout.
		 */
		alias da_bgfx_alloc_transient_vertex_buffer = void function(bgfx_transient_vertex_buffer_t* _tvb, uint _num, const(bgfx_vertex_layout_t)* _layout);
		da_bgfx_alloc_transient_vertex_buffer bgfx_alloc_transient_vertex_buffer;
		
		/**
		 * Check for required space and allocate transient vertex and index
		 * buffers. If both space requirements are satisfied function returns
		 * true.
		 * Remarks:
		 *   Only 16-bit index buffer is supported.
		 * Params:
		 * _tvb = TransientVertexBuffer structure is filled and is valid
		 * for the duration of frame, and it can be reused for multiple draw
		 * calls.
		 * _layout = Vertex layout.
		 * _numVertices = Number of vertices to allocate.
		 * _tib = TransientIndexBuffer structure is filled and is valid
		 * for the duration of frame, and it can be reused for multiple draw
		 * calls.
		 * _numIndices = Number of indices to allocate.
		 */
		alias da_bgfx_alloc_transient_buffers = bool function(bgfx_transient_vertex_buffer_t* _tvb, const(bgfx_vertex_layout_t)* _layout, uint _numVertices, bgfx_transient_index_buffer_t* _tib, uint _numIndices);
		da_bgfx_alloc_transient_buffers bgfx_alloc_transient_buffers;
		
		/**
		 * Allocate instance data buffer.
		 * Params:
		 * _idb = InstanceDataBuffer structure is filled and is valid
		 * for duration of frame, and it can be reused for multiple draw
		 * calls.
		 * _num = Number of instances.
		 * _stride = Instance stride. Must be multiple of 16.
		 */
		alias da_bgfx_alloc_instance_data_buffer = void function(bgfx_instance_data_buffer_t* _idb, uint _num, ushort _stride);
		da_bgfx_alloc_instance_data_buffer bgfx_alloc_instance_data_buffer;
		
		/**
		 * Create draw indirect buffer.
		 * Params:
		 * _num = Number of indirect calls.
		 */
		alias da_bgfx_create_indirect_buffer = bgfx_indirect_buffer_handle_t function(uint _num);
		da_bgfx_create_indirect_buffer bgfx_create_indirect_buffer;
		
		/**
		 * Destroy draw indirect buffer.
		 * Params:
		 * _handle = Indirect buffer handle.
		 */
		alias da_bgfx_destroy_indirect_buffer = void function(bgfx_indirect_buffer_handle_t _handle);
		da_bgfx_destroy_indirect_buffer bgfx_destroy_indirect_buffer;
		
		/**
		 * Create shader from memory buffer.
		 * Params:
		 * _mem = Shader binary.
		 */
		alias da_bgfx_create_shader = bgfx_shader_handle_t function(const(bgfx_memory_t)* _mem);
		da_bgfx_create_shader bgfx_create_shader;
		
		/**
		 * Returns the number of uniforms and uniform handles used inside a shader.
		 * Remarks:
		 *   Only non-predefined uniforms are returned.
		 * Params:
		 * _handle = Shader handle.
		 * _uniforms = UniformHandle array where data will be stored.
		 * _max = Maximum capacity of array.
		 */
		alias da_bgfx_get_shader_uniforms = ushort function(bgfx_shader_handle_t _handle, bgfx_uniform_handle_t* _uniforms, ushort _max);
		da_bgfx_get_shader_uniforms bgfx_get_shader_uniforms;
		
		/**
		 * Set shader debug name.
		 * Params:
		 * _handle = Shader handle.
		 * _name = Shader name.
		 * _len = Shader name length (if length is INT32_MAX, it's expected
		 * that _name is zero terminated string).
		 */
		alias da_bgfx_set_shader_name = void function(bgfx_shader_handle_t _handle, const(char)* _name, int _len);
		da_bgfx_set_shader_name bgfx_set_shader_name;
		
		/**
		 * Destroy shader.
		 * Remarks: Once a shader program is created with _handle,
		 *   it is safe to destroy that shader.
		 * Params:
		 * _handle = Shader handle.
		 */
		alias da_bgfx_destroy_shader = void function(bgfx_shader_handle_t _handle);
		da_bgfx_destroy_shader bgfx_destroy_shader;
		
		/**
		 * Create program with vertex and fragment shaders.
		 * Params:
		 * _vsh = Vertex shader.
		 * _fsh = Fragment shader.
		 * _destroyShaders = If true, shaders will be destroyed when program is destroyed.
		 */
		alias da_bgfx_create_program = bgfx_program_handle_t function(bgfx_shader_handle_t _vsh, bgfx_shader_handle_t _fsh, bool _destroyShaders);
		da_bgfx_create_program bgfx_create_program;
		
		/**
		 * Create program with compute shader.
		 * Params:
		 * _csh = Compute shader.
		 * _destroyShaders = If true, shaders will be destroyed when program is destroyed.
		 */
		alias da_bgfx_create_compute_program = bgfx_program_handle_t function(bgfx_shader_handle_t _csh, bool _destroyShaders);
		da_bgfx_create_compute_program bgfx_create_compute_program;
		
		/**
		 * Destroy program.
		 * Params:
		 * _handle = Program handle.
		 */
		alias da_bgfx_destroy_program = void function(bgfx_program_handle_t _handle);
		da_bgfx_destroy_program bgfx_destroy_program;
		
		/**
		 * Validate texture parameters.
		 * Params:
		 * _depth = Depth dimension of volume texture.
		 * _cubeMap = Indicates that texture contains cubemap.
		 * _numLayers = Number of layers in texture array.
		 * _format = Texture format. See: `TextureFormat::Enum`.
		 * _flags = Texture flags. See `BGFX_TEXTURE_*`.
		 */
		alias da_bgfx_is_texture_valid = bool function(ushort _depth, bool _cubeMap, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags);
		da_bgfx_is_texture_valid bgfx_is_texture_valid;
		
		/**
		 * Calculate amount of memory required for texture.
		 * Params:
		 * _info = Resulting texture info structure. See: `TextureInfo`.
		 * _width = Width.
		 * _height = Height.
		 * _depth = Depth dimension of volume texture.
		 * _cubeMap = Indicates that texture contains cubemap.
		 * _hasMips = Indicates that texture contains full mip-map chain.
		 * _numLayers = Number of layers in texture array.
		 * _format = Texture format. See: `TextureFormat::Enum`.
		 */
		alias da_bgfx_calc_texture_size = void function(bgfx_texture_info_t* _info, ushort _width, ushort _height, ushort _depth, bool _cubeMap, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format);
		da_bgfx_calc_texture_size bgfx_calc_texture_size;
		
		/**
		 * Create texture from memory buffer.
		 * Params:
		 * _mem = DDS, KTX or PVR texture binary data.
		 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
		 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
		 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
		 *   mode.
		 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
		 *   sampling.
		 * _skip = Skip top level mips when parsing texture.
		 * _info = When non-`NULL` is specified it returns parsed texture information.
		 */
		alias da_bgfx_create_texture = bgfx_texture_handle_t function(const(bgfx_memory_t)* _mem, ulong _flags, byte _skip, bgfx_texture_info_t* _info);
		da_bgfx_create_texture bgfx_create_texture;
		
		/**
		 * Create 2D texture.
		 * Params:
		 * _width = Width.
		 * _height = Height.
		 * _hasMips = Indicates that texture contains full mip-map chain.
		 * _numLayers = Number of layers in texture array. Must be 1 if caps
		 * `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
		 * _format = Texture format. See: `TextureFormat::Enum`.
		 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
		 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
		 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
		 *   mode.
		 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
		 *   sampling.
		 * _mem = Texture data. If `_mem` is non-NULL, created texture will be immutable. If
		 * `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
		 * 1, expected memory layout is texture and all mips together for each array element.
		 */
		alias da_bgfx_create_texture_2d = bgfx_texture_handle_t function(ushort _width, ushort _height, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags, const(bgfx_memory_t)* _mem);
		da_bgfx_create_texture_2d bgfx_create_texture_2d;
		
		/**
		 * Create texture with size based on backbuffer ratio. Texture will maintain ratio
		 * if back buffer resolution changes.
		 * Params:
		 * _ratio = Texture size in respect to back-buffer size. See: `BackbufferRatio::Enum`.
		 * _hasMips = Indicates that texture contains full mip-map chain.
		 * _numLayers = Number of layers in texture array. Must be 1 if caps
		 * `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
		 * _format = Texture format. See: `TextureFormat::Enum`.
		 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
		 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
		 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
		 *   mode.
		 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
		 *   sampling.
		 */
		alias da_bgfx_create_texture_2d_scaled = bgfx_texture_handle_t function(bgfx_backbuffer_ratio_t _ratio, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags);
		da_bgfx_create_texture_2d_scaled bgfx_create_texture_2d_scaled;
		
		/**
		 * Create 3D texture.
		 * Params:
		 * _width = Width.
		 * _height = Height.
		 * _depth = Depth.
		 * _hasMips = Indicates that texture contains full mip-map chain.
		 * _format = Texture format. See: `TextureFormat::Enum`.
		 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
		 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
		 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
		 *   mode.
		 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
		 *   sampling.
		 * _mem = Texture data. If `_mem` is non-NULL, created texture will be immutable. If
		 * `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
		 * 1, expected memory layout is texture and all mips together for each array element.
		 */
		alias da_bgfx_create_texture_3d = bgfx_texture_handle_t function(ushort _width, ushort _height, ushort _depth, bool _hasMips, bgfx_texture_format_t _format, ulong _flags, const(bgfx_memory_t)* _mem);
		da_bgfx_create_texture_3d bgfx_create_texture_3d;
		
		/**
		 * Create Cube texture.
		 * Params:
		 * _size = Cube side size.
		 * _hasMips = Indicates that texture contains full mip-map chain.
		 * _numLayers = Number of layers in texture array. Must be 1 if caps
		 * `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
		 * _format = Texture format. See: `TextureFormat::Enum`.
		 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
		 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
		 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
		 *   mode.
		 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
		 *   sampling.
		 * _mem = Texture data. If `_mem` is non-NULL, created texture will be immutable. If
		 * `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
		 * 1, expected memory layout is texture and all mips together for each array element.
		 */
		alias da_bgfx_create_texture_cube = bgfx_texture_handle_t function(ushort _size, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags, const(bgfx_memory_t)* _mem);
		da_bgfx_create_texture_cube bgfx_create_texture_cube;
		
		/**
		 * Update 2D texture.
		 * Attention: It's valid to update only mutable texture. See `bgfx::createTexture2D` for more info.
		 * Params:
		 * _handle = Texture handle.
		 * _layer = Layer in texture array.
		 * _mip = Mip level.
		 * _x = X offset in texture.
		 * _y = Y offset in texture.
		 * _width = Width of texture block.
		 * _height = Height of texture block.
		 * _mem = Texture update data.
		 * _pitch = Pitch of input image (bytes). When _pitch is set to
		 * UINT16_MAX, it will be calculated internally based on _width.
		 */
		alias da_bgfx_update_texture_2d = void function(bgfx_texture_handle_t _handle, ushort _layer, byte _mip, ushort _x, ushort _y, ushort _width, ushort _height, const(bgfx_memory_t)* _mem, ushort _pitch);
		da_bgfx_update_texture_2d bgfx_update_texture_2d;
		
		/**
		 * Update 3D texture.
		 * Attention: It's valid to update only mutable texture. See `bgfx::createTexture3D` for more info.
		 * Params:
		 * _handle = Texture handle.
		 * _mip = Mip level.
		 * _x = X offset in texture.
		 * _y = Y offset in texture.
		 * _z = Z offset in texture.
		 * _width = Width of texture block.
		 * _height = Height of texture block.
		 * _depth = Depth of texture block.
		 * _mem = Texture update data.
		 */
		alias da_bgfx_update_texture_3d = void function(bgfx_texture_handle_t _handle, byte _mip, ushort _x, ushort _y, ushort _z, ushort _width, ushort _height, ushort _depth, const(bgfx_memory_t)* _mem);
		da_bgfx_update_texture_3d bgfx_update_texture_3d;
		
		/**
		 * Update Cube texture.
		 * Attention: It's valid to update only mutable texture. See `bgfx::createTextureCube` for more info.
		 * Params:
		 * _handle = Texture handle.
		 * _layer = Layer in texture array.
		 * _side = Cubemap side `BGFX_CUBE_MAP_<POSITIVE or NEGATIVE>_<X, Y or Z>`,
		 *   where 0 is +X, 1 is -X, 2 is +Y, 3 is -Y, 4 is +Z, and 5 is -Z.
		 *                  +----------+
		 *                  |-z       2|
		 *                  | ^  +y    |
		 *                  | |        |    Unfolded cube:
		 *                  | +---->+x |
		 *       +----------+----------+----------+----------+
		 *       |+y       1|+y       4|+y       0|+y       5|
		 *       | ^  -x    | ^  +z    | ^  +x    | ^  -z    |
		 *       | |        | |        | |        | |        |
		 *       | +---->+z | +---->+x | +---->-z | +---->-x |
		 *       +----------+----------+----------+----------+
		 *                  |+z       3|
		 *                  | ^  -y    |
		 *                  | |        |
		 *                  | +---->+x |
		 *                  +----------+
		 * _mip = Mip level.
		 * _x = X offset in texture.
		 * _y = Y offset in texture.
		 * _width = Width of texture block.
		 * _height = Height of texture block.
		 * _mem = Texture update data.
		 * _pitch = Pitch of input image (bytes). When _pitch is set to
		 * UINT16_MAX, it will be calculated internally based on _width.
		 */
		alias da_bgfx_update_texture_cube = void function(bgfx_texture_handle_t _handle, ushort _layer, byte _side, byte _mip, ushort _x, ushort _y, ushort _width, ushort _height, const(bgfx_memory_t)* _mem, ushort _pitch);
		da_bgfx_update_texture_cube bgfx_update_texture_cube;
		
		/**
		 * Read back texture content.
		 * Attention: Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
		 * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
		 * Params:
		 * _handle = Texture handle.
		 * _data = Destination buffer.
		 * _mip = Mip level.
		 */
		alias da_bgfx_read_texture = uint function(bgfx_texture_handle_t _handle, void* _data, byte _mip);
		da_bgfx_read_texture bgfx_read_texture;
		
		/**
		 * Set texture debug name.
		 * Params:
		 * _handle = Texture handle.
		 * _name = Texture name.
		 * _len = Texture name length (if length is INT32_MAX, it's expected
		 * that _name is zero terminated string.
		 */
		alias da_bgfx_set_texture_name = void function(bgfx_texture_handle_t _handle, const(char)* _name, int _len);
		da_bgfx_set_texture_name bgfx_set_texture_name;
		
		/**
		 * Returns texture direct access pointer.
		 * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_DIRECT_ACCESS`. This feature
		 *   is available on GPUs that have unified memory architecture (UMA) support.
		 * Params:
		 * _handle = Texture handle.
		 */
		alias da_bgfx_get_direct_access_ptr = void* function(bgfx_texture_handle_t _handle);
		da_bgfx_get_direct_access_ptr bgfx_get_direct_access_ptr;
		
		/**
		 * Destroy texture.
		 * Params:
		 * _handle = Texture handle.
		 */
		alias da_bgfx_destroy_texture = void function(bgfx_texture_handle_t _handle);
		da_bgfx_destroy_texture bgfx_destroy_texture;
		
		/**
		 * Create frame buffer (simple).
		 * Params:
		 * _width = Texture width.
		 * _height = Texture height.
		 * _format = Texture format. See: `TextureFormat::Enum`.
		 * _textureFlags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
		 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
		 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
		 *   mode.
		 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
		 *   sampling.
		 */
		alias da_bgfx_create_frame_buffer = bgfx_frame_buffer_handle_t function(ushort _width, ushort _height, bgfx_texture_format_t _format, ulong _textureFlags);
		da_bgfx_create_frame_buffer bgfx_create_frame_buffer;
		
		/**
		 * Create frame buffer with size based on backbuffer ratio. Frame buffer will maintain ratio
		 * if back buffer resolution changes.
		 * Params:
		 * _ratio = Frame buffer size in respect to back-buffer size. See:
		 * `BackbufferRatio::Enum`.
		 * _format = Texture format. See: `TextureFormat::Enum`.
		 * _textureFlags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
		 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
		 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
		 *   mode.
		 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
		 *   sampling.
		 */
		alias da_bgfx_create_frame_buffer_scaled = bgfx_frame_buffer_handle_t function(bgfx_backbuffer_ratio_t _ratio, bgfx_texture_format_t _format, ulong _textureFlags);
		da_bgfx_create_frame_buffer_scaled bgfx_create_frame_buffer_scaled;
		
		/**
		 * Create MRT frame buffer from texture handles (simple).
		 * Params:
		 * _num = Number of texture handles.
		 * _handles = Texture attachments.
		 * _destroyTexture = If true, textures will be destroyed when
		 * frame buffer is destroyed.
		 */
		alias da_bgfx_create_frame_buffer_from_handles = bgfx_frame_buffer_handle_t function(byte _num, const(bgfx_texture_handle_t)* _handles, bool _destroyTexture);
		da_bgfx_create_frame_buffer_from_handles bgfx_create_frame_buffer_from_handles;
		
		/**
		 * Create MRT frame buffer from texture handles with specific layer and
		 * mip level.
		 * Params:
		 * _num = Number of attachements.
		 * _attachment = Attachment texture info. See: `bgfx::Attachment`.
		 * _destroyTexture = If true, textures will be destroyed when
		 * frame buffer is destroyed.
		 */
		alias da_bgfx_create_frame_buffer_from_attachment = bgfx_frame_buffer_handle_t function(byte _num, const(bgfx_attachment_t)* _attachment, bool _destroyTexture);
		da_bgfx_create_frame_buffer_from_attachment bgfx_create_frame_buffer_from_attachment;
		
		/**
		 * Create frame buffer for multiple window rendering.
		 * Remarks:
		 *   Frame buffer cannot be used for sampling.
		 * Attention: Availability depends on: `BGFX_CAPS_SWAP_CHAIN`.
		 * Params:
		 * _nwh = OS' target native window handle.
		 * _width = Window back buffer width.
		 * _height = Window back buffer height.
		 * _format = Window back buffer color format.
		 * _depthFormat = Window back buffer depth format.
		 */
		alias da_bgfx_create_frame_buffer_from_nwh = bgfx_frame_buffer_handle_t function(void* _nwh, ushort _width, ushort _height, bgfx_texture_format_t _format, bgfx_texture_format_t _depthFormat);
		da_bgfx_create_frame_buffer_from_nwh bgfx_create_frame_buffer_from_nwh;
		
		/**
		 * Set frame buffer debug name.
		 * Params:
		 * _handle = Frame buffer handle.
		 * _name = Frame buffer name.
		 * _len = Frame buffer name length (if length is INT32_MAX, it's expected
		 * that _name is zero terminated string.
		 */
		alias da_bgfx_set_frame_buffer_name = void function(bgfx_frame_buffer_handle_t _handle, const(char)* _name, int _len);
		da_bgfx_set_frame_buffer_name bgfx_set_frame_buffer_name;
		
		/**
		 * Obtain texture handle of frame buffer attachment.
		 * Params:
		 * _handle = Frame buffer handle.
		 */
		alias da_bgfx_get_texture = bgfx_texture_handle_t function(bgfx_frame_buffer_handle_t _handle, byte _attachment);
		da_bgfx_get_texture bgfx_get_texture;
		
		/**
		 * Destroy frame buffer.
		 * Params:
		 * _handle = Frame buffer handle.
		 */
		alias da_bgfx_destroy_frame_buffer = void function(bgfx_frame_buffer_handle_t _handle);
		da_bgfx_destroy_frame_buffer bgfx_destroy_frame_buffer;
		
		/**
		 * Create shader uniform parameter.
		 * Remarks:
		 *   1. Uniform names are unique. It's valid to call `bgfx::createUniform`
		 *      multiple times with the same uniform name. The library will always
		 *      return the same handle, but the handle reference count will be
		 *      incremented. This means that the same number of `bgfx::destroyUniform`
		 *      must be called to properly destroy the uniform.
		 *   2. Predefined uniforms (declared in `bgfx_shader.sh`):
		 *      - `u_viewRect vec4(x, y, width, height)` - view rectangle for current
		 *        view, in pixels.
		 *      - `u_viewTexel vec4(1.0/width, 1.0/height, undef, undef)` - inverse
		 *        width and height
		 *      - `u_view mat4` - view matrix
		 *      - `u_invView mat4` - inverted view matrix
		 *      - `u_proj mat4` - projection matrix
		 *      - `u_invProj mat4` - inverted projection matrix
		 *      - `u_viewProj mat4` - concatenated view projection matrix
		 *      - `u_invViewProj mat4` - concatenated inverted view projection matrix
		 *      - `u_model mat4[BGFX_CONFIG_MAX_BONES]` - array of model matrices.
		 *      - `u_modelView mat4` - concatenated model view matrix, only first
		 *        model matrix from array is used.
		 *      - `u_modelViewProj mat4` - concatenated model view projection matrix.
		 *      - `u_alphaRef float` - alpha reference value for alpha test.
		 * Params:
		 * _name = Uniform name in shader.
		 * _type = Type of uniform (See: `bgfx::UniformType`).
		 * _num = Number of elements in array.
		 */
		alias da_bgfx_create_uniform = bgfx_uniform_handle_t function(const(char)* _name, bgfx_uniform_type_t _type, ushort _num);
		da_bgfx_create_uniform bgfx_create_uniform;
		
		/**
		 * Retrieve uniform info.
		 * Params:
		 * _handle = Handle to uniform object.
		 * _info = Uniform info.
		 */
		alias da_bgfx_get_uniform_info = void function(bgfx_uniform_handle_t _handle, bgfx_uniform_info_t* _info);
		da_bgfx_get_uniform_info bgfx_get_uniform_info;
		
		/**
		 * Destroy shader uniform parameter.
		 * Params:
		 * _handle = Handle to uniform object.
		 */
		alias da_bgfx_destroy_uniform = void function(bgfx_uniform_handle_t _handle);
		da_bgfx_destroy_uniform bgfx_destroy_uniform;
		
		/**
		 * Create occlusion query.
		 */
		alias da_bgfx_create_occlusion_query = bgfx_occlusion_query_handle_t function();
		da_bgfx_create_occlusion_query bgfx_create_occlusion_query;
		
		/**
		 * Retrieve occlusion query result from previous frame.
		 * Params:
		 * _handle = Handle to occlusion query object.
		 * _result = Number of pixels that passed test. This argument
		 * can be `NULL` if result of occlusion query is not needed.
		 */
		alias da_bgfx_get_result = bgfx_occlusion_query_result_t function(bgfx_occlusion_query_handle_t _handle, int* _result);
		da_bgfx_get_result bgfx_get_result;
		
		/**
		 * Destroy occlusion query.
		 * Params:
		 * _handle = Handle to occlusion query object.
		 */
		alias da_bgfx_destroy_occlusion_query = void function(bgfx_occlusion_query_handle_t _handle);
		da_bgfx_destroy_occlusion_query bgfx_destroy_occlusion_query;
		
		/**
		 * Set palette color value.
		 * Params:
		 * _index = Index into palette.
		 * _rgba = RGBA floating point values.
		 */
		alias da_bgfx_set_palette_color = void function(byte _index, const float[4] _rgba);
		da_bgfx_set_palette_color bgfx_set_palette_color;
		
		/**
		 * Set palette color value.
		 * Params:
		 * _index = Index into palette.
		 * _rgba = Packed 32-bit RGBA value.
		 */
		alias da_bgfx_set_palette_color_rgba8 = void function(byte _index, uint _rgba);
		da_bgfx_set_palette_color_rgba8 bgfx_set_palette_color_rgba8;
		
		/**
		 * Set view name.
		 * Remarks:
		 *   This is debug only feature.
		 *   In graphics debugger view name will appear as:
		 *       "nnnc <view name>"
		 *        ^  ^ ^
		 *        |  +--- compute (C)
		 *        +------ view id
		 * Params:
		 * _id = View id.
		 * _name = View name.
		 */
		alias da_bgfx_set_view_name = void function(bgfx_view_id_t _id, const(char)* _name);
		da_bgfx_set_view_name bgfx_set_view_name;
		
		/**
		 * Set view rectangle. Draw primitive outside view will be clipped.
		 * Params:
		 * _id = View id.
		 * _x = Position x from the left corner of the window.
		 * _y = Position y from the top corner of the window.
		 * _width = Width of view port region.
		 * _height = Height of view port region.
		 */
		alias da_bgfx_set_view_rect = void function(bgfx_view_id_t _id, ushort _x, ushort _y, ushort _width, ushort _height);
		da_bgfx_set_view_rect bgfx_set_view_rect;
		
		/**
		 * Set view rectangle. Draw primitive outside view will be clipped.
		 * Params:
		 * _id = View id.
		 * _x = Position x from the left corner of the window.
		 * _y = Position y from the top corner of the window.
		 * _ratio = Width and height will be set in respect to back-buffer size.
		 * See: `BackbufferRatio::Enum`.
		 */
		alias da_bgfx_set_view_rect_ratio = void function(bgfx_view_id_t _id, ushort _x, ushort _y, bgfx_backbuffer_ratio_t _ratio);
		da_bgfx_set_view_rect_ratio bgfx_set_view_rect_ratio;
		
		/**
		 * Set view scissor. Draw primitive outside view will be clipped. When
		 * _x, _y, _width and _height are set to 0, scissor will be disabled.
		 * Params:
		 * _id = View id.
		 * _x = Position x from the left corner of the window.
		 * _y = Position y from the top corner of the window.
		 * _width = Width of view scissor region.
		 * _height = Height of view scissor region.
		 */
		alias da_bgfx_set_view_scissor = void function(bgfx_view_id_t _id, ushort _x, ushort _y, ushort _width, ushort _height);
		da_bgfx_set_view_scissor bgfx_set_view_scissor;
		
		/**
		 * Set view clear flags.
		 * Params:
		 * _id = View id.
		 * _flags = Clear flags. Use `BGFX_CLEAR_NONE` to remove any clear
		 * operation. See: `BGFX_CLEAR_*`.
		 * _rgba = Color clear value.
		 * _depth = Depth clear value.
		 * _stencil = Stencil clear value.
		 */
		alias da_bgfx_set_view_clear = void function(bgfx_view_id_t _id, ushort _flags, uint _rgba, float _depth, byte _stencil);
		da_bgfx_set_view_clear bgfx_set_view_clear;
		
		/**
		 * Set view clear flags with different clear color for each
		 * frame buffer texture. Must use `bgfx::setPaletteColor` to setup clear color
		 * palette.
		 * Params:
		 * _id = View id.
		 * _flags = Clear flags. Use `BGFX_CLEAR_NONE` to remove any clear
		 * operation. See: `BGFX_CLEAR_*`.
		 * _depth = Depth clear value.
		 * _stencil = Stencil clear value.
		 * _c0 = Palette index for frame buffer attachment 0.
		 * _c1 = Palette index for frame buffer attachment 1.
		 * _c2 = Palette index for frame buffer attachment 2.
		 * _c3 = Palette index for frame buffer attachment 3.
		 * _c4 = Palette index for frame buffer attachment 4.
		 * _c5 = Palette index for frame buffer attachment 5.
		 * _c6 = Palette index for frame buffer attachment 6.
		 * _c7 = Palette index for frame buffer attachment 7.
		 */
		alias da_bgfx_set_view_clear_mrt = void function(bgfx_view_id_t _id, ushort _flags, float _depth, byte _stencil, byte _c0, byte _c1, byte _c2, byte _c3, byte _c4, byte _c5, byte _c6, byte _c7);
		da_bgfx_set_view_clear_mrt bgfx_set_view_clear_mrt;
		
		/**
		 * Set view sorting mode.
		 * Remarks:
		 *   View mode must be set prior calling `bgfx::submit` for the view.
		 * Params:
		 * _id = View id.
		 * _mode = View sort mode. See `ViewMode::Enum`.
		 */
		alias da_bgfx_set_view_mode = void function(bgfx_view_id_t _id, bgfx_view_mode_t _mode);
		da_bgfx_set_view_mode bgfx_set_view_mode;
		
		/**
		 * Set view frame buffer.
		 * Remarks:
		 *   Not persistent after `bgfx::reset` call.
		 * Params:
		 * _id = View id.
		 * _handle = Frame buffer handle. Passing `BGFX_INVALID_HANDLE` as
		 * frame buffer handle will draw primitives from this view into
		 * default back buffer.
		 */
		alias da_bgfx_set_view_frame_buffer = void function(bgfx_view_id_t _id, bgfx_frame_buffer_handle_t _handle);
		da_bgfx_set_view_frame_buffer bgfx_set_view_frame_buffer;
		
		/**
		 * Set view view and projection matrices, all draw primitives in this
		 * view will use these matrices.
		 * Params:
		 * _id = View id.
		 * _view = View matrix.
		 * _proj = Projection matrix.
		 */
		alias da_bgfx_set_view_transform = void function(bgfx_view_id_t _id, const(void)* _view, const(void)* _proj);
		da_bgfx_set_view_transform bgfx_set_view_transform;
		
		/**
		 * Post submit view reordering.
		 * Params:
		 * _id = First view id.
		 * _num = Number of views to remap.
		 * _order = View remap id table. Passing `NULL` will reset view ids
		 * to default state.
		 */
		alias da_bgfx_set_view_order = void function(bgfx_view_id_t _id, ushort _num, const(bgfx_view_id_t)* _order);
		da_bgfx_set_view_order bgfx_set_view_order;
		
		/**
		 * Begin submitting draw calls from thread.
		 * Params:
		 * _forThread = Explicitly request an encoder for a worker thread.
		 */
		alias da_bgfx_encoder_begin = bgfx_encoder_t* function(bool _forThread);
		da_bgfx_encoder_begin bgfx_encoder_begin;
		
		/**
		 * End submitting draw calls from thread.
		 * Params:
		 * _encoder = Encoder.
		 */
		alias da_bgfx_encoder_end = void function(bgfx_encoder_t* _encoder);
		da_bgfx_encoder_end bgfx_encoder_end;
		
		/**
		 * Sets a debug marker. This allows you to group graphics calls together for easy browsing in
		 * graphics debugging tools.
		 * Params:
		 * _marker = Marker string.
		 */
		alias da_bgfx_encoder_set_marker = void function(bgfx_encoder_t* _this, const(char)* _marker);
		da_bgfx_encoder_set_marker bgfx_encoder_set_marker;
		
		/**
		 * Set render states for draw primitive.
		 * Remarks:
		 *   1. To setup more complex states use:
		 *      `BGFX_STATE_ALPHA_REF(_ref)`,
		 *      `BGFX_STATE_POINT_SIZE(_size)`,
		 *      `BGFX_STATE_BLEND_FUNC(_src, _dst)`,
		 *      `BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)`,
		 *      `BGFX_STATE_BLEND_EQUATION(_equation)`,
		 *      `BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)`
		 *   2. `BGFX_STATE_BLEND_EQUATION_ADD` is set when no other blend
		 *      equation is specified.
		 * Params:
		 * _state = State flags. Default state for primitive type is
		 *   triangles. See: `BGFX_STATE_DEFAULT`.
		 *   - `BGFX_STATE_DEPTH_TEST_*` - Depth test function.
		 *   - `BGFX_STATE_BLEND_*` - See remark 1 about BGFX_STATE_BLEND_FUNC.
		 *   - `BGFX_STATE_BLEND_EQUATION_*` - See remark 2.
		 *   - `BGFX_STATE_CULL_*` - Backface culling mode.
		 *   - `BGFX_STATE_WRITE_*` - Enable R, G, B, A or Z write.
		 *   - `BGFX_STATE_MSAA` - Enable hardware multisample antialiasing.
		 *   - `BGFX_STATE_PT_[TRISTRIP/LINES/POINTS]` - Primitive type.
		 * _rgba = Sets blend factor used by `BGFX_STATE_BLEND_FACTOR` and
		 *   `BGFX_STATE_BLEND_INV_FACTOR` blend modes.
		 */
		alias da_bgfx_encoder_set_state = void function(bgfx_encoder_t* _this, ulong _state, uint _rgba);
		da_bgfx_encoder_set_state bgfx_encoder_set_state;
		
		/**
		 * Set condition for rendering.
		 * Params:
		 * _handle = Occlusion query handle.
		 * _visible = Render if occlusion query is visible.
		 */
		alias da_bgfx_encoder_set_condition = void function(bgfx_encoder_t* _this, bgfx_occlusion_query_handle_t _handle, bool _visible);
		da_bgfx_encoder_set_condition bgfx_encoder_set_condition;
		
		/**
		 * Set stencil test state.
		 * Params:
		 * _fstencil = Front stencil state.
		 * _bstencil = Back stencil state. If back is set to `BGFX_STENCIL_NONE`
		 * _fstencil is applied to both front and back facing primitives.
		 */
		alias da_bgfx_encoder_set_stencil = void function(bgfx_encoder_t* _this, uint _fstencil, uint _bstencil);
		da_bgfx_encoder_set_stencil bgfx_encoder_set_stencil;
		
		/**
		 * Set scissor for draw primitive.
		 * Remarks:
		 *   To scissor for all primitives in view see `bgfx::setViewScissor`.
		 * Params:
		 * _x = Position x from the left corner of the window.
		 * _y = Position y from the top corner of the window.
		 * _width = Width of view scissor region.
		 * _height = Height of view scissor region.
		 */
		alias da_bgfx_encoder_set_scissor = ushort function(bgfx_encoder_t* _this, ushort _x, ushort _y, ushort _width, ushort _height);
		da_bgfx_encoder_set_scissor bgfx_encoder_set_scissor;
		
		/**
		 * Set scissor from cache for draw primitive.
		 * Remarks:
		 *   To scissor for all primitives in view see `bgfx::setViewScissor`.
		 * Params:
		 * _cache = Index in scissor cache.
		 */
		alias da_bgfx_encoder_set_scissor_cached = void function(bgfx_encoder_t* _this, ushort _cache);
		da_bgfx_encoder_set_scissor_cached bgfx_encoder_set_scissor_cached;
		
		/**
		 * Set model matrix for draw primitive. If it is not called,
		 * the model will be rendered with an identity model matrix.
		 * Params:
		 * _mtx = Pointer to first matrix in array.
		 * _num = Number of matrices in array.
		 */
		alias da_bgfx_encoder_set_transform = uint function(bgfx_encoder_t* _this, const(void)* _mtx, ushort _num);
		da_bgfx_encoder_set_transform bgfx_encoder_set_transform;
		
		/**
		 *  Set model matrix from matrix cache for draw primitive.
		 * Params:
		 * _cache = Index in matrix cache.
		 * _num = Number of matrices from cache.
		 */
		alias da_bgfx_encoder_set_transform_cached = void function(bgfx_encoder_t* _this, uint _cache, ushort _num);
		da_bgfx_encoder_set_transform_cached bgfx_encoder_set_transform_cached;
		
		/**
		 * Reserve matrices in internal matrix cache.
		 * Attention: Pointer returned can be modifed until `bgfx::frame` is called.
		 * Params:
		 * _transform = Pointer to `Transform` structure.
		 * _num = Number of matrices.
		 */
		alias da_bgfx_encoder_alloc_transform = uint function(bgfx_encoder_t* _this, bgfx_transform_t* _transform, ushort _num);
		da_bgfx_encoder_alloc_transform bgfx_encoder_alloc_transform;
		
		/**
		 * Set shader uniform parameter for draw primitive.
		 * Params:
		 * _handle = Uniform.
		 * _value = Pointer to uniform data.
		 * _num = Number of elements. Passing `UINT16_MAX` will
		 * use the _num passed on uniform creation.
		 */
		alias da_bgfx_encoder_set_uniform = void function(bgfx_encoder_t* _this, bgfx_uniform_handle_t _handle, const(void)* _value, ushort _num);
		da_bgfx_encoder_set_uniform bgfx_encoder_set_uniform;
		
		/**
		 * Set index buffer for draw primitive.
		 * Params:
		 * _handle = Index buffer.
		 * _firstIndex = First index to render.
		 * _numIndices = Number of indices to render.
		 */
		alias da_bgfx_encoder_set_index_buffer = void function(bgfx_encoder_t* _this, bgfx_index_buffer_handle_t _handle, uint _firstIndex, uint _numIndices);
		da_bgfx_encoder_set_index_buffer bgfx_encoder_set_index_buffer;
		
		/**
		 * Set index buffer for draw primitive.
		 * Params:
		 * _handle = Dynamic index buffer.
		 * _firstIndex = First index to render.
		 * _numIndices = Number of indices to render.
		 */
		alias da_bgfx_encoder_set_dynamic_index_buffer = void function(bgfx_encoder_t* _this, bgfx_dynamic_index_buffer_handle_t _handle, uint _firstIndex, uint _numIndices);
		da_bgfx_encoder_set_dynamic_index_buffer bgfx_encoder_set_dynamic_index_buffer;
		
		/**
		 * Set index buffer for draw primitive.
		 * Params:
		 * _tib = Transient index buffer.
		 * _firstIndex = First index to render.
		 * _numIndices = Number of indices to render.
		 */
		alias da_bgfx_encoder_set_transient_index_buffer = void function(bgfx_encoder_t* _this, const(bgfx_transient_index_buffer_t)* _tib, uint _firstIndex, uint _numIndices);
		da_bgfx_encoder_set_transient_index_buffer bgfx_encoder_set_transient_index_buffer;
		
		/**
		 * Set vertex buffer for draw primitive.
		 * Params:
		 * _stream = Vertex stream.
		 * _handle = Vertex buffer.
		 * _startVertex = First vertex to render.
		 * _numVertices = Number of vertices to render.
		 * _layoutHandle = Vertex layout for aliasing vertex buffer.
		 */
		alias da_bgfx_encoder_set_vertex_buffer = void function(bgfx_encoder_t* _this, byte _stream, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
		da_bgfx_encoder_set_vertex_buffer bgfx_encoder_set_vertex_buffer;
		
		/**
		 * Set vertex buffer for draw primitive.
		 * Params:
		 * _stream = Vertex stream.
		 * _handle = Dynamic vertex buffer.
		 * _startVertex = First vertex to render.
		 * _numVertices = Number of vertices to render.
		 * _layoutHandle = Vertex layout for aliasing vertex buffer.
		 */
		alias da_bgfx_encoder_set_dynamic_vertex_buffer = void function(bgfx_encoder_t* _this, byte _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
		da_bgfx_encoder_set_dynamic_vertex_buffer bgfx_encoder_set_dynamic_vertex_buffer;
		
		/**
		 * Set vertex buffer for draw primitive.
		 * Params:
		 * _stream = Vertex stream.
		 * _tvb = Transient vertex buffer.
		 * _startVertex = First vertex to render.
		 * _numVertices = Number of vertices to render.
		 * _layoutHandle = Vertex layout for aliasing vertex buffer.
		 */
		alias da_bgfx_encoder_set_transient_vertex_buffer = void function(bgfx_encoder_t* _this, byte _stream, const(bgfx_transient_vertex_buffer_t)* _tvb, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
		da_bgfx_encoder_set_transient_vertex_buffer bgfx_encoder_set_transient_vertex_buffer;
		
		/**
		 * Set number of vertices for auto generated vertices use in conjuction
		 * with gl_VertexID.
		 * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
		 * Params:
		 * _numVertices = Number of vertices.
		 */
		alias da_bgfx_encoder_set_vertex_count = void function(bgfx_encoder_t* _this, uint _numVertices);
		da_bgfx_encoder_set_vertex_count bgfx_encoder_set_vertex_count;
		
		/**
		 * Set instance data buffer for draw primitive.
		 * Params:
		 * _idb = Transient instance data buffer.
		 * _start = First instance data.
		 * _num = Number of data instances.
		 */
		alias da_bgfx_encoder_set_instance_data_buffer = void function(bgfx_encoder_t* _this, const(bgfx_instance_data_buffer_t)* _idb, uint _start, uint _num);
		da_bgfx_encoder_set_instance_data_buffer bgfx_encoder_set_instance_data_buffer;
		
		/**
		 * Set instance data buffer for draw primitive.
		 * Params:
		 * _handle = Vertex buffer.
		 * _startVertex = First instance data.
		 * _num = Number of data instances.
		 * Set instance data buffer for draw primitive.
		 */
		alias da_bgfx_encoder_set_instance_data_from_vertex_buffer = void function(bgfx_encoder_t* _this, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _num);
		da_bgfx_encoder_set_instance_data_from_vertex_buffer bgfx_encoder_set_instance_data_from_vertex_buffer;
		
		/**
		 * Set instance data buffer for draw primitive.
		 * Params:
		 * _handle = Dynamic vertex buffer.
		 * _startVertex = First instance data.
		 * _num = Number of data instances.
		 */
		alias da_bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer = void function(bgfx_encoder_t* _this, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _num);
		da_bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer;
		
		/**
		 * Set number of instances for auto generated instances use in conjuction
		 * with gl_InstanceID.
		 * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
		 */
		alias da_bgfx_encoder_set_instance_count = void function(bgfx_encoder_t* _this, uint _numInstances);
		da_bgfx_encoder_set_instance_count bgfx_encoder_set_instance_count;
		
		/**
		 * Set texture stage for draw primitive.
		 * Params:
		 * _stage = Texture unit.
		 * _sampler = Program sampler.
		 * _handle = Texture handle.
		 * _flags = Texture sampling mode. Default value UINT32_MAX uses
		 *   texture sampling settings from the texture.
		 *   - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
		 *     mode.
		 *   - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
		 *     sampling.
		 */
		alias da_bgfx_encoder_set_texture = void function(bgfx_encoder_t* _this, byte _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint _flags);
		da_bgfx_encoder_set_texture bgfx_encoder_set_texture;
		
		/**
		 * Submit an empty primitive for rendering. Uniforms and draw state
		 * will be applied but no geometry will be submitted.
		 * Remarks:
		 *   These empty draw calls will sort before ordinary draw calls.
		 * Params:
		 * _id = View id.
		 */
		alias da_bgfx_encoder_touch = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id);
		da_bgfx_encoder_touch bgfx_encoder_touch;
		
		/**
		 * Submit primitive for rendering.
		 * Params:
		 * _id = View id.
		 * _program = Program.
		 * _depth = Depth for sorting.
		 * _preserveState = Preserve internal draw state for next draw call submit.
		 */
		alias da_bgfx_encoder_submit = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, bool _preserveState);
		da_bgfx_encoder_submit bgfx_encoder_submit;
		
		/**
		 * Submit primitive with occlusion query for rendering.
		 * Params:
		 * _id = View id.
		 * _program = Program.
		 * _occlusionQuery = Occlusion query.
		 * _depth = Depth for sorting.
		 * _preserveState = Preserve internal draw state for next draw call submit.
		 */
		alias da_bgfx_encoder_submit_occlusion_query = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, bool _preserveState);
		da_bgfx_encoder_submit_occlusion_query bgfx_encoder_submit_occlusion_query;
		
		/**
		 * Submit primitive for rendering with index and instance data info from
		 * indirect buffer.
		 * Params:
		 * _id = View id.
		 * _program = Program.
		 * _indirectHandle = Indirect buffer.
		 * _start = First element in indirect buffer.
		 * _num = Number of dispatches.
		 * _depth = Depth for sorting.
		 * _preserveState = Preserve internal draw state for next draw call submit.
		 */
		alias da_bgfx_encoder_submit_indirect = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, bool _preserveState);
		da_bgfx_encoder_submit_indirect bgfx_encoder_submit_indirect;
		
		/**
		 * Set compute index buffer.
		 * Params:
		 * _stage = Compute stage.
		 * _handle = Index buffer handle.
		 * _access = Buffer access. See `Access::Enum`.
		 */
		alias da_bgfx_encoder_set_compute_index_buffer = void function(bgfx_encoder_t* _this, byte _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access);
		da_bgfx_encoder_set_compute_index_buffer bgfx_encoder_set_compute_index_buffer;
		
		/**
		 * Set compute vertex buffer.
		 * Params:
		 * _stage = Compute stage.
		 * _handle = Vertex buffer handle.
		 * _access = Buffer access. See `Access::Enum`.
		 */
		alias da_bgfx_encoder_set_compute_vertex_buffer = void function(bgfx_encoder_t* _this, byte _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access);
		da_bgfx_encoder_set_compute_vertex_buffer bgfx_encoder_set_compute_vertex_buffer;
		
		/**
		 * Set compute dynamic index buffer.
		 * Params:
		 * _stage = Compute stage.
		 * _handle = Dynamic index buffer handle.
		 * _access = Buffer access. See `Access::Enum`.
		 */
		alias da_bgfx_encoder_set_compute_dynamic_index_buffer = void function(bgfx_encoder_t* _this, byte _stage, bgfx_dynamic_index_buffer_handle_t _handle, bgfx_access_t _access);
		da_bgfx_encoder_set_compute_dynamic_index_buffer bgfx_encoder_set_compute_dynamic_index_buffer;
		
		/**
		 * Set compute dynamic vertex buffer.
		 * Params:
		 * _stage = Compute stage.
		 * _handle = Dynamic vertex buffer handle.
		 * _access = Buffer access. See `Access::Enum`.
		 */
		alias da_bgfx_encoder_set_compute_dynamic_vertex_buffer = void function(bgfx_encoder_t* _this, byte _stage, bgfx_dynamic_vertex_buffer_handle_t _handle, bgfx_access_t _access);
		da_bgfx_encoder_set_compute_dynamic_vertex_buffer bgfx_encoder_set_compute_dynamic_vertex_buffer;
		
		/**
		 * Set compute indirect buffer.
		 * Params:
		 * _stage = Compute stage.
		 * _handle = Indirect buffer handle.
		 * _access = Buffer access. See `Access::Enum`.
		 */
		alias da_bgfx_encoder_set_compute_indirect_buffer = void function(bgfx_encoder_t* _this, byte _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access);
		da_bgfx_encoder_set_compute_indirect_buffer bgfx_encoder_set_compute_indirect_buffer;
		
		/**
		 * Set compute image from texture.
		 * Params:
		 * _stage = Compute stage.
		 * _handle = Texture handle.
		 * _mip = Mip level.
		 * _access = Image access. See `Access::Enum`.
		 * _format = Texture format. See: `TextureFormat::Enum`.
		 */
		alias da_bgfx_encoder_set_image = void function(bgfx_encoder_t* _this, byte _stage, bgfx_texture_handle_t _handle, byte _mip, bgfx_access_t _access, bgfx_texture_format_t _format);
		da_bgfx_encoder_set_image bgfx_encoder_set_image;
		
		/**
		 * Dispatch compute.
		 * Params:
		 * _id = View id.
		 * _program = Compute program.
		 * _numX = Number of groups X.
		 * _numY = Number of groups Y.
		 * _numZ = Number of groups Z.
		 */
		alias da_bgfx_encoder_dispatch = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _numX, uint _numY, uint _numZ);
		da_bgfx_encoder_dispatch bgfx_encoder_dispatch;
		
		/**
		 * Dispatch compute indirect.
		 * Params:
		 * _id = View id.
		 * _program = Compute program.
		 * _indirectHandle = Indirect buffer.
		 * _start = First element in indirect buffer.
		 * _num = Number of dispatches.
		 */
		alias da_bgfx_encoder_dispatch_indirect = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num);
		da_bgfx_encoder_dispatch_indirect bgfx_encoder_dispatch_indirect;
		
		/**
		 * Discard all previously set state for draw or compute call.
		 */
		alias da_bgfx_encoder_discard = void function(bgfx_encoder_t* _this);
		da_bgfx_encoder_discard bgfx_encoder_discard;
		
		/**
		 * Blit 2D texture region between two 2D textures.
		 * Attention: Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
		 * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
		 * Params:
		 * _id = View id.
		 * _dst = Destination texture handle.
		 * _dstMip = Destination texture mip level.
		 * _dstX = Destination texture X position.
		 * _dstY = Destination texture Y position.
		 * _dstZ = If texture is 2D this argument should be 0. If destination texture is cube
		 * this argument represents destination texture cube face. For 3D texture this argument
		 * represents destination texture Z position.
		 * _src = Source texture handle.
		 * _srcMip = Source texture mip level.
		 * _srcX = Source texture X position.
		 * _srcY = Source texture Y position.
		 * _srcZ = If texture is 2D this argument should be 0. If source texture is cube
		 * this argument represents source texture cube face. For 3D texture this argument
		 * represents source texture Z position.
		 * _width = Width of region.
		 * _height = Height of region.
		 * _depth = If texture is 3D this argument represents depth of region, otherwise it's
		 * unused.
		 */
		alias da_bgfx_encoder_blit = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_texture_handle_t _dst, byte _dstMip, ushort _dstX, ushort _dstY, ushort _dstZ, bgfx_texture_handle_t _src, byte _srcMip, ushort _srcX, ushort _srcY, ushort _srcZ, ushort _width, ushort _height, ushort _depth);
		da_bgfx_encoder_blit bgfx_encoder_blit;
		
		/**
		 * Request screen shot of window back buffer.
		 * Remarks:
		 *   `bgfx::CallbackI::screenShot` must be implemented.
		 * Attention: Frame buffer handle must be created with OS' target native window handle.
		 * Params:
		 * _handle = Frame buffer handle. If handle is `BGFX_INVALID_HANDLE` request will be
		 * made for main window back buffer.
		 * _filePath = Will be passed to `bgfx::CallbackI::screenShot` callback.
		 */
		alias da_bgfx_request_screen_shot = void function(bgfx_frame_buffer_handle_t _handle, const(char)* _filePath);
		da_bgfx_request_screen_shot bgfx_request_screen_shot;
		
		/**
		 * Render frame.
		 * Attention: `bgfx::renderFrame` is blocking call. It waits for
		 *   `bgfx::frame` to be called from API thread to process frame.
		 *   If timeout value is passed call will timeout and return even
		 *   if `bgfx::frame` is not called.
		 * Warning: This call should be only used on platforms that don't
		 *   allow creating separate rendering thread. If it is called before
		 *   to bgfx::init, render thread won't be created by bgfx::init call.
		 * Params:
		 * _msecs = Timeout in milliseconds.
		 */
		alias da_bgfx_render_frame = bgfx_render_frame_t function(int _msecs);
		da_bgfx_render_frame bgfx_render_frame;
		
		/**
		 * Set platform data.
		 * Warning: Must be called before `bgfx::init`.
		 * Params:
		 * _data = Platform data.
		 */
		alias da_bgfx_set_platform_data = void function(const(bgfx_platform_data_t)* _data);
		da_bgfx_set_platform_data bgfx_set_platform_data;
		
		/**
		 * Get internal data for interop.
		 * Attention: It's expected you understand some bgfx internals before you
		 *   use this call.
		 * Warning: Must be called only on render thread.
		 */
		alias da_bgfx_get_internal_data = const(bgfx_internal_data_t)* function();
		da_bgfx_get_internal_data bgfx_get_internal_data;
		
		/**
		 * Override internal texture with externally created texture. Previously
		 * created internal texture will released.
		 * Attention: It's expected you understand some bgfx internals before you
		 *   use this call.
		 * Warning: Must be called only on render thread.
		 * Params:
		 * _handle = Texture handle.
		 * _ptr = Native API pointer to texture.
		 */
		alias da_bgfx_override_internal_texture_ptr = ulong function(bgfx_texture_handle_t _handle, ulong _ptr);
		da_bgfx_override_internal_texture_ptr bgfx_override_internal_texture_ptr;
		
		/**
		 * Override internal texture by creating new texture. Previously created
		 * internal texture will released.
		 * Attention: It's expected you understand some bgfx internals before you
		 *   use this call.
		 * Returns: Native API pointer to texture. If result is 0, texture is not created yet from the
		 *   main thread.
		 * Warning: Must be called only on render thread.
		 * Params:
		 * _handle = Texture handle.
		 * _width = Width.
		 * _height = Height.
		 * _numMips = Number of mip-maps.
		 * _format = Texture format. See: `TextureFormat::Enum`.
		 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
		 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
		 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
		 *   mode.
		 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
		 *   sampling.
		 */
		alias da_bgfx_override_internal_texture = ulong function(bgfx_texture_handle_t _handle, ushort _width, ushort _height, byte _numMips, bgfx_texture_format_t _format, ulong _flags);
		da_bgfx_override_internal_texture bgfx_override_internal_texture;
		
		/**
		 * Sets a debug marker. This allows you to group graphics calls together for easy browsing in
		 * graphics debugging tools.
		 * Params:
		 * _marker = Marker string.
		 */
		alias da_bgfx_set_marker = void function(const(char)* _marker);
		da_bgfx_set_marker bgfx_set_marker;
		
		/**
		 * Set render states for draw primitive.
		 * Remarks:
		 *   1. To setup more complex states use:
		 *      `BGFX_STATE_ALPHA_REF(_ref)`,
		 *      `BGFX_STATE_POINT_SIZE(_size)`,
		 *      `BGFX_STATE_BLEND_FUNC(_src, _dst)`,
		 *      `BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)`,
		 *      `BGFX_STATE_BLEND_EQUATION(_equation)`,
		 *      `BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)`
		 *   2. `BGFX_STATE_BLEND_EQUATION_ADD` is set when no other blend
		 *      equation is specified.
		 * Params:
		 * _state = State flags. Default state for primitive type is
		 *   triangles. See: `BGFX_STATE_DEFAULT`.
		 *   - `BGFX_STATE_DEPTH_TEST_*` - Depth test function.
		 *   - `BGFX_STATE_BLEND_*` - See remark 1 about BGFX_STATE_BLEND_FUNC.
		 *   - `BGFX_STATE_BLEND_EQUATION_*` - See remark 2.
		 *   - `BGFX_STATE_CULL_*` - Backface culling mode.
		 *   - `BGFX_STATE_WRITE_*` - Enable R, G, B, A or Z write.
		 *   - `BGFX_STATE_MSAA` - Enable hardware multisample antialiasing.
		 *   - `BGFX_STATE_PT_[TRISTRIP/LINES/POINTS]` - Primitive type.
		 * _rgba = Sets blend factor used by `BGFX_STATE_BLEND_FACTOR` and
		 *   `BGFX_STATE_BLEND_INV_FACTOR` blend modes.
		 */
		alias da_bgfx_set_state = void function(ulong _state, uint _rgba);
		da_bgfx_set_state bgfx_set_state;
		
		/**
		 * Set condition for rendering.
		 * Params:
		 * _handle = Occlusion query handle.
		 * _visible = Render if occlusion query is visible.
		 */
		alias da_bgfx_set_condition = void function(bgfx_occlusion_query_handle_t _handle, bool _visible);
		da_bgfx_set_condition bgfx_set_condition;
		
		/**
		 * Set stencil test state.
		 * Params:
		 * _fstencil = Front stencil state.
		 * _bstencil = Back stencil state. If back is set to `BGFX_STENCIL_NONE`
		 * _fstencil is applied to both front and back facing primitives.
		 */
		alias da_bgfx_set_stencil = void function(uint _fstencil, uint _bstencil);
		da_bgfx_set_stencil bgfx_set_stencil;
		
		/**
		 * Set scissor for draw primitive.
		 * Remarks:
		 *   To scissor for all primitives in view see `bgfx::setViewScissor`.
		 * Params:
		 * _x = Position x from the left corner of the window.
		 * _y = Position y from the top corner of the window.
		 * _width = Width of view scissor region.
		 * _height = Height of view scissor region.
		 */
		alias da_bgfx_set_scissor = ushort function(ushort _x, ushort _y, ushort _width, ushort _height);
		da_bgfx_set_scissor bgfx_set_scissor;
		
		/**
		 * Set scissor from cache for draw primitive.
		 * Remarks:
		 *   To scissor for all primitives in view see `bgfx::setViewScissor`.
		 * Params:
		 * _cache = Index in scissor cache.
		 */
		alias da_bgfx_set_scissor_cached = void function(ushort _cache);
		da_bgfx_set_scissor_cached bgfx_set_scissor_cached;
		
		/**
		 * Set model matrix for draw primitive. If it is not called,
		 * the model will be rendered with an identity model matrix.
		 * Params:
		 * _mtx = Pointer to first matrix in array.
		 * _num = Number of matrices in array.
		 */
		alias da_bgfx_set_transform = uint function(const(void)* _mtx, ushort _num);
		da_bgfx_set_transform bgfx_set_transform;
		
		/**
		 *  Set model matrix from matrix cache for draw primitive.
		 * Params:
		 * _cache = Index in matrix cache.
		 * _num = Number of matrices from cache.
		 */
		alias da_bgfx_set_transform_cached = void function(uint _cache, ushort _num);
		da_bgfx_set_transform_cached bgfx_set_transform_cached;
		
		/**
		 * Reserve matrices in internal matrix cache.
		 * Attention: Pointer returned can be modifed until `bgfx::frame` is called.
		 * Params:
		 * _transform = Pointer to `Transform` structure.
		 * _num = Number of matrices.
		 */
		alias da_bgfx_alloc_transform = uint function(bgfx_transform_t* _transform, ushort _num);
		da_bgfx_alloc_transform bgfx_alloc_transform;
		
		/**
		 * Set shader uniform parameter for draw primitive.
		 * Params:
		 * _handle = Uniform.
		 * _value = Pointer to uniform data.
		 * _num = Number of elements. Passing `UINT16_MAX` will
		 * use the _num passed on uniform creation.
		 */
		alias da_bgfx_set_uniform = void function(bgfx_uniform_handle_t _handle, const(void)* _value, ushort _num);
		da_bgfx_set_uniform bgfx_set_uniform;
		
		/**
		 * Set index buffer for draw primitive.
		 * Params:
		 * _handle = Index buffer.
		 * _firstIndex = First index to render.
		 * _numIndices = Number of indices to render.
		 */
		alias da_bgfx_set_index_buffer = void function(bgfx_index_buffer_handle_t _handle, uint _firstIndex, uint _numIndices);
		da_bgfx_set_index_buffer bgfx_set_index_buffer;
		
		/**
		 * Set index buffer for draw primitive.
		 * Params:
		 * _handle = Dynamic index buffer.
		 * _firstIndex = First index to render.
		 * _numIndices = Number of indices to render.
		 */
		alias da_bgfx_set_dynamic_index_buffer = void function(bgfx_dynamic_index_buffer_handle_t _handle, uint _firstIndex, uint _numIndices);
		da_bgfx_set_dynamic_index_buffer bgfx_set_dynamic_index_buffer;
		
		/**
		 * Set index buffer for draw primitive.
		 * Params:
		 * _tib = Transient index buffer.
		 * _firstIndex = First index to render.
		 * _numIndices = Number of indices to render.
		 */
		alias da_bgfx_set_transient_index_buffer = void function(const(bgfx_transient_index_buffer_t)* _tib, uint _firstIndex, uint _numIndices);
		da_bgfx_set_transient_index_buffer bgfx_set_transient_index_buffer;
		
		/**
		 * Set vertex buffer for draw primitive.
		 * Params:
		 * _stream = Vertex stream.
		 * _handle = Vertex buffer.
		 * _startVertex = First vertex to render.
		 * _numVertices = Number of vertices to render.
		 */
		alias da_bgfx_set_vertex_buffer = void function(byte _stream, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices);
		da_bgfx_set_vertex_buffer bgfx_set_vertex_buffer;
		
		/**
		 * Set vertex buffer for draw primitive.
		 * Params:
		 * _stream = Vertex stream.
		 * _handle = Dynamic vertex buffer.
		 * _startVertex = First vertex to render.
		 * _numVertices = Number of vertices to render.
		 */
		alias da_bgfx_set_dynamic_vertex_buffer = void function(byte _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices);
		da_bgfx_set_dynamic_vertex_buffer bgfx_set_dynamic_vertex_buffer;
		
		/**
		 * Set vertex buffer for draw primitive.
		 * Params:
		 * _stream = Vertex stream.
		 * _tvb = Transient vertex buffer.
		 * _startVertex = First vertex to render.
		 * _numVertices = Number of vertices to render.
		 */
		alias da_bgfx_set_transient_vertex_buffer = void function(byte _stream, const(bgfx_transient_vertex_buffer_t)* _tvb, uint _startVertex, uint _numVertices);
		da_bgfx_set_transient_vertex_buffer bgfx_set_transient_vertex_buffer;
		
		/**
		 * Set number of vertices for auto generated vertices use in conjuction
		 * with gl_VertexID.
		 * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
		 * Params:
		 * _numVertices = Number of vertices.
		 */
		alias da_bgfx_set_vertex_count = void function(uint _numVertices);
		da_bgfx_set_vertex_count bgfx_set_vertex_count;
		
		/**
		 * Set instance data buffer for draw primitive.
		 * Params:
		 * _idb = Transient instance data buffer.
		 * _start = First instance data.
		 * _num = Number of data instances.
		 */
		alias da_bgfx_set_instance_data_buffer = void function(const(bgfx_instance_data_buffer_t)* _idb, uint _start, uint _num);
		da_bgfx_set_instance_data_buffer bgfx_set_instance_data_buffer;
		
		/**
		 * Set instance data buffer for draw primitive.
		 * Params:
		 * _handle = Vertex buffer.
		 * _startVertex = First instance data.
		 * _num = Number of data instances.
		 * Set instance data buffer for draw primitive.
		 */
		alias da_bgfx_set_instance_data_from_vertex_buffer = void function(bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _num);
		da_bgfx_set_instance_data_from_vertex_buffer bgfx_set_instance_data_from_vertex_buffer;
		
		/**
		 * Set instance data buffer for draw primitive.
		 * Params:
		 * _handle = Dynamic vertex buffer.
		 * _startVertex = First instance data.
		 * _num = Number of data instances.
		 */
		alias da_bgfx_set_instance_data_from_dynamic_vertex_buffer = void function(bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _num);
		da_bgfx_set_instance_data_from_dynamic_vertex_buffer bgfx_set_instance_data_from_dynamic_vertex_buffer;
		
		/**
		 * Set number of instances for auto generated instances use in conjuction
		 * with gl_InstanceID.
		 * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
		 */
		alias da_bgfx_set_instance_count = void function(uint _numInstances);
		da_bgfx_set_instance_count bgfx_set_instance_count;
		
		/**
		 * Set texture stage for draw primitive.
		 * Params:
		 * _stage = Texture unit.
		 * _sampler = Program sampler.
		 * _handle = Texture handle.
		 * _flags = Texture sampling mode. Default value UINT32_MAX uses
		 *   texture sampling settings from the texture.
		 *   - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
		 *     mode.
		 *   - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
		 *     sampling.
		 */
		alias da_bgfx_set_texture = void function(byte _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint _flags);
		da_bgfx_set_texture bgfx_set_texture;
		
		/**
		 * Submit an empty primitive for rendering. Uniforms and draw state
		 * will be applied but no geometry will be submitted.
		 * Remarks:
		 *   These empty draw calls will sort before ordinary draw calls.
		 * Params:
		 * _id = View id.
		 */
		alias da_bgfx_touch = void function(bgfx_view_id_t _id);
		da_bgfx_touch bgfx_touch;
		
		/**
		 * Submit primitive for rendering.
		 * Params:
		 * _id = View id.
		 * _program = Program.
		 * _depth = Depth for sorting.
		 * _preserveState = Preserve internal draw state for next draw call submit.
		 */
		alias da_bgfx_submit = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, bool _preserveState);
		da_bgfx_submit bgfx_submit;
		
		/**
		 * Submit primitive with occlusion query for rendering.
		 * Params:
		 * _id = View id.
		 * _program = Program.
		 * _occlusionQuery = Occlusion query.
		 * _depth = Depth for sorting.
		 * _preserveState = Preserve internal draw state for next draw call submit.
		 */
		alias da_bgfx_submit_occlusion_query = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, bool _preserveState);
		da_bgfx_submit_occlusion_query bgfx_submit_occlusion_query;
		
		/**
		 * Submit primitive for rendering with index and instance data info from
		 * indirect buffer.
		 * Params:
		 * _id = View id.
		 * _program = Program.
		 * _indirectHandle = Indirect buffer.
		 * _start = First element in indirect buffer.
		 * _num = Number of dispatches.
		 * _depth = Depth for sorting.
		 * _preserveState = Preserve internal draw state for next draw call submit.
		 */
		alias da_bgfx_submit_indirect = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, bool _preserveState);
		da_bgfx_submit_indirect bgfx_submit_indirect;
		
		/**
		 * Set compute index buffer.
		 * Params:
		 * _stage = Compute stage.
		 * _handle = Index buffer handle.
		 * _access = Buffer access. See `Access::Enum`.
		 */
		alias da_bgfx_set_compute_index_buffer = void function(byte _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access);
		da_bgfx_set_compute_index_buffer bgfx_set_compute_index_buffer;
		
		/**
		 * Set compute vertex buffer.
		 * Params:
		 * _stage = Compute stage.
		 * _handle = Vertex buffer handle.
		 * _access = Buffer access. See `Access::Enum`.
		 */
		alias da_bgfx_set_compute_vertex_buffer = void function(byte _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access);
		da_bgfx_set_compute_vertex_buffer bgfx_set_compute_vertex_buffer;
		
		/**
		 * Set compute dynamic index buffer.
		 * Params:
		 * _stage = Compute stage.
		 * _handle = Dynamic index buffer handle.
		 * _access = Buffer access. See `Access::Enum`.
		 */
		alias da_bgfx_set_compute_dynamic_index_buffer = void function(byte _stage, bgfx_dynamic_index_buffer_handle_t _handle, bgfx_access_t _access);
		da_bgfx_set_compute_dynamic_index_buffer bgfx_set_compute_dynamic_index_buffer;
		
		/**
		 * Set compute dynamic vertex buffer.
		 * Params:
		 * _stage = Compute stage.
		 * _handle = Dynamic vertex buffer handle.
		 * _access = Buffer access. See `Access::Enum`.
		 */
		alias da_bgfx_set_compute_dynamic_vertex_buffer = void function(byte _stage, bgfx_dynamic_vertex_buffer_handle_t _handle, bgfx_access_t _access);
		da_bgfx_set_compute_dynamic_vertex_buffer bgfx_set_compute_dynamic_vertex_buffer;
		
		/**
		 * Set compute indirect buffer.
		 * Params:
		 * _stage = Compute stage.
		 * _handle = Indirect buffer handle.
		 * _access = Buffer access. See `Access::Enum`.
		 */
		alias da_bgfx_set_compute_indirect_buffer = void function(byte _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access);
		da_bgfx_set_compute_indirect_buffer bgfx_set_compute_indirect_buffer;
		
		/**
		 * Set compute image from texture.
		 * Params:
		 * _stage = Compute stage.
		 * _handle = Texture handle.
		 * _mip = Mip level.
		 * _access = Image access. See `Access::Enum`.
		 * _format = Texture format. See: `TextureFormat::Enum`.
		 */
		alias da_bgfx_set_image = void function(byte _stage, bgfx_texture_handle_t _handle, byte _mip, bgfx_access_t _access, bgfx_texture_format_t _format);
		da_bgfx_set_image bgfx_set_image;
		
		/**
		 * Dispatch compute.
		 * Params:
		 * _id = View id.
		 * _program = Compute program.
		 * _numX = Number of groups X.
		 * _numY = Number of groups Y.
		 * _numZ = Number of groups Z.
		 */
		alias da_bgfx_dispatch = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _numX, uint _numY, uint _numZ);
		da_bgfx_dispatch bgfx_dispatch;
		
		/**
		 * Dispatch compute indirect.
		 * Params:
		 * _id = View id.
		 * _program = Compute program.
		 * _indirectHandle = Indirect buffer.
		 * _start = First element in indirect buffer.
		 * _num = Number of dispatches.
		 */
		alias da_bgfx_dispatch_indirect = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num);
		da_bgfx_dispatch_indirect bgfx_dispatch_indirect;
		
		/**
		 * Discard all previously set state for draw or compute call.
		 */
		alias da_bgfx_discard = void function();
		da_bgfx_discard bgfx_discard;
		
		/**
		 * Blit 2D texture region between two 2D textures.
		 * Attention: Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
		 * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
		 * Params:
		 * _id = View id.
		 * _dst = Destination texture handle.
		 * _dstMip = Destination texture mip level.
		 * _dstX = Destination texture X position.
		 * _dstY = Destination texture Y position.
		 * _dstZ = If texture is 2D this argument should be 0. If destination texture is cube
		 * this argument represents destination texture cube face. For 3D texture this argument
		 * represents destination texture Z position.
		 * _src = Source texture handle.
		 * _srcMip = Source texture mip level.
		 * _srcX = Source texture X position.
		 * _srcY = Source texture Y position.
		 * _srcZ = If texture is 2D this argument should be 0. If source texture is cube
		 * this argument represents source texture cube face. For 3D texture this argument
		 * represents source texture Z position.
		 * _width = Width of region.
		 * _height = Height of region.
		 * _depth = If texture is 3D this argument represents depth of region, otherwise it's
		 * unused.
		 */
		alias da_bgfx_blit = void function(bgfx_view_id_t _id, bgfx_texture_handle_t _dst, byte _dstMip, ushort _dstX, ushort _dstY, ushort _dstZ, bgfx_texture_handle_t _src, byte _srcMip, ushort _srcX, ushort _srcY, ushort _srcZ, ushort _width, ushort _height, ushort _depth);
		da_bgfx_blit bgfx_blit;
		
	}
}