mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-08 17:28:49 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
adae0656eb | ||
|
|
2c587731bd | ||
|
|
4d231d8c27 | ||
|
|
266f7a3ad9 | ||
|
|
668ab0f0c4 | ||
|
|
2a0e34d66e | ||
|
|
e517e9b96a | ||
|
|
99aed1723f | ||
|
|
ad542822ed | ||
|
|
1b4d622bb4 | ||
|
|
9b71cdbb0f | ||
|
|
02381aabef | ||
|
|
790cf1c27e | ||
|
|
507379406d | ||
|
|
82913126ef | ||
|
|
432e5c02de | ||
|
|
8f93a6f379 | ||
|
|
106ae968a0 | ||
|
|
2008327742 | ||
|
|
2a8753d13c | ||
|
|
afa01c5421 | ||
|
|
4f4ef6e815 | ||
|
|
6f637df360 | ||
|
|
b64fe2adc2 | ||
|
|
1b8eb669d8 | ||
|
|
84e0251a86 | ||
|
|
a22062f4f9 | ||
|
|
32525ea0d3 | ||
|
|
d560660bdc | ||
|
|
f7f613a244 | ||
|
|
fcbcfab3d9 | ||
|
|
c2882164f9 | ||
|
|
c101b4ccb3 | ||
|
|
d889f594a3 | ||
|
|
e09075dc25 | ||
|
|
b8bbf77196 | ||
|
|
6804540635 | ||
|
|
08621cbd20 | ||
|
|
b35fdee119 | ||
|
|
826a3eff46 | ||
|
|
dcd71b403f | ||
|
|
cfc7f4c8c7 | ||
|
|
58233137b0 | ||
|
|
70e85ad719 | ||
|
|
f5379815da | ||
|
|
2a4c857df9 | ||
|
|
df09b0dc9b | ||
|
|
a02cade1f2 | ||
|
|
12ae59a197 | ||
|
|
b9036e26a7 | ||
|
|
093c1c5a12 | ||
|
|
e66c2d937a | ||
|
|
d3d9229f1d | ||
|
|
43c42c28e6 | ||
|
|
69c05cd7b4 | ||
|
|
c1ce224bd7 | ||
|
|
b14593081d | ||
|
|
6ea0eae4bb | ||
|
|
4b29c9dcad | ||
|
|
15be2d6b34 | ||
|
|
9fe27117f2 | ||
|
|
75bdde358a | ||
|
|
8a3567ab61 | ||
|
|
058dc172c7 | ||
|
|
6bf26dc420 | ||
|
|
1cf6f2f20f | ||
|
|
bcaa24cf7b | ||
|
|
ecfb0dda43 | ||
|
|
3c4f13e9f5 | ||
|
|
2211f4391c | ||
|
|
730f8d8996 | ||
|
|
aa99f4f5ba | ||
|
|
d2cdc97e8f | ||
|
|
b75bb07329 | ||
|
|
63d36f658d | ||
|
|
9b1ab23aa1 | ||
|
|
c800477bc8 | ||
|
|
28ef2d6487 | ||
|
|
56e63d4460 | ||
|
|
2444d8b39c | ||
|
|
bcb97caa4e | ||
|
|
a7e19107ce | ||
|
|
5733d8ebd5 | ||
|
|
3a590f126d | ||
|
|
434bec8775 | ||
|
|
913eab54ff | ||
|
|
c3650f077a | ||
|
|
e067dac2a4 | ||
|
|
a62052eb0a | ||
|
|
abd22ae770 | ||
|
|
5e2e586f6e | ||
|
|
26711ec0d5 | ||
|
|
6ad1a5cc8f | ||
|
|
e73a7c24e2 | ||
|
|
e247867bd7 | ||
|
|
dc521b42d1 | ||
|
|
525c8f7c8e | ||
|
|
633cadcde7 | ||
|
|
912068f850 | ||
|
|
2ce1dbcf02 | ||
|
|
3a141cb891 | ||
|
|
2fda0b7e66 | ||
|
|
0dc0cc5bf0 | ||
|
|
b4902e7df5 | ||
|
|
95495cbf62 | ||
|
|
87c94982c2 | ||
|
|
e5d930ae0a | ||
|
|
ff3a0d9a3c | ||
|
|
2aa004a1ce | ||
|
|
344a4099eb | ||
|
|
c2a4fa83e8 | ||
|
|
15b1bb40a4 | ||
|
|
e2d8771baf | ||
|
|
790fcd2264 | ||
|
|
c576faae0c | ||
|
|
760fee18dd | ||
|
|
1521a8dd38 | ||
|
|
c9b88fa1ab | ||
|
|
708596ba84 | ||
|
|
d27252daed | ||
|
|
9d91a38602 | ||
|
|
22dee03c65 | ||
|
|
4eb0f21b8f | ||
|
|
21cb98e3fb | ||
|
|
8a618f8e95 | ||
|
|
1d2b5fb534 | ||
|
|
f6ca13b658 | ||
|
|
f8397a17c3 | ||
|
|
49753a7385 | ||
|
|
abba2f387e | ||
|
|
39b1e43cbc | ||
|
|
aed74a008c | ||
|
|
2a6ffd9c3b | ||
|
|
ffc393cafc | ||
|
|
260f9532e9 | ||
|
|
22eb2f8f3b | ||
|
|
933627353b | ||
|
|
5ac0141a9a | ||
|
|
d1dc2e9670 | ||
|
|
3c07209a1a | ||
|
|
e9d8525e29 | ||
|
|
b4b3887a1a | ||
|
|
58de712b77 | ||
|
|
fb33dcf17b | ||
|
|
edc64991f3 | ||
|
|
3e2c713893 | ||
|
|
645bae4931 | ||
|
|
60296c0b7d | ||
|
|
6995154a9a | ||
|
|
e9f9702a2d | ||
|
|
529ecf1e36 | ||
|
|
95f4910a94 | ||
|
|
0a7968761f | ||
|
|
4293e5b334 | ||
|
|
5636b0fdd6 | ||
|
|
c9a9880a36 | ||
|
|
fd11190e9d | ||
|
|
fe829e5eb0 | ||
|
|
bec00d986c | ||
|
|
768dbb5210 | ||
|
|
626b8b5dae | ||
|
|
5de9ba0bc2 | ||
|
|
4813019c58 | ||
|
|
0c7f209e65 | ||
|
|
ccd5dec266 | ||
|
|
5ba36ad3a1 | ||
|
|
36f700927e | ||
|
|
fa8db9b4d2 | ||
|
|
39679ccdce | ||
|
|
63d2e543af | ||
|
|
540fdf358c | ||
|
|
25c18bb3ce | ||
|
|
17d699c75b | ||
|
|
8fbcf34e02 | ||
|
|
175aaadb0d | ||
|
|
b4173ee0b4 | ||
|
|
e58eee37bc | ||
|
|
7c41e298a2 | ||
|
|
d561c7ff2d | ||
|
|
431f1b4b7f | ||
|
|
ddb4867c52 | ||
|
|
e1041030a2 | ||
|
|
b11620e1eb | ||
|
|
50b07ad8c4 | ||
|
|
ba71dda1b2 | ||
|
|
be98b0ea0b | ||
|
|
7cda786906 | ||
|
|
03ee897ae2 | ||
|
|
c16bb5ff5e | ||
|
|
c1c5ebf5f6 | ||
|
|
bfe8a8d48a | ||
|
|
2127f5202b | ||
|
|
e3e41e433e | ||
|
|
8b972a8d82 | ||
|
|
94af3addd0 | ||
|
|
f5a12d63cc | ||
|
|
688414c5bb | ||
|
|
d3868cc06f | ||
|
|
20e7ac4280 | ||
|
|
411ade7fb9 | ||
|
|
6bbe74d260 | ||
|
|
ff3a750e71 | ||
|
|
721a8f6d47 | ||
|
|
0ece49df50 | ||
|
|
c444659683 | ||
|
|
84e799fd09 | ||
|
|
e1392b0fd4 | ||
|
|
e34dc17859 | ||
|
|
15ca6c9507 | ||
|
|
56f0bc2dcc | ||
|
|
fc8392d1e7 | ||
|
|
9a382ce6f4 | ||
|
|
8487966c0b | ||
|
|
97063701f8 | ||
|
|
b74b0ceed5 | ||
|
|
5d1cfc47cc | ||
|
|
aaa590c817 | ||
|
|
57514668f3 | ||
|
|
af3b2f22ec | ||
|
|
737adeabe7 | ||
|
|
33c96bf6f2 | ||
|
|
69061352a7 | ||
|
|
38e5d062e8 | ||
|
|
0aa4edafcf | ||
|
|
57c20bdee7 | ||
|
|
b7666b56d1 | ||
|
|
89b345e262 | ||
|
|
b661466516 | ||
|
|
505d45fdc7 | ||
|
|
64cd82ceb2 | ||
|
|
aec2dcb62a | ||
|
|
bc64ad7774 | ||
|
|
02fb4cf718 | ||
|
|
4ad5f67663 | ||
|
|
e7d623f971 | ||
|
|
5c5c5ecbdf | ||
|
|
379546207f | ||
|
|
091eff9879 | ||
|
|
98beb5d64c | ||
|
|
681351c581 | ||
|
|
ffa9ddeec2 | ||
|
|
7b57696a51 | ||
|
|
8068bcccbe | ||
|
|
59bfe30214 | ||
|
|
37c0cf50fd | ||
|
|
fcc3260341 | ||
|
|
736defed49 | ||
|
|
7202d38c57 | ||
|
|
e08089de48 | ||
|
|
d67348b467 | ||
|
|
eca0ac054a | ||
|
|
5dfd97ff29 | ||
|
|
6aa99ebb37 | ||
|
|
bf5a513e2d | ||
|
|
4ae7718f1c | ||
|
|
e8976762a5 | ||
|
|
53f089ff09 | ||
|
|
c2c4eeb4ca | ||
|
|
9bf8465e02 | ||
|
|
852ef54b7d | ||
|
|
c6e6b394d1 | ||
|
|
540b9d5615 | ||
|
|
c2c2e0cdc9 | ||
|
|
652452b905 | ||
|
|
2bc417e29f | ||
|
|
66fc9e6a06 | ||
|
|
6803c16bae | ||
|
|
e2c3f42390 | ||
|
|
4200c2f135 | ||
|
|
f087419165 | ||
|
|
78339ae67c | ||
|
|
b2257347a3 | ||
|
|
541cfbd635 | ||
|
|
93ea78772d | ||
|
|
a1be55f655 | ||
|
|
d5cdbca322 | ||
|
|
1f841909f5 | ||
|
|
f850e64037 | ||
|
|
e23f0be913 | ||
|
|
914acd3956 | ||
|
|
b134c5d23c | ||
|
|
605d877279 | ||
|
|
3d45ba29d8 | ||
|
|
097d9bc13b | ||
|
|
56d744ceaa | ||
|
|
652e00b93e | ||
|
|
e0cc113689 | ||
|
|
eb371741a2 | ||
|
|
a3f216ba86 | ||
|
|
4850af8eac | ||
|
|
c010c5b258 | ||
|
|
5c973b6649 | ||
|
|
2d76e98c22 | ||
|
|
55e23395e0 | ||
|
|
96ded45dd2 | ||
|
|
6db8aa8a65 | ||
|
|
c990a57359 | ||
|
|
bcae2fdc9b | ||
|
|
5267b630f8 | ||
|
|
e6a1afdb22 | ||
|
|
cf71d465a3 | ||
|
|
6af5bd01bf | ||
|
|
7e8aabd080 | ||
|
|
822844e676 | ||
|
|
55e6ddc88e | ||
|
|
8980c8a46b | ||
|
|
d25a749702 | ||
|
|
2492f3d6b3 | ||
|
|
7f5986e1d5 | ||
|
|
6bc0f02435 | ||
|
|
aa45e5023f | ||
|
|
d5a1ad0a73 | ||
|
|
fca0e52bdd | ||
|
|
39ea7deef7 | ||
|
|
2e9c5ba6f9 | ||
|
|
34dd03a16f | ||
|
|
c7ac70a923 | ||
|
|
2496a6287c | ||
|
|
08b6fdb697 | ||
|
|
470995630b | ||
|
|
11d4827c9f | ||
|
|
fba0080ebc | ||
|
|
8d1e51af7c | ||
|
|
1598042e8e | ||
|
|
e610a906b5 | ||
|
|
77cc37743c | ||
|
|
288657971d | ||
|
|
f5a126df24 | ||
|
|
22fc07a839 | ||
|
|
075930c420 | ||
|
|
364440813f | ||
|
|
a41b8bc199 | ||
|
|
e92feb85af | ||
|
|
895c817fa5 | ||
|
|
5e0e970c92 | ||
|
|
483aceb2af | ||
|
|
0a77d35cb9 | ||
|
|
42e56c8432 | ||
|
|
0751cb238d | ||
|
|
060753258a | ||
|
|
68516cf74c | ||
|
|
e2d4ff5614 | ||
|
|
9ec396c0ea | ||
|
|
c14c4cd394 | ||
|
|
5081d03194 | ||
|
|
7e9cb39519 | ||
|
|
612cb54cfe | ||
|
|
80e2911bec | ||
|
|
d482739dfd | ||
|
|
d0aad07930 | ||
|
|
0319041ffb | ||
|
|
95e588ce0f | ||
|
|
9b13894438 | ||
|
|
34be5566dd | ||
|
|
84f5fa1f26 | ||
|
|
c70526b7af | ||
|
|
e8c73c6683 | ||
|
|
d32cf4c866 | ||
|
|
37656eed84 | ||
|
|
cea6dbbb6a | ||
|
|
cffe023085 | ||
|
|
6d85e1f0a6 | ||
|
|
e698e75a51 | ||
|
|
34c1c5a361 | ||
|
|
473aed632d | ||
|
|
33905af090 | ||
|
|
3a34329cb7 | ||
|
|
44fdbf7763 | ||
|
|
96ab060995 | ||
|
|
cdf7a403ea | ||
|
|
cdd7fbeb52 | ||
|
|
8f5f3d15f3 | ||
|
|
5812471350 | ||
|
|
420d0d0607 | ||
|
|
65633c93f3 | ||
|
|
cd3276c554 | ||
|
|
8980f8c1ea | ||
|
|
eb08a86647 | ||
|
|
b633b8ad2d | ||
|
|
39108f97e9 | ||
|
|
44930716ba | ||
|
|
a74197dc49 | ||
|
|
f86f1b3e32 | ||
|
|
aaf3c876eb | ||
|
|
e2be9e659d | ||
|
|
d7ff2de094 | ||
|
|
6b1b8fc35a | ||
|
|
0c3283574d | ||
|
|
ab087faa2a | ||
|
|
5c84f9158e | ||
|
|
a371815efd | ||
|
|
eb5bf9451d | ||
|
|
c711749973 | ||
|
|
4a5593255f | ||
|
|
5ef8b69c9c | ||
|
|
dfcbd77a6b | ||
|
|
afa07219cd | ||
|
|
f9061ca931 | ||
|
|
9a471d0ef4 | ||
|
|
c7036b24d4 | ||
|
|
0cbe5164b4 | ||
|
|
5887c46e08 | ||
|
|
11f8938f7e | ||
|
|
0dd2304e7c | ||
|
|
ceca89e104 | ||
|
|
6c81007eb9 | ||
|
|
803ae53372 | ||
|
|
f6c2d97ed5 | ||
|
|
fb3c35dc9f | ||
|
|
b610d034ae | ||
|
|
34b5d0025b | ||
|
|
486660471e | ||
|
|
d9e6cbb065 | ||
|
|
59c3f8b06e | ||
|
|
603d4d0464 | ||
|
|
9e93bdbe27 | ||
|
|
3dede6d71a | ||
|
|
c3f5c499f3 | ||
|
|
afd6a2bec5 | ||
|
|
604a558382 | ||
|
|
deb804ab2f | ||
|
|
c7b45aaf80 | ||
|
|
3d61c7fdfc | ||
|
|
b148ae8092 | ||
|
|
bf20021338 | ||
|
|
3443153ccc | ||
|
|
96bfb35e0b | ||
|
|
89fe5625cb | ||
|
|
d88b76c26f | ||
|
|
829392398e | ||
|
|
f5225a479e | ||
|
|
d479bd0e1e | ||
|
|
3d54afdc1b | ||
|
|
1d65222051 | ||
|
|
5d78c2209f | ||
|
|
efdfb29d50 | ||
|
|
7685f93d00 | ||
|
|
ded0813f6b | ||
|
|
f307135d1d | ||
|
|
470c857470 | ||
|
|
6b3dbff75f | ||
|
|
0bd998665b | ||
|
|
007bb0de39 | ||
|
|
9ebfb36b4e | ||
|
|
e276142be3 | ||
|
|
4f22c3d13e | ||
|
|
15c4f82dec | ||
|
|
ae98ea7210 | ||
|
|
eee1ff7b46 | ||
|
|
c9d90ce1b6 | ||
|
|
cacde2b464 | ||
|
|
7bcffde6c6 | ||
|
|
f5fc95cd04 | ||
|
|
c3c772a79a | ||
|
|
d903b1cc60 | ||
|
|
304a647248 | ||
|
|
8f55e77afe | ||
|
|
c6c8881ab2 | ||
|
|
37c0a2d923 | ||
|
|
f5c5f489b3 | ||
|
|
dae733132a | ||
|
|
4a8d8d4d9f | ||
|
|
8b945a103f | ||
|
|
a3c88fec74 | ||
|
|
ab793b92a3 | ||
|
|
1911aadc19 | ||
|
|
85058fbe5c | ||
|
|
a8a8bde2ef | ||
|
|
210da4d204 | ||
|
|
05a90f7f70 | ||
|
|
45305b4c04 | ||
|
|
39a9ac8444 | ||
|
|
5efb90d614 | ||
|
|
d0a4632c13 | ||
|
|
97e3a9e908 | ||
|
|
e237b0f0aa | ||
|
|
5afc868562 | ||
|
|
a8f1831a62 | ||
|
|
647dc488ff | ||
|
|
f740776105 | ||
|
|
11559f294a | ||
|
|
f413b23f06 | ||
|
|
2056ebc803 | ||
|
|
a4358deb0d | ||
|
|
44b4a4e028 | ||
|
|
6e3b60a91a | ||
|
|
478909697b | ||
|
|
71efef723b | ||
|
|
25a89c3ff1 | ||
|
|
1056027d4d | ||
|
|
f14473fd23 | ||
|
|
69ab4b6137 | ||
|
|
6bf867330f | ||
|
|
f085e69939 | ||
|
|
17d0037bd5 | ||
|
|
03160ed3fc | ||
|
|
1be1386161 | ||
|
|
cc1954b4ac | ||
|
|
973600ab30 | ||
|
|
f2a8b11ef7 | ||
|
|
558181e7dd | ||
|
|
6be03843e3 | ||
|
|
ba2cf008c6 | ||
|
|
6b638cae8b | ||
|
|
37283185c9 | ||
|
|
b13dc7415c | ||
|
|
7053a74d3f | ||
|
|
a47ab76500 | ||
|
|
ecbd921668 | ||
|
|
659668749c | ||
|
|
32d4e740ce | ||
|
|
1af6d8a59f | ||
|
|
b46c78f391 | ||
|
|
8c9e72aec1 | ||
|
|
a6dc4430ba | ||
|
|
bc7427732c | ||
|
|
eb8b31df3c | ||
|
|
dabbaee7b9 | ||
|
|
1df9766491 | ||
|
|
c4b2feb811 | ||
|
|
fd64b158ac | ||
|
|
70d906c176 | ||
|
|
b6c0688f41 | ||
|
|
451db1fac5 | ||
|
|
6d6309aaf0 | ||
|
|
c83d72d589 | ||
|
|
46806e7204 | ||
|
|
c5fe9f4252 | ||
|
|
eeff3b87e8 | ||
|
|
78a0711bff | ||
|
|
3d4d9b09cf | ||
|
|
449483206f | ||
|
|
57503051ea | ||
|
|
0066fe8065 | ||
|
|
766e4f5110 | ||
|
|
691fa0a31d | ||
|
|
a1d3dd69dd | ||
|
|
68beaa5ffc | ||
|
|
67c95d6dfb | ||
|
|
710e912aca | ||
|
|
66bfdc9408 | ||
|
|
0bd74c923f | ||
|
|
1cdd0e47cb | ||
|
|
dfae380f33 | ||
|
|
b4e16c243c | ||
|
|
2fa401ef26 | ||
|
|
5521d58994 | ||
|
|
44bf15ad28 | ||
|
|
30047af7a3 | ||
|
|
426dfd79db | ||
|
|
a58cbf6e42 | ||
|
|
7fabbcebba | ||
|
|
51adb3ff78 | ||
|
|
e67b6d4b3c | ||
|
|
a23e2ead3c | ||
|
|
d2bc5e0454 | ||
|
|
c6ead6e973 | ||
|
|
5a4bb34cf8 | ||
|
|
39f1441b7c | ||
|
|
1808c6de57 | ||
|
|
950aef8ded | ||
|
|
cf9ecbcf39 | ||
|
|
ca6c0110fe | ||
|
|
30c5a2870f | ||
|
|
ffe0987454 | ||
|
|
c7825e4708 | ||
|
|
c2cb872b08 | ||
|
|
fa809bd3f4 | ||
|
|
fdafae33c1 | ||
|
|
9fa871ccf9 | ||
|
|
cf2f8f6489 | ||
|
|
d8f1cf7b5a | ||
|
|
57273a545f | ||
|
|
66f056322a | ||
|
|
2f39e4cd33 | ||
|
|
857562bf9d | ||
|
|
3fbed8df27 | ||
|
|
c74104f8c9 | ||
|
|
ba58eaf9fe | ||
|
|
d0b0246ee4 | ||
|
|
b5aef51cc0 | ||
|
|
6c5d5ea497 | ||
|
|
721c6bc5bb | ||
|
|
dbbcba41a5 | ||
|
|
b8041cc93b | ||
|
|
d120c9f38b | ||
|
|
b49d2a87ab | ||
|
|
f589c50043 | ||
|
|
3ec06a3a4c | ||
|
|
92b4982292 | ||
|
|
f019b434ef | ||
|
|
0dc55a34d9 | ||
|
|
79fdccb31f | ||
|
|
f1447ddf3f | ||
|
|
9fe1b9f0b2 | ||
|
|
556cc4b426 | ||
|
|
e47056468c | ||
|
|
8e2753cc53 | ||
|
|
9438545bca | ||
|
|
63638ee571 | ||
|
|
a379b71d42 | ||
|
|
4c1dc265bc | ||
|
|
5851d103d0 | ||
|
|
0b3ef16982 | ||
|
|
fabdc580ef | ||
|
|
3e8234ab38 | ||
|
|
22f8dfab2d | ||
|
|
a626a30098 | ||
|
|
087debe45d | ||
|
|
09ddd9ddcf | ||
|
|
70ffe1c12e | ||
|
|
1acfb9fed6 | ||
|
|
1b754cf62d | ||
|
|
df17764673 | ||
|
|
11576f1d99 | ||
|
|
08bed1b0a2 | ||
|
|
94e2570c2f | ||
|
|
716b9ac09a | ||
|
|
84418df9eb | ||
|
|
63a640605c | ||
|
|
c4478da202 | ||
|
|
95457077c6 | ||
|
|
5f52a06080 | ||
|
|
f1b900f7bc | ||
|
|
a1f3aea089 | ||
|
|
82473e4e32 | ||
|
|
c1386c6f6f | ||
|
|
882fe09dad | ||
|
|
74f202bbda | ||
|
|
588a64dcf2 | ||
|
|
b91dd1413f | ||
|
|
9f1ca98ca3 | ||
|
|
8b4f900652 | ||
|
|
9f2c15c17c | ||
|
|
11641645b2 | ||
|
|
43a3298990 | ||
|
|
1d013b49c6 | ||
|
|
a40e77b408 | ||
|
|
0d3593f794 | ||
|
|
ecadf864c5 | ||
|
|
e2a6a7ad17 | ||
|
|
f89f6119e7 | ||
|
|
3fbfeadaf3 | ||
|
|
5a92ec15cf | ||
|
|
e18a5716e3 | ||
|
|
0a73bccd52 | ||
|
|
9e1c426a3a | ||
|
|
329447f51c | ||
|
|
4f678dfdfc | ||
|
|
259cd900da | ||
|
|
056af331aa | ||
|
|
f3453500d4 | ||
|
|
25210d5f2a | ||
|
|
c72d47b9d0 | ||
|
|
37f74de732 | ||
|
|
62e96b63e4 | ||
|
|
341d1f9528 | ||
|
|
35e28d2f72 | ||
|
|
eebd7bbeea | ||
|
|
bf7d19f401 | ||
|
|
39adab8cc1 | ||
|
|
ad7cb85fcc | ||
|
|
a04b54006d | ||
|
|
d00921b723 | ||
|
|
6f39d6da97 | ||
|
|
a98c2c38c0 | ||
|
|
80b5bcd16c | ||
|
|
b70b40969b | ||
|
|
a883dfd825 | ||
|
|
9ccdcad906 | ||
|
|
ef4b5db5e2 | ||
|
|
0b1e6b437d | ||
|
|
c87445f0f9 | ||
|
|
907f0db4a3 | ||
|
|
bc64b7cd4e | ||
|
|
d6b7bba069 | ||
|
|
a6789c5717 | ||
|
|
1421d1da30 | ||
|
|
7b1b137866 | ||
|
|
ccba9635b6 | ||
|
|
5f0fcce8d0 | ||
|
|
171694804b | ||
|
|
385539ccc5 | ||
|
|
78e5b63b41 | ||
|
|
c09a2f9ab7 | ||
|
|
934f7c58ba | ||
|
|
6b57791b0a | ||
|
|
801956aaaa | ||
|
|
2681352d53 | ||
|
|
12e5b93a8b | ||
|
|
8ec72610d8 | ||
|
|
c045b80a5a | ||
|
|
b13c8db6b5 | ||
|
|
554519457b | ||
|
|
88a44a2c2e | ||
|
|
defab8842a | ||
|
|
79d35d158a | ||
|
|
98a3d80e71 | ||
|
|
fce0ca2a3a | ||
|
|
ec79d8c46a | ||
|
|
371c3e56de | ||
|
|
10df6d3b54 | ||
|
|
f62490b14f | ||
|
|
d48ec2a9e6 | ||
|
|
d78e1da956 | ||
|
|
801cc57e82 | ||
|
|
b00776b09e | ||
|
|
e7d3f36a22 | ||
|
|
8cc2886773 | ||
|
|
5a46537968 | ||
|
|
ec04fdf2f1 | ||
|
|
a5d701d2dd | ||
|
|
dd5bc1a951 | ||
|
|
50fc71a0a6 | ||
|
|
22a07eaf6c | ||
|
|
634de19dc9 | ||
|
|
80f9e6db90 | ||
|
|
2797aae6cf | ||
|
|
93a6426fe4 | ||
|
|
e8cc77e567 | ||
|
|
fd4e3c0448 | ||
|
|
75182bfc6f | ||
|
|
bae2110bb4 | ||
|
|
d1291f406b | ||
|
|
d87b85bdd1 | ||
|
|
eede1a4978 | ||
|
|
db490a69a3 | ||
|
|
0b1716650b | ||
|
|
1bd07c34c7 | ||
|
|
b2b4cc667c | ||
|
|
f321763b1c | ||
|
|
c0c3bb3dbd | ||
|
|
4963ff31f0 | ||
|
|
043574c5be | ||
|
|
a8b91ee910 | ||
|
|
08521a02ba | ||
|
|
954b95cc81 | ||
|
|
70bbe92154 | ||
|
|
d7de9facc3 | ||
|
|
77d83b4782 | ||
|
|
8bf552dacd | ||
|
|
f8f25602e8 | ||
|
|
a35e452ec3 | ||
|
|
68ecade37d | ||
|
|
4d4b00f877 | ||
|
|
3e00c632bd | ||
|
|
184b519f84 | ||
|
|
136a435c43 | ||
|
|
abd6dcd57f | ||
|
|
a09a1030c0 | ||
|
|
73cc655de7 | ||
|
|
fd3025ff40 | ||
|
|
e49c71b142 | ||
|
|
c92bf4d5e8 | ||
|
|
c64c072b43 | ||
|
|
cae04ff5f2 | ||
|
|
1d6b24b545 | ||
|
|
f25b60a7ab | ||
|
|
bcbcabffe0 | ||
|
|
450ab7de40 | ||
|
|
80f06b9574 | ||
|
|
aeddb18e31 | ||
|
|
759b963c2f | ||
|
|
d08b785f9d | ||
|
|
24c7bcb196 | ||
|
|
1e02bd3455 | ||
|
|
d1b50acfee | ||
|
|
45477658e1 | ||
|
|
d029cafdd9 | ||
|
|
f85ab1f535 | ||
|
|
66b1ad99d4 | ||
|
|
f847548178 | ||
|
|
a088113f4c | ||
|
|
d61e5504a7 | ||
|
|
a19128422d | ||
|
|
cd4c17624a | ||
|
|
004a299b74 | ||
|
|
be2fb7b10d | ||
|
|
999f7971ed | ||
|
|
642e65f53f | ||
|
|
3ad2d593fb | ||
|
|
e5059a237a | ||
|
|
c1493eb579 | ||
|
|
8c796f694f | ||
|
|
7197255211 | ||
|
|
c00e3b7b67 | ||
|
|
5cbe9dea09 | ||
|
|
a0924a414f | ||
|
|
0bb1de9561 | ||
|
|
f653cf4e7c | ||
|
|
be3240a1a1 | ||
|
|
a03b3238cb | ||
|
|
b17e76d8b7 | ||
|
|
1f13d616cc | ||
|
|
8dee95651f | ||
|
|
0c8f9663f2 | ||
|
|
47d0cb053e | ||
|
|
e5f788b28c | ||
|
|
e02cfe8cb0 | ||
|
|
ce61db1473 | ||
|
|
26e5c28208 | ||
|
|
c962ad6009 | ||
|
|
d8d11c5dcc | ||
|
|
f83a26c8b0 | ||
|
|
94615dfd35 | ||
|
|
9f6dc975da | ||
|
|
8b4c92291f | ||
|
|
bd8d3d66d7 | ||
|
|
a8a2d7730f | ||
|
|
ddf779008a | ||
|
|
4f51341fc0 | ||
|
|
46182e090b | ||
|
|
778ee176cc | ||
|
|
5a9dbf7e4f | ||
|
|
2da8a18086 | ||
|
|
7a2c09e9ce | ||
|
|
b34abd4c17 | ||
|
|
188d213c8d | ||
|
|
e4055e0d1b | ||
|
|
b4f0ebca4d | ||
|
|
b009b87530 | ||
|
|
b7b7c67ca3 | ||
|
|
1ac44d8eca | ||
|
|
0742ebec21 | ||
|
|
eec0613c10 | ||
|
|
ff8a7f22fc | ||
|
|
2139abe8b7 | ||
|
|
d339eb327c | ||
|
|
e4210f5b00 | ||
|
|
58787e6d89 | ||
|
|
4ed3e750d4 | ||
|
|
c0431b34c9 | ||
|
|
3ae54e0eed | ||
|
|
bbef084955 | ||
|
|
5f75ce3f12 | ||
|
|
c1190551b2 | ||
|
|
6fea8f14c5 | ||
|
|
bd424da015 | ||
|
|
4333e3d5e7 | ||
|
|
57b7398bdd | ||
|
|
2ac91822c3 | ||
|
|
fa0d82b188 | ||
|
|
5bcacf9b49 | ||
|
|
40a287a7c1 | ||
|
|
e44475f581 | ||
|
|
8535e766c8 | ||
|
|
58543a43ff | ||
|
|
efce4d0abf | ||
|
|
06df028722 | ||
|
|
8a12bb9f04 | ||
|
|
d6c80d7de7 | ||
|
|
d8f5065d64 | ||
|
|
64fdadf60f | ||
|
|
452c02653e | ||
|
|
2eb7499b64 | ||
|
|
79bcc5efc9 | ||
|
|
a87f3ae3cd | ||
|
|
16996aad6d | ||
|
|
65fd5c406b | ||
|
|
25e08cf6c4 | ||
|
|
a830051076 | ||
|
|
30d032ba5a | ||
|
|
21a58f13ec | ||
|
|
1ffb1f4feb | ||
|
|
51bac3ef73 | ||
|
|
9358b0c3f3 | ||
|
|
c5485152aa | ||
|
|
cb2e898d8c | ||
|
|
59fb7700b8 | ||
|
|
fd99239c99 | ||
|
|
5e0eec8857 | ||
|
|
e42ed3e3df | ||
|
|
0e4f1a400f | ||
|
|
2a54544eb3 | ||
|
|
4144c8de35 | ||
|
|
b086b72ff9 | ||
|
|
6ef00432cb | ||
|
|
54b5d289b0 | ||
|
|
f185c1ef1f | ||
|
|
c6aba1af2f | ||
|
|
9dbd605a66 | ||
|
|
231e499714 | ||
|
|
2fb5e821cf | ||
|
|
24ce77155a | ||
|
|
9d74212a41 | ||
|
|
b0398c1482 | ||
|
|
fa9fe88547 | ||
|
|
236f5b3514 | ||
|
|
6d20fa96e0 | ||
|
|
89dddaf9f0 | ||
|
|
f341f70705 | ||
|
|
4d24153870 | ||
|
|
28cc34bf14 | ||
|
|
ed07ba0852 | ||
|
|
1bc945e3dc | ||
|
|
59b3344e72 | ||
|
|
4e7b376e18 | ||
|
|
cb529822c6 | ||
|
|
374f8e8a19 | ||
|
|
2f72506959 | ||
|
|
9d11133edf | ||
|
|
1411b9ee6e | ||
|
|
d7ed925488 | ||
|
|
49bf9b62ae | ||
|
|
d181f70303 | ||
|
|
a0fcbf85a1 | ||
|
|
838c1eb93a | ||
|
|
a137332218 | ||
|
|
c53bb90b75 | ||
|
|
82d37d2036 | ||
|
|
735801a317 | ||
|
|
5343648dc9 | ||
|
|
312a2b5c80 | ||
|
|
4e04e95713 | ||
|
|
c9af58494b | ||
|
|
3f7a30a4b3 | ||
|
|
941a5d4f94 | ||
|
|
86ee08b7a7 | ||
|
|
668813cca9 | ||
|
|
9a90477c6d | ||
|
|
b3faed3906 | ||
|
|
4ad8d3c917 | ||
|
|
80512800e1 | ||
|
|
21341c5b3a | ||
|
|
2e490037ab | ||
|
|
f9960b5f8d | ||
|
|
9096038e20 | ||
|
|
82c6dd1f3d | ||
|
|
f51aa6e4ec | ||
|
|
6e45af3858 | ||
|
|
1178673380 | ||
|
|
7a2d799a6c | ||
|
|
2171439647 | ||
|
|
65b740a5ff | ||
|
|
54c526f1e2 | ||
|
|
ffac0c119e | ||
|
|
fe4622fd3b | ||
|
|
dd53162519 | ||
|
|
acaf65a8f7 | ||
|
|
5635894178 | ||
|
|
be22290495 | ||
|
|
2749a6ada2 | ||
|
|
8330a0ee46 | ||
|
|
3e69214d78 | ||
|
|
2f1c3fb437 | ||
|
|
204f0183e1 | ||
|
|
529349019d | ||
|
|
c0027ae9a1 | ||
|
|
7e08752da2 | ||
|
|
aa10eecbbf | ||
|
|
99466cba86 | ||
|
|
4436d5998b | ||
|
|
5dcebe4718 | ||
|
|
3a6ada1652 | ||
|
|
64c22de3ae | ||
|
|
a81c01729b | ||
|
|
85afd633e4 | ||
|
|
ee8dc151a3 | ||
|
|
5072de4c0f | ||
|
|
e6f5270c3d | ||
|
|
649205178f | ||
|
|
efacf637db | ||
|
|
acbf11931b | ||
|
|
717709ef9e | ||
|
|
7b7a31d944 | ||
|
|
f24a73351c | ||
|
|
7cb78d499c | ||
|
|
0a1f1237aa | ||
|
|
4df6151e14 | ||
|
|
dd9034248b | ||
|
|
0aeb683444 | ||
|
|
944eff06b8 | ||
|
|
2562391167 | ||
|
|
eb409328ec | ||
|
|
808b973752 | ||
|
|
0f91cf67fc | ||
|
|
54ce598a00 | ||
|
|
1de95c6413 | ||
|
|
ea0202a39d | ||
|
|
d749790521 | ||
|
|
140ad6ab98 | ||
|
|
e3213cc8a7 | ||
|
|
1bf0175da4 | ||
|
|
61a4e94649 | ||
|
|
126a5bf121 | ||
|
|
8eca08c6ac | ||
|
|
98a79f2279 | ||
|
|
c035f9597a | ||
|
|
7e89335392 | ||
|
|
8e76c4a131 | ||
|
|
c783dbff28 | ||
|
|
b8cf967914 | ||
|
|
4710bfcf43 | ||
|
|
a98033f375 | ||
|
|
2f9eb86a59 | ||
|
|
c21abd28f8 | ||
|
|
b8cea125e4 | ||
|
|
8e47e7e8b3 | ||
|
|
eddb655eb9 | ||
|
|
15142be8ee | ||
|
|
6b4d4447b2 | ||
|
|
69f9bc840d | ||
|
|
7bf34c48a9 | ||
|
|
17837ec81d | ||
|
|
63762e8850 | ||
|
|
5fc5cb4962 | ||
|
|
2becbaf4e2 | ||
|
|
67610b8263 | ||
|
|
375b588847 | ||
|
|
d28ec842f3 | ||
|
|
575095c8e6 | ||
|
|
076a83a62b | ||
|
|
f584d1cea5 | ||
|
|
1fef134f04 | ||
|
|
b503407abb | ||
|
|
36137d22e5 | ||
|
|
d01b81749d | ||
|
|
a0256fa321 | ||
|
|
bf3188eac4 | ||
|
|
06f3feec61 | ||
|
|
160c8167d6 | ||
|
|
e2c7671e9f | ||
|
|
c70916ca31 | ||
|
|
b9148c1d70 | ||
|
|
8bdcb2f123 | ||
|
|
56fb642119 | ||
|
|
0655b49408 | ||
|
|
1122a7c585 | ||
|
|
c898ef1d6d | ||
|
|
ba5f7ff5e4 | ||
|
|
9f5ec1cc42 | ||
|
|
b4e3a22fe6 | ||
|
|
949a5c76fe | ||
|
|
6741423410 | ||
|
|
3410d5c4e4 | ||
|
|
2fc45fb5ac | ||
|
|
ec96fe89e9 | ||
|
|
eb08a3dbef | ||
|
|
3afd2497d2 | ||
|
|
b0746a4910 | ||
|
|
dd4146e302 | ||
|
|
2ee3f12c9d | ||
|
|
4a611b5096 | ||
|
|
b13ca2df97 | ||
|
|
4afa2871ab | ||
|
|
80d9d1f143 | ||
|
|
1345e97f8c | ||
|
|
c6dd51da35 | ||
|
|
9e26332c48 | ||
|
|
b8c3c6e405 | ||
|
|
0e34d362d3 | ||
|
|
52c1d398a2 | ||
|
|
ed40b13ea0 | ||
|
|
f98473b9da | ||
|
|
a4ac0df389 | ||
|
|
13d6827689 | ||
|
|
f70da4c2e2 | ||
|
|
2df6b201da | ||
|
|
fe56e4ffea | ||
|
|
e6bcb64ced | ||
|
|
70457e06d8 | ||
|
|
055044be96 | ||
|
|
c78ce113b4 | ||
|
|
e5ed82858f | ||
|
|
29121389e1 | ||
|
|
4764ba8770 | ||
|
|
fbe307ece7 | ||
|
|
def3343272 | ||
|
|
fb5d31816d | ||
|
|
c485b5b292 | ||
|
|
88dbbb284d | ||
|
|
88c04be7a4 | ||
|
|
7dfbfef995 | ||
|
|
71499abf1f | ||
|
|
0185f71bab | ||
|
|
6dd3a84bc9 | ||
|
|
581333f222 | ||
|
|
b75f242a7f | ||
|
|
484fff5e28 | ||
|
|
bd7970b9b7 | ||
|
|
8ae708576f | ||
|
|
6433cde3c0 | ||
|
|
dd79c9a236 | ||
|
|
a7d09733a6 | ||
|
|
34870290cd | ||
|
|
b22d7902f1 | ||
|
|
17a15273ba | ||
|
|
d4756f83e5 | ||
|
|
f6c8aba119 | ||
|
|
45a648b042 | ||
|
|
d87e1c57d6 | ||
|
|
72fe4a1e3c | ||
|
|
72bd83b8d1 | ||
|
|
e378b7053d | ||
|
|
bd012a567e | ||
|
|
5fc7a6776b | ||
|
|
ce9439e722 | ||
|
|
541c6e6c41 | ||
|
|
43dcc3d501 | ||
|
|
acf7c681b4 | ||
|
|
19db4f63a7 | ||
|
|
e7061a8d2a | ||
|
|
fa4a8b8bbd | ||
|
|
2adace47d4 | ||
|
|
66c8778878 | ||
|
|
3cb5b651a2 | ||
|
|
c4f2e30819 | ||
|
|
aa55ab4866 | ||
|
|
9b1e66d302 | ||
|
|
2ce9d71553 | ||
|
|
42ebe7a7ad | ||
|
|
cc9e951b44 | ||
|
|
2906bec7a8 | ||
|
|
1223309052 | ||
|
|
f060863d40 | ||
|
|
57089dc108 | ||
|
|
1e7701bf29 | ||
|
|
9a6e137a56 | ||
|
|
ef8094836f | ||
|
|
e0c0815f42 | ||
|
|
1b302d6e40 | ||
|
|
865ec1eb71 | ||
|
|
c43a733dba | ||
|
|
7f8d4479f4 | ||
|
|
ed2dedb233 | ||
|
|
a44318dae5 | ||
|
|
4af9a92f76 | ||
|
|
9dff2434ef | ||
|
|
5a9f6ad9b7 | ||
|
|
06f5f635ca | ||
|
|
476738cc5c | ||
|
|
739495027b | ||
|
|
7ed57ee77d | ||
|
|
da1ab24c57 | ||
|
|
83b0d3e412 | ||
|
|
3593256a76 | ||
|
|
e3f854092f | ||
|
|
d75f155eb6 | ||
|
|
f928e57064 | ||
|
|
fa5d2b9920 | ||
|
|
bac9973354 | ||
|
|
281dd9b4ac | ||
|
|
67c67f566f | ||
|
|
e8c1c153d6 | ||
|
|
779a7676d6 | ||
|
|
18f06e177e | ||
|
|
99e7cb7d75 | ||
|
|
63bb97287f | ||
|
|
4393e17ea7 | ||
|
|
097515fa63 | ||
|
|
95214e8180 | ||
|
|
c63f059e10 | ||
|
|
138a12d5e1 | ||
|
|
8e3d0612d2 | ||
|
|
efd0c991a6 | ||
|
|
a29e416be8 | ||
|
|
6766a62300 | ||
|
|
bd36b0a968 | ||
|
|
48c4e1227a | ||
|
|
fec24bd47b | ||
|
|
de6e138d15 | ||
|
|
4a7c81b353 | ||
|
|
ef9c16c7c9 | ||
|
|
d8680542ba | ||
|
|
0411aba219 | ||
|
|
6c164984a0 | ||
|
|
ad0953ac87 | ||
|
|
11a0610d13 | ||
|
|
e695d4e8ad | ||
|
|
da0f3620bc | ||
|
|
4f4d288253 | ||
|
|
127b803fba | ||
|
|
b4782d9a51 | ||
|
|
5245590bae | ||
|
|
5e7f175545 | ||
|
|
0eec872442 | ||
|
|
9605c01c49 | ||
|
|
0815055906 | ||
|
|
fb78a3a017 | ||
|
|
b73575bf79 | ||
|
|
988647f92a | ||
|
|
4595ba8e1f | ||
|
|
77a56f5114 | ||
|
|
9bb5430956 | ||
|
|
191c4f5299 | ||
|
|
308ff366de | ||
|
|
601a260d47 | ||
|
|
78efeb6ae2 | ||
|
|
7404abf938 | ||
|
|
12027bf1a8 | ||
|
|
844d1475e6 | ||
|
|
43956f07fa | ||
|
|
f97d084290 | ||
|
|
a2fe3dcaaf | ||
|
|
a43289684d | ||
|
|
2670d22d61 | ||
|
|
7dca09d6f8 | ||
|
|
e09358c712 | ||
|
|
ce8083fd2e | ||
|
|
924296c680 | ||
|
|
4d20460e6b | ||
|
|
750d404e23 | ||
|
|
958fd82f24 | ||
|
|
e0082c1a9f | ||
|
|
0b4e690f4d | ||
|
|
03db246f88 | ||
|
|
637e8d76ab | ||
|
|
24ac625179 | ||
|
|
96718b281e | ||
|
|
d349ea61cf | ||
|
|
7c9736bae8 | ||
|
|
9e25597943 | ||
|
|
ed86a2ed10 | ||
|
|
0e2318998e | ||
|
|
346a05b5fb | ||
|
|
881b18a965 | ||
|
|
75c45c4f2b | ||
|
|
88ca3e993c | ||
|
|
0ba93887bf | ||
|
|
593334747b | ||
|
|
15a5083b8c | ||
|
|
de80671658 | ||
|
|
3a17f41dc8 | ||
|
|
9517eff012 | ||
|
|
46b1b113e0 | ||
|
|
d9c5013d42 | ||
|
|
558cb64438 | ||
|
|
36375cecf8 | ||
|
|
33f2fe8029 | ||
|
|
75a5af26c6 | ||
|
|
582573f324 | ||
|
|
44b9943738 | ||
|
|
2c28505e04 | ||
|
|
2357c9ef82 | ||
|
|
858e15b837 | ||
|
|
6e51153387 | ||
|
|
45cf53b487 | ||
|
|
2d83ed388f | ||
|
|
01e25bd5c7 | ||
|
|
dfed19cb4d | ||
|
|
10b636f80d | ||
|
|
c34b4dd787 | ||
|
|
a2d4a9efc5 | ||
|
|
e9b7c32393 | ||
|
|
5a16b61ec5 | ||
|
|
a568782309 | ||
|
|
0310b67927 | ||
|
|
8f25897d9e | ||
|
|
2012abd6d1 | ||
|
|
edd4f46bbf | ||
|
|
b0d6919339 | ||
|
|
0dee5b889d | ||
|
|
08c7f63074 | ||
|
|
51f7f7a22c | ||
|
|
b1cf9adfef | ||
|
|
acabead15a | ||
|
|
a5ecdf39fb | ||
|
|
a05555cd99 | ||
|
|
4cba63cdd0 | ||
|
|
2009d359c9 | ||
|
|
a1d094e64e | ||
|
|
a2542590ef | ||
|
|
c335d870a5 | ||
|
|
532b2ac1ba | ||
|
|
34184654d9 | ||
|
|
8f32801292 | ||
|
|
7058207197 | ||
|
|
b303283ac3 | ||
|
|
7df38ac5db | ||
|
|
46bae549ac | ||
|
|
17827940fd | ||
|
|
254fa75a0f | ||
|
|
4d419b2b56 | ||
|
|
60242e161a | ||
|
|
c147604103 | ||
|
|
7bdef1fde4 | ||
|
|
dd83b4a043 | ||
|
|
b5e97238ac | ||
|
|
d86f466fe9 | ||
|
|
a5d7bedb8a | ||
|
|
6bae9244e8 | ||
|
|
5f6a342817 | ||
|
|
b515cd10f1 | ||
|
|
6f0df4cf60 | ||
|
|
03145a0424 | ||
|
|
64b672125c | ||
|
|
11a96df465 | ||
|
|
e84adb504f | ||
|
|
63504cd9c8 | ||
|
|
91abbdd4f1 | ||
|
|
6d4ac23f26 | ||
|
|
c8bf28842f | ||
|
|
2322e77795 | ||
|
|
c678d97270 | ||
|
|
982c862deb | ||
|
|
8a50b7373b | ||
|
|
97de027eb7 | ||
|
|
ac7f1cc5e2 | ||
|
|
969403fadb | ||
|
|
79c7627651 | ||
|
|
6930262ec2 | ||
|
|
afe173c883 | ||
|
|
936b5e4b7c | ||
|
|
ccd4bdbd60 | ||
|
|
f7c56ddda3 | ||
|
|
301a094ef9 | ||
|
|
253c8cd997 | ||
|
|
ada900e1e1 | ||
|
|
9d20af4249 | ||
|
|
3e58159480 | ||
|
|
552845a94d | ||
|
|
6d8789f4c1 | ||
|
|
fe1151efc3 | ||
|
|
9fdcd926ad | ||
|
|
8ab4f5a0b2 | ||
|
|
e6ab06a701 | ||
|
|
59da394197 | ||
|
|
f75fbafeb2 | ||
|
|
957c85f9ea | ||
|
|
f0c2d786ae | ||
|
|
f3a55f1036 | ||
|
|
aed6fd8082 | ||
|
|
87106b03c1 | ||
|
|
5c024f1cd8 | ||
|
|
927ed42498 | ||
|
|
67ab87669f | ||
|
|
35ac275f62 | ||
|
|
47cb15cb03 | ||
|
|
05e4ec733e | ||
|
|
9ff3221c9d | ||
|
|
fdd85654d6 | ||
|
|
7bbd20b31d | ||
|
|
dfe753042f | ||
|
|
18eaa7e709 | ||
|
|
324227d239 | ||
|
|
fa9b641ef0 | ||
|
|
d6ffd69ed0 | ||
|
|
98f6000ff6 | ||
|
|
4ef0809931 | ||
|
|
d1b6a865c4 | ||
|
|
684e83ef30 | ||
|
|
6d4b44bf94 | ||
|
|
09f108b4a7 | ||
|
|
df31ba6255 | ||
|
|
7b9c146ae9 | ||
|
|
2c53553952 | ||
|
|
ff3a9e87e0 | ||
|
|
0da40fb3aa | ||
|
|
4e92a4ed77 | ||
|
|
7a152700fa | ||
|
|
f50eabb13c | ||
|
|
3ad821c102 | ||
|
|
3764c39dfc | ||
|
|
ed53be7c81 | ||
|
|
6bac458885 | ||
|
|
b792c5deae | ||
|
|
3e24672a43 | ||
|
|
9e7ac432c3 | ||
|
|
9812dfb4d4 | ||
|
|
c0e81ca820 | ||
|
|
cc095e56fc | ||
|
|
193b0b147f | ||
|
|
ba079b14dc | ||
|
|
ae1c26cbc4 | ||
|
|
d257ec51a0 | ||
|
|
124ef06ef7 | ||
|
|
0e1406f3f1 | ||
|
|
eb34553fae | ||
|
|
b9f110679a | ||
|
|
1bf7cbccbe | ||
|
|
79f28f2985 | ||
|
|
514412afe0 | ||
|
|
a54af2f2c1 | ||
|
|
5ea70ffb2e | ||
|
|
ace37d2c7a | ||
|
|
65f33f4403 | ||
|
|
43ff75fd72 | ||
|
|
87d5fe2092 | ||
|
|
be87a8cdc7 | ||
|
|
0c6ba894fd | ||
|
|
c5e56b1b25 | ||
|
|
4a715e79e3 | ||
|
|
409a6136b8 | ||
|
|
f412095047 | ||
|
|
a53645cc55 | ||
|
|
549ed6fc6b | ||
|
|
848d8a95ab | ||
|
|
301ee64e80 | ||
|
|
8a4590462f | ||
|
|
e2dc60a0c0 | ||
|
|
1df9807954 | ||
|
|
efe90a9f34 | ||
|
|
c51e4397b0 | ||
|
|
3dc26db377 | ||
|
|
58fcf421b5 | ||
|
|
e179108080 | ||
|
|
a146dfee79 | ||
|
|
33dda78ea8 | ||
|
|
fc5d240297 | ||
|
|
f0eaef9d51 | ||
|
|
3c57c991de | ||
|
|
3087ceb482 | ||
|
|
840034d4a0 | ||
|
|
5f9f43929a | ||
|
|
53c9acacd6 | ||
|
|
c68c8a8cfe | ||
|
|
87f05b3a7b | ||
|
|
8d0e3d7777 | ||
|
|
4845c4b4db | ||
|
|
3b3b008614 | ||
|
|
d66aff8fbd | ||
|
|
129da8a802 | ||
|
|
e1e83b17b7 | ||
|
|
f4e5f896a2 | ||
|
|
c871faa1f5 | ||
|
|
690b729474 | ||
|
|
acf3b22fd3 | ||
|
|
6ace8ce66a | ||
|
|
359af5d5ab | ||
|
|
20ed6eb90a | ||
|
|
f4b168f9b6 | ||
|
|
7b5b49a5e6 | ||
|
|
e36564b2b0 | ||
|
|
15a8f0c485 | ||
|
|
83684df3e9 | ||
|
|
632039f985 | ||
|
|
b6d34e9581 | ||
|
|
ffcb9d4a16 | ||
|
|
03358b2ecd | ||
|
|
047b10a3de | ||
|
|
3917c658f3 | ||
|
|
b495d85845 | ||
|
|
ee484b693c | ||
|
|
765e636214 | ||
|
|
2a13af52fc | ||
|
|
e5b38315fe | ||
|
|
023599366c | ||
|
|
8a215ce30e | ||
|
|
b951c84e01 | ||
|
|
0021970c16 | ||
|
|
831ea1a507 | ||
|
|
c8bcbad4a7 | ||
|
|
5a3b78bad3 | ||
|
|
8f15467215 | ||
|
|
d06c963a19 | ||
|
|
e411e7c284 | ||
|
|
365c7f9c8b | ||
|
|
8efa2b146e | ||
|
|
f6ca860bc9 | ||
|
|
95f172e3c7 | ||
|
|
34852e159a | ||
|
|
08bbc8199f | ||
|
|
0e3bc69f8c | ||
|
|
087002d9c5 | ||
|
|
c38f86e14a | ||
|
|
e0483f73bc | ||
|
|
467070f6a6 | ||
|
|
edadba1ec7 | ||
|
|
13e4148996 | ||
|
|
77dde2a85c | ||
|
|
f84da4b466 | ||
|
|
e5938bca1f | ||
|
|
2dfe441381 | ||
|
|
bf7616cf0e | ||
|
|
d4a3726347 | ||
|
|
25c8baeefe | ||
|
|
12d0073d50 | ||
|
|
cb3943da0e | ||
|
|
df60fa7a19 | ||
|
|
eb208b170f | ||
|
|
32f4bc4b93 | ||
|
|
7c6b93f58f | ||
|
|
c9646c1fd2 | ||
|
|
3ec5816259 | ||
|
|
627089e2f6 | ||
|
|
299b72e208 | ||
|
|
a4963d2a19 | ||
|
|
fc33b7abcc | ||
|
|
6667560263 | ||
|
|
d76c09fd08 | ||
|
|
7ea0528c6b | ||
|
|
8e6b7a2751 | ||
|
|
217e71d568 | ||
|
|
268a173f44 | ||
|
|
59faeb510b | ||
|
|
ccc8d1aec2 | ||
|
|
1febb963ae | ||
|
|
e192d4eaa6 | ||
|
|
7e3cce9397 | ||
|
|
aea00f1e00 | ||
|
|
1c93cc4b18 | ||
|
|
953045f0d2 | ||
|
|
0f2a6f3dd2 | ||
|
|
caafee006c | ||
|
|
d61edc51ad | ||
|
|
a88284897b | ||
|
|
7afc83518d | ||
|
|
b260254fd4 | ||
|
|
8defa3b924 | ||
|
|
6078864e26 | ||
|
|
21f7f6059a | ||
|
|
d674d2102e | ||
|
|
25f31883d5 | ||
|
|
a65675d24f | ||
|
|
9ef51d8215 | ||
|
|
c97fd9afcf | ||
|
|
45dc1b7977 | ||
|
|
40d55b7ae3 | ||
|
|
f12ea0e1e3 | ||
|
|
aa2c29ac8b | ||
|
|
62d9e087c4 | ||
|
|
4197cfe174 | ||
|
|
5526a2ba93 | ||
|
|
86fdca5e68 | ||
|
|
6ebd4e139e | ||
|
|
d77da6b53d | ||
|
|
284e6b2994 | ||
|
|
f9bc2d3783 | ||
|
|
e9e1db2945 | ||
|
|
bcce88e516 | ||
|
|
6951111459 | ||
|
|
0c66441d08 | ||
|
|
5b1ecbff87 | ||
|
|
dd1da5154f | ||
|
|
271edb4ca1 | ||
|
|
607ae71259 | ||
|
|
76788d3890 | ||
|
|
dd517f4660 | ||
|
|
82c62b1693 | ||
|
|
06f98fcd16 | ||
|
|
120cf21505 | ||
|
|
74431917a2 | ||
|
|
40411e5a6f | ||
|
|
04223b464a | ||
|
|
0215badb4c | ||
|
|
75e02c4646 | ||
|
|
d8ba05170f | ||
|
|
9faae7eb3f | ||
|
|
d1664481c2 | ||
|
|
69a3bf6a31 | ||
|
|
9daa63437a | ||
|
|
fa347475e8 | ||
|
|
3fb630c571 | ||
|
|
154b98394b | ||
|
|
637b26772c | ||
|
|
1cc350bfdb | ||
|
|
96a9730a08 | ||
|
|
d1ff5dd973 | ||
|
|
4df1ba690d | ||
|
|
d220ce5870 | ||
|
|
8eed4c38cf | ||
|
|
87c5b03bed | ||
|
|
d4ecc6398d | ||
|
|
0b3e90dbf4 | ||
|
|
0a074ec4a5 | ||
|
|
a4d19e174a | ||
|
|
27a6d68af9 | ||
|
|
d5d04babdd | ||
|
|
9ca27adb59 | ||
|
|
1f29de24de | ||
|
|
ca6eee21d9 | ||
|
|
0a33e6e8e4 | ||
|
|
b15cca82c7 | ||
|
|
841adf04a5 | ||
|
|
5bfc513af4 | ||
|
|
00a59629aa | ||
|
|
7790fc3647 | ||
|
|
32c91baca6 | ||
|
|
faafa2def0 | ||
|
|
fbb508ab5e | ||
|
|
7104d329fd | ||
|
|
d722ac6c04 | ||
|
|
d5821c7f61 | ||
|
|
f4071ba6ec | ||
|
|
0a8f7b9ff2 | ||
|
|
e21df42ec1 | ||
|
|
8aa7ae168e | ||
|
|
55dd4ac754 | ||
|
|
662755c899 | ||
|
|
4159dc43ed | ||
|
|
7baa75bee0 | ||
|
|
d433d592e1 | ||
|
|
692caf19ce | ||
|
|
96d984b04d | ||
|
|
a759cd9a19 | ||
|
|
d236b2db58 | ||
|
|
d70d04c473 | ||
|
|
996bb990a0 | ||
|
|
fcccc9dc0b | ||
|
|
5b9a17dc8f | ||
|
|
f21bb4d0dc | ||
|
|
0c5a87b1d7 | ||
|
|
9c7dd3068f | ||
|
|
f14dbe081b | ||
|
|
8fd0033b43 | ||
|
|
602ba5d8a6 | ||
|
|
9ee32a4dd6 | ||
|
|
23bedbb3fb | ||
|
|
c1e85bb504 | ||
|
|
b43d0b4201 | ||
|
|
9b3519f850 | ||
|
|
257410d058 | ||
|
|
b7aefa71f8 | ||
|
|
8ac346be63 | ||
|
|
a86e6975cc | ||
|
|
8f7fc79cd7 | ||
|
|
e06006b436 | ||
|
|
d30686a78f | ||
|
|
32cebbbcba | ||
|
|
fbd6d0ebc6 | ||
|
|
809bce6cd9 | ||
|
|
793930b352 | ||
|
|
bd63327c3d | ||
|
|
a9492f6a44 | ||
|
|
b591d63e8b | ||
|
|
4b419ce125 | ||
|
|
66f1c42fcc | ||
|
|
05a3f43057 | ||
|
|
7f4b490fdb | ||
|
|
e3fce81097 | ||
|
|
1d97a81224 | ||
|
|
2324399fa8 | ||
|
|
e97682d4ca | ||
|
|
a5998cb589 | ||
|
|
80017f7d71 | ||
|
|
fe33f30c15 | ||
|
|
0b2afde90b | ||
|
|
89829d22b4 | ||
|
|
592fe4d967 | ||
|
|
f9b75e7d76 | ||
|
|
90cfb50658 | ||
|
|
c04573233c | ||
|
|
f73c3af445 | ||
|
|
b1d750bc1d | ||
|
|
a58395b718 | ||
|
|
d63e79a8ce | ||
|
|
0341bdcf77 | ||
|
|
05496a8b57 | ||
|
|
2a594d313c | ||
|
|
129151d5fc | ||
|
|
c6887aa999 | ||
|
|
29b9c2e14d | ||
|
|
2712b60de0 | ||
|
|
a84540515c | ||
|
|
286b4e8f09 | ||
|
|
f36b70e8b5 | ||
|
|
9e5d6c4155 | ||
|
|
652c59b25e | ||
|
|
292ed35005 | ||
|
|
d1bfea400c | ||
|
|
a74c2748ec | ||
|
|
f6ebe7c6a9 | ||
|
|
c1e13a9fcf | ||
|
|
b5e379dd80 | ||
|
|
b587018c56 | ||
|
|
67055289d0 | ||
|
|
8983af2016 | ||
|
|
295cae5a7b | ||
|
|
893fcdd39e | ||
|
|
8568667481 | ||
|
|
5940d227bb | ||
|
|
50281f5755 | ||
|
|
fdae8f4c6d | ||
|
|
40ac2126c9 | ||
|
|
74d3915302 | ||
|
|
5649f084e3 | ||
|
|
3da08c9d9e | ||
|
|
38f9b93885 | ||
|
|
dd80ffc61b | ||
|
|
989815e9f2 | ||
|
|
0610721aa0 | ||
|
|
3996dc4b79 | ||
|
|
ab2d94bb64 | ||
|
|
4a9639f02f | ||
|
|
ef733f0049 | ||
|
|
91dabc3165 | ||
|
|
95e934825a | ||
|
|
aace0ae9bd | ||
|
|
4921cb719b | ||
|
|
55a0b7d1a9 | ||
|
|
7d79e367f9 | ||
|
|
d77c209c85 | ||
|
|
53efaf1816 | ||
|
|
69abe6dbb9 | ||
|
|
92221216bf | ||
|
|
ed0aefaf6c | ||
|
|
7123d1fbd2 | ||
|
|
6d49ccf978 | ||
|
|
0369fd6578 | ||
|
|
e5370c114b | ||
|
|
b97c8a183d | ||
|
|
24311af259 | ||
|
|
a72cdb77ad | ||
|
|
396857db9a | ||
|
|
755ceda4f9 | ||
|
|
1b27c3dec1 | ||
|
|
0fc2a87bfd | ||
|
|
7579d68272 | ||
|
|
62aa0c4415 | ||
|
|
22672af217 | ||
|
|
17235d70e2 | ||
|
|
571f899c3d | ||
|
|
805470072b | ||
|
|
1ce3b12335 | ||
|
|
09e7186a4e | ||
|
|
4c0ce28e6e | ||
|
|
a56afd8b8f | ||
|
|
541c1b34e1 | ||
|
|
76a53e75ad | ||
|
|
482261e81b | ||
|
|
32a132e0ab | ||
|
|
8c89ec158c | ||
|
|
1274092fdd | ||
|
|
8906ebc272 | ||
|
|
84558215fd | ||
|
|
f79630e778 | ||
|
|
61cbb25b12 | ||
|
|
b1e94e8215 | ||
|
|
151feee826 | ||
|
|
c9c0621076 | ||
|
|
b8830815ab | ||
|
|
3d992be092 | ||
|
|
422c6a4935 | ||
|
|
3a0692711f | ||
|
|
3e1be4d549 | ||
|
|
32a5c1a58b | ||
|
|
137f8df057 | ||
|
|
0b05fdf0b5 | ||
|
|
f4103b4074 | ||
|
|
c549f7e8d7 |
No files matched your search
@@ -63,6 +63,11 @@ menu/driverspzarch.c
|
||||
/media/shaders_glsl/
|
||||
/obj-w32/
|
||||
|
||||
# Wii U
|
||||
*.depend
|
||||
*.rpx
|
||||
wiiu/wut/elf2rpl/elf2rpl
|
||||
|
||||
# Ctags
|
||||
/tags
|
||||
|
||||
|
||||
+72
-9
@@ -1,37 +1,100 @@
|
||||
# 1.5.0 (future)
|
||||
- MOBILE: Single-tap for menu entry selection
|
||||
- MOBILE: Long-tap a setting to reset to default
|
||||
# 1.6.2 (future)
|
||||
- IOS: Fix GL regression - 32bit color format cores were no longer rendering
|
||||
- CHEEVOS: Add support for N64 cheevos and other small fixes.
|
||||
- CHEEVOS: Add 'Achievements -> Achievements Verbose Mode'. Ability to display cheevos related messages in OSD, useful for RetroAchievements users.
|
||||
- AUDIO: Audio mixer's volume can now be independently increased/decreased, and muted.
|
||||
- AUDIO: Mute now no longer disables/enables audio but instead properly mutes the audio volume. Mute is also independent from the audio mixer volume.
|
||||
- INPUT: Add mouse index selection; ability now to select between different mice
|
||||
- INPUT: Fix 'All Users Control Menu' setting
|
||||
- LINUX: Add a tinyalsa audio driver. Doesn't require asoundlib, should be self-contained and lower-level.
|
||||
- LOBBIES: Announce the RetroArch version too
|
||||
- LOCALIZATION: Add Traditional Chinese translation
|
||||
- LOCALIZATION: Update French translation
|
||||
- LOCALIZATION: Update Italian translation
|
||||
- LOCALIZATION: Update Japanese translation
|
||||
- LOCALIZATION: Update Russian translation
|
||||
- MENU: Add 'User Interface -> Views'. Ability to display/hide online updater and core updater options.
|
||||
- NETPLAY: Disconnecting one client shouldn't cause everyone to disconnect anymore
|
||||
- NETWORK: SSL/TLS support, disabled by default
|
||||
- SCANNER: Fix PS1 game scanning
|
||||
- SCANNER: Move content list builder into scanner task with progress, fixes menu freeze with large playlists
|
||||
- SDL2: Fix 'SDL2 driver does not see the hat on wired Xbox 360 controller"
|
||||
- SETTINGS: Fix regression 'Custom Viewport is no longer overridable per-core or per-game'
|
||||
- VITA: Add cheevos support
|
||||
- VITA: Add support for external USB if mounted
|
||||
- WAYLAND: Fix menu mouse input
|
||||
- WII: Add support for single-port 'PS1/PS2 to USB controller adapter'
|
||||
|
||||
# 1.6.0
|
||||
- ANDROID: Allow remotes to retain OK/Cancel position when menu_swap_ok_cancel is enabled
|
||||
- ANDROID: Improve autoconf fallback
|
||||
- ANDROID: Improve shield portable/gamepad device grouping workaround
|
||||
- ANDROID: Runtime permission checking
|
||||
- AUDIO: Audio mixer support. Mix up to 8 streams with the game's audio.
|
||||
- AUTOSAVE/SRAM - Fix bug #3829 / #4820 (https://github.com/libretro/RetroArch/issues/3829)
|
||||
- ENDIANNESS: Fixed database scanning. Should fix scanning on PS3/WiiU/Wii, etc.
|
||||
- LOBBIES: Fallback to filename based matching if no CRC matches are found (for people making playlists by hand)
|
||||
- LOBBIES: GUI refinement, show stop hosting when a host has been started, show disconnect when playing as client
|
||||
- LOBBIES: if the game is already loaded it will try to connect directly instead of re-loading content (non-fullpath cores only)
|
||||
- LOBBIES: unify both netplay menus
|
||||
- LOCALIZATION/GUI: Korean font should display properly now with XMB/MaterialUI's default font
|
||||
- LOCALIZATION: Update German translation
|
||||
- LOCALIZATION: Update Japanese translation
|
||||
- LOCALIZATION: Update Russian translation
|
||||
- LOCALIZATION: Update/finish French translation
|
||||
- MENU: Improved rendering for XMB ribbon; using additive blending (Vulkan/GL)
|
||||
- MISC: Various frontend optimizations.
|
||||
- NET: Fix bug #4703 (https://github.com/libretro/RetroArch/issues/4703)
|
||||
- OSX/MACOS: Fixes serious memory leak
|
||||
- THUMBNAILS: Thumbnails show up now in Load Content -> Collection, Information -> Database
|
||||
- VIDEO: Fix threaded video regression; tickering of menu entries would no longer work.
|
||||
- VITA: Fix 30fps menu (poke into input now instead of reading the entire input buffer which apparently is slow)
|
||||
- VITA: Fix frame throttle
|
||||
- VITA: Fix slow I/O
|
||||
- VULKAN: Fix some crashes on loading some thumbnails
|
||||
- VULKAN: Unicode font rendering support. Should fix bad character encoding for French characters, etc.
|
||||
- WII: Fix crashing issues which could occur with the dummy core
|
||||
- WIIU: HID Controller support
|
||||
- WIIU: Initial network/netplay support
|
||||
- WIIU: XMB/MaterialUI menu driver support
|
||||
- WINDOWS: Added RawInput input driver for low-latency, low-level input.
|
||||
- WINDOWS: Added WASAPI audio driver for low-latency audio. Both shared and exclusive mode.
|
||||
- WINDOWS: Core mouse input should be relative again in cores
|
||||
|
||||
# 1.5.0
|
||||
- ANDROID: Autoconf fallback
|
||||
- ANDROID: Mouse support / Emulated mouse support
|
||||
- AUTOCONF: Fix partial matches for pad name
|
||||
- CHEEVOS: Fix crashes in the cheevos description menu
|
||||
- CHEEVOS: WIP leaderboards support
|
||||
- COMMON: Threading fixes
|
||||
- COMMON: 9-slice texture drawing support
|
||||
- COMMON: Threading fixes
|
||||
- CORETEXT/APPLE: Ability to load menu display font drivers and loading of custom font.
|
||||
- DOS: Add keyboard driver
|
||||
- DOS: Improve color accuracy and scaling
|
||||
- GUI: Various settings are now only visible when advanced settings is enabled
|
||||
- GUI: Allow changing icon theme on the fly
|
||||
- GUI: Add a symbol page in the OSK
|
||||
- GUI: Allow changing icon theme on the fly
|
||||
- GUI: Better dialogs for XMB
|
||||
- GUI: Various settings are now only visible when advanced settings is enabled
|
||||
- LOCALIZATION: Add/update Korean translation
|
||||
- LOCALIZATION: Rewrite German translation
|
||||
- LOCALIZATION: Update several English sublabels
|
||||
- LOCALIZATION: Update several Japanese labels
|
||||
- MOBILE: Long-tap a setting to reset to default
|
||||
- MOBILE: Single-tap for menu entry selection
|
||||
- NET: Allow manual netplay content loading
|
||||
- NET: Announcing network games to the public lobby is optional now
|
||||
- NET: Bake in miniupnpc
|
||||
- NET: Fix netplay join for contentless cores
|
||||
- NET: Fix netplay rooms being pushed on the wrong tab
|
||||
- NET: Lan games show next to lobbies with (lan) and connect via the private IP address
|
||||
- NET: Use new lobby system with MITM support
|
||||
- NET: Fix netplay rooms being pushed on the wrong tab
|
||||
- NUKLEAR: Update to current version
|
||||
- SCANNER: Always add 7z & zip to supported extensions
|
||||
- VULKAN: Find supported composite alpha in swapchain
|
||||
- VULKAN: Add snow/bokeh shader pipeline effects - at parity with GL now
|
||||
- VULKAN: Find supported composite alpha in swapchain
|
||||
- WIIU: Keyboard support
|
||||
- WINDOWS: Logging to file no longer spawns an empty window
|
||||
- WINDOWS: Fix loading of core/content via file menu
|
||||
- WINDOWS: Logging to file no longer spawns an empty window
|
||||
|
||||
# 1.4.1
|
||||
@@ -22,6 +22,11 @@ LIBS :=
|
||||
DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL -DHAVE_OVERLAY
|
||||
DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"'
|
||||
|
||||
ifneq ($(findstring BSD,$(OS)),)
|
||||
CFLAGS += -DBSD
|
||||
LDFLAGS += -L/usr/local/lib
|
||||
endif
|
||||
|
||||
ifneq ($(findstring DOS,$(OS)),)
|
||||
CFLAGS += -march=i386
|
||||
LDFLAGS += -lemu
|
||||
|
||||
+268
-56
@@ -1,6 +1,7 @@
|
||||
ROOT_DIR := .
|
||||
DEPS_DIR := $(ROOT_DIR)/deps
|
||||
LIBRETRO_COMM_DIR := $(ROOT_DIR)/libretro-common
|
||||
WANT_WGL = 0
|
||||
|
||||
ifeq ($(HAVE_GL_CONTEXT),)
|
||||
HAVE_GL_CONTEXT=0
|
||||
@@ -104,7 +105,7 @@ endif
|
||||
|
||||
ifneq ($(findstring BSD,$(OS)),)
|
||||
BSD_LOCAL_INC += -I/usr/local/include
|
||||
OBJ += frontend/drivers/platform_bsd.o
|
||||
HAVE_UNIX = 1
|
||||
endif
|
||||
|
||||
ifneq ($(findstring Darwin,$(OS)),)
|
||||
@@ -118,11 +119,13 @@ ifneq ($(findstring Linux,$(OS)),)
|
||||
LIBS += -lrt
|
||||
OBJ += input/drivers/linuxraw_input.o \
|
||||
input/common/linux_common.o \
|
||||
input/common/epoll_common.o \
|
||||
input/drivers_joypad/linuxraw_joypad.o \
|
||||
frontend/drivers/platform_linux.o
|
||||
input/drivers_joypad/linuxraw_joypad.o
|
||||
HAVE_UNIX = 1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_UNIX), 1)
|
||||
OBJ += frontend/drivers/platform_unix.o
|
||||
endif
|
||||
|
||||
ifeq ($(findstring Haiku,$(OS)),)
|
||||
LIBS += -lm
|
||||
@@ -156,25 +159,25 @@ OBJ += frontend/frontend.o \
|
||||
retroarch.o \
|
||||
dirs.o \
|
||||
paths.o \
|
||||
input/input_keyboard.o \
|
||||
command.o \
|
||||
msg_hash.o \
|
||||
intl/msg_hash_us.o \
|
||||
runloop.o \
|
||||
$(LIBRETRO_COMM_DIR)/queues/task_queue.o \
|
||||
tasks/task_content.o \
|
||||
tasks/task_save.o \
|
||||
tasks/task_file_transfer.o \
|
||||
tasks/task_image.o \
|
||||
tasks/task_audio_mixer.o \
|
||||
$(LIBRETRO_COMM_DIR)/encodings/encoding_utf.o \
|
||||
$(LIBRETRO_COMM_DIR)/encodings/encoding_crc32.o \
|
||||
$(LIBRETRO_COMM_DIR)/lists/file_list.o \
|
||||
$(LIBRETRO_COMM_DIR)/lists/dir_list.o \
|
||||
$(LIBRETRO_COMM_DIR)/file/retro_dirent.o \
|
||||
$(LIBRETRO_COMM_DIR)/streams/stdin_stream.o \
|
||||
$(LIBRETRO_COMM_DIR)/streams/file_stream.o \
|
||||
$(LIBRETRO_COMM_DIR)/streams/file_stream_transforms.o \
|
||||
$(LIBRETRO_COMM_DIR)/streams/interface_stream.o \
|
||||
$(LIBRETRO_COMM_DIR)/streams/memory_stream.o \
|
||||
$(LIBRETRO_COMM_DIR)/file/retro_stat.o \
|
||||
$(LIBRETRO_COMM_DIR)/lists/string_list.o \
|
||||
$(LIBRETRO_COMM_DIR)/string/stdstring.o \
|
||||
$(LIBRETRO_COMM_DIR)/memmap/memalign.o \
|
||||
@@ -186,7 +189,7 @@ OBJ += frontend/frontend.o \
|
||||
file_path_str.o \
|
||||
$(LIBRETRO_COMM_DIR)/hash/rhash.o \
|
||||
audio/audio_driver.o \
|
||||
audio/audio_mixer.o \
|
||||
$(LIBRETRO_COMM_DIR)/audio/audio_mixer.o \
|
||||
input/input_driver.o \
|
||||
gfx/video_coord_array.o \
|
||||
gfx/video_driver.o \
|
||||
@@ -204,7 +207,6 @@ OBJ += frontend/frontend.o \
|
||||
gfx/drivers_font_renderer/bitmapfont.o \
|
||||
tasks/task_autodetect.o \
|
||||
input/input_autodetect_builtin.o \
|
||||
input/input_joypad_driver.o \
|
||||
input/input_config.o \
|
||||
input/input_keymaps.o \
|
||||
input/input_remapping.o \
|
||||
@@ -222,7 +224,6 @@ OBJ += frontend/frontend.o \
|
||||
tasks/task_powerstate.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler.o \
|
||||
gfx/drivers_shader/shader_null.o \
|
||||
gfx/video_shader_driver.o \
|
||||
gfx/video_shader_parse.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/scaler/pixconv.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler_int.o \
|
||||
@@ -269,10 +270,12 @@ OBJ += intl/msg_hash_de.o \
|
||||
intl/msg_hash_ko.o \
|
||||
intl/msg_hash_nl.o \
|
||||
intl/msg_hash_pl.o \
|
||||
intl/msg_hash_pt.o \
|
||||
intl/msg_hash_pt_br.o \
|
||||
intl/msg_hash_pt_pt.o \
|
||||
intl/msg_hash_ru.o \
|
||||
intl/msg_hash_vn.o \
|
||||
intl/msg_hash_chs.o
|
||||
intl/msg_hash_chs.o \
|
||||
intl/msg_hash_cht.o
|
||||
|
||||
endif
|
||||
|
||||
@@ -332,6 +335,204 @@ OBJ += libretro-db/bintree.o \
|
||||
tasks/task_database_cue.o
|
||||
endif
|
||||
|
||||
ifneq ($(C89_BUILD), 1)
|
||||
HAVE_LIBUI = 0
|
||||
HAVE_GTKPLUS = 0
|
||||
|
||||
ifeq ($(HAVE_SSL), 1)
|
||||
DEFINES += -DHAVE_SSL
|
||||
DEFINES += -DMBEDTLS_SSL_DEBUG_ALL
|
||||
|
||||
# MinGW requires this for some reason, even though the include paths are relative to the source
|
||||
INCLUDE_DIRS += -Ideps/mbedtls
|
||||
|
||||
OBJS_TLS_CRYPTO = deps/mbedtls/aes.o deps/mbedtls/aesni.o deps/mbedtls/arc4.o \
|
||||
deps/mbedtls/asn1parse.o deps/mbedtls/asn1write.o deps/mbedtls/base64.o \
|
||||
deps/mbedtls/bignum.o deps/mbedtls/blowfish.o deps/mbedtls/camellia.o \
|
||||
deps/mbedtls/ccm.o deps/mbedtls/cipher.o deps/mbedtls/cipher_wrap.o \
|
||||
deps/mbedtls/cmac.o deps/mbedtls/ctr_drbg.o deps/mbedtls/des.o \
|
||||
deps/mbedtls/dhm.o deps/mbedtls/ecdh.o deps/mbedtls/ecdsa.o \
|
||||
deps/mbedtls/ecjpake.o deps/mbedtls/ecp.o \
|
||||
deps/mbedtls/ecp_curves.o deps/mbedtls/entropy.o deps/mbedtls/entropy_poll.o \
|
||||
deps/mbedtls/error.o deps/mbedtls/gcm.o deps/mbedtls/havege.o \
|
||||
deps/mbedtls/hmac_drbg.o deps/mbedtls/md.o deps/mbedtls/md2.o \
|
||||
deps/mbedtls/md4.o deps/mbedtls/md5.o deps/mbedtls/md_wrap.o \
|
||||
deps/mbedtls/memory_buffer_alloc.o deps/mbedtls/oid.o \
|
||||
deps/mbedtls/padlock.o deps/mbedtls/pem.o deps/mbedtls/pk.o \
|
||||
deps/mbedtls/pk_wrap.o deps/mbedtls/pkcs12.o deps/mbedtls/pkcs5.o \
|
||||
deps/mbedtls/pkparse.o deps/mbedtls/pkwrite.o deps/mbedtls/platform.o \
|
||||
deps/mbedtls/ripemd160.o deps/mbedtls/rsa.o deps/mbedtls/sha1.o \
|
||||
deps/mbedtls/sha256.o deps/mbedtls/sha512.o deps/mbedtls/threading.o \
|
||||
deps/mbedtls/timing.o deps/mbedtls/version.o \
|
||||
deps/mbedtls/version_features.o deps/mbedtls/xtea.o
|
||||
|
||||
OBJS_TLS_X509 = deps/mbedtls/certs.o deps/mbedtls/pkcs11.o deps/mbedtls/x509.o \
|
||||
deps/mbedtls/x509_create.o deps/mbedtls/x509_crl.o deps/mbedtls/x509_crt.o \
|
||||
deps/mbedtls/x509_csr.o deps/mbedtls/x509write_crt.o deps/mbedtls/x509write_csr.o
|
||||
|
||||
OBJS_TLS = deps/mbedtls/debug.o deps/mbedtls/net_sockets.o \
|
||||
deps/mbedtls/ssl_cache.o deps/mbedtls/ssl_ciphersuites.o \
|
||||
deps/mbedtls/ssl_cli.o deps/mbedtls/ssl_cookie.o \
|
||||
deps/mbedtls/ssl_srv.o deps/mbedtls/ssl_ticket.o \
|
||||
deps/mbedtls/ssl_tls.o
|
||||
|
||||
OBJ += $(OBJS_TLS_CRYPTO) $(OBJS_TLS_X509) $(OBJS_TLS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LIBUI), 1)
|
||||
ifeq ($(HAVE_GTKPLUS), 1)
|
||||
CFLAGS += -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0
|
||||
LIBS += -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
|
||||
OBJ += deps/libui/gtk/alloc.o \
|
||||
deps/libui/gtk/area.o \
|
||||
deps/libui/gtk/box.o \
|
||||
deps/libui/gtk/button.o \
|
||||
deps/libui/gtk/cellrendererbutton.o \
|
||||
deps/libui/gtk/checkbox.o \
|
||||
deps/libui/gtk/child.o \
|
||||
deps/libui/gtk/colorbutton.o \
|
||||
deps/libui/gtk/combobox.o \
|
||||
deps/libui/gtk/control.o \
|
||||
deps/libui/gtk/datetimepicker.o \
|
||||
deps/libui/gtk/debug.o \
|
||||
deps/libui/gtk/draw.o \
|
||||
deps/libui/gtk/drawmatrix.o \
|
||||
deps/libui/gtk/drawpath.o \
|
||||
deps/libui/gtk/drawtext.o \
|
||||
deps/libui/gtk/editablecombo.o \
|
||||
deps/libui/gtk/entry.o \
|
||||
deps/libui/gtk/fontbutton.o \
|
||||
deps/libui/gtk/form.o \
|
||||
deps/libui/gtk/future.o \
|
||||
deps/libui/gtk/graphemes.o \
|
||||
deps/libui/gtk/grid.o \
|
||||
deps/libui/gtk/group.o \
|
||||
deps/libui/gtk/image.o \
|
||||
deps/libui/gtk/label.o \
|
||||
deps/libui/gtk/main.o \
|
||||
deps/libui/gtk/menu.o \
|
||||
deps/libui/gtk/multilineentry.o \
|
||||
deps/libui/gtk/progressbar.o \
|
||||
deps/libui/gtk/radiobuttons.o \
|
||||
deps/libui/gtk/separator.o \
|
||||
deps/libui/gtk/slider.o \
|
||||
deps/libui/gtk/spinbox.o \
|
||||
deps/libui/gtk/stddialogs.o \
|
||||
deps/libui/gtk/tab.o \
|
||||
deps/libui/gtk/text.o \
|
||||
deps/libui/gtk/util.o \
|
||||
deps/libui/gtk/window.o
|
||||
endif
|
||||
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
OBJ += deps/libui/win32/alloc.o \
|
||||
deps/libui/win32/area.o \
|
||||
deps/libui/win32/areadraw.o \
|
||||
deps/libui/win32/areaevents.o \
|
||||
deps/libui/win32/areascroll.o \
|
||||
deps/libui/win32/areautil.o \
|
||||
deps/libui/win32/box.o \
|
||||
deps/libui/win32/button.o \
|
||||
deps/libui/win32/checkbox.o \
|
||||
deps/libui/win32/colorbutton.o \
|
||||
deps/libui/win32/colordialog.o \
|
||||
deps/libui/win32/combobox.o \
|
||||
deps/libui/win32/container.o \
|
||||
deps/libui/win32/control.o \
|
||||
deps/libui/win32/d2dscratch.o \
|
||||
deps/libui/win32/datetimepicker.o \
|
||||
deps/libui/win32/debug.o \
|
||||
deps/libui/win32/draw.o \
|
||||
deps/libui/win32/drawmatrix.o \
|
||||
deps/libui/win32/drawpath.o \
|
||||
deps/libui/win32/drawtext.o \
|
||||
deps/libui/win32/dwrite.o \
|
||||
deps/libui/win32/editablecombo.o \
|
||||
deps/libui/win32/entry.o \
|
||||
deps/libui/win32/events.o \
|
||||
deps/libui/win32/fontbutton.o \
|
||||
deps/libui/win32/fontdialog.o \
|
||||
deps/libui/win32/form.o \
|
||||
deps/libui/win32/graphemes.o \
|
||||
deps/libui/win32/grid.o \
|
||||
deps/libui/win32/group.o \
|
||||
deps/libui/win32/init.o \
|
||||
deps/libui/win32/label.o \
|
||||
deps/libui/win32/main.o \
|
||||
deps/libui/win32/menu.o \
|
||||
deps/libui/win32/multilineentry.o \
|
||||
deps/libui/win32/parent.o \
|
||||
deps/libui/win32/progressbar.o \
|
||||
deps/libui/win32/radiobuttons.o \
|
||||
deps/libui/win32/separator.o \
|
||||
deps/libui/win32/sizing.o \
|
||||
deps/libui/win32/slider.o \
|
||||
deps/libui/win32/spinbox.o \
|
||||
deps/libui/win32/stddialogs.o \
|
||||
deps/libui/win32/tab.o \
|
||||
deps/libui/win32/tabpage.o \
|
||||
deps/libui/win32/text.o \
|
||||
deps/libui/win32/utf16.o \
|
||||
deps/libui/win32/utilwin.o \
|
||||
deps/libui/win32/window.o \
|
||||
deps/libui/win32/winpublic.o \
|
||||
deps/libui/win32/winutil.o
|
||||
LIBS += -luxtheme -ld2d1 -ldwrite -lusp10
|
||||
endif
|
||||
|
||||
ifneq ($(findstring Darwin,$(OS)),)
|
||||
OBJ += deps/libui/darwin/alloc.o \
|
||||
deps/libui/darwin/area.o \
|
||||
deps/libui/darwin/areaevents.o \
|
||||
deps/libui/darwin/autolayout.o \
|
||||
deps/libui/darwin/box.o \
|
||||
deps/libui/darwin/button.o \
|
||||
deps/libui/darwin/checkbox.o \
|
||||
deps/libui/darwin/colorbutton.o \
|
||||
deps/libui/darwin/combobox.o \
|
||||
deps/libui/darwin/control.o \
|
||||
deps/libui/darwin/datetimepicker.o \
|
||||
deps/libui/darwin/debug.o \
|
||||
deps/libui/darwin/draw.o \
|
||||
deps/libui/darwin/drawtext.o \
|
||||
deps/libui/darwin/editablecombo.o \
|
||||
deps/libui/darwin/entry.o \
|
||||
deps/libui/darwin/fontbutton.o \
|
||||
deps/libui/darwin/form.o \
|
||||
deps/libui/darwin/grid.o \
|
||||
deps/libui/darwin/group.o \
|
||||
deps/libui/darwin/image.o \
|
||||
deps/libui/darwin/label.o \
|
||||
deps/libui/darwin/main.o \
|
||||
deps/libui/darwin/map.o \
|
||||
deps/libui/darwin/menu.o \
|
||||
deps/libui/darwin/multilineentry.o \
|
||||
deps/libui/darwin/progressbar.o \
|
||||
deps/libui/darwin/radiobuttons.o \
|
||||
deps/libui/darwin/scrollview.o \
|
||||
deps/libui/darwin/separator.o \
|
||||
deps/libui/darwin/slider.o \
|
||||
deps/libui/darwin/spinbox.o \
|
||||
deps/libui/darwin/stddialogs.o \
|
||||
deps/libui/darwin/tab.o \
|
||||
deps/libui/darwin/text.o \
|
||||
deps/libui/darwin/util.o \
|
||||
deps/libui/darwin/window.o \
|
||||
deps/libui/darwin/winmoveresize.o
|
||||
endif
|
||||
|
||||
OBJ += deps/libui/common/areaevents.o \
|
||||
deps/libui/common/control.o \
|
||||
deps/libui/common/debug.o \
|
||||
deps/libui/common/matrix.o \
|
||||
deps/libui/common/shouldquit.o \
|
||||
deps/libui/common/userbugs.o
|
||||
|
||||
OBJ += deps/libui/libui_main.o
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# Miscellaneous
|
||||
|
||||
ifeq ($(HAVE_STDIN_CMD), 1)
|
||||
@@ -368,9 +569,7 @@ endif
|
||||
|
||||
ifeq ($(HAVE_OSS), 1)
|
||||
OBJ += audio/drivers/oss.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OSS_BSD), 1)
|
||||
else ifeq ($(HAVE_OSS_BSD), 1)
|
||||
OBJ += audio/drivers/oss.o
|
||||
endif
|
||||
|
||||
@@ -384,6 +583,11 @@ endif
|
||||
DEFINES += $(ALSA_CFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_TINYALSA), 1)
|
||||
OBJ += audio/drivers/tinyalsa.o
|
||||
DEFINES += -DHAVE_TINYALSA
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_ROAR), 1)
|
||||
OBJ += audio/drivers/roar.o
|
||||
LIBS += $(ROAR_LIBS)
|
||||
@@ -432,6 +636,12 @@ ifeq ($(HAVE_DSOUND), 1)
|
||||
LIBS += -ldxguid -ldsound
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WASAPI), 1)
|
||||
OBJ += audio/drivers/wasapi.o
|
||||
DEFINES += -DHAVE_WASAPI
|
||||
LIBS += -lole32 -lksuser
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_XAUDIO), 1)
|
||||
OBJ += audio/drivers/xaudio.o
|
||||
DEFINES += -DHAVE_XAUDIO
|
||||
@@ -548,7 +758,6 @@ ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
menu/menu_input.o \
|
||||
menu/menu_event.o \
|
||||
menu/menu_entries.o \
|
||||
menu/menu_navigation.o \
|
||||
menu/menu_setting.o \
|
||||
menu/menu_shader.o \
|
||||
menu/widgets/menu_filebrowser.o \
|
||||
@@ -576,7 +785,6 @@ ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
menu/cbs/menu_cbs_up.o \
|
||||
menu/cbs/menu_cbs_down.o \
|
||||
menu/cbs/menu_cbs_contentlist_switch.o \
|
||||
menu/menu_display.o \
|
||||
menu/menu_displaylist.o \
|
||||
menu/menu_animation.o \
|
||||
menu/drivers_display/menu_display_null.o \
|
||||
@@ -602,7 +810,6 @@ endif
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/rthreads/rthreads.o \
|
||||
$(LIBRETRO_COMM_DIR)/rthreads/rsemaphore.o \
|
||||
gfx/video_thread_wrapper.o \
|
||||
audio/audio_thread_wrapper.o
|
||||
DEFINES += -DHAVE_THREADS
|
||||
@@ -640,7 +847,8 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WAYLAND), 1)
|
||||
OBJ += gfx/drivers_context/wayland_ctx.o
|
||||
OBJ += gfx/drivers_context/wayland_ctx.o \
|
||||
input/drivers/wayland_input.o
|
||||
DEFINES += $(WAYLAND_CFLAGS) $(WAYLAND_CURSOR_CFLAGS)
|
||||
LIBS += $(WAYLAND_LIBS) $(WAYLAND_CURSOR_LIBS)
|
||||
endif
|
||||
@@ -669,8 +877,9 @@ endif
|
||||
ifeq ($(HAVE_X11), 1)
|
||||
OBJ += input/common/input_x11_common.o \
|
||||
input/drivers/x11_input.o \
|
||||
gfx/common/dbus_common.o \
|
||||
gfx/common/x11_common.o \
|
||||
input/drivers_keyboard/keyboard_event_x11.o
|
||||
gfx/common/xinerama_common.o
|
||||
|
||||
LIBS += $(X11_LIBS) $(XEXT_LIBS) $(XF86VM_LIBS) $(XINERAMA_LIBS)
|
||||
DEFINES += $(X11_CFLAGS) $(XEXT_CFLAGS) $(XF86VM_CFLAGS) $(XINERAMA_CFLAGS)
|
||||
@@ -702,8 +911,6 @@ ifeq ($(HAVE_UDEV), 1)
|
||||
DEFINES += $(UDEV_CFLAGS)
|
||||
LIBS += $(UDEV_LIBS)
|
||||
OBJ += input/drivers/udev_input.o \
|
||||
input/common/udev_common.o \
|
||||
input/drivers_keyboard/keyboard_event_udev.o \
|
||||
input/drivers_joypad/udev_joypad.o
|
||||
endif
|
||||
|
||||
@@ -732,10 +939,10 @@ endif
|
||||
|
||||
ifeq ($(HAVE_HID), 1)
|
||||
DEFINES += -DHAVE_HID
|
||||
OBJ += input/input_hid_driver.o \
|
||||
input/drivers_joypad/hid_joypad.o \
|
||||
OBJ += input/drivers_joypad/hid_joypad.o \
|
||||
input/connect/joypad_connection.o \
|
||||
input/connect/connect_ps2adapter.o \
|
||||
input/connect/connect_psxadapter.o \
|
||||
input/connect/connect_ps3.o \
|
||||
input/connect/connect_ps4.o \
|
||||
input/connect/connect_wii.o \
|
||||
@@ -749,6 +956,10 @@ ifeq ($(HAVE_PARPORT), 1)
|
||||
OBJ += input/drivers_joypad/parport_joypad.o
|
||||
endif
|
||||
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
OBJ += input/drivers/winraw_input.o
|
||||
endif
|
||||
|
||||
# Companion UI
|
||||
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
@@ -761,14 +972,8 @@ endif
|
||||
|
||||
# Video
|
||||
|
||||
OBJ += gfx/video_context_driver.o \
|
||||
gfx/drivers_context/gfx_null_ctx.o \
|
||||
gfx/video_state_tracker.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/math/vector_2.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/math/vector_3.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/math/vector_4.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/math/matrix_4x4.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/math/matrix_3x3.o
|
||||
OBJ += gfx/drivers_context/gfx_null_ctx.o \
|
||||
gfx/video_state_tracker.o
|
||||
|
||||
ifeq ($(HAVE_KMS), 1)
|
||||
HAVE_AND_WILL_USE_DRM = 1
|
||||
@@ -793,11 +998,14 @@ ifeq ($(HAVE_PLAIN_DRM), 1)
|
||||
LIBS += -ldrm
|
||||
endif
|
||||
|
||||
OBJ += \
|
||||
gfx/drivers_renderchain/null_renderchain.o
|
||||
|
||||
ifeq ($(HAVE_GL_CONTEXT), 1)
|
||||
DEFINES += -DHAVE_OPENGL -DHAVE_GLSL
|
||||
OBJ += gfx/drivers/gl.o \
|
||||
gfx/drivers_renderchain/gl_legacy_renderchain.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/gl_capabilities.o \
|
||||
gfx/drivers/gl_renderchains/render_chain_gl_legacy.o \
|
||||
gfx/common/gl_common.o \
|
||||
gfx/drivers_font/gl_raster_font.o \
|
||||
$(LIBRETRO_COMM_DIR)/glsym/rglgen.o
|
||||
@@ -842,7 +1050,7 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
|
||||
ifeq ($(HAVE_FFMPEG), 1)
|
||||
ifneq ($(C89_BUILD), 1)
|
||||
ifneq ($(HAVE_OPENGLES), 1)
|
||||
OBJ += cores/libretro-ffmpeg/fft/fft.o
|
||||
OBJ += cores/libretro-ffmpeg/ffmpeg_fft.o
|
||||
DEFINES += -I$(DEPS_DIR) -DHAVE_GL_FFT
|
||||
NEED_CXX_LINKER=1
|
||||
endif
|
||||
@@ -866,8 +1074,8 @@ endif
|
||||
GL_LIBS := -framework OpenGL
|
||||
OBJ += gfx/drivers_context/cgl_ctx.o
|
||||
else ifneq ($(findstring Win32,$(OS)),)
|
||||
GL_LIBS := -lopengl32 -lgdi32 -lcomdlg32 -lcomctl32
|
||||
OBJ += gfx/drivers_context/wgl_ctx.o
|
||||
GL_LIBS := -lopengl32 -lgdi32 -lcomdlg32
|
||||
WANT_WGL=1
|
||||
endif
|
||||
LIBS += $(GL_LIBS)
|
||||
endif
|
||||
@@ -920,6 +1128,7 @@ endif
|
||||
ifeq ($(HAVE_VULKAN), 1)
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
GLSLANG_PLATFORM := Windows
|
||||
WANT_WGL = 1
|
||||
else
|
||||
GLSLANG_PLATFORM := Unix
|
||||
endif
|
||||
@@ -978,6 +1187,10 @@ ifeq ($(HAVE_VULKAN), 1)
|
||||
DEFINES += -DHAVE_SLANG
|
||||
endif
|
||||
|
||||
ifeq ($(WANT_WGL), 1)
|
||||
OBJ += gfx/drivers_context/wgl_ctx.o
|
||||
LIBS += -lcomctl32
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OMAP), 1)
|
||||
OBJ += gfx/drivers/omap_gfx.o
|
||||
@@ -1026,8 +1239,6 @@ endif
|
||||
|
||||
ifeq ($(HAVE_D3D9), 1)
|
||||
OBJ += gfx/drivers/d3d.o \
|
||||
gfx/drivers/d3d_renderchains/render_chain_null.o \
|
||||
gfx/drivers/d3d_renderchains/render_chain_driver.o \
|
||||
gfx/common/d3d_common.o \
|
||||
gfx/drivers_font/d3d_w32_font.o \
|
||||
gfx/drivers_context/d3d_ctx.o
|
||||
@@ -1041,7 +1252,7 @@ ifeq ($(HAVE_D3D9), 1)
|
||||
|
||||
ifeq ($(HAVE_CG), 1)
|
||||
LIBS += -lcgD3D9
|
||||
OBJ += gfx/drivers/d3d_renderchains/render_chain_cg.o
|
||||
OBJ += gfx/drivers_renderchain/d3d9_cg_renderchain.o
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -1063,11 +1274,9 @@ ifeq ($(HAVE_7ZIP),1)
|
||||
HAVE_COMPRESSION = 1
|
||||
DEFINES += -DHAVE_7ZIP
|
||||
7ZOBJ = $(DEPS_DIR)/7zip/7zIn.o \
|
||||
$(DEPS_DIR)/7zip/7zAlloc.o \
|
||||
$(DEPS_DIR)/7zip/Bra86.o \
|
||||
$(DEPS_DIR)/7zip/7zFile.o \
|
||||
$(DEPS_DIR)/7zip/7zStream.o \
|
||||
$(DEPS_DIR)/7zip/7zBuf2.o \
|
||||
$(DEPS_DIR)/7zip/LzmaDec.o \
|
||||
$(DEPS_DIR)/7zip/7zCrcOpt.o \
|
||||
$(DEPS_DIR)/7zip/Bra.o \
|
||||
@@ -1125,20 +1334,20 @@ ifdef HAVE_COMPRESSION
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_BUILTINZLIB),1)
|
||||
OBJ += $(DEPS_DIR)/zlib/adler32.o \
|
||||
$(DEPS_DIR)/zlib/compress.o \
|
||||
$(DEPS_DIR)/zlib/crc32.o \
|
||||
$(DEPS_DIR)/zlib/deflate.o \
|
||||
$(DEPS_DIR)/zlib/gzclose.o \
|
||||
$(DEPS_DIR)/zlib/gzlib.o \
|
||||
$(DEPS_DIR)/zlib/gzread.o \
|
||||
$(DEPS_DIR)/zlib/gzwrite.o \
|
||||
$(DEPS_DIR)/zlib/inffast.o \
|
||||
$(DEPS_DIR)/zlib/inflate.o \
|
||||
$(DEPS_DIR)/zlib/inftrees.o \
|
||||
$(DEPS_DIR)/zlib/trees.o \
|
||||
$(DEPS_DIR)/zlib/uncompr.o \
|
||||
$(DEPS_DIR)/zlib/zutil.o
|
||||
OBJ += $(DEPS_DIR)/libz/adler32.o \
|
||||
$(DEPS_DIR)/libz/compress.o \
|
||||
$(DEPS_DIR)/libz/crc32.o \
|
||||
$(DEPS_DIR)/libz/deflate.o \
|
||||
$(DEPS_DIR)/libz/gzclose.o \
|
||||
$(DEPS_DIR)/libz/gzlib.o \
|
||||
$(DEPS_DIR)/libz/gzread.o \
|
||||
$(DEPS_DIR)/libz/gzwrite.o \
|
||||
$(DEPS_DIR)/libz/inffast.o \
|
||||
$(DEPS_DIR)/libz/inflate.o \
|
||||
$(DEPS_DIR)/libz/inftrees.o \
|
||||
$(DEPS_DIR)/libz/trees.o \
|
||||
$(DEPS_DIR)/libz/uncompr.o \
|
||||
$(DEPS_DIR)/libz/zutil.o
|
||||
else
|
||||
ifeq ($(HAVE_ZLIB),1)
|
||||
OBJ += $(ZLIB_OBJS)
|
||||
@@ -1173,6 +1382,10 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
tasks/task_wifi.o \
|
||||
tasks/task_netplay_find_content.o
|
||||
|
||||
ifeq ($(HAVE_SSL), 1)
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/net/net_socket_ssl.o
|
||||
endif
|
||||
|
||||
ifneq ($(HAVE_SOCKET_LEGACY),1)
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/net/net_ifinfo.o
|
||||
endif
|
||||
@@ -1239,7 +1452,6 @@ endif
|
||||
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
OBJ += media/rarch.o \
|
||||
input/drivers_keyboard/keyboard_event_win32.o \
|
||||
gfx/common/win32_common.o \
|
||||
frontend/drivers/platform_win32.o
|
||||
|
||||
|
||||
+1
-1
@@ -142,7 +142,7 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
CFLAGS += -I. -Ideps/zlib -Ideps/7zip -Ilibretro-common/include
|
||||
CFLAGS += -I. -Ideps/libz -Ideps/7zip -Ilibretro-common/include
|
||||
|
||||
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE -DSINC_LOWEST_QUALITY
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES)
|
||||
|
||||
@@ -34,7 +34,6 @@ OBJ := ctr/ctr_system.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/file/retro_stat.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
file_path_str.o \
|
||||
verbosity.o
|
||||
@@ -74,7 +73,7 @@ else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
CFLAGS += -I. -Ideps/zlib -Ideps/7zip -Ilibretro-common/include
|
||||
CFLAGS += -I. -Ideps/libz -Ideps/7zip -Ilibretro-common/include
|
||||
|
||||
#CFLAGS += -DRARCH_INTERNAL
|
||||
CFLAGS += -DRARCH_CONSOLE -DIS_SALAMANDER
|
||||
|
||||
+2
-2
@@ -72,7 +72,7 @@ OBJ += libretro-common/audio/dsp_filters/phaser.o
|
||||
OBJ += libretro-common/audio/dsp_filters/reverb.o
|
||||
OBJ += libretro-common/audio/dsp_filters/wahwah.o
|
||||
|
||||
CFLAGS += -Ideps/zlib/
|
||||
CFLAGS += -Ideps/libz/
|
||||
libretro = libretro_emscripten.bc
|
||||
|
||||
ifneq ($(V), 1)
|
||||
@@ -111,7 +111,7 @@ $(TARGET): $(OBJ)
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f deps/zlib/*.o
|
||||
rm -f deps/libz/*.o
|
||||
rm -f frontend/*.o
|
||||
rm -f menu/*.o
|
||||
rm -f menu/disp/*.o
|
||||
|
||||
+4
-4
@@ -89,7 +89,7 @@ else ifeq ($(libogc_platform), 1)
|
||||
EXT_TARGET := $(TARGET_NAME)_$(platform).dol
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)_$(platform).elf
|
||||
|
||||
INCLUDE += -I. -I$(DEVKITPRO)/libogc/include -Ideps/zlib
|
||||
INCLUDE += -I. -I$(DEVKITPRO)/libogc/include -Ideps/libz
|
||||
|
||||
ifeq ($(platform), ngc)
|
||||
LIBDIRS += -L$(DEVKITPRO)/libogc/lib/cube
|
||||
@@ -213,8 +213,8 @@ else ifeq ($(platform), vita)
|
||||
MACHDEP := -DVITA
|
||||
WANT_ZLIB := 1
|
||||
INCLUDE += -Ideps/libvita2d/include
|
||||
INCLUDE += -Ideps/zlib
|
||||
PLATCFLAGS := -marm -mfloat-abi=hard -fsingle-precision-constant \
|
||||
INCLUDE += -Ideps/libz
|
||||
PLATCFLAGS := -mfloat-abi=hard -fsingle-precision-constant \
|
||||
-mword-relocations -fno-unwind-tables -fno-asynchronous-unwind-tables -ftree-vectorize -fno-optimize-sibling-calls
|
||||
LIBS += -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub\
|
||||
-lSceSysmodule_stub -lSceCtrl_stub -lSceTouch_stub -lSceAudio_stub -lSceFiber_stub\
|
||||
@@ -414,7 +414,7 @@ ifneq ($(DEBUG), 1)
|
||||
arm-vita-eabi-strip -g $<
|
||||
endif
|
||||
vita-elf-create $< $@
|
||||
vita-make-fself -s $@ eboot.bin
|
||||
vita-make-fself -c -s $@ eboot.bin
|
||||
|
||||
%.elf32: %.elf
|
||||
ifeq ($(platform), xenon360)
|
||||
|
||||
+2
-7
@@ -15,7 +15,6 @@ DEBUG = 0
|
||||
HAVE_GCMGL = 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_RLAUNCH = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001
|
||||
@@ -34,7 +33,7 @@ EBOOT_PATH = pkg/ps3/USRDIR/EBOOT.BIN
|
||||
CORE_PATH = pkg/ps3/USRDIR/cores/CORE.SELF
|
||||
|
||||
LDDIRS = -L. -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt
|
||||
INCDIRS = -I. -Idefines -Ideps/zlib -Ilibretro-common/include
|
||||
INCDIRS = -I. -Idefines -Ideps/libz -Ilibretro-common/include
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
@@ -64,11 +63,7 @@ endif
|
||||
|
||||
PPU_SRCS = griffin/griffin.c
|
||||
|
||||
ifeq ($(HAVE_RLAUNCH), 1)
|
||||
DEFINES += -DHAVE_RLAUNCH
|
||||
endif
|
||||
|
||||
DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS
|
||||
|
||||
ifeq ($(HAVE_GCMGL), 1)
|
||||
DEFINES += -DHAVE_GCMGL
|
||||
|
||||
+1
-6
@@ -13,7 +13,6 @@ DEBUG = 0
|
||||
HAVE_GCMGL = 1
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_RLAUNCH = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001
|
||||
@@ -62,10 +61,6 @@ endif
|
||||
|
||||
PPU_SRCS = griffin/griffin.c
|
||||
|
||||
ifeq ($(HAVE_RLAUNCH), 1)
|
||||
DEFINES += -DHAVE_RLAUNCH
|
||||
endif
|
||||
|
||||
DEFINES += -DHAVE_RGUI -DHAVE_MATERIALUI -DHAVE_XMB -DHAVE_MENU -DRARCH_INTERNAL
|
||||
|
||||
ifeq ($(HAVE_GCMGL), 1)
|
||||
@@ -104,7 +99,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l
|
||||
|
||||
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
|
||||
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=0 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=0 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_STB_VORBIS
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
|
||||
@@ -18,7 +18,7 @@ endif
|
||||
|
||||
STRIP = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-strip.exe
|
||||
|
||||
PPU_CFLAGS += -I. -Ilibretro-common/include -Ideps/zlib -D__CELLOS_LV2__ -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_SYSUTILS -DHAVE_SYSMODULES -DHAVE_RARCH_EXEC
|
||||
PPU_CFLAGS += -I. -Ilibretro-common/include -Ideps/libz -D__CELLOS_LV2__ -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_SYSUTILS -DHAVE_SYSMODULES -DHAVE_RARCH_EXEC
|
||||
PPU_SRCS = frontend/frontend_salamander.c \
|
||||
frontend/frontend_driver.c \
|
||||
frontend/drivers/platform_ps3.c \
|
||||
@@ -27,7 +27,6 @@ PPU_SRCS = frontend/frontend_salamander.c \
|
||||
libretro-common/lists/dir_list.c \
|
||||
libretro-common/lists/string_list.c \
|
||||
libretro-common/file/retro_dirent.c \
|
||||
libretro-common/file/retro_stat.c \
|
||||
libretro-common/hash/rhash.c \
|
||||
libretro-common/string/stdstring.c \
|
||||
libretro-common/compat/compat_strl.c \
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ ELF_TARGET := retroarch_psl1ght.elf
|
||||
EBOOT_PATH = pkg/ps3/USRDIR/EBOOT.BIN
|
||||
CORE_PATH = pkg/ps3/USRDIR/cores/CORE.SELF
|
||||
|
||||
INCLUDE := -I. -I$(PS3DEV)/ppu/include -Ideps/zlib -Ips3/gcmgl/include/export -Ips3/include
|
||||
INCLUDE := -I. -I$(PS3DEV)/ppu/include -Ideps/libz -Ips3/gcmgl/include/export -Ips3/include
|
||||
LIBDIRS := -L$(PS3DEV)/ppu/lib -L$(PS3DEV)/portlibs/ppu/lib -L.
|
||||
|
||||
MACHDEP := -D__CELLOS_LV2__ -D__PSL1GHT__
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
INCDIR = deps/zlib deps/7zip libretro-common/include
|
||||
INCDIR = deps/libz deps/7zip libretro-common/include
|
||||
CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ OBJS = frontend/frontend_salamander.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/file/retro_stat.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
file_path_str.o \
|
||||
verbosity.o \
|
||||
|
||||
+2
-1
@@ -45,6 +45,7 @@ else
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_CC_RESAMPLER := 1
|
||||
HAVE_CHEEVOS := 1
|
||||
RARCH_CONSOLE := 1
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
@@ -97,7 +98,7 @@ STRIP := $(PREFIX)strip
|
||||
NM := $(PREFIX)nm
|
||||
LD := $(CXX)
|
||||
|
||||
INCDIRS := -I. -Ideps/zlib -Ideps/7zip -Ilibretro-common/include
|
||||
INCDIRS := -I. -Ideps/libz -Ideps/7zip -Ilibretro-common/include
|
||||
LIBDIRS := -L.
|
||||
|
||||
ARCHFLAGS := -march=armv7-a -mfpu=neon -mfloat-abi=hard -DVITA
|
||||
|
||||
@@ -45,7 +45,6 @@ OBJS = frontend/frontend_salamander.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/file/retro_stat.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
file_path_str.o \
|
||||
verbosity.o
|
||||
|
||||
@@ -29,7 +29,7 @@ ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
||||
DOL_TARGET := retroarch-salamander_wii.dol
|
||||
ELF_TARGET := retroarch-salamander_wii.elf
|
||||
|
||||
INCLUDE := -I. -I$(DEVKITPRO)/libogc/include -Ilibretro-common/include -Ideps/zlib
|
||||
INCLUDE := -I. -I$(DEVKITPRO)/libogc/include -Ilibretro-common/include -Ideps/libz
|
||||
LIBDIRS := -L$(DEVKITPRO)/libogc/lib/wii -L.
|
||||
|
||||
MACHDEP := -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float
|
||||
@@ -51,7 +51,6 @@ OBJ = frontend/frontend_salamander.o \
|
||||
libretro-common/lists/dir_list.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/file/retro_dirent.o \
|
||||
libretro-common/file/retro_stat.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/file/config_file.o \
|
||||
|
||||
+37
-10
@@ -1,18 +1,34 @@
|
||||
TARGET := retroarch_wiiu
|
||||
BUILD_HBL_ELF = 1
|
||||
BUILD_RPX = 1
|
||||
BUILD_RPX = 1
|
||||
DEBUG = 0
|
||||
GRIFFIN_BUILD = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
PC_DEVELOPMENT_IP_ADDRESS =
|
||||
PC_DEVELOPMENT_TCP_PORT =
|
||||
PC_DEVELOPMENT_IP_ADDRESS ?=
|
||||
PC_DEVELOPMENT_TCP_PORT ?=
|
||||
|
||||
OBJ :=
|
||||
OBJ += wiiu/system/memory.o
|
||||
OBJ += wiiu/system/exception_handler.o
|
||||
OBJ += wiiu/system/missing_libc_functions.o
|
||||
OBJ += wiiu/fs/sd_fat_devoptab.o
|
||||
OBJ += wiiu/fs/fs_utils.o
|
||||
OBJ += wiiu/controller_patcher/ControllerPatcher.o
|
||||
OBJ += wiiu/controller_patcher/ControllerPatcherWrapper.o
|
||||
OBJ += wiiu/controller_patcher/ConfigReader.o
|
||||
OBJ += wiiu/controller_patcher/config/ConfigParser.o
|
||||
OBJ += wiiu/controller_patcher/config/ConfigValues.o
|
||||
OBJ += wiiu/controller_patcher/network/ControllerPatcherNet.o
|
||||
OBJ += wiiu/controller_patcher/network/TCPServer.o
|
||||
OBJ += wiiu/controller_patcher/network/UDPClient.o
|
||||
OBJ += wiiu/controller_patcher/network/UDPServer.o
|
||||
OBJ += wiiu/controller_patcher/patcher/ControllerPatcherUtils.o
|
||||
OBJ += wiiu/controller_patcher/patcher/ControllerPatcherHID.o
|
||||
OBJ += wiiu/controller_patcher/utils/CPRetainVars.o
|
||||
OBJ += wiiu/controller_patcher/utils/CPStringTools.o
|
||||
OBJ += wiiu/controller_patcher/utils/PadConst.o
|
||||
OBJ += wiiu/controller_patcher/utils/FSHelper.o
|
||||
OBJ += wiiu/tex_shader.o
|
||||
OBJ += wiiu/hbl.o
|
||||
|
||||
@@ -22,7 +38,10 @@ ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_LIBRETRODB
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER
|
||||
# DEFINES += -DHAVE_XMB -DHAVE_MATERIALUI
|
||||
DEFINES += -DHAVE_STB_FONT -DHAVE_STB_VORBIS -DHAVE_LANGEXTRA -DHAVE_LIBRETRODB -DHAVE_NETWORKING
|
||||
# DEFINES += -DWANT_IFADDRS
|
||||
# DEFINES += -DHAVE_FREETYPE
|
||||
DEFINES += -DHAVE_XMB -DHAVE_MATERIALUI
|
||||
else
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_RTGA = 1
|
||||
@@ -35,18 +54,25 @@ else
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_ZARCH = 0
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_MATERIALUI = 1
|
||||
HAVE_XMB = 1
|
||||
HAVE_STB_FONT = 1
|
||||
# HAVE_FREETYPE = 1
|
||||
HAVE_LANGEXTRA = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_NETWORKING = 1
|
||||
# WANT_IFADDRS = 1
|
||||
|
||||
include Makefile.common
|
||||
BLACKLIST :=
|
||||
BLACKLIST += input/input_overlay.o
|
||||
BLACKLIST += tasks/task_overlay.o
|
||||
BLACKLIST += $(LIBRETRO_COMM_DIR)/net/net_ifinfo.o
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
|
||||
OBJ += gfx/drivers/wiiu_gfx.o
|
||||
# OBJ += gfx/drivers_font/wiiu_font.o
|
||||
# OBJ += menu/drivers_display/menu_display_wiiu.o
|
||||
OBJ += gfx/drivers_font/wiiu_font.o
|
||||
OBJ += menu/drivers_display/menu_display_wiiu.o
|
||||
OBJ += input/drivers/wiiu_input.o
|
||||
OBJ += input/drivers_joypad/wiiu_joypad.o
|
||||
OBJ += audio/drivers/wiiu_audio.o
|
||||
@@ -101,7 +127,7 @@ else
|
||||
endif
|
||||
|
||||
|
||||
INCDIRS := -I. -Ideps/zlib -Ideps/7zip -Ilibretro-common/include -Iwiiu -Iwiiu/include -I$(DEVKITPRO)/portlibs/ppc/include
|
||||
INCDIRS := -I. -Ideps/libz -Ideps/7zip -Ilibretro-common/include -Iwiiu -Iwiiu/include -I$(DEVKITPRO)/portlibs/ppc/include
|
||||
LIBDIRS := -L. -L$(DEVKITPRO)/portlibs/ppc/lib
|
||||
|
||||
CFLAGS := -mwup -mcpu=750 -meabi -mhard-float
|
||||
@@ -123,6 +149,7 @@ CFLAGS += -ffast-math -Werror=implicit-function-declaration
|
||||
#todo: remove -DWIIU and use the built-in macros instead (HW_WUP or __wiiu__).
|
||||
CFLAGS += -DWIIU -DMSB_FIRST
|
||||
CFLAGS += -DHAVE_MAIN
|
||||
CFLAGS += -DHAVE_UPDATE_ASSETS
|
||||
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES)
|
||||
|
||||
@@ -138,7 +165,7 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl,--whole-archive
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -D_GNU_SOURCE
|
||||
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ OBJ += libretro-common/file/retro_dirent.o
|
||||
OBJ += libretro-common/compat/compat_strl.o
|
||||
OBJ += libretro-common/file/config_file.o
|
||||
OBJ += libretro-common/streams/file_stream.o
|
||||
OBJ += libretro-common/file/retro_stat.o
|
||||
OBJ += libretro-common/hash/rhash.o
|
||||
OBJ += file_path_str.o
|
||||
OBJ += verbosity.o
|
||||
@@ -59,7 +58,7 @@ else
|
||||
endif
|
||||
|
||||
|
||||
INCDIRS := -I. -Ideps/zlib -Ideps/7zip -Ilibretro-common/include -Iwiiu -Iwiiu/include -I$(DEVKITPRO)/portlibs/ppc/include
|
||||
INCDIRS := -I. -Ideps/libz -Ideps/7zip -Ilibretro-common/include -Iwiiu -Iwiiu/include -I$(DEVKITPRO)/portlibs/ppc/include
|
||||
LIBDIRS := -L. -L$(DEVKITPRO)/portlibs/ppc/lib
|
||||
|
||||
CFLAGS := -mwup -mcpu=750 -meabi -mhard-float
|
||||
|
||||
@@ -3,6 +3,7 @@ TARGET = retroarch.exe
|
||||
HAVE_DINPUT = 1
|
||||
HAVE_XAUDIO = 1
|
||||
HAVE_DSOUND = 1
|
||||
HAVE_WASAPI = 1
|
||||
HAVE_OPENGL = 1
|
||||
HAVE_FBO = 1
|
||||
HAVE_DYLIB = 1
|
||||
|
||||
+414
-138
@@ -25,14 +25,15 @@
|
||||
#include <audio/dsp_filter.h>
|
||||
#include <file/file_path.h>
|
||||
#include <lists/dir_list.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "audio_driver.h"
|
||||
#include "audio_mixer.h"
|
||||
#include "audio_thread_wrapper.h"
|
||||
#include "../gfx/video_driver.h"
|
||||
#include "../record/record_driver.h"
|
||||
#include "../frontend/frontend_driver.h"
|
||||
|
||||
@@ -40,13 +41,13 @@
|
||||
#include "../driver.h"
|
||||
#include "../configuration.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../runloop.h"
|
||||
#include "../performance_counters.h"
|
||||
#include "../verbosity.h"
|
||||
#include "../list_special.h"
|
||||
|
||||
#define AUDIO_BUFFER_FREE_SAMPLES_COUNT (8 * 1024)
|
||||
|
||||
#define AUDIO_MIXER_MAX_STREAMS 8
|
||||
|
||||
static const audio_driver_t *audio_drivers[] = {
|
||||
#ifdef HAVE_ALSA
|
||||
&audio_alsa,
|
||||
@@ -54,6 +55,9 @@ static const audio_driver_t *audio_drivers[] = {
|
||||
&audio_alsathread,
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_TINYALSA
|
||||
&audio_tinyalsa,
|
||||
#endif
|
||||
#if defined(HAVE_OSS) || defined(HAVE_OSS_BSD)
|
||||
&audio_oss,
|
||||
#endif
|
||||
@@ -84,6 +88,9 @@ static const audio_driver_t *audio_drivers[] = {
|
||||
#ifdef HAVE_DSOUND
|
||||
&audio_dsound,
|
||||
#endif
|
||||
#ifdef HAVE_WASAPI
|
||||
&audio_wasapi,
|
||||
#endif
|
||||
#ifdef HAVE_PULSE
|
||||
&audio_pulse,
|
||||
#endif
|
||||
@@ -103,7 +110,7 @@ static const audio_driver_t *audio_drivers[] = {
|
||||
&audio_rwebaudio,
|
||||
#endif
|
||||
#if defined(PSP) || defined(VITA)
|
||||
&audio_psp,
|
||||
&audio_psp,
|
||||
#endif
|
||||
#ifdef _3DS
|
||||
&audio_ctr_csnd,
|
||||
@@ -113,44 +120,65 @@ static const audio_driver_t *audio_drivers[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
struct audio_mixer_stream
|
||||
{
|
||||
audio_mixer_sound_t *handle;
|
||||
audio_mixer_voice_t *voice;
|
||||
audio_mixer_stop_cb_t stop_cb;
|
||||
enum audio_mixer_state state;
|
||||
float volume;
|
||||
void *buf;
|
||||
size_t bufsize;
|
||||
};
|
||||
|
||||
static unsigned audio_mixer_current_max_idx = 0;
|
||||
static struct audio_mixer_stream audio_mixer_streams[AUDIO_MIXER_MAX_STREAMS] = {{0}};
|
||||
|
||||
static size_t audio_driver_chunk_size = 0;
|
||||
static size_t audio_driver_chunk_nonblock_size = 0;
|
||||
static size_t audio_driver_chunk_block_size = 0;
|
||||
|
||||
static size_t audio_driver_rewind_ptr = 0;
|
||||
static size_t audio_driver_rewind_size = 0;
|
||||
static int16_t *audio_driver_rewind_buf = NULL;
|
||||
|
||||
static float *audio_driver_input_data = NULL;
|
||||
static int16_t *audio_driver_rewind_buf = NULL;
|
||||
static int16_t *audio_driver_output_samples_conv_buf = NULL;
|
||||
|
||||
static unsigned audio_driver_free_samples_buf[AUDIO_BUFFER_FREE_SAMPLES_COUNT];
|
||||
static uint64_t audio_driver_free_samples_count = 0;
|
||||
|
||||
static float *audio_driver_output_samples_buf = NULL;
|
||||
static int16_t *audio_driver_output_samples_conv_buf = NULL;
|
||||
|
||||
static float audio_driver_volume_gain = 0.0f;
|
||||
|
||||
static size_t audio_driver_buffer_size = 0;
|
||||
static size_t audio_driver_data_ptr = 0;
|
||||
|
||||
static bool audio_driver_control = false;
|
||||
static bool audio_driver_control = false;
|
||||
static bool audio_driver_mixer_mute_enable = false;
|
||||
static bool audio_driver_mute_enable = false;
|
||||
static bool audio_driver_use_float = false;
|
||||
static bool audio_driver_active = false;
|
||||
static bool audio_driver_data_own = false;
|
||||
static bool audio_mixer_active = false;
|
||||
|
||||
static float audio_driver_rate_control_delta = 0.0f;
|
||||
static float audio_driver_input = 0.0f;
|
||||
static float audio_driver_volume_gain = 0.0f;
|
||||
static float audio_driver_mixer_volume_gain = 0.0f;
|
||||
|
||||
static float *audio_driver_input_data = NULL;
|
||||
static float *audio_driver_output_samples_buf = NULL;
|
||||
|
||||
static double audio_source_ratio_original = 0.0f;
|
||||
static double audio_source_ratio_current = 0.0f;
|
||||
|
||||
static struct retro_audio_callback audio_callback = {0};
|
||||
|
||||
static retro_dsp_filter_t *audio_driver_dsp = NULL;
|
||||
static struct string_list *audio_driver_devices_list = NULL;
|
||||
static const retro_resampler_t *audio_driver_resampler = NULL;
|
||||
|
||||
static void *audio_driver_resampler_data = NULL;
|
||||
static const audio_driver_t *current_audio = NULL;
|
||||
static void *audio_driver_context_audio_data = NULL;
|
||||
|
||||
static bool audio_driver_use_float = false;
|
||||
static bool audio_driver_active = false;
|
||||
static bool audio_driver_data_own = false;
|
||||
|
||||
/**
|
||||
* compute_audio_buffer_statistics:
|
||||
*
|
||||
@@ -160,7 +188,8 @@ static bool audio_driver_data_own = false;
|
||||
static void compute_audio_buffer_statistics(void)
|
||||
{
|
||||
unsigned i, low_water_size, high_water_size, avg, stddev;
|
||||
float avg_filled, deviation;
|
||||
float avg_filled = 0.0f;
|
||||
float deviation = 0.0f;
|
||||
uint64_t accum = 0;
|
||||
uint64_t accum_var = 0;
|
||||
unsigned low_water_count = 0;
|
||||
@@ -198,9 +227,9 @@ static void compute_audio_buffer_statistics(void)
|
||||
high_water_count++;
|
||||
}
|
||||
|
||||
RARCH_LOG("Average audio buffer saturation: %.2f %%, standard deviation (percentage points): %.2f %%.\n",
|
||||
RARCH_LOG("[Audio]: Average audio buffer saturation: %.2f %%, standard deviation (percentage points): %.2f %%.\n",
|
||||
avg_filled * 100.0, deviation * 100.0);
|
||||
RARCH_LOG("Amount of time spent close to underrun: %.2f %%. Close to blocking: %.2f %%.\n",
|
||||
RARCH_LOG("[Audio]: Amount of time spent close to underrun: %.2f %%. Close to blocking: %.2f %%.\n",
|
||||
(100.0 * low_water_count) / (samples - 1),
|
||||
(100.0 * high_water_count) / (samples - 1));
|
||||
}
|
||||
@@ -270,7 +299,7 @@ static bool audio_driver_deinit_internal(void)
|
||||
|
||||
audio_driver_rewind_size = 0;
|
||||
|
||||
if (settings && !settings->audio.enable)
|
||||
if (settings && !settings->bools.audio_enable)
|
||||
{
|
||||
audio_driver_active = false;
|
||||
return false;
|
||||
@@ -300,17 +329,15 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
float *samples_buf = NULL;
|
||||
int16_t *conv_buf = NULL;
|
||||
int16_t *rewind_buf = NULL;
|
||||
size_t outsamples_max = AUDIO_CHUNK_SIZE_NONBLOCKING * 2;
|
||||
size_t max_bufsamples = AUDIO_CHUNK_SIZE_NONBLOCKING * 2;
|
||||
settings_t *settings = config_get_ptr();
|
||||
/* Accomodate rewind since at some point we might have two full buffers. */
|
||||
size_t outsamples_max = AUDIO_CHUNK_SIZE_NONBLOCKING * 2 * AUDIO_MAX_RATIO *
|
||||
settings->floats.slowmotion_ratio;
|
||||
|
||||
convert_s16_to_float_init_simd();
|
||||
convert_float_to_s16_init_simd();
|
||||
|
||||
/* Accomodate rewind since at some point we might have two full buffers. */
|
||||
outsamples_max = max_bufsamples * AUDIO_MAX_RATIO *
|
||||
settings->slowmotion_ratio;
|
||||
|
||||
conv_buf = (int16_t*)malloc(outsamples_max
|
||||
* sizeof(int16_t));
|
||||
/* Used for recording even if audio isn't enabled. */
|
||||
@@ -335,7 +362,7 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
audio_driver_rewind_buf = rewind_buf;
|
||||
audio_driver_rewind_size = max_bufsamples;
|
||||
|
||||
if (!settings->audio.enable)
|
||||
if (!settings->bools.audio_enable)
|
||||
{
|
||||
audio_driver_active = false;
|
||||
return false;
|
||||
@@ -345,14 +372,15 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
#ifdef HAVE_THREADS
|
||||
if (audio_cb_inited)
|
||||
{
|
||||
RARCH_LOG("Starting threaded audio driver ...\n");
|
||||
RARCH_LOG("[Audio]: Starting threaded audio driver ...\n");
|
||||
if (!audio_init_thread(
|
||||
¤t_audio,
|
||||
&audio_driver_context_audio_data,
|
||||
*settings->audio.device ? settings->audio.device : NULL,
|
||||
settings->audio.out_rate, &new_rate,
|
||||
settings->audio.latency,
|
||||
settings->audio.block_frames,
|
||||
*settings->arrays.audio_device
|
||||
? settings->arrays.audio_device : NULL,
|
||||
settings->uints.audio_out_rate, &new_rate,
|
||||
settings->uints.audio_latency,
|
||||
settings->uints.audio_block_frames,
|
||||
current_audio))
|
||||
{
|
||||
RARCH_ERR("Cannot open threaded audio driver ... Exiting ...\n");
|
||||
@@ -363,15 +391,18 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
#endif
|
||||
{
|
||||
audio_driver_context_audio_data =
|
||||
current_audio->init(*settings->audio.device ?
|
||||
settings->audio.device : NULL,
|
||||
settings->audio.out_rate, settings->audio.latency,
|
||||
settings->audio.block_frames,
|
||||
current_audio->init(*settings->arrays.audio_device ?
|
||||
settings->arrays.audio_device : NULL,
|
||||
settings->uints.audio_out_rate,
|
||||
settings->uints.audio_latency,
|
||||
settings->uints.audio_block_frames,
|
||||
&new_rate);
|
||||
}
|
||||
|
||||
if (new_rate != 0)
|
||||
settings->audio.out_rate = new_rate;
|
||||
{
|
||||
configuration_set_int(settings, settings->uints.audio_out_rate, new_rate);
|
||||
}
|
||||
|
||||
if (!audio_driver_context_audio_data)
|
||||
{
|
||||
@@ -384,7 +415,7 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
&& current_audio->use_float(audio_driver_context_audio_data))
|
||||
audio_driver_use_float = true;
|
||||
|
||||
if (!settings->audio.sync && audio_driver_active)
|
||||
if (!settings->bools.audio_sync && audio_driver_active)
|
||||
{
|
||||
command_event(CMD_EVENT_AUDIO_SET_NONBLOCKING_STATE, NULL);
|
||||
audio_driver_chunk_size = audio_driver_chunk_nonblock_size;
|
||||
@@ -394,21 +425,21 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
{
|
||||
/* Should never happen. */
|
||||
RARCH_WARN("Input rate is invalid (%.3f Hz). Using output rate (%u Hz).\n",
|
||||
audio_driver_input, settings->audio.out_rate);
|
||||
audio_driver_input = settings->audio.out_rate;
|
||||
audio_driver_input, settings->uints.audio_out_rate);
|
||||
audio_driver_input = settings->uints.audio_out_rate;
|
||||
}
|
||||
|
||||
audio_source_ratio_original = audio_source_ratio_current =
|
||||
(double)settings->audio.out_rate / audio_driver_input;
|
||||
(double)settings->uints.audio_out_rate / audio_driver_input;
|
||||
|
||||
if (!retro_resampler_realloc(
|
||||
&audio_driver_resampler_data,
|
||||
&audio_driver_resampler,
|
||||
settings->audio.resampler,
|
||||
settings->arrays.audio_resampler,
|
||||
audio_source_ratio_original))
|
||||
{
|
||||
RARCH_ERR("Failed to initialize resampler \"%s\".\n",
|
||||
settings->audio.resampler);
|
||||
settings->arrays.audio_resampler);
|
||||
audio_driver_active = false;
|
||||
}
|
||||
|
||||
@@ -421,7 +452,7 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
audio_driver_input_data = aud_inp_data;
|
||||
audio_driver_data_ptr = 0;
|
||||
|
||||
retro_assert(settings->audio.out_rate <
|
||||
retro_assert(settings->uints.audio_out_rate <
|
||||
audio_driver_input * AUDIO_MAX_RATIO);
|
||||
|
||||
samples_buf = (float*)malloc(outsamples_max * sizeof(float));
|
||||
@@ -437,7 +468,7 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
if (
|
||||
!audio_cb_inited
|
||||
&& audio_driver_active
|
||||
&& settings->audio.rate_control
|
||||
&& settings->bools.audio_rate_control
|
||||
)
|
||||
{
|
||||
/* Audio rate control requires write_avail
|
||||
@@ -452,21 +483,15 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
|
||||
RARCH_WARN("Audio rate control was desired, but driver does not support needed features.\n");
|
||||
}
|
||||
|
||||
/* If we start muted, stop the audio driver,
|
||||
* so subsequent unmute works. */
|
||||
if ( !audio_cb_inited
|
||||
&& audio_driver_active
|
||||
&& settings->audio.mute_enable)
|
||||
audio_driver_stop();
|
||||
|
||||
command_event(CMD_EVENT_DSP_FILTER_INIT, NULL);
|
||||
|
||||
audio_driver_free_samples_count = 0;
|
||||
|
||||
audio_mixer_init(settings->uints.audio_out_rate);
|
||||
|
||||
/* Threaded driver is initially stopped. */
|
||||
if (
|
||||
audio_driver_active
|
||||
&& !settings->audio.mute_enable
|
||||
&& audio_cb_inited
|
||||
)
|
||||
audio_driver_start(false);
|
||||
@@ -484,8 +509,9 @@ void audio_driver_set_nonblocking_state(bool enable)
|
||||
audio_driver_active
|
||||
&& audio_driver_context_audio_data
|
||||
)
|
||||
current_audio->set_nonblock_state(audio_driver_context_audio_data,
|
||||
settings->audio.sync ? enable : true);
|
||||
current_audio->set_nonblock_state(
|
||||
audio_driver_context_audio_data,
|
||||
settings->bools.audio_sync ? enable : true);
|
||||
|
||||
audio_driver_chunk_size = enable ?
|
||||
audio_driver_chunk_nonblock_size :
|
||||
@@ -510,12 +536,10 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
bool is_paused = false;
|
||||
bool is_idle = false;
|
||||
bool is_slowmotion = false;
|
||||
static struct retro_perf_counter resampler_proc = {0};
|
||||
static struct retro_perf_counter audio_convert_s16 = {0};
|
||||
const void *output_data = NULL;
|
||||
unsigned output_frames = 0;
|
||||
size_t output_size = sizeof(float);
|
||||
settings_t *settings = config_get_ptr();
|
||||
float audio_volume_gain = !audio_driver_mute_enable ?
|
||||
audio_driver_volume_gain : 0.0f;
|
||||
|
||||
src_data.data_in = NULL;
|
||||
src_data.data_out = NULL;
|
||||
@@ -529,16 +553,13 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
runloop_get_status(&is_paused, &is_idle, &is_slowmotion,
|
||||
&is_perfcnt_enable);
|
||||
|
||||
if (is_paused || settings->audio.mute_enable)
|
||||
if (is_paused)
|
||||
return true;
|
||||
if (!audio_driver_active || !audio_driver_input_data)
|
||||
return false;
|
||||
|
||||
performance_counter_init(audio_convert_s16, "audio_convert_s16");
|
||||
performance_counter_start_plus(is_perfcnt_enable, audio_convert_s16);
|
||||
convert_s16_to_float(audio_driver_input_data, data, samples,
|
||||
audio_driver_volume_gain);
|
||||
performance_counter_stop_plus(is_perfcnt_enable, audio_convert_s16);
|
||||
audio_volume_gain);
|
||||
|
||||
src_data.data_in = audio_driver_input_data;
|
||||
src_data.input_frames = samples >> 1;
|
||||
@@ -546,7 +567,6 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
|
||||
if (audio_driver_dsp)
|
||||
{
|
||||
static struct retro_perf_counter audio_dsp = {0};
|
||||
struct retro_dsp_data dsp_data;
|
||||
|
||||
dsp_data.input = NULL;
|
||||
@@ -557,15 +577,12 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
dsp_data.input = audio_driver_input_data;
|
||||
dsp_data.input_frames = (unsigned)(samples >> 1);
|
||||
|
||||
performance_counter_init(audio_dsp, "audio_dsp");
|
||||
performance_counter_start_plus(is_perfcnt_enable, audio_dsp);
|
||||
retro_dsp_filter_process(audio_driver_dsp, &dsp_data);
|
||||
performance_counter_stop_plus(is_perfcnt_enable, audio_dsp);
|
||||
|
||||
if (dsp_data.output)
|
||||
{
|
||||
src_data.data_in = dsp_data.output;
|
||||
src_data.input_frames = dsp_data.output_frames;
|
||||
src_data.data_in = dsp_data.output;
|
||||
src_data.input_frames = dsp_data.output_frames;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -581,55 +598,61 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
(int)current_audio->write_avail(audio_driver_context_audio_data);
|
||||
int delta_mid = avail - half_size;
|
||||
double direction = (double)delta_mid / half_size;
|
||||
double adjust = 1.0 + settings->audio.rate_control_delta * direction;
|
||||
double adjust = 1.0 + audio_driver_rate_control_delta * direction;
|
||||
|
||||
#if 0
|
||||
RARCH_LOG_OUTPUT("Audio buffer is %u%% full\n",
|
||||
RARCH_LOG_OUTPUT("[Audio]: Audio buffer is %u%% full\n",
|
||||
(unsigned)(100 - (avail * 100) / audio_driver_buffer_size));
|
||||
#endif
|
||||
|
||||
audio_driver_free_samples_buf[write_idx] = avail;
|
||||
audio_driver_free_samples_buf
|
||||
[write_idx] = avail;
|
||||
audio_source_ratio_current =
|
||||
audio_source_ratio_original * adjust;
|
||||
|
||||
#if 0
|
||||
RARCH_LOG_OUTPUT("New rate: %lf, Orig rate: %lf\n",
|
||||
RARCH_LOG_OUTPUT("[Audio]: New rate: %lf, Orig rate: %lf\n",
|
||||
audio_source_ratio_current,
|
||||
audio_source_ratio_original);
|
||||
#endif
|
||||
}
|
||||
|
||||
src_data.ratio = audio_source_ratio_current;
|
||||
src_data.ratio = audio_source_ratio_current;
|
||||
|
||||
if (is_slowmotion)
|
||||
src_data.ratio *= settings->slowmotion_ratio;
|
||||
|
||||
performance_counter_init(resampler_proc, "resampler_proc");
|
||||
performance_counter_start_plus(is_perfcnt_enable, resampler_proc);
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
src_data.ratio *= settings->floats.slowmotion_ratio;
|
||||
}
|
||||
|
||||
audio_driver_resampler->process(audio_driver_resampler_data, &src_data);
|
||||
performance_counter_stop_plus(is_perfcnt_enable, resampler_proc);
|
||||
|
||||
output_data = audio_driver_output_samples_buf;
|
||||
output_frames = (unsigned)src_data.output_frames;
|
||||
|
||||
if (!audio_driver_use_float)
|
||||
if (audio_mixer_active)
|
||||
{
|
||||
static struct retro_perf_counter audio_convert_float = {0};
|
||||
bool override = audio_driver_mixer_mute_enable ? true :
|
||||
(audio_driver_mixer_volume_gain != 0.0f) ? true : false;
|
||||
float mixer_gain = !audio_driver_mixer_mute_enable ?
|
||||
audio_driver_mixer_volume_gain : 0.0f;
|
||||
audio_mixer_mix(audio_driver_output_samples_buf,
|
||||
src_data.output_frames, mixer_gain, override);
|
||||
}
|
||||
|
||||
performance_counter_init(audio_convert_float, "audio_convert_float");
|
||||
performance_counter_start_plus(is_perfcnt_enable, audio_convert_float);
|
||||
output_data = audio_driver_output_samples_buf;
|
||||
output_frames = (unsigned)src_data.output_frames;
|
||||
|
||||
if (audio_driver_use_float)
|
||||
output_frames *= sizeof(float);
|
||||
else
|
||||
{
|
||||
convert_float_to_s16(audio_driver_output_samples_conv_buf,
|
||||
(const float*)output_data, output_frames * 2);
|
||||
performance_counter_stop_plus(is_perfcnt_enable, audio_convert_float);
|
||||
|
||||
output_data = audio_driver_output_samples_conv_buf;
|
||||
output_size = sizeof(int16_t);
|
||||
output_data = audio_driver_output_samples_conv_buf;
|
||||
output_frames *= sizeof(int16_t);
|
||||
}
|
||||
|
||||
if (current_audio->write(audio_driver_context_audio_data,
|
||||
output_data, output_frames * output_size * 2,
|
||||
is_perfcnt_enable) < 0)
|
||||
output_data, output_frames * 2) < 0)
|
||||
{
|
||||
audio_driver_active = false;
|
||||
return false;
|
||||
@@ -718,11 +741,6 @@ size_t audio_driver_sample_batch_rewind(const int16_t *data, size_t frames)
|
||||
return frames;
|
||||
}
|
||||
|
||||
void audio_driver_set_volume_gain(float gain)
|
||||
{
|
||||
audio_driver_volume_gain = gain;
|
||||
}
|
||||
|
||||
void audio_driver_dsp_filter_free(void)
|
||||
{
|
||||
if (audio_driver_dsp)
|
||||
@@ -768,22 +786,22 @@ void audio_driver_monitor_adjust_system_rates(void)
|
||||
{
|
||||
float timing_skew;
|
||||
settings_t *settings = config_get_ptr();
|
||||
const struct retro_system_timing *info = NULL;
|
||||
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
|
||||
float video_refresh_rate = settings->floats.video_refresh_rate;
|
||||
float max_timing_skew = settings->floats.audio_max_timing_skew;
|
||||
const struct retro_system_timing *info = av_info ?
|
||||
(const struct retro_system_timing*)&av_info->timing : NULL;
|
||||
|
||||
if (av_info)
|
||||
info = (const struct retro_system_timing*)&av_info->timing;
|
||||
|
||||
if (!info || info->sample_rate <= 0.0)
|
||||
return;
|
||||
|
||||
timing_skew = fabs(1.0f - info->fps / settings->video.refresh_rate);
|
||||
timing_skew = fabs(1.0f - info->fps / video_refresh_rate);
|
||||
audio_driver_input = info->sample_rate;
|
||||
|
||||
if (timing_skew <= settings->audio.max_timing_skew)
|
||||
audio_driver_input *= (settings->video.refresh_rate / info->fps);
|
||||
if (timing_skew <= max_timing_skew)
|
||||
audio_driver_input *= (video_refresh_rate / info->fps);
|
||||
|
||||
RARCH_LOG("Set audio input rate to: %.2f Hz.\n",
|
||||
RARCH_LOG("[Audio]: Set audio input rate to: %.2f Hz.\n",
|
||||
audio_driver_input);
|
||||
}
|
||||
|
||||
@@ -813,7 +831,7 @@ bool audio_driver_find_driver(void)
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
drv.label = "audio_driver";
|
||||
drv.s = settings->audio.driver;
|
||||
drv.s = settings->arrays.audio_driver;
|
||||
|
||||
driver_ctl(RARCH_DRIVER_CTL_FIND_INDEX, &drv);
|
||||
|
||||
@@ -825,7 +843,7 @@ bool audio_driver_find_driver(void)
|
||||
{
|
||||
unsigned d;
|
||||
RARCH_ERR("Couldn't find any audio driver named \"%s\"\n",
|
||||
settings->audio.driver);
|
||||
settings->arrays.audio_driver);
|
||||
RARCH_LOG_OUTPUT("Available audio drivers are:\n");
|
||||
for (d = 0; audio_driver_find_handle(d); d++)
|
||||
RARCH_LOG_OUTPUT("\t%s\n", audio_driver_find_ident(d));
|
||||
@@ -885,9 +903,196 @@ bool audio_driver_get_devices_list(void **data)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool audio_driver_mixer_extension_supported(const char *ext)
|
||||
{
|
||||
union string_list_elem_attr attr;
|
||||
unsigned i;
|
||||
bool ret = false;
|
||||
struct string_list *str_list = string_list_new();
|
||||
|
||||
attr.i = 0;
|
||||
|
||||
#ifdef HAVE_STB_VORBIS
|
||||
string_list_append(str_list, "ogg", attr);
|
||||
#endif
|
||||
string_list_append(str_list, "wav", attr);
|
||||
|
||||
for (i = 0; i < str_list->size; i++)
|
||||
{
|
||||
const char *str_ext = str_list->elems[i].data;
|
||||
if (string_is_equal_noncase(str_ext, ext))
|
||||
{
|
||||
ret = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
string_list_free(str_list);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int audio_mixer_find_index(audio_mixer_sound_t *sound)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++)
|
||||
{
|
||||
audio_mixer_sound_t *handle = audio_mixer_streams[i].handle;
|
||||
if (handle == sound)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void audio_mixer_play_stop_cb(audio_mixer_sound_t *sound, unsigned reason)
|
||||
{
|
||||
int idx = audio_mixer_find_index(sound);
|
||||
|
||||
switch (reason)
|
||||
{
|
||||
case AUDIO_MIXER_SOUND_FINISHED:
|
||||
audio_mixer_destroy(sound);
|
||||
|
||||
if (idx >= 0)
|
||||
{
|
||||
unsigned i = (unsigned)idx;
|
||||
|
||||
#if 0
|
||||
if (audio_mixer_streams[i].buf != NULL)
|
||||
free(audio_mixer_streams[i].buf);
|
||||
#endif
|
||||
|
||||
audio_mixer_streams[i].state = AUDIO_STREAM_STATE_NONE;
|
||||
audio_mixer_streams[i].volume = 0.0f;
|
||||
audio_mixer_streams[i].buf = NULL;
|
||||
audio_mixer_streams[i].stop_cb = NULL;
|
||||
audio_mixer_streams[i].handle = NULL;
|
||||
audio_mixer_streams[i].voice = NULL;
|
||||
audio_mixer_current_max_idx--;
|
||||
}
|
||||
break;
|
||||
case AUDIO_MIXER_SOUND_STOPPED:
|
||||
break;
|
||||
case AUDIO_MIXER_SOUND_REPEATED:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
|
||||
{
|
||||
audio_mixer_voice_t *voice = NULL;
|
||||
audio_mixer_sound_t *handle = NULL;
|
||||
audio_mixer_stop_cb_t stop_cb = audio_mixer_play_stop_cb;
|
||||
bool looped = false;
|
||||
void *buf = NULL;
|
||||
|
||||
if (audio_mixer_current_max_idx >= AUDIO_MIXER_MAX_STREAMS)
|
||||
return false;
|
||||
|
||||
if (params->state == AUDIO_STREAM_STATE_NONE)
|
||||
return false;
|
||||
|
||||
buf = malloc(params->bufsize);
|
||||
|
||||
if (!buf)
|
||||
return false;
|
||||
|
||||
memcpy(buf, params->buf, params->bufsize);
|
||||
|
||||
switch (params->type)
|
||||
{
|
||||
case AUDIO_MIXER_TYPE_WAV:
|
||||
handle = audio_mixer_load_wav(buf, (int32_t)params->bufsize);
|
||||
break;
|
||||
case AUDIO_MIXER_TYPE_OGG:
|
||||
handle = audio_mixer_load_ogg(buf, (int32_t)params->bufsize);
|
||||
break;
|
||||
case AUDIO_MIXER_TYPE_NONE:
|
||||
free(buf);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!handle)
|
||||
{
|
||||
free(buf);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (params->state == AUDIO_STREAM_STATE_PLAYING)
|
||||
{
|
||||
voice = audio_mixer_play(handle, looped, params->volume, stop_cb);
|
||||
audio_set_bool(AUDIO_ACTION_MIXER, true);
|
||||
}
|
||||
else if (params->state == AUDIO_STREAM_STATE_PLAYING_LOOPED)
|
||||
{
|
||||
looped = true;
|
||||
voice = audio_mixer_play(handle, looped, params->volume, stop_cb);
|
||||
audio_set_bool(AUDIO_ACTION_MIXER, true);
|
||||
}
|
||||
|
||||
audio_mixer_streams[audio_mixer_current_max_idx].buf = buf;
|
||||
audio_mixer_streams[audio_mixer_current_max_idx].handle = handle;
|
||||
audio_mixer_streams[audio_mixer_current_max_idx].voice = voice;
|
||||
audio_mixer_streams[audio_mixer_current_max_idx].state = params->state;
|
||||
audio_mixer_streams[audio_mixer_current_max_idx].volume = params->volume;
|
||||
audio_mixer_streams[audio_mixer_current_max_idx].stop_cb = stop_cb;
|
||||
|
||||
audio_mixer_current_max_idx++;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void audio_driver_mixer_remove_stream(unsigned i)
|
||||
{
|
||||
audio_mixer_sound_t *handle = audio_mixer_streams[i].handle;
|
||||
audio_mixer_voice_t *voice = audio_mixer_streams[i].voice;
|
||||
|
||||
switch (audio_mixer_streams[i].state)
|
||||
{
|
||||
case AUDIO_STREAM_STATE_PLAYING:
|
||||
if (voice)
|
||||
audio_mixer_stop(voice);
|
||||
if (handle)
|
||||
audio_mixer_destroy(handle);
|
||||
break;
|
||||
case AUDIO_STREAM_STATE_PLAYING_LOOPED:
|
||||
if (voice)
|
||||
audio_mixer_stop(voice);
|
||||
if (handle)
|
||||
audio_mixer_destroy(handle);
|
||||
break;
|
||||
case AUDIO_STREAM_STATE_STOPPED:
|
||||
if (handle)
|
||||
audio_mixer_destroy(handle);
|
||||
break;
|
||||
case AUDIO_STREAM_STATE_NONE:
|
||||
break;
|
||||
}
|
||||
|
||||
audio_mixer_streams[i].state = AUDIO_STREAM_STATE_NONE;
|
||||
audio_mixer_streams[i].volume = 0.0f;
|
||||
audio_mixer_streams[i].stop_cb = NULL;
|
||||
audio_mixer_streams[i].handle = NULL;
|
||||
audio_mixer_streams[i].voice = NULL;
|
||||
}
|
||||
|
||||
static void audio_driver_mixer_deinit(void)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
audio_set_bool(AUDIO_ACTION_MIXER, false);
|
||||
|
||||
for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++)
|
||||
audio_driver_mixer_remove_stream(i);
|
||||
|
||||
audio_mixer_current_max_idx = 0;
|
||||
audio_mixer_done();
|
||||
}
|
||||
|
||||
bool audio_driver_deinit(void)
|
||||
{
|
||||
audio_driver_mixer_deinit();
|
||||
audio_driver_free_devices_list();
|
||||
if (!audio_driver_deinit_internal())
|
||||
return false;
|
||||
@@ -927,7 +1132,7 @@ bool audio_driver_disable_callback(void)
|
||||
void audio_driver_monitor_set_rate(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
double new_src_ratio = (double)settings->audio.out_rate /
|
||||
double new_src_ratio = (double)settings->uints.audio_out_rate /
|
||||
audio_driver_input;
|
||||
|
||||
audio_source_ratio_original = new_src_ratio;
|
||||
@@ -952,37 +1157,50 @@ bool audio_driver_has_callback(void)
|
||||
|
||||
bool audio_driver_toggle_mute(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (!audio_driver_context_audio_data)
|
||||
return false;
|
||||
if (!audio_driver_active)
|
||||
return false;
|
||||
|
||||
settings->audio.mute_enable = !settings->audio.mute_enable;
|
||||
|
||||
if (settings->audio.mute_enable)
|
||||
command_event(CMD_EVENT_AUDIO_STOP, NULL);
|
||||
else if (!command_event(CMD_EVENT_AUDIO_START, NULL))
|
||||
{
|
||||
audio_driver_active = false;
|
||||
return false;
|
||||
}
|
||||
audio_driver_mute_enable = !audio_driver_mute_enable;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool audio_driver_mixer_toggle_mute(void)
|
||||
{
|
||||
audio_driver_mixer_mute_enable = !audio_driver_mixer_mute_enable;
|
||||
return true;
|
||||
}
|
||||
|
||||
static INLINE bool audio_driver_alive(void)
|
||||
{
|
||||
if ( current_audio
|
||||
&& current_audio->alive
|
||||
&& audio_driver_context_audio_data)
|
||||
return current_audio->alive(audio_driver_context_audio_data);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool audio_driver_start(bool is_shutdown)
|
||||
{
|
||||
if (!current_audio || !current_audio->start
|
||||
|| !audio_driver_context_audio_data)
|
||||
return false;
|
||||
return current_audio->start(audio_driver_context_audio_data, is_shutdown);
|
||||
goto error;
|
||||
if (!current_audio->start(audio_driver_context_audio_data, is_shutdown))
|
||||
goto error;
|
||||
|
||||
return true;
|
||||
|
||||
error:
|
||||
RARCH_ERR("%s\n",
|
||||
msg_hash_to_str(MSG_FAILED_TO_START_AUDIO_DRIVER));
|
||||
audio_driver_active = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool audio_driver_stop(void)
|
||||
{
|
||||
if (!current_audio || !current_audio->stop
|
||||
|| !audio_driver_context_audio_data)
|
||||
return false;
|
||||
if (!audio_driver_alive())
|
||||
return false;
|
||||
return current_audio->stop(audio_driver_context_audio_data);
|
||||
}
|
||||
|
||||
@@ -992,15 +1210,6 @@ void audio_driver_unset_callback(void)
|
||||
audio_callback.set_state = NULL;
|
||||
}
|
||||
|
||||
bool audio_driver_alive(void)
|
||||
{
|
||||
if ( current_audio
|
||||
&& current_audio->alive
|
||||
&& audio_driver_context_audio_data)
|
||||
return current_audio->alive(audio_driver_context_audio_data);
|
||||
return false;
|
||||
}
|
||||
|
||||
void audio_driver_frame_is_reverse(void)
|
||||
{
|
||||
/* We just rewound. Flush rewind audio buffer. */
|
||||
@@ -1034,14 +1243,81 @@ void audio_driver_set_active(void)
|
||||
audio_driver_active = true;
|
||||
}
|
||||
|
||||
void audio_driver_unset_active(void)
|
||||
{
|
||||
audio_driver_active = false;
|
||||
}
|
||||
|
||||
void audio_driver_destroy(void)
|
||||
{
|
||||
audio_driver_active = false;
|
||||
audio_driver_data_own = false;
|
||||
current_audio = NULL;
|
||||
}
|
||||
|
||||
void audio_set_bool(enum audio_action action, bool val)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case AUDIO_ACTION_MIXER:
|
||||
audio_mixer_active = val;
|
||||
break;
|
||||
case AUDIO_ACTION_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* db_to_gain:
|
||||
* @db : Decibels.
|
||||
*
|
||||
* Converts decibels to voltage gain.
|
||||
*
|
||||
* Returns: voltage gain value.
|
||||
**/
|
||||
#define db_to_gain(db) (powf(10.0f, (db) / 20.0f))
|
||||
|
||||
void audio_set_float(enum audio_action action, float val)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case AUDIO_ACTION_VOLUME_GAIN:
|
||||
audio_driver_volume_gain = db_to_gain(val);
|
||||
break;
|
||||
case AUDIO_ACTION_MIXER_VOLUME_GAIN:
|
||||
audio_driver_mixer_volume_gain = db_to_gain(val);
|
||||
break;
|
||||
case AUDIO_ACTION_RATE_CONTROL_DELTA:
|
||||
audio_driver_rate_control_delta = val;
|
||||
break;
|
||||
case AUDIO_ACTION_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
float *audio_get_float_ptr(enum audio_action action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case AUDIO_ACTION_RATE_CONTROL_DELTA:
|
||||
return &audio_driver_rate_control_delta;
|
||||
case AUDIO_ACTION_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool *audio_get_bool_ptr(enum audio_action action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case AUDIO_ACTION_MIXER_MUTE_ENABLE:
|
||||
return &audio_driver_mixer_mute_enable;
|
||||
case AUDIO_ACTION_MUTE_ENABLE:
|
||||
return &audio_driver_mute_enable;
|
||||
case AUDIO_ACTION_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
+45
-6
@@ -22,6 +22,7 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <audio/audio_mixer.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
@@ -33,6 +34,17 @@ RETRO_BEGIN_DECLS
|
||||
|
||||
#define AUDIO_MAX_RATIO 16
|
||||
|
||||
enum audio_action
|
||||
{
|
||||
AUDIO_ACTION_NONE = 0,
|
||||
AUDIO_ACTION_RATE_CONTROL_DELTA,
|
||||
AUDIO_ACTION_MIXER_MUTE_ENABLE,
|
||||
AUDIO_ACTION_MUTE_ENABLE,
|
||||
AUDIO_ACTION_VOLUME_GAIN,
|
||||
AUDIO_ACTION_MIXER_VOLUME_GAIN,
|
||||
AUDIO_ACTION_MIXER
|
||||
};
|
||||
|
||||
typedef struct audio_driver
|
||||
{
|
||||
/* Creates and initializes handle to audio driver.
|
||||
@@ -67,8 +79,7 @@ typedef struct audio_driver
|
||||
* Unless said otherwise with set_nonblock_state(), all writes
|
||||
* are blocking, and it should block till it has written all frames.
|
||||
*/
|
||||
ssize_t (*write)(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable);
|
||||
ssize_t (*write)(void *data, const void *buf, size_t size);
|
||||
|
||||
/* Temporarily pauses the audio driver. */
|
||||
bool (*stop)(void *data);
|
||||
@@ -116,6 +127,24 @@ typedef struct audio_driver
|
||||
size_t (*buffer_size)(void *data);
|
||||
} audio_driver_t;
|
||||
|
||||
enum audio_mixer_state
|
||||
{
|
||||
AUDIO_STREAM_STATE_NONE = 0,
|
||||
AUDIO_STREAM_STATE_STOPPED,
|
||||
AUDIO_STREAM_STATE_PLAYING,
|
||||
AUDIO_STREAM_STATE_PLAYING_LOOPED
|
||||
};
|
||||
|
||||
typedef struct audio_mixer_stream_params
|
||||
{
|
||||
float volume;
|
||||
enum audio_mixer_type type;
|
||||
enum audio_mixer_state state;
|
||||
void *buf;
|
||||
size_t bufsize;
|
||||
audio_mixer_stop_cb_t cb;
|
||||
} audio_mixer_stream_params_t;
|
||||
|
||||
void audio_driver_destroy_data(void);
|
||||
|
||||
void audio_driver_set_own_driver(void);
|
||||
@@ -124,8 +153,6 @@ void audio_driver_unset_own_driver(void);
|
||||
|
||||
void audio_driver_set_active(void);
|
||||
|
||||
void audio_driver_unset_active(void);
|
||||
|
||||
void audio_driver_destroy(void);
|
||||
|
||||
void audio_driver_deinit_resampler(void);
|
||||
@@ -175,7 +202,7 @@ void audio_driver_sample_rewind(int16_t left, int16_t right);
|
||||
|
||||
size_t audio_driver_sample_batch_rewind(const int16_t *data, size_t frames);
|
||||
|
||||
void audio_driver_set_volume_gain(float gain);
|
||||
bool audio_driver_mixer_extension_supported(const char *ext);
|
||||
|
||||
void audio_driver_dsp_filter_free(void);
|
||||
|
||||
@@ -212,16 +239,27 @@ void audio_driver_unset_callback(void);
|
||||
|
||||
void audio_driver_frame_is_reverse(void);
|
||||
|
||||
bool audio_driver_alive(void);
|
||||
void audio_set_float(enum audio_action action, float val);
|
||||
|
||||
void audio_set_bool(enum audio_action action, bool val);
|
||||
|
||||
void audio_unset_bool(enum audio_action action, bool val);
|
||||
|
||||
float *audio_get_float_ptr(enum audio_action action);
|
||||
|
||||
bool *audio_get_bool_ptr(enum audio_action action);
|
||||
|
||||
bool audio_driver_deinit(void);
|
||||
|
||||
bool audio_driver_init(void);
|
||||
|
||||
bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params);
|
||||
|
||||
extern audio_driver_t audio_rsound;
|
||||
extern audio_driver_t audio_oss;
|
||||
extern audio_driver_t audio_alsa;
|
||||
extern audio_driver_t audio_alsathread;
|
||||
extern audio_driver_t audio_tinyalsa;
|
||||
extern audio_driver_t audio_roar;
|
||||
extern audio_driver_t audio_openal;
|
||||
extern audio_driver_t audio_opensl;
|
||||
@@ -230,6 +268,7 @@ extern audio_driver_t audio_sdl;
|
||||
extern audio_driver_t audio_xa;
|
||||
extern audio_driver_t audio_pulse;
|
||||
extern audio_driver_t audio_dsound;
|
||||
extern audio_driver_t audio_wasapi;
|
||||
extern audio_driver_t audio_coreaudio;
|
||||
extern audio_driver_t audio_xenon360;
|
||||
extern audio_driver_t audio_ps3;
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2017 - Andre Leiradella
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __AUDIO_MIXER__H
|
||||
#define __AUDIO_MIXER__H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct audio_mixer_sound_t audio_mixer_sound_t;
|
||||
typedef struct audio_mixer_voice_t audio_mixer_voice_t;
|
||||
|
||||
typedef void (*audio_mixer_stop_cb_t)(audio_mixer_voice_t* voice, unsigned reason);
|
||||
|
||||
/* Reasons passed to the stop callback. */
|
||||
#define AUDIO_MIXER_SOUND_FINISHED 0
|
||||
#define AUDIO_MIXER_SOUND_STOPPED 1
|
||||
#define AUDIO_MIXER_SOUND_REPEATED 2
|
||||
|
||||
void audio_mixer_init(unsigned rate);
|
||||
void audio_mixer_done(void);
|
||||
|
||||
audio_mixer_sound_t* audio_mixer_load_wav(const char* path);
|
||||
audio_mixer_sound_t* audio_mixer_load_ogg(const char* path);
|
||||
|
||||
void audio_mixer_destroy(audio_mixer_sound_t* sound);
|
||||
|
||||
audio_mixer_voice_t* audio_mixer_play(audio_mixer_sound_t* sound, bool repeat, float volume, audio_mixer_stop_cb_t stop_cb);
|
||||
void audio_mixer_stop(audio_mixer_voice_t* voice);
|
||||
|
||||
void audio_mixer_mix(float* buffer, size_t num_frames);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
@@ -228,8 +228,7 @@ static bool audio_thread_use_float(void *data)
|
||||
return thr->use_float;
|
||||
}
|
||||
|
||||
static ssize_t audio_thread_write(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t audio_thread_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
ssize_t ret;
|
||||
audio_thread_t *thr = (audio_thread_t*)data;
|
||||
@@ -237,8 +236,7 @@ static ssize_t audio_thread_write(void *data, const void *buf, size_t size,
|
||||
if (!thr)
|
||||
return 0;
|
||||
|
||||
ret = thr->driver->write(thr->driver_data, buf, size,
|
||||
is_perfcnt_enable);
|
||||
ret = thr->driver->write(thr->driver_data, buf, size);
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
|
||||
+71
-65
@@ -29,6 +29,7 @@ typedef struct alsa
|
||||
snd_pcm_t *pcm;
|
||||
size_t buffer_size;
|
||||
bool nonblock;
|
||||
unsigned int frame_bits;
|
||||
bool has_float;
|
||||
bool can_pause;
|
||||
bool is_paused;
|
||||
@@ -46,11 +47,11 @@ static bool find_float_format(snd_pcm_t *pcm, void *data)
|
||||
|
||||
if (snd_pcm_hw_params_test_format(pcm, params, SND_PCM_FORMAT_FLOAT) == 0)
|
||||
{
|
||||
RARCH_LOG("ALSA: Using floating point format.\n");
|
||||
RARCH_LOG("[ALSA]: Using floating point format.\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
RARCH_LOG("ALSA: Using signed 16-bit format.\n");
|
||||
RARCH_LOG("[ALSA]: Using signed 16-bit format.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -92,6 +93,9 @@ static void *alsa_init(const char *device, unsigned rate, unsigned latency,
|
||||
alsa->pcm, params, SND_PCM_ACCESS_RW_INTERLEAVED) < 0)
|
||||
goto error;
|
||||
|
||||
/* channels hardcoded to 2 for now */
|
||||
alsa->frame_bits = snd_pcm_format_physical_width(format) * 2;
|
||||
|
||||
if (snd_pcm_hw_params_set_format(alsa->pcm, params, format) < 0)
|
||||
goto error;
|
||||
|
||||
@@ -122,17 +126,17 @@ static void *alsa_init(const char *device, unsigned rate, unsigned latency,
|
||||
if (snd_pcm_hw_params_get_period_size(params, &buffer_size, NULL))
|
||||
snd_pcm_hw_params_get_period_size_min(params, &buffer_size, NULL);
|
||||
|
||||
RARCH_LOG("ALSA: Period size: %d frames\n", (int)buffer_size);
|
||||
RARCH_LOG("[ALSA]: Period size: %d frames\n", (int)buffer_size);
|
||||
|
||||
if (snd_pcm_hw_params_get_buffer_size(params, &buffer_size))
|
||||
snd_pcm_hw_params_get_buffer_size_max(params, &buffer_size);
|
||||
|
||||
RARCH_LOG("ALSA: Buffer size: %d frames\n", (int)buffer_size);
|
||||
RARCH_LOG("[ALSA]: Buffer size: %d frames\n", (int)buffer_size);
|
||||
|
||||
alsa->buffer_size = snd_pcm_frames_to_bytes(alsa->pcm, buffer_size);
|
||||
alsa->can_pause = snd_pcm_hw_params_can_pause(params);
|
||||
|
||||
RARCH_LOG("ALSA: Can pause: %s.\n", alsa->can_pause ? "yes" : "no");
|
||||
RARCH_LOG("[ALSA]: Can pause: %s.\n", alsa->can_pause ? "yes" : "no");
|
||||
|
||||
if (snd_pcm_sw_params_malloc(&sw_params) < 0)
|
||||
goto error;
|
||||
@@ -153,7 +157,7 @@ static void *alsa_init(const char *device, unsigned rate, unsigned latency,
|
||||
return alsa;
|
||||
|
||||
error:
|
||||
RARCH_ERR("ALSA: Failed to initialize...\n");
|
||||
RARCH_ERR("[ALSA]: Failed to initialize...\n");
|
||||
if (params)
|
||||
snd_pcm_hw_params_free(params);
|
||||
|
||||
@@ -173,74 +177,82 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static ssize_t alsa_write(void *data, const void *buf_, size_t size_,
|
||||
bool is_perfcnt_enable)
|
||||
#define BYTES_TO_FRAMES(bytes, frame_bits) ((bytes) * 8 / frame_bits)
|
||||
#define FRAMES_TO_BYTES(frames, frame_bits) ((frames) * frame_bits / 8)
|
||||
|
||||
static ssize_t alsa_write(void *data, const void *buf_, size_t size_)
|
||||
{
|
||||
alsa_t *alsa = (alsa_t*)data;
|
||||
const uint8_t *buf = (const uint8_t*)buf_;
|
||||
bool eagain_retry = true;
|
||||
snd_pcm_sframes_t written = 0;
|
||||
snd_pcm_sframes_t size = snd_pcm_bytes_to_frames(alsa->pcm, size_);
|
||||
snd_pcm_sframes_t size = BYTES_TO_FRAMES(size_, alsa->frame_bits);
|
||||
size_t frames_size = alsa->has_float ? sizeof(float) : sizeof(int16_t);
|
||||
|
||||
while (size)
|
||||
if (alsa->nonblock)
|
||||
{
|
||||
snd_pcm_sframes_t frames;
|
||||
|
||||
if (!alsa->nonblock)
|
||||
while (size)
|
||||
{
|
||||
snd_pcm_sframes_t frames = snd_pcm_writei(alsa->pcm, buf, size);
|
||||
|
||||
if (frames == -EPIPE || frames == -EINTR || frames == -ESTRPIPE)
|
||||
{
|
||||
if (snd_pcm_recover(alsa->pcm, frames, 1) < 0)
|
||||
return -1;
|
||||
|
||||
break;
|
||||
}
|
||||
else if (frames == -EAGAIN)
|
||||
break;
|
||||
else if (frames < 0)
|
||||
return -1;
|
||||
|
||||
written += frames;
|
||||
buf += (frames << 1) * frames_size;
|
||||
size -= frames;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bool eagain_retry = true;
|
||||
|
||||
while (size)
|
||||
{
|
||||
snd_pcm_sframes_t frames;
|
||||
int rc = snd_pcm_wait(alsa->pcm, -1);
|
||||
|
||||
if (rc == -EPIPE || rc == -ESTRPIPE || rc == -EINTR)
|
||||
{
|
||||
if (snd_pcm_recover(alsa->pcm, rc, 1) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: (#1) Failed to recover from error (%s)\n",
|
||||
snd_strerror(rc));
|
||||
return -1;
|
||||
continue;
|
||||
}
|
||||
|
||||
frames = snd_pcm_writei(alsa->pcm, buf, size);
|
||||
|
||||
if (frames == -EPIPE || frames == -EINTR || frames == -ESTRPIPE)
|
||||
{
|
||||
if (snd_pcm_recover(alsa->pcm, frames, 1) < 0)
|
||||
return -1;
|
||||
|
||||
break;
|
||||
}
|
||||
else if (frames == -EAGAIN)
|
||||
{
|
||||
/* Definitely not supposed to happen. */
|
||||
if (eagain_retry)
|
||||
{
|
||||
eagain_retry = false;
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
frames = snd_pcm_writei(alsa->pcm, buf, size);
|
||||
|
||||
if (frames == -EPIPE || frames == -EINTR || frames == -ESTRPIPE)
|
||||
{
|
||||
if (snd_pcm_recover(alsa->pcm, frames, 1) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: (#2) Failed to recover from error (%s)\n",
|
||||
snd_strerror(frames));
|
||||
else if (frames < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
break;
|
||||
written += frames;
|
||||
buf += (frames << 1) * frames_size;
|
||||
size -= frames;
|
||||
}
|
||||
else if (frames == -EAGAIN && !alsa->nonblock)
|
||||
{
|
||||
/* Definitely not supposed to happen. */
|
||||
RARCH_WARN("[ALSA]: poll() was signaled, but EAGAIN returned from write.\n"
|
||||
"Your ALSA driver might be subtly broken.\n");
|
||||
|
||||
if (eagain_retry)
|
||||
{
|
||||
eagain_retry = false;
|
||||
continue;
|
||||
}
|
||||
return written;
|
||||
}
|
||||
else if (frames == -EAGAIN) /* Expected if we're running nonblock. */
|
||||
return written;
|
||||
else if (frames < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Unknown error occurred (%s).\n",
|
||||
snd_strerror(frames));
|
||||
return -1;
|
||||
}
|
||||
|
||||
written += frames;
|
||||
buf += (frames << 1) *
|
||||
(alsa->has_float ? sizeof(float) : sizeof(int16_t));
|
||||
size -= frames;
|
||||
}
|
||||
|
||||
return written;
|
||||
@@ -318,19 +330,13 @@ static void alsa_free(void *data)
|
||||
|
||||
static size_t alsa_write_avail(void *data)
|
||||
{
|
||||
alsa_t *alsa = (alsa_t*)data;
|
||||
alsa_t *alsa = (alsa_t*)data;
|
||||
snd_pcm_sframes_t avail = snd_pcm_avail(alsa->pcm);
|
||||
|
||||
if (avail < 0)
|
||||
{
|
||||
#if 0
|
||||
RARCH_WARN("[ALSA]: snd_pcm_avail() failed: %s\n",
|
||||
snd_strerror(avail));
|
||||
#endif
|
||||
return alsa->buffer_size;
|
||||
}
|
||||
|
||||
return snd_pcm_frames_to_bytes(alsa->pcm, avail);
|
||||
return FRAMES_TO_BYTES(avail, alsa->frame_bits);
|
||||
}
|
||||
|
||||
static size_t alsa_buffer_size(void *data)
|
||||
@@ -364,7 +370,7 @@ static void *alsa_device_list_new(void *data)
|
||||
/* description of device IOID - input / output identifcation
|
||||
* ("Input" or "Output"), NULL means both) */
|
||||
|
||||
if (!io || string_is_equal(io,"Output"))
|
||||
if (!io || (string_is_equal_fast(io, "Output", 6)))
|
||||
string_list_append(s, name, attr);
|
||||
|
||||
if (name)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#define ALSA_PCM_NEW_HW_PARAMS_API
|
||||
#define ALSA_PCM_NEW_SW_PARAMS_API
|
||||
#include <sys/asoundlib.h>
|
||||
#include <retro_math.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
|
||||
@@ -219,8 +220,7 @@ static int check_pcm_status(void *data, int channel_type)
|
||||
}
|
||||
|
||||
|
||||
static ssize_t alsa_qsa_write(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t alsa_qsa_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
alsa_t *alsa = (alsa_t*)data;
|
||||
snd_pcm_sframes_t written = 0;
|
||||
|
||||
@@ -243,8 +243,7 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static ssize_t alsa_thread_write(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t alsa_thread_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
alsa_thread_t *alsa = (alsa_thread_t*)data;
|
||||
|
||||
@@ -371,7 +370,7 @@ static void *alsa_device_list_new(void *data)
|
||||
/* description of device IOID - input / output identifcation
|
||||
* ("Input" or "Output"), NULL means both) */
|
||||
|
||||
if (!io || string_is_equal(io,"Output"))
|
||||
if (!io || (string_is_equal_fast(io,"Output", 6)))
|
||||
string_list_append(s, name, attr);
|
||||
|
||||
if (name)
|
||||
|
||||
@@ -94,13 +94,11 @@ static OSStatus audio_write_cb(void *userdata,
|
||||
(void)bus_number;
|
||||
(void)number_frames;
|
||||
|
||||
if (!io_data)
|
||||
return noErr;
|
||||
if (io_data->mNumberBuffers != 1)
|
||||
if (!io_data || io_data->mNumberBuffers != 1)
|
||||
return noErr;
|
||||
|
||||
write_avail = io_data->mBuffers[0].mDataByteSize;
|
||||
outbuf = io_data->mBuffers[0].mData;
|
||||
outbuf = io_data->mBuffers[0].mData;
|
||||
|
||||
slock_lock(dev->lock);
|
||||
|
||||
@@ -261,7 +259,7 @@ static void *coreaudio_init(const char *device,
|
||||
choose_output_device(dev, device);
|
||||
#endif
|
||||
|
||||
dev->dev_alive = true;
|
||||
dev->dev_alive = true;
|
||||
|
||||
/* Set audio format */
|
||||
stream_desc.mSampleRate = rate;
|
||||
@@ -317,11 +315,11 @@ static void *coreaudio_init(const char *device,
|
||||
if (AudioUnitInitialize(dev->dev) != noErr)
|
||||
goto error;
|
||||
|
||||
fifo_size = (latency * (*new_rate)) / 1000;
|
||||
fifo_size *= 2 * sizeof(float);
|
||||
dev->buffer_size = fifo_size;
|
||||
fifo_size = (latency * (*new_rate)) / 1000;
|
||||
fifo_size *= 2 * sizeof(float);
|
||||
dev->buffer_size = fifo_size;
|
||||
|
||||
dev->buffer = fifo_new(fifo_size);
|
||||
dev->buffer = fifo_new(fifo_size);
|
||||
if (!dev->buffer)
|
||||
goto error;
|
||||
|
||||
@@ -339,8 +337,7 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static ssize_t coreaudio_write(void *data, const void *buf_, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t coreaudio_write(void *data, const void *buf_, size_t size)
|
||||
{
|
||||
coreaudio_t *dev = (coreaudio_t*)data;
|
||||
const uint8_t *buf = (const uint8_t*)buf_;
|
||||
|
||||
@@ -17,11 +17,10 @@
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <retro_timers.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
|
||||
#include "../../performance_counters.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool nonblocking;
|
||||
@@ -163,13 +162,11 @@ static void ctr_csnd_audio_free(void *data)
|
||||
free(ctr);
|
||||
}
|
||||
|
||||
static ssize_t ctr_csnd_audio_write(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t ctr_csnd_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
int i;
|
||||
uint32_t samples_played = 0;
|
||||
uint64_t current_tick = 0;
|
||||
static struct retro_perf_counter ctraudio_f = {0};
|
||||
const uint16_t *src = buf;
|
||||
ctr_csnd_audio_t *ctr = (ctr_csnd_audio_t*)data;
|
||||
|
||||
@@ -178,9 +175,6 @@ static ssize_t ctr_csnd_audio_write(void *data, const void *buf, size_t size,
|
||||
(void)samples_played;
|
||||
(void)current_tick;
|
||||
|
||||
performance_counter_init(ctraudio_f, "ctraudio_f");
|
||||
performance_counter_start_plus(is_perfcnt_enable, ctraudio_f);
|
||||
|
||||
ctr_csnd_audio_update_playpos(ctr);
|
||||
|
||||
if((((ctr->playpos - ctr->pos) & CTR_CSND_AUDIO_COUNT_MASK) < (CTR_CSND_AUDIO_COUNT >> 2)) ||
|
||||
@@ -211,8 +205,6 @@ static ssize_t ctr_csnd_audio_write(void *data, const void *buf, size_t size,
|
||||
GSPGPU_FlushDataCache(ctr->l, CTR_CSND_AUDIO_SIZE);
|
||||
GSPGPU_FlushDataCache(ctr->r, CTR_CSND_AUDIO_SIZE);
|
||||
|
||||
performance_counter_stop_plus(is_perfcnt_enable, ctraudio_f);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <malloc.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../performance_counters.h"
|
||||
#include "../../ctr/ctr_debug.h"
|
||||
|
||||
typedef struct
|
||||
@@ -93,11 +92,9 @@ static void ctr_dsp_audio_free(void *data)
|
||||
ndspExit();
|
||||
}
|
||||
|
||||
static ssize_t ctr_dsp_audio_write(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t ctr_dsp_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
u32 pos;
|
||||
static struct retro_perf_counter ctraudio_dsp_f = {0};
|
||||
ctr_dsp_audio_t * ctr = (ctr_dsp_audio_t*)data;
|
||||
uint32_t sample_pos = ndspChnGetSamplePos(ctr->channel);
|
||||
|
||||
@@ -117,9 +114,6 @@ static ssize_t ctr_dsp_audio_write(void *data, const void *buf, size_t size,
|
||||
}
|
||||
}
|
||||
|
||||
performance_counter_init(ctraudio_dsp_f, "ctraudio_dsp_f");
|
||||
performance_counter_start_plus(is_perfcnt_enable, ctraudio_dsp_f);
|
||||
|
||||
pos = ctr->pos << 2;
|
||||
|
||||
if((pos + size) > CTR_DSP_AUDIO_SIZE)
|
||||
@@ -141,8 +135,6 @@ static ssize_t ctr_dsp_audio_write(void *data, const void *buf, size_t size,
|
||||
ctr->pos += size >> 2;
|
||||
ctr->pos &= CTR_DSP_AUDIO_COUNT_MASK;
|
||||
|
||||
performance_counter_stop_plus(is_perfcnt_enable, ctraudio_dsp_f);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include <retro_inline.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <retro_timers.h>
|
||||
#include <rthreads/rthreads.h>
|
||||
#include <queues/fifo_queue.h>
|
||||
|
||||
@@ -426,8 +427,7 @@ static void dsound_set_nonblock_state(void *data, bool state)
|
||||
ds->nonblock = state;
|
||||
}
|
||||
|
||||
static ssize_t dsound_write(void *data, const void *buf_, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t dsound_write(void *data, const void *buf_, size_t size)
|
||||
{
|
||||
size_t written = 0;
|
||||
dsound_t *ds = (dsound_t*)data;
|
||||
|
||||
@@ -116,8 +116,7 @@ static INLINE void copy_swapped(uint32_t * restrict dst,
|
||||
}while(--size);
|
||||
}
|
||||
|
||||
static ssize_t gx_audio_write(void *data, const void *buf_, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t gx_audio_write(void *data, const void *buf_, size_t size)
|
||||
{
|
||||
size_t frames = size >> 2;
|
||||
const uint32_t *buf = buf_;
|
||||
|
||||
+13
-17
@@ -13,18 +13,16 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <jack/jack.h>
|
||||
#include <jack/types.h>
|
||||
#include <jack/ringbuffer.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_assert.h>
|
||||
#include <rthreads/rthreads.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
@@ -75,7 +73,6 @@ static int process_cb(jack_nframes_t nframes, void *data)
|
||||
jack_nframes_t f;
|
||||
jack_default_audio_sample_t *out = (jack_default_audio_sample_t*)jack_port_get_buffer(jd->ports[i], nframes);
|
||||
|
||||
retro_assert(out);
|
||||
jack_ringbuffer_read(jd->buffer[i], (char*)out, min_avail * sizeof(jack_default_audio_sample_t));
|
||||
|
||||
for (f = min_avail; f < nframes; f++)
|
||||
@@ -106,7 +103,7 @@ static int parse_ports(char **dest_ports, const char **jports)
|
||||
char *save = NULL;
|
||||
int parsed = 0;
|
||||
settings_t *settings = config_get_ptr();
|
||||
char *audio_device_cpy = strdup(settings->audio.device);
|
||||
char *audio_device_cpy = strdup(settings->arrays.audio_device);
|
||||
const char *con = strtok_r(audio_device_cpy, ",", &save);
|
||||
|
||||
if (con)
|
||||
@@ -136,12 +133,12 @@ static size_t find_buffersize(jack_t *jd, int latency, unsigned out_rate)
|
||||
jack_latency = range.max;
|
||||
}
|
||||
|
||||
RARCH_LOG("JACK: Jack latency is %d frames.\n", jack_latency);
|
||||
RARCH_LOG("[JACK]: Jack latency is %d frames.\n", jack_latency);
|
||||
|
||||
buffer_frames = frames - jack_latency;
|
||||
buffer_frames = frames - jack_latency;
|
||||
min_buffer_frames = jack_get_buffer_size(jd->client) * 2;
|
||||
|
||||
RARCH_LOG("JACK: Minimum buffer size is %d frames.\n", min_buffer_frames);
|
||||
RARCH_LOG("[JACK]: Minimum buffer size is %d frames.\n", min_buffer_frames);
|
||||
|
||||
if (buffer_frames < min_buffer_frames)
|
||||
buffer_frames = min_buffer_frames;
|
||||
@@ -181,27 +178,27 @@ static void *ja_init(const char *device, unsigned rate, unsigned latency,
|
||||
jd->ports[1] = jack_port_register(jd->client, "right", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
|
||||
if (jd->ports[0] == NULL || jd->ports[1] == NULL)
|
||||
{
|
||||
RARCH_ERR("Failed to register ports.\n");
|
||||
RARCH_ERR("[JACK]: Failed to register ports.\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
jports = jack_get_ports(jd->client, NULL, NULL, JackPortIsPhysical | JackPortIsInput);
|
||||
if (jports == NULL)
|
||||
{
|
||||
RARCH_ERR("Failed to get ports.\n");
|
||||
RARCH_ERR("[JACK]: Failed to get ports.\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
bufsize = find_buffersize(jd, latency, *new_rate);
|
||||
bufsize = find_buffersize(jd, latency, *new_rate);
|
||||
jd->buffer_size = bufsize;
|
||||
|
||||
RARCH_LOG("JACK: Internal buffer size: %d frames.\n", (int)(bufsize / sizeof(jack_default_audio_sample_t)));
|
||||
RARCH_LOG("[JACK]: Internal buffer size: %d frames.\n", (int)(bufsize / sizeof(jack_default_audio_sample_t)));
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
jd->buffer[i] = jack_ringbuffer_create(bufsize);
|
||||
if (jd->buffer[i] == NULL)
|
||||
{
|
||||
RARCH_ERR("Failed to create buffers.\n");
|
||||
RARCH_ERR("[JACK]: Failed to create buffers.\n");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
@@ -210,7 +207,7 @@ static void *ja_init(const char *device, unsigned rate, unsigned latency,
|
||||
|
||||
if (jack_activate(jd->client) < 0)
|
||||
{
|
||||
RARCH_ERR("Failed to activate Jack...\n");
|
||||
RARCH_ERR("[JACK]: Failed to activate Jack...\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -218,7 +215,7 @@ static void *ja_init(const char *device, unsigned rate, unsigned latency,
|
||||
{
|
||||
if (jack_connect(jd->client, jack_port_name(jd->ports[i]), dest_ports[i]))
|
||||
{
|
||||
RARCH_ERR("Failed to connect to Jack port.\n");
|
||||
RARCH_ERR("[JACK]: Failed to connect to Jack port.\n");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
@@ -292,8 +289,7 @@ static size_t write_buffer(jack_t *jd, const float *buf, size_t size)
|
||||
return written * sizeof(float) * 2;
|
||||
}
|
||||
|
||||
static ssize_t ja_write(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t ja_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
jack_t *jd = (jack_t*)data;
|
||||
|
||||
|
||||
@@ -35,8 +35,7 @@ static void null_audio_free(void *data)
|
||||
(void)data;
|
||||
}
|
||||
|
||||
static ssize_t null_audio_write(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t null_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
(void)data;
|
||||
(void)buf;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#endif
|
||||
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <retro_timers.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
@@ -173,8 +174,7 @@ static size_t al_fill_internal_buf(al_t *al, const void *buf, size_t size)
|
||||
return read_size;
|
||||
}
|
||||
|
||||
static ssize_t al_write(void *data, const void *buf_, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t al_write(void *data, const void *buf_, size_t size)
|
||||
{
|
||||
al_t *al = (al_t*)data;
|
||||
const uint8_t *buf = (const uint8_t*)buf_;
|
||||
|
||||
@@ -116,7 +116,7 @@ static void *sl_init(const char *device, unsigned rate, unsigned latency,
|
||||
if (!sl)
|
||||
goto error;
|
||||
|
||||
RARCH_LOG("[SLES]: Requested audio latency: %u ms.", latency);
|
||||
RARCH_LOG("[OpenSL]: Requested audio latency: %u ms.", latency);
|
||||
|
||||
GOTO_IF_FAIL(slCreateEngine(&sl->engine_object, 0, NULL, 0, NULL, NULL));
|
||||
GOTO_IF_FAIL(SLObjectItf_Realize(sl->engine_object, SL_BOOLEAN_FALSE));
|
||||
@@ -144,7 +144,7 @@ static void *sl_init(const char *device, unsigned rate, unsigned latency,
|
||||
for (i = 0; i < sl->buf_count; i++)
|
||||
sl->buffer[i] = sl->buffer_chunk + i * sl->buf_size;
|
||||
|
||||
RARCH_LOG("[SLES]: Setting audio latency: Block size = %u, Blocks = %u, Total = %u ...\n",
|
||||
RARCH_LOG("[OpenSL]: Setting audio latency: Block size = %u, Blocks = %u, Total = %u ...\n",
|
||||
sl->buf_size, sl->buf_count, sl->buf_size * sl->buf_count);
|
||||
|
||||
fmt_pcm.formatType = SL_DATAFORMAT_PCM;
|
||||
@@ -192,7 +192,7 @@ static void *sl_init(const char *device, unsigned rate, unsigned latency,
|
||||
return sl;
|
||||
|
||||
error:
|
||||
RARCH_ERR("Couldn't initialize OpenSL ES driver, error code: [%d].\n", (int)res);
|
||||
RARCH_ERR("[OpenSL]: Couldn't initialize OpenSL ES driver, error code: [%d].\n", (int)res);
|
||||
sl_free(sl);
|
||||
return NULL;
|
||||
}
|
||||
@@ -230,8 +230,7 @@ static bool sl_start(void *data, bool is_shutdown)
|
||||
}
|
||||
|
||||
|
||||
static ssize_t sl_write(void *data, const void *buf_, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t sl_write(void *data, const void *buf_, size_t size)
|
||||
{
|
||||
sl_t *sl = (sl_t*)data;
|
||||
size_t written = 0;
|
||||
|
||||
+9
-6
@@ -97,8 +97,7 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static ssize_t oss_write(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t oss_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
ssize_t ret;
|
||||
int *fd = (int*)data;
|
||||
@@ -121,7 +120,9 @@ static bool oss_stop(void *data)
|
||||
{
|
||||
int *fd = (int*)data;
|
||||
|
||||
ioctl(*fd, SNDCTL_DSP_RESET, 0);
|
||||
if (ioctl(*fd, SNDCTL_DSP_RESET, 0) < 0)
|
||||
return false;
|
||||
|
||||
oss_is_paused = true;
|
||||
return true;
|
||||
}
|
||||
@@ -156,7 +157,9 @@ static void oss_free(void *data)
|
||||
{
|
||||
int *fd = (int*)data;
|
||||
|
||||
ioctl(*fd, SNDCTL_DSP_RESET, 0);
|
||||
if (ioctl(*fd, SNDCTL_DSP_RESET, 0) < 0)
|
||||
return;
|
||||
|
||||
close(*fd);
|
||||
free(fd);
|
||||
}
|
||||
@@ -168,7 +171,7 @@ static size_t oss_write_avail(void *data)
|
||||
|
||||
if (ioctl(*fd, SNDCTL_DSP_GETOSPACE, &info) < 0)
|
||||
{
|
||||
RARCH_ERR("SNDCTL_DSP_GETOSPACE failed ...\n");
|
||||
RARCH_ERR("[OSS]: SNDCTL_DSP_GETOSPACE failed ...\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -182,7 +185,7 @@ static size_t oss_buffer_size(void *data)
|
||||
|
||||
if (ioctl(*fd, SNDCTL_DSP_GETOSPACE, &info) < 0)
|
||||
{
|
||||
RARCH_ERR("SNDCTL_DSP_GETOSPACE failed ...\n");
|
||||
RARCH_ERR("[OSS]: SNDCTL_DSP_GETOSPACE failed ...\n");
|
||||
return 1; /* Return something non-zero to avoid SIGFPE. */
|
||||
}
|
||||
|
||||
|
||||
@@ -146,8 +146,7 @@ static void *ps3_audio_init(const char *device,
|
||||
return data;
|
||||
}
|
||||
|
||||
static ssize_t ps3_audio_write(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t ps3_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
ps3_audio_t *aud = data;
|
||||
|
||||
|
||||
+21
-38
@@ -184,14 +184,12 @@ static void psp_audio_free(void *data)
|
||||
free(psp);
|
||||
}
|
||||
|
||||
static ssize_t psp_audio_write(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t psp_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
psp_audio_t* psp = (psp_audio_t*)data;
|
||||
uint16_t write_pos = psp->write_pos;
|
||||
uint16_t sampleCount = size / sizeof(uint32_t);
|
||||
|
||||
#ifdef VITA
|
||||
if (psp->nonblocking)
|
||||
{
|
||||
if (AUDIO_BUFFER_SIZE - ((uint16_t)
|
||||
@@ -199,12 +197,13 @@ static ssize_t psp_audio_write(void *data, const void *buf, size_t size,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef VITA
|
||||
while (AUDIO_BUFFER_SIZE - ((uint16_t)
|
||||
(psp->write_pos - psp->read_pos) & AUDIO_BUFFER_SIZE_MASK) < size){
|
||||
(psp->write_pos - psp->read_pos) & AUDIO_BUFFER_SIZE_MASK) < size)
|
||||
sceKernelWaitLwCond((struct SceKernelLwCondWork*)&psp->cond, 0);
|
||||
}
|
||||
|
||||
sceKernelLockLwMutex((struct SceKernelLwMutexWork*)&psp->lock, 1, 0);
|
||||
#endif
|
||||
|
||||
if((write_pos + sampleCount) > AUDIO_BUFFER_SIZE)
|
||||
{
|
||||
@@ -220,36 +219,13 @@ static ssize_t psp_audio_write(void *data, const void *buf, size_t size,
|
||||
write_pos += sampleCount;
|
||||
write_pos &= AUDIO_BUFFER_SIZE_MASK;
|
||||
psp->write_pos = write_pos;
|
||||
|
||||
#ifdef VITA
|
||||
sceKernelUnlockLwMutex((struct SceKernelLwMutexWork*)&psp->lock, 1);
|
||||
|
||||
return size;
|
||||
#else
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
if (psp->nonblocking)
|
||||
{
|
||||
/* TODO */
|
||||
}
|
||||
#endif
|
||||
|
||||
if((write_pos + sampleCount) > AUDIO_BUFFER_SIZE)
|
||||
{
|
||||
memcpy(psp->buffer + write_pos, buf,
|
||||
(AUDIO_BUFFER_SIZE - write_pos) * sizeof(uint32_t));
|
||||
memcpy(psp->buffer, (uint32_t*) buf +
|
||||
(AUDIO_BUFFER_SIZE - write_pos),
|
||||
(write_pos + sampleCount - AUDIO_BUFFER_SIZE) * sizeof(uint32_t));
|
||||
}
|
||||
else
|
||||
memcpy(psp->buffer + write_pos, buf, size);
|
||||
|
||||
write_pos += sampleCount;
|
||||
write_pos &= AUDIO_BUFFER_SIZE_MASK;
|
||||
psp->write_pos = write_pos;
|
||||
|
||||
return sampleCount;
|
||||
return sampleCount;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -268,6 +244,9 @@ static bool psp_audio_stop(void *data)
|
||||
SceUInt timeout = 100000;
|
||||
psp_audio_t* psp = (psp_audio_t*)data;
|
||||
|
||||
if(psp && !psp->running)
|
||||
return true;
|
||||
|
||||
info.size = sizeof(SceKernelThreadInfo);
|
||||
|
||||
if (sceKernelGetThreadInfo(
|
||||
@@ -290,6 +269,9 @@ static bool psp_audio_start(void *data, bool is_shutdown)
|
||||
{
|
||||
SceKernelThreadInfo info;
|
||||
psp_audio_t* psp = (psp_audio_t*)data;
|
||||
|
||||
if(psp && psp->running)
|
||||
return true;
|
||||
|
||||
info.size = sizeof(SceKernelThreadInfo);
|
||||
|
||||
@@ -322,20 +304,21 @@ static bool psp_audio_use_float(void *data)
|
||||
|
||||
static size_t psp_write_avail(void *data)
|
||||
{
|
||||
psp_audio_t* psp = (psp_audio_t*)data;
|
||||
#ifdef VITA
|
||||
size_t val;
|
||||
psp_audio_t* psp = (psp_audio_t*)data;
|
||||
|
||||
#ifdef VITA
|
||||
sceKernelLockLwMutex((struct SceKernelLwMutexWork*)&psp->lock, 1, 0);
|
||||
#endif
|
||||
|
||||
val = AUDIO_BUFFER_SIZE - ((uint16_t)
|
||||
(psp->write_pos - psp->read_pos) & AUDIO_BUFFER_SIZE_MASK);
|
||||
|
||||
#ifdef VITA
|
||||
sceKernelUnlockLwMutex((struct SceKernelLwMutexWork*)&psp->lock, 1);
|
||||
return val;
|
||||
#else
|
||||
/* TODO */
|
||||
return AUDIO_BUFFER_SIZE - ((uint16_t)
|
||||
(psp->write_pos - psp->read_pos) & AUDIO_BUFFER_SIZE_MASK);
|
||||
#endif
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
static size_t psp_buffer_size(void *data)
|
||||
|
||||
@@ -236,8 +236,7 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static ssize_t pulse_write(void *data, const void *buf_, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t pulse_write(void *data, const void *buf_, size_t size)
|
||||
{
|
||||
pa_t *pa = (pa_t*)data;
|
||||
const uint8_t *buf = (const uint8_t*)buf_;
|
||||
|
||||
@@ -58,8 +58,7 @@ static void *ra_init(const char *device, unsigned rate, unsigned latency,
|
||||
return roar;
|
||||
}
|
||||
|
||||
static ssize_t ra_write(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t ra_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
int err;
|
||||
size_t written = 0;
|
||||
|
||||
@@ -102,8 +102,7 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static ssize_t rs_write(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t rs_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
rsd_t *rsd = (rsd_t*)data;
|
||||
|
||||
|
||||
@@ -51,8 +51,7 @@ static void *rwebaudio_init(const char *device, unsigned rate, unsigned latency,
|
||||
return data;
|
||||
}
|
||||
|
||||
static ssize_t rwebaudio_write(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t rwebaudio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
(void)data;
|
||||
return RWebAudioWrite(buf, size);
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <rthreads/rthreads.h>
|
||||
#include <queues/fifo_queue.h>
|
||||
#include <retro_inline.h>
|
||||
#include <retro_math.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
@@ -96,7 +97,7 @@ static void *sdl_audio_init(const char *device,
|
||||
* carry approximately half of the latency.
|
||||
*
|
||||
* SDL double buffers audio and we do as well. */
|
||||
frames = find_num_frames(rate, latency / 4);
|
||||
frames = find_num_frames(rate, latency / 4);
|
||||
|
||||
spec.freq = rate;
|
||||
spec.format = AUDIO_S16SYS;
|
||||
@@ -107,9 +108,8 @@ static void *sdl_audio_init(const char *device,
|
||||
|
||||
if (SDL_OpenAudio(&spec, &out) < 0)
|
||||
{
|
||||
RARCH_ERR("Failed to open SDL audio: %s\n", SDL_GetError());
|
||||
free(sdl);
|
||||
return 0;
|
||||
RARCH_ERR("[SDL audio]: Failed to open SDL audio: %s\n", SDL_GetError());
|
||||
goto error;
|
||||
}
|
||||
|
||||
*new_rate = out.freq;
|
||||
@@ -119,7 +119,7 @@ static void *sdl_audio_init(const char *device,
|
||||
sdl->cond = scond_new();
|
||||
#endif
|
||||
|
||||
RARCH_LOG("SDL audio: Requested %u ms latency, got %d ms\n",
|
||||
RARCH_LOG("[SDL audio]: Requested %u ms latency, got %d ms\n",
|
||||
latency, (int)(out.samples * 4 * 1000 / (*new_rate)));
|
||||
|
||||
/* Create a buffer twice as big as needed and prefill the buffer. */
|
||||
@@ -135,12 +135,15 @@ static void *sdl_audio_init(const char *device,
|
||||
|
||||
SDL_PauseAudio(0);
|
||||
return sdl;
|
||||
|
||||
error:
|
||||
free(sdl);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static ssize_t sdl_audio_write(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t sdl_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
ssize_t ret = 0;
|
||||
ssize_t ret = 0;
|
||||
sdl_audio_t *sdl = (sdl_audio_t*)data;
|
||||
|
||||
if (sdl->nonblock)
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,993 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef _WIN32_WINNT
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
#include <windows.h>
|
||||
#include <winerror.h>
|
||||
#include <initguid.h>
|
||||
#include <mmdeviceapi.h>
|
||||
#include <mmreg.h>
|
||||
#include <audioclient.h>
|
||||
#include <propidl.h>
|
||||
|
||||
#include <lists/string_list.h>
|
||||
#include <queues/fifo_queue.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../configuration.h"
|
||||
|
||||
DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14); /* DEVPROP_TYPE_STRING */
|
||||
|
||||
|
||||
#define WASAPI_WARN(bool_exp, err_str, warn_exp)\
|
||||
if (!(bool_exp)) {\
|
||||
wasapi_warn(err_str);\
|
||||
warn_exp; }
|
||||
|
||||
#define WASAPI_CHECK(bool_exp, err_str, err_exp)\
|
||||
if (!(bool_exp)) {\
|
||||
wasapi_err(err_str);\
|
||||
err_exp; }
|
||||
|
||||
#define WASAPI_HR_CHECK(hr, fun_str, err_exp)\
|
||||
if (FAILED(hr)) {\
|
||||
wasapi_com_err(fun_str, hr);\
|
||||
err_exp; }
|
||||
|
||||
#define WASAPI_HR_WARN(hr, fun_str, warn_exp)\
|
||||
if (FAILED(hr)) {\
|
||||
wasapi_com_warn(fun_str, hr);\
|
||||
warn_exp; }
|
||||
|
||||
#define WASAPI_SR_CHECK(bool_exp, fun_str, err_exp)\
|
||||
if (!(bool_exp)) {\
|
||||
wasapi_sys_err(fun_str);\
|
||||
err_exp; }
|
||||
|
||||
#define WASAPI_RELEASE(iface)\
|
||||
if(iface) {\
|
||||
iface->lpVtbl->Release(iface);\
|
||||
iface = NULL; }\
|
||||
|
||||
#define WASAPI_FREE(ptr)\
|
||||
if(ptr) {\
|
||||
free(ptr);\
|
||||
ptr = NULL; }\
|
||||
|
||||
#define WASAPI_CO_FREE(ptr)\
|
||||
if(ptr) {\
|
||||
CoTaskMemFree(ptr);\
|
||||
ptr = NULL; }\
|
||||
|
||||
typedef struct
|
||||
{
|
||||
IMMDevice *device;
|
||||
IAudioClient *client;
|
||||
IAudioRenderClient *renderer;
|
||||
HANDLE write_event;
|
||||
fifo_buffer_t *buffer; /* NULL in unbuffered shared mode */
|
||||
size_t frame_size; /* 4 or 8 only */
|
||||
size_t engine_buffer_size;
|
||||
bool exclusive;
|
||||
bool blocking;
|
||||
bool running;
|
||||
} wasapi_t;
|
||||
|
||||
static void wasapi_log(const char *msg)
|
||||
{
|
||||
RARCH_LOG("[WASAPI]: %s.\n", msg);
|
||||
}
|
||||
|
||||
static void wasapi_warn(const char *warn)
|
||||
{
|
||||
RARCH_WARN("[WASAPI]: %s.\n", warn);
|
||||
}
|
||||
|
||||
static void wasapi_err(const char *err)
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: %s.\n", err);
|
||||
}
|
||||
|
||||
static void wasapi_com_warn(const char *fun, HRESULT hr)
|
||||
{
|
||||
RARCH_WARN("[WASAPI]: %s failed with error 0x%.8X.\n", fun, hr);
|
||||
}
|
||||
|
||||
static void wasapi_com_err(const char *fun, HRESULT hr)
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: %s failed with error 0x%.8X.\n", fun, hr);
|
||||
}
|
||||
|
||||
static void wasapi_sys_err(const char *fun)
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: %s failed with error %d.\n", fun, GetLastError());
|
||||
}
|
||||
|
||||
static bool wasapi_check_device_id(IMMDevice *device, const char *id)
|
||||
{
|
||||
HRESULT hr;
|
||||
bool result = false;
|
||||
LPWSTR dev_id = NULL, dev_cmp_id = NULL;
|
||||
int id_length = MultiByteToWideChar(CP_ACP, 0, id, -1, NULL, 0);
|
||||
|
||||
WASAPI_SR_CHECK(id_length > 0, "MultiByteToWideChar", goto error);
|
||||
|
||||
dev_cmp_id = (LPWSTR)malloc(id_length * sizeof(WCHAR));
|
||||
WASAPI_CHECK(dev_cmp_id, "Out of memory", goto error);
|
||||
|
||||
id_length = MultiByteToWideChar(CP_ACP, 0, id, -1, dev_cmp_id, id_length);
|
||||
WASAPI_SR_CHECK(id_length > 0, "MultiByteToWideChar", goto error);
|
||||
|
||||
hr = device->lpVtbl->GetId(device, &dev_id);
|
||||
WASAPI_HR_CHECK(hr, "IMMDevice::GetId", goto error);
|
||||
|
||||
result = lstrcmpW(dev_cmp_id, dev_id) == 0 ? true : false;
|
||||
|
||||
WASAPI_CO_FREE(dev_id);
|
||||
WASAPI_FREE(dev_cmp_id);
|
||||
|
||||
return result;
|
||||
|
||||
error:
|
||||
WASAPI_CO_FREE(dev_id);
|
||||
WASAPI_FREE(dev_cmp_id);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static IMMDevice *wasapi_init_device(const char *id)
|
||||
{
|
||||
HRESULT hr;
|
||||
UINT32 dev_count, i;
|
||||
IMMDeviceEnumerator *enumerator = NULL;
|
||||
IMMDevice *device = NULL;
|
||||
IMMDeviceCollection *collection = NULL;
|
||||
|
||||
if (id)
|
||||
RARCH_LOG("[WASAPI]: Initializing device %s ...\n", id);
|
||||
else
|
||||
wasapi_log("Initializing default device ..");
|
||||
|
||||
hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL,
|
||||
&IID_IMMDeviceEnumerator, (void **)&enumerator);
|
||||
WASAPI_HR_CHECK(hr, "CoCreateInstance", goto error);
|
||||
|
||||
if (id)
|
||||
{
|
||||
hr = enumerator->lpVtbl->EnumAudioEndpoints(enumerator,
|
||||
eRender, DEVICE_STATE_ACTIVE, &collection);
|
||||
WASAPI_HR_CHECK(hr, "IMMDeviceEnumerator::EnumAudioEndpoints",
|
||||
goto error);
|
||||
|
||||
hr = collection->lpVtbl->GetCount(collection, &dev_count);
|
||||
WASAPI_HR_CHECK(hr, "IMMDeviceCollection::GetCount", goto error);
|
||||
|
||||
for (i = 0; i < dev_count; ++i)
|
||||
{
|
||||
hr = collection->lpVtbl->Item(collection, i, &device);
|
||||
WASAPI_HR_CHECK(hr, "IMMDeviceCollection::Item", continue);
|
||||
|
||||
if (wasapi_check_device_id(device, id))
|
||||
break;
|
||||
|
||||
WASAPI_RELEASE(device);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hr = enumerator->lpVtbl->GetDefaultAudioEndpoint(enumerator,
|
||||
eRender, eConsole, &device);
|
||||
WASAPI_HR_CHECK(hr, "IMMDeviceEnumerator::GetDefaultAudioEndpoint",
|
||||
goto error);
|
||||
}
|
||||
|
||||
if (!device)
|
||||
goto error;
|
||||
|
||||
WASAPI_RELEASE(collection);
|
||||
WASAPI_RELEASE(enumerator);
|
||||
|
||||
wasapi_log("Device initialized");
|
||||
|
||||
return device;
|
||||
|
||||
error:
|
||||
WASAPI_RELEASE(collection);
|
||||
WASAPI_RELEASE(enumerator);
|
||||
|
||||
if (id)
|
||||
wasapi_warn("Failed to initialize device");
|
||||
else
|
||||
wasapi_err("Failed to initialize device");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static unsigned wasapi_pref_rate(unsigned i)
|
||||
{
|
||||
const unsigned r[] = { 48000, 44100, 96000, 192000 };
|
||||
|
||||
if (i >= sizeof(r) / sizeof(unsigned))
|
||||
return 0;
|
||||
|
||||
return r[i];
|
||||
}
|
||||
|
||||
static void wasapi_set_format(WAVEFORMATEXTENSIBLE *wf,
|
||||
bool float_fmt, unsigned rate)
|
||||
{
|
||||
wf->Format.nChannels = 2;
|
||||
wf->Format.nSamplesPerSec = rate;
|
||||
|
||||
if (float_fmt)
|
||||
{
|
||||
wf->Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
|
||||
wf->Format.nAvgBytesPerSec = rate * 8;
|
||||
wf->Format.nBlockAlign = 8;
|
||||
wf->Format.wBitsPerSample = 32;
|
||||
wf->Format.cbSize = sizeof(WORD) + sizeof(DWORD) + sizeof(GUID);
|
||||
wf->Samples.wValidBitsPerSample = 32;
|
||||
wf->dwChannelMask = KSAUDIO_SPEAKER_STEREO;
|
||||
wf->SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
|
||||
}
|
||||
else
|
||||
{
|
||||
wf->Format.wFormatTag = WAVE_FORMAT_PCM;
|
||||
wf->Format.nAvgBytesPerSec = rate * 4;
|
||||
wf->Format.nBlockAlign = 4;
|
||||
wf->Format.wBitsPerSample = 16;
|
||||
wf->Format.cbSize = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static IAudioClient *wasapi_init_client_sh(IMMDevice *device,
|
||||
bool *float_fmt, unsigned *rate, unsigned latency)
|
||||
{
|
||||
WAVEFORMATEXTENSIBLE wf;
|
||||
int i, j;
|
||||
IAudioClient *client = NULL;
|
||||
bool float_fmt_res = *float_fmt;
|
||||
unsigned rate_res = *rate;
|
||||
HRESULT hr = device->lpVtbl->Activate(device, &IID_IAudioClient,
|
||||
CLSCTX_ALL, NULL, (void**)&client);
|
||||
WASAPI_HR_CHECK(hr, "IMMDevice::Activate", return NULL);
|
||||
|
||||
/* once for float, once for pcm (requested first) */
|
||||
for (i = 0; i < 2; ++i)
|
||||
{
|
||||
rate_res = *rate;
|
||||
if (i == 1)
|
||||
float_fmt_res = !float_fmt_res;
|
||||
|
||||
/* for requested rate (first) and all preferred rates */
|
||||
for (j = 0; rate_res; ++j)
|
||||
{
|
||||
RARCH_LOG("[WASAPI]: Initializing client (shared, %s, %uHz, %ums) ...\n",
|
||||
float_fmt_res ? "float" : "pcm", rate_res, latency);
|
||||
|
||||
wasapi_set_format(&wf, float_fmt_res, rate_res);
|
||||
hr = client->lpVtbl->Initialize(client, AUDCLNT_SHAREMODE_SHARED,
|
||||
AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST,
|
||||
0, 0, (WAVEFORMATEX*)&wf, NULL);
|
||||
if (hr == AUDCLNT_E_ALREADY_INITIALIZED)
|
||||
{
|
||||
client->lpVtbl->Release(client);
|
||||
hr = device->lpVtbl->Activate(device, &IID_IAudioClient,
|
||||
CLSCTX_ALL, NULL, (void**)&client);
|
||||
WASAPI_HR_CHECK(hr, "IMMDevice::Activate", return NULL);
|
||||
|
||||
hr = client->lpVtbl->Initialize(client, AUDCLNT_SHAREMODE_SHARED,
|
||||
AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST,
|
||||
0, 0, (WAVEFORMATEX*)&wf, NULL);
|
||||
}
|
||||
if (hr != AUDCLNT_E_UNSUPPORTED_FORMAT)
|
||||
{
|
||||
i = 2; /* break from outer loop too */
|
||||
break;
|
||||
}
|
||||
|
||||
wasapi_warn("Unsupported format");
|
||||
rate_res = wasapi_pref_rate(j);
|
||||
if (rate_res == *rate) /* requested rate is allready tested */
|
||||
rate_res = wasapi_pref_rate(++j); /* skip it */
|
||||
}
|
||||
}
|
||||
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::Initialize", goto error);
|
||||
|
||||
*float_fmt = float_fmt_res;
|
||||
*rate = rate_res;
|
||||
|
||||
return client;
|
||||
|
||||
error:
|
||||
WASAPI_RELEASE(client);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static IAudioClient *wasapi_init_client_ex(IMMDevice *device,
|
||||
bool *float_fmt, unsigned *rate, unsigned latency)
|
||||
{
|
||||
WAVEFORMATEXTENSIBLE wf;
|
||||
int i, j;
|
||||
IAudioClient *client = NULL;
|
||||
bool float_fmt_res = *float_fmt;
|
||||
unsigned rate_res = *rate;
|
||||
REFERENCE_TIME minimum_period = 0;
|
||||
REFERENCE_TIME buffer_duration = 0;
|
||||
UINT32 buffer_length = 0;
|
||||
HRESULT hr = device->lpVtbl->Activate(
|
||||
device, &IID_IAudioClient,
|
||||
CLSCTX_ALL, NULL, (void**)&client);
|
||||
WASAPI_HR_CHECK(hr, "IMMDevice::Activate", return NULL);
|
||||
|
||||
hr = client->lpVtbl->GetDevicePeriod(client, NULL, &minimum_period);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::GetDevicePeriod", goto error);
|
||||
|
||||
/* buffer_duration is in 100ns units */
|
||||
buffer_duration = latency * 10000.0;
|
||||
if (buffer_duration < minimum_period)
|
||||
buffer_duration = minimum_period;
|
||||
|
||||
/* once for float, once for pcm (requested first) */
|
||||
for (i = 0; i < 2; ++i)
|
||||
{
|
||||
rate_res = *rate;
|
||||
if (i == 1)
|
||||
float_fmt_res = !float_fmt_res;
|
||||
|
||||
/* for requested rate (first) and all preferred rates */
|
||||
for (j = 0; rate_res; ++j)
|
||||
{
|
||||
RARCH_LOG("[WASAPI]: Initializing client (exclusive, %s, %uHz, %ums) ...\n",
|
||||
float_fmt_res ? "float" : "pcm", rate_res, latency);
|
||||
|
||||
wasapi_set_format(&wf, float_fmt_res, rate_res);
|
||||
hr = client->lpVtbl->Initialize(client, AUDCLNT_SHAREMODE_EXCLUSIVE,
|
||||
AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST,
|
||||
buffer_duration, buffer_duration, (WAVEFORMATEX*)&wf, NULL);
|
||||
if (hr == AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED)
|
||||
{
|
||||
hr = client->lpVtbl->GetBufferSize(client, &buffer_length);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::GetBufferSize", goto error);
|
||||
|
||||
client->lpVtbl->Release(client);
|
||||
hr = device->lpVtbl->Activate(device, &IID_IAudioClient,
|
||||
CLSCTX_ALL, NULL, (void**)&client);
|
||||
WASAPI_HR_CHECK(hr, "IMMDevice::Activate", return NULL);
|
||||
|
||||
buffer_duration = 10000.0 * 1000.0 / rate_res * buffer_length + 0.5;
|
||||
hr = client->lpVtbl->Initialize(client, AUDCLNT_SHAREMODE_EXCLUSIVE,
|
||||
AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST,
|
||||
buffer_duration, buffer_duration, (WAVEFORMATEX*)&wf, NULL);
|
||||
}
|
||||
if (hr == AUDCLNT_E_ALREADY_INITIALIZED)
|
||||
{
|
||||
client->lpVtbl->Release(client);
|
||||
hr = device->lpVtbl->Activate(device, &IID_IAudioClient,
|
||||
CLSCTX_ALL, NULL, (void**)&client);
|
||||
WASAPI_HR_CHECK(hr, "IMMDevice::Activate", return NULL);
|
||||
|
||||
hr = client->lpVtbl->Initialize(client, AUDCLNT_SHAREMODE_EXCLUSIVE,
|
||||
AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST,
|
||||
buffer_duration, buffer_duration, (WAVEFORMATEX*)&wf, NULL);
|
||||
}
|
||||
if (hr != AUDCLNT_E_UNSUPPORTED_FORMAT)
|
||||
{
|
||||
WASAPI_WARN(hr != AUDCLNT_E_DEVICE_IN_USE,
|
||||
"Device already in use", goto error);
|
||||
|
||||
WASAPI_WARN(hr != AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED,
|
||||
"Exclusive mode disabled", goto error);
|
||||
|
||||
i = 2; /* break from outer loop too */
|
||||
break;
|
||||
}
|
||||
|
||||
wasapi_warn("Unsupported format");
|
||||
rate_res = wasapi_pref_rate(j);
|
||||
if (rate_res == *rate) /* requested rate is allready tested */
|
||||
rate_res = wasapi_pref_rate(++j); /* skip it */
|
||||
}
|
||||
}
|
||||
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::Initialize", goto error);
|
||||
|
||||
*float_fmt = float_fmt_res;
|
||||
*rate = rate_res;
|
||||
|
||||
return client;
|
||||
|
||||
error:
|
||||
WASAPI_RELEASE(client);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static IAudioClient *wasapi_init_client(IMMDevice *device, bool *exclusive,
|
||||
bool *float_fmt, unsigned *rate, unsigned latency)
|
||||
{
|
||||
HRESULT hr;
|
||||
IAudioClient *client;
|
||||
double latency_res;
|
||||
REFERENCE_TIME device_period = 0;
|
||||
REFERENCE_TIME stream_latency = 0;
|
||||
UINT32 buffer_length = 0;
|
||||
|
||||
if (*exclusive)
|
||||
{
|
||||
client = wasapi_init_client_ex(device, float_fmt, rate, latency);
|
||||
if (!client)
|
||||
{
|
||||
client = wasapi_init_client_sh(device, float_fmt, rate, latency);
|
||||
if (client)
|
||||
*exclusive = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
client = wasapi_init_client_sh(device, float_fmt, rate, latency);
|
||||
if (!client)
|
||||
{
|
||||
client = wasapi_init_client_ex(device, float_fmt, rate, latency);
|
||||
if (client)
|
||||
*exclusive = true;
|
||||
}
|
||||
}
|
||||
|
||||
WASAPI_CHECK(client, "Failed to initialize client", return NULL);
|
||||
|
||||
/* next calls are allowed to fail (we losing info only) */
|
||||
|
||||
if (*exclusive)
|
||||
hr = client->lpVtbl->GetDevicePeriod(client, NULL, &device_period);
|
||||
else
|
||||
hr = client->lpVtbl->GetDevicePeriod(client, &device_period, NULL);
|
||||
if (FAILED(hr))
|
||||
wasapi_com_warn("IAudioClient::GetDevicePeriod", hr);
|
||||
|
||||
if (!*exclusive)
|
||||
{
|
||||
hr = client->lpVtbl->GetStreamLatency(client, &stream_latency);
|
||||
if (FAILED(hr))
|
||||
wasapi_com_warn("IAudioClient::GetStreamLatency", hr);
|
||||
}
|
||||
|
||||
hr = client->lpVtbl->GetBufferSize(client, &buffer_length);
|
||||
if (FAILED(hr))
|
||||
wasapi_com_warn("IAudioClient::GetBufferSize", hr);
|
||||
|
||||
if (*exclusive)
|
||||
latency_res = (double)buffer_length * 1000.0 / (*rate);
|
||||
else
|
||||
latency_res = (double)(stream_latency + device_period) / 10000.0;
|
||||
|
||||
RARCH_LOG("[WASAPI]: Client initialized (%s, %s, %uHz, %.1fms).\n",
|
||||
*exclusive ? "exclusive" : "shared",
|
||||
*float_fmt ? "float" : "pcm", *rate, latency_res);
|
||||
|
||||
RARCH_LOG("[WASAPI]: Client's buffer length is %u frames (%.1fms).\n",
|
||||
buffer_length, (double)buffer_length * 1000.0 / (*rate));
|
||||
|
||||
RARCH_LOG("[WASAPI]: Device period is %.1fms (%lld frames).\n",
|
||||
(double)device_period / 10000.0, device_period * (*rate) / 10000000);
|
||||
|
||||
return client;
|
||||
}
|
||||
|
||||
static void *wasapi_init(const char *dev_id, unsigned rate, unsigned latency,
|
||||
unsigned u1, unsigned *u2)
|
||||
{
|
||||
HRESULT hr;
|
||||
bool com_initialized = false;
|
||||
UINT32 frame_count = 0;
|
||||
REFERENCE_TIME dev_period = 0;
|
||||
BYTE *dest = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool float_format = settings->bools.audio_wasapi_float_format;
|
||||
int sh_buffer_length = settings->ints.audio_wasapi_sh_buffer_length;
|
||||
wasapi_t *w = (wasapi_t*)calloc(1, sizeof(wasapi_t));
|
||||
w->exclusive = settings->bools.audio_wasapi_exclusive_mode;
|
||||
|
||||
WASAPI_CHECK(w, "Out of memory", return NULL);
|
||||
|
||||
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
WASAPI_HR_CHECK(hr, "CoInitializeEx", goto error);
|
||||
|
||||
com_initialized = true;
|
||||
|
||||
w->device = wasapi_init_device(dev_id);
|
||||
if (!w->device && dev_id)
|
||||
w->device = wasapi_init_device(NULL);
|
||||
if (!w->device)
|
||||
goto error;
|
||||
|
||||
w->client = wasapi_init_client(w->device,
|
||||
&w->exclusive, &float_format, &rate, latency);
|
||||
if (!w->client)
|
||||
goto error;
|
||||
|
||||
hr = w->client->lpVtbl->GetBufferSize(w->client, &frame_count);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::GetBufferSize", goto error);
|
||||
|
||||
w->frame_size = float_format ? 8 : 4;
|
||||
w->engine_buffer_size = frame_count * w->frame_size;
|
||||
if (w->exclusive)
|
||||
{
|
||||
w->buffer = fifo_new(w->engine_buffer_size);
|
||||
WASAPI_CHECK(w->buffer, "Out of memory", goto error);
|
||||
|
||||
RARCH_LOG("[WASAPI]: Intermediate buffer length is %u frames (%.1fms).\n",
|
||||
frame_count, (double)frame_count * 1000.0 / rate);
|
||||
}
|
||||
else if (sh_buffer_length)
|
||||
{
|
||||
if (sh_buffer_length < 0)
|
||||
{
|
||||
hr = w->client->lpVtbl->GetDevicePeriod(w->client, &dev_period, NULL);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::GetDevicePeriod", goto error);
|
||||
|
||||
sh_buffer_length = dev_period * rate / 10000000;
|
||||
}
|
||||
|
||||
w->buffer = fifo_new(sh_buffer_length * w->frame_size);
|
||||
WASAPI_CHECK(w->buffer, "Out of memory", goto error);
|
||||
|
||||
RARCH_LOG("[WASAPI]: Intermediate buffer length is %u frames (%.1fms).\n",
|
||||
sh_buffer_length, (double)sh_buffer_length * 1000.0 / rate);
|
||||
}
|
||||
else
|
||||
wasapi_log("Intermediate buffer is off");
|
||||
|
||||
w->write_event = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
WASAPI_SR_CHECK(w->write_event, "CreateEventA", goto error);
|
||||
|
||||
hr = w->client->lpVtbl->SetEventHandle(w->client, w->write_event);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::SetEventHandle", goto error);
|
||||
|
||||
hr = w->client->lpVtbl->GetService(w->client,
|
||||
&IID_IAudioRenderClient, (void**)&w->renderer);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::GetService", goto error);
|
||||
|
||||
hr = w->renderer->lpVtbl->GetBuffer(w->renderer, frame_count, &dest);
|
||||
WASAPI_HR_CHECK(hr, "IAudioRenderClient::GetBuffer", goto error);
|
||||
|
||||
hr = w->renderer->lpVtbl->ReleaseBuffer(w->renderer, frame_count,
|
||||
AUDCLNT_BUFFERFLAGS_SILENT);
|
||||
WASAPI_HR_CHECK(hr, "IAudioRenderClient::ReleaseBuffer", goto error);
|
||||
|
||||
hr = w->client->lpVtbl->Start(w->client);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::Start", goto error);
|
||||
w->running = true;
|
||||
w->blocking = settings->bools.audio_sync;
|
||||
|
||||
return w;
|
||||
|
||||
error:
|
||||
WASAPI_RELEASE(w->renderer);
|
||||
WASAPI_RELEASE(w->client);
|
||||
WASAPI_RELEASE(w->device);
|
||||
if (w->write_event)
|
||||
CloseHandle(w->write_event);
|
||||
if (w->buffer)
|
||||
fifo_free(w->buffer);
|
||||
free(w);
|
||||
if (com_initialized)
|
||||
CoUninitialize();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static bool wasapi_flush(wasapi_t * w, const void * data, size_t size)
|
||||
{
|
||||
BYTE *dest = NULL;
|
||||
UINT32 frame_count = size / w->frame_size;
|
||||
HRESULT hr = w->renderer->lpVtbl->GetBuffer(w->renderer, frame_count, &dest);
|
||||
|
||||
WASAPI_HR_CHECK(hr, "IAudioRenderClient::GetBuffer", return false)
|
||||
|
||||
memcpy(dest, data, size);
|
||||
hr = w->renderer->lpVtbl->ReleaseBuffer(w->renderer, frame_count, 0);
|
||||
|
||||
WASAPI_HR_CHECK(hr, "IAudioRenderClient::ReleaseBuffer", return false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool wasapi_flush_buffer(wasapi_t * w, size_t size)
|
||||
{
|
||||
BYTE *dest = NULL;
|
||||
UINT32 frame_count = size / w->frame_size;
|
||||
HRESULT hr = w->renderer->lpVtbl->GetBuffer(w->renderer, frame_count, &dest);
|
||||
|
||||
WASAPI_HR_CHECK(hr, "IAudioRenderClient::GetBuffer", return false)
|
||||
|
||||
fifo_read(w->buffer, dest, size);
|
||||
hr = w->renderer->lpVtbl->ReleaseBuffer(w->renderer, frame_count, 0);
|
||||
|
||||
WASAPI_HR_CHECK(hr, "IAudioRenderClient::ReleaseBuffer", return false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static ssize_t wasapi_write_sh(wasapi_t *w, const void * data, size_t size)
|
||||
{
|
||||
DWORD ir;
|
||||
size_t read_avail;
|
||||
size_t write_avail;
|
||||
HRESULT hr;
|
||||
bool br;
|
||||
ssize_t writen = -1;
|
||||
UINT32 padding = 0;
|
||||
|
||||
if (w->buffer)
|
||||
{
|
||||
write_avail = fifo_write_avail(w->buffer);
|
||||
if (!write_avail)
|
||||
{
|
||||
if (w->blocking)
|
||||
{
|
||||
ir = WaitForSingleObject(w->write_event, INFINITE);
|
||||
WASAPI_SR_CHECK(ir == WAIT_OBJECT_0, "WaitForSingleObject", return -1);
|
||||
}
|
||||
|
||||
hr = w->client->lpVtbl->GetCurrentPadding(w->client, &padding);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::GetCurrentPadding", return -1);
|
||||
|
||||
read_avail = fifo_read_avail(w->buffer);
|
||||
write_avail = w->engine_buffer_size - padding * w->frame_size;
|
||||
writen = read_avail < write_avail ? read_avail : write_avail;
|
||||
if (writen)
|
||||
{
|
||||
br = wasapi_flush_buffer(w, writen);
|
||||
if (!br)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
write_avail = fifo_write_avail(w->buffer);
|
||||
writen = size < write_avail ? size : write_avail;
|
||||
if (writen)
|
||||
fifo_write(w->buffer, data, writen);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (w->blocking)
|
||||
{
|
||||
ir = WaitForSingleObject(w->write_event, INFINITE);
|
||||
WASAPI_SR_CHECK(ir == WAIT_OBJECT_0, "WaitForSingleObject", return -1);
|
||||
}
|
||||
|
||||
hr = w->client->lpVtbl->GetCurrentPadding(w->client, &padding);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::GetCurrentPadding", return -1);
|
||||
|
||||
write_avail = w->engine_buffer_size - padding * w->frame_size;
|
||||
if (!write_avail)
|
||||
return 0;
|
||||
|
||||
writen = size < write_avail ? size : write_avail;
|
||||
if (writen)
|
||||
{
|
||||
br = wasapi_flush(w, data, writen);
|
||||
if (!br)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return writen;
|
||||
}
|
||||
|
||||
static ssize_t wasapi_write_ex(wasapi_t *w, const void * data, size_t size)
|
||||
{
|
||||
DWORD ir;
|
||||
size_t write_avail;
|
||||
bool br = false;
|
||||
ssize_t writen = 0;
|
||||
|
||||
write_avail = fifo_write_avail(w->buffer);
|
||||
if (!write_avail)
|
||||
{
|
||||
ir = WaitForSingleObject(w->write_event, w->blocking ? INFINITE : 0);
|
||||
if (ir != WAIT_OBJECT_0 && w->blocking)
|
||||
{
|
||||
wasapi_sys_err("WaitForSingleObject");
|
||||
return -1;
|
||||
}
|
||||
if (ir != WAIT_OBJECT_0)
|
||||
return 0;
|
||||
|
||||
br = wasapi_flush_buffer(w, w->engine_buffer_size);
|
||||
if (!br)
|
||||
return -1;
|
||||
|
||||
write_avail = w->engine_buffer_size;
|
||||
}
|
||||
|
||||
writen = size < write_avail ? size : write_avail;
|
||||
fifo_write(w->buffer, data, writen);
|
||||
|
||||
return writen;
|
||||
}
|
||||
|
||||
static ssize_t wasapi_write(void *wh, const void *data, size_t size)
|
||||
{
|
||||
size_t writen;
|
||||
ssize_t ir;
|
||||
wasapi_t *w = (wasapi_t*)wh;
|
||||
|
||||
if (w->blocking)
|
||||
{
|
||||
for (writen = 0, ir = -1; writen < size; writen += ir)
|
||||
{
|
||||
if (w->exclusive)
|
||||
ir = wasapi_write_ex(w, data + writen, size - writen);
|
||||
else
|
||||
ir = wasapi_write_sh(w, data + writen, size - writen);
|
||||
if (ir == -1)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (w->exclusive)
|
||||
writen = wasapi_write_ex(w, data, size);
|
||||
else
|
||||
writen = wasapi_write_sh(w, data, size);
|
||||
|
||||
return writen;
|
||||
}
|
||||
|
||||
static bool wasapi_stop(void *wh)
|
||||
{
|
||||
wasapi_t *w = (wasapi_t*)wh;
|
||||
HRESULT hr = w->client->lpVtbl->Stop(w->client);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::Stop", return !w->running);
|
||||
|
||||
w->running = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool wasapi_start(void *wh, bool u)
|
||||
{
|
||||
wasapi_t *w = (wasapi_t*)wh;
|
||||
HRESULT hr = w->client->lpVtbl->Start(w->client);
|
||||
|
||||
if (hr == AUDCLNT_E_NOT_STOPPED)
|
||||
return true;
|
||||
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::Start", return w->running);
|
||||
|
||||
w->running = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool wasapi_alive(void *wh)
|
||||
{
|
||||
wasapi_t *w = (wasapi_t*)wh;
|
||||
|
||||
return w->running;
|
||||
}
|
||||
|
||||
static void wasapi_set_nonblock_state(void *wh, bool nonblock)
|
||||
{
|
||||
wasapi_t *w = (wasapi_t*)wh;
|
||||
|
||||
RARCH_LOG("[WASAPI]: Sync %s.\n", nonblock ? "off" : "on");
|
||||
|
||||
w->blocking = !nonblock;
|
||||
}
|
||||
|
||||
static void wasapi_free(void *wh)
|
||||
{
|
||||
wasapi_t *w = (wasapi_t*)wh;
|
||||
HANDLE write_event = w->write_event;
|
||||
DWORD ir;
|
||||
|
||||
WASAPI_RELEASE(w->renderer);
|
||||
if (w->client)
|
||||
w->client->lpVtbl->Stop(w->client);
|
||||
WASAPI_RELEASE(w->client);
|
||||
WASAPI_RELEASE(w->device);
|
||||
CoUninitialize();
|
||||
if (w->buffer)
|
||||
fifo_free(w->buffer);
|
||||
free(w);
|
||||
|
||||
ir = WaitForSingleObject(write_event, 20);
|
||||
if (ir == WAIT_FAILED)
|
||||
wasapi_sys_err("WaitForSingleObject");
|
||||
|
||||
/* If event isn't signaled log and leak */
|
||||
WASAPI_CHECK(ir == WAIT_OBJECT_0, "Memory leak in wasapi_free", return);
|
||||
|
||||
CloseHandle(write_event);
|
||||
}
|
||||
|
||||
static bool wasapi_use_float(void *wh)
|
||||
{
|
||||
wasapi_t *w = (wasapi_t*)wh;
|
||||
|
||||
return w->frame_size == 8;
|
||||
}
|
||||
|
||||
static void *wasapi_device_list_new(void *u)
|
||||
{
|
||||
HRESULT hr;
|
||||
UINT i;
|
||||
PROPVARIANT prop_var;
|
||||
int ir;
|
||||
union string_list_elem_attr attr;
|
||||
IMMDeviceEnumerator *enumerator = NULL;
|
||||
IMMDeviceCollection *collection = NULL;
|
||||
UINT dev_count = 0;
|
||||
IMMDevice *device = NULL;
|
||||
LPWSTR dev_id_wstr = NULL;
|
||||
IPropertyStore *prop_store = NULL;
|
||||
bool prop_var_init = false;
|
||||
bool br = false;
|
||||
char *dev_id_str = NULL;
|
||||
char *dev_name_str = NULL;
|
||||
struct string_list *sl = string_list_new();
|
||||
|
||||
wasapi_log("Enumerating active devices ..");
|
||||
|
||||
WASAPI_CHECK(sl, "string_list_new failed", return NULL);
|
||||
|
||||
attr.i = 0;
|
||||
hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL,
|
||||
&IID_IMMDeviceEnumerator, (void **)&enumerator);
|
||||
WASAPI_HR_CHECK(hr, "CoCreateInstance", goto error);
|
||||
|
||||
hr = enumerator->lpVtbl->EnumAudioEndpoints(enumerator,
|
||||
eRender, DEVICE_STATE_ACTIVE, &collection);
|
||||
WASAPI_HR_CHECK(hr, "IMMDeviceEnumerator::EnumAudioEndpoints", goto error);
|
||||
|
||||
hr = collection->lpVtbl->GetCount(collection, &dev_count);
|
||||
WASAPI_HR_CHECK(hr, "IMMDeviceCollection::GetCount", goto error);
|
||||
|
||||
for (i = 0; i < dev_count; ++i)
|
||||
{
|
||||
hr = collection->lpVtbl->Item(collection, i, &device);
|
||||
WASAPI_HR_CHECK(hr, "IMMDeviceCollection::Item", goto error);
|
||||
|
||||
hr = device->lpVtbl->GetId(device, &dev_id_wstr);
|
||||
WASAPI_HR_CHECK(hr, "IMMDevice::GetId", goto error);
|
||||
|
||||
ir = WideCharToMultiByte(CP_ACP, 0, dev_id_wstr, -1,
|
||||
NULL, 0, NULL, NULL);
|
||||
WASAPI_SR_CHECK(ir, "WideCharToMultiByte", goto error);
|
||||
|
||||
dev_id_str = (char *)malloc(ir);
|
||||
WASAPI_CHECK(dev_id_str, "Out of memory", goto error);
|
||||
|
||||
ir = WideCharToMultiByte(CP_ACP, 0, dev_id_wstr, -1,
|
||||
dev_id_str, ir, NULL, NULL);
|
||||
WASAPI_SR_CHECK(ir, "WideCharToMultiByte", goto error);
|
||||
|
||||
hr = device->lpVtbl->OpenPropertyStore(device, STGM_READ, &prop_store);
|
||||
WASAPI_HR_CHECK(hr, "IMMDevice::OpenPropertyStore", goto error);
|
||||
|
||||
PropVariantInit(&prop_var);
|
||||
prop_var_init = true;
|
||||
hr = prop_store->lpVtbl->GetValue(prop_store,
|
||||
&PKEY_Device_FriendlyName, &prop_var);
|
||||
WASAPI_HR_CHECK(hr, "IPropertyStore::GetValue", goto error);
|
||||
|
||||
ir = WideCharToMultiByte(CP_ACP, 0, prop_var.pwszVal, -1,
|
||||
NULL, 0, NULL, NULL);
|
||||
WASAPI_SR_CHECK(ir, "WideCharToMultiByte", goto error);
|
||||
|
||||
dev_name_str = (char *)malloc(ir);
|
||||
WASAPI_CHECK(dev_name_str, "Out of memory", goto error);
|
||||
|
||||
ir = WideCharToMultiByte(CP_ACP, 0, prop_var.pwszVal, -1,
|
||||
dev_name_str, ir, NULL, NULL);
|
||||
WASAPI_SR_CHECK(ir, "WideCharToMultiByte", goto error);
|
||||
|
||||
RARCH_LOG("[WASAPI]: %s %s\n", dev_name_str, dev_id_str);
|
||||
|
||||
br = string_list_append(sl, dev_id_str, attr);
|
||||
WASAPI_CHECK(br, "string_list_append failed", goto error);
|
||||
|
||||
PropVariantClear(&prop_var);
|
||||
prop_var_init = false;
|
||||
WASAPI_CO_FREE(dev_id_wstr);
|
||||
WASAPI_FREE(dev_id_str);
|
||||
WASAPI_FREE(dev_name_str);
|
||||
WASAPI_RELEASE(prop_store);
|
||||
WASAPI_RELEASE(device);
|
||||
}
|
||||
|
||||
WASAPI_RELEASE(collection);
|
||||
WASAPI_RELEASE(enumerator);
|
||||
|
||||
wasapi_log("Devices enumerated");
|
||||
|
||||
return sl;
|
||||
|
||||
error:
|
||||
WASAPI_FREE(dev_id_str);
|
||||
WASAPI_FREE(dev_name_str);
|
||||
if (prop_var_init)
|
||||
PropVariantClear(&prop_var);
|
||||
WASAPI_RELEASE(prop_store);
|
||||
WASAPI_CO_FREE(dev_id_wstr);
|
||||
WASAPI_RELEASE(device);
|
||||
WASAPI_RELEASE(collection);
|
||||
WASAPI_RELEASE(enumerator);
|
||||
if (sl)
|
||||
string_list_free(sl);
|
||||
|
||||
wasapi_err("Device enumeration failed");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void wasapi_device_list_free(void *u, void *slp)
|
||||
{
|
||||
struct string_list *sl = (struct string_list*)slp;
|
||||
|
||||
string_list_free(sl);
|
||||
}
|
||||
|
||||
static size_t wasapi_write_avail(void *wh)
|
||||
{
|
||||
HRESULT hr;
|
||||
wasapi_t *w = (wasapi_t*)wh;
|
||||
UINT32 padding = 0;
|
||||
|
||||
if (w->buffer)
|
||||
return fifo_write_avail(w->buffer);
|
||||
|
||||
hr = w->client->lpVtbl->GetCurrentPadding(w->client, &padding);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::GetCurrentPadding", return 0);
|
||||
|
||||
return w->engine_buffer_size - padding * w->frame_size;
|
||||
}
|
||||
|
||||
static size_t wasapi_buffer_size(void *wh)
|
||||
{
|
||||
wasapi_t *w = (wasapi_t*)wh;
|
||||
|
||||
if (!w->exclusive && w->buffer)
|
||||
return w->buffer->size;
|
||||
|
||||
return w->engine_buffer_size;
|
||||
}
|
||||
|
||||
audio_driver_t audio_wasapi = {
|
||||
wasapi_init,
|
||||
wasapi_write,
|
||||
wasapi_stop,
|
||||
wasapi_start,
|
||||
wasapi_alive,
|
||||
wasapi_set_nonblock_state,
|
||||
wasapi_free,
|
||||
wasapi_use_float,
|
||||
"wasapi",
|
||||
wasapi_device_list_new,
|
||||
wasapi_device_list_free,
|
||||
wasapi_write_avail,
|
||||
wasapi_buffer_size
|
||||
};
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "wiiu/system/memory.h"
|
||||
|
||||
#include "audio/audio_driver.h"
|
||||
#include "performance_counters.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -192,11 +191,9 @@ static bool ax_audio_start(void* data, bool is_shutdown)
|
||||
return true;
|
||||
}
|
||||
|
||||
static ssize_t ax_audio_write(void* data, const void* buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t ax_audio_write(void* data, const void* buf, size_t size)
|
||||
{
|
||||
int i;
|
||||
static struct retro_perf_counter ax_audio_write_perf = {0};
|
||||
size_t countAvail = 0;
|
||||
ax_audio_t* ax = (ax_audio_t*)data;
|
||||
const uint16_t* src = buf;
|
||||
@@ -205,10 +202,6 @@ static ssize_t ax_audio_write(void* data, const void* buf, size_t size,
|
||||
if(!size || (size & 0x3))
|
||||
return 0;
|
||||
|
||||
/* Measure copy performance from here */
|
||||
performance_counter_init(ax_audio_write_perf, "ax_audio_write");
|
||||
performance_counter_start_plus(is_perfcnt_enable, ax_audio_write_perf);
|
||||
|
||||
if(count > AX_AUDIO_MAX_FREE)
|
||||
count = AX_AUDIO_MAX_FREE;
|
||||
|
||||
@@ -286,9 +279,6 @@ static ssize_t ax_audio_write(void* data, const void* buf, size_t size,
|
||||
if(!AXIsMultiVoiceRunning(ax->mvoice))
|
||||
ax_audio_start(ax, false);
|
||||
|
||||
/* Done copying new data */
|
||||
performance_counter_stop_plus(is_perfcnt_enable, ax_audio_write_perf);
|
||||
|
||||
/* return what was actually copied */
|
||||
return (count << 2);
|
||||
}
|
||||
|
||||
@@ -201,10 +201,9 @@ static size_t xaudio2_write_avail(xaudio2_t *handle)
|
||||
return handle->bufsize * (MAX_BUFFERS - handle->buffers - 1);
|
||||
}
|
||||
|
||||
static size_t xaudio2_write(xaudio2_t *handle, const void *buf, size_t bytes_,
|
||||
bool is_perfcnt_enable)
|
||||
static size_t xaudio2_write(xaudio2_t *handle, const void *buf, size_t bytes_)
|
||||
{
|
||||
unsigned bytes = bytes_;
|
||||
unsigned bytes = bytes_;
|
||||
const uint8_t *buffer = (const uint8_t*)buf;
|
||||
|
||||
while (bytes)
|
||||
@@ -274,8 +273,7 @@ static void *xa_init(const char *device, unsigned rate, unsigned latency,
|
||||
return xa;
|
||||
}
|
||||
|
||||
static ssize_t xa_write(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t xa_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
size_t ret;
|
||||
xa_t *xa = (xa_t*)data;
|
||||
@@ -290,7 +288,7 @@ static ssize_t xa_write(void *data, const void *buf, size_t size,
|
||||
size = avail;
|
||||
}
|
||||
|
||||
ret = xaudio2_write(xa->xa, buf, size, is_perfcnt_enable);
|
||||
ret = xaudio2_write(xa->xa, buf, size);
|
||||
if (ret == 0 && size > 0)
|
||||
return -1;
|
||||
return ret;
|
||||
|
||||
@@ -57,8 +57,7 @@ static INLINE uint32_t bswap_32(uint32_t val)
|
||||
((val >> 8) & 0xff00) | ((val << 8) & 0xff0000);
|
||||
}
|
||||
|
||||
static ssize_t xenon360_audio_write(void *data, const void *buf, size_t size,
|
||||
bool is_perfcnt_enable)
|
||||
static ssize_t xenon360_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
size_t written = 0, i;
|
||||
const uint32_t *in_buf = buf;
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
#include <retro_inline.h>
|
||||
#include <retro_assert.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <retro_timers.h>
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ void autosave_lock(void);
|
||||
**/
|
||||
void autosave_unlock(void);
|
||||
|
||||
void autosave_init(void);
|
||||
bool autosave_init(void);
|
||||
|
||||
void autosave_deinit(void);
|
||||
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
// This provides support for __getreent() as well as implementation of our thread-related wrappers
|
||||
|
||||
#include <reent.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vitasdk/utils.h>
|
||||
#include <psp2/kernel/threadmgr.h>
|
||||
|
||||
#define MAX_THREADS 256
|
||||
|
||||
typedef struct reent_for_thread {
|
||||
int thread_id;
|
||||
int needs_reclaim;
|
||||
void *tls_data_ext;
|
||||
void *pthread_data_ext;
|
||||
struct _reent reent;
|
||||
} reent_for_thread;
|
||||
|
||||
static reent_for_thread reent_list[MAX_THREADS];
|
||||
static int _newlib_reent_mutex;
|
||||
static struct _reent _newlib_global_reent;
|
||||
|
||||
#define TLS_REENT_THID_PTR(thid) sceKernelGetThreadTLSAddr(thid, 0x88)
|
||||
#define TLS_REENT_PTR sceKernelGetTLSAddr(0x88)
|
||||
|
||||
#define list_entry(ptr, type, member) \
|
||||
((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
|
||||
|
||||
int __vita_delete_thread_reent(int thid)
|
||||
{
|
||||
struct reent_for_thread *for_thread;
|
||||
|
||||
// We only need to cleanup if reent is allocated, i.e. if it's on our TLS
|
||||
// We also don't need to clean up the global reent
|
||||
struct _reent **on_tls = NULL;
|
||||
|
||||
if (thid == 0)
|
||||
on_tls = TLS_REENT_PTR;
|
||||
else
|
||||
on_tls = TLS_REENT_THID_PTR(thid);
|
||||
|
||||
if (!*on_tls || *on_tls == &_newlib_global_reent)
|
||||
return 0;
|
||||
|
||||
for_thread = list_entry(*on_tls, struct reent_for_thread, reent);
|
||||
|
||||
// Remove from TLS
|
||||
*on_tls = 0;
|
||||
|
||||
// Set thread id to zero, which means the reent is free
|
||||
for_thread->thread_id = 0;
|
||||
|
||||
// We can't reclaim it here, will be done later in __getreent
|
||||
for_thread->needs_reclaim = 1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int vitasdk_delete_thread_reent(int thid)
|
||||
{
|
||||
int res = 0;
|
||||
// Lock the list because we'll be modifying it
|
||||
sceKernelLockMutex(_newlib_reent_mutex, 1, NULL);
|
||||
|
||||
res = __vita_delete_thread_reent(thid);
|
||||
|
||||
sceKernelUnlockMutex(_newlib_reent_mutex, 1);
|
||||
return res;
|
||||
}
|
||||
|
||||
int _exit_thread_common(int exit_status, int (*exit_func)(int)) {
|
||||
int res = 0;
|
||||
int ret = 0;
|
||||
int thid = sceKernelGetThreadId();
|
||||
|
||||
// Lock the list because we'll be modifying it
|
||||
sceKernelLockMutex(_newlib_reent_mutex, 1, NULL);
|
||||
|
||||
res = __vita_delete_thread_reent(0);
|
||||
|
||||
ret = exit_func(exit_status);
|
||||
|
||||
if (res)
|
||||
{
|
||||
struct _reent **on_tls = TLS_REENT_PTR;
|
||||
struct reent_for_thread *for_thread = list_entry(*on_tls, struct reent_for_thread, reent);
|
||||
|
||||
for_thread->thread_id = thid;
|
||||
|
||||
// And put it back on TLS
|
||||
*on_tls = &for_thread->reent;
|
||||
}
|
||||
|
||||
sceKernelUnlockMutex(_newlib_reent_mutex, 1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int vita_exit_thread(int exit_status) {
|
||||
return _exit_thread_common(exit_status, sceKernelExitThread);
|
||||
}
|
||||
|
||||
int vita_exit_delete_thread(int exit_status) {
|
||||
return _exit_thread_common(exit_status, sceKernelExitDeleteThread);
|
||||
}
|
||||
|
||||
static inline void __vita_clean_reent(void)
|
||||
{
|
||||
int i;
|
||||
SceKernelThreadInfo info;
|
||||
|
||||
for (i = 0; i < MAX_THREADS; ++i)
|
||||
{
|
||||
info.size = sizeof(SceKernelThreadInfo);
|
||||
|
||||
if (sceKernelGetThreadInfo(reent_list[i].thread_id, &info) < 0)
|
||||
{
|
||||
reent_list[i].thread_id = 0;
|
||||
reent_list[i].needs_reclaim = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline struct reent_for_thread *__vita_allocate_reent(void)
|
||||
{
|
||||
int i;
|
||||
struct reent_for_thread *free_reent = 0;
|
||||
|
||||
for (i = 0; i < MAX_THREADS; ++i)
|
||||
if (reent_list[i].thread_id == 0) {
|
||||
free_reent = &reent_list[i];
|
||||
break;
|
||||
}
|
||||
|
||||
return free_reent;
|
||||
}
|
||||
|
||||
struct _reent *__getreent_for_thread(int thid) {
|
||||
struct reent_for_thread *free_reent = 0;
|
||||
struct _reent *returned_reent = 0;
|
||||
|
||||
// A pointer to our reent should be on the TLS
|
||||
struct _reent **on_tls = NULL;
|
||||
|
||||
if (thid == 0)
|
||||
on_tls = TLS_REENT_PTR;
|
||||
else
|
||||
on_tls = TLS_REENT_THID_PTR(thid);
|
||||
|
||||
if (*on_tls) {
|
||||
return *on_tls;
|
||||
}
|
||||
|
||||
sceKernelLockMutex(_newlib_reent_mutex, 1, 0);
|
||||
|
||||
// If it's not on the TLS this means the thread doesn't have a reent allocated yet
|
||||
// We allocate one and put a pointer to it on the TLS
|
||||
free_reent = __vita_allocate_reent();
|
||||
|
||||
if (!free_reent) {
|
||||
// clean any hanging thread references
|
||||
__vita_clean_reent();
|
||||
|
||||
free_reent = __vita_allocate_reent();
|
||||
|
||||
if (!free_reent) {
|
||||
// we've exhausted all our resources
|
||||
__builtin_trap();
|
||||
}
|
||||
} else {
|
||||
// First, check if it needs to be cleaned up (if it came from another thread)
|
||||
if (free_reent->needs_reclaim) {
|
||||
_reclaim_reent(&free_reent->reent);
|
||||
free_reent->needs_reclaim = 0;
|
||||
}
|
||||
|
||||
memset(free_reent, 0, sizeof(struct reent_for_thread));
|
||||
|
||||
// Set it up
|
||||
if(thid==0){
|
||||
thid = sceKernelGetThreadId();
|
||||
}
|
||||
free_reent->thread_id = thid;
|
||||
_REENT_INIT_PTR(&free_reent->reent);
|
||||
returned_reent = &free_reent->reent;
|
||||
}
|
||||
|
||||
// Put it on TLS for faster access time
|
||||
*on_tls = returned_reent;
|
||||
|
||||
sceKernelUnlockMutex(_newlib_reent_mutex, 1);
|
||||
return returned_reent;
|
||||
}
|
||||
|
||||
struct _reent *__getreent(void) {
|
||||
return __getreent_for_thread(0);
|
||||
}
|
||||
|
||||
void *vitasdk_get_tls_data(SceUID thid)
|
||||
{
|
||||
struct reent_for_thread *for_thread;
|
||||
struct _reent *reent = __getreent_for_thread(thid);
|
||||
|
||||
for_thread = list_entry(reent, struct reent_for_thread, reent);
|
||||
return &for_thread->tls_data_ext;
|
||||
}
|
||||
|
||||
void *vitasdk_get_pthread_data(SceUID thid)
|
||||
{
|
||||
struct reent_for_thread *for_thread;
|
||||
struct _reent *reent = __getreent_for_thread(thid);
|
||||
|
||||
for_thread = list_entry(reent, struct reent_for_thread, reent);
|
||||
return &for_thread->pthread_data_ext;
|
||||
}
|
||||
|
||||
// Called from _start to set up the main thread reentrancy structure
|
||||
void _init_vita_reent(void) {
|
||||
memset(reent_list, 0, sizeof(reent_list));
|
||||
_newlib_reent_mutex = sceKernelCreateMutex("reent list access mutex", 0, 0, 0);
|
||||
reent_list[0].thread_id = sceKernelGetThreadId();
|
||||
_REENT_INIT_PTR(&reent_list[0].reent);
|
||||
*(struct _reent **)(TLS_REENT_PTR) = &reent_list[0].reent;
|
||||
_REENT_INIT_PTR(&_newlib_global_reent);
|
||||
}
|
||||
|
||||
void _free_vita_reent(void) {
|
||||
sceKernelDeleteMutex(_newlib_reent_mutex);
|
||||
}
|
||||
+25
-23
@@ -25,7 +25,6 @@
|
||||
#include "../configuration.h"
|
||||
#include "../driver.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../runloop.h"
|
||||
#include "../list_special.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
@@ -48,6 +47,12 @@ static const camera_driver_t *camera_drivers[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct retro_camera_callback camera_cb;
|
||||
static const camera_driver_t *camera_driver = NULL;
|
||||
static void *camera_data = NULL;
|
||||
static bool camera_driver_active = false;
|
||||
static bool camera_driver_data_own = false;
|
||||
|
||||
/**
|
||||
* camera_driver_find_handle:
|
||||
* @idx : index of driver to get handle to.
|
||||
@@ -102,14 +107,20 @@ bool driver_camera_start(void)
|
||||
return camera_driver_ctl(RARCH_CAMERA_CTL_START, NULL);
|
||||
}
|
||||
|
||||
void camera_driver_poll(void)
|
||||
{
|
||||
if (!camera_cb.caps)
|
||||
return;
|
||||
if (!camera_driver || !camera_driver->poll || !camera_data)
|
||||
return;
|
||||
camera_driver->poll(camera_data,
|
||||
camera_cb.frame_raw_framebuffer,
|
||||
camera_cb.frame_opengl_texture);
|
||||
}
|
||||
|
||||
bool camera_driver_ctl(enum rarch_camera_ctl_state state, void *data)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
static struct retro_camera_callback camera_cb;
|
||||
static const camera_driver_t *camera_driver = NULL;
|
||||
static void *camera_data = NULL;
|
||||
static bool camera_driver_active = false;
|
||||
static bool camera_driver_data_own = false;
|
||||
|
||||
switch (state)
|
||||
{
|
||||
@@ -136,7 +147,7 @@ bool camera_driver_ctl(enum rarch_camera_ctl_state state, void *data)
|
||||
driver_ctx_info_t drv;
|
||||
|
||||
drv.label = "camera_driver";
|
||||
drv.s = settings->camera.driver;
|
||||
drv.s = settings->arrays.camera_driver;
|
||||
|
||||
driver_ctl(RARCH_DRIVER_CTL_FIND_INDEX, &drv);
|
||||
|
||||
@@ -148,7 +159,7 @@ bool camera_driver_ctl(enum rarch_camera_ctl_state state, void *data)
|
||||
{
|
||||
unsigned d;
|
||||
RARCH_ERR("Couldn't find any camera driver named \"%s\"\n",
|
||||
settings->camera.driver);
|
||||
settings->arrays.camera_driver);
|
||||
RARCH_LOG_OUTPUT("Available camera drivers are:\n");
|
||||
for (d = 0; camera_driver_find_handle(d); d++)
|
||||
RARCH_LOG_OUTPUT("\t%s\n", camera_driver_find_ident(d));
|
||||
@@ -188,22 +199,13 @@ bool camera_driver_ctl(enum rarch_camera_ctl_state state, void *data)
|
||||
case RARCH_CAMERA_CTL_START:
|
||||
if (camera_driver && camera_data && camera_driver->start)
|
||||
{
|
||||
if (settings->camera.allow)
|
||||
if (settings->bools.camera_allow)
|
||||
return camera_driver->start(camera_data);
|
||||
|
||||
runloop_msg_queue_push(
|
||||
"Camera is explicitly disabled.\n", 1, 180, false);
|
||||
}
|
||||
break;
|
||||
case RARCH_CAMERA_CTL_POLL:
|
||||
if (!camera_cb.caps)
|
||||
return false;
|
||||
if (!camera_driver || !camera_driver->poll || !camera_data)
|
||||
return false;
|
||||
camera_driver->poll(camera_data,
|
||||
camera_cb.frame_raw_framebuffer,
|
||||
camera_cb.frame_opengl_texture);
|
||||
break;
|
||||
case RARCH_CAMERA_CTL_SET_CB:
|
||||
{
|
||||
struct retro_camera_callback *cb =
|
||||
@@ -222,12 +224,12 @@ bool camera_driver_ctl(enum rarch_camera_ctl_state state, void *data)
|
||||
return false;
|
||||
|
||||
camera_data = camera_driver->init(
|
||||
*settings->camera.device ? settings->camera.device : NULL,
|
||||
*settings->arrays.camera_device ? settings->arrays.camera_device : NULL,
|
||||
camera_cb.caps,
|
||||
settings->camera.width ?
|
||||
settings->camera.width : camera_cb.width,
|
||||
settings->camera.height ?
|
||||
settings->camera.height : camera_cb.height);
|
||||
settings->uints.camera_width ?
|
||||
settings->uints.camera_width : camera_cb.width,
|
||||
settings->uints.camera_height ?
|
||||
settings->uints.camera_height : camera_cb.height);
|
||||
|
||||
if (!camera_data)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,6 @@ enum rarch_camera_ctl_state
|
||||
RARCH_CAMERA_CTL_UNSET_ACTIVE,
|
||||
RARCH_CAMERA_CTL_IS_ACTIVE,
|
||||
RARCH_CAMERA_CTL_FIND_DRIVER,
|
||||
RARCH_CAMERA_CTL_POLL,
|
||||
RARCH_CAMERA_CTL_SET_CB,
|
||||
RARCH_CAMERA_CTL_STOP,
|
||||
RARCH_CAMERA_CTL_START,
|
||||
@@ -105,6 +104,8 @@ void driver_camera_stop(void);
|
||||
|
||||
bool driver_camera_start(void);
|
||||
|
||||
void camera_driver_poll(void);
|
||||
|
||||
bool camera_driver_ctl(enum rarch_camera_ctl_state state, void *data);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
#include <retro_assert.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <gfx/scaler/scaler.h>
|
||||
#include <retro_stat.h>
|
||||
#include <gfx/video_frame.h>
|
||||
#include <file/file_path.h>
|
||||
|
||||
#include <compat/strl.h>
|
||||
|
||||
@@ -89,15 +90,15 @@ static bool init_mmap(void *data)
|
||||
if (xioctl(v4l->fd, (uint8_t)VIDIOC_REQBUFS, &req) == -1)
|
||||
{
|
||||
if (errno == EINVAL)
|
||||
RARCH_ERR("%s does not support memory mapping.\n", v4l->dev_name);
|
||||
RARCH_ERR("[V4L2]: %s does not support memory mapping.\n", v4l->dev_name);
|
||||
else
|
||||
RARCH_ERR("xioctl of VIDIOC_REQBUFS failed.\n");
|
||||
RARCH_ERR("[V4L2]: xioctl of VIDIOC_REQBUFS failed.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (req.count < 2)
|
||||
{
|
||||
RARCH_ERR("Insufficient buffer memory on %s.\n", v4l->dev_name);
|
||||
RARCH_ERR("[V4L2]: Insufficient buffer memory on %s.\n", v4l->dev_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -105,7 +106,7 @@ static bool init_mmap(void *data)
|
||||
|
||||
if (!v4l->buffers)
|
||||
{
|
||||
RARCH_ERR("Out of memory allocating V4L2 buffers.\n");
|
||||
RARCH_ERR("[V4L2]: Out of memory allocating V4L2 buffers.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -119,7 +120,7 @@ static bool init_mmap(void *data)
|
||||
|
||||
if (xioctl(v4l->fd, (uint8_t)VIDIOC_QUERYBUF, &buf) == -1)
|
||||
{
|
||||
RARCH_ERR("Error - xioctl VIDIOC_QUERYBUF.\n");
|
||||
RARCH_ERR("[V4L2]: Error - xioctl VIDIOC_QUERYBUF.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -131,7 +132,7 @@ static bool init_mmap(void *data)
|
||||
|
||||
if (v4l->buffers[v4l->n_buffers].start == MAP_FAILED)
|
||||
{
|
||||
RARCH_ERR("Error - mmap.\n");
|
||||
RARCH_ERR("[V4L2]: Error - mmap.\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -150,21 +151,21 @@ static bool init_device(void *data)
|
||||
if (xioctl(v4l->fd, (uint8_t)VIDIOC_QUERYCAP, &cap) < 0)
|
||||
{
|
||||
if (errno == EINVAL)
|
||||
RARCH_ERR("%s is no V4L2 device.\n", v4l->dev_name);
|
||||
RARCH_ERR("[V4L2]: %s is no V4L2 device.\n", v4l->dev_name);
|
||||
else
|
||||
RARCH_ERR("Error - VIDIOC_QUERYCAP.\n");
|
||||
RARCH_ERR("[V4L2]: Error - VIDIOC_QUERYCAP.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE))
|
||||
{
|
||||
RARCH_ERR("%s is no video capture device.\n", v4l->dev_name);
|
||||
RARCH_ERR("[V4L2]: %s is no video capture device.\n", v4l->dev_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(cap.capabilities & V4L2_CAP_STREAMING))
|
||||
{
|
||||
RARCH_ERR("%s does not support streaming I/O (V4L2_CAP_STREAMING).\n",
|
||||
RARCH_ERR("[V4L2]: %s does not support streaming I/O (V4L2_CAP_STREAMING).\n",
|
||||
v4l->dev_name);
|
||||
return false;
|
||||
}
|
||||
@@ -187,7 +188,7 @@ static bool init_device(void *data)
|
||||
|
||||
if (xioctl(v4l->fd, (uint8_t)VIDIOC_S_FMT, &fmt) < 0)
|
||||
{
|
||||
RARCH_ERR("Error - VIDIOC_S_FMT\n");
|
||||
RARCH_ERR("[V4L2]: Error - VIDIOC_S_FMT\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -202,18 +203,18 @@ static bool init_device(void *data)
|
||||
*/
|
||||
if (fmt.fmt.pix.pixelformat != V4L2_PIX_FMT_YUYV)
|
||||
{
|
||||
RARCH_ERR("The V4L2 device doesn't support YUYV.\n");
|
||||
RARCH_ERR("[V4L2]: The V4L2 device doesn't support YUYV.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fmt.fmt.pix.field != V4L2_FIELD_NONE
|
||||
&& fmt.fmt.pix.field != V4L2_FIELD_INTERLACED)
|
||||
{
|
||||
RARCH_ERR("The V4L2 device doesn't support progressive nor interlaced video.\n");
|
||||
RARCH_ERR("[V4L2]: The V4L2 device doesn't support progressive nor interlaced video.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
RARCH_LOG("V4L2 device: %u x %u.\n", v4l->width, v4l->height);
|
||||
RARCH_LOG("[V4L2]: device: %u x %u.\n", v4l->width, v4l->height);
|
||||
|
||||
return init_mmap(v4l);
|
||||
}
|
||||
@@ -224,7 +225,7 @@ static void v4l_stop(void *data)
|
||||
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
|
||||
if (xioctl(v4l->fd, VIDIOC_STREAMOFF, &type) == -1)
|
||||
RARCH_ERR("Error - VIDIOC_STREAMOFF.\n");
|
||||
RARCH_ERR("[V4L2]: Error - VIDIOC_STREAMOFF.\n");
|
||||
|
||||
v4l->ready = false;
|
||||
}
|
||||
@@ -245,7 +246,7 @@ static bool v4l_start(void *data)
|
||||
|
||||
if (xioctl(v4l->fd, (uint8_t)VIDIOC_QBUF, &buf) == -1)
|
||||
{
|
||||
RARCH_ERR("Error - VIDIOC_QBUF.\n");
|
||||
RARCH_ERR("[V4L2]: Error - VIDIOC_QBUF.\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -254,7 +255,7 @@ static bool v4l_start(void *data)
|
||||
|
||||
if (xioctl(v4l->fd, VIDIOC_STREAMON, &type) == -1)
|
||||
{
|
||||
RARCH_ERR("Error - VIDIOC_STREAMON.\n");
|
||||
RARCH_ERR("[V4L2]: Error - VIDIOC_STREAMON.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -270,7 +271,7 @@ static void v4l_free(void *data)
|
||||
unsigned i;
|
||||
for (i = 0; i < v4l->n_buffers; i++)
|
||||
if (munmap(v4l->buffers[i].start, v4l->buffers[i].length) == -1)
|
||||
RARCH_ERR("munmap failed.\n");
|
||||
RARCH_ERR("[V4L2]: munmap failed.\n");
|
||||
|
||||
if (v4l->fd >= 0)
|
||||
close(v4l->fd);
|
||||
@@ -287,7 +288,7 @@ static void *v4l_init(const char *device, uint64_t caps,
|
||||
|
||||
if ((caps & (UINT64_C(1) << RETRO_CAMERA_BUFFER_RAW_FRAMEBUFFER)) == 0)
|
||||
{
|
||||
RARCH_ERR("video4linux2 returns raw framebuffers.\n");
|
||||
RARCH_ERR("[V4L2]: Returns raw framebuffers.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -304,7 +305,7 @@ static void *v4l_init(const char *device, uint64_t caps,
|
||||
|
||||
if (!path_is_character_special(v4l->dev_name))
|
||||
{
|
||||
RARCH_ERR("%s is no device.\n", v4l->dev_name);
|
||||
RARCH_ERR("[V4L2]: %s is no device.\n", v4l->dev_name);
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -312,7 +313,7 @@ static void *v4l_init(const char *device, uint64_t caps,
|
||||
|
||||
if (v4l->fd == -1)
|
||||
{
|
||||
RARCH_ERR("Cannot open '%s': %d, %s\n", v4l->dev_name,
|
||||
RARCH_ERR("[V4L2]: Cannot open '%s': %d, %s\n", v4l->dev_name,
|
||||
errno, strerror(errno));
|
||||
goto error;
|
||||
}
|
||||
@@ -325,7 +326,7 @@ static void *v4l_init(const char *device, uint64_t caps,
|
||||
|
||||
if (!v4l->buffer_output)
|
||||
{
|
||||
RARCH_ERR("Failed to allocate output buffer.\n");
|
||||
RARCH_ERR("[V4L2]: Failed to allocate output buffer.\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -338,20 +339,21 @@ static void *v4l_init(const char *device, uint64_t caps,
|
||||
|
||||
if (!scaler_ctx_gen_filter(&v4l->scaler))
|
||||
{
|
||||
RARCH_ERR("Failed to create scaler.\n");
|
||||
RARCH_ERR("[V4L2]: Failed to create scaler.\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
return v4l;
|
||||
|
||||
error:
|
||||
RARCH_ERR("V4L2: Failed to initialize camera.\n");
|
||||
RARCH_ERR("[V4L2]: Failed to initialize camera.\n");
|
||||
v4l_free(v4l);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static bool preprocess_image(void *data)
|
||||
{
|
||||
struct scaler_ctx *ctx = NULL;
|
||||
video4linux_t *v4l = (video4linux_t*)data;
|
||||
struct v4l2_buffer buf = {0};
|
||||
|
||||
@@ -365,7 +367,7 @@ static bool preprocess_image(void *data)
|
||||
case EAGAIN:
|
||||
break;
|
||||
default:
|
||||
RARCH_ERR("VIDIOC_DQBUF.\n");
|
||||
RARCH_ERR("[V4L2]: VIDIOC_DQBUF.\n");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -374,10 +376,12 @@ static bool preprocess_image(void *data)
|
||||
|
||||
retro_assert(buf.index < v4l->n_buffers);
|
||||
|
||||
scaler_ctx_scale(&v4l->scaler, v4l->buffer_output, (const uint8_t*)v4l->buffers[buf.index].start);
|
||||
ctx = &v4l->scaler;
|
||||
|
||||
scaler_ctx_scale_direct(ctx, v4l->buffer_output, (const uint8_t*)v4l->buffers[buf.index].start);
|
||||
|
||||
if (xioctl(v4l->fd, (uint8_t)VIDIOC_QBUF, &buf) == -1)
|
||||
RARCH_ERR("VIDIOC_QBUF\n");
|
||||
RARCH_ERR("[V4L2]: VIDIOC_QBUF\n");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+1099
-804
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,83 @@
|
||||
#ifndef CORO_H
|
||||
#define CORO_H
|
||||
|
||||
/*
|
||||
Released under the CC0: https://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* Use at the beginning of the coroutine, you must have declared a variable coro_t* coro */
|
||||
#define CORO_ENTER() \
|
||||
{ \
|
||||
CORO_again: ; \
|
||||
switch ( coro->step ) { \
|
||||
case CORO_BEGIN: ;
|
||||
|
||||
/* Use to define labels which are targets to GOTO and GOSUB */
|
||||
#define CORO_SUB( x ) \
|
||||
case x: ;
|
||||
|
||||
/* Use at the end of the coroutine */
|
||||
#define CORO_LEAVE() \
|
||||
} \
|
||||
} \
|
||||
do { return 0; } while ( 0 )
|
||||
|
||||
/* Go to the x label */
|
||||
#define CORO_GOTO( x ) \
|
||||
do { \
|
||||
coro->step = ( x ); \
|
||||
goto CORO_again; \
|
||||
} while ( 0 )
|
||||
|
||||
/* Go to a subroutine, execution continues until the subroutine returns via RET */
|
||||
/* x is the subroutine label, y and z are the A and B arguments */
|
||||
#define CORO_GOSUB( x ) \
|
||||
do { \
|
||||
coro->stack[ coro->sp++ ] = __LINE__; \
|
||||
coro->step = ( x ); \
|
||||
goto CORO_again; \
|
||||
case __LINE__: ; \
|
||||
} while ( 0 )
|
||||
|
||||
/* Returns from a subroutine */
|
||||
#define CORO_RET() \
|
||||
do { \
|
||||
coro->step = coro->stack[ --coro->sp ]; \
|
||||
goto CORO_again; \
|
||||
} while ( 0 )
|
||||
|
||||
/* Yields to the caller, execution continues from this point when the coroutine is resumed */
|
||||
#define CORO_YIELD() \
|
||||
do { \
|
||||
coro->step = __LINE__; \
|
||||
return 1; \
|
||||
case __LINE__: ; \
|
||||
} while ( 0 )
|
||||
|
||||
#define CORO_STOP() \
|
||||
do { \
|
||||
return 0; \
|
||||
} while ( 0 )
|
||||
|
||||
/* The coroutine entry point, never use 0 as a label */
|
||||
#define CORO_BEGIN 0
|
||||
|
||||
/* Sets up a coroutine, x is a pointer to coro_t */
|
||||
#define CORO_SETUP( x ) \
|
||||
do { \
|
||||
( x )->step = CORO_BEGIN; \
|
||||
( x )->sp = 0; \
|
||||
} while ( 0 )
|
||||
|
||||
#define CORO_VAR( x ) ( coro->x )
|
||||
|
||||
/* A coroutine */
|
||||
typedef struct
|
||||
{
|
||||
CORO_VARS
|
||||
int step, sp;
|
||||
int stack[ 8 ];
|
||||
}
|
||||
coro_t;
|
||||
|
||||
#endif /* CORO_H */
|
||||
@@ -195,8 +195,6 @@ enum event_command
|
||||
CMD_EVENT_AUDIO_REINIT,
|
||||
/* Resizes windowed scale. Will reinitialize video driver. */
|
||||
CMD_EVENT_RESIZE_WINDOWED_SCALE,
|
||||
/* Deinitializes temporary content. */
|
||||
CMD_EVENT_TEMPORARY_CONTENT_DEINIT,
|
||||
CMD_EVENT_LOG_FILE_DEINIT,
|
||||
/* Toggles disk eject. */
|
||||
CMD_EVENT_DISK_EJECT_TOGGLE,
|
||||
@@ -217,10 +215,15 @@ enum event_command
|
||||
CMD_EVENT_PERFCNT_REPORT_FRONTEND_LOG,
|
||||
CMD_EVENT_VOLUME_UP,
|
||||
CMD_EVENT_VOLUME_DOWN,
|
||||
CMD_EVENT_MIXER_VOLUME_UP,
|
||||
CMD_EVENT_MIXER_VOLUME_DOWN,
|
||||
CMD_EVENT_DISABLE_OVERRIDES,
|
||||
CMD_EVENT_RESTORE_DEFAULT_SHADER_PRESET
|
||||
CMD_EVENT_RESTORE_DEFAULT_SHADER_PRESET,
|
||||
CMD_EVENT_LIBUI_TEST
|
||||
};
|
||||
|
||||
bool command_set_shader(const char *arg);
|
||||
|
||||
#ifdef HAVE_COMMAND
|
||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD)
|
||||
bool command_network_send(const char *cmd_);
|
||||
@@ -233,7 +236,7 @@ bool command_network_new(
|
||||
bool network_enable,
|
||||
uint16_t port);
|
||||
|
||||
command_t *command_new(bool local_enable);
|
||||
command_t *command_new(void);
|
||||
|
||||
bool command_poll(command_t *handle);
|
||||
|
||||
@@ -243,6 +246,8 @@ bool command_set(command_handle_t *handle);
|
||||
|
||||
bool command_free(command_t *handle);
|
||||
|
||||
bool command_event_quit(void);
|
||||
|
||||
/**
|
||||
* command_event:
|
||||
* @cmd : Command index.
|
||||
|
||||
+36
-382
@@ -20,166 +20,12 @@
|
||||
|
||||
#include <boolean.h>
|
||||
#include "gfx/video_defines.h"
|
||||
#include "input/input_driver.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "input/input_driver.h"
|
||||
|
||||
#include "config.def.keybinds.h"
|
||||
|
||||
enum video_driver_enum
|
||||
{
|
||||
VIDEO_GL = 0,
|
||||
VIDEO_VULKAN,
|
||||
VIDEO_DRM,
|
||||
VIDEO_XVIDEO,
|
||||
VIDEO_SDL,
|
||||
VIDEO_SDL2,
|
||||
VIDEO_EXT,
|
||||
VIDEO_WII,
|
||||
VIDEO_WIIU,
|
||||
VIDEO_XENON360,
|
||||
VIDEO_XDK_D3D,
|
||||
VIDEO_PSP1,
|
||||
VIDEO_VITA2D,
|
||||
VIDEO_CTR,
|
||||
VIDEO_D3D9,
|
||||
VIDEO_VG,
|
||||
VIDEO_OMAP,
|
||||
VIDEO_EXYNOS,
|
||||
VIDEO_SUNXI,
|
||||
VIDEO_DISPMANX,
|
||||
VIDEO_CACA,
|
||||
VIDEO_GDI,
|
||||
VIDEO_VGA,
|
||||
VIDEO_NULL
|
||||
};
|
||||
|
||||
enum audio_driver_enum
|
||||
{
|
||||
AUDIO_RSOUND = VIDEO_NULL + 1,
|
||||
AUDIO_OSS,
|
||||
AUDIO_ALSA,
|
||||
AUDIO_ALSATHREAD,
|
||||
AUDIO_ROAR,
|
||||
AUDIO_AL,
|
||||
AUDIO_SL,
|
||||
AUDIO_JACK,
|
||||
AUDIO_SDL,
|
||||
AUDIO_SDL2,
|
||||
AUDIO_XAUDIO,
|
||||
AUDIO_PULSE,
|
||||
AUDIO_EXT,
|
||||
AUDIO_DSOUND,
|
||||
AUDIO_COREAUDIO,
|
||||
AUDIO_PS3,
|
||||
AUDIO_XENON360,
|
||||
AUDIO_WII,
|
||||
AUDIO_WIIU,
|
||||
AUDIO_RWEBAUDIO,
|
||||
AUDIO_PSP,
|
||||
AUDIO_CTR,
|
||||
AUDIO_NULL
|
||||
};
|
||||
|
||||
enum audio_resampler_driver_enum
|
||||
{
|
||||
AUDIO_RESAMPLER_CC = AUDIO_NULL + 1,
|
||||
AUDIO_RESAMPLER_SINC,
|
||||
AUDIO_RESAMPLER_NEAREST,
|
||||
AUDIO_RESAMPLER_NULL
|
||||
};
|
||||
|
||||
enum input_driver_enum
|
||||
{
|
||||
INPUT_ANDROID = AUDIO_RESAMPLER_NULL + 1,
|
||||
INPUT_SDL,
|
||||
INPUT_SDL2,
|
||||
INPUT_X,
|
||||
INPUT_WAYLAND,
|
||||
INPUT_DINPUT,
|
||||
INPUT_PS3,
|
||||
INPUT_PSP,
|
||||
INPUT_CTR,
|
||||
INPUT_XENON360,
|
||||
INPUT_WII,
|
||||
INPUT_WIIU,
|
||||
INPUT_XINPUT,
|
||||
INPUT_UDEV,
|
||||
INPUT_LINUXRAW,
|
||||
INPUT_COCOA,
|
||||
INPUT_QNX,
|
||||
INPUT_RWEBINPUT,
|
||||
INPUT_DOS,
|
||||
INPUT_NULL
|
||||
};
|
||||
|
||||
enum joypad_driver_enum
|
||||
{
|
||||
JOYPAD_PS3 = INPUT_NULL + 1,
|
||||
JOYPAD_XINPUT,
|
||||
JOYPAD_GX,
|
||||
JOYPAD_WIIU,
|
||||
JOYPAD_XDK,
|
||||
JOYPAD_PSP,
|
||||
JOYPAD_CTR,
|
||||
JOYPAD_DINPUT,
|
||||
JOYPAD_UDEV,
|
||||
JOYPAD_LINUXRAW,
|
||||
JOYPAD_ANDROID,
|
||||
JOYPAD_SDL,
|
||||
JOYPAD_DOS,
|
||||
JOYPAD_HID,
|
||||
JOYPAD_QNX,
|
||||
JOYPAD_NULL
|
||||
};
|
||||
|
||||
enum camera_driver_enum
|
||||
{
|
||||
CAMERA_V4L2 = JOYPAD_NULL + 1,
|
||||
CAMERA_RWEBCAM,
|
||||
CAMERA_ANDROID,
|
||||
CAMERA_AVFOUNDATION,
|
||||
CAMERA_NULL
|
||||
};
|
||||
|
||||
enum wifi_driver_enum
|
||||
{
|
||||
WIFI_CONNMANCTL = CAMERA_NULL + 1,
|
||||
WIFI_NULL
|
||||
};
|
||||
|
||||
enum location_driver_enum
|
||||
{
|
||||
LOCATION_ANDROID = WIFI_NULL + 1,
|
||||
LOCATION_CORELOCATION,
|
||||
LOCATION_NULL
|
||||
};
|
||||
|
||||
enum osk_driver_enum
|
||||
{
|
||||
OSK_PS3 = LOCATION_NULL + 1,
|
||||
OSK_NULL
|
||||
};
|
||||
|
||||
enum menu_driver_enum
|
||||
{
|
||||
MENU_RGUI = OSK_NULL + 1,
|
||||
MENU_XUI,
|
||||
MENU_MATERIALUI,
|
||||
MENU_XMB,
|
||||
MENU_NUKLEAR,
|
||||
MENU_NULL
|
||||
};
|
||||
|
||||
enum record_driver_enum
|
||||
{
|
||||
RECORD_FFMPEG = MENU_NULL + 1,
|
||||
RECORD_NULL
|
||||
};
|
||||
|
||||
#if defined(HW_RVL)
|
||||
#define MAX_GAMMA_SETTING 30
|
||||
#elif defined(GEKKO)
|
||||
@@ -188,224 +34,6 @@ enum record_driver_enum
|
||||
#define MAX_GAMMA_SETTING 1
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) || defined(__CELLOS_LV2__)
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_GL
|
||||
#elif defined(GEKKO)
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_WII
|
||||
#elif defined(WIIU)
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_WIIU
|
||||
#elif defined(XENON)
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_XENON360
|
||||
#elif (defined(_XBOX1) || defined(_XBOX360)) && (defined(HAVE_D3D8) || defined(HAVE_D3D9))
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_XDK_D3D
|
||||
#elif defined(HAVE_D3D9)
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_D3D9
|
||||
#elif defined(HAVE_VG)
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_VG
|
||||
#elif defined(HAVE_VITA2D)
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_VITA2D
|
||||
#elif defined(PSP)
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_PSP1
|
||||
#elif defined(_3DS)
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_CTR
|
||||
#elif defined(HAVE_XVIDEO)
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_XVIDEO
|
||||
#elif defined(HAVE_SDL)
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_SDL
|
||||
#elif defined(HAVE_SDL2)
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_SDL2
|
||||
#elif defined(_WIN32) && !defined(_XBOX)
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_GDI
|
||||
#elif defined(DJGPP)
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_VGA
|
||||
#elif defined(HAVE_DYLIB) && !defined(ANDROID)
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_EXT
|
||||
#else
|
||||
#define VIDEO_DEFAULT_DRIVER VIDEO_NULL
|
||||
#endif
|
||||
|
||||
#if defined(__CELLOS_LV2__)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_PS3
|
||||
#elif defined(XENON)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_XENON360
|
||||
#elif defined(GEKKO)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_WII
|
||||
#elif defined(WIIU)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_WIIU
|
||||
#elif defined(PSP) || defined(VITA)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_PSP
|
||||
#elif defined(_3DS)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_CTR
|
||||
#elif defined(HAVE_PULSE)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_PULSE
|
||||
#elif defined(HAVE_ALSA) && defined(HAVE_VIDEOCORE)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_ALSATHREAD
|
||||
#elif defined(HAVE_ALSA)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_ALSA
|
||||
#elif defined(HAVE_OSS)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_OSS
|
||||
#elif defined(HAVE_JACK)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_JACK
|
||||
#elif defined(HAVE_COREAUDIO)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_COREAUDIO
|
||||
#elif defined(HAVE_XAUDIO)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_XAUDIO
|
||||
#elif defined(HAVE_DSOUND)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_DSOUND
|
||||
#elif defined(HAVE_AL)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_AL
|
||||
#elif defined(HAVE_SL)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_SL
|
||||
#elif defined(EMSCRIPTEN)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_RWEBAUDIO
|
||||
#elif defined(HAVE_SDL)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_SDL
|
||||
#elif defined(HAVE_SDL2)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_SDL2
|
||||
#elif defined(HAVE_RSOUND)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_RSOUND
|
||||
#elif defined(HAVE_ROAR)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_ROAR
|
||||
#elif defined(HAVE_DYLIB) && !defined(ANDROID)
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_EXT
|
||||
#else
|
||||
#define AUDIO_DEFAULT_DRIVER AUDIO_NULL
|
||||
#endif
|
||||
|
||||
#if defined(PSP) || defined(EMSCRIPTEN)
|
||||
#define AUDIO_DEFAULT_RESAMPLER_DRIVER AUDIO_RESAMPLER_CC
|
||||
#else
|
||||
#define AUDIO_DEFAULT_RESAMPLER_DRIVER AUDIO_RESAMPLER_SINC
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_FFMPEG)
|
||||
#define RECORD_DEFAULT_DRIVER RECORD_FFMPEG
|
||||
#else
|
||||
#define RECORD_DEFAULT_DRIVER RECORD_NULL
|
||||
#endif
|
||||
|
||||
#if defined(XENON)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_XENON360
|
||||
#elif defined(_XBOX360) || defined(_XBOX) || defined(HAVE_XINPUT2) || defined(HAVE_XINPUT_XBOX1)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_XINPUT
|
||||
#elif defined(ANDROID)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_ANDROID
|
||||
#elif defined(EMSCRIPTEN) && defined(HAVE_SDL2)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_SDL2
|
||||
#elif defined(EMSCRIPTEN)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_RWEBINPUT
|
||||
#elif defined(_WIN32)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_DINPUT
|
||||
#elif defined(__CELLOS_LV2__)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_PS3
|
||||
#elif defined(PSP) || defined(VITA)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_PSP
|
||||
#elif defined(_3DS)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_CTR
|
||||
#elif defined(GEKKO)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_WII
|
||||
#elif defined(WIIU)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_WIIU
|
||||
#elif defined(HAVE_UDEV)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_UDEV
|
||||
#elif defined(__linux__) && !defined(ANDROID)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_LINUXRAW
|
||||
#elif defined(HAVE_X11)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_X
|
||||
#elif defined(HAVE_WAYLAND)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_WAYLAND
|
||||
#elif defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_COCOA
|
||||
#elif defined(__QNX__)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_QNX
|
||||
#elif defined(HAVE_SDL)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_SDL
|
||||
#elif defined(HAVE_SDL2)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_SDL2
|
||||
#elif defined(DJGPP)
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_DOS
|
||||
#else
|
||||
#define INPUT_DEFAULT_DRIVER INPUT_NULL
|
||||
#endif
|
||||
|
||||
#if defined(__CELLOS_LV2__)
|
||||
#define JOYPAD_DEFAULT_DRIVER JOYPAD_PS3
|
||||
#elif defined(HAVE_XINPUT)
|
||||
#define JOYPAD_DEFAULT_DRIVER JOYPAD_XINPUT
|
||||
#elif defined(GEKKO)
|
||||
#define JOYPAD_DEFAULT_DRIVER JOYPAD_GX
|
||||
#elif defined(WIIU)
|
||||
#define JOYPAD_DEFAULT_DRIVER JOYPAD_WIIU
|
||||
#elif defined(_XBOX)
|
||||
#define JOYPAD_DEFAULT_DRIVER JOYPAD_XDK
|
||||
#elif defined(PSP) || defined(VITA)
|
||||
#define JOYPAD_DEFAULT_DRIVER JOYPAD_PSP
|
||||
#elif defined(_3DS)
|
||||
#define JOYPAD_DEFAULT_DRIVER JOYPAD_CTR
|
||||
#elif defined(HAVE_DINPUT)
|
||||
#define JOYPAD_DEFAULT_DRIVER JOYPAD_DINPUT
|
||||
#elif defined(HAVE_UDEV)
|
||||
#define JOYPAD_DEFAULT_DRIVER JOYPAD_UDEV
|
||||
#elif defined(__linux) && !defined(ANDROID)
|
||||
#define JOYPAD_DEFAULT_DRIVER JOYPAD_LINUXRAW
|
||||
#elif defined(ANDROID)
|
||||
#define JOYPAD_DEFAULT_DRIVER JOYPAD_ANDROID
|
||||
#elif defined(HAVE_SDL) || defined(HAVE_SDL2)
|
||||
#define JOYPAD_DEFAULT_DRIVER JOYPAD_SDL
|
||||
#elif defined(DJGPP)
|
||||
#define JOYPAD_DEFAULT_DRIVER JOYPAD_DOS
|
||||
#elif defined(HAVE_HID)
|
||||
#define JOYPAD_DEFAULT_DRIVER JOYPAD_HID
|
||||
#elif defined(__QNX__)
|
||||
#define JOYPAD_DEFAULT_DRIVER JOYPAD_QNX
|
||||
#else
|
||||
#define JOYPAD_DEFAULT_DRIVER JOYPAD_NULL
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_V4L2)
|
||||
#define CAMERA_DEFAULT_DRIVER CAMERA_V4L2
|
||||
#elif defined(EMSCRIPTEN)
|
||||
#define CAMERA_DEFAULT_DRIVER CAMERA_RWEBCAM
|
||||
#elif defined(ANDROID)
|
||||
#define CAMERA_DEFAULT_DRIVER CAMERA_ANDROID
|
||||
#elif defined(HAVE_AVFOUNDATION) && (defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH))
|
||||
#define CAMERA_DEFAULT_DRIVER CAMERA_AVFOUNDATION
|
||||
#else
|
||||
#define CAMERA_DEFAULT_DRIVER CAMERA_NULL
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LAKKA)
|
||||
#define WIFI_DEFAULT_DRIVER WIFI_CONNMANCTL
|
||||
#else
|
||||
#define WIFI_DEFAULT_DRIVER WIFI_NULL
|
||||
#endif
|
||||
|
||||
#if defined(ANDROID)
|
||||
#define LOCATION_DEFAULT_DRIVER LOCATION_ANDROID
|
||||
#elif defined(HAVE_CORELOCATION) && (defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH))
|
||||
#define LOCATION_DEFAULT_DRIVER LOCATION_CORELOCATION
|
||||
#else
|
||||
#define LOCATION_DEFAULT_DRIVER LOCATION_NULL
|
||||
#endif
|
||||
|
||||
#if defined(__CELLOS_LV2__)
|
||||
#define OSK_DEFAULT_DRIVER OSK_PS3
|
||||
#else
|
||||
#define OSK_DEFAULT_DRIVER OSK_NULL
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_XUI)
|
||||
#define MENU_DEFAULT_DRIVER MENU_XUI
|
||||
#elif defined(HAVE_MATERIALUI) && defined(RARCH_MOBILE)
|
||||
#define MENU_DEFAULT_DRIVER MENU_MATERIALUI
|
||||
#elif defined(HAVE_XMB)
|
||||
#define MENU_DEFAULT_DRIVER MENU_XMB
|
||||
#elif defined(HAVE_RGUI)
|
||||
#define MENU_DEFAULT_DRIVER MENU_RGUI
|
||||
#else
|
||||
#define MENU_DEFAULT_DRIVER MENU_NULL
|
||||
#endif
|
||||
|
||||
#if defined(XENON) || defined(_XBOX360) || defined(__CELLOS_LV2__)
|
||||
#define DEFAULT_ASPECT_RATIO 1.7778f
|
||||
#elif defined(_XBOX1) || defined(GEKKO) || defined(ANDROID)
|
||||
@@ -420,8 +48,6 @@ static const bool pointer_enable = true;
|
||||
static const bool pointer_enable = false;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Certain platforms might have assets stored in the bundle that
|
||||
* we need to extract to a user-writable directory on first boot.
|
||||
*
|
||||
@@ -594,16 +220,24 @@ static unsigned aspect_ratio_idx = ASPECT_RATIO_CORE;
|
||||
/* Save configuration file on exit. */
|
||||
static bool config_save_on_exit = true;
|
||||
|
||||
static bool show_hidden_files = true;
|
||||
static bool show_hidden_files = false;
|
||||
|
||||
static const bool overlay_hide_in_menu = true;
|
||||
|
||||
static const bool display_keyboard_overlay = false;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#include "menu/menu_display.h"
|
||||
#include "menu/menu_driver.h"
|
||||
|
||||
static bool default_block_config_read = true;
|
||||
static bool default_block_config_read = true;
|
||||
|
||||
static bool menu_show_online_updater = true;
|
||||
|
||||
#if defined(HAVE_LAKKA) || defined(VITA)
|
||||
static bool menu_show_core_updater = false;
|
||||
#else
|
||||
static bool menu_show_core_updater = true;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XMB
|
||||
static unsigned xmb_scale_factor = 100;
|
||||
@@ -619,8 +253,8 @@ static bool xmb_show_settings = true;
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
static bool xmb_show_images = true;
|
||||
#endif
|
||||
#ifdef HAVE_FFMPEG
|
||||
static bool xmb_show_music = true;
|
||||
#ifdef HAVE_FFMPEG
|
||||
static bool xmb_show_video = true;
|
||||
#endif
|
||||
#ifdef HAVE_NETWORKING
|
||||
@@ -638,13 +272,11 @@ static float menu_footer_opacity = 1.000;
|
||||
|
||||
static float menu_header_opacity = 1.000;
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL) || defined(HAVE_VULKAN)
|
||||
#if defined(HAVE_OPENGLES2) || (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__)))
|
||||
static unsigned menu_shader_pipeline = 1;
|
||||
#else
|
||||
static unsigned menu_shader_pipeline = 2;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static bool show_advanced_settings = false;
|
||||
static const uint32_t menu_entry_normal_color = 0xffffffff;
|
||||
@@ -791,6 +423,16 @@ static const float max_timing_skew = 0.05;
|
||||
/* Default audio volume in dB. (0.0 dB == unity gain). */
|
||||
static const float audio_volume = 0.0;
|
||||
|
||||
/* Default audio volume of the audio mixer in dB. (0.0 dB == unity gain). */
|
||||
static const float audio_mixer_volume = 0.0;
|
||||
|
||||
#ifdef HAVE_WASAPI
|
||||
/* WASAPI defaults */
|
||||
static const bool wasapi_exclusive_mode = true;
|
||||
static const bool wasapi_float_format = false;
|
||||
static const int wasapi_sh_buffer_length = -16; /* auto */
|
||||
#endif
|
||||
|
||||
/* MISC */
|
||||
|
||||
/* Enables displaying the current frames per second. */
|
||||
@@ -897,7 +539,7 @@ static const unsigned menu_dpi_override_value = 200;
|
||||
#endif
|
||||
|
||||
/* Log level for libretro cores (GET_LOG_INTERFACE). */
|
||||
static const unsigned libretro_log_level = 0;
|
||||
static const unsigned libretro_log_level = 1;
|
||||
|
||||
#ifndef RARCH_DEFAULT_PORT
|
||||
#define RARCH_DEFAULT_PORT 55435
|
||||
@@ -942,6 +584,8 @@ static const bool ui_companion_enable = false;
|
||||
#if defined(ANDROID)
|
||||
#if defined(ANDROID_ARM)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/android/latest/armeabi-v7a/";
|
||||
#elif defined(ANDROID_AARCH64)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/android/latest/arm64-v8a/";
|
||||
#elif defined(ANDROID_X86)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/android/latest/x86/";
|
||||
#else
|
||||
@@ -960,11 +604,19 @@ static char buildbot_server_url[] = "http://bot.libretro.com/nightly/apple/osx/x
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/apple/osx/ppc/latest/";
|
||||
#endif
|
||||
#elif defined(_WIN32) && !defined(_XBOX)
|
||||
#if _MSC_VER == 1600
|
||||
#if defined(__x86_64__)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2010/x86_64/latest/";
|
||||
#elif defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(_M_IX86) || defined(_M_IA64)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2010/x86/latest/";
|
||||
#endif
|
||||
#else
|
||||
#if defined(__x86_64__)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/win-x86_64/latest/";
|
||||
#elif defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(_M_IX86) || defined(_M_IA64)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/win-x86/latest/";
|
||||
#endif
|
||||
#endif
|
||||
#elif defined(__linux__)
|
||||
#if defined(__x86_64__)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/linux/x86_64/latest/";
|
||||
@@ -973,6 +625,8 @@ static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/linux/
|
||||
#else
|
||||
static char buildbot_server_url[] = "";
|
||||
#endif
|
||||
#elif defined(WIIU)
|
||||
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/nintendo/wiiu/latest/";
|
||||
#else
|
||||
static char buildbot_server_url[] = "";
|
||||
#endif
|
||||
|
||||
@@ -134,6 +134,12 @@ static const bool _alsa_supp = true;
|
||||
static const bool _alsa_supp = false;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TINYALSA
|
||||
static const bool _tinyalsa_supp = true;
|
||||
#else
|
||||
static const bool _tinyalsa_supp = false;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COREAUDIO
|
||||
static const bool _coreaudio_supp = true;
|
||||
#else
|
||||
@@ -194,6 +200,12 @@ static const bool _dsound_supp = true;
|
||||
static const bool _dsound_supp = false;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WASAPI
|
||||
static const bool _wasapi_supp = true;
|
||||
#else
|
||||
static const bool _wasapi_supp = false;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XAUDIO
|
||||
static const bool _xaudio_supp = true;
|
||||
#else
|
||||
|
||||
+1162
-691
File diff suppressed because it is too large.
Load diff
+346
-395
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
@@ -42,448 +43,398 @@ RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct settings
|
||||
{
|
||||
video_viewport_t video_viewport_custom;
|
||||
|
||||
char playlist_names[PATH_MAX_LENGTH];
|
||||
char playlist_cores[PATH_MAX_LENGTH];
|
||||
|
||||
bool bundle_finished;
|
||||
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
char context_driver[32];
|
||||
float scale;
|
||||
unsigned window_x;
|
||||
unsigned window_y;
|
||||
bool fullscreen;
|
||||
bool windowed_fullscreen;
|
||||
unsigned monitor_index;
|
||||
unsigned fullscreen_x;
|
||||
unsigned fullscreen_y;
|
||||
bool vsync;
|
||||
bool hard_sync;
|
||||
bool black_frame_insertion;
|
||||
unsigned max_swapchain_images;
|
||||
unsigned swap_interval;
|
||||
unsigned hard_sync_frames;
|
||||
unsigned frame_delay;
|
||||
bool placeholder;
|
||||
|
||||
/* Video */
|
||||
bool video_fullscreen;
|
||||
bool video_windowed_fullscreen;
|
||||
bool video_vsync;
|
||||
bool video_hard_sync;
|
||||
bool video_black_frame_insertion;
|
||||
#ifdef GEKKO
|
||||
unsigned viwidth;
|
||||
bool vfilter;
|
||||
bool video_vfilter;
|
||||
#endif
|
||||
bool smooth;
|
||||
bool force_aspect;
|
||||
bool crop_overscan;
|
||||
float aspect_ratio;
|
||||
bool aspect_ratio_auto;
|
||||
bool scale_integer;
|
||||
unsigned aspect_ratio_idx;
|
||||
unsigned rotation;
|
||||
bool video_smooth;
|
||||
bool video_force_aspect;
|
||||
bool video_crop_overscan;
|
||||
bool video_aspect_ratio_auto;
|
||||
bool video_scale_integer;
|
||||
bool video_shader_enable;
|
||||
bool video_threaded;
|
||||
bool video_font_enable;
|
||||
bool video_disable_composition;
|
||||
bool video_post_filter_record;
|
||||
bool video_gpu_record;
|
||||
bool video_gpu_screenshot;
|
||||
bool video_allow_rotate;
|
||||
bool video_shared_context;
|
||||
bool video_force_srgb_disable;
|
||||
bool video_fps_show;
|
||||
|
||||
bool shader_enable;
|
||||
/* Audio */
|
||||
bool audio_enable;
|
||||
bool audio_sync;
|
||||
bool audio_rate_control;
|
||||
#ifdef HAVE_WASAPI
|
||||
bool audio_wasapi_exclusive_mode;
|
||||
bool audio_wasapi_float_format;
|
||||
#endif
|
||||
|
||||
float refresh_rate;
|
||||
bool threaded;
|
||||
|
||||
|
||||
float font_size;
|
||||
bool font_enable;
|
||||
float msg_pos_x;
|
||||
float msg_pos_y;
|
||||
float msg_color_r;
|
||||
float msg_color_g;
|
||||
float msg_color_b;
|
||||
|
||||
bool disable_composition;
|
||||
|
||||
bool post_filter_record;
|
||||
bool gpu_record;
|
||||
bool gpu_screenshot;
|
||||
|
||||
bool allow_rotate;
|
||||
bool shared_context;
|
||||
bool force_srgb_disable;
|
||||
} video;
|
||||
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
} record;
|
||||
|
||||
struct
|
||||
{
|
||||
bool menubar_enable;
|
||||
bool suspend_screensaver_enable;
|
||||
bool companion_start_on_boot;
|
||||
bool companion_enable;
|
||||
} ui;
|
||||
/* Input */
|
||||
bool input_remap_binds_enable;
|
||||
bool input_autodetect_enable;
|
||||
bool input_overlay_enable;
|
||||
bool input_overlay_enable_autopreferred;
|
||||
bool input_overlay_hide_in_menu;
|
||||
bool input_descriptor_label_show;
|
||||
bool input_descriptor_hide_unbound;
|
||||
bool input_all_users_control_menu;
|
||||
bool input_menu_swap_ok_cancel_buttons;
|
||||
#if defined(VITA)
|
||||
bool input_backtouch_enable;
|
||||
bool input_backtouch_toggle;
|
||||
#endif
|
||||
#if TARGET_OS_IPHONE
|
||||
bool input_small_keyboard_enable;
|
||||
#endif
|
||||
bool input_keyboard_gamepad_enable;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
bool pause_libretro;
|
||||
bool timedate_enable;
|
||||
bool battery_level_enable;
|
||||
bool core_enable;
|
||||
bool dynamic_wallpaper_enable;
|
||||
unsigned thumbnails;
|
||||
bool throttle;
|
||||
|
||||
struct
|
||||
{
|
||||
float opacity;
|
||||
} wallpaper;
|
||||
|
||||
struct
|
||||
{
|
||||
float opacity;
|
||||
} footer;
|
||||
|
||||
struct
|
||||
{
|
||||
float opacity;
|
||||
} header;
|
||||
|
||||
struct
|
||||
{
|
||||
bool enable;
|
||||
} mouse;
|
||||
|
||||
struct
|
||||
{
|
||||
bool enable;
|
||||
} pointer;
|
||||
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
bool enable;
|
||||
} wraparound;
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
bool supported_extensions_enable;
|
||||
} filter;
|
||||
} browser;
|
||||
} navigation;
|
||||
|
||||
struct
|
||||
{
|
||||
bool override_enable;
|
||||
unsigned override_value;
|
||||
} dpi;
|
||||
|
||||
bool show_advanced_settings;
|
||||
|
||||
unsigned entry_normal_color;
|
||||
unsigned entry_hover_color;
|
||||
unsigned title_color;
|
||||
bool throttle_framerate;
|
||||
bool linear_filter;
|
||||
|
||||
struct
|
||||
{
|
||||
unsigned shader_pipeline;
|
||||
char font[PATH_MAX_LENGTH];
|
||||
unsigned scale_factor;
|
||||
unsigned alpha_factor;
|
||||
unsigned theme;
|
||||
unsigned menu_color_theme;
|
||||
bool shadows_enable;
|
||||
bool show_settings;
|
||||
bool show_images;
|
||||
bool show_music;
|
||||
bool show_video;
|
||||
bool show_netplay;
|
||||
bool show_history;
|
||||
bool show_add;
|
||||
} xmb;
|
||||
|
||||
struct
|
||||
{
|
||||
unsigned menu_color_theme;
|
||||
} materialui;
|
||||
|
||||
bool unified_controls;
|
||||
} menu;
|
||||
/* Menu */
|
||||
bool filter_by_current_core;
|
||||
bool menu_show_start_screen;
|
||||
bool menu_pause_libretro;
|
||||
bool menu_timedate_enable;
|
||||
bool menu_battery_level_enable;
|
||||
bool menu_core_enable;
|
||||
bool menu_dynamic_wallpaper_enable;
|
||||
bool menu_throttle;
|
||||
bool menu_mouse_enable;
|
||||
bool menu_pointer_enable;
|
||||
bool menu_navigation_wraparound_enable;
|
||||
bool menu_navigation_browser_filter_supported_extensions_enable;
|
||||
bool menu_dpi_override_enable;
|
||||
bool menu_show_advanced_settings;
|
||||
bool menu_throttle_framerate;
|
||||
bool menu_linear_filter;
|
||||
bool menu_show_online_updater;
|
||||
bool menu_show_core_updater;
|
||||
bool menu_xmb_shadows_enable;
|
||||
bool menu_xmb_show_settings;
|
||||
bool menu_xmb_show_images;
|
||||
bool menu_xmb_show_music;
|
||||
bool menu_xmb_show_video;
|
||||
bool menu_xmb_show_netplay;
|
||||
bool menu_xmb_show_history;
|
||||
bool menu_xmb_show_add;
|
||||
bool menu_unified_controls;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
/* Netplay */
|
||||
bool netplay_public_announce;
|
||||
bool netplay_start_as_spectator;
|
||||
bool netplay_allow_slaves;
|
||||
bool netplay_require_slaves;
|
||||
bool netplay_stateless_mode;
|
||||
bool netplay_swap_input;
|
||||
bool netplay_nat_traversal;
|
||||
bool netplay_use_mitm_server;
|
||||
#endif
|
||||
|
||||
/* Network */
|
||||
bool network_buildbot_auto_extract_archive;
|
||||
|
||||
/* UI */
|
||||
bool ui_menubar_enable;
|
||||
bool ui_suspend_screensaver_enable;
|
||||
bool ui_companion_start_on_boot;
|
||||
bool ui_companion_enable;
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* Cheevos */
|
||||
bool cheevos_enable;
|
||||
bool cheevos_test_unofficial;
|
||||
bool cheevos_hardcore_mode_enable;
|
||||
bool cheevos_verbose_enable;
|
||||
#endif
|
||||
|
||||
/* Camera */
|
||||
bool camera_allow;
|
||||
|
||||
/* WiFi */
|
||||
bool wifi_allow;
|
||||
|
||||
/* Location */
|
||||
bool location_allow;
|
||||
|
||||
/* Multimedia */
|
||||
bool multimedia_builtin_mediaplayer_enable;
|
||||
bool multimedia_builtin_imageviewer_enable;
|
||||
|
||||
/* Bundle */
|
||||
bool bundle_finished;
|
||||
bool bundle_assets_extract_enable;
|
||||
|
||||
/* Misc. */
|
||||
#ifdef HAVE_THREADS
|
||||
bool threaded_data_runloop_enable;
|
||||
bool threaded_data_runloop_enable;
|
||||
#endif
|
||||
bool set_supports_no_game_enable;
|
||||
bool auto_screenshot_filename;
|
||||
bool history_list_enable;
|
||||
bool playlist_entry_remove;
|
||||
bool rewind_enable;
|
||||
bool pause_nonactive;
|
||||
bool block_sram_overwrite;
|
||||
bool savestate_auto_index;
|
||||
bool savestate_auto_save;
|
||||
bool savestate_auto_load;
|
||||
bool savestate_thumbnail_enable;
|
||||
bool network_cmd_enable;
|
||||
bool stdin_cmd_enable;
|
||||
bool network_remote_enable;
|
||||
bool network_remote_enable_user[MAX_USERS];
|
||||
bool load_dummy_on_core_shutdown;
|
||||
bool check_firmware_before_loading;
|
||||
|
||||
bool game_specific_options;
|
||||
bool auto_overrides_enable;
|
||||
bool auto_remaps_enable;
|
||||
bool auto_shaders_enable;
|
||||
|
||||
bool sort_savefiles_enable;
|
||||
bool sort_savestates_enable;
|
||||
bool config_save_on_exit;
|
||||
bool show_hidden_files;
|
||||
#ifdef HAVE_LAKKA
|
||||
bool ssh_enable;
|
||||
bool samba_enable;
|
||||
bool bluetooth_enable;
|
||||
#endif
|
||||
} bools;
|
||||
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
char device[255];
|
||||
bool allow;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
} camera;
|
||||
float placeholder;
|
||||
float video_scale;
|
||||
float video_aspect_ratio;
|
||||
float video_refresh_rate;
|
||||
float video_font_size;
|
||||
float video_msg_pos_x;
|
||||
float video_msg_pos_y;
|
||||
float video_msg_color_r;
|
||||
float video_msg_color_g;
|
||||
float video_msg_color_b;
|
||||
|
||||
float menu_wallpaper_opacity;
|
||||
float menu_footer_opacity;
|
||||
float menu_header_opacity;
|
||||
|
||||
float audio_max_timing_skew;
|
||||
float audio_volume; /* dB scale. */
|
||||
float audio_mixer_volume; /* dB scale. */
|
||||
|
||||
float input_overlay_opacity;
|
||||
float input_overlay_scale;
|
||||
|
||||
float slowmotion_ratio;
|
||||
float fastforward_ratio;
|
||||
} floats;
|
||||
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
bool allow;
|
||||
} wifi;
|
||||
int placeholder;
|
||||
int netplay_check_frames;
|
||||
int location_update_interval_ms;
|
||||
int location_update_interval_distance;
|
||||
int state_slot;
|
||||
|
||||
#ifdef HAVE_WASAPI
|
||||
int audio_wasapi_sh_buffer_length;
|
||||
#endif
|
||||
} ints;
|
||||
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
bool allow;
|
||||
int update_interval_ms;
|
||||
int update_interval_distance;
|
||||
} location;
|
||||
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
char resampler[32];
|
||||
char device[255];
|
||||
bool enable;
|
||||
bool mute_enable;
|
||||
unsigned out_rate;
|
||||
unsigned block_frames;
|
||||
unsigned latency;
|
||||
bool sync;
|
||||
|
||||
|
||||
bool rate_control;
|
||||
float rate_control_delta;
|
||||
float max_timing_skew;
|
||||
float volume; /* dB scale. */
|
||||
} audio;
|
||||
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
char joypad_driver[32];
|
||||
char keyboard_layout[64];
|
||||
char device_names[MAX_USERS][64];
|
||||
|
||||
unsigned remap_ids[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
struct retro_keybind binds[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
struct retro_keybind autoconf_binds[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
|
||||
unsigned max_users;
|
||||
unsigned placeholder;
|
||||
unsigned audio_out_rate;
|
||||
unsigned audio_block_frames;
|
||||
unsigned audio_latency;
|
||||
unsigned input_remap_ids[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
|
||||
/* Set by autoconfiguration in joypad_autoconfig_dir.
|
||||
* Does not override main binds. */
|
||||
bool autoconfigured[MAX_USERS];
|
||||
int vid[MAX_USERS];
|
||||
int pid[MAX_USERS];
|
||||
unsigned input_libretro_device[MAX_USERS];
|
||||
unsigned input_analog_dpad_mode[MAX_USERS];
|
||||
|
||||
unsigned libretro_device[MAX_USERS];
|
||||
unsigned analog_dpad_mode[MAX_USERS];
|
||||
unsigned input_joypad_map[MAX_USERS];
|
||||
unsigned input_device[MAX_USERS];
|
||||
unsigned input_mouse_index[MAX_USERS];
|
||||
|
||||
bool remap_binds_enable;
|
||||
float axis_threshold;
|
||||
unsigned joypad_map[MAX_USERS];
|
||||
unsigned device[MAX_USERS];
|
||||
unsigned device_name_index[MAX_USERS];
|
||||
bool autodetect_enable;
|
||||
unsigned input_turbo_period;
|
||||
unsigned input_turbo_duty_cycle;
|
||||
|
||||
unsigned turbo_period;
|
||||
unsigned turbo_duty_cycle;
|
||||
unsigned input_bind_timeout;
|
||||
|
||||
bool overlay_enable;
|
||||
bool overlay_enable_autopreferred;
|
||||
bool overlay_hide_in_menu;
|
||||
float overlay_opacity;
|
||||
float overlay_scale;
|
||||
|
||||
unsigned bind_timeout;
|
||||
bool input_descriptor_label_show;
|
||||
bool input_descriptor_hide_unbound;
|
||||
|
||||
unsigned menu_toggle_gamepad_combo;
|
||||
bool all_users_control_menu;
|
||||
|
||||
bool menu_swap_ok_cancel_buttons;
|
||||
#if defined(VITA)
|
||||
bool backtouch_enable;
|
||||
bool backtouch_toggle;
|
||||
unsigned input_menu_toggle_gamepad_combo;
|
||||
unsigned input_keyboard_gamepad_mapping_type;
|
||||
unsigned input_poll_type_behavior;
|
||||
unsigned netplay_port;
|
||||
unsigned netplay_input_latency_frames_min;
|
||||
unsigned netplay_input_latency_frames_range;
|
||||
unsigned bundle_assets_extract_version_current;
|
||||
unsigned bundle_assets_extract_last_version;
|
||||
unsigned content_history_size;
|
||||
unsigned libretro_log_level;
|
||||
unsigned rewind_granularity;
|
||||
unsigned autosave_interval;
|
||||
unsigned network_cmd_port;
|
||||
unsigned network_remote_base_port;
|
||||
unsigned video_window_x;
|
||||
unsigned video_window_y;
|
||||
unsigned video_monitor_index;
|
||||
unsigned video_fullscreen_x;
|
||||
unsigned video_fullscreen_y;
|
||||
unsigned video_max_swapchain_images;
|
||||
unsigned video_swap_interval;
|
||||
unsigned video_hard_sync_frames;
|
||||
unsigned video_frame_delay;
|
||||
#ifdef GEKKO
|
||||
unsigned video_viwidth;
|
||||
#endif
|
||||
#if TARGET_OS_IPHONE
|
||||
bool small_keyboard_enable;
|
||||
unsigned video_aspect_ratio_idx;
|
||||
unsigned video_rotation;
|
||||
|
||||
unsigned menu_thumbnails;
|
||||
unsigned menu_dpi_override_value;
|
||||
unsigned menu_entry_normal_color;
|
||||
unsigned menu_entry_hover_color;
|
||||
unsigned menu_title_color;
|
||||
unsigned menu_xmb_shader_pipeline;
|
||||
unsigned menu_xmb_scale_factor;
|
||||
unsigned menu_xmb_alpha_factor;
|
||||
unsigned menu_xmb_theme;
|
||||
unsigned menu_xmb_color_theme;
|
||||
unsigned menu_materialui_color_theme;
|
||||
|
||||
unsigned camera_width;
|
||||
unsigned camera_height;
|
||||
} uints;
|
||||
|
||||
struct
|
||||
{
|
||||
char placeholder;
|
||||
|
||||
char playlist_names[PATH_MAX_LENGTH];
|
||||
char playlist_cores[PATH_MAX_LENGTH];
|
||||
char video_driver[32];
|
||||
char record_driver[32];
|
||||
char camera_driver[32];
|
||||
char wifi_driver[32];
|
||||
char location_driver[32];
|
||||
#ifdef HAVE_MENU
|
||||
char menu_driver[32];
|
||||
#endif
|
||||
bool keyboard_gamepad_enable;
|
||||
unsigned keyboard_gamepad_mapping_type;
|
||||
unsigned poll_type_behavior;
|
||||
} input;
|
||||
|
||||
struct
|
||||
{
|
||||
unsigned mode;
|
||||
} archive;
|
||||
|
||||
struct
|
||||
{
|
||||
char buildbot_url[255];
|
||||
char buildbot_assets_url[255];
|
||||
bool buildbot_auto_extract_archive;
|
||||
} network;
|
||||
|
||||
bool set_supports_no_game_enable;
|
||||
|
||||
struct
|
||||
{
|
||||
bool builtin_mediaplayer_enable;
|
||||
bool builtin_imageviewer_enable;
|
||||
} multimedia;
|
||||
|
||||
char audio_device[255];
|
||||
char camera_device[255];
|
||||
#ifdef HAVE_CHEEVOS
|
||||
struct
|
||||
{
|
||||
bool enable;
|
||||
bool test_unofficial;
|
||||
bool hardcore_mode_enable;
|
||||
char username[32];
|
||||
char password[32];
|
||||
} cheevos;
|
||||
char cheevos_username[32];
|
||||
char cheevos_password[32];
|
||||
#endif
|
||||
|
||||
char browse_url[4096];
|
||||
|
||||
int state_slot;
|
||||
|
||||
bool bundle_assets_extract_enable;
|
||||
unsigned bundle_assets_extract_version_current;
|
||||
unsigned bundle_assets_extract_last_version;
|
||||
|
||||
struct
|
||||
{
|
||||
char cheat_database[PATH_MAX_LENGTH];
|
||||
char content_database[PATH_MAX_LENGTH];
|
||||
char overlay[PATH_MAX_LENGTH];
|
||||
char menu_wallpaper[PATH_MAX_LENGTH];
|
||||
char audio_dsp_plugin[PATH_MAX_LENGTH];
|
||||
char softfilter_plugin[PATH_MAX_LENGTH];
|
||||
char core_options[PATH_MAX_LENGTH];
|
||||
char content_history[PATH_MAX_LENGTH];
|
||||
char content_music_history[PATH_MAX_LENGTH];
|
||||
char content_image_history[PATH_MAX_LENGTH];
|
||||
char content_video_history[PATH_MAX_LENGTH];
|
||||
char libretro_info[PATH_MAX_LENGTH];
|
||||
char cheat_settings[PATH_MAX_LENGTH];
|
||||
char video_context_driver[32];
|
||||
char audio_driver[32];
|
||||
char audio_resampler[32];
|
||||
char input_driver[32];
|
||||
char input_joypad_driver[32];
|
||||
char input_keyboard_layout[64];
|
||||
char bundle_assets_src[PATH_MAX_LENGTH];
|
||||
char bundle_assets_dst[PATH_MAX_LENGTH];
|
||||
char bundle_assets_dst_subdir[PATH_MAX_LENGTH];
|
||||
char shader[PATH_MAX_LENGTH];
|
||||
char font[PATH_MAX_LENGTH];
|
||||
} path;
|
||||
} arrays;
|
||||
|
||||
struct
|
||||
{
|
||||
char audio_filter[PATH_MAX_LENGTH];
|
||||
char autoconfig[PATH_MAX_LENGTH];
|
||||
char video_filter[PATH_MAX_LENGTH];
|
||||
char video_shader[PATH_MAX_LENGTH];
|
||||
char content_history[PATH_MAX_LENGTH];
|
||||
char libretro[PATH_MAX_LENGTH];
|
||||
char cursor[PATH_MAX_LENGTH];
|
||||
char input_remapping[PATH_MAX_LENGTH];
|
||||
char overlay[PATH_MAX_LENGTH];
|
||||
char resampler[PATH_MAX_LENGTH];
|
||||
char screenshot[PATH_MAX_LENGTH];
|
||||
char system[PATH_MAX_LENGTH];
|
||||
char cache[PATH_MAX_LENGTH];
|
||||
char playlist[PATH_MAX_LENGTH];
|
||||
char core_assets[PATH_MAX_LENGTH];
|
||||
char assets[PATH_MAX_LENGTH];
|
||||
char dynamic_wallpapers[PATH_MAX_LENGTH];
|
||||
char thumbnails[PATH_MAX_LENGTH];
|
||||
char menu_config[PATH_MAX_LENGTH];
|
||||
char menu_content[PATH_MAX_LENGTH];
|
||||
} directory;
|
||||
char placeholder;
|
||||
|
||||
|
||||
char browse_url[4096];
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
char path_menu_xmb_font[PATH_MAX_LENGTH];
|
||||
#endif
|
||||
char path_cheat_database[PATH_MAX_LENGTH];
|
||||
char path_content_database[PATH_MAX_LENGTH];
|
||||
char path_overlay[PATH_MAX_LENGTH];
|
||||
char path_menu_wallpaper[PATH_MAX_LENGTH];
|
||||
char path_audio_dsp_plugin[PATH_MAX_LENGTH];
|
||||
char path_softfilter_plugin[PATH_MAX_LENGTH];
|
||||
char path_core_options[PATH_MAX_LENGTH];
|
||||
char path_content_history[PATH_MAX_LENGTH];
|
||||
char path_content_music_history[PATH_MAX_LENGTH];
|
||||
char path_content_image_history[PATH_MAX_LENGTH];
|
||||
char path_content_video_history[PATH_MAX_LENGTH];
|
||||
char path_libretro_info[PATH_MAX_LENGTH];
|
||||
char path_cheat_settings[PATH_MAX_LENGTH];
|
||||
char path_shader[PATH_MAX_LENGTH];
|
||||
char path_font[PATH_MAX_LENGTH];
|
||||
|
||||
char network_buildbot_url[255];
|
||||
char network_buildbot_assets_url[255];
|
||||
|
||||
char directory_audio_filter[PATH_MAX_LENGTH];
|
||||
char directory_autoconfig[PATH_MAX_LENGTH];
|
||||
char directory_video_filter[PATH_MAX_LENGTH];
|
||||
char directory_video_shader[PATH_MAX_LENGTH];
|
||||
char directory_content_history[PATH_MAX_LENGTH];
|
||||
char directory_libretro[PATH_MAX_LENGTH];
|
||||
char directory_cursor[PATH_MAX_LENGTH];
|
||||
char directory_input_remapping[PATH_MAX_LENGTH];
|
||||
char directory_overlay[PATH_MAX_LENGTH];
|
||||
char directory_resampler[PATH_MAX_LENGTH];
|
||||
char directory_screenshot[PATH_MAX_LENGTH];
|
||||
char directory_system[PATH_MAX_LENGTH];
|
||||
char directory_cache[PATH_MAX_LENGTH];
|
||||
char directory_playlist[PATH_MAX_LENGTH];
|
||||
char directory_core_assets[PATH_MAX_LENGTH];
|
||||
char directory_assets[PATH_MAX_LENGTH];
|
||||
char directory_dynamic_wallpapers[PATH_MAX_LENGTH];
|
||||
char directory_thumbnails[PATH_MAX_LENGTH];
|
||||
char directory_menu_config[PATH_MAX_LENGTH];
|
||||
char directory_menu_content[PATH_MAX_LENGTH];
|
||||
#ifdef HAVE_NETWORKING
|
||||
struct
|
||||
{
|
||||
bool public_announce;
|
||||
char server[255];
|
||||
unsigned port;
|
||||
bool start_as_spectator;
|
||||
bool allow_slaves;
|
||||
bool require_slaves;
|
||||
bool stateless_mode;
|
||||
int check_frames;
|
||||
unsigned input_latency_frames_min;
|
||||
unsigned input_latency_frames_range;
|
||||
bool swap_input;
|
||||
bool nat_traversal;
|
||||
char password[128];
|
||||
char spectate_password[128];
|
||||
bool use_mitm_server;
|
||||
} netplay;
|
||||
char netplay_server[255];
|
||||
char netplay_password[128];
|
||||
char netplay_spectate_password[128];
|
||||
#endif
|
||||
char username[32];
|
||||
} paths;
|
||||
|
||||
unsigned content_history_size;
|
||||
bool modified;
|
||||
|
||||
unsigned libretro_log_level;
|
||||
video_viewport_t video_viewport_custom;
|
||||
|
||||
bool auto_screenshot_filename;
|
||||
|
||||
bool history_list_enable;
|
||||
bool playlist_entry_remove;
|
||||
bool rewind_enable;
|
||||
size_t rewind_buffer_size;
|
||||
unsigned rewind_granularity;
|
||||
|
||||
float slowmotion_ratio;
|
||||
float fastforward_ratio;
|
||||
|
||||
bool pause_nonactive;
|
||||
unsigned autosave_interval;
|
||||
|
||||
bool block_sram_overwrite;
|
||||
bool savestate_auto_index;
|
||||
bool savestate_auto_save;
|
||||
bool savestate_auto_load;
|
||||
bool savestate_thumbnail_enable;
|
||||
|
||||
bool network_cmd_enable;
|
||||
unsigned network_cmd_port;
|
||||
bool stdin_cmd_enable;
|
||||
bool network_remote_enable;
|
||||
bool network_remote_enable_user[MAX_USERS];
|
||||
unsigned network_remote_base_port;
|
||||
|
||||
#if defined(HAVE_MENU)
|
||||
bool menu_show_start_screen;
|
||||
#endif
|
||||
bool fps_show;
|
||||
bool load_dummy_on_core_shutdown;
|
||||
bool check_firmware_before_loading;
|
||||
|
||||
bool game_specific_options;
|
||||
bool auto_overrides_enable;
|
||||
bool auto_remaps_enable;
|
||||
bool auto_shaders_enable;
|
||||
|
||||
bool sort_savefiles_enable;
|
||||
bool sort_savestates_enable;
|
||||
|
||||
char username[32];
|
||||
#ifdef HAVE_LANGEXTRA
|
||||
unsigned int user_language;
|
||||
#endif
|
||||
|
||||
bool config_save_on_exit;
|
||||
bool show_hidden_files;
|
||||
|
||||
#ifdef HAVE_LAKKA
|
||||
bool ssh_enable;
|
||||
bool samba_enable;
|
||||
bool bluetooth_enable;
|
||||
#endif
|
||||
|
||||
} settings_t;
|
||||
|
||||
#define configuration_set_float(settings, var, newvar) \
|
||||
settings->modified = true; \
|
||||
var = newvar
|
||||
|
||||
#define configuration_set_bool(settings, var, newvar) \
|
||||
settings->modified = true; \
|
||||
var = newvar
|
||||
|
||||
#define configuration_set_uint(settings, var, newvar) \
|
||||
settings->modified = true; \
|
||||
var = newvar
|
||||
|
||||
#define configuration_set_int(settings, var, newvar) \
|
||||
settings->modified = true; \
|
||||
var = newvar
|
||||
|
||||
/**
|
||||
* config_get_default_camera:
|
||||
*
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||
* Copyright (C) 2016 - Brad Parker
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
@@ -66,7 +66,7 @@ void content_set_does_not_need_content(void);
|
||||
|
||||
void content_unset_does_not_need_content(void);
|
||||
|
||||
bool content_get_crc(uint32_t **content_crc_ptr);
|
||||
uint32_t content_get_crc(void);
|
||||
|
||||
void content_deinit(void);
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ typedef struct rarch_system_info
|
||||
|
||||
unsigned rotation;
|
||||
unsigned performance_level;
|
||||
bool load_no_content;
|
||||
|
||||
const char *input_desc_btn[MAX_USERS][RARCH_FIRST_META_KEY];
|
||||
char valid_extensions[255];
|
||||
@@ -141,14 +142,6 @@ typedef struct retro_ctx_environ_info
|
||||
retro_environment_t env;
|
||||
} retro_ctx_environ_info_t;
|
||||
|
||||
typedef struct retro_ctx_frame_info
|
||||
{
|
||||
const void *data;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
size_t pitch;
|
||||
} retro_ctx_frame_info_t;
|
||||
|
||||
typedef struct retro_callbacks
|
||||
{
|
||||
retro_video_refresh_t frame_cb;
|
||||
@@ -162,7 +155,7 @@ bool core_load(unsigned poll_type_behavior);
|
||||
|
||||
bool core_unload(void);
|
||||
|
||||
bool core_set_default_callbacks(void *data);
|
||||
bool core_set_default_callbacks(struct retro_callbacks *cbs);
|
||||
|
||||
bool core_set_rewind_callbacks(void);
|
||||
|
||||
@@ -185,10 +178,6 @@ bool core_unload_game(void);
|
||||
|
||||
bool core_reset(void);
|
||||
|
||||
void core_frame(retro_ctx_frame_info_t *info);
|
||||
|
||||
bool core_poll(void);
|
||||
|
||||
bool core_set_environment(retro_ctx_environ_info_t *info);
|
||||
|
||||
bool core_serialize_size(retro_ctx_size_info_t *info);
|
||||
@@ -249,6 +238,8 @@ bool core_is_inited(void);
|
||||
|
||||
bool core_is_game_loaded(void);
|
||||
|
||||
extern struct retro_callbacks retro_ctx;
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
+93
-114
@@ -1,8 +1,8 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2012-2015 - Michael Lelli
|
||||
* Copyright (C) 2016 - Brad Parker
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
@@ -44,39 +44,44 @@
|
||||
#include "gfx/video_driver.h"
|
||||
#include "audio/audio_driver.h"
|
||||
|
||||
static unsigned core_poll_type = POLL_TYPE_EARLY;
|
||||
static bool core_inited = false;
|
||||
static bool core_symbols_inited = false;
|
||||
static bool core_game_loaded = false;
|
||||
static bool core_input_polled = false;
|
||||
static bool core_has_set_input_descriptors = false;
|
||||
static uint64_t core_serialization_quirks_v = 0;
|
||||
struct retro_callbacks retro_ctx;
|
||||
struct retro_core_t current_core;
|
||||
|
||||
static struct retro_callbacks retro_ctx;
|
||||
static struct retro_core_t core;
|
||||
static void retro_run_null(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void retro_frame_null(const void *data, unsigned width,
|
||||
unsigned height, size_t pitch)
|
||||
{
|
||||
}
|
||||
|
||||
static void retro_input_poll_null(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void core_input_state_poll_maybe(void)
|
||||
{
|
||||
if (core_poll_type == POLL_TYPE_NORMAL)
|
||||
if (current_core.poll_type == POLL_TYPE_NORMAL)
|
||||
input_poll();
|
||||
}
|
||||
|
||||
static int16_t core_input_state_poll(unsigned port,
|
||||
unsigned device, unsigned idx, unsigned id)
|
||||
{
|
||||
if (core_poll_type == POLL_TYPE_LATE)
|
||||
if (current_core.poll_type == POLL_TYPE_LATE)
|
||||
{
|
||||
if (!core_input_polled)
|
||||
if (!current_core.input_polled)
|
||||
input_poll();
|
||||
|
||||
core_input_polled = true;
|
||||
current_core.input_polled = true;
|
||||
}
|
||||
return input_state(port, device, idx, id);
|
||||
}
|
||||
|
||||
void core_set_input_state(retro_ctx_input_state_info_t *info)
|
||||
{
|
||||
core.retro_set_input_state(info->cb);
|
||||
current_core.retro_set_input_state(info->cb);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,18 +91,13 @@ void core_set_input_state(retro_ctx_input_state_info_t *info)
|
||||
* Initializes libretro callbacks, and binds the libretro callbacks
|
||||
* to default callback functions.
|
||||
**/
|
||||
static bool core_init_libretro_cbs(void *data)
|
||||
static bool core_init_libretro_cbs(struct retro_callbacks *cbs)
|
||||
{
|
||||
struct retro_callbacks *cbs = (struct retro_callbacks*)data;
|
||||
|
||||
if (!cbs)
|
||||
return false;
|
||||
|
||||
core.retro_set_video_refresh(video_driver_frame);
|
||||
core.retro_set_audio_sample(audio_driver_sample);
|
||||
core.retro_set_audio_sample_batch(audio_driver_sample_batch);
|
||||
core.retro_set_input_state(core_input_state_poll);
|
||||
core.retro_set_input_poll(core_input_state_poll_maybe);
|
||||
current_core.retro_set_video_refresh(video_driver_frame);
|
||||
current_core.retro_set_audio_sample(audio_driver_sample);
|
||||
current_core.retro_set_audio_sample_batch(audio_driver_sample_batch);
|
||||
current_core.retro_set_input_state(core_input_state_poll);
|
||||
current_core.retro_set_input_poll(core_input_state_poll_maybe);
|
||||
|
||||
core_set_default_callbacks(cbs);
|
||||
|
||||
@@ -117,13 +117,8 @@ static bool core_init_libretro_cbs(void *data)
|
||||
*
|
||||
* Binds the libretro callbacks to default callback functions.
|
||||
**/
|
||||
bool core_set_default_callbacks(void *data)
|
||||
bool core_set_default_callbacks(struct retro_callbacks *cbs)
|
||||
{
|
||||
struct retro_callbacks *cbs = (struct retro_callbacks*)data;
|
||||
|
||||
if (!cbs)
|
||||
return false;
|
||||
|
||||
cbs->frame_cb = video_driver_frame;
|
||||
cbs->sample_cb = audio_driver_sample;
|
||||
cbs->sample_batch_cb = audio_driver_sample_batch;
|
||||
@@ -141,13 +136,13 @@ bool core_deinit(void *data)
|
||||
if (!cbs)
|
||||
return false;
|
||||
|
||||
cbs->frame_cb = NULL;
|
||||
cbs->frame_cb = retro_frame_null;
|
||||
cbs->sample_cb = NULL;
|
||||
cbs->sample_batch_cb = NULL;
|
||||
cbs->state_cb = NULL;
|
||||
cbs->poll_cb = NULL;
|
||||
cbs->poll_cb = retro_input_poll_null;
|
||||
|
||||
core_inited = false;
|
||||
current_core.inited = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -167,13 +162,13 @@ bool core_set_rewind_callbacks(void)
|
||||
{
|
||||
if (state_manager_frame_is_reversed())
|
||||
{
|
||||
core.retro_set_audio_sample(audio_driver_sample_rewind);
|
||||
core.retro_set_audio_sample_batch(audio_driver_sample_batch_rewind);
|
||||
current_core.retro_set_audio_sample(audio_driver_sample_rewind);
|
||||
current_core.retro_set_audio_sample_batch(audio_driver_sample_batch_rewind);
|
||||
}
|
||||
else
|
||||
{
|
||||
core.retro_set_audio_sample(audio_driver_sample);
|
||||
core.retro_set_audio_sample_batch(audio_driver_sample_batch);
|
||||
current_core.retro_set_audio_sample(audio_driver_sample);
|
||||
current_core.retro_set_audio_sample_batch(audio_driver_sample_batch);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -188,13 +183,13 @@ bool core_set_rewind_callbacks(void)
|
||||
bool core_set_netplay_callbacks(void)
|
||||
{
|
||||
/* Force normal poll type for netplay. */
|
||||
core_poll_type = POLL_TYPE_NORMAL;
|
||||
current_core.poll_type = POLL_TYPE_NORMAL;
|
||||
|
||||
/* And use netplay's interceding callbacks */
|
||||
core.retro_set_video_refresh(video_frame_net);
|
||||
core.retro_set_audio_sample(audio_sample_net);
|
||||
core.retro_set_audio_sample_batch(audio_sample_batch_net);
|
||||
core.retro_set_input_state(input_state_net);
|
||||
current_core.retro_set_video_refresh(video_frame_net);
|
||||
current_core.retro_set_audio_sample(audio_sample_net);
|
||||
current_core.retro_set_audio_sample_batch(audio_sample_batch_net);
|
||||
current_core.retro_set_input_state(input_state_net);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -211,10 +206,10 @@ bool core_unset_netplay_callbacks(void)
|
||||
if (!core_set_default_callbacks(&cbs))
|
||||
return false;
|
||||
|
||||
core.retro_set_video_refresh(cbs.frame_cb);
|
||||
core.retro_set_audio_sample(cbs.sample_cb);
|
||||
core.retro_set_audio_sample_batch(cbs.sample_batch_cb);
|
||||
core.retro_set_input_state(cbs.state_cb);
|
||||
current_core.retro_set_video_refresh(cbs.frame_cb);
|
||||
current_core.retro_set_audio_sample(cbs.sample_cb);
|
||||
current_core.retro_set_audio_sample_batch(cbs.sample_batch_cb);
|
||||
current_core.retro_set_input_state(cbs.state_cb);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -222,13 +217,13 @@ bool core_unset_netplay_callbacks(void)
|
||||
|
||||
bool core_set_cheat(retro_ctx_cheat_info_t *info)
|
||||
{
|
||||
core.retro_cheat_set(info->index, info->enabled, info->code);
|
||||
current_core.retro_cheat_set(info->index, info->enabled, info->code);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool core_reset_cheat(void)
|
||||
{
|
||||
core.retro_cheat_reset();
|
||||
current_core.retro_cheat_reset();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -236,29 +231,30 @@ bool core_api_version(retro_ctx_api_info_t *api)
|
||||
{
|
||||
if (!api)
|
||||
return false;
|
||||
api->version = core.retro_api_version();
|
||||
api->version = current_core.retro_api_version();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool core_set_poll_type(unsigned *type)
|
||||
{
|
||||
core_poll_type = *type;
|
||||
current_core.poll_type = *type;
|
||||
return true;
|
||||
}
|
||||
|
||||
void core_uninit_symbols(void)
|
||||
{
|
||||
uninit_libretro_sym(&core);
|
||||
core_symbols_inited = false;
|
||||
uninit_libretro_sym(¤t_core);
|
||||
current_core.symbols_inited = false;
|
||||
}
|
||||
|
||||
bool core_init_symbols(enum rarch_core_type *type)
|
||||
{
|
||||
if (!type)
|
||||
if (!type || !init_libretro_sym(*type, ¤t_core))
|
||||
return false;
|
||||
if (!init_libretro_sym(*type, &core))
|
||||
return false;
|
||||
core_symbols_inited = true;
|
||||
|
||||
if (!current_core.retro_run)
|
||||
current_core.retro_run = retro_run_null;
|
||||
current_core.symbols_inited = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -266,7 +262,7 @@ bool core_set_controller_port_device(retro_ctx_controller_info_t *pad)
|
||||
{
|
||||
if (!pad)
|
||||
return false;
|
||||
core.retro_set_controller_port_device(pad->port, pad->device);
|
||||
current_core.retro_set_controller_port_device(pad->port, pad->device);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -274,8 +270,8 @@ bool core_get_memory(retro_ctx_memory_info_t *info)
|
||||
{
|
||||
if (!info)
|
||||
return false;
|
||||
info->size = core.retro_get_memory_size(info->id);
|
||||
info->data = core.retro_get_memory_data(info->id);
|
||||
info->size = current_core.retro_get_memory_size(info->id);
|
||||
info->data = current_core.retro_get_memory_data(info->id);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -287,31 +283,29 @@ bool core_load_game(retro_ctx_load_content_info_t *load_info)
|
||||
content_get_status(&contentless, &is_inited);
|
||||
|
||||
if (load_info && load_info->special)
|
||||
core_game_loaded = core.retro_load_game_special(
|
||||
current_core.game_loaded = current_core.retro_load_game_special(
|
||||
load_info->special->id, load_info->info, load_info->content->size);
|
||||
else if (load_info && !string_is_empty(load_info->content->elems[0].data))
|
||||
core_game_loaded = core.retro_load_game(load_info->info);
|
||||
current_core.game_loaded = current_core.retro_load_game(load_info->info);
|
||||
else if (contentless)
|
||||
core_game_loaded = core.retro_load_game(NULL);
|
||||
current_core.game_loaded = current_core.retro_load_game(NULL);
|
||||
else
|
||||
core_game_loaded = false;
|
||||
current_core.game_loaded = false;
|
||||
|
||||
return core_game_loaded;
|
||||
return current_core.game_loaded;
|
||||
}
|
||||
|
||||
bool core_get_system_info(struct retro_system_info *system)
|
||||
{
|
||||
if (!system)
|
||||
return false;
|
||||
core.retro_get_system_info(system);
|
||||
current_core.retro_get_system_info(system);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool core_unserialize(retro_ctx_serialize_info_t *info)
|
||||
{
|
||||
if (!info)
|
||||
return false;
|
||||
if (!core.retro_unserialize(info->data_const, info->size))
|
||||
if (!info || !current_core.retro_unserialize(info->data_const, info->size))
|
||||
return false;
|
||||
|
||||
#if HAVE_NETWORKING
|
||||
@@ -323,9 +317,7 @@ bool core_unserialize(retro_ctx_serialize_info_t *info)
|
||||
|
||||
bool core_serialize(retro_ctx_serialize_info_t *info)
|
||||
{
|
||||
if (!info)
|
||||
return false;
|
||||
if (!core.retro_serialize(info->data, info->size))
|
||||
if (!info || !current_core.retro_serialize(info->data, info->size))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -334,40 +326,25 @@ bool core_serialize_size(retro_ctx_size_info_t *info)
|
||||
{
|
||||
if (!info)
|
||||
return false;
|
||||
info->size = core.retro_serialize_size();
|
||||
info->size = current_core.retro_serialize_size();
|
||||
return true;
|
||||
}
|
||||
|
||||
uint64_t core_serialization_quirks(void)
|
||||
{
|
||||
return core_serialization_quirks_v;
|
||||
return current_core.serialization_quirks_v;
|
||||
}
|
||||
|
||||
void core_set_serialization_quirks(uint64_t quirks)
|
||||
{
|
||||
core_serialization_quirks_v = quirks;
|
||||
}
|
||||
|
||||
void core_frame(retro_ctx_frame_info_t *info)
|
||||
{
|
||||
if (retro_ctx.frame_cb)
|
||||
retro_ctx.frame_cb(
|
||||
info->data, info->width, info->height, info->pitch);
|
||||
}
|
||||
|
||||
bool core_poll(void)
|
||||
{
|
||||
if (!retro_ctx.poll_cb)
|
||||
return false;
|
||||
retro_ctx.poll_cb();
|
||||
return true;
|
||||
current_core.serialization_quirks_v = quirks;
|
||||
}
|
||||
|
||||
bool core_set_environment(retro_ctx_environ_info_t *info)
|
||||
{
|
||||
if (!info)
|
||||
return false;
|
||||
core.retro_set_environment(info->env);
|
||||
current_core.retro_set_environment(info->env);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -375,26 +352,26 @@ bool core_get_system_av_info(struct retro_system_av_info *av_info)
|
||||
{
|
||||
if (!av_info)
|
||||
return false;
|
||||
core.retro_get_system_av_info(av_info);
|
||||
current_core.retro_get_system_av_info(av_info);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool core_reset(void)
|
||||
{
|
||||
core.retro_reset();
|
||||
current_core.retro_reset();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool core_init(void)
|
||||
{
|
||||
core.retro_init();
|
||||
core_inited = true;
|
||||
current_core.retro_init();
|
||||
current_core.inited = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool core_unload(void)
|
||||
{
|
||||
core.retro_deinit();
|
||||
current_core.retro_deinit();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -403,8 +380,10 @@ bool core_unload_game(void)
|
||||
{
|
||||
video_driver_free_hw_context();
|
||||
audio_driver_stop();
|
||||
core.retro_unload_game();
|
||||
core_game_loaded = false;
|
||||
|
||||
current_core.retro_unload_game();
|
||||
|
||||
current_core.game_loaded = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -421,21 +400,21 @@ bool core_run(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (core_poll_type)
|
||||
switch (current_core.poll_type)
|
||||
{
|
||||
case POLL_TYPE_EARLY:
|
||||
input_poll();
|
||||
break;
|
||||
case POLL_TYPE_LATE:
|
||||
core_input_polled = false;
|
||||
current_core.input_polled = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (core.retro_run)
|
||||
core.retro_run();
|
||||
if (core_poll_type == POLL_TYPE_LATE && !core_input_polled)
|
||||
current_core.retro_run();
|
||||
|
||||
if (current_core.poll_type == POLL_TYPE_LATE && !current_core.input_polled)
|
||||
input_poll();
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
@@ -447,7 +426,7 @@ bool core_run(void)
|
||||
|
||||
bool core_load(unsigned poll_type_behavior)
|
||||
{
|
||||
core_poll_type = poll_type_behavior;
|
||||
current_core.poll_type = poll_type_behavior;
|
||||
|
||||
if (!core_verify_api_version())
|
||||
return false;
|
||||
@@ -461,7 +440,7 @@ bool core_load(unsigned poll_type_behavior)
|
||||
|
||||
bool core_verify_api_version(void)
|
||||
{
|
||||
unsigned api_version = core.retro_api_version();
|
||||
unsigned api_version = current_core.retro_api_version();
|
||||
RARCH_LOG("%s: %u\n",
|
||||
msg_hash_to_str(MSG_VERSION_OF_LIBRETRO_API),
|
||||
api_version);
|
||||
@@ -481,36 +460,36 @@ bool core_get_region(retro_ctx_region_info_t *info)
|
||||
{
|
||||
if (!info)
|
||||
return false;
|
||||
info->region = core.retro_get_region();
|
||||
info->region = current_core.retro_get_region();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool core_has_set_input_descriptor(void)
|
||||
{
|
||||
return core_has_set_input_descriptors;
|
||||
return current_core.has_set_input_descriptors;
|
||||
}
|
||||
|
||||
void core_set_input_descriptors(void)
|
||||
{
|
||||
core_has_set_input_descriptors = true;
|
||||
current_core.has_set_input_descriptors = true;
|
||||
}
|
||||
|
||||
void core_unset_input_descriptors(void)
|
||||
{
|
||||
core_has_set_input_descriptors = false;
|
||||
current_core.has_set_input_descriptors = false;
|
||||
}
|
||||
|
||||
bool core_is_inited(void)
|
||||
{
|
||||
return core_inited;
|
||||
return current_core.inited;
|
||||
}
|
||||
|
||||
bool core_is_symbols_inited(void)
|
||||
{
|
||||
return core_symbols_inited;
|
||||
return current_core.symbols_inited;
|
||||
}
|
||||
|
||||
bool core_is_game_loaded(void)
|
||||
{
|
||||
return core_game_loaded;
|
||||
return current_core.game_loaded;
|
||||
}
|
||||
+13
-12
@@ -1,8 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||
* Copyright (C) 2013-2015 - Jason Fetters
|
||||
* Copyright (C) 2016 - Brad Parker
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
@@ -22,13 +21,11 @@
|
||||
#include <lists/dir_list.h>
|
||||
#include <file/archive_file.h>
|
||||
|
||||
#include <retro_stat.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "runloop.h"
|
||||
#include "retroarch.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
#include "config.def.h"
|
||||
@@ -217,8 +214,8 @@ static bool core_info_list_iterate(
|
||||
sizeof(info_path_base));
|
||||
|
||||
fill_pathname_join(s,
|
||||
(!string_is_empty(settings->path.libretro_info)) ?
|
||||
settings->path.libretro_info : settings->directory.libretro,
|
||||
(!string_is_empty(settings->paths.path_libretro_info)) ?
|
||||
settings->paths.path_libretro_info : settings->paths.directory_libretro,
|
||||
info_path_base, len);
|
||||
|
||||
return true;
|
||||
@@ -508,7 +505,7 @@ static bool core_info_list_update_missing_firmware_internal(
|
||||
if (!info)
|
||||
return false;
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_UNSET_MISSING_BIOS, NULL);
|
||||
rarch_ctl(RARCH_CTL_UNSET_MISSING_BIOS, NULL);
|
||||
for (i = 0; i < info->firmware_count; i++)
|
||||
{
|
||||
if (string_is_empty(info->firmware[i].path))
|
||||
@@ -519,7 +516,7 @@ static bool core_info_list_update_missing_firmware_internal(
|
||||
info->firmware[i].missing = !path_file_exists(path);
|
||||
if (info->firmware[i].missing && !info->firmware[i].optional)
|
||||
{
|
||||
runloop_ctl(RUNLOOP_CTL_SET_MISSING_BIOS, NULL);
|
||||
rarch_ctl(RARCH_CTL_SET_MISSING_BIOS, NULL);
|
||||
RARCH_WARN("Firmware missing: %s\n", info->firmware[i].path);
|
||||
}
|
||||
}
|
||||
@@ -611,7 +608,7 @@ bool core_info_init_list(void)
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (settings)
|
||||
core_info_curr_list = core_info_list_new(settings->directory.libretro);
|
||||
core_info_curr_list = core_info_list_new(settings->paths.directory_libretro);
|
||||
|
||||
if (!core_info_curr_list)
|
||||
return false;
|
||||
@@ -727,7 +724,7 @@ void core_info_get_name(const char *path, char *s, size_t len)
|
||||
size_t i;
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct string_list *contents = dir_list_new_special(
|
||||
settings->directory.libretro,
|
||||
settings->paths.directory_libretro,
|
||||
DIR_LIST_CORES, NULL);
|
||||
|
||||
if (!contents)
|
||||
@@ -837,7 +834,11 @@ bool core_info_database_supports_content_path(const char *database_path, const c
|
||||
database = strdup(new_path);
|
||||
|
||||
if (string_is_empty(database))
|
||||
{
|
||||
if (database)
|
||||
free(database);
|
||||
return false;
|
||||
}
|
||||
|
||||
path_remove_extension(database);
|
||||
|
||||
|
||||
+2
-3
@@ -1,8 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||
* Copyright (C) 2013-2015 - Jason Fetters
|
||||
* Copyright (C) 2016 - Brad Parker
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
|
||||
+10
-10
@@ -23,18 +23,22 @@
|
||||
|
||||
#include "internal_cores.h"
|
||||
|
||||
static uint16_t *frame_buf;
|
||||
static uint16_t *dummy_frame_buf;
|
||||
|
||||
void libretro_dummy_retro_init(void)
|
||||
{
|
||||
frame_buf = (uint16_t*)calloc(320 * 240, sizeof(uint16_t));
|
||||
unsigned i;
|
||||
|
||||
dummy_frame_buf = (uint16_t*)calloc(320 * 240, sizeof(uint16_t));
|
||||
for (i = 0; i < 320 * 240; i++)
|
||||
dummy_frame_buf[i] = 4 << 5;
|
||||
}
|
||||
|
||||
void libretro_dummy_retro_deinit(void)
|
||||
{
|
||||
if (frame_buf)
|
||||
free(frame_buf);
|
||||
frame_buf = NULL;
|
||||
if (dummy_frame_buf)
|
||||
free(dummy_frame_buf);
|
||||
dummy_frame_buf = NULL;
|
||||
}
|
||||
|
||||
unsigned libretro_dummy_retro_api_version(void)
|
||||
@@ -121,12 +125,8 @@ void libretro_dummy_retro_reset(void)
|
||||
|
||||
void libretro_dummy_retro_run(void)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
dummy_input_poll_cb();
|
||||
for (i = 0; i < 320 * 240; i++)
|
||||
frame_buf[i] = 4 << 5;
|
||||
dummy_video_cb(frame_buf, 320, 240, 640);
|
||||
dummy_video_cb(dummy_frame_buf, 320, 240, 640);
|
||||
}
|
||||
|
||||
/* This should never be called, it's only used as a placeholder. */
|
||||
|
||||
@@ -161,8 +161,7 @@ GL_SOURCE += $(LIBRETRO_COMM_DIR)/glsym/rglgen.c
|
||||
|
||||
ifeq ($(HAVE_GL_FFT), 1)
|
||||
DEFINES += -DHAVE_GL_FFT
|
||||
INCFLAGS += -I$(CORE_DIR)/fft
|
||||
FFT_SOURCE += $(CORE_DIR)/fft/fft.cpp
|
||||
FFT_SOURCE += $(CORE_DIR)/ffmpeg_fft.c
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -177,6 +176,7 @@ SOURCES_C := $(GL_SOURCE) \
|
||||
$(LIBAVFORMAT_SOURCE) \
|
||||
$(LIBSWSCALE_SOURCE) \
|
||||
$(LIBAVCODEC_SOURCE) \
|
||||
$(FFT_SOURCE) \
|
||||
$(LIBSWRESAMPLE_SOURCE)
|
||||
|
||||
SOURCES_CXX := $(FFT_SOURCE)
|
||||
SOURCES_CXX :=
|
||||
@@ -1,4 +1,3 @@
|
||||
/* Copyright (C) 2016 - Brad Parker */
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
@@ -36,7 +35,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GL_FFT
|
||||
#include "fft/fft.h"
|
||||
#include "ffmpeg_fft.h"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
|
||||
@@ -45,6 +44,7 @@ extern "C" {
|
||||
|
||||
#include <rthreads/rthreads.h>
|
||||
#include <queues/fifo_queue.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include <libretro.h>
|
||||
#ifdef RARCH_INTERNAL
|
||||
@@ -115,7 +115,7 @@ static struct attachment *attachments;
|
||||
static size_t attachments_size;
|
||||
|
||||
#ifdef HAVE_GL_FFT
|
||||
static glfft_t *fft;
|
||||
static fft_t *fft;
|
||||
unsigned fft_width;
|
||||
unsigned fft_height;
|
||||
unsigned fft_multisample;
|
||||
@@ -274,8 +274,8 @@ void CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
|
||||
{ "ffmpeg_temporal_interp", "Temporal Interpolation; enabled|disabled" },
|
||||
#ifdef HAVE_GL_FFT
|
||||
{ "ffmpeg_fft_resolution", "GLFFT Resolution; 1280x720|1920x1080|640x360|320x180" },
|
||||
{ "ffmpeg_fft_multisample", "GLFFT Multisample; 1x|2x|4x" },
|
||||
{ "ffmpeg_fft_resolution", "FFT Resolution; 1280x720|1920x1080|2560x1440|3840x2160|640x360|320x180" },
|
||||
{ "ffmpeg_fft_multisample", "FFT Multisample; 1x|2x|4x" },
|
||||
#endif
|
||||
#endif
|
||||
{ "ffmpeg_color_space", "Colorspace; auto|BT.709|BT.601|FCC|SMPTE240M" },
|
||||
@@ -339,9 +339,9 @@ static void check_variables(void)
|
||||
|
||||
if (CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
{
|
||||
if (!strcmp(var.value, "enabled"))
|
||||
if (memcmp(var.value, "enabled", 7) == 0)
|
||||
temporal_interpolation = true;
|
||||
else if (!strcmp(var.value, "disabled"))
|
||||
else if (memcmp(var.value, "disabled", 8) == 0)
|
||||
temporal_interpolation = false;
|
||||
}
|
||||
|
||||
@@ -373,13 +373,13 @@ static void check_variables(void)
|
||||
if (CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &color_var) && color_var.value)
|
||||
{
|
||||
slock_lock(decode_thread_lock);
|
||||
if (!strcmp(color_var.value, "BT.709"))
|
||||
if (string_is_equal(color_var.value, "BT.709"))
|
||||
colorspace = AVCOL_SPC_BT709;
|
||||
else if (!strcmp(color_var.value, "BT.601"))
|
||||
else if (string_is_equal(color_var.value, "BT.601"))
|
||||
colorspace = AVCOL_SPC_BT470BG;
|
||||
else if (!strcmp(color_var.value, "FCC"))
|
||||
else if (memcmp(color_var.value, "FCC", 3) == 0)
|
||||
colorspace = AVCOL_SPC_FCC;
|
||||
else if (!strcmp(color_var.value, "SMPTE240M"))
|
||||
else if (string_is_equal(color_var.value, "SMPTE240M"))
|
||||
colorspace = AVCOL_SPC_SMPTE240M;
|
||||
else
|
||||
colorspace = AVCOL_SPC_UNSPECIFIED;
|
||||
@@ -462,7 +462,7 @@ void CORE_PREFIX(retro_run)(void)
|
||||
}
|
||||
|
||||
if (fft && (old_fft_multisample != fft_multisample))
|
||||
glfft_init_multisample(fft, fft_width, fft_height, fft_multisample);
|
||||
fft_init_multisample(fft, fft_width, fft_height, fft_multisample);
|
||||
#endif
|
||||
|
||||
CORE_PREFIX(input_poll_cb)();
|
||||
@@ -737,11 +737,11 @@ void CORE_PREFIX(retro_run)(void)
|
||||
if (to_read > (1 << 11))
|
||||
to_read = 1 << 11;
|
||||
|
||||
glfft_step_fft(fft, buffer, to_read);
|
||||
fft_step_fft(fft, buffer, to_read);
|
||||
buffer += to_read * 2;
|
||||
frames -= to_read;
|
||||
}
|
||||
glfft_render(fft, hw_render.get_current_framebuffer(), fft_width, fft_height);
|
||||
fft_render(fft, hw_render.get_current_framebuffer(), fft_width, fft_height);
|
||||
CORE_PREFIX(video_cb)(RETRO_HW_FRAME_BUFFER_VALID,
|
||||
fft_width, fft_height, fft_width * sizeof(uint32_t));
|
||||
}
|
||||
@@ -1369,7 +1369,7 @@ static void context_destroy(void)
|
||||
#ifdef HAVE_GL_FFT
|
||||
if (fft)
|
||||
{
|
||||
glfft_free(fft);
|
||||
fft_free(fft);
|
||||
fft = NULL;
|
||||
}
|
||||
#endif
|
||||
@@ -1400,9 +1400,9 @@ static void context_reset(void)
|
||||
#ifdef HAVE_GL_FFT
|
||||
if (audio_streams_num > 0 && video_stream < 0)
|
||||
{
|
||||
fft = glfft_new(11, hw_render.get_proc_address);
|
||||
fft = fft_new(11, hw_render.get_proc_address);
|
||||
if (fft)
|
||||
glfft_init_multisample(fft, fft_width, fft_height, fft_multisample);
|
||||
fft_init_multisample(fft, fft_width, fft_height, fft_multisample);
|
||||
}
|
||||
|
||||
/* Already inits symbols. */
|
||||
@@ -1555,7 +1555,7 @@ void CORE_PREFIX(retro_unload_game)(void)
|
||||
|
||||
bool CORE_PREFIX(retro_load_game)(const struct retro_game_info *info)
|
||||
{
|
||||
bool is_glfft = false;
|
||||
bool is_fft = false;
|
||||
enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_XRGB8888;
|
||||
struct retro_input_descriptor desc[] = {
|
||||
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_LEFT, "Seek -10 seconds" },
|
||||
@@ -1606,21 +1606,21 @@ bool CORE_PREFIX(retro_load_game)(const struct retro_game_info *info)
|
||||
}
|
||||
|
||||
#ifdef HAVE_GL_FFT
|
||||
is_glfft = video_stream < 0 && audio_streams_num > 0;
|
||||
is_fft = video_stream < 0 && audio_streams_num > 0;
|
||||
#endif
|
||||
|
||||
if (video_stream >= 0 || is_glfft)
|
||||
if (video_stream >= 0 || is_fft)
|
||||
{
|
||||
video_decode_fifo = fifo_new(media.width
|
||||
* media.height * sizeof(uint32_t) * 32);
|
||||
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
|
||||
use_gl = true;
|
||||
hw_render.context_reset = context_reset;
|
||||
hw_render.context_destroy = context_destroy;
|
||||
hw_render.bottom_left_origin = is_glfft;
|
||||
hw_render.depth = is_glfft;
|
||||
hw_render.stencil = is_glfft;
|
||||
hw_render.context_reset = context_reset;
|
||||
hw_render.context_destroy = context_destroy;
|
||||
hw_render.bottom_left_origin = is_fft;
|
||||
hw_render.depth = is_fft;
|
||||
hw_render.stencil = is_fft;
|
||||
#if defined(HAVE_OPENGLES)
|
||||
hw_render.context_type = RETRO_HW_CONTEXT_OPENGLES2;
|
||||
#else
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,24 @@
|
||||
#ifndef FFMPEG_FFT_H_
|
||||
#define FFMPEG_FFT_H_
|
||||
|
||||
#include <glsym/glsym.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct GLFFT fft_t;
|
||||
|
||||
fft_t *fft_new(unsigned fft_steps, rglgen_proc_address_t proc);
|
||||
|
||||
void fft_free(fft_t *fft);
|
||||
|
||||
void fft_init_multisample(fft_t *fft, unsigned width, unsigned height, unsigned samples);
|
||||
|
||||
void fft_step_fft(fft_t *fft, const GLshort *buffer, unsigned frames);
|
||||
|
||||
void fft_render(fft_t *fft, GLuint backbuffer, unsigned width, unsigned height);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
@@ -1,26 +0,0 @@
|
||||
#ifndef FFT_H__
|
||||
#define FFT_H__
|
||||
|
||||
#include <glsym/glsym.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct glfft glfft_t;
|
||||
|
||||
glfft_t *glfft_new(unsigned fft_steps, rglgen_proc_address_t proc);
|
||||
|
||||
void glfft_free(glfft_t *fft);
|
||||
|
||||
void glfft_init_multisample(glfft_t *fft, unsigned width, unsigned height, unsigned samples);
|
||||
|
||||
void glfft_step_fft(glfft_t *fft, const GLshort *buffer, unsigned frames);
|
||||
void glfft_render(glfft_t *fft, GLuint backbuffer, unsigned width, unsigned height);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <net/net_socket.h>
|
||||
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <retro_timers.h>
|
||||
|
||||
#include <libretro.h>
|
||||
|
||||
|
||||
@@ -59,7 +59,10 @@
|
||||
#include <libudev.h>
|
||||
#endif
|
||||
|
||||
struct video_buffer {
|
||||
#include <string/stdstring.h>
|
||||
|
||||
struct video_buffer
|
||||
{
|
||||
void *start;
|
||||
size_t len;
|
||||
};
|
||||
@@ -215,7 +218,7 @@ enumerate_audio_devices(char *buf, size_t buflen)
|
||||
{
|
||||
name = snd_device_name_get_hint(*n, "NAME");
|
||||
ioid = snd_device_name_get_hint(*n, "IOID");
|
||||
if ((ioid == NULL || !strcmp(ioid, "Input")) &&
|
||||
if ((ioid == NULL || string_is_equal(ioid, "Input")) &&
|
||||
(!strncmp(name, "hw:", strlen("hw:")) ||
|
||||
!strncmp(name, "default:", strlen("default:"))))
|
||||
{
|
||||
|
||||
+13
-6
@@ -1,8 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||
* Copyright (C) 2013-2015 - Jason Fetters
|
||||
* Copyright (C) 2016 - Brad Parker
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
@@ -400,7 +399,7 @@ static int database_cursor_close(libretrodb_t *db, libretrodb_cursor_t *cur)
|
||||
}
|
||||
|
||||
database_info_handle_t *database_info_dir_init(const char *dir,
|
||||
enum database_type type)
|
||||
enum database_type type, retro_task_t *task)
|
||||
{
|
||||
unsigned i;
|
||||
database_info_handle_t *db = (database_info_handle_t*)
|
||||
@@ -424,6 +423,9 @@ database_info_handle_t *database_info_dir_init(const char *dir,
|
||||
{
|
||||
const char *path = db->list->elems[i].data;
|
||||
|
||||
if (task)
|
||||
task_set_progress(task, (i / (float)db->list->size) * 100);
|
||||
|
||||
if (path_is_compressed_file(path) && !path_contains_compressed_file(path))
|
||||
{
|
||||
struct string_list *archive_list = path_is_compressed_file(path) ?
|
||||
@@ -470,15 +472,17 @@ error:
|
||||
}
|
||||
|
||||
database_info_handle_t *database_info_file_init(const char *path,
|
||||
enum database_type type)
|
||||
enum database_type type, retro_task_t *task)
|
||||
{
|
||||
union string_list_elem_attr attr = {0};
|
||||
union string_list_elem_attr attr;
|
||||
database_info_handle_t *db = (database_info_handle_t*)
|
||||
calloc(1, sizeof(*db));
|
||||
|
||||
if (!db)
|
||||
return NULL;
|
||||
|
||||
attr.i = 0;
|
||||
|
||||
db->list = string_list_new();
|
||||
|
||||
if (!db->list)
|
||||
@@ -500,6 +504,9 @@ database_info_handle_t *database_info_file_init(const char *path,
|
||||
char new_path[PATH_MAX_LENGTH];
|
||||
size_t path_len = strlen(path);
|
||||
|
||||
if (task)
|
||||
task_set_progress(task, (i / (float)archive_list->size) * 100);
|
||||
|
||||
new_path[0] = '\0';
|
||||
|
||||
strlcpy(new_path, path, sizeof(new_path));
|
||||
|
||||
+5
-10
@@ -1,8 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||
* Copyright (C) 2013-2015 - Jason Fetters
|
||||
* Copyright (C) 2016 - Brad Parker
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
@@ -24,6 +23,7 @@
|
||||
|
||||
#include <file/archive_file.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <queues/task_queue.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
@@ -126,18 +126,13 @@ database_info_list_t *database_info_list_new(const char *rdb_path,
|
||||
void database_info_list_free(database_info_list_t *list);
|
||||
|
||||
database_info_handle_t *database_info_dir_init(const char *dir,
|
||||
enum database_type type);
|
||||
enum database_type type, retro_task_t *task);
|
||||
|
||||
database_info_handle_t *database_info_file_init(const char *path,
|
||||
enum database_type type);
|
||||
enum database_type type, retro_task_t *task);
|
||||
|
||||
void database_info_free(database_info_handle_t *handle);
|
||||
|
||||
#if 0
|
||||
int database_info_build_query(
|
||||
char *query, size_t len, const char *label, const char *path);
|
||||
#endif
|
||||
|
||||
int database_info_build_query_enum(
|
||||
char *query, size_t len, enum database_query_type type, const char *path);
|
||||
|
||||
|
||||
+36
-31
@@ -1,5 +1,5 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
@@ -24,6 +24,39 @@
|
||||
#include "playlist.h"
|
||||
#endif
|
||||
|
||||
enum default_dirs
|
||||
{
|
||||
DEFAULT_DIR_MENU_CONTENT = 0,
|
||||
DEFAULT_DIR_CORE_ASSETS,
|
||||
DEFAULT_DIR_MENU_CONFIG,
|
||||
DEFAULT_DIR_AUTOCONFIG,
|
||||
DEFAULT_DIR_AUDIO_FILTER,
|
||||
DEFAULT_DIR_VIDEO_FILTER,
|
||||
DEFAULT_DIR_ASSETS,
|
||||
DEFAULT_DIR_CORE,
|
||||
DEFAULT_DIR_CORE_INFO,
|
||||
DEFAULT_DIR_OVERLAY,
|
||||
DEFAULT_DIR_PORT,
|
||||
DEFAULT_DIR_SHADER,
|
||||
DEFAULT_DIR_SAVESTATE,
|
||||
DEFAULT_DIR_RESAMPLER,
|
||||
DEFAULT_DIR_SRAM,
|
||||
DEFAULT_DIR_SCREENSHOT,
|
||||
DEFAULT_DIR_SYSTEM,
|
||||
DEFAULT_DIR_PLAYLIST,
|
||||
DEFAULT_DIR_CONTENT_HISTORY,
|
||||
DEFAULT_DIR_REMAP,
|
||||
DEFAULT_DIR_CACHE,
|
||||
DEFAULT_DIR_WALLPAPERS,
|
||||
DEFAULT_DIR_THUMBNAILS,
|
||||
DEFAULT_DIR_DATABASE,
|
||||
DEFAULT_DIR_CURSOR,
|
||||
DEFAULT_DIR_CHEATS,
|
||||
DEFAULT_DIR_RECORD_CONFIG,
|
||||
DEFAULT_DIR_RECORD_OUTPUT,
|
||||
DEFAULT_DIR_LAST
|
||||
};
|
||||
|
||||
struct defaults
|
||||
{
|
||||
#ifdef HAVE_MENU
|
||||
@@ -50,35 +83,7 @@ struct defaults
|
||||
bool enable;
|
||||
} overlay;
|
||||
|
||||
struct
|
||||
{
|
||||
char menu_content[PATH_MAX_LENGTH];
|
||||
char core_assets[PATH_MAX_LENGTH];
|
||||
char menu_config[PATH_MAX_LENGTH];
|
||||
char autoconfig[PATH_MAX_LENGTH];
|
||||
char audio_filter[PATH_MAX_LENGTH];
|
||||
char video_filter[PATH_MAX_LENGTH];
|
||||
char assets[PATH_MAX_LENGTH];
|
||||
char core[PATH_MAX_LENGTH];
|
||||
char core_info[PATH_MAX_LENGTH];
|
||||
char overlay[PATH_MAX_LENGTH];
|
||||
char port[PATH_MAX_LENGTH];
|
||||
char shader[PATH_MAX_LENGTH];
|
||||
char savestate[PATH_MAX_LENGTH];
|
||||
char resampler[PATH_MAX_LENGTH];
|
||||
char sram[PATH_MAX_LENGTH];
|
||||
char screenshot[PATH_MAX_LENGTH];
|
||||
char system[PATH_MAX_LENGTH];
|
||||
char playlist[PATH_MAX_LENGTH];
|
||||
char content_history[PATH_MAX_LENGTH];
|
||||
char remap[PATH_MAX_LENGTH];
|
||||
char cache[PATH_MAX_LENGTH];
|
||||
char wallpapers[PATH_MAX_LENGTH];
|
||||
char thumbnails[PATH_MAX_LENGTH];
|
||||
char database[PATH_MAX_LENGTH];
|
||||
char cursor[PATH_MAX_LENGTH];
|
||||
char cheats[PATH_MAX_LENGTH];
|
||||
} dir;
|
||||
char dirs [DEFAULT_DIR_LAST + 1][PATH_MAX_LENGTH];
|
||||
|
||||
struct
|
||||
{
|
||||
@@ -100,9 +105,9 @@ struct defaults
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
playlist_t *image_history;
|
||||
#endif
|
||||
playlist_t *music_history;
|
||||
#ifdef HAVE_FFMPEG
|
||||
playlist_t *video_history;
|
||||
playlist_t *music_history;
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -106,7 +106,7 @@ int sceClibPrintf ( const char * format, ... );
|
||||
|
||||
#if defined(VITA)
|
||||
#define CtrlSetSamplingMode(mode) sceCtrlSetSamplingModeExt(mode)
|
||||
#define CtrlPeekBufferPositive(port, pad_data, bufs) sceCtrlReadBufferPositiveExt2(port, pad_data, bufs)
|
||||
#define CtrlPeekBufferPositive(port, pad_data, bufs) sceCtrlPeekBufferPositiveExt2(port, pad_data, bufs)
|
||||
#else
|
||||
#define CtrlSetSamplingMode(mode) sceCtrlSetSamplingMode(mode)
|
||||
#define CtrlPeekBufferPositive(port, pad_data, bufs) sceCtrlPeekBufferPositive(port, pad_data, bufs)
|
||||
|
||||
Vendored
-32
@@ -1,32 +0,0 @@
|
||||
/* 7zAlloc.c -- Allocation functions
|
||||
2010-10-29 : Igor Pavlov : Public domain */
|
||||
|
||||
#include "7zAlloc.h"
|
||||
|
||||
void *SzAlloc(void *p, size_t size)
|
||||
{
|
||||
(void)p;
|
||||
if (size == 0)
|
||||
return 0;
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void SzFree(void *p, void *address)
|
||||
{
|
||||
(void)p;
|
||||
free(address);
|
||||
}
|
||||
|
||||
void *SzAllocTemp(void *p, size_t size)
|
||||
{
|
||||
(void)p;
|
||||
if (size == 0)
|
||||
return 0;
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void SzFreeTemp(void *p, void *address)
|
||||
{
|
||||
(void)p;
|
||||
free(address);
|
||||
}
|
||||
Vendored
-23
@@ -1,23 +0,0 @@
|
||||
/* 7zAlloc.h -- Allocation functions
|
||||
2010-10-29 : Igor Pavlov : Public domain */
|
||||
|
||||
#ifndef __7Z_ALLOC_H
|
||||
#define __7Z_ALLOC_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void *SzAlloc(void *p, size_t size);
|
||||
void SzFree(void *p, void *address);
|
||||
|
||||
void *SzAllocTemp(void *p, size_t size);
|
||||
void SzFreeTemp(void *p, void *address);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Vendored
-12
@@ -20,18 +20,6 @@ void Buf_Init(CBuf *p);
|
||||
int Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc);
|
||||
void Buf_Free(CBuf *p, ISzAlloc *alloc);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t *data;
|
||||
size_t size;
|
||||
size_t pos;
|
||||
} CDynBuf;
|
||||
|
||||
void DynBuf_Construct(CDynBuf *p);
|
||||
void DynBuf_SeekToBeg(CDynBuf *p);
|
||||
int DynBuf_Write(CDynBuf *p, const uint8_t *buf, size_t size, ISzAlloc *alloc);
|
||||
void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Vendored
-47
@@ -1,47 +0,0 @@
|
||||
/* 7zBuf2.c -- uint8_t Buffer
|
||||
2008-10-04 : Igor Pavlov : Public domain */
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include "7zBuf.h"
|
||||
|
||||
void DynBuf_Construct(CDynBuf *p)
|
||||
{
|
||||
p->data = 0;
|
||||
p->size = 0;
|
||||
p->pos = 0;
|
||||
}
|
||||
|
||||
void DynBuf_SeekToBeg(CDynBuf *p)
|
||||
{
|
||||
p->pos = 0;
|
||||
}
|
||||
|
||||
int DynBuf_Write(CDynBuf *p, const uint8_t *buf, size_t size, ISzAlloc *alloc)
|
||||
{
|
||||
if (size > p->size - p->pos)
|
||||
{
|
||||
size_t current_size = p->pos + size;
|
||||
size_t newSize = (current_size) + (current_size / 4);
|
||||
uint8_t *data = (uint8_t *)alloc->Alloc(alloc, newSize);
|
||||
|
||||
if (data == 0)
|
||||
return 0;
|
||||
|
||||
p->size = newSize;
|
||||
memcpy(data, p->data, p->pos);
|
||||
alloc->Free(alloc, p->data);
|
||||
p->data = data;
|
||||
}
|
||||
memcpy(p->data + p->pos, buf, size);
|
||||
p->pos += size;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc)
|
||||
{
|
||||
alloc->Free(alloc, p->data);
|
||||
p->data = 0;
|
||||
p->size = 0;
|
||||
p->pos = 0;
|
||||
}
|
||||
Vendored
-41
@@ -52,12 +52,7 @@ If MY_CPU_LE_UNALIGN is not defined, we don't know about these properties of pla
|
||||
#define GetUi16(p) (*(const uint16_t *)(p))
|
||||
#define GetUi32(p) (*(const uint32_t *)(p))
|
||||
#define GetUi64(p) (*(const uint64_t *)(p))
|
||||
#define SetUi16(p, d) *(uint16_t *)(p) = (d);
|
||||
#define SetUi32(p, d) *(uint32_t *)(p) = (d);
|
||||
#define SetUi64(p, d) *(uint64_t *)(p) = (d);
|
||||
|
||||
#else
|
||||
|
||||
#define GetUi16(p) (((const uint8_t *)(p))[0] | ((uint16_t)((const uint8_t *)(p))[1] << 8))
|
||||
|
||||
#define GetUi32(p) ( \
|
||||
@@ -67,44 +62,8 @@ If MY_CPU_LE_UNALIGN is not defined, we don't know about these properties of pla
|
||||
((uint32_t)((const uint8_t *)(p))[3] << 24))
|
||||
|
||||
#define GetUi64(p) (GetUi32(p) | ((uint64_t)GetUi32(((const uint8_t *)(p)) + 4) << 32))
|
||||
|
||||
#define SetUi16(p, d) { uint32_t _x_ = (d); \
|
||||
((uint8_t *)(p))[0] = (uint8_t)_x_; \
|
||||
((uint8_t *)(p))[1] = (uint8_t)(_x_ >> 8); }
|
||||
|
||||
#define SetUi32(p, d) { uint32_t _x_ = (d); \
|
||||
((uint8_t *)(p))[0] = (uint8_t)_x_; \
|
||||
((uint8_t *)(p))[1] = (uint8_t)(_x_ >> 8); \
|
||||
((uint8_t *)(p))[2] = (uint8_t)(_x_ >> 16); \
|
||||
((uint8_t *)(p))[3] = (uint8_t)(_x_ >> 24); }
|
||||
|
||||
#define SetUi64(p, d) { uint64_t _x64_ = (d); \
|
||||
SetUi32(p, (uint32_t)_x64_); \
|
||||
SetUi32(((uint8_t *)(p)) + 4, (uint32_t)(_x64_ >> 32)); }
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(MY_CPU_LE_UNALIGN) && defined(_WIN64) && (_MSC_VER >= 1300)
|
||||
|
||||
#pragma intrinsic(_byteswap_ulong)
|
||||
#pragma intrinsic(_byteswap_uint64)
|
||||
#define GetBe32(p) _byteswap_ulong(*(const uint32_t *)(const uint8_t *)(p))
|
||||
#define GetBe64(p) _byteswap_uint64(*(const uint64_t *)(const uint8_t *)(p))
|
||||
|
||||
#else
|
||||
|
||||
#define GetBe32(p) ( \
|
||||
((uint32_t)((const uint8_t *)(p))[0] << 24) | \
|
||||
((uint32_t)((const uint8_t *)(p))[1] << 16) | \
|
||||
((uint32_t)((const uint8_t *)(p))[2] << 8) | \
|
||||
((const uint8_t *)(p))[3] )
|
||||
|
||||
#define GetBe64(p) (((uint64_t)GetBe32(p) << 32) | GetBe32(((const uint8_t *)(p)) + 4))
|
||||
|
||||
#endif
|
||||
|
||||
#define GetBe16(p) (((uint16_t)((const uint8_t *)(p))[0] << 8) | ((const uint8_t *)(p))[1])
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Vendored
-20
@@ -1,20 +0,0 @@
|
||||
/* RotateDefs.h -- Rotate functions
|
||||
2009-02-07 : Igor Pavlov : Public domain */
|
||||
|
||||
#ifndef __ROTATE_DEFS_H
|
||||
#define __ROTATE_DEFS_H
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
#include <stdlib.h>
|
||||
#define rotlFixed(x, n) _rotl((x), (n))
|
||||
#define rotrFixed(x, n) _rotr((x), (n))
|
||||
|
||||
#else
|
||||
|
||||
#define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
|
||||
#define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n))))
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Vendored
-19
@@ -60,29 +60,10 @@ typedef int Bool;
|
||||
#define True 1
|
||||
#define False 0
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#define MY_STD_CALL __stdcall
|
||||
#else
|
||||
#define MY_STD_CALL
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
#if _MSC_VER >= 1300
|
||||
#define MY_NO_INLINE __declspec(noinline)
|
||||
#else
|
||||
#define MY_NO_INLINE
|
||||
#endif
|
||||
|
||||
#define MY_CDECL __cdecl
|
||||
#define MY_FAST_CALL __fastcall
|
||||
|
||||
#else
|
||||
|
||||
#define MY_CDECL
|
||||
#define MY_FAST_CALL
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Vendored
+2
-1
@@ -133,6 +133,7 @@ mg_static_assert(sizeof(void *) >= sizeof(int), "data type size check");
|
||||
#include <assert.h>
|
||||
|
||||
#include <compat/strl.h>
|
||||
#include <net/net_compat.h>
|
||||
|
||||
/* clock_gettime is not implemented on OSX */
|
||||
int clock_gettime(int clk_id, struct timespec *t);
|
||||
@@ -5727,7 +5728,7 @@ mg_inet_pton(int af, const char *src, void *dst, size_t dstlen)
|
||||
memset(&hints, 0, sizeof(struct addrinfo));
|
||||
hints.ai_family = af;
|
||||
|
||||
if (getaddrinfo(src, NULL, &hints, &res) != 0) {
|
||||
if (getaddrinfo_retro(src, NULL, &hints, &res) != 0) {
|
||||
/* bad src string or bad address family */
|
||||
return 0;
|
||||
}
|
||||
|
||||
Vendored
-34
@@ -1,34 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
/// THE SOFTWARE.
|
||||
///
|
||||
/// @ref core
|
||||
/// @file glm/common.hpp
|
||||
/// @date 2013-12-24 / 2013-12-24
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef GLM_COMMON_INCLUDED
|
||||
#define GLM_COMMON_INCLUDED
|
||||
|
||||
#include "detail/func_common.hpp"
|
||||
|
||||
#endif//GLM_COMMON_INCLUDED
|
||||
Vendored
-427
@@ -1,427 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
/// THE SOFTWARE.
|
||||
///
|
||||
/// @ref core
|
||||
/// @file glm/core/_features.hpp
|
||||
/// @date 2013-02-20 / 2013-02-20
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef glm_core_features
|
||||
#define glm_core_features
|
||||
|
||||
// #define GLM_CXX98_EXCEPTIONS
|
||||
// #define GLM_CXX98_RTTI
|
||||
|
||||
// #define GLM_CXX11_RVALUE_REFERENCES
|
||||
// Rvalue references - GCC 4.3
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html
|
||||
|
||||
// GLM_CXX11_TRAILING_RETURN
|
||||
// Rvalue references for *this - GCC not supported
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm
|
||||
|
||||
// GLM_CXX11_NONSTATIC_MEMBER_INIT
|
||||
// Initialization of class objects by rvalues - GCC any
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1610.html
|
||||
|
||||
// GLM_CXX11_NONSTATIC_MEMBER_INIT
|
||||
// Non-static data member initializers - GCC 4.7
|
||||
// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2756.htm
|
||||
|
||||
// #define GLM_CXX11_VARIADIC_TEMPLATE
|
||||
// Variadic templates - GCC 4.3
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf
|
||||
|
||||
//
|
||||
// Extending variadic template template parameters - GCC 4.4
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf
|
||||
|
||||
// #define GLM_CXX11_GENERALIZED_INITIALIZERS
|
||||
// Initializer lists - GCC 4.4
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm
|
||||
|
||||
// #define GLM_CXX11_STATIC_ASSERT
|
||||
// Static assertions - GCC 4.3
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html
|
||||
|
||||
// #define GLM_CXX11_AUTO_TYPE
|
||||
// auto-typed variables - GCC 4.4
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf
|
||||
|
||||
// #define GLM_CXX11_AUTO_TYPE
|
||||
// Multi-declarator auto - GCC 4.4
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1737.pdf
|
||||
|
||||
// #define GLM_CXX11_AUTO_TYPE
|
||||
// Removal of auto as a storage-class specifier - GCC 4.4
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2546.htm
|
||||
|
||||
// #define GLM_CXX11_AUTO_TYPE
|
||||
// New function declarator syntax - GCC 4.4
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm
|
||||
|
||||
// #define GLM_CXX11_LAMBDAS
|
||||
// New wording for C++0x lambdas - GCC 4.5
|
||||
// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2927.pdf
|
||||
|
||||
// #define GLM_CXX11_DECLTYPE
|
||||
// Declared type of an expression - GCC 4.3
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf
|
||||
|
||||
//
|
||||
// Right angle brackets - GCC 4.3
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html
|
||||
|
||||
//
|
||||
// Default template arguments for function templates DR226 GCC 4.3
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226
|
||||
|
||||
//
|
||||
// Solving the SFINAE problem for expressions DR339 GCC 4.4
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2634.html
|
||||
|
||||
// #define GLM_CXX11_ALIAS_TEMPLATE
|
||||
// Template aliases N2258 GCC 4.7
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf
|
||||
|
||||
//
|
||||
// Extern templates N1987 Yes
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm
|
||||
|
||||
// #define GLM_CXX11_NULLPTR
|
||||
// Null pointer constant N2431 GCC 4.6
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf
|
||||
|
||||
// #define GLM_CXX11_STRONG_ENUMS
|
||||
// Strongly-typed enums N2347 GCC 4.4
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf
|
||||
|
||||
//
|
||||
// Forward declarations for enums N2764 GCC 4.6
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf
|
||||
|
||||
//
|
||||
// Generalized attributes N2761 GCC 4.8
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf
|
||||
|
||||
//
|
||||
// Generalized constant expressions N2235 GCC 4.6
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf
|
||||
|
||||
//
|
||||
// Alignment support N2341 GCC 4.8
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf
|
||||
|
||||
// #define GLM_CXX11_DELEGATING_CONSTRUCTORS
|
||||
// Delegating constructors N1986 GCC 4.7
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf
|
||||
|
||||
//
|
||||
// Inheriting constructors N2540 GCC 4.8
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm
|
||||
|
||||
// #define GLM_CXX11_EXPLICIT_CONVERSIONS
|
||||
// Explicit conversion operators N2437 GCC 4.5
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf
|
||||
|
||||
//
|
||||
// New character types N2249 GCC 4.4
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html
|
||||
|
||||
//
|
||||
// Unicode string literals N2442 GCC 4.5
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm
|
||||
|
||||
//
|
||||
// Raw string literals N2442 GCC 4.5
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm
|
||||
|
||||
//
|
||||
// Universal character name literals N2170 GCC 4.5
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html
|
||||
|
||||
// #define GLM_CXX11_USER_LITERALS
|
||||
// User-defined literals N2765 GCC 4.7
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf
|
||||
|
||||
//
|
||||
// Standard Layout Types N2342 GCC 4.5
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm
|
||||
|
||||
// #define GLM_CXX11_DEFAULTED_FUNCTIONS
|
||||
// #define GLM_CXX11_DELETED_FUNCTIONS
|
||||
// Defaulted and deleted functions N2346 GCC 4.4
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm
|
||||
|
||||
//
|
||||
// Extended friend declarations N1791 GCC 4.7
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1791.pdf
|
||||
|
||||
//
|
||||
// Extending sizeof N2253 GCC 4.4
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html
|
||||
|
||||
// #define GLM_CXX11_INLINE_NAMESPACES
|
||||
// Inline namespaces N2535 GCC 4.4
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm
|
||||
|
||||
// #define GLM_CXX11_UNRESTRICTED_UNIONS
|
||||
// Unrestricted unions N2544 GCC 4.6
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf
|
||||
|
||||
// #define GLM_CXX11_LOCAL_TYPE_TEMPLATE_ARGS
|
||||
// Local and unnamed types as template arguments N2657 GCC 4.5
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm
|
||||
|
||||
// #define GLM_CXX11_RANGE_FOR
|
||||
// Range-based for N2930 GCC 4.6
|
||||
// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html
|
||||
|
||||
// #define GLM_CXX11_OVERRIDE_CONTROL
|
||||
// Explicit virtual overrides N2928 N3206 N3272 GCC 4.7
|
||||
// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm
|
||||
|
||||
//
|
||||
// Minimal support for garbage collection and reachability-based leak detection N2670 No
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm
|
||||
|
||||
// #define GLM_CXX11_NOEXCEPT
|
||||
// Allowing move constructors to throw [noexcept] N3050 GCC 4.6 (core language only)
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html
|
||||
|
||||
//
|
||||
// Defining move special member functions N3053 GCC 4.6
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3053.html
|
||||
|
||||
//
|
||||
// Sequence points N2239 Yes
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html
|
||||
|
||||
//
|
||||
// Atomic operations N2427 GCC 4.4
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html
|
||||
|
||||
//
|
||||
// Strong Compare and Exchange N2748 GCC 4.5
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html
|
||||
|
||||
//
|
||||
// Bidirectional Fences N2752 GCC 4.8
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm
|
||||
|
||||
//
|
||||
// Memory model N2429 GCC 4.8
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2429.htm
|
||||
|
||||
//
|
||||
// Data-dependency ordering: atomics and memory model N2664 GCC 4.4
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm
|
||||
|
||||
//
|
||||
// Propagating exceptions N2179 GCC 4.4
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html
|
||||
|
||||
//
|
||||
// Abandoning a process and at_quick_exit N2440 GCC 4.8
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2440.htm
|
||||
|
||||
//
|
||||
// Allow atomics use in signal handlers N2547 Yes
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2547.htm
|
||||
|
||||
//
|
||||
// Thread-local storage N2659 GCC 4.8
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm
|
||||
|
||||
//
|
||||
// Dynamic initialization and destruction with concurrency N2660 GCC 4.3
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm
|
||||
|
||||
//
|
||||
// __func__ predefined identifier N2340 GCC 4.3
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2340.htm
|
||||
|
||||
//
|
||||
// C99 preprocessor N1653 GCC 4.3
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm
|
||||
|
||||
//
|
||||
// long long N1811 GCC 4.3
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1811.pdf
|
||||
|
||||
//
|
||||
// Extended integral types N1988 Yes
|
||||
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1988.pdf
|
||||
|
||||
#if(GLM_COMPILER & GLM_COMPILER_GCC)
|
||||
|
||||
# if(GLM_COMPILER >= GLM_COMPILER_GCC43)
|
||||
# define GLM_CXX11_STATIC_ASSERT
|
||||
# endif
|
||||
|
||||
#elif(GLM_COMPILER & GLM_COMPILER_CLANG)
|
||||
# if(__has_feature(cxx_exceptions))
|
||||
# define GLM_CXX98_EXCEPTIONS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_rtti))
|
||||
# define GLM_CXX98_RTTI
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_access_control_sfinae))
|
||||
# define GLM_CXX11_ACCESS_CONTROL_SFINAE
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_alias_templates))
|
||||
# define GLM_CXX11_ALIAS_TEMPLATE
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_alignas))
|
||||
# define GLM_CXX11_ALIGNAS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_attributes))
|
||||
# define GLM_CXX11_ATTRIBUTES
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_constexpr))
|
||||
# define GLM_CXX11_CONSTEXPR
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_decltype))
|
||||
# define GLM_CXX11_DECLTYPE
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_default_function_template_args))
|
||||
# define GLM_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_defaulted_functions))
|
||||
# define GLM_CXX11_DEFAULTED_FUNCTIONS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_delegating_constructors))
|
||||
# define GLM_CXX11_DELEGATING_CONSTRUCTORS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_deleted_functions))
|
||||
# define GLM_CXX11_DELETED_FUNCTIONS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_explicit_conversions))
|
||||
# define GLM_CXX11_EXPLICIT_CONVERSIONS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_generalized_initializers))
|
||||
# define GLM_CXX11_GENERALIZED_INITIALIZERS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_implicit_moves))
|
||||
# define GLM_CXX11_IMPLICIT_MOVES
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_inheriting_constructors))
|
||||
# define GLM_CXX11_INHERITING_CONSTRUCTORS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_inline_namespaces))
|
||||
# define GLM_CXX11_INLINE_NAMESPACES
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_lambdas))
|
||||
# define GLM_CXX11_LAMBDAS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_local_type_template_args))
|
||||
# define GLM_CXX11_LOCAL_TYPE_TEMPLATE_ARGS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_noexcept))
|
||||
# define GLM_CXX11_NOEXCEPT
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_nonstatic_member_init))
|
||||
# define GLM_CXX11_NONSTATIC_MEMBER_INIT
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_nullptr))
|
||||
# define GLM_CXX11_NULLPTR
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_override_control))
|
||||
# define GLM_CXX11_OVERRIDE_CONTROL
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_reference_qualified_functions))
|
||||
# define GLM_CXX11_REFERENCE_QUALIFIED_FUNCTIONS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_range_for))
|
||||
# define GLM_CXX11_RANGE_FOR
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_raw_string_literals))
|
||||
# define GLM_CXX11_RAW_STRING_LITERALS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_rvalue_references))
|
||||
# define GLM_CXX11_RVALUE_REFERENCES
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_static_assert))
|
||||
# define GLM_CXX11_STATIC_ASSERT
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_auto_type))
|
||||
# define GLM_CXX11_AUTO_TYPE
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_strong_enums))
|
||||
# define GLM_CXX11_STRONG_ENUMS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_trailing_return))
|
||||
# define GLM_CXX11_TRAILING_RETURN
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_unicode_literals))
|
||||
# define GLM_CXX11_UNICODE_LITERALS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_unrestricted_unions))
|
||||
# define GLM_CXX11_UNRESTRICTED_UNIONS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_user_literals))
|
||||
# define GLM_CXX11_USER_LITERALS
|
||||
# endif
|
||||
|
||||
# if(__has_feature(cxx_variadic_templates))
|
||||
# define GLM_CXX11_VARIADIC_TEMPLATES
|
||||
# endif
|
||||
|
||||
#endif//(GLM_COMPILER & GLM_COMPILER_CLANG)
|
||||
|
||||
#endif//glm_core_features
|
||||
Vendored
-55
@@ -1,55 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
/// THE SOFTWARE.
|
||||
///
|
||||
/// @ref core
|
||||
/// @file glm/core/_fixes.hpp
|
||||
/// @date 2011-02-21 / 2011-11-22
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmath>
|
||||
|
||||
//! Workaround for compatibility with other libraries
|
||||
#ifdef max
|
||||
#undef max
|
||||
#endif
|
||||
|
||||
//! Workaround for compatibility with other libraries
|
||||
#ifdef min
|
||||
#undef min
|
||||
#endif
|
||||
|
||||
//! Workaround for Android
|
||||
#ifdef isnan
|
||||
#undef isnan
|
||||
#endif
|
||||
|
||||
//! Workaround for Android
|
||||
#ifdef isinf
|
||||
#undef isinf
|
||||
#endif
|
||||
|
||||
//! Workaround for Chrone Native Client
|
||||
#ifdef log2
|
||||
#undef log2
|
||||
#endif
|
||||
|
||||
Vendored
-109
@@ -1,109 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
/// THE SOFTWARE.
|
||||
///
|
||||
/// @ref core
|
||||
/// @file glm/detail/_noise.hpp
|
||||
/// @date 2013-12-24 / 2013-12-24
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef GLM_DETAIL_NOISE_INCLUDED
|
||||
#define GLM_DETAIL_NOISE_INCLUDED
|
||||
|
||||
namespace glm{
|
||||
namespace detail
|
||||
{
|
||||
template <typename T>
|
||||
inline T mod289(T const & x)
|
||||
{
|
||||
return x - floor(x * static_cast<T>(1.0) / static_cast<T>(289.0)) * static_cast<T>(289.0);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T permute(T const & x)
|
||||
{
|
||||
return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline tvec2<T, P> permute(tvec2<T, P> const & x)
|
||||
{
|
||||
return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline tvec3<T, P> permute(tvec3<T, P> const & x)
|
||||
{
|
||||
return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline tvec4<T, P> permute(tvec4<T, P> const & x)
|
||||
{
|
||||
return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
|
||||
}
|
||||
template <typename T>
|
||||
inline T taylorInvSqrt(T const & r)
|
||||
{
|
||||
return T(1.79284291400159) - T(0.85373472095314) * r;
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec2<T, P> taylorInvSqrt(detail::tvec2<T, P> const & r)
|
||||
{
|
||||
return T(1.79284291400159) - T(0.85373472095314) * r;
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec3<T, P> taylorInvSqrt(detail::tvec3<T, P> const & r)
|
||||
{
|
||||
return T(1.79284291400159) - T(0.85373472095314) * r;
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec4<T, P> taylorInvSqrt(detail::tvec4<T, P> const & r)
|
||||
{
|
||||
return T(1.79284291400159) - T(0.85373472095314) * r;
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec2<T, P> fade(detail::tvec2<T, P> const & t)
|
||||
{
|
||||
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec3<T, P> fade(detail::tvec3<T, P> const & t)
|
||||
{
|
||||
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec4<T, P> fade(detail::tvec4<T, P> const & t)
|
||||
{
|
||||
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
|
||||
}
|
||||
}//namespace detail
|
||||
}//namespace glm
|
||||
|
||||
#endif//GLM_DETAIL_NOISE_INCLUDED
|
||||
|
||||
Vendored
-831
@@ -1,831 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
/// THE SOFTWARE.
|
||||
///
|
||||
/// @ref core
|
||||
/// @file glm/core/_swizzle.hpp
|
||||
/// @date 2006-04-20 / 2011-02-16
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef glm_core_swizzle
|
||||
#define glm_core_swizzle
|
||||
|
||||
namespace glm{
|
||||
namespace detail
|
||||
{
|
||||
// Internal class for implementing swizzle operators
|
||||
template <typename T, int N>
|
||||
struct _swizzle_base0
|
||||
{
|
||||
typedef T value_type;
|
||||
|
||||
protected:
|
||||
inline value_type& elem (size_t i) { return (reinterpret_cast<value_type*>(_buffer))[i]; }
|
||||
inline const value_type& elem (size_t i) const { return (reinterpret_cast<const value_type*>(_buffer))[i]; }
|
||||
|
||||
// Use an opaque buffer to *ensure* the compiler doesn't call a constructor.
|
||||
// The size 1 buffer is assumed to aligned to the actual members so that the
|
||||
// elem()
|
||||
char _buffer[1];
|
||||
};
|
||||
|
||||
template <typename T, precision P, typename V, int E0, int E1, int E2, int E3, int N>
|
||||
struct _swizzle_base1 : public _swizzle_base0<T, N>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename T, precision P, typename V, int E0, int E1>
|
||||
struct _swizzle_base1<T, P, V,E0,E1,-1,-2,2> : public _swizzle_base0<T, 2>
|
||||
{
|
||||
inline V operator ()() const { return V(this->elem(E0), this->elem(E1)); }
|
||||
};
|
||||
|
||||
template <typename T, precision P, typename V, int E0, int E1, int E2>
|
||||
struct _swizzle_base1<T, P, V,E0,E1,E2,-1,3> : public _swizzle_base0<T, 3>
|
||||
{
|
||||
inline V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2)); }
|
||||
};
|
||||
|
||||
template <typename T, precision P, typename V, int E0, int E1, int E2, int E3>
|
||||
struct _swizzle_base1<T, P, V,E0,E1,E2,E3,4> : public _swizzle_base0<T, 4>
|
||||
{
|
||||
inline V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); }
|
||||
};
|
||||
|
||||
// Internal class for implementing swizzle operators
|
||||
/*
|
||||
Template parameters:
|
||||
|
||||
ValueType = type of scalar values (e.g. float, double)
|
||||
VecType = class the swizzle is applies to (e.g. tvec3<float>)
|
||||
N = number of components in the vector (e.g. 3)
|
||||
E0...3 = what index the n-th element of this swizzle refers to in the unswizzled vec
|
||||
|
||||
DUPLICATE_ELEMENTS = 1 if there is a repeated element, 0 otherwise (used to specialize swizzles
|
||||
containing duplicate elements so that they cannot be used as r-values).
|
||||
*/
|
||||
template <typename ValueType, precision P, typename VecType, int N, int E0, int E1, int E2, int E3, int DUPLICATE_ELEMENTS>
|
||||
struct _swizzle_base2 : public _swizzle_base1<ValueType, P, VecType,E0,E1,E2,E3,N>
|
||||
{
|
||||
typedef VecType vec_type;
|
||||
typedef ValueType value_type;
|
||||
|
||||
inline _swizzle_base2& operator= (const ValueType& t)
|
||||
{
|
||||
for (int i = 0; i < N; ++i)
|
||||
(*this)[i] = t;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline _swizzle_base2& operator= (const VecType& that)
|
||||
{
|
||||
struct op {
|
||||
inline void operator() (value_type& e, value_type& t) { e = t; }
|
||||
};
|
||||
_apply_op(that, op());
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline void operator -= (const VecType& that)
|
||||
{
|
||||
struct op {
|
||||
inline void operator() (value_type& e, value_type& t) { e -= t; }
|
||||
};
|
||||
_apply_op(that, op());
|
||||
}
|
||||
|
||||
inline void operator += (const VecType& that)
|
||||
{
|
||||
struct op {
|
||||
inline void operator() (value_type& e, value_type& t) { e += t; }
|
||||
};
|
||||
_apply_op(that, op());
|
||||
}
|
||||
|
||||
inline void operator *= (const VecType& that)
|
||||
{
|
||||
struct op {
|
||||
inline void operator() (value_type& e, value_type& t) { e *= t; }
|
||||
};
|
||||
_apply_op(that, op());
|
||||
}
|
||||
|
||||
inline void operator /= (const VecType& that)
|
||||
{
|
||||
struct op {
|
||||
inline void operator() (value_type& e, value_type& t) { e /= t; }
|
||||
};
|
||||
_apply_op(that, op());
|
||||
}
|
||||
|
||||
inline value_type& operator[] (size_t i)
|
||||
{
|
||||
static const int offset_dst[4] = { E0, E1, E2, E3 };
|
||||
return this->elem(offset_dst[i]);
|
||||
}
|
||||
inline value_type operator[] (size_t i) const
|
||||
{
|
||||
static const int offset_dst[4] = { E0, E1, E2, E3 };
|
||||
return this->elem(offset_dst[i]);
|
||||
}
|
||||
protected:
|
||||
template <typename T>
|
||||
inline void _apply_op(const VecType& that, T op)
|
||||
{
|
||||
// Make a copy of the data in this == &that.
|
||||
// The copier should optimize out the copy in cases where the function is
|
||||
// properly inlined and the copy is not necessary.
|
||||
ValueType t[N];
|
||||
for (int i = 0; i < N; ++i)
|
||||
t[i] = that[i];
|
||||
for (int i = 0; i < N; ++i)
|
||||
op( (*this)[i], t[i] );
|
||||
}
|
||||
};
|
||||
|
||||
// Specialization for swizzles containing duplicate elements. These cannot be modified.
|
||||
template <typename ValueType, precision P, typename VecType, int N, int E0, int E1, int E2, int E3>
|
||||
struct _swizzle_base2<ValueType, P, VecType,N,E0,E1,E2,E3,1> : public _swizzle_base1<ValueType, P, VecType,E0,E1,E2,E3,N>
|
||||
{
|
||||
typedef VecType vec_type;
|
||||
typedef ValueType value_type;
|
||||
|
||||
struct Stub {};
|
||||
inline _swizzle_base2& operator= (Stub const &) { return *this; }
|
||||
|
||||
inline value_type operator[] (size_t i) const
|
||||
{
|
||||
static const int offset_dst[4] = { E0, E1, E2, E3 };
|
||||
return this->elem(offset_dst[i]);
|
||||
}
|
||||
};
|
||||
|
||||
template <int N,typename ValueType, precision P, typename VecType, int E0,int E1,int E2,int E3>
|
||||
struct _swizzle : public _swizzle_base2<ValueType, P, VecType, N,E0,E1,E2,E3,(E0==E1||E0==E2||E0==E3||E1==E2||E1==E3||E2==E3)>
|
||||
{
|
||||
typedef _swizzle_base2<ValueType, P, VecType,N,E0,E1,E2,E3,(E0==E1||E0==E2||E0==E3||E1==E2||E1==E3||E2==E3)> base_type;
|
||||
|
||||
using base_type::operator=;
|
||||
|
||||
inline operator VecType () const { return (*this)(); }
|
||||
};
|
||||
|
||||
//
|
||||
// To prevent the C++ syntax from getting entirely overwhelming, define some alias macros
|
||||
//
|
||||
#define _GLM_SWIZZLE_TEMPLATE1 template <int N, typename T, precision P, typename V, int E0, int E1, int E2, int E3>
|
||||
#define _GLM_SWIZZLE_TEMPLATE2 template <int N, typename T, precision P, typename V, int E0, int E1, int E2, int E3, int F0, int F1, int F2, int F3>
|
||||
#define _GLM_SWIZZLE_TYPE1 _swizzle<N, T, P, V, E0, E1, E2, E3>
|
||||
#define _GLM_SWIZZLE_TYPE2 _swizzle<N, T, P, V, F0, F1, F2, F3>
|
||||
|
||||
//
|
||||
// Wrapper for a binary operator (e.g. u.yy + v.zy)
|
||||
//
|
||||
#define _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \
|
||||
_GLM_SWIZZLE_TEMPLATE2 \
|
||||
inline V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \
|
||||
{ \
|
||||
return a() OPERAND b(); \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
inline V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const V& b) \
|
||||
{ \
|
||||
return a() OPERAND b; \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
inline V operator OPERAND ( const V& a, const _GLM_SWIZZLE_TYPE1& b) \
|
||||
{ \
|
||||
return a OPERAND b(); \
|
||||
}
|
||||
|
||||
//
|
||||
// Wrapper for a operand between a swizzle and a binary (e.g. 1.0f - u.xyz)
|
||||
//
|
||||
#define _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
inline V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b) \
|
||||
{ \
|
||||
return a() OPERAND b; \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
inline V operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b) \
|
||||
{ \
|
||||
return a OPERAND b(); \
|
||||
}
|
||||
|
||||
//
|
||||
// Macro for wrapping a function taking one argument (e.g. abs())
|
||||
//
|
||||
#define _GLM_SWIZZLE_FUNCTION_1_ARGS(RETURN_TYPE,FUNCTION) \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a) \
|
||||
{ \
|
||||
return FUNCTION(a()); \
|
||||
}
|
||||
|
||||
//
|
||||
// Macro for wrapping a function taking two vector arguments (e.g. dot()).
|
||||
//
|
||||
#define _GLM_SWIZZLE_FUNCTION_2_ARGS(RETURN_TYPE,FUNCTION) \
|
||||
_GLM_SWIZZLE_TEMPLATE2 \
|
||||
inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \
|
||||
{ \
|
||||
return FUNCTION(a(), b()); \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b) \
|
||||
{ \
|
||||
return FUNCTION(a(), b()); \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename V& b) \
|
||||
{ \
|
||||
return FUNCTION(a(), b); \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const _GLM_SWIZZLE_TYPE1& b) \
|
||||
{ \
|
||||
return FUNCTION(a, b()); \
|
||||
}
|
||||
|
||||
//
|
||||
// Macro for wrapping a function take 2 vec arguments followed by a scalar (e.g. mix()).
|
||||
//
|
||||
#define _GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(RETURN_TYPE,FUNCTION) \
|
||||
_GLM_SWIZZLE_TEMPLATE2 \
|
||||
inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b, const T& c) \
|
||||
{ \
|
||||
return FUNCTION(a(), b(), c); \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \
|
||||
{ \
|
||||
return FUNCTION(a(), b(), c); \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename S0::vec_type& b, const T& c)\
|
||||
{ \
|
||||
return FUNCTION(a(), b, c); \
|
||||
} \
|
||||
_GLM_SWIZZLE_TEMPLATE1 \
|
||||
inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \
|
||||
{ \
|
||||
return FUNCTION(a, b(), c); \
|
||||
}
|
||||
|
||||
}//namespace detail
|
||||
}//namespace glm
|
||||
|
||||
namespace glm
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
_GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(-)
|
||||
_GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(*)
|
||||
_GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(+)
|
||||
_GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(-)
|
||||
_GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(*)
|
||||
_GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(/)
|
||||
}
|
||||
|
||||
//
|
||||
// Swizzles are distinct types from the unswizzled type. The below macros will
|
||||
// provide template specializations for the swizzle types for the given functions
|
||||
// so that the compiler does not have any ambiguity to choosing how to handle
|
||||
// the function.
|
||||
//
|
||||
// The alternative is to use the operator()() when calling the function in order
|
||||
// to explicitly convert the swizzled type to the unswizzled type.
|
||||
//
|
||||
|
||||
//_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, abs);
|
||||
//_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, acos);
|
||||
//_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, acosh);
|
||||
//_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, all);
|
||||
//_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, any);
|
||||
|
||||
//_GLM_SWIZZLE_FUNCTION_2_ARGS(value_type, dot);
|
||||
//_GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type, cross);
|
||||
//_GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type, step);
|
||||
//_GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(vec_type, mix);
|
||||
}
|
||||
|
||||
#define _GLM_SWIZZLE2_2_MEMBERS(T, P, V, E0,E1) \
|
||||
struct { _swizzle<2, T, P, V<T, P>, 0,0,-1,-2> E0 ## E0; }; \
|
||||
struct { _swizzle<2, T, P, V<T, P>, 0,1,-1,-2> E0 ## E1; }; \
|
||||
struct { _swizzle<2, T, P, V<T, P>, 1,0,-1,-2> E1 ## E0; }; \
|
||||
struct { _swizzle<2, T, P, V<T, P>, 1,1,-1,-2> E1 ## E1; };
|
||||
|
||||
#define _GLM_SWIZZLE2_3_MEMBERS(T, P, V, E0,E1) \
|
||||
struct { _swizzle<3,T, P, V<T, P>, 0,0,0,-1> E0 ## E0 ## E0; }; \
|
||||
struct { _swizzle<3,T, P, V<T, P>, 0,0,1,-1> E0 ## E0 ## E1; }; \
|
||||
struct { _swizzle<3,T, P, V<T, P>, 0,1,0,-1> E0 ## E1 ## E0; }; \
|
||||
struct { _swizzle<3,T, P, V<T, P>, 0,1,1,-1> E0 ## E1 ## E1; }; \
|
||||
struct { _swizzle<3,T, P, V<T, P>, 1,0,0,-1> E1 ## E0 ## E0; }; \
|
||||
struct { _swizzle<3,T, P, V<T, P>, 1,0,1,-1> E1 ## E0 ## E1; }; \
|
||||
struct { _swizzle<3,T, P, V<T, P>, 1,1,0,-1> E1 ## E1 ## E0; }; \
|
||||
struct { _swizzle<3,T, P, V<T, P>, 1,1,1,-1> E1 ## E1 ## E1; };
|
||||
|
||||
#define _GLM_SWIZZLE2_4_MEMBERS(T, P, V, E0,E1) \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,1,1,1> E1 ## E1 ## E1 ## E1; };
|
||||
|
||||
#define _GLM_SWIZZLE3_2_MEMBERS(T, P, V, E0,E1,E2) \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 0,0,-1,-2> E0 ## E0; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 0,1,-1,-2> E0 ## E1; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 0,2,-1,-2> E0 ## E2; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 1,0,-1,-2> E1 ## E0; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 1,1,-1,-2> E1 ## E1; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 1,2,-1,-2> E1 ## E2; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 2,0,-1,-2> E2 ## E0; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 2,1,-1,-2> E2 ## E1; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 2,2,-1,-2> E2 ## E2; };
|
||||
|
||||
#define _GLM_SWIZZLE3_3_MEMBERS(T, P, V ,E0,E1,E2) \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,0,0,-1> E0 ## E0 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,0,1,-1> E0 ## E0 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,0,2,-1> E0 ## E0 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,1,0,-1> E0 ## E1 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,1,1,-1> E0 ## E1 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,1,2,-1> E0 ## E1 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,2,0,-1> E0 ## E2 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,2,1,-1> E0 ## E2 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,2,2,-1> E0 ## E2 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,0,0,-1> E1 ## E0 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,0,1,-1> E1 ## E0 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,0,2,-1> E1 ## E0 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,1,0,-1> E1 ## E1 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,1,1,-1> E1 ## E1 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,1,2,-1> E1 ## E1 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,2,0,-1> E1 ## E2 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,2,1,-1> E1 ## E2 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,2,2,-1> E1 ## E2 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,0,0,-1> E2 ## E0 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,0,1,-1> E2 ## E0 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,0,2,-1> E2 ## E0 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,1,0,-1> E2 ## E1 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,1,1,-1> E2 ## E1 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,1,2,-1> E2 ## E1 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,2,0,-1> E2 ## E2 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,2,1,-1> E2 ## E2 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,2,2,-1> E2 ## E2 ## E2; };
|
||||
|
||||
#define _GLM_SWIZZLE3_4_MEMBERS(T, P, V, E0,E1,E2) \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,0,0,2> E0 ## E0 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,0,1,2> E0 ## E0 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,0,2,0> E0 ## E0 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,0,2,1> E0 ## E0 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,0,2,2> E0 ## E0 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,1,0,2> E0 ## E1 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,1,1,2> E0 ## E1 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,1,2,0> E0 ## E1 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,1,2,1> E0 ## E1 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,1,2,2> E0 ## E1 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,2,0,0> E0 ## E2 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,2,0,1> E0 ## E2 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,2,0,2> E0 ## E2 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,2,1,0> E0 ## E2 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,2,1,1> E0 ## E2 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,2,1,2> E0 ## E2 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,2,2,0> E0 ## E2 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,2,2,1> E0 ## E2 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 0,2,2,2> E0 ## E2 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,0,0,2> E1 ## E0 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,0,1,2> E1 ## E0 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,0,2,0> E1 ## E0 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,0,2,1> E1 ## E0 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,0,2,2> E1 ## E0 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,1,0,2> E1 ## E1 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,1,1,2> E1 ## E1 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,1,2,0> E1 ## E1 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,1,2,1> E1 ## E1 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,1,2,2> E1 ## E1 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,2,0,0> E1 ## E2 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,2,0,1> E1 ## E2 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,2,0,2> E1 ## E2 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,2,1,0> E1 ## E2 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,2,1,1> E1 ## E2 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,2,1,2> E1 ## E2 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,2,2,0> E1 ## E2 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,2,2,1> E1 ## E2 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 1,2,2,2> E1 ## E2 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,0,0,0> E2 ## E0 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,0,0,1> E2 ## E0 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,0,0,2> E2 ## E0 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,0,1,0> E2 ## E0 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,0,1,1> E2 ## E0 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,0,1,2> E2 ## E0 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,0,2,0> E2 ## E0 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,0,2,1> E2 ## E0 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,0,2,2> E2 ## E0 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,1,0,0> E2 ## E1 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,1,0,1> E2 ## E1 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,1,0,2> E2 ## E1 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,1,1,0> E2 ## E1 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,1,1,1> E2 ## E1 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,1,1,2> E2 ## E1 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,1,2,0> E2 ## E1 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,1,2,1> E2 ## E1 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,1,2,2> E2 ## E1 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,2,0,0> E2 ## E2 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,2,0,1> E2 ## E2 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,2,0,2> E2 ## E2 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,2,1,0> E2 ## E2 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,2,1,1> E2 ## E2 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4,T, P, V<T, P>, 2,2,2,2> E2 ## E2 ## E2 ## E2; };
|
||||
|
||||
#define _GLM_SWIZZLE4_2_MEMBERS(T, P, V, E0,E1,E2,E3) \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 0,0,-1,-2> E0 ## E0; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 0,1,-1,-2> E0 ## E1; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 0,2,-1,-2> E0 ## E2; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 0,3,-1,-2> E0 ## E3; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 1,0,-1,-2> E1 ## E0; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 1,1,-1,-2> E1 ## E1; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 1,2,-1,-2> E1 ## E2; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 1,3,-1,-2> E1 ## E3; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 2,0,-1,-2> E2 ## E0; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 2,1,-1,-2> E2 ## E1; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 2,2,-1,-2> E2 ## E2; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 2,3,-1,-2> E2 ## E3; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 3,0,-1,-2> E3 ## E0; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 3,1,-1,-2> E3 ## E1; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 3,2,-1,-2> E3 ## E2; }; \
|
||||
struct { _swizzle<2,T, P, V<T, P>, 3,3,-1,-2> E3 ## E3; };
|
||||
|
||||
#define _GLM_SWIZZLE4_3_MEMBERS(T,P, V, E0,E1,E2,E3) \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,0,0,-1> E0 ## E0 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,0,1,-1> E0 ## E0 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,0,2,-1> E0 ## E0 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,0,3,-1> E0 ## E0 ## E3; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,1,0,-1> E0 ## E1 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,1,1,-1> E0 ## E1 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,1,2,-1> E0 ## E1 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,1,3,-1> E0 ## E1 ## E3; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,2,0,-1> E0 ## E2 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,2,1,-1> E0 ## E2 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,2,2,-1> E0 ## E2 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,2,3,-1> E0 ## E2 ## E3; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,3,0,-1> E0 ## E3 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,3,1,-1> E0 ## E3 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,3,2,-1> E0 ## E3 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 0,3,3,-1> E0 ## E3 ## E3; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,0,0,-1> E1 ## E0 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,0,1,-1> E1 ## E0 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,0,2,-1> E1 ## E0 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,0,3,-1> E1 ## E0 ## E3; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,1,0,-1> E1 ## E1 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,1,1,-1> E1 ## E1 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,1,2,-1> E1 ## E1 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,1,3,-1> E1 ## E1 ## E3; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,2,0,-1> E1 ## E2 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,2,1,-1> E1 ## E2 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,2,2,-1> E1 ## E2 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,2,3,-1> E1 ## E2 ## E3; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,3,0,-1> E1 ## E3 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,3,1,-1> E1 ## E3 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,3,2,-1> E1 ## E3 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 1,3,3,-1> E1 ## E3 ## E3; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,0,0,-1> E2 ## E0 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,0,1,-1> E2 ## E0 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,0,2,-1> E2 ## E0 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,0,3,-1> E2 ## E0 ## E3; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,1,0,-1> E2 ## E1 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,1,1,-1> E2 ## E1 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,1,2,-1> E2 ## E1 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,1,3,-1> E2 ## E1 ## E3; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,2,0,-1> E2 ## E2 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,2,1,-1> E2 ## E2 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,2,2,-1> E2 ## E2 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,2,3,-1> E2 ## E2 ## E3; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,3,0,-1> E2 ## E3 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,3,1,-1> E2 ## E3 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,3,2,-1> E2 ## E3 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 2,3,3,-1> E2 ## E3 ## E3; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 3,0,0,-1> E3 ## E0 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 3,0,1,-1> E3 ## E0 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 3,0,2,-1> E3 ## E0 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 3,0,3,-1> E3 ## E0 ## E3; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 3,1,0,-1> E3 ## E1 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 3,1,1,-1> E3 ## E1 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 3,1,2,-1> E3 ## E1 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 3,1,3,-1> E3 ## E1 ## E3; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 3,2,0,-1> E3 ## E2 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 3,2,1,-1> E3 ## E2 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 3,2,2,-1> E3 ## E2 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 3,2,3,-1> E3 ## E2 ## E3; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 3,3,0,-1> E3 ## E3 ## E0; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 3,3,1,-1> E3 ## E3 ## E1; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 3,3,2,-1> E3 ## E3 ## E2; }; \
|
||||
struct { _swizzle<3,T,P, V<T, P>, 3,3,3,-1> E3 ## E3 ## E3; };
|
||||
|
||||
#define _GLM_SWIZZLE4_4_MEMBERS(T, P, V, E0,E1,E2,E3) \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,0,0,2> E0 ## E0 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,0,0,3> E0 ## E0 ## E0 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,0,1,2> E0 ## E0 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,0,1,3> E0 ## E0 ## E1 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,0,2,0> E0 ## E0 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,0,2,1> E0 ## E0 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,0,2,2> E0 ## E0 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,0,2,3> E0 ## E0 ## E2 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,0,3,0> E0 ## E0 ## E3 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,0,3,1> E0 ## E0 ## E3 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,0,3,2> E0 ## E0 ## E3 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,0,3,3> E0 ## E0 ## E3 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,1,0,2> E0 ## E1 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,1,0,3> E0 ## E1 ## E0 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,1,1,2> E0 ## E1 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,1,1,3> E0 ## E1 ## E1 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,1,2,0> E0 ## E1 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,1,2,1> E0 ## E1 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,1,2,2> E0 ## E1 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,1,2,3> E0 ## E1 ## E2 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,1,3,0> E0 ## E1 ## E3 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,1,3,1> E0 ## E1 ## E3 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,1,3,2> E0 ## E1 ## E3 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,1,3,3> E0 ## E1 ## E3 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,2,0,0> E0 ## E2 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,2,0,1> E0 ## E2 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,2,0,2> E0 ## E2 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,2,0,3> E0 ## E2 ## E0 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,2,1,0> E0 ## E2 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,2,1,1> E0 ## E2 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,2,1,2> E0 ## E2 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,2,1,3> E0 ## E2 ## E1 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,2,2,0> E0 ## E2 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,2,2,1> E0 ## E2 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,2,2,2> E0 ## E2 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,2,2,3> E0 ## E2 ## E2 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,2,3,0> E0 ## E2 ## E3 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,2,3,1> E0 ## E2 ## E3 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,2,3,2> E0 ## E2 ## E3 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,2,3,3> E0 ## E2 ## E3 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,3,0,0> E0 ## E3 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,3,0,1> E0 ## E3 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,3,0,2> E0 ## E3 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,3,0,3> E0 ## E3 ## E0 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,3,1,0> E0 ## E3 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,3,1,1> E0 ## E3 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,3,1,2> E0 ## E3 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,3,1,3> E0 ## E3 ## E1 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,3,2,0> E0 ## E3 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,3,2,1> E0 ## E3 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,3,2,2> E0 ## E3 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,3,2,3> E0 ## E3 ## E2 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,3,3,0> E0 ## E3 ## E3 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,3,3,1> E0 ## E3 ## E3 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,3,3,2> E0 ## E3 ## E3 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 0,3,3,3> E0 ## E3 ## E3 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,0,0,2> E1 ## E0 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,0,0,3> E1 ## E0 ## E0 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,0,1,2> E1 ## E0 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,0,1,3> E1 ## E0 ## E1 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,0,2,0> E1 ## E0 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,0,2,1> E1 ## E0 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,0,2,2> E1 ## E0 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,0,2,3> E1 ## E0 ## E2 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,0,3,0> E1 ## E0 ## E3 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,0,3,1> E1 ## E0 ## E3 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,0,3,2> E1 ## E0 ## E3 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,0,3,3> E1 ## E0 ## E3 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,1,0,2> E1 ## E1 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,1,0,3> E1 ## E1 ## E0 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,1,1,2> E1 ## E1 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,1,1,3> E1 ## E1 ## E1 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,1,2,0> E1 ## E1 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,1,2,1> E1 ## E1 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,1,2,2> E1 ## E1 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,1,2,3> E1 ## E1 ## E2 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,1,3,0> E1 ## E1 ## E3 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,1,3,1> E1 ## E1 ## E3 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,1,3,2> E1 ## E1 ## E3 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,1,3,3> E1 ## E1 ## E3 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,2,0,0> E1 ## E2 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,2,0,1> E1 ## E2 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,2,0,2> E1 ## E2 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,2,0,3> E1 ## E2 ## E0 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,2,1,0> E1 ## E2 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,2,1,1> E1 ## E2 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,2,1,2> E1 ## E2 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,2,1,3> E1 ## E2 ## E1 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,2,2,0> E1 ## E2 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,2,2,1> E1 ## E2 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,2,2,2> E1 ## E2 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,2,2,3> E1 ## E2 ## E2 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,2,3,0> E1 ## E2 ## E3 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,2,3,1> E1 ## E2 ## E3 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,2,3,2> E1 ## E2 ## E3 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,2,3,3> E1 ## E2 ## E3 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,3,0,0> E1 ## E3 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,3,0,1> E1 ## E3 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,3,0,2> E1 ## E3 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,3,0,3> E1 ## E3 ## E0 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,3,1,0> E1 ## E3 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,3,1,1> E1 ## E3 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,3,1,2> E1 ## E3 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,3,1,3> E1 ## E3 ## E1 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,3,2,0> E1 ## E3 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,3,2,1> E1 ## E3 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,3,2,2> E1 ## E3 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,3,2,3> E1 ## E3 ## E2 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,3,3,0> E1 ## E3 ## E3 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,3,3,1> E1 ## E3 ## E3 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,3,3,2> E1 ## E3 ## E3 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 1,3,3,3> E1 ## E3 ## E3 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,0,0,0> E2 ## E0 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,0,0,1> E2 ## E0 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,0,0,2> E2 ## E0 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,0,0,3> E2 ## E0 ## E0 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,0,1,0> E2 ## E0 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,0,1,1> E2 ## E0 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,0,1,2> E2 ## E0 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,0,1,3> E2 ## E0 ## E1 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,0,2,0> E2 ## E0 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,0,2,1> E2 ## E0 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,0,2,2> E2 ## E0 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,0,2,3> E2 ## E0 ## E2 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,0,3,0> E2 ## E0 ## E3 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,0,3,1> E2 ## E0 ## E3 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,0,3,2> E2 ## E0 ## E3 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,0,3,3> E2 ## E0 ## E3 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,1,0,0> E2 ## E1 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,1,0,1> E2 ## E1 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,1,0,2> E2 ## E1 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,1,0,3> E2 ## E1 ## E0 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,1,1,0> E2 ## E1 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,1,1,1> E2 ## E1 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,1,1,2> E2 ## E1 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,1,1,3> E2 ## E1 ## E1 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,1,2,0> E2 ## E1 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,1,2,1> E2 ## E1 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,1,2,2> E2 ## E1 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,1,2,3> E2 ## E1 ## E2 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,1,3,0> E2 ## E1 ## E3 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,1,3,1> E2 ## E1 ## E3 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,1,3,2> E2 ## E1 ## E3 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,1,3,3> E2 ## E1 ## E3 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,2,0,0> E2 ## E2 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,2,0,1> E2 ## E2 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,2,0,2> E2 ## E2 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,2,0,3> E2 ## E2 ## E0 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,2,1,0> E2 ## E2 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,2,1,1> E2 ## E2 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,2,1,3> E2 ## E2 ## E1 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,2,2,2> E2 ## E2 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,2,2,3> E2 ## E2 ## E2 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,2,3,0> E2 ## E2 ## E3 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,2,3,1> E2 ## E2 ## E3 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,2,3,2> E2 ## E2 ## E3 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,2,3,3> E2 ## E2 ## E3 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,3,0,0> E2 ## E3 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,3,0,1> E2 ## E3 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,3,0,2> E2 ## E3 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,3,0,3> E2 ## E3 ## E0 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,3,1,0> E2 ## E3 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,3,1,1> E2 ## E3 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,3,1,2> E2 ## E3 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,3,1,3> E2 ## E3 ## E1 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,3,2,0> E2 ## E3 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,3,2,1> E2 ## E3 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,3,2,2> E2 ## E3 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,3,2,3> E2 ## E3 ## E2 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,3,3,0> E2 ## E3 ## E3 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,3,3,1> E2 ## E3 ## E3 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,3,3,2> E2 ## E3 ## E3 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 2,3,3,3> E2 ## E3 ## E3 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,0,0,0> E3 ## E0 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,0,0,1> E3 ## E0 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,0,0,2> E3 ## E0 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,0,0,3> E3 ## E0 ## E0 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,0,1,0> E3 ## E0 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,0,1,1> E3 ## E0 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,0,1,2> E3 ## E0 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,0,1,3> E3 ## E0 ## E1 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,0,2,0> E3 ## E0 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,0,2,1> E3 ## E0 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,0,2,2> E3 ## E0 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,0,2,3> E3 ## E0 ## E2 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,0,3,0> E3 ## E0 ## E3 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,0,3,1> E3 ## E0 ## E3 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,0,3,2> E3 ## E0 ## E3 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,0,3,3> E3 ## E0 ## E3 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,1,0,0> E3 ## E1 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,1,0,1> E3 ## E1 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,1,0,2> E3 ## E1 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,1,0,3> E3 ## E1 ## E0 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,1,1,0> E3 ## E1 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,1,1,1> E3 ## E1 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,1,1,2> E3 ## E1 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,1,1,3> E3 ## E1 ## E1 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,1,2,0> E3 ## E1 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,1,2,1> E3 ## E1 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,1,2,2> E3 ## E1 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,1,2,3> E3 ## E1 ## E2 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,1,3,0> E3 ## E1 ## E3 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,1,3,1> E3 ## E1 ## E3 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,1,3,2> E3 ## E1 ## E3 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,1,3,3> E3 ## E1 ## E3 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,2,0,0> E3 ## E2 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,2,0,1> E3 ## E2 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,2,0,2> E3 ## E2 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,2,0,3> E3 ## E2 ## E0 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,2,1,0> E3 ## E2 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,2,1,1> E3 ## E2 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,2,1,2> E3 ## E2 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,2,1,3> E3 ## E2 ## E1 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,2,2,0> E3 ## E2 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,2,2,1> E3 ## E2 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,2,2,2> E3 ## E2 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,2,2,3> E3 ## E2 ## E2 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,2,3,0> E3 ## E2 ## E3 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,2,3,1> E3 ## E2 ## E3 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,2,3,2> E3 ## E2 ## E3 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,2,3,3> E3 ## E2 ## E3 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,3,0,0> E3 ## E3 ## E0 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,3,0,1> E3 ## E3 ## E0 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,3,0,2> E3 ## E3 ## E0 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,3,0,3> E3 ## E3 ## E0 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,3,1,0> E3 ## E3 ## E1 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,3,1,1> E3 ## E3 ## E1 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,3,1,2> E3 ## E3 ## E1 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,3,1,3> E3 ## E3 ## E1 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,3,2,0> E3 ## E3 ## E2 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,3,2,1> E3 ## E3 ## E2 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,3,2,2> E3 ## E3 ## E2 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,3,2,3> E3 ## E3 ## E2 ## E3; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,3,3,0> E3 ## E3 ## E3 ## E0; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,3,3,1> E3 ## E3 ## E3 ## E1; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,3,3,2> E3 ## E3 ## E3 ## E2; }; \
|
||||
struct { _swizzle<4, T, P, V<T, P>, 3,3,3,3> E3 ## E3 ## E3 ## E3; };
|
||||
|
||||
#endif//glm_core_swizzle
|
||||
Vendored
-724
@@ -1,724 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
/// THE SOFTWARE.
|
||||
///
|
||||
/// @ref core
|
||||
/// @file glm/core/_swizzle_func.hpp
|
||||
/// @date 2011-10-16 / 2011-10-16
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef glm_core_swizzle_func
|
||||
#define glm_core_swizzle_func
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B) \
|
||||
SWIZZLED_TYPE<TMPL_TYPE, PRECISION> A ## B() CONST \
|
||||
{ \
|
||||
return SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B); \
|
||||
}
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C) \
|
||||
SWIZZLED_TYPE<TMPL_TYPE, PRECISION> A ## B ## C() CONST \
|
||||
{ \
|
||||
return SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B, this->C); \
|
||||
}
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D) \
|
||||
SWIZZLED_TYPE<TMPL_TYPE, PRECISION> A ## B ## C ## D() CONST \
|
||||
{ \
|
||||
return SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B, this->C, this->D); \
|
||||
}
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC2_ENTRY_DEF(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B) \
|
||||
template <typename TMPL_TYPE> \
|
||||
SWIZZLED_TYPE<TMPL_TYPE> CLASS_TYPE<TMPL_TYPE, PRECISION>::A ## B() CONST \
|
||||
{ \
|
||||
return SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B); \
|
||||
}
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC3_ENTRY_DEF(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C) \
|
||||
template <typename TMPL_TYPE> \
|
||||
SWIZZLED_TYPE<TMPL_TYPE> CLASS_TYPE<TMPL_TYPE, PRECISION>::A ## B ## C() CONST \
|
||||
{ \
|
||||
return SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B, this->C); \
|
||||
}
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC4_ENTRY_DEF(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D) \
|
||||
template <typename TMPL_TYPE> \
|
||||
SWIZZLED_TYPE<TMPL_TYPE> CLASS_TYPE<TMPL_TYPE, PRECISION>::A ## B ## C ## D() CONST \
|
||||
{ \
|
||||
return SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B, this->C, this->D); \
|
||||
}
|
||||
|
||||
#define GLM_MUTABLE
|
||||
|
||||
#define GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_REF_FROM_VEC2(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE) \
|
||||
GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, x, y) \
|
||||
GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, r, g) \
|
||||
GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, s, t)
|
||||
|
||||
//GLM_SWIZZLE_GEN_REF_FROM_VEC2(valType, detail::vec2, detail::ref2)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B, A)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_REF_FROM_VEC3(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE) \
|
||||
GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, x, y, z) \
|
||||
GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, r, g, b) \
|
||||
GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, s, t, p)
|
||||
|
||||
//GLM_SWIZZLE_GEN_REF_FROM_VEC3(valType, detail::vec3, detail::ref2, detail::ref3)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, C)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C, A)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_REF_FROM_VEC4(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \
|
||||
GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \
|
||||
GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \
|
||||
GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p, q)
|
||||
|
||||
//GLM_SWIZZLE_GEN_REF_FROM_VEC4(valType, detail::vec4, detail::ref2, detail::ref3, detail::ref4)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y) \
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g) \
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t)
|
||||
|
||||
//GLM_SWIZZLE_GEN_VEC_FROM_VEC2(valType, detail::vec2, detail::vec2, detail::vec3, detail::vec4)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z) \
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b) \
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p)
|
||||
|
||||
//GLM_SWIZZLE_GEN_VEC_FROM_VEC3(valType, detail::vec3, detail::vec2, detail::vec3, detail::vec4)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, A) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, B) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, C) \
|
||||
GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, D)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \
|
||||
GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \
|
||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p, q)
|
||||
|
||||
//GLM_SWIZZLE_GEN_VEC_FROM_VEC4(valType, detail::vec4, detail::vec2, detail::vec3, detail::vec4)
|
||||
|
||||
#endif//glm_core_swizzle_func
|
||||
Vendored
-217
@@ -1,217 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
/// THE SOFTWARE.
|
||||
///
|
||||
/// @ref core
|
||||
/// @file glm/core/_vectorize.hpp
|
||||
/// @date 2011-10-14 / 2011-10-14
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef GLM_CORE_DETAIL_INCLUDED
|
||||
#define GLM_CORE_DETAIL_INCLUDED
|
||||
|
||||
#include "type_vec1.hpp"
|
||||
#include "type_vec2.hpp"
|
||||
#include "type_vec3.hpp"
|
||||
#include "type_vec4.hpp"
|
||||
|
||||
#define VECTORIZE1_VEC(func) \
|
||||
template <typename T, precision P> \
|
||||
inline detail::tvec1<T, P> func( \
|
||||
detail::tvec1<T, P> const & v) \
|
||||
{ \
|
||||
return detail::tvec1<T, P>( \
|
||||
func(v.x)); \
|
||||
}
|
||||
|
||||
#define VECTORIZE2_VEC(func) \
|
||||
template <typename T, precision P> \
|
||||
inline detail::tvec2<T, P> func( \
|
||||
detail::tvec2<T, P> const & v) \
|
||||
{ \
|
||||
return detail::tvec2<T, P>( \
|
||||
func(v.x), \
|
||||
func(v.y)); \
|
||||
}
|
||||
|
||||
#define VECTORIZE3_VEC(func) \
|
||||
template <typename T, precision P> \
|
||||
inline detail::tvec3<T, P> func( \
|
||||
detail::tvec3<T, P> const & v) \
|
||||
{ \
|
||||
return detail::tvec3<T, P>( \
|
||||
func(v.x), \
|
||||
func(v.y), \
|
||||
func(v.z)); \
|
||||
}
|
||||
|
||||
#define VECTORIZE4_VEC(func) \
|
||||
template <typename T, precision P> \
|
||||
inline detail::tvec4<T, P> func( \
|
||||
detail::tvec4<T, P> const & v) \
|
||||
{ \
|
||||
return detail::tvec4<T, P>( \
|
||||
func(v.x), \
|
||||
func(v.y), \
|
||||
func(v.z), \
|
||||
func(v.w)); \
|
||||
}
|
||||
|
||||
#define VECTORIZE_VEC(func) \
|
||||
VECTORIZE1_VEC(func) \
|
||||
VECTORIZE2_VEC(func) \
|
||||
VECTORIZE3_VEC(func) \
|
||||
VECTORIZE4_VEC(func)
|
||||
|
||||
#define VECTORIZE1_VEC_SCA(func) \
|
||||
template <typename T, precision P> \
|
||||
inline detail::tvec1<T, P> func \
|
||||
( \
|
||||
detail::tvec1<T, P> const & x, \
|
||||
T const & y \
|
||||
) \
|
||||
{ \
|
||||
return detail::tvec1<T, P>( \
|
||||
func(x.x, y)); \
|
||||
}
|
||||
|
||||
#define VECTORIZE2_VEC_SCA(func) \
|
||||
template <typename T, precision P> \
|
||||
inline detail::tvec2<T, P> func \
|
||||
( \
|
||||
detail::tvec2<T, P> const & x, \
|
||||
T const & y \
|
||||
) \
|
||||
{ \
|
||||
return detail::tvec2<T, P>( \
|
||||
func(x.x, y), \
|
||||
func(x.y, y)); \
|
||||
}
|
||||
|
||||
#define VECTORIZE3_VEC_SCA(func) \
|
||||
template <typename T, precision P> \
|
||||
inline detail::tvec3<T, P> func \
|
||||
( \
|
||||
detail::tvec3<T, P> const & x, \
|
||||
T const & y \
|
||||
) \
|
||||
{ \
|
||||
return detail::tvec3<T, P>( \
|
||||
func(x.x, y), \
|
||||
func(x.y, y), \
|
||||
func(x.z, y)); \
|
||||
}
|
||||
|
||||
#define VECTORIZE4_VEC_SCA(func) \
|
||||
template <typename T, precision P> \
|
||||
inline detail::tvec4<T, P> func \
|
||||
( \
|
||||
detail::tvec4<T, P> const & x, \
|
||||
T const & y \
|
||||
) \
|
||||
{ \
|
||||
return detail::tvec4<T, P>( \
|
||||
func(x.x, y), \
|
||||
func(x.y, y), \
|
||||
func(x.z, y), \
|
||||
func(x.w, y)); \
|
||||
}
|
||||
|
||||
#define VECTORIZE_VEC_SCA(func) \
|
||||
VECTORIZE1_VEC_SCA(func) \
|
||||
VECTORIZE2_VEC_SCA(func) \
|
||||
VECTORIZE3_VEC_SCA(func) \
|
||||
VECTORIZE4_VEC_SCA(func)
|
||||
|
||||
#define VECTORIZE2_VEC_VEC(func) \
|
||||
template <typename T, precision P> \
|
||||
inline detail::tvec2<T, P> func \
|
||||
( \
|
||||
detail::tvec2<T, P> const & x, \
|
||||
detail::tvec2<T, P> const & y \
|
||||
) \
|
||||
{ \
|
||||
return detail::tvec2<T, P>( \
|
||||
func(x.x, y.x), \
|
||||
func(x.y, y.y)); \
|
||||
}
|
||||
|
||||
#define VECTORIZE3_VEC_VEC(func) \
|
||||
template <typename T, precision P> \
|
||||
inline detail::tvec3<T, P> func \
|
||||
( \
|
||||
detail::tvec3<T, P> const & x, \
|
||||
detail::tvec3<T, P> const & y \
|
||||
) \
|
||||
{ \
|
||||
return detail::tvec3<T, P>( \
|
||||
func(x.x, y.x), \
|
||||
func(x.y, y.y), \
|
||||
func(x.z, y.z)); \
|
||||
}
|
||||
|
||||
#define VECTORIZE4_VEC_VEC(func) \
|
||||
template <typename T, precision P> \
|
||||
inline detail::tvec4<T, P> func \
|
||||
( \
|
||||
detail::tvec4<T, P> const & x, \
|
||||
detail::tvec4<T, P> const & y \
|
||||
) \
|
||||
{ \
|
||||
return detail::tvec4<T, P>( \
|
||||
func(x.x, y.x), \
|
||||
func(x.y, y.y), \
|
||||
func(x.z, y.z), \
|
||||
func(x.w, y.w)); \
|
||||
}
|
||||
|
||||
#define VECTORIZE_VEC_VEC(func) \
|
||||
VECTORIZE2_VEC_VEC(func) \
|
||||
VECTORIZE3_VEC_VEC(func) \
|
||||
VECTORIZE4_VEC_VEC(func)
|
||||
|
||||
namespace glm{
|
||||
namespace detail
|
||||
{
|
||||
template<bool C>
|
||||
struct If
|
||||
{
|
||||
template<typename F, typename T>
|
||||
static inline T apply(F functor, const T& val)
|
||||
{
|
||||
return functor(val);
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct If<false>
|
||||
{
|
||||
template<typename F, typename T>
|
||||
static inline T apply(F, const T& val)
|
||||
{
|
||||
return val;
|
||||
}
|
||||
};
|
||||
}//namespace detail
|
||||
}//namespace glm
|
||||
|
||||
#endif//GLM_CORE_DETAIL_INCLUDED
|
||||
Vendored
-472
@@ -1,472 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
/// THE SOFTWARE.
|
||||
///
|
||||
/// @ref core
|
||||
/// @file glm/core/func_common.hpp
|
||||
/// @date 2008-03-08 / 2010-01-26
|
||||
/// @author Christophe Riccio
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
///
|
||||
/// @defgroup core_func_common Common functions
|
||||
/// @ingroup core
|
||||
///
|
||||
/// These all operate component-wise. The description is per component.
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef GLM_FUNC_COMMON_INCLUDED
|
||||
#define GLM_FUNC_COMMON_INCLUDED
|
||||
|
||||
#include "setup.hpp"
|
||||
#include "precision.hpp"
|
||||
#include "type_int.hpp"
|
||||
#include "_fixes.hpp"
|
||||
|
||||
namespace glm
|
||||
{
|
||||
/// @addtogroup core_func_common
|
||||
/// @{
|
||||
|
||||
/// Returns x if x >= 0; otherwise, it returns -x.
|
||||
///
|
||||
/// @tparam genType floating-point or signed integer; scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/abs.xml">GLSL abs man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType abs(genType const & x);
|
||||
|
||||
/// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0.
|
||||
///
|
||||
/// @tparam genType Floating-point or signed integer; scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sign.xml">GLSL sign man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType sign(genType const & x);
|
||||
|
||||
/// Returns a value equal to the nearest integer that is less then or equal to x.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floor.xml">GLSL floor man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType floor(genType const & x);
|
||||
|
||||
/// Returns a value equal to the nearest integer to x
|
||||
/// whose absolute value is not larger than the absolute value of x.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/trunc.xml">GLSL trunc man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType trunc(genType const & x);
|
||||
|
||||
/// Returns a value equal to the nearest integer to x.
|
||||
/// The fraction 0.5 will round in a direction chosen by the
|
||||
/// implementation, presumably the direction that is fastest.
|
||||
/// This includes the possibility that round(x) returns the
|
||||
/// same value as roundEven(x) for all values of x.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/round.xml">GLSL round man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType round(genType const & x);
|
||||
|
||||
/// Returns a value equal to the nearest integer to x.
|
||||
/// A fractional part of 0.5 will round toward the nearest even
|
||||
/// integer. (Both 3.5 and 4.5 for x will return 4.0.)
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/roundEven.xml">GLSL roundEven man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
/// @see <a href="http://developer.amd.com/documentation/articles/pages/New-Round-to-Even-Technique.aspx">New round to even technique</a>
|
||||
template <typename genType>
|
||||
genType roundEven(genType const & x);
|
||||
|
||||
/// Returns a value equal to the nearest integer
|
||||
/// that is greater than or equal to x.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ceil.xml">GLSL ceil man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType ceil(genType const & x);
|
||||
|
||||
/// Return x - floor(x).
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/fract.xml">GLSL fract man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType fract(genType const & x);
|
||||
|
||||
/// Modulus. Returns x - y * floor(x / y)
|
||||
/// for each component in x using the floating point value y.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType mod(
|
||||
genType const & x,
|
||||
genType const & y);
|
||||
|
||||
/// Modulus. Returns x - y * floor(x / y)
|
||||
/// for each component in x using the floating point value y.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType mod(
|
||||
genType const & x,
|
||||
typename genType::value_type const & y);
|
||||
|
||||
/// Returns the fractional part of x and sets i to the integer
|
||||
/// part (as a whole number floating point value). Both the
|
||||
/// return value and the output parameter will have the same
|
||||
/// sign as x.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/modf.xml">GLSL modf man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType modf(
|
||||
genType const & x,
|
||||
genType & i);
|
||||
|
||||
/// Returns y if y < x; otherwise, it returns x.
|
||||
///
|
||||
/// @tparam genType Floating-point or integer; scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/min.xml">GLSL min man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a><<<<<<< HEAD
|
||||
template <typename genType>
|
||||
genType min(
|
||||
genType const & x,
|
||||
genType const & y);
|
||||
|
||||
template <typename genType>
|
||||
genType min(
|
||||
genType const & x,
|
||||
typename genType::value_type const & y);
|
||||
|
||||
/// Returns y if x < y; otherwise, it returns x.
|
||||
///
|
||||
/// @tparam genType Floating-point or integer; scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/max.xml">GLSL max man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType max(
|
||||
genType const & x,
|
||||
genType const & y);
|
||||
|
||||
template <typename genType>
|
||||
genType max(
|
||||
genType const & x,
|
||||
typename genType::value_type const & y);
|
||||
|
||||
/// Returns min(max(x, minVal), maxVal) for each component in x
|
||||
/// using the floating-point values minVal and maxVal.
|
||||
///
|
||||
/// @tparam genType Floating-point or integer; scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml">GLSL clamp man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType clamp(
|
||||
genType const & x,
|
||||
genType const & minVal,
|
||||
genType const & maxVal);
|
||||
|
||||
template <typename genType, precision P>
|
||||
genType clamp(
|
||||
genType const & x,
|
||||
typename genType::value_type const & minVal,
|
||||
typename genType::value_type const & maxVal);
|
||||
|
||||
/// If genTypeU is a floating scalar or vector:
|
||||
/// Returns x * (1.0 - a) + y * a, i.e., the linear blend of
|
||||
/// x and y using the floating-point value a.
|
||||
/// The value for a is not restricted to the range [0, 1].
|
||||
///
|
||||
/// If genTypeU is a boolean scalar or vector:
|
||||
/// Selects which vector each returned component comes
|
||||
/// from. For a component of <a> that is false, the
|
||||
/// corresponding component of x is returned. For a
|
||||
/// component of a that is true, the corresponding
|
||||
/// component of y is returned. Components of x and y that
|
||||
/// are not selected are allowed to be invalid floating point
|
||||
/// values and will have no effect on the results. Thus, this
|
||||
/// provides different functionality than
|
||||
/// genType mix(genType x, genType y, genType(a))
|
||||
/// where a is a Boolean vector.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mix.xml">GLSL mix man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
///
|
||||
/// @param[in] x Value to interpolate.
|
||||
/// @param[in] y Value to interpolate.
|
||||
/// @param[in] a Interpolant.
|
||||
///
|
||||
/// @tparam genTypeT Floating point scalar or vector.
|
||||
/// @tparam genTypeU Floating point or boolean scalar or vector. It can't be a vector if it is the length of genTypeT.
|
||||
///
|
||||
/// @code
|
||||
/// #include <glm/glm.hpp>
|
||||
/// ...
|
||||
/// float a;
|
||||
/// bool b;
|
||||
/// glm::dvec3 e;
|
||||
/// glm::dvec3 f;
|
||||
/// glm::vec4 g;
|
||||
/// glm::vec4 h;
|
||||
/// ...
|
||||
/// glm::vec4 r = glm::mix(g, h, a); // Interpolate with a floating-point scalar two vectors.
|
||||
/// glm::vec4 s = glm::mix(g, h, b); // Teturns g or h;
|
||||
/// glm::dvec3 t = glm::mix(e, f, a); // Types of the third parameter is not required to match with the first and the second.
|
||||
/// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter.
|
||||
/// @endcode
|
||||
template <typename T, typename U, precision P, template <typename, precision> class vecType>
|
||||
vecType<T, P> mix(
|
||||
vecType<T, P> const & x,
|
||||
vecType<T, P> const & y,
|
||||
vecType<U, P> const & a);
|
||||
|
||||
template <typename T, typename U, precision P, template <typename, precision> class vecType>
|
||||
vecType<T, P> mix(
|
||||
vecType<T, P> const & x,
|
||||
vecType<T, P> const & y,
|
||||
U const & a);
|
||||
|
||||
template <typename genTypeT, typename genTypeU>
|
||||
genTypeT mix(
|
||||
genTypeT const & x,
|
||||
genTypeT const & y,
|
||||
genTypeU const & a);
|
||||
|
||||
/// Returns 0.0 if x < edge, otherwise it returns 1.0 for each component of a genType.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType step(
|
||||
genType const & edge,
|
||||
genType const & x);
|
||||
|
||||
/// Returns 0.0 if x < edge, otherwise it returns 1.0.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <template <typename, precision> class vecType, typename T, precision P>
|
||||
vecType<T, P> step(
|
||||
T const & edge,
|
||||
vecType<T, P> const & x);
|
||||
|
||||
/// Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and
|
||||
/// performs smooth Hermite interpolation between 0 and 1
|
||||
/// when edge0 < x < edge1. This is useful in cases where
|
||||
/// you would want a threshold function with a smooth
|
||||
/// transition. This is equivalent to:
|
||||
/// genType t;
|
||||
/// t = clamp ((x - edge0) / (edge1 - edge0), 0, 1);
|
||||
/// return t * t * (3 - 2 * t);
|
||||
/// Results are undefined if edge0 >= edge1.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/smoothstep.xml">GLSL smoothstep man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType smoothstep(
|
||||
genType const & edge0,
|
||||
genType const & edge1,
|
||||
genType const & x);
|
||||
|
||||
template <typename genType>
|
||||
genType smoothstep(
|
||||
typename genType::value_type const & edge0,
|
||||
typename genType::value_type const & edge1,
|
||||
genType const & x);
|
||||
|
||||
/// Returns true if x holds a NaN (not a number)
|
||||
/// representation in the underlying implementation's set of
|
||||
/// floating point representations. Returns false otherwise,
|
||||
/// including for implementations with no NaN
|
||||
/// representations.
|
||||
///
|
||||
/// /!\ When using compiler fast math, this function may fail.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isnan.xml">GLSL isnan man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
typename genType::bool_type isnan(genType const & x);
|
||||
|
||||
/// Returns true if x holds a positive infinity or negative
|
||||
/// infinity representation in the underlying implementation's
|
||||
/// set of floating point representations. Returns false
|
||||
/// otherwise, including for implementations with no infinity
|
||||
/// representations.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isinf.xml">GLSL isinf man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
typename genType::bool_type isinf(genType const & x);
|
||||
|
||||
/// Returns a signed integer value representing
|
||||
/// the encoding of a floating-point value. The floating-point
|
||||
/// value's bit-level representation is preserved.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml">GLSL floatBitsToInt man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
int floatBitsToInt(float const & v);
|
||||
|
||||
/// Returns a signed integer value representing
|
||||
/// the encoding of a floating-point value. The floatingpoint
|
||||
/// value's bit-level representation is preserved.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml">GLSL floatBitsToInt man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <template <typename, precision> class vecType, precision P>
|
||||
vecType<int, P> floatBitsToInt(vecType<float, P> const & v);
|
||||
|
||||
/// Returns a unsigned integer value representing
|
||||
/// the encoding of a floating-point value. The floatingpoint
|
||||
/// value's bit-level representation is preserved.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml">GLSL floatBitsToUint man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
uint floatBitsToUint(float const & v);
|
||||
|
||||
/// Returns a unsigned integer value representing
|
||||
/// the encoding of a floating-point value. The floatingpoint
|
||||
/// value's bit-level representation is preserved.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml">GLSL floatBitsToUint man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <template <typename, precision> class vecType, precision P>
|
||||
vecType<uint, P> floatBitsToUint(vecType<float, P> const & v);
|
||||
|
||||
/// Returns a floating-point value corresponding to a signed
|
||||
/// integer encoding of a floating-point value.
|
||||
/// If an inf or NaN is passed in, it will not signal, and the
|
||||
/// resulting floating point value is unspecified. Otherwise,
|
||||
/// the bit-level representation is preserved.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
float intBitsToFloat(int const & v);
|
||||
|
||||
/// Returns a floating-point value corresponding to a signed
|
||||
/// integer encoding of a floating-point value.
|
||||
/// If an inf or NaN is passed in, it will not signal, and the
|
||||
/// resulting floating point value is unspecified. Otherwise,
|
||||
/// the bit-level representation is preserved.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <template <typename, precision> class vecType, precision P>
|
||||
vecType<float, P> intBitsToFloat(vecType<int, P> const & v);
|
||||
|
||||
/// Returns a floating-point value corresponding to a
|
||||
/// unsigned integer encoding of a floating-point value.
|
||||
/// If an inf or NaN is passed in, it will not signal, and the
|
||||
/// resulting floating point value is unspecified. Otherwise,
|
||||
/// the bit-level representation is preserved.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml">GLSL uintBitsToFloat man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
float uintBitsToFloat(uint const & v);
|
||||
|
||||
/// Returns a floating-point value corresponding to a
|
||||
/// unsigned integer encoding of a floating-point value.
|
||||
/// If an inf or NaN is passed in, it will not signal, and the
|
||||
/// resulting floating point value is unspecified. Otherwise,
|
||||
/// the bit-level representation is preserved.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml">GLSL uintBitsToFloat man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <template <typename, precision> class vecType, precision P>
|
||||
vecType<float, P> uintBitsToFloat(vecType<uint, P> const & v);
|
||||
|
||||
/// Computes and returns a * b + c.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/fma.xml">GLSL fma man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
genType fma(genType const & a, genType const & b, genType const & c);
|
||||
|
||||
/// Splits x into a floating-point significand in the range
|
||||
/// [0.5, 1.0) and an integral exponent of two, such that:
|
||||
/// x = significand * exp(2, exponent)
|
||||
///
|
||||
/// The significand is returned by the function and the
|
||||
/// exponent is returned in the parameter exp. For a
|
||||
/// floating-point value of zero, the significant and exponent
|
||||
/// are both zero. For a floating-point value that is an
|
||||
/// infinity or is not a number, the results are undefined.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/frexp.xml">GLSL frexp man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType, typename genIType>
|
||||
genType frexp(genType const & x, genIType & exp);
|
||||
|
||||
/// Builds a floating-point number from x and the
|
||||
/// corresponding integral exponent of two in exp, returning:
|
||||
/// significand * exp(2, exponent)
|
||||
///
|
||||
/// If this product is too large to be represented in the
|
||||
/// floating-point type, the result is undefined.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ldexp.xml">GLSL ldexp man page</a>;
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType, typename genIType>
|
||||
genType ldexp(genType const & x, genIType const & exp);
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
||||
#include "func_common.inl"
|
||||
|
||||
#endif//GLM_FUNC_COMMON_INCLUDED
|
||||
Vendored
-826
@@ -1,826 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
/// THE SOFTWARE.
|
||||
///
|
||||
/// @ref core
|
||||
/// @file glm/core/func_common.inl
|
||||
/// @date 2008-08-03 / 2011-06-15
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "func_vector_relational.hpp"
|
||||
#include "type_vec2.hpp"
|
||||
#include "type_vec3.hpp"
|
||||
#include "type_vec4.hpp"
|
||||
#include "_vectorize.hpp"
|
||||
#include <limits>
|
||||
|
||||
namespace glm{
|
||||
namespace detail
|
||||
{
|
||||
template <typename genFIType, bool /*signed*/>
|
||||
struct compute_abs
|
||||
{};
|
||||
|
||||
template <typename genFIType>
|
||||
struct compute_abs<genFIType, true>
|
||||
{
|
||||
inline static genFIType call(genFIType const & x)
|
||||
{
|
||||
return x >= genFIType(0) ? x : -x;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename genFIType>
|
||||
struct compute_abs<genFIType, false>
|
||||
{
|
||||
inline static genFIType call(genFIType const & x)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, typename U, precision P, template <class, precision> class vecType>
|
||||
struct compute_mix_vector
|
||||
{
|
||||
inline static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, vecType<U, P> const & a)
|
||||
{
|
||||
return vecType<T, P>(vecType<U, P>(x) + a * vecType<U, P>(y - x));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, precision P, template <class, precision> class vecType>
|
||||
struct compute_mix_vector<T, bool, P, vecType>
|
||||
{
|
||||
inline static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, vecType<bool, P> const & a)
|
||||
{
|
||||
vecType<T, P> Result;
|
||||
for(length_t i = 0; i < x.length(); ++i)
|
||||
Result[i] = a[i] ? y[i] : x[i];
|
||||
return Result;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, typename U, precision P, template <class, precision> class vecType>
|
||||
struct compute_mix_scalar
|
||||
{
|
||||
inline static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, U const & a)
|
||||
{
|
||||
return vecType<T, P>(vecType<U, P>(x) + a * vecType<U, P>(y - x));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, precision P, template <class, precision> class vecType>
|
||||
struct compute_mix_scalar<T, bool, P, vecType>
|
||||
{
|
||||
inline static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, bool const & a)
|
||||
{
|
||||
return a ? y : x;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, typename U>
|
||||
struct compute_mix
|
||||
{
|
||||
inline static T call(T const & x, T const & y, U const & a)
|
||||
{
|
||||
return static_cast<T>(static_cast<U>(x) + a * static_cast<U>(y - x));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct compute_mix<T, bool>
|
||||
{
|
||||
inline static T call(T const & x, T const & y, bool const & a)
|
||||
{
|
||||
return a ? y : x;
|
||||
}
|
||||
};
|
||||
}//namespace detail
|
||||
|
||||
// abs
|
||||
template <typename genFIType>
|
||||
inline genFIType abs
|
||||
(
|
||||
genFIType const & x
|
||||
)
|
||||
{
|
||||
return detail::compute_abs<genFIType, std::numeric_limits<genFIType>::is_signed>::call(x);
|
||||
}
|
||||
|
||||
VECTORIZE_VEC(abs)
|
||||
|
||||
// sign
|
||||
//Try something like based on x >> 31 to get the sign bit
|
||||
template <typename genFIType>
|
||||
inline genFIType sign
|
||||
(
|
||||
genFIType const & x
|
||||
)
|
||||
{
|
||||
if(x > genFIType(0))
|
||||
return genFIType(1);
|
||||
else if(x < genFIType(0))
|
||||
return genFIType(-1);
|
||||
return genFIType(0);
|
||||
}
|
||||
|
||||
VECTORIZE_VEC(sign)
|
||||
|
||||
// floor
|
||||
template <typename genType>
|
||||
inline genType floor(genType const & x)
|
||||
{
|
||||
return ::std::floor(x);
|
||||
}
|
||||
|
||||
VECTORIZE_VEC(floor)
|
||||
|
||||
// trunc
|
||||
template <typename genType>
|
||||
inline genType trunc(genType const & x)
|
||||
{
|
||||
// TODO, add C++11 std::trunk
|
||||
return x < 0 ? -floor(-x) : floor(x);
|
||||
}
|
||||
|
||||
VECTORIZE_VEC(trunc)
|
||||
|
||||
// round
|
||||
template <typename genType>
|
||||
inline genType round(genType const& x)
|
||||
{
|
||||
// TODO, add C++11 std::round
|
||||
return x < 0 ? genType(int(x - genType(0.5))) : genType(int(x + genType(0.5)));
|
||||
}
|
||||
|
||||
VECTORIZE_VEC(round)
|
||||
|
||||
// roundEven
|
||||
template <typename genType>
|
||||
inline genType roundEven(genType const & x)
|
||||
{
|
||||
int Integer = static_cast<int>(x);
|
||||
genType IntegerPart = static_cast<genType>(Integer);
|
||||
genType FractionalPart = fract(x);
|
||||
|
||||
if(FractionalPart > static_cast<genType>(0.5) || FractionalPart < static_cast<genType>(0.5))
|
||||
return round(x);
|
||||
if((Integer % 2) == 0)
|
||||
return IntegerPart;
|
||||
if(x <= static_cast<genType>(0)) // Work around...
|
||||
return IntegerPart - static_cast<genType>(1);
|
||||
return IntegerPart + static_cast<genType>(1);
|
||||
}
|
||||
|
||||
VECTORIZE_VEC(roundEven)
|
||||
|
||||
// ceil
|
||||
template <typename genType>
|
||||
inline genType ceil(genType const & x)
|
||||
{
|
||||
return ::std::ceil(x);
|
||||
}
|
||||
|
||||
VECTORIZE_VEC(ceil)
|
||||
|
||||
// fract
|
||||
template <typename genType>
|
||||
inline genType fract
|
||||
(
|
||||
genType const & x
|
||||
)
|
||||
{
|
||||
return x - floor(x);
|
||||
}
|
||||
|
||||
VECTORIZE_VEC(fract)
|
||||
|
||||
// mod
|
||||
template <typename genType>
|
||||
inline genType mod
|
||||
(
|
||||
genType const & x,
|
||||
genType const & y
|
||||
)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
||||
VECTORIZE_VEC_SCA(mod)
|
||||
VECTORIZE_VEC_VEC(mod)
|
||||
|
||||
// modf
|
||||
template <typename genType>
|
||||
inline genType modf
|
||||
(
|
||||
genType const & x,
|
||||
genType & i
|
||||
)
|
||||
{
|
||||
return std::modf(x, &i);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec2<T, P> modf
|
||||
(
|
||||
detail::tvec2<T, P> const & x,
|
||||
detail::tvec2<T, P> & i
|
||||
)
|
||||
{
|
||||
return detail::tvec2<T, P>(
|
||||
modf(x.x, i.x),
|
||||
modf(x.y, i.y));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec3<T, P> modf
|
||||
(
|
||||
detail::tvec3<T, P> const & x,
|
||||
detail::tvec3<T, P> & i
|
||||
)
|
||||
{
|
||||
return detail::tvec3<T, P>(
|
||||
modf(x.x, i.x),
|
||||
modf(x.y, i.y),
|
||||
modf(x.z, i.z));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec4<T, P> modf
|
||||
(
|
||||
detail::tvec4<T, P> const & x,
|
||||
detail::tvec4<T, P> & i
|
||||
)
|
||||
{
|
||||
return detail::tvec4<T, P>(
|
||||
modf(x.x, i.x),
|
||||
modf(x.y, i.y),
|
||||
modf(x.z, i.z),
|
||||
modf(x.w, i.w));
|
||||
}
|
||||
|
||||
// min
|
||||
template <typename genType>
|
||||
inline genType min
|
||||
(
|
||||
genType const & x,
|
||||
genType const & y
|
||||
)
|
||||
{
|
||||
return x < y ? x : y;
|
||||
}
|
||||
|
||||
VECTORIZE_VEC_SCA(min)
|
||||
VECTORIZE_VEC_VEC(min)
|
||||
|
||||
// max
|
||||
template <typename genType>
|
||||
inline genType max
|
||||
(
|
||||
genType const & x,
|
||||
genType const & y
|
||||
)
|
||||
{
|
||||
return x > y ? x : y;
|
||||
}
|
||||
|
||||
VECTORIZE_VEC_SCA(max)
|
||||
VECTORIZE_VEC_VEC(max)
|
||||
|
||||
// clamp
|
||||
template <typename genType>
|
||||
inline genType clamp
|
||||
(
|
||||
genType const & x,
|
||||
genType const & minVal,
|
||||
genType const & maxVal
|
||||
)
|
||||
{
|
||||
return min(maxVal, max(minVal, x));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec2<T, P> clamp
|
||||
(
|
||||
detail::tvec2<T, P> const & x,
|
||||
T const & minVal,
|
||||
T const & maxVal
|
||||
)
|
||||
{
|
||||
return detail::tvec2<T, P>(
|
||||
clamp(x.x, minVal, maxVal),
|
||||
clamp(x.y, minVal, maxVal));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec3<T, P> clamp
|
||||
(
|
||||
detail::tvec3<T, P> const & x,
|
||||
T const & minVal,
|
||||
T const & maxVal
|
||||
)
|
||||
{
|
||||
return detail::tvec3<T, P>(
|
||||
clamp(x.x, minVal, maxVal),
|
||||
clamp(x.y, minVal, maxVal),
|
||||
clamp(x.z, minVal, maxVal));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec4<T, P> clamp
|
||||
(
|
||||
detail::tvec4<T, P> const & x,
|
||||
T const & minVal,
|
||||
T const & maxVal
|
||||
)
|
||||
{
|
||||
return detail::tvec4<T, P>(
|
||||
clamp(x.x, minVal, maxVal),
|
||||
clamp(x.y, minVal, maxVal),
|
||||
clamp(x.z, minVal, maxVal),
|
||||
clamp(x.w, minVal, maxVal));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec2<T, P> clamp
|
||||
(
|
||||
detail::tvec2<T, P> const & x,
|
||||
detail::tvec2<T, P> const & minVal,
|
||||
detail::tvec2<T, P> const & maxVal
|
||||
)
|
||||
{
|
||||
return detail::tvec2<T, P>(
|
||||
clamp(x.x, minVal.x, maxVal.x),
|
||||
clamp(x.y, minVal.y, maxVal.y));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec3<T, P> clamp
|
||||
(
|
||||
detail::tvec3<T, P> const & x,
|
||||
detail::tvec3<T, P> const & minVal,
|
||||
detail::tvec3<T, P> const & maxVal
|
||||
)
|
||||
{
|
||||
return detail::tvec3<T, P>(
|
||||
clamp(x.x, minVal.x, maxVal.x),
|
||||
clamp(x.y, minVal.y, maxVal.y),
|
||||
clamp(x.z, minVal.z, maxVal.z));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec4<T, P> clamp
|
||||
(
|
||||
detail::tvec4<T, P> const & x,
|
||||
detail::tvec4<T, P> const & minVal,
|
||||
detail::tvec4<T, P> const & maxVal
|
||||
)
|
||||
{
|
||||
return detail::tvec4<T, P>(
|
||||
clamp(x.x, minVal.x, maxVal.x),
|
||||
clamp(x.y, minVal.y, maxVal.y),
|
||||
clamp(x.z, minVal.z, maxVal.z),
|
||||
clamp(x.w, minVal.w, maxVal.w));
|
||||
}
|
||||
|
||||
template <typename T, typename U, precision P, template <typename, precision> class vecType>
|
||||
inline vecType<T, P> mix
|
||||
(
|
||||
vecType<T, P> const & x,
|
||||
vecType<T, P> const & y,
|
||||
vecType<U, P> const & a
|
||||
)
|
||||
{
|
||||
return detail::compute_mix_vector<T, U, P, vecType>::call(x, y, a);
|
||||
}
|
||||
|
||||
template <typename T, typename U, precision P, template <typename, precision> class vecType>
|
||||
inline vecType<T, P> mix
|
||||
(
|
||||
vecType<T, P> const & x,
|
||||
vecType<T, P> const & y,
|
||||
U const & a
|
||||
)
|
||||
{
|
||||
return detail::compute_mix_scalar<T, U, P, vecType>::call(x, y, a);
|
||||
}
|
||||
|
||||
template <typename genTypeT, typename genTypeU>
|
||||
inline genTypeT mix
|
||||
(
|
||||
genTypeT const & x,
|
||||
genTypeT const & y,
|
||||
genTypeU const & a
|
||||
)
|
||||
{
|
||||
return detail::compute_mix<genTypeT, genTypeU>::call(x, y, a);
|
||||
}
|
||||
|
||||
// step
|
||||
template <typename genType>
|
||||
inline genType step
|
||||
(
|
||||
genType const & edge,
|
||||
genType const & x
|
||||
)
|
||||
{
|
||||
return mix(genType(1), genType(0), glm::lessThan(x, edge));
|
||||
}
|
||||
|
||||
template <template <typename, precision> class vecType, typename T, precision P>
|
||||
inline vecType<T, P> step
|
||||
(
|
||||
T const & edge,
|
||||
vecType<T, P> const & x
|
||||
)
|
||||
{
|
||||
return mix(vecType<T, P>(1), vecType<T, P>(0), glm::lessThan(x, vecType<T, P>(edge)));
|
||||
}
|
||||
|
||||
// smoothstep
|
||||
template <typename genType>
|
||||
inline genType smoothstep
|
||||
(
|
||||
genType const & edge0,
|
||||
genType const & edge1,
|
||||
genType const & x
|
||||
)
|
||||
{
|
||||
genType tmp = clamp((x - edge0) / (edge1 - edge0), genType(0), genType(1));
|
||||
return tmp * tmp * (genType(3) - genType(2) * tmp);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec2<T, P> smoothstep
|
||||
(
|
||||
T const & edge0,
|
||||
T const & edge1,
|
||||
detail::tvec2<T, P> const & x
|
||||
)
|
||||
{
|
||||
return detail::tvec2<T, P>(
|
||||
smoothstep(edge0, edge1, x.x),
|
||||
smoothstep(edge0, edge1, x.y));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec3<T, P> smoothstep
|
||||
(
|
||||
T const & edge0,
|
||||
T const & edge1,
|
||||
detail::tvec3<T, P> const & x
|
||||
)
|
||||
{
|
||||
return detail::tvec3<T, P>(
|
||||
smoothstep(edge0, edge1, x.x),
|
||||
smoothstep(edge0, edge1, x.y),
|
||||
smoothstep(edge0, edge1, x.z));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec4<T, P> smoothstep
|
||||
(
|
||||
T const & edge0,
|
||||
T const & edge1,
|
||||
detail::tvec4<T, P> const & x
|
||||
)
|
||||
{
|
||||
return detail::tvec4<T, P>(
|
||||
smoothstep(edge0, edge1, x.x),
|
||||
smoothstep(edge0, edge1, x.y),
|
||||
smoothstep(edge0, edge1, x.z),
|
||||
smoothstep(edge0, edge1, x.w));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec2<T, P> smoothstep
|
||||
(
|
||||
detail::tvec2<T, P> const & edge0,
|
||||
detail::tvec2<T, P> const & edge1,
|
||||
detail::tvec2<T, P> const & x
|
||||
)
|
||||
{
|
||||
return detail::tvec2<T, P>(
|
||||
smoothstep(edge0.x, edge1.x, x.x),
|
||||
smoothstep(edge0.y, edge1.y, x.y));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec3<T, P> smoothstep
|
||||
(
|
||||
detail::tvec3<T, P> const & edge0,
|
||||
detail::tvec3<T, P> const & edge1,
|
||||
detail::tvec3<T, P> const & x
|
||||
)
|
||||
{
|
||||
return detail::tvec3<T, P>(
|
||||
smoothstep(edge0.x, edge1.x, x.x),
|
||||
smoothstep(edge0.y, edge1.y, x.y),
|
||||
smoothstep(edge0.z, edge1.z, x.z));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec4<T, P> smoothstep
|
||||
(
|
||||
detail::tvec4<T, P> const & edge0,
|
||||
detail::tvec4<T, P> const & edge1,
|
||||
detail::tvec4<T, P> const & x
|
||||
)
|
||||
{
|
||||
return detail::tvec4<T, P>(
|
||||
smoothstep(edge0.x, edge1.x, x.x),
|
||||
smoothstep(edge0.y, edge1.y, x.y),
|
||||
smoothstep(edge0.z, edge1.z, x.z),
|
||||
smoothstep(edge0.w, edge1.w, x.w));
|
||||
}
|
||||
|
||||
// TODO: Not working on MinGW...
|
||||
template <typename genType>
|
||||
inline bool isnan(genType const & x)
|
||||
{
|
||||
# if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL))
|
||||
return _isnan(x) != 0;
|
||||
# elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))
|
||||
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
|
||||
return _isnan(x) != 0;
|
||||
# else
|
||||
return std::isnan(x);
|
||||
# endif
|
||||
# elif(GLM_COMPILER & GLM_COMPILER_CUDA)
|
||||
return isnan(x) != 0;
|
||||
# else
|
||||
return std::isnan(x);
|
||||
# endif
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline typename detail::tvec2<T, P>::bool_type isnan
|
||||
(
|
||||
detail::tvec2<T, P> const & x
|
||||
)
|
||||
{
|
||||
return typename detail::tvec2<T, P>::bool_type(
|
||||
isnan(x.x),
|
||||
isnan(x.y));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline typename detail::tvec3<T, P>::bool_type isnan
|
||||
(
|
||||
detail::tvec3<T, P> const & x
|
||||
)
|
||||
{
|
||||
return typename detail::tvec3<T, P>::bool_type(
|
||||
isnan(x.x),
|
||||
isnan(x.y),
|
||||
isnan(x.z));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline typename detail::tvec4<T, P>::bool_type isnan
|
||||
(
|
||||
detail::tvec4<T, P> const & x
|
||||
)
|
||||
{
|
||||
return typename detail::tvec4<T, P>::bool_type(
|
||||
isnan(x.x),
|
||||
isnan(x.y),
|
||||
isnan(x.z),
|
||||
isnan(x.w));
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
inline bool isinf(
|
||||
genType const & x)
|
||||
{
|
||||
# if(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC))
|
||||
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
|
||||
# elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))
|
||||
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
|
||||
return _isinf(x) != 0;
|
||||
# else
|
||||
return std::isinf(x);
|
||||
# endif
|
||||
# elif(GLM_COMPILER & GLM_COMPILER_CUDA)
|
||||
// http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/docs/online/group__CUDA__MATH__DOUBLE_g13431dd2b40b51f9139cbb7f50c18fab.html#g13431dd2b40b51f9139cbb7f50c18fab
|
||||
return isinf(double(x)) != 0;
|
||||
# else
|
||||
return std::isinf(x);
|
||||
# endif
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline typename detail::tvec2<T, P>::bool_type isinf
|
||||
(
|
||||
detail::tvec2<T, P> const & x
|
||||
)
|
||||
{
|
||||
return typename detail::tvec2<T, P>::bool_type(
|
||||
isinf(x.x),
|
||||
isinf(x.y));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline typename detail::tvec3<T, P>::bool_type isinf
|
||||
(
|
||||
detail::tvec3<T, P> const & x
|
||||
)
|
||||
{
|
||||
return typename detail::tvec3<T, P>::bool_type(
|
||||
isinf(x.x),
|
||||
isinf(x.y),
|
||||
isinf(x.z));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline typename detail::tvec4<T, P>::bool_type isinf
|
||||
(
|
||||
detail::tvec4<T, P> const & x
|
||||
)
|
||||
{
|
||||
return typename detail::tvec4<T, P>::bool_type(
|
||||
isinf(x.x),
|
||||
isinf(x.y),
|
||||
isinf(x.z),
|
||||
isinf(x.w));
|
||||
}
|
||||
|
||||
inline int floatBitsToInt(float const & v)
|
||||
{
|
||||
int Bits;
|
||||
std::memcpy(&Bits, &v, sizeof(Bits));
|
||||
return Bits;
|
||||
}
|
||||
|
||||
template <template <typename, precision> class vecType, precision P>
|
||||
inline vecType<int, P> floatBitsToInt(vecType<float, P> const & v)
|
||||
{
|
||||
int Bits;
|
||||
std::memcpy(&Bits, &v, sizeof(Bits));
|
||||
return Bits;
|
||||
}
|
||||
|
||||
inline uint floatBitsToUint(float const & v)
|
||||
{
|
||||
float Float;
|
||||
std::memcpy(&Float, &v, sizeof(Float));
|
||||
return Float;
|
||||
}
|
||||
|
||||
template <template <typename, precision> class vecType, precision P>
|
||||
inline vecType<uint, P> floatBitsToUint(vecType<float, P> const & v)
|
||||
{
|
||||
return reinterpret_cast<vecType<uint, P>&>(const_cast<vecType<float, P>&>(v));
|
||||
}
|
||||
|
||||
inline float intBitsToFloat(int const & v)
|
||||
{
|
||||
return reinterpret_cast<float&>(const_cast<int&>(v));
|
||||
}
|
||||
|
||||
template <template <typename, precision> class vecType, precision P>
|
||||
inline vecType<float, P> intBitsToFloat(vecType<int, P> const & v)
|
||||
{
|
||||
return reinterpret_cast<vecType<float, P>&>(const_cast<vecType<int, P>&>(v));
|
||||
}
|
||||
|
||||
inline float uintBitsToFloat(uint const & v)
|
||||
{
|
||||
return reinterpret_cast<float&>(const_cast<uint&>(v));
|
||||
}
|
||||
|
||||
template <template <typename, precision> class vecType, precision P>
|
||||
inline vecType<float, P> uintBitsToFloat(vecType<uint, P> const & v)
|
||||
{
|
||||
return reinterpret_cast<vecType<float, P>&>(const_cast<vecType<uint, P>&>(v));
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
inline genType fma
|
||||
(
|
||||
genType const & a,
|
||||
genType const & b,
|
||||
genType const & c
|
||||
)
|
||||
{
|
||||
return a * b + c;
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
inline genType frexp
|
||||
(
|
||||
genType const & x,
|
||||
int & exp
|
||||
)
|
||||
{
|
||||
return std::frexp(x, exp);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec2<T, P> frexp
|
||||
(
|
||||
detail::tvec2<T, P> const & x,
|
||||
detail::tvec2<int, P> & exp
|
||||
)
|
||||
{
|
||||
return detail::tvec2<T, P>(
|
||||
frexp(x.x, exp.x),
|
||||
frexp(x.y, exp.y));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec3<T, P> frexp
|
||||
(
|
||||
detail::tvec3<T, P> const & x,
|
||||
detail::tvec3<int, P> & exp
|
||||
)
|
||||
{
|
||||
return detail::tvec3<T, P>(
|
||||
frexp(x.x, exp.x),
|
||||
frexp(x.y, exp.y),
|
||||
frexp(x.z, exp.z));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec4<T, P> frexp
|
||||
(
|
||||
detail::tvec4<T, P> const & x,
|
||||
detail::tvec4<int, P> & exp
|
||||
)
|
||||
{
|
||||
return detail::tvec4<T, P>(
|
||||
frexp(x.x, exp.x),
|
||||
frexp(x.y, exp.y),
|
||||
frexp(x.z, exp.z),
|
||||
frexp(x.w, exp.w));
|
||||
}
|
||||
|
||||
template <typename genType, precision P>
|
||||
inline genType ldexp
|
||||
(
|
||||
genType const & x,
|
||||
int const & exp
|
||||
)
|
||||
{
|
||||
return std::ldexp(x, exp);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec2<T, P> ldexp
|
||||
(
|
||||
detail::tvec2<T, P> const & x,
|
||||
detail::tvec2<int, P> const & exp
|
||||
)
|
||||
{
|
||||
return detail::tvec2<T, P>(
|
||||
ldexp(x.x, exp.x),
|
||||
ldexp(x.y, exp.y));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec3<T, P> ldexp
|
||||
(
|
||||
detail::tvec3<T, P> const & x,
|
||||
detail::tvec3<int, P> const & exp
|
||||
)
|
||||
{
|
||||
return detail::tvec3<T, P>(
|
||||
ldexp(x.x, exp.x),
|
||||
ldexp(x.y, exp.y),
|
||||
ldexp(x.z, exp.z));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
inline detail::tvec4<T, P> ldexp
|
||||
(
|
||||
detail::tvec4<T, P> const & x,
|
||||
detail::tvec4<int, P> const & exp
|
||||
)
|
||||
{
|
||||
return detail::tvec4<T, P>(
|
||||
ldexp(x.x, exp.x),
|
||||
ldexp(x.y, exp.y),
|
||||
ldexp(x.z, exp.z),
|
||||
ldexp(x.w, exp.w));
|
||||
}
|
||||
|
||||
}//namespace glm
|
||||
Vendored
-132
@@ -1,132 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
/// THE SOFTWARE.
|
||||
///
|
||||
/// @ref core
|
||||
/// @file glm/core/func_exponential.hpp
|
||||
/// @date 2008-08-08 / 2011-06-14
|
||||
/// @author Christophe Riccio
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
|
||||
///
|
||||
/// @defgroup core_func_exponential Exponential functions
|
||||
/// @ingroup core
|
||||
///
|
||||
/// These all operate component-wise. The description is per component.
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef glm_core_func_exponential
|
||||
#define glm_core_func_exponential
|
||||
|
||||
#include "type_vec1.hpp"
|
||||
#include "type_vec2.hpp"
|
||||
#include "type_vec3.hpp"
|
||||
#include "type_vec4.hpp"
|
||||
#include <cmath>
|
||||
|
||||
namespace glm
|
||||
{
|
||||
/// @addtogroup core_func_exponential
|
||||
/// @{
|
||||
|
||||
/// Returns 'base' raised to the power 'exponent'.
|
||||
///
|
||||
/// @param base Floating point value. pow function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.
|
||||
/// @param exponent Floating point value representing the 'exponent'.
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/pow.xml">GLSL pow man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
|
||||
template <typename genType>
|
||||
genType pow(genType const & base, genType const & exponent);
|
||||
|
||||
/// Returns the natural exponentiation of x, i.e., e^x.
|
||||
///
|
||||
/// @param x exp function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp.xml">GLSL exp man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
|
||||
template <typename genType>
|
||||
genType exp(genType const & x);
|
||||
|
||||
/// Returns the natural logarithm of x, i.e.,
|
||||
/// returns the value y which satisfies the equation x = e^y.
|
||||
/// Results are undefined if x <= 0.
|
||||
///
|
||||
/// @param x log function is defined for input values of x defined in the range (0, inf+) in the limit of the type precision.
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log.xml">GLSL log man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
|
||||
template <typename genType>
|
||||
genType log(genType const & x);
|
||||
|
||||
/// Returns 2 raised to the x power.
|
||||
///
|
||||
/// @param x exp2 function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp2.xml">GLSL exp2 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
|
||||
template <typename genType>
|
||||
genType exp2(genType const & x);
|
||||
|
||||
/// Returns the base 2 log of x, i.e., returns the value y,
|
||||
/// which satisfies the equation x = 2 ^ y.
|
||||
///
|
||||
/// @param x log2 function is defined for input values of x defined in the range (0, inf+) in the limit of the type precision.
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log2.xml">GLSL log2 man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
|
||||
template <typename genType>
|
||||
genType log2(genType x);
|
||||
|
||||
/// Returns the positive square root of x.
|
||||
///
|
||||
/// @param x sqrt function is defined for input values of x defined in the range [0, inf+) in the limit of the type precision.
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sqrt.xml">GLSL sqrt man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
|
||||
//template <typename genType>
|
||||
// genType sqrt(genType const & x);
|
||||
|
||||
template <typename T, precision P, template <typename, precision> class vecType>
|
||||
vecType<T, P> sqrt(vecType<T, P> const & x);
|
||||
|
||||
/// Returns the reciprocal of the positive square root of x.
|
||||
///
|
||||
/// @param x inversesqrt function is defined for input values of x defined in the range [0, inf+) in the limit of the type precision.
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inversesqrt.xml">GLSL inversesqrt man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
|
||||
template <typename genType>
|
||||
genType inversesqrt(genType const & x);
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
||||
#include "func_exponential.inl"
|
||||
|
||||
#endif//glm_core_func_exponential
|
||||
Vendored
-216
@@ -1,216 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
/// THE SOFTWARE.
|
||||
///
|
||||
/// @ref core
|
||||
/// @file glm/core/func_exponential.inl
|
||||
/// @date 2008-08-03 / 2011-06-15
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "func_vector_relational.hpp"
|
||||
#include "_vectorize.hpp"
|
||||
#include <limits>
|
||||
#include <cassert>
|
||||
|
||||
namespace glm{
|
||||
namespace detail
|
||||
{
|
||||
template <bool isFloat>
|
||||
struct compute_log2
|
||||
{
|
||||
template <typename T>
|
||||
T operator() (T const & Value) const;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct compute_log2<true>
|
||||
{
|
||||
template <typename T>
|
||||
inline T operator() (T const & Value) const
|
||||
{
|
||||
return static_cast<T>(::std::log(Value)) * static_cast<T>(1.4426950408889634073599246810019);
|
||||
}
|
||||
};
|
||||
|
||||
template <template <class, precision> class vecType, typename T, precision P>
|
||||
struct compute_inversesqrt
|
||||
{
|
||||
inline static vecType<T, P> call(vecType<T, P> const & x)
|
||||
{
|
||||
return static_cast<T>(1) / sqrt(x);
|
||||
}
|
||||
};
|
||||
|
||||
template <template <class, precision> class vecType>
|
||||
struct compute_inversesqrt<vecType, float, lowp>
|
||||
{
|
||||
inline static vecType<float, lowp> call(vecType<float, lowp> const & x)
|
||||
{
|
||||
vecType<float, lowp> tmp(x);
|
||||
vecType<float, lowp> xhalf(tmp * 0.5f);
|
||||
vecType<uint, lowp>* p = reinterpret_cast<vecType<uint, lowp>*>(const_cast<vecType<float, lowp>*>(&x));
|
||||
vecType<uint, lowp> i = vecType<uint, lowp>(0x5f375a86) - (*p >> vecType<uint, lowp>(1));
|
||||
vecType<float, lowp>* ptmp = reinterpret_cast<vecType<float, lowp>*>(&i);
|
||||
tmp = *ptmp;
|
||||
tmp = tmp * (1.5f - xhalf * tmp * tmp);
|
||||
return tmp;
|
||||
}
|
||||
};
|
||||
}//namespace detail
|
||||
|
||||
// pow
|
||||
template <typename genType>
|
||||
inline genType pow
|
||||
(
|
||||
genType const & x,
|
||||
genType const & y
|
||||
)
|
||||
{
|
||||
return std::pow(x, y);
|
||||
}
|
||||
|
||||
VECTORIZE_VEC_VEC(pow)
|
||||
|
||||
// exp
|
||||
template <typename genType>
|
||||
inline genType exp
|
||||
(
|
||||
genType const & x
|
||||
)
|
||||
{
|
||||
return std::exp(x);
|
||||
}
|
||||
|
||||
VECTORIZE_VEC(exp)
|
||||
|
||||
// log
|
||||
template <typename genType>
|
||||
inline genType log
|
||||
(
|
||||
genType const & x
|
||||
)
|
||||
{
|
||||
return std::log(x);
|
||||
}
|
||||
|
||||
VECTORIZE_VEC(log)
|
||||
|
||||
//exp2, ln2 = 0.69314718055994530941723212145818f
|
||||
template <typename genType>
|
||||
inline genType exp2(genType const & x)
|
||||
{
|
||||
return std::exp(static_cast<genType>(0.69314718055994530941723212145818) * x);
|
||||
}
|
||||
|
||||
VECTORIZE_VEC(exp2)
|
||||
|
||||
// log2, ln2 = 0.69314718055994530941723212145818f
|
||||
template <typename genType>
|
||||
inline genType log2(genType x)
|
||||
{
|
||||
assert(x > genType(0)); // log2 is only defined on the range (0, inf]
|
||||
return detail::compute_log2<std::numeric_limits<genType>::is_iec559>()(x);
|
||||
}
|
||||
|
||||
VECTORIZE_VEC(log2)
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <template <class, precision> class vecType, typename T, precision P>
|
||||
struct compute_sqrt{};
|
||||
|
||||
template <typename T, precision P>
|
||||
struct compute_sqrt<detail::tvec1, T, P>
|
||||
{
|
||||
inline static detail::tvec1<T, P> call(detail::tvec1<T, P> const & x)
|
||||
{
|
||||
return detail::tvec1<T, P>(std::sqrt(x.x));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, precision P>
|
||||
struct compute_sqrt<detail::tvec2, T, P>
|
||||
{
|
||||
inline static detail::tvec2<T, P> call(detail::tvec2<T, P> const & x)
|
||||
{
|
||||
return detail::tvec2<T, P>(std::sqrt(x.x), std::sqrt(x.y));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, precision P>
|
||||
struct compute_sqrt<detail::tvec3, T, P>
|
||||
{
|
||||
inline static detail::tvec3<T, P> call(detail::tvec3<T, P> const & x)
|
||||
{
|
||||
return detail::tvec3<T, P>(std::sqrt(x.x), std::sqrt(x.y), std::sqrt(x.z));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, precision P>
|
||||
struct compute_sqrt<detail::tvec4, T, P>
|
||||
{
|
||||
inline static detail::tvec4<T, P> call(detail::tvec4<T, P> const & x)
|
||||
{
|
||||
return detail::tvec4<T, P>(std::sqrt(x.x), std::sqrt(x.y), std::sqrt(x.z), std::sqrt(x.w));
|
||||
}
|
||||
};
|
||||
}//namespace detail
|
||||
|
||||
// sqrt
|
||||
inline float sqrt(float x)
|
||||
{
|
||||
return detail::compute_sqrt<detail::tvec1, float, highp>::call(x).x;
|
||||
}
|
||||
|
||||
inline double sqrt(double x)
|
||||
{
|
||||
return detail::compute_sqrt<detail::tvec1, double, highp>::call(x).x;
|
||||
}
|
||||
|
||||
template <typename T, precision P, template <typename, precision> class vecType>
|
||||
inline vecType<T, P> sqrt(vecType<T, P> const & x)
|
||||
{
|
||||
return detail::compute_sqrt<vecType, T, P>::call(x);
|
||||
}
|
||||
|
||||
// inversesqrt
|
||||
inline float inversesqrt(float const & x)
|
||||
{
|
||||
return 1.0f / sqrt(x);
|
||||
}
|
||||
|
||||
inline double inversesqrt(double const & x)
|
||||
{
|
||||
return 1.0 / sqrt(x);
|
||||
}
|
||||
|
||||
template <template <class, precision> class vecType, typename T, precision P>
|
||||
inline vecType<T, P> inversesqrt
|
||||
(
|
||||
vecType<T, P> const & x
|
||||
)
|
||||
{
|
||||
return detail::compute_inversesqrt<vecType, T, P>::call(x);
|
||||
}
|
||||
|
||||
VECTORIZE_VEC(inversesqrt)
|
||||
}//namespace glm
|
||||
Loaded 100 of 1222 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user