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
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage> {
storage: Storage,
}
impl<Storage> __BindgenBitfieldUnit<Storage> {
#[inline]
pub const fn new(storage: Storage) -> Self {
Self { storage }
}
}
impl<Storage> __BindgenBitfieldUnit<Storage>
where
Storage: AsRef<[u8]> + AsMut<[u8]>,
{
#[inline]
pub fn get_bit(&self, index: usize) -> bool {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = self.storage.as_ref()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
byte & mask == mask
}
#[inline]
pub fn set_bit(&mut self, index: usize, val: bool) {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = &mut self.storage.as_mut()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
if val {
*byte |= mask;
} else {
*byte &= !mask;
}
}
#[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
let mut val = 0;
for i in 0..(bit_width as usize) {
if self.get_bit(i + bit_offset) {
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
val |= 1 << index;
}
}
val
}
#[inline]
pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
self.set_bit(index + bit_offset, val_bit_is_set);
}
}
}
#[repr(C)]
pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
impl<T> __BindgenUnionField<T> {
#[inline]
pub const fn new() -> Self {
__BindgenUnionField(::std::marker::PhantomData)
}
#[inline]
pub unsafe fn as_ref(&self) -> &T {
::std::mem::transmute(self)
}
#[inline]
pub unsafe fn as_mut(&mut self) -> &mut T {
::std::mem::transmute(self)
}
}
impl<T> ::std::default::Default for __BindgenUnionField<T> {
#[inline]
fn default() -> Self {
Self::new()
}
}
impl<T> ::std::clone::Clone for __BindgenUnionField<T> {
#[inline]
fn clone(&self) -> Self {
Self::new()
}
}
impl<T> ::std::marker::Copy for __BindgenUnionField<T> {}
impl<T> ::std::fmt::Debug for __BindgenUnionField<T> {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
fmt.write_str("__BindgenUnionField")
}
}
impl<T> ::std::hash::Hash for __BindgenUnionField<T> {
fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) {}
}
impl<T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
fn eq(&self, _other: &__BindgenUnionField<T>) -> bool {
true
}
}
impl<T> ::std::cmp::Eq for __BindgenUnionField<T> {}
pub const __SAL_H_VERSION: u32 = 180000000;
pub const __bool_true_false_are_defined: u32 = 1;
pub const TYPE__CAMERA_CONTROLLER_COMPONENT: &'static [u8; 31usize] =
b"tm_camera_controller_component\0";
pub const TM_CAMERA_CONTROLLER_COMPONENT_API_NAME: &'static [u8; 35usize] =
b"tm_camera_controller_component_api\0";
pub const TM_MAX_RENDER_COMPONENTS: u32 = 64;
pub const TM_MAX_SHADER_DATA_COMPONENTS: u32 = 15;
pub const TM_FRUSTUM_CULLING_API_NAME: &'static [u8; 23usize] = b"tm_frustum_culling_api\0";
pub const TM_GPU_SCENE_SUBMISSION_API_NAME: &'static [u8; 28usize] =
b"tm_gpu_scene_submission_api\0";
pub const TM_RENDER_CONTEXT_API_NAME: &'static [u8; 22usize] = b"tm_render_context_api\0";
pub const TM_VIEWPORT_HUD_HEIGHT: f64 = 25.0;
pub const TM_VIEWPORT_HUD_OUTER_MARGIN_X: f64 = 5.0;
pub const TM_VIEWPORT_HUD_OUTER_MARGIN_Y: f64 = 5.0;
pub const TM_VIEWPORT_HUD_INNER_MARGIN: f64 = 5.0;
pub const TM_SCENE_COMMON_API_NAME: &'static [u8; 20usize] = b"tm_scene_common_api\0";
pub const TM_SCENE_TAB_COMMAND_INTERFACE_NAME: &'static [u8; 31usize] =
b"tm_scene_tab_command_interface\0";
pub const TM_THE_TRUTH_REPLACER_API_NAME: &'static [u8; 26usize] = b"tm_the_truth_replacer_api\0";
pub const TM_THE_TRUTH_STRIPPER_INTERFACE_NAME: &'static [u8; 32usize] =
b"tm_the_truth_stripper_interface\0";
pub const TM_VIEWER_API_NAME: &'static [u8; 14usize] = b"tm_viewer_api\0";
pub const TM_VIEWER_MANAGER_API_NAME: &'static [u8; 22usize] = b"tm_viewer_manager_api\0";
extern "C" {
pub fn __va_start(arg1: *mut *mut ::std::os::raw::c_char, ...);
}
pub type __vcrt_bool = bool;
extern "C" {
pub fn __security_init_cookie();
}
extern "C" {
pub fn __security_check_cookie(_StackCookie: usize);
}
extern "C" {
pub fn __report_gsfailure(_StackCookie: usize);
}
extern "C" {
pub static mut __security_cookie: usize;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union TtIdTBindgenTy1 {
pub u64_: u64,
pub __bindgen_anon_1: TtIdTBindgenTy1BindgenTy1,
}
#[repr(C)]
#[repr(align(8))]
#[derive(Default, Copy, Clone)]
pub struct TtIdTBindgenTy1BindgenTy1 {
pub _bitfield_align_1: [u32; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
impl TtIdTBindgenTy1BindgenTy1 {
#[inline]
pub fn type_(&self) -> u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 10u8) as u64) }
}
#[inline]
pub fn set_type(&mut self, val: u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 10u8, val as u64)
}
}
#[inline]
pub fn generation(&self) -> u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 22u8) as u64) }
}
#[inline]
pub fn set_generation(&mut self, val: u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(10usize, 22u8, val as u64)
}
}
#[inline]
pub fn index(&self) -> u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 32u8) as u64) }
}
#[inline]
pub fn set_index(&mut self, val: u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(32usize, 32u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
type_: u64,
generation: u64,
index: u64,
) -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 10u8, {
let type_: u64 = unsafe { ::std::mem::transmute(type_) };
type_ as u64
});
__bindgen_bitfield_unit.set(10usize, 22u8, {
let generation: u64 = unsafe { ::std::mem::transmute(generation) };
generation as u64
});
__bindgen_bitfield_unit.set(32usize, 32u8, {
let index: u64 = unsafe { ::std::mem::transmute(index) };
index as u64
});
__bindgen_bitfield_unit
}
}
impl Default for TtIdTBindgenTy1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
pub struct TheTruthPropertyDefinitionTBindgenTy1 {
pub enum_editor: __BindgenUnionField<TheTruthEditorEnumT>,
pub string_open_path_editor: __BindgenUnionField<TheTruthEditorStringOpenPathT>,
pub string_save_path_editor: __BindgenUnionField<TheTruthEditorStringSavePathT>,
pub bindgen_union_field: [u64; 3usize],
}
impl Default for TheTruthPropertyDefinitionTBindgenTy1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
pub struct TtPropValueTBindgenTy1 {
pub b: __BindgenUnionField<bool>,
pub u32_: __BindgenUnionField<u32>,
pub u64_: __BindgenUnionField<u64>,
pub f32_: __BindgenUnionField<f32>,
pub f64_: __BindgenUnionField<f64>,
pub string: __BindgenUnionField<*const ::std::os::raw::c_char>,
pub buffer: __BindgenUnionField<TtBufferT>,
pub object: __BindgenUnionField<TtIdT>,
pub set: __BindgenUnionField<*const TtIdT>,
pub bindgen_union_field: [u64; 4usize],
}
impl Default for TtPropValueTBindgenTy1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub const TM_THE_TRUTH_MAX_PROPERTIES: ::std::os::raw::c_int = 64;
pub type _bindgen_ty_1 = ::std::os::raw::c_int;
#[repr(C)]
pub struct AssetPreviewApiUiArgsT {
pub tt: *mut TheTruthO,
pub asset: TtIdT,
pub entity_ctx: *mut EntityContextO,
pub entity: *const EntityT,
pub viewer_render_info: *mut ViewerRenderInfoT,
pub lighting_environment_settings: *mut LightingEnvironmentSettingsT,
pub statistics_overlays: *mut StatisticsOverlaysT,
pub tab: *mut TabI,
pub ui: *mut UiO,
pub uistyle: *const UiStyleT,
pub content_r: RectT,
pub undo_stack: *mut UndoStackI,
}
impl Default for AssetPreviewApiUiArgsT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct AssetPreviewApi {
pub create: ::std::option::Option<
unsafe extern "C" fn(allocator: *mut AllocatorI) -> *mut AssetPreviewO,
>,
pub destroy: ::std::option::Option<
unsafe extern "C" fn(inst: *mut AssetPreviewO, allocator: *mut AllocatorI),
>,
pub create_entity: ::std::option::Option<
unsafe extern "C" fn(
inst: *mut AssetPreviewO,
tt: *mut TheTruthO,
asset: TtIdT,
entity_ctx: *mut EntityContextO,
result: *mut EntityT,
),
>,
pub intercept_focus: ::std::option::Option<
unsafe extern "C" fn(
inst: *mut AssetPreviewO,
tt: *mut TheTruthO,
root_asset: TtIdT,
entity_ctx: *mut EntityContextO,
entity: *const EntityT,
focus_asset: TtIdT,
) -> bool,
>,
pub reload: ::std::option::Option<
unsafe extern "C" fn(
inst: *mut AssetPreviewO,
tt: *mut TheTruthO,
asset: TtIdT,
entity_ctx: *mut EntityContextO,
entity: *mut EntityT,
) -> bool,
>,
pub dirty: ::std::option::Option<
unsafe extern "C" fn(inst: *mut AssetPreviewO, tt: *mut TheTruthO, asset: TtIdT) -> bool,
>,
pub render: ::std::option::Option<
unsafe extern "C" fn(
inst: *mut AssetPreviewO,
tt: *mut TheTruthO,
asset: TtIdT,
args: *const RenderArgsT,
),
>,
pub refresh_thumbnail: ::std::option::Option<
unsafe extern "C" fn(
inst: *mut AssetPreviewO,
tt: *mut TheTruthO,
asset: TtIdT,
args: *const RenderArgsT,
),
>,
pub ui: ::std::option::Option<
unsafe extern "C" fn(inst: *mut AssetPreviewO, args: *const AssetPreviewApiUiArgsT),
>,
pub toolbars: ::std::option::Option<
unsafe extern "C" fn(
inst: *mut AssetPreviewO,
ta: *mut TempAllocatorI,
args: *const AssetPreviewApiUiArgsT,
) -> *mut ToolbarI,
>,
pub show_grid: bool,
pub _padding_96: [::std::os::raw::c_char; 7usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AssetPreviewI {
pub api: *mut AssetPreviewApi,
pub inst: *mut AssetPreviewO,
}
impl Default for AssetPreviewI {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct AssetSceneApi {
pub create:
::std::option::Option<unsafe extern "C" fn(allocator: *mut AllocatorI) -> *mut AssetSceneO>,
pub destroy: ::std::option::Option<
unsafe extern "C" fn(inst: *mut AssetSceneO, allocator: *mut AllocatorI),
>,
pub droppable: ::std::option::Option<
unsafe extern "C" fn(inst: *mut AssetSceneO, tt: *mut TheTruthO, asset: TtIdT) -> bool,
>,
pub create_entity: ::std::option::Option<
unsafe extern "C" fn(
inst: *mut AssetSceneO,
tt: *mut TheTruthO,
asset: TtIdT,
name: *const ::std::os::raw::c_char,
local_transform: *const TransformT,
parent_entity: TtIdT,
undo_stack: *mut UndoStackI,
) -> TtIdT,
>,
pub bound_entity_asset: ::std::option::Option<
unsafe extern "C" fn(
inst: *mut AssetSceneO,
tt: *const TheTruthO,
asset: TtIdT,
bounds: *mut Vec3T,
),
>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct AssetSceneI {
pub api: *mut AssetSceneApi,
pub inst: *mut AssetSceneO,
}
impl Default for AssetSceneI {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub const TM_ASSET_OPEN_MODE_REUSE_OR_CREATE_TAB: AssetOpenMode = 0;
pub const TM_ASSET_OPEN_MODE_CREATE_TAB: AssetOpenMode = 1;
pub const TM_ASSET_OPEN_MODE_CREATE_TAB_AND_PIN: AssetOpenMode = 2;
pub type AssetOpenMode = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct AssetOpenAspectI {
pub open: ::std::option::Option<
unsafe extern "C" fn(
app: *mut ApplicationO,
ui: *mut UiO,
from_tab: *mut TabI,
tt: *mut TheTruthO,
asset: TtIdT,
open_mode: AssetOpenMode,
),
>,
}
pub const MODE_NONE: camera_controller_mode = 0;
pub const MODE_FREE_FLIGHT: camera_controller_mode = 1;
pub const MODE_MAYA_SPIN: camera_controller_mode = 2;
pub const MODE_MAYA_ZOOM: camera_controller_mode = 3;
pub const MODE_MAYA_PAN: camera_controller_mode = 4;
pub type camera_controller_mode = ::std::os::raw::c_int;
#[repr(C)]
pub struct CameraControllerComponentT {
pub disable_input: bool,
pub _padding_24: [::std::os::raw::c_char; 3usize],
pub mode: camera_controller_mode,
pub translation_speed: f32,
pub rotation_speed: f32,
pub translation_damping: f32,
pub translation: Vec3T,
pub damped_translation: Vec3T,
pub rotation: Vec2T,
pub focus_point: Vec3T,
pub zoom: f32,
pub spin: Vec2T,
pub pan: Vec2T,
}
impl Default for CameraControllerComponentT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CameraControllerComponentManagerO {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct CameraControllerComponentApi {
pub create: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut EntityContextO) -> *mut CameraControllerComponentManagerO,
>,
pub feed_ui_input: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut CameraControllerComponentManagerO,
ui: *mut UiO,
in_area: bool,
),
>,
pub register_engines: ::std::option::Option<
unsafe extern "C" fn(manager: *mut CameraControllerComponentManagerO),
>,
}
pub type CiEditorPropertiesUiF = ::std::option::Option<
unsafe extern "C" fn(
args: *mut PropertiesUiArgsT,
item_rect: RectT,
object: TtIdT,
indent: u32,
) -> f32,
>;
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct CiEditorUiIconI {
pub ui_icon: ::std::option::Option<unsafe extern "C" fn() -> u32>,
}
#[repr(C)]
pub struct CiViewportInteract {
pub tt: *mut TheTruthO,
pub entity_ctx: *mut EntityContextO,
pub entity: TtIdT,
pub component: TtIdT,
pub ui: *mut UiO,
pub uistyle: *const UiStyleT,
pub primitive_buffer: *mut PrimitiveDrawerBufferT,
pub vertex_buffer: *mut PrimitiveDrawerBufferT,
pub allocator: *mut AllocatorI,
pub camera: *const CameraT,
pub viewport_r: RectT,
pub viewport_id: u64,
pub tab_id: u64,
pub undo_stack: *mut UndoStackI,
pub active_tool_id: StrhashT,
pub move_settings: *mut GizmoMoveSettingsT,
pub rotate_settings: *mut GizmoRotateSettingsT,
pub scale_settings: *mut GizmoScaleSettingsT,
pub editor: *mut ::std::os::raw::c_void,
pub set_selection: ::std::option::Option<
unsafe extern "C" fn(editor: *mut ::std::os::raw::c_void, item_t: TtIdT),
>,
}
impl Default for CiViewportInteract {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct CiViewportInteractResult {
pub hide_gizmo: bool,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CiToolbar {
pub editor: *mut ::std::os::raw::c_void,
pub active_tool: ::std::option::Option<
unsafe extern "C" fn(editor: *mut ::std::os::raw::c_void) -> StrhashT,
>,
pub set_active_tool: ::std::option::Option<
unsafe extern "C" fn(editor: *mut ::std::os::raw::c_void, id: StrhashT),
>,
}
impl Default for CiToolbar {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct CiEditorUiI {
pub disabled: ::std::option::Option<unsafe extern "C" fn() -> bool>,
pub category: ::std::option::Option<unsafe extern "C" fn() -> *const ::std::os::raw::c_char>,
pub icon_interface: ::std::option::Option<unsafe extern "C" fn() -> *mut CiEditorUiIconI>,
pub gizmo_priority: f32,
pub _padding_93: [::std::os::raw::c_char; 4usize],
pub gizmo_get_transform: ::std::option::Option<
unsafe extern "C" fn(
tt: *const TheTruthO,
ctx: *mut EntityContextO,
entity: TtIdT,
component: TtIdT,
object: TtIdT,
world: *mut TransformT,
local: *mut TransformT,
) -> bool,
>,
pub gizmo_set_transform: ::std::option::Option<
unsafe extern "C" fn(
tt: *mut TheTruthO,
ctx: *mut EntityContextO,
entity: TtIdT,
component: TtIdT,
object: TtIdT,
local: *const TransformT,
undo_scope: TtUndoScopeT,
),
>,
pub gizmo_duplicate: ::std::option::Option<
unsafe extern "C" fn(
tt: *mut TheTruthO,
ctx: *mut EntityContextO,
entity: TtIdT,
component: TtIdT,
object: TtIdT,
undo_scope: TtUndoScopeT,
) -> TtIdT,
>,
pub override_properties: ::std::option::Option<
unsafe extern "C" fn(tt: *mut TheTruthO, other_component: TtIdT) -> CiEditorPropertiesUiF,
>,
pub viewport_interact: ::std::option::Option<
unsafe extern "C" fn(vi: *const CiViewportInteract) -> CiViewportInteractResult,
>,
pub create: ::std::option::Option<
unsafe extern "C" fn(tt: *mut TheTruthO, type_: TtTypeT, undo_scope: TtUndoScopeT) -> TtIdT,
>,
pub toolbars: ::std::option::Option<
unsafe extern "C" fn(ci: *mut CiToolbar, ta: *mut TempAllocatorI) -> *mut ToolbarI,
>,
}
#[repr(C)]
pub struct CiRenderViewerT {
pub sort_key: u64,
pub visibility_mask: u64,
pub visibility_context: StrhashT,
pub viewer_system: *mut ShaderSystemO,
pub viewer_cbuffer: *mut ShaderConstantBufferInstanceT,
pub viewer_rbinder: *mut ShaderResourceBinderInstanceT,
pub camera: *const CameraT,
pub gpu_picking: *mut GpuPickingO,
}
impl Default for CiRenderViewerT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct CiRenderI {
pub init: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut ComponentManagerO,
entities: *const EntityT,
entity_indices: *const u32,
render_component_data: *mut *mut ::std::os::raw::c_void,
num_renderables: u32,
),
>,
pub bounding_volume_type:
::std::option::Option<unsafe extern "C" fn(manager: *mut ComponentManagerO) -> u32>,
pub fill_bounding_volume_buffer: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut ComponentManagerO,
args: *mut RenderArgsT,
entities: *const EntityT,
entity_transforms: *const TransformComponentT,
entity_indices: *const u32,
render_component_data: *mut *mut ::std::os::raw::c_void,
num_renderables: u32,
bv_buffer: *mut u8,
),
>,
pub render: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut ComponentManagerO,
args: *mut RenderArgsT,
viewers: *const CiRenderViewerT,
num_viewers: u32,
entities: *const EntityT,
entity_transforms: *const TransformComponentT,
entity_selection_state: *const bool,
entity_indices: *const u32,
render_component_data: *mut *mut ::std::os::raw::c_void,
num_renderables: u32,
frustum_visibility: *const u8,
),
>,
}
#[repr(C)]
pub struct CiRenderGatherCallbackArgsT {
pub allocator: *mut AllocatorI,
pub selected_entities_lookup: *const SetEntityT,
pub hidden_entities_lookup: *const SetEntityT,
pub ignored_entities_lookup: *const SetEntityT,
pub render_component_names: [StrhashT; 64usize],
pub render_interfaces: [*mut CiRenderI; 64usize],
pub num_render_components: u32,
pub render_component_data_strides: [u32; 64usize],
pub _padding_74: [::std::os::raw::c_char; 4usize],
pub component_managers: [*mut ComponentManagerO; 64usize],
pub entity_selection_state: *mut bool,
pub entity_ignore_state: *mut bool,
pub entity_transforms: *mut TransformComponentT,
pub entities: *mut EntityT,
pub component_data: [*mut *mut ::std::os::raw::c_void; 64usize],
pub entity_indices: [*mut u32; 64usize],
pub num_renderables_per_component: [u32; 64usize],
}
impl Default for CiRenderGatherCallbackArgsT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct CiShaderI {
pub init: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut ComponentManagerO,
entities: *const EntityT,
entity_indices: *const u32,
shader_component_data: *mut *mut ::std::os::raw::c_void,
num_shader_datas: u32,
),
>,
pub graph_module_inject: ::std::option::Option<
unsafe extern "C" fn(manager: *mut ComponentManagerO, module: *mut RenderGraphModuleO),
>,
pub graph_requested:
::std::option::Option<unsafe extern "C" fn(manager: *mut ComponentManagerO) -> StrhashT>,
pub activate_systems: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut ComponentManagerO,
shader_context: *mut ShaderSystemContextO,
),
>,
pub update: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut ComponentManagerO,
args: *mut RenderArgsT,
entities: *const EntityT,
entity_transforms: *const TransformComponentT,
entity_indices: *const u32,
component_data: *mut *mut ::std::os::raw::c_void,
num_components: u32,
frustum_visibility: *const u8,
),
>,
}
#[repr(C)]
pub struct CiShaderDataGatherCallbackArgsT {
pub allocator: *mut AllocatorI,
pub hidden_entities_lookup: *const SetEntityT,
pub shader_component_names: [StrhashT; 15usize],
pub shader_interfaces: [*mut CiShaderI; 15usize],
pub num_shader_components: u32,
pub shader_component_data_strides: [u32; 15usize],
pub component_managers: [*mut ComponentManagerO; 15usize],
pub entity_transforms: *mut TransformComponentT,
pub entities: *mut EntityT,
pub component_data: [*mut *mut ::std::os::raw::c_void; 15usize],
pub entity_indices: [*mut u32; 15usize],
pub num_shader_data_per_component: [u32; 15usize],
pub _padding_77: [::std::os::raw::c_char; 4usize],
}
impl Default for CiShaderDataGatherCallbackArgsT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
pub struct CullingViewerT {
pub frustum_planes: [Vec4T; 6usize],
pub visibility_mask: u64,
}
impl Default for CullingViewerT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct GpuCullingHeaderT {
pub num_viewers: u32,
pub viewers_offset: u32,
pub num_transforms: u32,
pub results_offset: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GpuCullingArgsT {
pub shader: *mut ShaderO,
pub res_buf: *mut RendererResourceCommandBufferO,
pub cmd_buf: *mut RendererCommandBufferO,
pub sort_key: u64,
pub device_affinity_mask: u32,
pub _padding_57: [::std::os::raw::c_char; 4usize],
pub viewers: *const CullingViewerT,
pub viewers_count: u32,
pub bounding_radius: f32,
pub transforms: *const RendererHandleT,
pub transforms_count: u32,
pub transforms_start: u32,
pub transform_stride: u32,
pub culling_distance: f32,
pub parent_transform: *const Mat44T,
}
impl Default for GpuCullingArgsT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct FrustumCullingApi {
pub viewer_from_projection_mat: ::std::option::Option<
unsafe extern "C" fn(
view_tm: *const Mat44T,
projection_tm: *const Mat44T,
visibility_mask: u64,
) -> CullingViewerT,
>,
pub calc_size_of_objects_buffer:
::std::option::Option<unsafe extern "C" fn(bv_type: u32, num_objects: u32) -> u32>,
pub calc_size_of_results_buffer:
::std::option::Option<unsafe extern "C" fn(num_viewers: u32, num_objects: u32) -> u32>,
pub cull_fast: ::std::option::Option<
unsafe extern "C" fn(
viewers: *const CullingViewerT,
num_viewers: u32,
bv_type: u32,
objects: *const u8,
num_objects: u32,
results: *mut u8,
ta: *mut TempAllocatorI,
) -> *mut AtomicCounterO,
>,
pub cull_precise: ::std::option::Option<
unsafe extern "C" fn(
viewers: *const CullingViewerT,
num_viewers: u32,
bv_type: u32,
objects: *const u8,
num_objects: u32,
results: *mut u8,
ta: *mut TempAllocatorI,
) -> *mut AtomicCounterO,
>,
pub gpu_cull: ::std::option::Option<
unsafe extern "C" fn(
args: *mut GpuCullingArgsT,
output: *mut RendererHandleT,
output_desc: *mut RendererBufferDescT,
),
>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CreationGraphDrawCallDataT {
_unused: [u8; 0],
}
pub const TM_GPU_SCENE_SUBMISSION_DRAW_CALL_LOD_DISABLED: ::std::os::raw::c_int = -1;
pub type _bindgen_ty_2 = ::std::os::raw::c_int;
#[repr(C)]
pub struct GpuSceneSubmissionDrawCallLodSettingsT {
pub lod_step: u32,
pub lod_size_range: Vec2T,
}
impl Default for GpuSceneSubmissionDrawCallLodSettingsT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct GpuSceneSubmissionCullAndLodHeaderT {
pub viewers_offset: u32,
pub draw_calls_lod_settings_offset: u32,
pub draw_calls_instance_count_offset: u32,
pub draw_call_bitmask_offset: u32,
pub count: u32,
}
pub const TM_GPU_SCENE_SUBMISSION__INDIRECT_DRAW_NON_INDEXED: GpuSceneSubmissionIndirectDrawType =
0;
pub const TM_GPU_SCENE_SUBMISSION__INDIRECT_DRAW_INDEXED: GpuSceneSubmissionIndirectDrawType = 1;
pub type GpuSceneSubmissionIndirectDrawType = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GpuSceneSubmissionIndirectDrawCmdT {
pub draw_type: GpuSceneSubmissionIndirectDrawType,
pub data: [u32; 5usize],
}
impl Default for GpuSceneSubmissionIndirectDrawCmdT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub const TM_GPU_SCENE_SUBMISSION__BYTE_OFFSET__INSTANCE_COUNT: ::std::os::raw::c_int = 8;
pub const TM_GPU_SCENE_SUBMISSION__BYTE_OFFSET__NON_INDEXED__FIRST_INSTANCE: ::std::os::raw::c_int =
16;
pub const TM_GPU_SCENE_SUBMISSION__BYTE_OFFSET__INDEXED__FIRST_INSTANCE: ::std::os::raw::c_int = 20;
pub type _bindgen_ty_3 = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct GpuSceneSubmissionDrawCallsAndTransformIndirectionHeaderT {
pub draw_calls_offset: u32,
pub first_instance_index_offset: u32,
pub stram_compaction_dispatch_command_offset: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GpuSceneSubmissionWorkloadO {
_unused: [u8; 0],
}
#[repr(C)]
pub struct GpuSceneSubmissionArgsT {
pub shader_repo: *mut ShaderRepositoryO,
pub shader_context: *const ShaderSystemContextO,
pub workload: *mut GpuSceneSubmissionWorkloadO,
pub res_buf: *mut RendererResourceCommandBufferO,
pub cmd_buf: *mut RendererCommandBufferO,
pub sort_key: u64,
pub device_affinity_mask: u32,
pub _padding_169: [::std::os::raw::c_char; 4usize],
pub viewers: *const CiRenderViewerT,
pub viewers_count: u32,
pub bounding_radius: f32,
pub transforms: RendererHandleT,
pub _padding_182: [::std::os::raw::c_char; 4usize],
pub transforms_count: u32,
pub transforms_start: u32,
pub transforms_stride: u32,
pub culling_distance: f32,
pub parent_transform: *const Mat44T,
}
impl Default for GpuSceneSubmissionArgsT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct GpuSceneSubmissionApi {
pub create_workload: ::std::option::Option<
unsafe extern "C" fn(
draw_calls: *const CreationGraphDrawCallDataT,
draw_calls_count: u32,
res_buf: *mut RendererResourceCommandBufferO,
a: *mut AllocatorI,
) -> *mut GpuSceneSubmissionWorkloadO,
>,
pub destroy_workload: ::std::option::Option<
unsafe extern "C" fn(
workload: *mut GpuSceneSubmissionWorkloadO,
res_buf: *mut RendererResourceCommandBufferO,
),
>,
pub cull_and_render:
::std::option::Option<unsafe extern "C" fn(args: *mut GpuSceneSubmissionArgsT)>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RenderContextO {
_unused: [u8; 0],
}
pub const TM_RENDER_CONTEXT_BUFFER_PHASE_VIEWER: RenderContextBufferPhase = 0;
pub const TM_RENDER_CONTEXT_BUFFER_PHASE_VIEWER_DESTROY: RenderContextBufferPhase = 1;
pub const TM_RENDER_CONTEXT_BUFFER_PHASE_UTILITY: RenderContextBufferPhase = 2;
pub const TM_RENDER_CONTEXT_BUFFER_PHASE_UTILITY_DESTROY: RenderContextBufferPhase = 3;
pub const TM_RENDER_CONTEXT_BUFFER_PHASE_MAX_PHASES: RenderContextBufferPhase = 4;
pub type RenderContextBufferPhase = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct RenderContextApi {
pub create: ::std::option::Option<
unsafe extern "C" fn(allocator: *mut AllocatorI) -> *mut RenderContextO,
>,
pub destroy: ::std::option::Option<unsafe extern "C" fn(context: *mut RenderContextO)>,
pub append_resource_buffers: ::std::option::Option<
unsafe extern "C" fn(
context: *mut RenderContextO,
phase: RenderContextBufferPhase,
res_buffers: *mut *mut RendererResourceCommandBufferO,
num_buffers: u32,
),
>,
pub append_command_buffers: ::std::option::Option<
unsafe extern "C" fn(
context: *mut RenderContextO,
phase: RenderContextBufferPhase,
cmd_buffers: *mut *mut RendererCommandBufferO,
num_buffers: u32,
),
>,
pub resource_buffers: ::std::option::Option<
unsafe extern "C" fn(
context: *mut RenderContextO,
phase: RenderContextBufferPhase,
res_buffers: *mut *mut RendererResourceCommandBufferO,
) -> u32,
>,
pub command_buffers: ::std::option::Option<
unsafe extern "C" fn(
context: *mut RenderContextO,
phase: RenderContextBufferPhase,
cmd_buffers: *mut *mut RendererCommandBufferO,
) -> u32,
>,
}
#[repr(C)]
pub struct RenderArgsT {
pub camera_tm: TransformT,
pub camera: *const CameraT,
pub context: *mut RenderContextO,
pub render_backend: *mut RendererBackendI,
pub shader_repository: *mut ShaderRepositoryO,
pub device_affinity_mask: u32,
pub _padding_81: [::std::os::raw::c_char; 4usize],
pub default_resource_buffer: *mut RendererResourceCommandBufferO,
pub default_command_buffer: *mut RendererCommandBufferO,
pub render_graph: *mut RenderGraphO,
pub render_pipeline: *mut RenderPipelineI,
pub shader_context: *const ShaderSystemContextO,
}
impl Default for RenderArgsT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union EntityT {
pub __bindgen_anon_1: EntityTBindgenTy1,
pub u64_: u64,
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct EntityTBindgenTy1 {
pub index: u32,
pub generation: u32,
}
impl Default for EntityT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RenderPipelineI {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct SimulateEntryI {
_unused: [u8; 0],
}
#[repr(C)]
pub struct LightingEnvironmentSettingsT {
pub enabled: bool,
pub _padding_31: [::std::os::raw::c_char; 7usize],
pub asset: TtIdT,
pub spawned_entity: EntityT,
pub search_buf: [::std::os::raw::c_char; 1024usize],
}
impl Default for LightingEnvironmentSettingsT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct StatisticsOverlaysT {
pub tt: *mut TheTruthO,
pub tab: *mut TabI,
pub settings_objects: *mut TtIdT,
}
impl Default for StatisticsOverlaysT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct SceneCommonApi {
pub init_camera:
::std::option::Option<unsafe extern "C" fn(camera: *mut TransformT, translation: Vec3T)>,
pub camera_frame_bounds: ::std::option::Option<
unsafe extern "C" fn(
camera: *mut TransformT,
camera_y_fov: f32,
bounds: *const Vec3T,
translation_speed: *mut f32,
focus_point: *mut Vec3T,
),
>,
pub find_component_render_interfaces: ::std::option::Option<
unsafe extern "C" fn(
entity_ctx: *mut EntityContextO,
transform_component: ComponentTypeT,
tt: *const TheTruthO,
allocator: *mut AllocatorI,
selection: *const TtIdT,
selection_n: u64,
ignore: *const EntityT,
ignore_n: u64,
include_entities_without_render_components: bool,
res: *mut CiRenderGatherCallbackArgsT,
),
>,
pub bound_assets: ::std::option::Option<
unsafe extern "C" fn(
entity_ctx: *mut EntityContextO,
transform_component: ComponentTypeT,
tt: *const TheTruthO,
ignore: *const EntityT,
ignore_n: u64,
bounds: *mut Vec3T,
include_origo: bool,
),
>,
pub bound_selected_assets: ::std::option::Option<
unsafe extern "C" fn(
entity_ctx: *mut EntityContextO,
transform_component: ComponentTypeT,
tt: *const TheTruthO,
selection: *const TtIdT,
selection_n: u64,
ignore: *const EntityT,
ignore_n: u64,
bounds: *mut Vec3T,
include_origo: bool,
),
>,
pub bound_entity_asset: ::std::option::Option<
unsafe extern "C" fn(tt: *const TheTruthO, entity: TtIdT, bounds: *mut Vec3T),
>,
pub find_shader_data_engine_update: ::std::option::Option<
unsafe extern "C" fn(inst: *mut EngineO, data: *mut EngineUpdateSetT),
>,
pub gather_shader_data_filter: ::std::option::Option<
unsafe extern "C" fn(
inst: *mut EngineO,
components: *const ComponentTypeT,
num_components: u32,
mask: *const ComponentMaskT,
) -> bool,
>,
pub find_renderables_engine_update: ::std::option::Option<
unsafe extern "C" fn(inst: *mut EngineO, data: *mut EngineUpdateSetT),
>,
pub gather_renderables_filter: ::std::option::Option<
unsafe extern "C" fn(
inst: *mut EngineO,
components: *const ComponentTypeT,
num_components: u32,
mask: *const ComponentMaskT,
) -> bool,
>,
pub add_default_light_source:
::std::option::Option<unsafe extern "C" fn(entity_ctx: *mut EntityContextO) -> EntityT>,
pub has_any_light_source:
::std::option::Option<unsafe extern "C" fn(ctx: *mut EntityContextO) -> bool>,
pub component_visualization_menu: ::std::option::Option<
unsafe extern "C" fn(
tt: *mut TheTruthO,
entity_ctx: *mut EntityContextO,
ui: *mut UiO,
uistyle: *const UiStyleT,
tab: *mut TabI,
pos: Vec2T,
),
>,
pub viewport_visualization_toolbar: ::std::option::Option<
unsafe extern "C" fn(
tt: *mut TheTruthO,
entity_ctx: *mut EntityContextO,
le_settings: *mut LightingEnvironmentSettingsT,
statistics_overlays: *mut StatisticsOverlaysT,
render_pipeline: *mut RenderPipelineI,
ui: *mut UiO,
uistyle: *const UiStyleT,
tab: *mut TabI,
toolbar_r: RectT,
toolbar_draw_mode: u32,
) -> RectT,
>,
pub statistics_menu: ::std::option::Option<
unsafe extern "C" fn(
statistics_overlays: *mut StatisticsOverlaysT,
ui: *mut UiO,
uistyle: *const UiStyleT,
pos: Vec2T,
),
>,
pub statistics_overlay_toolbars: ::std::option::Option<
unsafe extern "C" fn(
statistics_overlays: *mut StatisticsOverlaysT,
ta: *mut TempAllocatorI,
) -> *mut ToolbarI,
>,
pub place_entity: ::std::option::Option<
unsafe extern "C" fn(
tt: *mut TheTruthO,
entity: TtIdT,
local_transform: *const TransformT,
parent: TtIdT,
undo_scope: TtUndoScopeT,
),
>,
pub select_entity: ::std::option::Option<
unsafe extern "C" fn(
tt: *mut TheTruthO,
tab: *mut TabI,
entity: TtIdT,
undo_scope: TtUndoScopeT,
),
>,
pub select_component: ::std::option::Option<
unsafe extern "C" fn(
tt: *mut TheTruthO,
tab: *mut TabI,
component: TtIdT,
undo_scope: TtUndoScopeT,
),
>,
pub find_simulation_entry_for_entity: ::std::option::Option<
unsafe extern "C" fn(tt: *mut TheTruthO, entity: TtIdT) -> *mut SimulateEntryI,
>,
pub find_physics_scene_settings_for_entity:
::std::option::Option<unsafe extern "C" fn(tt: *mut TheTruthO, entity: TtIdT) -> TtIdT>,
}
#[repr(C)]
pub struct SceneCommandDataT {
pub tab: *mut TabI,
pub viewport: RectT,
pub camera: *mut CameraT,
pub command_position: Vec2T,
}
impl Default for SceneCommandDataT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct SceneTabCommandI {
pub can_be_executed:
::std::option::Option<unsafe extern "C" fn(data: *mut SceneCommandDataT) -> bool>,
pub execute: ::std::option::Option<unsafe extern "C" fn(data: *mut SceneCommandDataT)>,
pub name: *const ::std::os::raw::c_char,
}
impl Default for SceneTabCommandI {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct TtAspectNameProperty {
pub property_idx: u32,
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct TheTruthReplacerApi {
pub replace_using_path: ::std::option::Option<
unsafe extern "C" fn(
tt: *mut TheTruthO,
dest: TtIdT,
source: TtIdT,
undo_scope: TtUndoScopeT,
),
>,
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct TheTruthStripperI {
pub strip: ::std::option::Option<unsafe extern "C" fn(tt: *mut TheTruthO, asset_root: TtIdT)>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RenderPipelineUpdateFrameParametersT {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RenderdocToolbarArgsT {
_unused: [u8; 0],
}
pub type ViewerRenderCallbackF = ::std::option::Option<
unsafe extern "C" fn(inst: *mut ::std::os::raw::c_void, args: *const RenderArgsT),
>;
pub type ViewerGatherShaderDataCallbackF = ::std::option::Option<
unsafe extern "C" fn(
inst: *mut ::std::os::raw::c_void,
args: *mut CiShaderDataGatherCallbackArgsT,
),
>;
pub type ViewerGatherRenderCallbackF = ::std::option::Option<
unsafe extern "C" fn(inst: *mut ::std::os::raw::c_void, args: *mut CiRenderGatherCallbackArgsT),
>;
#[repr(C)]
pub struct ViewerCameraT {
pub tm: TransformT,
pub mode: u32,
pub near_plane: f32,
pub far_plane: f32,
pub vertical_fov: f32,
pub box_height: f32,
pub shutter_speed: f32,
pub aperture: f32,
pub iso: f32,
}
impl Default for ViewerCameraT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type ViewerGatherCameraSettingsCallbackF = ::std::option::Option<
unsafe extern "C" fn(inst: *mut ::std::os::raw::c_void, camera: *mut ViewerCameraT),
>;
pub const TM_VIEWER_CAMERA_SETTINGS_IMMEDIATE: ViewerCameraSettings = 0;
pub const TM_VIEWER_CAMERA_SETTINGS_CALLBACK: ViewerCameraSettings = 1;
pub type ViewerCameraSettings = ::std::os::raw::c_int;
#[repr(C)]
pub struct ViewerRenderArgsTBindgenTy1 {
pub __bindgen_anon_1: __BindgenUnionField<ViewerRenderArgsTBindgenTy1BindgenTy1>,
pub camera: __BindgenUnionField<ViewerCameraT>,
pub bindgen_union_field: [u64; 9usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ViewerRenderArgsTBindgenTy1BindgenTy1 {
pub gather_camera_settings_callback: ViewerGatherCameraSettingsCallbackF,
pub gather_camera_settings_callback_inst: *mut ::std::os::raw::c_void,
}
impl Default for ViewerRenderArgsTBindgenTy1BindgenTy1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl Default for ViewerRenderArgsTBindgenTy1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ViewerRenderInfoT {
pub target_width: u32,
pub target_height: u32,
pub dpi_scale_factor: f32,
pub vr_context: u32,
pub camera: *const CameraT,
pub render_pipeline: *mut RenderPipelineI,
}
impl Default for ViewerRenderInfoT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ViewerO {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ViewerApi {
pub request_render: ::std::option::Option<
unsafe extern "C" fn(
viewer: *mut ViewerO,
args: *const ViewerRenderArgsT,
info: *mut ViewerRenderInfoT,
res_buf: *mut RendererResourceCommandBufferO,
cmd_buf: *mut RendererCommandBufferO,
) -> RendererHandleT,
>,
pub pipeline:
::std::option::Option<unsafe extern "C" fn(viewer: *mut ViewerO) -> *mut RenderPipelineI>,
pub reset_render_pipeline: ::std::option::Option<unsafe extern "C" fn(viewer: *mut ViewerO)>,
pub set_render_pipeline_api: ::std::option::Option<
unsafe extern "C" fn(viewer: *mut ViewerO, pipeline_api: *mut RenderPipelineApi),
>,
pub screenshot: ::std::option::Option<unsafe extern "C" fn(viewer: *mut ViewerO)>,
pub init_vr: ::std::option::Option<unsafe extern "C" fn(viewer: *mut ViewerO, activate: bool)>,
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ViewerManagerApi {
pub create_manager: ::std::option::Option<
unsafe extern "C" fn(
allocator: *mut AllocatorI,
render_backend: *mut RendererBackendI,
shader_repository: *mut ShaderRepositoryO,
main_device_affinity: u32,
default_visibility_context: *mut VisibilityContextO,
viewport_visibility_flag: u64,
) -> *mut ViewerManagerO,
>,
pub destroy_manager: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut ViewerManagerO,
res_buf: *mut RendererResourceCommandBufferO,
),
>,
pub create: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut ViewerManagerO,
main_module_name: *const ::std::os::raw::c_char,
) -> *mut ViewerO,
>,
pub destroy: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut ViewerManagerO,
viewer: *mut ViewerO,
res_buf: *mut RendererResourceCommandBufferO,
),
>,
pub viewers: ::std::option::Option<
unsafe extern "C" fn(manager: *mut ViewerManagerO) -> *mut *mut ViewerO,
>,
pub render: ::std::option::Option<
unsafe extern "C" fn(
manager: *mut ViewerManagerO,
shader_context: *const ShaderSystemContextO,
tt: *const TheTruthO,
frame_params: *const RenderPipelineUpdateFrameParametersT,
),
>,
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct AssetPreviewO {
pub _address: u8,
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct AssetSceneO {
pub _address: u8,
}
use const_cstr::{const_cstr, ConstCStr};
use crate::foundation::*;
use crate::plugins::editor_views::*;
use crate::plugins::entity::*;
use crate::plugins::render_graph::*;
use crate::plugins::renderer::*;
use crate::plugins::shader_system::*;
use crate::plugins::ui::*;
impl AssetPreviewApi {
pub unsafe fn create(&self, allocator: *mut AllocatorI) -> *mut AssetPreviewO {
self.create.unwrap()(allocator)
}
pub unsafe fn destroy(&self, inst: *mut AssetPreviewO, allocator: *mut AllocatorI) {
self.destroy.unwrap()(inst, allocator)
}
pub unsafe fn create_entity(
&self,
inst: *mut AssetPreviewO,
tt: *mut TheTruthO,
asset: TtIdT,
entity_ctx: *mut EntityContextO,
result: *mut EntityT,
) {
self.create_entity.unwrap()(inst, tt, asset, entity_ctx, result)
}
pub unsafe fn intercept_focus(
&self,
inst: *mut AssetPreviewO,
tt: *mut TheTruthO,
root_asset: TtIdT,
entity_ctx: *mut EntityContextO,
entity: *const EntityT,
focus_asset: TtIdT,
) -> bool {
self.intercept_focus.unwrap()(inst, tt, root_asset, entity_ctx, entity, focus_asset)
}
pub unsafe fn reload(
&self,
inst: *mut AssetPreviewO,
tt: *mut TheTruthO,
asset: TtIdT,
entity_ctx: *mut EntityContextO,
entity: *mut EntityT,
) -> bool {
self.reload.unwrap()(inst, tt, asset, entity_ctx, entity)
}
pub unsafe fn dirty(&self, inst: *mut AssetPreviewO, tt: *mut TheTruthO, asset: TtIdT) -> bool {
self.dirty.unwrap()(inst, tt, asset)
}
pub unsafe fn render(
&self,
inst: *mut AssetPreviewO,
tt: *mut TheTruthO,
asset: TtIdT,
args: *const RenderArgsT,
) {
self.render.unwrap()(inst, tt, asset, args)
}
pub unsafe fn refresh_thumbnail(
&self,
inst: *mut AssetPreviewO,
tt: *mut TheTruthO,
asset: TtIdT,
args: *const RenderArgsT,
) {
self.refresh_thumbnail.unwrap()(inst, tt, asset, args)
}
pub unsafe fn ui(&self, inst: *mut AssetPreviewO, args: *const AssetPreviewApiUiArgsT) {
self.ui.unwrap()(inst, args)
}
pub unsafe fn toolbars(
&self,
inst: *mut AssetPreviewO,
ta: *mut TempAllocatorI,
args: *const AssetPreviewApiUiArgsT,
) -> *mut ToolbarI {
self.toolbars.unwrap()(inst, ta, args)
}
}
impl AssetSceneApi {
pub unsafe fn create(&self, allocator: *mut AllocatorI) -> *mut AssetSceneO {
self.create.unwrap()(allocator)
}
pub unsafe fn destroy(&self, inst: *mut AssetSceneO, allocator: *mut AllocatorI) {
self.destroy.unwrap()(inst, allocator)
}
pub unsafe fn droppable(
&self,
inst: *mut AssetSceneO,
tt: *mut TheTruthO,
asset: TtIdT,
) -> bool {
self.droppable.unwrap()(inst, tt, asset)
}
pub unsafe fn create_entity(
&self,
inst: *mut AssetSceneO,
tt: *mut TheTruthO,
asset: TtIdT,
name: *const ::std::os::raw::c_char,
local_transform: *const TransformT,
parent_entity: TtIdT,
undo_stack: *mut UndoStackI,
) -> TtIdT {
self.create_entity.unwrap()(
inst,
tt,
asset,
name,
local_transform,
parent_entity,
undo_stack,
)
}
pub unsafe fn bound_entity_asset(
&self,
inst: *mut AssetSceneO,
tt: *const TheTruthO,
asset: TtIdT,
bounds: *mut Vec3T,
) {
self.bound_entity_asset.unwrap()(inst, tt, asset, bounds)
}
}
impl CameraControllerComponentApi {
pub unsafe fn create(
&self,
ctx: *mut EntityContextO,
) -> *mut CameraControllerComponentManagerO {
self.create.unwrap()(ctx)
}
pub unsafe fn feed_ui_input(
&self,
manager: *mut CameraControllerComponentManagerO,
ui: *mut UiO,
in_area: bool,
) {
self.feed_ui_input.unwrap()(manager, ui, in_area)
}
pub unsafe fn register_engines(&self, manager: *mut CameraControllerComponentManagerO) {
self.register_engines.unwrap()(manager)
}
}
impl crate::Api for CameraControllerComponentApi {
const NAME: ConstCStr = const_cstr!("tm_camera_controller_component_api");
}
impl FrustumCullingApi {
pub unsafe fn viewer_from_projection_mat(
&self,
view_tm: *const Mat44T,
projection_tm: *const Mat44T,
visibility_mask: u64,
) -> CullingViewerT {
self.viewer_from_projection_mat.unwrap()(view_tm, projection_tm, visibility_mask)
}
pub unsafe fn calc_size_of_objects_buffer(&self, bv_type: u32, num_objects: u32) -> u32 {
self.calc_size_of_objects_buffer.unwrap()(bv_type, num_objects)
}
pub unsafe fn calc_size_of_results_buffer(&self, num_viewers: u32, num_objects: u32) -> u32 {
self.calc_size_of_results_buffer.unwrap()(num_viewers, num_objects)
}
pub unsafe fn cull_fast(
&self,
viewers: *const CullingViewerT,
num_viewers: u32,
bv_type: u32,
objects: *const u8,
num_objects: u32,
results: *mut u8,
ta: *mut TempAllocatorI,
) -> *mut AtomicCounterO {
self.cull_fast.unwrap()(
viewers,
num_viewers,
bv_type,
objects,
num_objects,
results,
ta,
)
}
pub unsafe fn cull_precise(
&self,
viewers: *const CullingViewerT,
num_viewers: u32,
bv_type: u32,
objects: *const u8,
num_objects: u32,
results: *mut u8,
ta: *mut TempAllocatorI,
) -> *mut AtomicCounterO {
self.cull_precise.unwrap()(
viewers,
num_viewers,
bv_type,
objects,
num_objects,
results,
ta,
)
}
pub unsafe fn gpu_cull(
&self,
args: *mut GpuCullingArgsT,
output: *mut RendererHandleT,
output_desc: *mut RendererBufferDescT,
) {
self.gpu_cull.unwrap()(args, output, output_desc)
}
}
impl crate::Api for FrustumCullingApi {
const NAME: ConstCStr = const_cstr!("tm_frustum_culling_api");
}
impl GpuSceneSubmissionApi {
pub unsafe fn create_workload(
&self,
draw_calls: *const CreationGraphDrawCallDataT,
draw_calls_count: u32,
res_buf: *mut RendererResourceCommandBufferO,
a: *mut AllocatorI,
) -> *mut GpuSceneSubmissionWorkloadO {
self.create_workload.unwrap()(draw_calls, draw_calls_count, res_buf, a)
}
pub unsafe fn destroy_workload(
&self,
workload: *mut GpuSceneSubmissionWorkloadO,
res_buf: *mut RendererResourceCommandBufferO,
) {
self.destroy_workload.unwrap()(workload, res_buf)
}
pub unsafe fn cull_and_render(&self, args: *mut GpuSceneSubmissionArgsT) {
self.cull_and_render.unwrap()(args)
}
}
impl crate::Api for GpuSceneSubmissionApi {
const NAME: ConstCStr = const_cstr!("tm_gpu_scene_submission_api");
}
impl RenderContextApi {
pub unsafe fn create(&self, allocator: *mut AllocatorI) -> *mut RenderContextO {
self.create.unwrap()(allocator)
}
pub unsafe fn destroy(&self, context: *mut RenderContextO) {
self.destroy.unwrap()(context)
}
pub unsafe fn append_resource_buffers(
&self,
context: *mut RenderContextO,
phase: RenderContextBufferPhase,
res_buffers: *mut *mut RendererResourceCommandBufferO,
num_buffers: u32,
) {
self.append_resource_buffers.unwrap()(context, phase, res_buffers, num_buffers)
}
pub unsafe fn append_command_buffers(
&self,
context: *mut RenderContextO,
phase: RenderContextBufferPhase,
cmd_buffers: *mut *mut RendererCommandBufferO,
num_buffers: u32,
) {
self.append_command_buffers.unwrap()(context, phase, cmd_buffers, num_buffers)
}
pub unsafe fn resource_buffers(
&self,
context: *mut RenderContextO,
phase: RenderContextBufferPhase,
res_buffers: *mut *mut RendererResourceCommandBufferO,
) -> u32 {
self.resource_buffers.unwrap()(context, phase, res_buffers)
}
pub unsafe fn command_buffers(
&self,
context: *mut RenderContextO,
phase: RenderContextBufferPhase,
cmd_buffers: *mut *mut RendererCommandBufferO,
) -> u32 {
self.command_buffers.unwrap()(context, phase, cmd_buffers)
}
}
impl crate::Api for RenderContextApi {
const NAME: ConstCStr = const_cstr!("tm_render_context_api");
}
impl SceneCommonApi {
pub unsafe fn init_camera(&self, camera: *mut TransformT, translation: Vec3T) {
self.init_camera.unwrap()(camera, translation)
}
pub unsafe fn camera_frame_bounds(
&self,
camera: *mut TransformT,
camera_y_fov: f32,
bounds: *const Vec3T,
translation_speed: *mut f32,
focus_point: *mut Vec3T,
) {
self.camera_frame_bounds.unwrap()(
camera,
camera_y_fov,
bounds,
translation_speed,
focus_point,
)
}
pub unsafe fn find_component_render_interfaces(
&self,
entity_ctx: *mut EntityContextO,
transform_component: ComponentTypeT,
tt: *const TheTruthO,
allocator: *mut AllocatorI,
selection: *const TtIdT,
selection_n: u64,
ignore: *const EntityT,
ignore_n: u64,
include_entities_without_render_components: bool,
res: *mut CiRenderGatherCallbackArgsT,
) {
self.find_component_render_interfaces.unwrap()(
entity_ctx,
transform_component,
tt,
allocator,
selection,
selection_n,
ignore,
ignore_n,
include_entities_without_render_components,
res,
)
}
pub unsafe fn bound_assets(
&self,
entity_ctx: *mut EntityContextO,
transform_component: ComponentTypeT,
tt: *const TheTruthO,
ignore: *const EntityT,
ignore_n: u64,
bounds: *mut Vec3T,
include_origo: bool,
) {
self.bound_assets.unwrap()(
entity_ctx,
transform_component,
tt,
ignore,
ignore_n,
bounds,
include_origo,
)
}
pub unsafe fn bound_selected_assets(
&self,
entity_ctx: *mut EntityContextO,
transform_component: ComponentTypeT,
tt: *const TheTruthO,
selection: *const TtIdT,
selection_n: u64,
ignore: *const EntityT,
ignore_n: u64,
bounds: *mut Vec3T,
include_origo: bool,
) {
self.bound_selected_assets.unwrap()(
entity_ctx,
transform_component,
tt,
selection,
selection_n,
ignore,
ignore_n,
bounds,
include_origo,
)
}
pub unsafe fn bound_entity_asset(
&self,
tt: *const TheTruthO,
entity: TtIdT,
bounds: *mut Vec3T,
) {
self.bound_entity_asset.unwrap()(tt, entity, bounds)
}
pub unsafe fn find_shader_data_engine_update(
&self,
inst: *mut EngineO,
data: *mut EngineUpdateSetT,
) {
self.find_shader_data_engine_update.unwrap()(inst, data)
}
pub unsafe fn gather_shader_data_filter(
&self,
inst: *mut EngineO,
components: *const ComponentTypeT,
num_components: u32,
mask: *const ComponentMaskT,
) -> bool {
self.gather_shader_data_filter.unwrap()(inst, components, num_components, mask)
}
pub unsafe fn find_renderables_engine_update(
&self,
inst: *mut EngineO,
data: *mut EngineUpdateSetT,
) {
self.find_renderables_engine_update.unwrap()(inst, data)
}
pub unsafe fn gather_renderables_filter(
&self,
inst: *mut EngineO,
components: *const ComponentTypeT,
num_components: u32,
mask: *const ComponentMaskT,
) -> bool {
self.gather_renderables_filter.unwrap()(inst, components, num_components, mask)
}
pub unsafe fn add_default_light_source(&self, entity_ctx: *mut EntityContextO) -> EntityT {
self.add_default_light_source.unwrap()(entity_ctx)
}
pub unsafe fn has_any_light_source(&self, ctx: *mut EntityContextO) -> bool {
self.has_any_light_source.unwrap()(ctx)
}
pub unsafe fn component_visualization_menu(
&self,
tt: *mut TheTruthO,
entity_ctx: *mut EntityContextO,
ui: *mut UiO,
uistyle: *const UiStyleT,
tab: *mut TabI,
pos: Vec2T,
) {
self.component_visualization_menu.unwrap()(tt, entity_ctx, ui, uistyle, tab, pos)
}
pub unsafe fn viewport_visualization_toolbar(
&self,
tt: *mut TheTruthO,
entity_ctx: *mut EntityContextO,
le_settings: *mut LightingEnvironmentSettingsT,
statistics_overlays: *mut StatisticsOverlaysT,
render_pipeline: *mut RenderPipelineI,
ui: *mut UiO,
uistyle: *const UiStyleT,
tab: *mut TabI,
toolbar_r: RectT,
toolbar_draw_mode: u32,
) -> RectT {
self.viewport_visualization_toolbar.unwrap()(
tt,
entity_ctx,
le_settings,
statistics_overlays,
render_pipeline,
ui,
uistyle,
tab,
toolbar_r,
toolbar_draw_mode,
)
}
pub unsafe fn statistics_menu(
&self,
statistics_overlays: *mut StatisticsOverlaysT,
ui: *mut UiO,
uistyle: *const UiStyleT,
pos: Vec2T,
) {
self.statistics_menu.unwrap()(statistics_overlays, ui, uistyle, pos)
}
pub unsafe fn statistics_overlay_toolbars(
&self,
statistics_overlays: *mut StatisticsOverlaysT,
ta: *mut TempAllocatorI,
) -> *mut ToolbarI {
self.statistics_overlay_toolbars.unwrap()(statistics_overlays, ta)
}
pub unsafe fn place_entity(
&self,
tt: *mut TheTruthO,
entity: TtIdT,
local_transform: *const TransformT,
parent: TtIdT,
undo_scope: TtUndoScopeT,
) {
self.place_entity.unwrap()(tt, entity, local_transform, parent, undo_scope)
}
pub unsafe fn select_entity(
&self,
tt: *mut TheTruthO,
tab: *mut TabI,
entity: TtIdT,
undo_scope: TtUndoScopeT,
) {
self.select_entity.unwrap()(tt, tab, entity, undo_scope)
}
pub unsafe fn select_component(
&self,
tt: *mut TheTruthO,
tab: *mut TabI,
component: TtIdT,
undo_scope: TtUndoScopeT,
) {
self.select_component.unwrap()(tt, tab, component, undo_scope)
}
pub unsafe fn find_simulation_entry_for_entity(
&self,
tt: *mut TheTruthO,
entity: TtIdT,
) -> *mut SimulateEntryI {
self.find_simulation_entry_for_entity.unwrap()(tt, entity)
}
pub unsafe fn find_physics_scene_settings_for_entity(
&self,
tt: *mut TheTruthO,
entity: TtIdT,
) -> TtIdT {
self.find_physics_scene_settings_for_entity.unwrap()(tt, entity)
}
}
impl crate::Api for SceneCommonApi {
const NAME: ConstCStr = const_cstr!("tm_scene_common_api");
}
impl TheTruthReplacerApi {
pub unsafe fn replace_using_path(
&self,
tt: *mut TheTruthO,
dest: TtIdT,
source: TtIdT,
undo_scope: TtUndoScopeT,
) {
self.replace_using_path.unwrap()(tt, dest, source, undo_scope)
}
}
impl crate::Api for TheTruthReplacerApi {
const NAME: ConstCStr = const_cstr!("tm_the_truth_replacer_api");
}
impl ViewerApi {
pub unsafe fn request_render(
&self,
viewer: *mut ViewerO,
args: *const ViewerRenderArgsT,
info: *mut ViewerRenderInfoT,
res_buf: *mut RendererResourceCommandBufferO,
cmd_buf: *mut RendererCommandBufferO,
) -> RendererHandleT {
self.request_render.unwrap()(viewer, args, info, res_buf, cmd_buf)
}
pub unsafe fn pipeline(&self, viewer: *mut ViewerO) -> *mut RenderPipelineI {
self.pipeline.unwrap()(viewer)
}
pub unsafe fn reset_render_pipeline(&self, viewer: *mut ViewerO) {
self.reset_render_pipeline.unwrap()(viewer)
}
pub unsafe fn set_render_pipeline_api(
&self,
viewer: *mut ViewerO,
pipeline_api: *mut RenderPipelineApi,
) {
self.set_render_pipeline_api.unwrap()(viewer, pipeline_api)
}
pub unsafe fn screenshot(&self, viewer: *mut ViewerO) {
self.screenshot.unwrap()(viewer)
}
pub unsafe fn init_vr(&self, viewer: *mut ViewerO, activate: bool) {
self.init_vr.unwrap()(viewer, activate)
}
}
impl crate::Api for ViewerApi {
const NAME: ConstCStr = const_cstr!("tm_viewer_api");
}
impl ViewerManagerApi {
pub unsafe fn create_manager(
&self,
allocator: *mut AllocatorI,
render_backend: *mut RendererBackendI,
shader_repository: *mut ShaderRepositoryO,
main_device_affinity: u32,
default_visibility_context: *mut VisibilityContextO,
viewport_visibility_flag: u64,
) -> *mut ViewerManagerO {
self.create_manager.unwrap()(
allocator,
render_backend,
shader_repository,
main_device_affinity,
default_visibility_context,
viewport_visibility_flag,
)
}
pub unsafe fn destroy_manager(
&self,
manager: *mut ViewerManagerO,
res_buf: *mut RendererResourceCommandBufferO,
) {
self.destroy_manager.unwrap()(manager, res_buf)
}
pub unsafe fn create(
&self,
manager: *mut ViewerManagerO,
main_module_name: *const ::std::os::raw::c_char,
) -> *mut ViewerO {
self.create.unwrap()(manager, main_module_name)
}
pub unsafe fn destroy(
&self,
manager: *mut ViewerManagerO,
viewer: *mut ViewerO,
res_buf: *mut RendererResourceCommandBufferO,
) {
self.destroy.unwrap()(manager, viewer, res_buf)
}
pub unsafe fn viewers(&self, manager: *mut ViewerManagerO) -> *mut *mut ViewerO {
self.viewers.unwrap()(manager)
}
pub unsafe fn render(
&self,
manager: *mut ViewerManagerO,
shader_context: *const ShaderSystemContextO,
tt: *const TheTruthO,
frame_params: *const RenderPipelineUpdateFrameParametersT,
) {
self.render.unwrap()(manager, shader_context, tt, frame_params)
}
}
impl crate::Api for ViewerManagerApi {
const NAME: ConstCStr = const_cstr!("tm_viewer_manager_api");
}
pub const TM_TT_ASPECT__ASSET_PREVIEW: StrhashT = StrhashT {
u64_: 14212721863639798132u64,
};
pub const TM_TT_ASPECT__ASSET_SCENE: StrhashT = StrhashT {
u64_: 14329318064558651605u64,
};
pub const TM_TT_ASPECT__ASSET_OPEN: StrhashT = StrhashT {
u64_: 5594051701220254319u64,
};
pub const TYPE_HASH__CAMERA_CONTROLLER_COMPONENT: StrhashT = StrhashT {
u64_: 9760961870676976776u64,
};
pub const TM_ENGINE__FREEFLIGHT_CAMERA_CONTROLLER: StrhashT = StrhashT {
u64_: 16405980432310866292u64,
};
pub const TM_ENGINE__FREEFLIGHT_CAMERA_TRANSFORM: StrhashT = StrhashT {
u64_: 3643124764479369251u64,
};
pub const TM_CI_EDITOR_UI: StrhashT = StrhashT {
u64_: 15967003850867459386u64,
};
pub const TM_EDITOR_TOOL_ID__SELECT: StrhashT = StrhashT {
u64_: 15419100652914668230u64,
};
pub const TM_EDITOR_TOOL_ID__MOVE: StrhashT = StrhashT {
u64_: 10765360271784010468u64,
};
pub const TM_EDITOR_TOOL_ID__ROTATE: StrhashT = StrhashT {
u64_: 4957850385211195158u64,
};
pub const TM_EDITOR_TOOL_ID__SCALE: StrhashT = StrhashT {
u64_: 10577229183153927243u64,
};
pub const TM_CI_RENDER: StrhashT = StrhashT {
u64_: 6430888070237176841u64,
};
pub const TM_CI_SHADER: StrhashT = StrhashT {
u64_: 14389400674037110261u64,
};
pub const TM_GPU_CULLING__TRANSFORMS_INPUT: StrhashT = StrhashT {
u64_: 2665470916605338210u64,
};
pub const TM_GPU_CULLING__OUTPUT: StrhashT = StrhashT {
u64_: 13816956930322693720u64,
};
pub const TM_GPU_CULLING__DRAW_CMDS_OUTPUT: StrhashT = StrhashT {
u64_: 12832042406061263999u64,
};
pub const TM_GPU_CULLING__BOUNDING_RADIUS: StrhashT = StrhashT {
u64_: 13926938770589846664u64,
};
pub const TM_GPU_CULLING__TRANSFORMS_COUNT: StrhashT = StrhashT {
u64_: 7762110212670973143u64,
};
pub const TM_GPU_CULLING__TRANSFORMS_START: StrhashT = StrhashT {
u64_: 17570208879660267539u64,
};
pub const TM_GPU_CULLING__TRANSFORMS_STRIDE: StrhashT = StrhashT {
u64_: 194691516363235041u64,
};
pub const TM_GPU_CULLING__CULLING_DISTANCE: StrhashT = StrhashT {
u64_: 5958167400858114767u64,
};
pub const TM_GPU_CULLING__DRAW_CMDS_COUNT: StrhashT = StrhashT {
u64_: 17165353573604852259u64,
};
pub const TM_GPU_CULLING__PARENT_TRANSFORM: StrhashT = StrhashT {
u64_: 10460656992834597080u64,
};
pub const TM_GPU_SCENE_SUBMISSION__TRANSFORMS_INPUT: StrhashT = StrhashT {
u64_: 2735135666531474372u64,
};
pub const TM_GPU_SCENE_SUBMISSION__OUTPUT: StrhashT = StrhashT {
u64_: 18345216586284322428u64,
};
pub const TM_GPU_SCENE_SUBMISSION__DRAW_CMDS_OUTPUT: StrhashT = StrhashT {
u64_: 3450145739906582207u64,
};
pub const TM_GPU_SCENE_SUBMISSION__DISPATCH_INDIRECT_OUTPUT: StrhashT = StrhashT {
u64_: 8013803713849225952u64,
};
pub const TM_GPU_SCENE_SUBMISSION__BOUNDING_RADIUS: StrhashT = StrhashT {
u64_: 1112308192711211455u64,
};
pub const TM_GPU_SCENE_SUBMISSION__TRANSFORMS_COUNT: StrhashT = StrhashT {
u64_: 16164211266129383767u64,
};
pub const TM_GPU_SCENE_SUBMISSION__TRANSFORMS_START: StrhashT = StrhashT {
u64_: 5762445022806614575u64,
};
pub const TM_GPU_SCENE_SUBMISSION__TRANSFORMS_STRIDE: StrhashT = StrhashT {
u64_: 12307040261741271801u64,
};
pub const TM_GPU_SCENE_SUBMISSION__PARENT_TRANSFORM: StrhashT = StrhashT {
u64_: 12159040891817738833u64,
};
pub const TM_GPU_SCENE_SUBMISSION__CULLING_DISTANCE: StrhashT = StrhashT {
u64_: 5100655888310955492u64,
};
pub const TM_GPU_SCENE_SUBMISSION__DRAW_CMDS_COUNT: StrhashT = StrhashT {
u64_: 5210628088815794490u64,
};
pub const TM_GPU_SCENE_SUBMISSION__VIEWERS_COUNT: StrhashT = StrhashT {
u64_: 8158439013611647872u64,
};
pub const TM_GPU_SCENE_SUBMISSION__INDIRECT_DRAW_CMDS_START: StrhashT = StrhashT {
u64_: 7929537108828966574u64,
};
pub const TM_GPU_SCENE_SUBMISSION__INDIRECT_COMPUTE_CMD_OFFSET: StrhashT = StrhashT {
u64_: 6871324773626176928u64,
};
pub const TM_GPU_SCENE_SUBMISSION__INSTANCE_COUNTERS_START: StrhashT = StrhashT {
u64_: 8003617856616968400u64,
};
pub const TM_GPU_SCENE_SUBMISSION__INSTANCE_INDIRECTION_START: StrhashT = StrhashT {
u64_: 8389349747083231397u64,
};
pub const TM_TT_ASPECT__NAME_PROPERTY: StrhashT = StrhashT {
u64_: 16328471694850579054u64,
};