Compare commits
1764 commits
Author | SHA1 | Date | |
---|---|---|---|
21a377707f | |||
15afe89aff | |||
07c5e54f59 | |||
a77f0c6c77 | |||
c65f420215 | |||
cc772e4bcb | |||
3366acf975 | |||
|
c1ab645ca2 | ||
|
68503ed96f | ||
|
88c922f433 | ||
|
938b805bfb | ||
|
162efc1ec7 | ||
|
da7ab04052 | ||
|
dd688d81a6 | ||
|
d567b35d9a | ||
|
816b605054 | ||
|
7c5d74e98e | ||
|
4f091f44a8 | ||
|
a2f6ae6796 | ||
|
5e6cdf3a73 | ||
|
76016aae20 | ||
|
15eb8221e3 | ||
|
928535a828 | ||
|
637debb62d | ||
|
14d3bbbb86 | ||
|
700e2c5e5d | ||
|
8af7985ece | ||
|
0c7edbc2ee | ||
|
2841eaba3e | ||
|
f76a5e2b10 | ||
|
377248b1ac | ||
|
7053970f7b | ||
|
4ddf4679b4 | ||
|
10fd4de258 | ||
|
5cc06f4ba4 | ||
|
fb69b39d54 | ||
|
2af4f31712 | ||
|
09570a05b3 | ||
|
85de743d1c | ||
|
ce3b121f07 | ||
|
d8feef5279 | ||
|
00396e3436 | ||
|
53b929cbfb | ||
|
dc489786b0 | ||
|
55a64f51b8 | ||
|
a617e1e217 | ||
|
b47fffb48b | ||
|
281ee51aff | ||
|
ec953240b1 | ||
|
66a4f2e90b | ||
|
6028052c7e | ||
|
be360d2ad1 | ||
|
24724d33bb | ||
|
8e5d5f89c2 | ||
|
9e2591e612 | ||
|
b7ef2fd580 | ||
|
b8c0842b2e | ||
|
3bad05aa7b | ||
|
ad79d4a884 | ||
|
d15e583460 | ||
|
10c8e4e435 | ||
|
743e557e1e | ||
|
de7ab83f5a | ||
|
f59e185d7a | ||
|
0e1fc33c5c | ||
|
7fe5f7126b | ||
|
38cf9f3224 | ||
|
ff66b49c19 | ||
|
7ad8fa689f | ||
|
8b9ea8cd5f | ||
|
3dcddaedd7 | ||
|
ec79bffa20 | ||
|
dc679cd1c7 | ||
|
28e7e2cffd | ||
|
d0e11a8c92 | ||
|
e70bf2bce1 | ||
|
c085c73014 | ||
|
c6b1ecc593 | ||
|
1f6b3384fa | ||
|
80b490c8f1 | ||
|
7fedf9e0b8 | ||
|
91a4f04794 | ||
|
4e3fc84050 | ||
|
22c77d17b7 | ||
|
7ac36e20cd | ||
|
8b36253e2f | ||
|
204872de09 | ||
|
f03f093909 | ||
|
728ccc96bc | ||
|
6c3b1fa1de | ||
|
15f6c47f07 | ||
|
16368cd353 | ||
|
385187f795 | ||
|
530bb3dc57 | ||
|
6962364bfb | ||
|
cb73970f08 | ||
|
6ff0b03629 | ||
|
5065b85d33 | ||
|
6760d1bff8 | ||
|
b0140b876b | ||
|
865265b832 | ||
|
670fbd8c10 | ||
|
3483a4d9cb | ||
|
b0e77c7afd | ||
|
5706cfd600 | ||
|
d85c6fe2c0 | ||
|
26dfd4c3f8 | ||
|
0f5e76f91f | ||
|
c6a58d9744 | ||
|
2072b4fa04 | ||
|
51bc6ca834 | ||
|
4abc6c3989 | ||
|
f80a44c729 | ||
|
0b650f62a6 | ||
|
eb04154c98 | ||
|
00c1f0836b | ||
|
ea81436bef | ||
|
6184a2db3d | ||
|
708089f560 | ||
|
de6487b177 | ||
|
cd845368d8 | ||
|
157ee79a8e | ||
|
6f4407cb15 | ||
|
df38564f62 | ||
|
fe6da67066 | ||
|
7a4a84a561 | ||
|
75a4c5bf20 | ||
|
ebcfc7f49e | ||
|
4b60ce700f | ||
|
352f4ce2c4 | ||
|
79e2be68c2 | ||
|
53f7da2506 | ||
|
55249faa58 | ||
|
4cd243f0a3 | ||
|
b89bf0185a | ||
|
b2dca724c7 | ||
|
fe66bfb785 | ||
|
2a0963ce09 | ||
|
f8f6aa0907 | ||
|
ae150e9640 | ||
|
cd3de0af0c | ||
|
f4cbc1fbae | ||
|
a2fcbc94fd | ||
|
f60c6d472c | ||
|
f141c75cde | ||
|
c935ca3168 | ||
|
f402147a63 | ||
|
7601468211 | ||
|
72f8c354b0 | ||
|
110ee74875 | ||
|
9d0b1f0171 | ||
|
cb21fe88d3 | ||
|
4290a0d9f2 | ||
|
680238689b | ||
|
51ff6586f4 | ||
|
3dbbe60376 | ||
|
ce9259cd02 | ||
|
23354e1551 | ||
|
902d3c92e3 | ||
|
dc5e6e0ad0 | ||
|
c6d67f006d | ||
|
80393c0fb6 | ||
|
b201b74c3f | ||
|
a2e31c4e1b | ||
|
d6399622a0 | ||
|
8cbf34ddc4 | ||
|
9b3d019502 | ||
|
361b0e85c1 | ||
|
c9c830cb97 | ||
|
8d267aaf23 | ||
|
99ff770edc | ||
|
c18677e70f | ||
|
735308f8eb | ||
|
bac3798ad3 | ||
|
59417636ca | ||
|
f5328a9bb6 | ||
|
d29eb34cfb | ||
|
1effe92129 | ||
|
d3f86eb957 | ||
|
c4be013294 | ||
|
454acca84b | ||
|
3fb1ba25ac | ||
|
44e37c5f97 | ||
|
712ab798d1 | ||
|
89a37cd315 | ||
|
43b109a4e3 | ||
|
b290d47bd5 | ||
|
74ce90ce67 | ||
|
f9e709915a | ||
|
d06287d562 | ||
|
da95f88c36 | ||
|
cded378205 | ||
|
0ef0791854 | ||
|
20ce8ba046 | ||
|
96d91a3892 | ||
|
09987b01cc | ||
|
d9c10ed264 | ||
|
282d6478ba | ||
|
0e7bcd5639 | ||
|
84a4d93bc4 | ||
|
0573ef0382 | ||
|
55e83468c9 | ||
|
13178b9373 | ||
|
291063c98f | ||
|
24a1cd8c5b | ||
|
352c450ad0 | ||
|
a643dd058b | ||
|
100f6624d6 | ||
|
1c7b18923c | ||
|
55a25ac04b | ||
|
1eb8ff5e54 | ||
|
7d3f04ca35 | ||
|
daaca40416 | ||
|
9337913766 | ||
|
212b1e5fe7 | ||
|
e5d0cc978a | ||
|
c09dadd9b5 | ||
|
86ead96263 | ||
|
2f0cf8fbe1 | ||
|
c762a99bd5 | ||
|
0a03ed913b | ||
|
c2bd1845eb | ||
|
627e76cf7b | ||
|
186787e311 | ||
|
0e4ebaf89d | ||
|
7ec1c288be | ||
|
16e9317220 | ||
|
329b2df4f2 | ||
|
e9bbf02b2b | ||
|
8d92e65773 | ||
|
b807f633d9 | ||
|
68e7cadabc | ||
|
ddc523ffbe | ||
|
d02fcc5262 | ||
|
ed702673ea | ||
|
fd961deba7 | ||
|
0656440e38 | ||
|
10b01ba7c2 | ||
|
ed61bdb568 | ||
|
42022c3531 | ||
|
59b44a4908 | ||
|
5f49ec3d64 | ||
|
8ea5db3ec4 | ||
|
91a9888baa | ||
|
f5ef357810 | ||
|
5604f6d8a3 | ||
|
157c7c21d4 | ||
|
dec7f12b14 | ||
|
8dbf371244 | ||
|
d314afc451 | ||
|
0c06a08e07 | ||
|
0aba21f71c | ||
|
4c9282b090 | ||
|
78e86b6ea5 | ||
|
414133dbe7 | ||
|
bc0bd98763 | ||
|
dfd8055270 | ||
|
7bde76ca2c | ||
|
b0c3013b51 | ||
|
3079c69725 | ||
|
ecf863969c | ||
|
77172e34db | ||
|
74350fa7cf | ||
|
cc88e0b780 | ||
|
c8bee7c439 | ||
|
bae0af241e | ||
|
fa3f73d881 | ||
|
039df36f4b | ||
|
7fab03c0b4 | ||
|
b432aa2b9c | ||
|
308b77cd42 | ||
|
f70d8a33cb | ||
|
fa374f9cc9 | ||
|
63ae57d2e3 | ||
|
6e644a27fc | ||
|
65c4003546 | ||
|
418b878053 | ||
|
46cb6af437 | ||
|
13491a485a | ||
|
e4529ff8f9 | ||
|
3c5bdae7ab | ||
|
06aeb21429 | ||
|
85c6489d81 | ||
|
243801c2d1 | ||
|
2590a30d04 | ||
|
fe9e371f27 | ||
|
070c1c9d63 | ||
|
5233b80fb7 | ||
|
9ef678d90a | ||
|
cae0946764 | ||
|
97c02b2425 | ||
|
5af331d708 | ||
|
db8b199363 | ||
|
b44b759b8f | ||
|
4b84b5563e | ||
|
8b714e9dd9 | ||
|
9c2ba3bfb7 | ||
|
923f983719 | ||
|
b657001e0d | ||
|
b2d48ff172 | ||
|
596cc3a645 | ||
|
43b0c9410e | ||
|
92f60a99f6 | ||
|
6595bab8ff | ||
|
a8ec8472ff | ||
|
9e39788e07 | ||
|
e5a1fc4f20 | ||
|
efce4d69ce | ||
|
5041d20f00 | ||
|
f5d2f8d545 | ||
|
bbcb0109e1 | ||
|
30f9ca7eb6 | ||
|
f1f08861a1 | ||
|
047a4da696 | ||
|
ad72e3ec8f | ||
|
474ab48f8b | ||
|
fde0dcd0ab | ||
|
fc5eab5676 | ||
|
2d94d8d06d | ||
|
aa70d32786 | ||
|
996f50393e | ||
|
61393fff1f | ||
|
50000f4b01 | ||
|
24726a4bc2 | ||
|
0c03cbff90 | ||
|
576bee5cce | ||
|
5ede47618b | ||
|
8d5374a443 | ||
|
44c6cd2d37 | ||
|
74680748b9 | ||
|
174313acbf | ||
|
fa03246d0e | ||
|
98662b6a4a | ||
|
3abe728712 | ||
|
598b7f5210 | ||
|
9764fef262 | ||
|
43fe992b94 | ||
|
b8e5179431 | ||
|
bc6cf61794 | ||
|
df4ff4e78b | ||
|
6dd2a0e645 | ||
|
b61303244c | ||
|
a8240722c6 | ||
|
1039e3c1bd | ||
|
9a280cda0b | ||
|
c95b2e88b7 | ||
|
8fbb447a6d | ||
|
9d3bd43c6e | ||
|
ab20b2179f | ||
|
9f47e562d9 | ||
|
18d726be65 | ||
|
899d03e77e | ||
|
2efd36a124 | ||
|
2f49250baf | ||
|
6d30220acc | ||
|
fbd79cde5f | ||
|
d243094ede | ||
|
1fb0565148 | ||
|
2bc75b877a | ||
|
a1d516354e | ||
|
61cfd1afcb | ||
|
b5473d5ffd | ||
|
9e22fddf1a | ||
|
c8313d9ebc | ||
|
4c90fc6eff | ||
|
1e1061d5c7 | ||
|
13e3092511 | ||
|
953df38ac4 | ||
|
d8214c916e | ||
|
17cbc75aa7 | ||
|
a805f46f55 | ||
|
6e2661f92d | ||
|
5b8efd68ba | ||
|
c1ea32655a | ||
|
a3ef381b3e | ||
|
84971d81f3 | ||
|
05d76c74a6 | ||
|
5e91444e3e | ||
|
57b5f11e2a | ||
|
37205bba84 | ||
|
0979eafa84 | ||
|
4239e66c55 | ||
|
dfabbd8ba8 | ||
|
3e441ae98b | ||
|
ec95ee85a3 | ||
|
385e60dd41 | ||
|
e96bab7ce6 | ||
|
4311db5ba5 | ||
|
f947f89061 | ||
|
c2df169847 | ||
|
c7bda3d10f | ||
|
7e50270d49 | ||
|
7773254022 | ||
|
d582becbc2 | ||
|
5ba18575de | ||
|
b0d49579c1 | ||
|
28f88fd984 | ||
|
0d59235ade | ||
|
e7acdd12d8 | ||
|
52f2a10db6 | ||
|
dcf2f6a8e9 | ||
|
307c998495 | ||
|
a29d334734 | ||
|
cc40a91343 | ||
|
04735fa9bb | ||
|
715633e0de | ||
|
32c98717b1 | ||
|
4119b6dd66 | ||
|
640eaca8bf | ||
|
81ff879b04 | ||
|
eff7b065eb | ||
|
b4fbdc0283 | ||
|
fca53c7799 | ||
|
df849d2fb0 | ||
|
735c0160b5 | ||
|
33c598123c | ||
|
fffae1a975 | ||
|
2609211207 | ||
|
0fc4b61906 | ||
|
c636618d77 | ||
|
29ac31f409 | ||
|
a0a81fddee | ||
|
8cbde7f84c | ||
|
6b3c1148bf | ||
|
8c712f82d1 | ||
|
7b92b5bde7 | ||
|
3948656d84 | ||
|
f05316b11d | ||
|
e74d13e6db | ||
|
38018192b8 | ||
|
5767c4cd05 | ||
|
e1379afb01 | ||
|
39f12859dc | ||
|
06f8c4f733 | ||
|
0cad25f798 | ||
|
11202bf299 | ||
|
2998f8671b | ||
|
1344979c70 | ||
|
606cc1d897 | ||
|
d7a8af144d | ||
|
f2344cd089 | ||
|
c04629f6d4 | ||
|
e37d19ab1e | ||
|
2804e75869 | ||
|
2e38069475 | ||
|
a942a3bc70 | ||
|
c335c3c52c | ||
|
797de0f9ad | ||
|
9cc7e3528f | ||
|
785ec74b92 | ||
|
b429dbdc4b | ||
|
d9c5066382 | ||
|
b212750b85 | ||
|
3abb6d9eaf | ||
|
c7f098f4d2 | ||
|
9ef29aff9a | ||
|
c4a51a3ebd | ||
|
b2f4f4d8fd | ||
|
fc9634a4de | ||
|
74d7e78b70 | ||
|
272a142ee5 | ||
|
bb9bd73f43 | ||
|
9d67f4734b | ||
|
00ac9b6c53 | ||
|
3d70d6179c | ||
|
1d52985943 | ||
|
f26bfa0c8e | ||
|
d6b22b17ae | ||
|
02d98a3e44 | ||
|
479bd84400 | ||
|
46f9806359 | ||
|
bf5eecc71f | ||
|
3d885ef919 | ||
|
3f13f7921d | ||
|
f4b5622ba3 | ||
|
7a1cad3e61 | ||
|
f62202198e | ||
|
8a5fd3ac1d | ||
|
6ec925554c | ||
|
1aa3559155 | ||
|
08ae888722 | ||
|
9805fe0b1a | ||
|
fa2b1c8f09 | ||
|
f69ae58304 | ||
|
3d9aafed3b | ||
|
23385231c6 | ||
|
34d00d5217 | ||
|
f1007554a0 | ||
|
33b32ca53a | ||
|
c21edadab0 | ||
|
763129e96b | ||
|
27a015d022 | ||
|
7246d798ad | ||
|
b03c8ba945 | ||
|
e0027eb767 | ||
|
915dd95d88 | ||
|
80d318461f | ||
|
f78721991f | ||
|
10e702facd | ||
|
e47ebec661 | ||
|
2e77443209 | ||
|
f15455552d | ||
|
4b0e25d3af | ||
|
d80febde7d | ||
|
e0f6faa151 | ||
|
3caa424ad4 | ||
|
cf47fbb20b | ||
|
8f24d86c1f | ||
|
f795941521 | ||
|
5cfcf13d4b | ||
|
e543b78bb7 | ||
|
6435ef43f5 | ||
|
f6d85e5df7 | ||
|
77cabc8bf2 | ||
|
e85f245ad4 | ||
|
c1943f0f7c | ||
|
d80a622972 | ||
|
d95d4d4ad5 | ||
|
68201c10c2 | ||
|
41b0c5c4f9 | ||
|
349ff16600 | ||
|
b51f4db8c2 | ||
|
29ce13b777 | ||
|
2754c80596 | ||
|
a17a81f05b | ||
|
51486a0606 | ||
|
b88365fb01 | ||
|
88f7762921 | ||
|
b00e467494 | ||
|
c1fd98591d | ||
|
112ce672e1 | ||
|
a6a08c75eb | ||
|
4491ff0426 | ||
|
e42f9263b8 | ||
|
4e37c8e370 | ||
|
289e7d3a6c | ||
|
583f81f458 | ||
|
ba2a103011 | ||
|
214b1997a8 | ||
|
b3dfa2d8ab | ||
|
a4819f99cb | ||
|
a1f5e34d81 | ||
|
04afba260f | ||
|
892e57d46e | ||
|
3e658ef502 | ||
|
8bcf044983 | ||
|
aca9ab0ebb | ||
|
1b14c082ed | ||
|
414229bcf9 | ||
|
890058abcd | ||
|
1987c90c73 | ||
|
d30cfea82d | ||
|
9070eb9a13 | ||
|
c9d71689ed | ||
|
646d70e93a | ||
|
1b047995d1 | ||
|
fdf9ac66da | ||
|
3b353da3ab | ||
|
d374457040 | ||
|
7c75746b91 | ||
|
eda239cc97 | ||
|
07128896af | ||
|
30781c423b | ||
|
b905dafca0 | ||
|
35252fceef | ||
|
dcb9db5fe6 | ||
|
9cf408f77c | ||
|
28c232d856 | ||
|
9bb3d9977a | ||
|
d7ff0175c1 | ||
|
8b0dd44316 | ||
|
9a8d73e6c3 | ||
|
42db6badd0 | ||
|
17d631f508 | ||
|
1fad8277a3 | ||
|
f072497551 | ||
|
ba066656f7 | ||
|
30604080ef | ||
|
93a828f744 | ||
|
b1029a40b2 | ||
|
3b7be85151 | ||
|
fccdfa7926 | ||
|
c1c9b69290 | ||
|
1904873838 | ||
|
68b553cfc1 | ||
|
c7b362d19d | ||
|
38bdcafea1 | ||
|
2114e48393 | ||
|
36dabe485c | ||
|
7584b6aa0b | ||
|
85a46e42bd | ||
|
6e9dcdb599 | ||
|
c970afeccd | ||
|
25caf14be8 | ||
|
dc1cec8bab | ||
|
449f7d3fa6 | ||
|
fea3395fc1 | ||
|
d3f2d94f23 | ||
|
1e8450665c | ||
|
94c79917e3 | ||
|
6589311a0b | ||
|
53221eb799 | ||
|
077ab6d56b | ||
|
ed9a6d862b | ||
|
2aed94cfc2 | ||
|
f0807d2be1 | ||
|
074fbb0264 | ||
|
1fc4f4ac9c | ||
|
7fae41b5c6 | ||
|
a6425fa1b9 | ||
|
7d6e59170b | ||
|
3086bf1668 | ||
|
bd6c0bab44 | ||
|
d919d457d3 | ||
|
2a263a09cc | ||
|
1df91e74b9 | ||
|
53cfc7c965 | ||
|
6db5bb5ccd | ||
|
b86f78f6b1 | ||
|
c588a291e6 | ||
|
2a774a88f5 | ||
|
371d25c8c9 | ||
|
bda919033d | ||
|
23616153d4 | ||
|
31c6a340ab | ||
|
4f283a0789 | ||
|
54e0af40c1 | ||
|
77eeb0010e | ||
|
e42e3188f5 | ||
|
c251e9309e | ||
|
dc7f81a7b0 | ||
|
abe243d469 | ||
|
401c5a8638 | ||
|
bb741f53a8 | ||
|
6280771dad | ||
|
4cd71a9750 | ||
|
dd8b5613ca | ||
|
8ba7c61625 | ||
|
e52ae870f2 | ||
|
ea31bd47e5 | ||
|
6a8cc62b67 | ||
|
e9291fa4c7 | ||
|
c0c2e28c1b | ||
|
615ee9d177 | ||
|
cd8da72fea | ||
|
31ce1374e4 | ||
|
80580746e5 | ||
|
d34956b197 | ||
|
c31559101a | ||
|
250d89b621 | ||
|
9a5dddc311 | ||
|
f033b30703 | ||
|
d91e9104aa | ||
|
a96b224b38 | ||
|
868d515fbc | ||
|
eed56a45d6 | ||
|
0932cd3059 | ||
|
29ff658d92 | ||
|
7ec43022c1 | ||
|
c0b081fac0 | ||
|
25306eae42 | ||
|
d79828076f | ||
|
deaffb0698 | ||
|
bebf9547bd | ||
|
812645b077 | ||
|
cf10cdd6b3 | ||
|
f4add5f10d | ||
|
40f3df5b86 | ||
|
ff1eeafb95 | ||
|
cb97a8063d | ||
|
6f1c31b25d | ||
|
c133fee286 | ||
|
27645e16ab | ||
|
ef92ced370 | ||
|
68c32a4184 | ||
|
5c25913e09 | ||
|
192f7f1b29 | ||
|
0a8165c0ac | ||
|
b600786c52 | ||
|
c57b8d5a6a | ||
|
d2b1256e5c | ||
|
02133092f8 | ||
|
cb2572fe07 | ||
|
520c8cffb2 | ||
|
b7141d556e | ||
|
9d628d1d49 | ||
|
482722d881 | ||
|
a820c37ab2 | ||
|
746f129bfe | ||
|
64ba5cb570 | ||
|
2c124c96df | ||
|
be78255bea | ||
|
be0ea89f83 | ||
|
721e273547 | ||
|
a4dc325a0c | ||
|
b4cb0f3e7d | ||
|
e428ec940b | ||
|
c95b71d40d | ||
|
3afb4dda97 | ||
|
19bdcedf1c | ||
|
eb6dcab308 | ||
|
e46b6147fc | ||
|
3f1e59a7cf | ||
|
0a25a3ed70 | ||
|
710e811b27 | ||
|
1f3121d2fa | ||
|
dde738a2fd | ||
|
fd5e1e6afb | ||
|
5b5a2d035d | ||
|
7ea6adb29e | ||
|
3fc43c1096 | ||
|
7cfdf33ff0 | ||
|
43b4f90eb7 | ||
|
1727ddb9ea | ||
|
ad64a43b34 | ||
|
99f22a47ff | ||
|
21bfd06570 | ||
|
36df9c5bd6 | ||
|
e039a221a3 | ||
|
706f74bce0 | ||
|
7ca95512d8 | ||
|
efe3510a9a | ||
|
1792bce292 | ||
|
f914020d45 | ||
|
a06f3d0e34 | ||
|
bb18018f29 | ||
|
afbad4bbc6 | ||
|
4805dddc18 | ||
|
fbecab32e7 | ||
|
68b6c79c3f | ||
|
2fe68a8a12 | ||
|
e71153258b | ||
|
3f776df94e | ||
|
57a5ebe6c6 | ||
|
8b5943d930 | ||
|
1fc3d9aeb2 | ||
|
34a9163c52 | ||
|
9fcfc8d64b | ||
|
2487174b48 | ||
|
0df78d4eeb | ||
|
fd84ab3cf7 | ||
|
f3adde8bbd | ||
|
0fc1765ff3 | ||
|
9de79861ea | ||
|
e001f7e75e | ||
|
9bdc217987 | ||
|
489f0b93f9 | ||
|
1e7b99562a | ||
|
10c82595b0 | ||
|
38626dcffd | ||
|
d29b36310f | ||
|
88db11fda4 | ||
|
cec2261e96 | ||
|
387506faab | ||
|
222f6f7877 | ||
|
6083d2b9f3 | ||
|
a57a0ecd96 | ||
|
9322ad0f9b | ||
|
c5ebdb8ba7 | ||
|
6f3c87a999 | ||
|
31d3ed97c7 | ||
|
a2e45239c3 | ||
|
39457ace2f | ||
|
44eeda2475 | ||
|
ed8a18ea64 | ||
|
28bdaa2da6 | ||
|
032cc497ca | ||
|
a9ba51aa72 | ||
|
ab9bddb3bd | ||
|
8b33d1eeb9 | ||
|
6b93180130 | ||
|
d99617d084 | ||
|
984e83c2d0 | ||
|
731b210f51 | ||
|
a016b4ded2 | ||
|
84ae189953 | ||
|
26d61875ee | ||
|
8a586249d7 | ||
|
d0a783e362 | ||
|
5aa84a34ea | ||
|
4ae2af0bcc | ||
|
f1b0d15813 | ||
|
8ae804ff9a | ||
|
dfb0ca43c5 | ||
|
0748dc2d1e | ||
|
55e7d1aad1 | ||
|
ef5069862d | ||
|
e9ddb15d9d | ||
|
6b136fac67 | ||
|
e84099bfd4 | ||
|
bd81bdc24a | ||
|
e7a486fa81 | ||
|
fe53ba80dd | ||
|
1906f1eddf | ||
|
811abcb19f | ||
|
c35c531551 | ||
|
fc4b0c9aec | ||
|
dfa64f228a | ||
|
94aba23ef4 | ||
|
ada1d0fb8c | ||
|
a3a73b9332 | ||
|
b122270aa3 | ||
|
664d22967c | ||
|
b13f97575b | ||
|
d409df0b61 | ||
|
4dae94821b | ||
|
299cd9b830 | ||
|
994c4f4bdf | ||
|
ce26e26177 | ||
|
7e60227720 | ||
|
ee9b44245f | ||
|
a91ebb7517 | ||
|
eccfaa5fcf | ||
|
67035815aa | ||
|
0137efde7a | ||
|
f6de0358e1 | ||
|
21469e92b0 | ||
|
e41a0c9721 | ||
|
25c6c12150 | ||
|
f607cac267 | ||
|
ae50bfa2cc | ||
|
e84a420766 | ||
|
efc0fed9ce | ||
|
5ac00a3ccb | ||
|
db70db5f4d | ||
|
da660058eb | ||
|
92b7589f89 | ||
|
a6c33193f7 | ||
|
d03d6787d9 | ||
|
5c79c5a2ec | ||
|
87f26c845c | ||
|
4f67f5f159 | ||
|
0873af4734 | ||
|
9099077075 | ||
|
1b88f2ec03 | ||
|
de3072f838 | ||
|
9634c84e1c | ||
|
d32ebbe716 | ||
|
bdcca4510d | ||
|
107ece438a | ||
|
e7ba72ded9 | ||
|
e4ea116857 | ||
|
16b79f2c70 | ||
|
a92c34d83c | ||
|
30dcbaff20 | ||
|
737cd0be7f | ||
|
1b524bb2ec | ||
|
80aafdb38f | ||
|
c471d22965 | ||
|
21dc42d2ad | ||
|
c69b89cc42 | ||
|
ed2ac2ae79 | ||
|
4c2340aea6 | ||
|
9c2308bdc3 | ||
|
022b464b0b | ||
|
040b945fef | ||
|
bee6d7f065 | ||
|
33580991c7 | ||
|
e7114a5c2a | ||
|
9d8a11f21a | ||
|
21354119cc | ||
|
bd3ffa7db3 | ||
|
bbf0c3a46d | ||
|
fe757b6267 | ||
|
60fab9c405 | ||
|
271a72f2f2 | ||
|
580fbf441c | ||
|
4b87cc455d | ||
|
f01d3db739 | ||
|
c69e1c379b | ||
|
e8a3f9f7fa | ||
|
9a2b735645 | ||
|
a57ac0b18e | ||
|
30987eaf06 | ||
|
02aa1ee873 | ||
|
11de73dfd6 | ||
|
3b09ef58ca | ||
|
6cd37e57a6 | ||
|
fc21a8e552 | ||
|
386bf890a0 | ||
|
adaecba162 | ||
|
9c816bbac1 | ||
|
a810976aa6 | ||
|
0a9bd393dc | ||
|
8b2103fc77 | ||
|
b216e2fc98 | ||
|
8739c28949 | ||
|
56b5a5c4f0 | ||
|
304bf2cd17 | ||
|
b9f98dd8cd | ||
|
a470cdce4c | ||
|
2a67ac0027 | ||
|
8b3c18de54 | ||
|
343e92322b | ||
|
2252f747b7 | ||
|
925978ffde | ||
|
6ebfc6023b | ||
|
57f77c3858 | ||
|
127d69e887 | ||
|
17a968d2ed | ||
|
53451e98a7 | ||
|
cbf0324c34 | ||
|
39b539c42f | ||
|
32e4be6fb9 | ||
|
2d1b211920 | ||
|
5da0074fed | ||
|
301d1b85ab | ||
|
3c3e311190 | ||
|
807516a991 | ||
|
b40f93b9e3 | ||
|
01bbd42519 | ||
|
fe34fc7c6b | ||
|
ba75a7a23b | ||
|
de1ceae4b0 | ||
|
35d27fb11b | ||
|
d77c918d51 | ||
|
c563490cf8 | ||
|
64d64cc181 | ||
|
ba21b8d274 | ||
|
38205d67da | ||
|
d4c0d3bebe | ||
|
df0f7ba61e | ||
|
aca854ccbf | ||
|
1407f6eb46 | ||
|
15142a30f5 | ||
|
43f36b9b05 | ||
|
3645244f9f | ||
|
de7beef05d | ||
|
f88604e6d5 | ||
|
0a3567439d | ||
|
6842012748 | ||
|
0d186a0557 | ||
|
ab61bad168 | ||
|
d8acceca14 | ||
|
ff04d52f12 | ||
|
7677e4b928 | ||
|
b8fce54c0f | ||
|
abdebc244d | ||
|
9642fffbbb | ||
|
15632876f7 | ||
|
ec91b44fb6 | ||
|
fc7dcff4a7 | ||
|
049a6d475d | ||
|
09075d515a | ||
|
4625c41431 | ||
|
601e391b06 | ||
|
21243c8234 | ||
|
1fd61a00e4 | ||
|
12f3bc10c2 | ||
|
2da8cc383c | ||
|
e3363e9ad0 | ||
|
975d4154e6 | ||
|
b4865588f8 | ||
|
01c264123d | ||
|
effa3ee249 | ||
|
b46505b13d | ||
|
2db7c727b6 | ||
|
3afd0a55b9 | ||
|
f721429f25 | ||
|
98fcbe3fe2 | ||
|
654b4e6257 | ||
|
99dac5451c | ||
|
067dbe8657 | ||
|
d0141bd105 | ||
|
e4547eb422 | ||
|
1cef62cf05 | ||
|
77730c80d9 | ||
|
eddeafd2ed | ||
|
804f1a83eb | ||
|
2f6b2897fe | ||
|
9a687e3153 | ||
|
cb1c2ffda1 | ||
|
b0c0f2e560 | ||
|
7e5eff8a29 | ||
|
8fbd42d592 | ||
|
803b1a910e | ||
|
a0f0034352 | ||
|
3ff6026917 | ||
|
daf227a185 | ||
|
4ed776368a | ||
|
8f517b7651 | ||
|
b3028e4891 | ||
|
e33e9da277 | ||
|
f0124df0e8 | ||
|
cdb394fac6 | ||
|
0e029f719b | ||
|
9127ee2ff9 | ||
|
2b90b5600c | ||
|
ea325c54e8 | ||
|
da9bc564d2 | ||
|
c4fb6c8517 | ||
|
1aad6a2fc0 | ||
|
bcfa7c6718 | ||
|
8cda4273ec | ||
|
e5993c4a4b | ||
|
c66eb49199 | ||
|
081fffd46e | ||
|
b674e344a8 | ||
|
65dd0afb60 | ||
|
982641228c | ||
|
a64d606cb3 | ||
|
f09840dcdc | ||
|
19ff0e5fb1 | ||
|
d7a098ebd3 | ||
|
d0a265cee8 | ||
|
fc6152613f | ||
|
53cd60bb29 | ||
|
9534f48425 | ||
|
d7d04a07a2 | ||
|
80432fde62 | ||
|
f353cd1c3a | ||
|
99ede0f747 | ||
|
7290ea9bfb | ||
|
af83764f4f | ||
|
fab99b8309 | ||
|
859c67792a | ||
|
c4296b166a | ||
|
73363f829b | ||
|
84818c96f2 | ||
|
a75251f0a9 | ||
|
18bedbd095 | ||
|
781f717530 | ||
|
6d7112fde7 | ||
|
37e3ffcaac | ||
|
b79e381092 | ||
|
bf639f02a8 | ||
|
2498170b95 | ||
|
d31b439e04 | ||
|
54950f9a3d | ||
|
b34c2ecbcb | ||
|
4521a142c3 | ||
|
005ba155c0 | ||
|
2f08f435b9 | ||
|
4981acb241 | ||
|
5a0d9c8d43 | ||
|
36abc48cf8 | ||
|
f3c27ec157 | ||
|
0f4a8cf7cb | ||
|
0daa5ce1e7 | ||
|
2e65bc675c | ||
|
876e6b3a0d | ||
|
6ed8acde67 | ||
|
61af8e7631 | ||
|
28fb58f0ea | ||
|
da9c2894fe | ||
|
a2c5f01059 | ||
|
0d175a69ae | ||
|
6ebfec99c5 | ||
|
ddca525132 | ||
|
daba1a2794 | ||
|
101a9b0445 | ||
|
b94e6290a4 | ||
|
67a1e1ffae | ||
|
cb57165956 | ||
|
9702a17152 | ||
|
f0d949f931 | ||
|
0d8a6cfbfa | ||
|
540ad99442 | ||
|
cfffa74f96 | ||
|
f93d0ff9bc | ||
|
b55cf40b91 | ||
|
a38afcf053 | ||
|
f86f4159e6 | ||
|
dfb0326d00 | ||
|
33c84b3c00 | ||
|
7ab911b9a4 | ||
|
d309b1eaa7 | ||
|
ea9de852bd | ||
|
682992e868 | ||
|
5ed7717f0d | ||
|
a0b30b0363 | ||
|
df8d3a5afb | ||
|
d445fdaa19 | ||
|
bbbaae5562 | ||
|
fecf56e15a | ||
|
1327b570e3 | ||
|
be8eea9eda | ||
|
97c2744a16 | ||
|
52ba44c474 | ||
|
da5407b776 | ||
|
bc15c19518 | ||
|
7351240218 | ||
|
c3a1c8c8eb | ||
|
73b54c862e | ||
|
411d0ee437 | ||
|
8d5a90ea3c | ||
|
9ff47fc807 | ||
|
115ba2b079 | ||
|
f2389a1e55 | ||
|
f7c3035b8c | ||
|
c8a6093d52 | ||
|
557aeff253 | ||
|
a3a5aa7c63 | ||
|
83d82b6697 | ||
|
f27ea1f0c8 | ||
|
7eb49d1c7b | ||
|
477f5e5436 | ||
|
577a8de7c0 | ||
|
a2b3b1ebe4 | ||
|
36e99860ee | ||
|
c9020ece5d | ||
|
b335927665 | ||
|
eb461512a7 | ||
|
4d2906b0a5 | ||
|
5c9cc3f9f7 | ||
|
b9acbbbc66 | ||
|
421ae5bbd8 | ||
|
97c4333803 | ||
|
acf211a5fa | ||
|
33cc18ed51 | ||
|
f9c6ca468a | ||
|
06986f36b3 | ||
|
18b22523cc | ||
|
8a1779b2ad | ||
|
97ef81914c | ||
|
528b879955 | ||
|
719365f209 | ||
|
2b1849e57d | ||
|
2e7a7877a5 | ||
|
3ab7f70e31 | ||
|
9d230d753b | ||
|
e75f85ce58 | ||
|
30f8dd6e37 | ||
|
b8cd10264b | ||
|
37f60e75e7 | ||
|
b68d0850b1 | ||
|
10e4aa32f8 | ||
|
1896268775 | ||
|
2d5d0c2999 | ||
|
ecc80bbcea | ||
|
30a9a24db9 | ||
|
18e9784c6d | ||
|
8cf76ec113 | ||
|
b0c6972e5c | ||
|
d7debba222 | ||
|
d55527953a | ||
|
9cce5a93ff | ||
|
76fe16259d | ||
|
97a8fe1e15 | ||
|
a316f9e7fc | ||
|
c104a97590 | ||
|
bdda1efd44 | ||
|
8a82e17a79 | ||
|
c147ab51c9 | ||
|
a69d401433 | ||
|
8bd6bb622c | ||
|
67a693fc5b | ||
|
d6f3891009 | ||
|
c03ab03627 | ||
|
75e5cd86d7 | ||
|
6e18d96e7a | ||
|
0f447f1fb6 | ||
|
d41e3141f1 | ||
|
0f39051562 | ||
|
ec6d3bb688 | ||
|
927a030bbf | ||
|
3d0d54e070 | ||
|
fefe8fcda9 | ||
|
46bac461ce | ||
|
1d2b43402e | ||
|
752baac00c | ||
|
8157d4283e | ||
|
150663f78a | ||
|
d047597244 | ||
|
fc0d132566 | ||
|
de3dc94d5b | ||
|
9393500bff | ||
|
76adf883fd | ||
|
71a8d09a63 | ||
|
9646497216 | ||
|
b27e98a428 | ||
|
9c9fba6a6c | ||
|
828d273698 | ||
|
21f5482e0d | ||
|
4fa66f2635 | ||
|
8f228626a2 | ||
|
5ed83dfa29 | ||
|
dfd0436428 | ||
|
b3f82a148a | ||
|
83628933f0 | ||
|
8189bddefb | ||
|
820343e7ac | ||
|
f95dc2d565 | ||
|
5a33f19964 | ||
|
016b7d0a3a | ||
|
e4dcbd5180 | ||
|
a86c93ebc0 | ||
|
e2d4463886 | ||
|
e0afb8942e | ||
|
7a1c0d2547 | ||
|
bf705a63de | ||
|
d873d0f173 | ||
|
9161c55d59 | ||
|
fc88518067 | ||
|
c25b52b1b3 | ||
|
93f59a6f59 | ||
|
f1c31bee27 | ||
|
0959f6ebf6 | ||
|
90f1749965 | ||
|
42cfabc670 | ||
|
03ecf2202e | ||
|
bef818e210 | ||
|
db55bed72b | ||
|
c9864d8ac1 | ||
|
b82217eaaa | ||
|
dc621ca388 | ||
|
6094869e3e | ||
|
62f5382d56 | ||
|
601cadbae6 | ||
|
d3058fe589 | ||
|
5b4aaf4eb1 | ||
|
464e714a2e | ||
|
04678bc585 | ||
|
b60c691816 | ||
|
e7664d5684 | ||
|
4fd40f0333 | ||
|
d3ea649832 | ||
|
44659b7ba8 | ||
|
962030e70a | ||
|
5d28bad0ad | ||
|
ac6f889dfc | ||
|
298f93ef50 | ||
|
32b54be5cb | ||
|
090b857912 | ||
|
295e8c2a2f | ||
|
ad2338b994 | ||
|
1310617a92 | ||
|
5635e4214c | ||
|
055fd752c2 | ||
|
7124a14a60 | ||
|
d6f16b7664 | ||
|
954c60100f | ||
|
a9ff13a367 | ||
|
52541b4a1f | ||
|
e0c80f5ddd | ||
|
86f95d7150 | ||
|
70286c7cdc | ||
|
b980268ba7 | ||
|
22895ba14f | ||
|
bc9c063254 | ||
|
8096f142ec | ||
|
290ec11e7c | ||
|
7f21cf1dcf | ||
|
e8181a5ddf | ||
|
2061bfc5e8 | ||
|
bc40012ca3 | ||
|
b807c590cb | ||
|
0b9fae3c53 | ||
|
4b6cbd2340 | ||
|
91e4eea52d | ||
|
334e96d470 | ||
|
685d47938b | ||
|
668b37e111 | ||
|
4f9235f6eb | ||
|
58bd10edb2 | ||
|
13a26a0fa2 | ||
|
3c4ce9c99b | ||
|
225b4fb3e2 | ||
|
dd2d64e058 | ||
|
ffe4d36e0a | ||
|
fdc28fce80 | ||
|
e8af875756 | ||
|
64bb2fe3ec | ||
|
d1ab031a27 | ||
|
5361d498c3 | ||
|
4fc5e82e30 | ||
|
3e4e4b32fd | ||
|
48e2663d03 | ||
|
df90da0b37 | ||
|
e190b7eee9 | ||
|
ceafbcf9d2 | ||
|
5834e970eb | ||
|
0c126af717 | ||
|
2d518bfbcd | ||
|
77d025ebda | ||
|
974460b072 | ||
|
fa698fb05e | ||
|
5e1a81555c | ||
|
3a90acf08e | ||
|
830e328df0 | ||
|
2209e5b0ca | ||
|
a0a18384cb | ||
|
7392c4b0c5 | ||
|
f385d0ce1c | ||
|
2e00d16f3d | ||
|
6aada7d5ec | ||
|
753c0b3853 | ||
|
f8b352f6d9 | ||
|
ba802fdd5e | ||
|
b1b6ae3905 | ||
|
2dec56e7b7 | ||
|
e497603678 | ||
|
a18667c2e9 | ||
|
45c00ab9d4 | ||
|
924bb7226b | ||
|
15cbf313bb | ||
|
4a371a5197 | ||
|
aad51d4704 | ||
|
20860e2ba0 | ||
|
5ef50ae139 | ||
|
144ae120ab | ||
|
e465ed0850 | ||
|
bf69b38056 | ||
|
2937f2010c | ||
|
a4a6d4da8a | ||
|
84ae26cdc0 | ||
|
e96dc46d38 | ||
|
1b4634702c | ||
|
3a841ac130 | ||
|
f31df7521a | ||
|
51387dfbfb | ||
|
a3e78c5453 | ||
|
fe6973a4f6 | ||
|
76e39e502c | ||
|
3a3e672804 | ||
|
c3f049fd74 | ||
|
675efbda3b | ||
|
e17cf9ecd7 | ||
|
3f8ef4e05f | ||
|
3438325e7d | ||
|
6b92d71ea1 | ||
|
26a3536958 | ||
|
818312683e | ||
|
cc17a7656c | ||
|
5978358e58 | ||
|
452e3b494c | ||
|
af4b97a301 | ||
|
152262dbfc | ||
|
fe595d60f7 | ||
|
81e2c97095 | ||
|
204c6765bd | ||
|
05e71f990c | ||
|
53b7b26c45 | ||
|
de748dfffe | ||
|
5573f0f1c7 | ||
|
abcbd9817e | ||
|
a48bb6e1ed | ||
|
fc56940055 | ||
|
3a21301724 | ||
|
7d68aa6869 | ||
|
a4a5a798bd | ||
|
ed2caa1277 | ||
|
59596e4266 | ||
|
66f0de2807 | ||
|
662dfad670 | ||
|
98cb7a19a1 | ||
|
e2996f167e | ||
|
64f2f86d32 | ||
|
6472928cf1 | ||
|
ac2e9cd00f | ||
|
b9b045cdd8 | ||
|
838fc7e303 | ||
|
05af08080e | ||
|
2d04dd8b88 | ||
|
7b7c0c83ef | ||
|
535680668b | ||
|
771957458d | ||
|
9d38363e09 | ||
|
e2da32e2da | ||
|
70d7f67bd8 | ||
|
709b14180a | ||
|
9aa71f04f2 | ||
|
8f741d894a | ||
|
e57ee9c0e8 | ||
|
06c17ab7f1 | ||
|
d8c7b01a3c | ||
|
8367abad1a | ||
|
17c443ee6d | ||
|
1a110dcbd7 | ||
|
02bd709043 | ||
|
1fc8f1bdbf | ||
|
57082d6600 | ||
|
6287f68c0b | ||
|
0925851f89 | ||
|
770e239f73 | ||
|
0d4db7ad7f | ||
|
19892a3c3a | ||
|
ecb6a6af32 | ||
|
8b8eddc8e2 | ||
|
e55bdd5d8a | ||
|
02a8a49961 | ||
|
7565e274b1 | ||
|
d61303b1b0 | ||
|
04229c5854 | ||
|
a139ba9c48 | ||
|
4f43ceb0d2 | ||
|
9f7a49bec3 | ||
|
ace7aef0e6 | ||
|
e450c75f6f | ||
|
08670ecea1 | ||
|
03e19c7f43 | ||
|
3c02f0c75b | ||
|
2e02474b7a | ||
|
c14c7f0b69 | ||
|
76b5959bb5 | ||
|
fec96137e8 | ||
|
18a36b3e06 | ||
|
40d01162b9 | ||
|
e8a5d7b85c | ||
|
e06047419c | ||
|
03516b1c68 | ||
|
7ab24b94ee | ||
|
bf3e527dab | ||
|
b31c836456 | ||
|
1aacefd6fa | ||
|
3b4f9faebc | ||
|
159e6b6f24 | ||
|
ad2067340f | ||
|
cf04425bc2 | ||
|
796d96408b | ||
|
54ccb18e87 | ||
|
3d64598e11 | ||
|
7ac2b4a226 | ||
|
2b9ef7d15c | ||
|
975c70d2b7 | ||
|
a6300d828a | ||
|
1a361fdfe2 | ||
|
5a2c49b954 | ||
|
90ec0d52e0 | ||
|
a7f81b06b9 | ||
|
393b0d1a80 | ||
|
9a115106b4 | ||
|
a3b7bd0891 | ||
|
dad0e64aa8 | ||
|
90e36d1883 | ||
|
8873aca268 | ||
|
ce28dfbdeb | ||
|
e4bc2c643e | ||
|
54f01e151c | ||
|
11e9a0d41c | ||
|
4f38830058 | ||
|
520ea94de8 | ||
|
8ca3212701 | ||
|
f9c4cc2040 | ||
|
b436c8d7e5 | ||
|
ee3e40c663 | ||
|
4fd1e04e70 | ||
|
4f7b5ff59f | ||
|
ab1e246367 | ||
|
15716e59dc | ||
|
aa3c7f4614 | ||
|
ae53600d31 | ||
|
57f0015a08 | ||
|
1b873b028f | ||
|
3a332d241c | ||
|
0b18882a94 | ||
|
8f7e2cd179 | ||
|
614e0518a7 | ||
|
cf1ebada0e | ||
|
aae7ab64c7 | ||
|
68ee0bb8dd | ||
|
d3f5bc4043 | ||
|
f4f6e25340 | ||
|
9614d3353b | ||
|
ab14ad5d75 | ||
|
0eeb499288 | ||
|
5492f52adc | ||
|
1611cd54e7 | ||
|
6897b43599 | ||
|
394b31faff | ||
|
73c9f72c52 | ||
|
7fd2bf1a32 | ||
|
215eb967e8 | ||
|
cb2ba3675c | ||
|
ca98a84d68 | ||
|
110eab56a7 | ||
|
d5a31168ce | ||
|
d652b95fbf | ||
|
153470d605 | ||
|
b4d824d6fc | ||
|
8169d0eab2 | ||
|
b2926b2d28 | ||
|
3cade2a1a0 | ||
|
bcae065c88 | ||
|
1347a15539 | ||
|
d26a56d4e1 | ||
|
47dd842e81 | ||
|
f594f14510 | ||
|
2766835ed4 | ||
|
9eaed07b77 | ||
|
beb44f1dac | ||
|
903d85e323 | ||
|
5dedb27ce0 | ||
|
ec95aa2e04 | ||
|
1cfb484100 | ||
|
e843be7ea5 | ||
|
547819766f | ||
|
50d17393a5 | ||
|
ea590c44a9 | ||
|
73989a4981 | ||
|
f1bcabcc37 | ||
|
a9c28d7583 | ||
|
22287a78c5 | ||
|
96a9b4e1f2 | ||
|
21961a786d | ||
|
4647441ad8 | ||
|
4ae0a416f4 | ||
|
6ae21d6581 | ||
|
5c6a756014 | ||
|
f784961b9c | ||
|
e187b693ea | ||
|
04ab76b889 | ||
|
1fea266472 | ||
|
c91190fc6e | ||
|
ff70a04bf5 | ||
|
60d0ab418a | ||
|
8c50da167d | ||
|
589892af07 | ||
|
901c4553d2 | ||
|
43e45cbb81 | ||
|
7914332c40 | ||
|
b9e49cdca6 | ||
|
212f331583 | ||
|
d827a65e59 | ||
|
a151cbd37a | ||
|
89171a2608 | ||
|
c94c666d04 | ||
|
929a46cbab | ||
|
df5a736c00 | ||
|
7fff1ba0b0 | ||
|
0b42da4085 | ||
|
83ff7b2466 | ||
|
81ca2f0bf3 | ||
|
af66e751db | ||
|
000cb5a47d | ||
|
f088548261 | ||
|
0125790801 | ||
|
63da7cdec6 | ||
|
4adba0d3c3 | ||
|
7cdffcec52 | ||
|
f68bb8c707 | ||
|
5149da5719 | ||
|
5b3c5e1a16 | ||
|
542ef8904a | ||
|
393a03a46e | ||
|
4706891cae | ||
|
d8af76f67c | ||
|
78ae3b38a6 | ||
|
e539aad118 | ||
|
19715546b3 | ||
|
342b18da03 | ||
|
c649bec26c | ||
|
e64606a82f | ||
|
edaca16d7c | ||
|
116603e61c | ||
|
76468bb8d8 | ||
|
2a2f2b20b8 | ||
|
aed131a8f0 | ||
|
d224414eb1 | ||
|
c6376acfc4 | ||
|
3028bffd4c | ||
|
f549f67be9 | ||
|
6dd1d2d931 | ||
|
bba6ae5622 | ||
|
ce8000ee7e | ||
|
89755e52bf | ||
|
73234d2a28 | ||
|
39f9045703 | ||
|
b854909803 | ||
|
d3c1a04983 | ||
|
f2e3d6eca7 | ||
|
fabedf7636 | ||
|
62f63f9e48 | ||
|
1dbcce8b56 | ||
|
0ccc1d3686 | ||
|
5ba41e4f7f | ||
|
3cfb9a6e83 | ||
|
30b75702df | ||
|
e2a8066fca | ||
|
b59fab7ee6 | ||
|
713e26332f | ||
|
ba38fe5b97 | ||
|
dbdbbea471 | ||
|
03cc540d5f | ||
|
d7f7c94c4d | ||
|
72b9f3c5de | ||
|
d1a104bba4 | ||
|
c2b56c583a | ||
|
619331f4a7 | ||
|
3419aef677 | ||
|
445ce51e51 | ||
|
884d30b85a | ||
|
c04c3668cb | ||
|
855a5f3701 | ||
|
6d59a21e99 | ||
|
935a306b29 | ||
|
2c9d116a5c | ||
|
f1368c36dd | ||
|
4de64f5750 | ||
|
89698844a1 | ||
|
57dd345dc3 | ||
|
5b5dff3f9e | ||
|
a4079ad565 | ||
|
387c060006 | ||
|
0b6d4b376f | ||
|
d241ee8516 | ||
|
2edf5a9584 | ||
|
50a716c0d9 | ||
|
57bd84510f | ||
|
66a2cdee40 | ||
|
bbf9935828 | ||
|
fc5894e734 | ||
|
2fd6d7e8c0 | ||
|
2c77b31e30 | ||
|
c48de2d1af | ||
|
c0010105c2 | ||
|
f6558fe6e0 | ||
|
36bb57d1be | ||
|
e6306e5e76 | ||
|
2761aa40dd | ||
|
c8fd93d356 | ||
|
2604b9f72b | ||
|
3c51d066f1 | ||
|
656f47b7cc | ||
|
2a88dc9bb7 | ||
|
fadc29d811 | ||
|
4bb71c8fa2 | ||
|
baabe22f7a | ||
|
025db8f227 | ||
|
31edd13a72 | ||
|
82e0644195 | ||
|
3888299bf5 | ||
|
7f68c65406 | ||
|
84a2a88572 | ||
|
fca58c8e2f | ||
|
311a57f9fc | ||
|
773c0d78d8 | ||
|
ca6f58eed1 | ||
|
dbdfad7ace | ||
|
1cb81e3f4c | ||
|
4c4a703841 | ||
|
d91f30958f | ||
|
5113817507 | ||
|
28e8b2add3 | ||
|
bcb47255b9 | ||
|
bc60812d68 | ||
|
df4199e2c1 | ||
|
c4abf68351 | ||
|
865f823835 | ||
|
dbecb95024 | ||
|
072e92615a | ||
|
e5d332dea2 | ||
|
d5cd5ebd80 | ||
|
d71505bdc6 | ||
|
483f10397e | ||
|
d9f434afb9 | ||
|
40cf84e7e5 | ||
|
b8e14a4f99 | ||
|
7e7939e1ad | ||
|
c5e89241c5 | ||
|
0b69bc28c6 | ||
|
e61639f6fc | ||
|
ccd4f8b5ae | ||
|
11fd883ee4 | ||
|
aa67f7c39a | ||
|
f080367a0c | ||
|
07bbfe86b9 | ||
|
8ebe62b4dd | ||
|
4cca234f46 | ||
|
0d04ceafbf | ||
|
8025b052b3 | ||
|
cb085a1b50 | ||
|
cee0fc5d78 | ||
|
38025362ee | ||
|
7a15861d44 | ||
|
26969c2c38 | ||
|
25d846aa9a | ||
|
9017be3259 | ||
|
2d88958d35 | ||
|
2e26cf48e8 | ||
|
7459d906de | ||
|
62d228346b | ||
|
2872b2fff5 | ||
|
33e7f7cc59 | ||
|
0daaaddeef | ||
|
03f5fce672 | ||
|
178a356cb4 | ||
|
f14955512f | ||
|
45da03df23 | ||
|
4fe6f885f7 | ||
|
357f782f4e | ||
|
0ced04f0df | ||
|
587e61def9 | ||
|
5c404c79da | ||
|
8f88c61bdf | ||
|
e9ca38fafa | ||
|
7ab056b6ef | ||
|
2ef0b064e5 | ||
|
ea87491a82 | ||
|
810a0330ab | ||
|
4b1d4b4f6b | ||
|
907e9e1fe2 | ||
|
4311ffc9e1 | ||
|
2093fdcc53 | ||
|
0e5cd442be | ||
|
5530a3ceb8 | ||
|
6e8f3b0f45 | ||
|
12e8cef9cf | ||
|
27781a4767 | ||
|
7e3a50b4ac | ||
|
42ecd72547 | ||
|
8f597b3cc3 | ||
|
ff25402f68 | ||
|
8e57c8ace3 | ||
|
494a581339 | ||
|
4c3d577ddb | ||
|
c328f09efc | ||
|
cb9b8f73c0 | ||
|
eaa0b9102b | ||
|
a12ddacb7b | ||
|
853c66baed | ||
|
cf76d23476 | ||
|
cf24c021a3 | ||
|
b478364914 | ||
|
c1b4881e8a | ||
|
ac1ffbad1d | ||
|
b09725fa84 | ||
|
e59442bfab | ||
|
9996e328cb | ||
|
ad5ffd78d6 | ||
|
0917290e95 | ||
|
ac3420faac | ||
|
ee5a87826d | ||
|
f4b4054de5 | ||
|
aff98d7f2a | ||
|
082920eb80 | ||
|
de968e3623 | ||
|
2a798d64a2 | ||
|
234576da71 | ||
|
fb1037a241 | ||
|
64cca24526 | ||
|
a598754b5b | ||
|
bb4d9297b5 | ||
|
4938966e76 | ||
|
cabaa53302 | ||
|
bfab101ac2 | ||
|
23cc39a265 | ||
|
0c7ba773ec | ||
|
4b76aa09dd | ||
|
d66692149b | ||
|
7f5567eec0 | ||
|
be2328f848 | ||
|
568fe42cb1 | ||
|
482dbfc52e | ||
|
10ae54379a | ||
|
2236197d49 | ||
|
9e0e08cba4 | ||
|
8508ae3d15 | ||
|
99948a86e1 | ||
|
f66b1a3136 | ||
|
ae745e4fa8 | ||
|
e92bc8ca4e | ||
|
aa4111a3b2 | ||
|
7bb8ffc29e | ||
|
e835311d0d | ||
|
4ee5fdf619 | ||
|
35c777ef2c | ||
|
904c505125 | ||
|
d8ed3fb31e | ||
|
2ad7967db8 | ||
|
95d3a6ac52 | ||
|
f049f9dd3a | ||
|
67f8424eb0 | ||
|
7db6fe02fd |
8
.github/FUNDING.yml
vendored
|
@ -1,8 +0,0 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: raysan5
|
||||
patreon: # raylib
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # raysan
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
custom: # Replace with a single custom sponsorship URL
|
1
.github/ISSUE_TEMPLATE/config.yml
vendored
|
@ -1 +0,0 @@
|
|||
blank_issues_enabled: false
|
40
.github/ISSUE_TEMPLATE/new-issue-template.md
vendored
|
@ -1,40 +0,0 @@
|
|||
---
|
||||
name: new issue template
|
||||
about: generic template for new issues
|
||||
title: "[module] Short description of the issue/bug/feature"
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**WARNING: Please, read this note carefully before submitting a new issue:**
|
||||
|
||||
It is important to realise that **this is NOT A SUPPORT FORUM**, this is for reproducible BUGS with raylib ONLY.
|
||||
|
||||
There are lots of generous and helpful people ready to help you out on [raylib Discord forum](https://discord.gg/raylib) or [raylib reddit](https://www.reddit.com/r/raylib/).
|
||||
|
||||
Remember that asking for support questions here actively takes developer time away from improving raylib.
|
||||
|
||||
---
|
||||
|
||||
Please, before submitting a new issue verify and check:
|
||||
|
||||
- [ ] I tested it on latest raylib version from master branch
|
||||
- [ ] I checked there is no similar issue already reported
|
||||
- [ ] My code has no errors or misuse of raylib
|
||||
|
||||
### Issue description
|
||||
|
||||
*Briefly describe the issue you are experiencing (or the feature you want to see added to raylib). Tell us what you were trying to do and what happened instead. Remember, this is not the best place to ask questions. For questions, go to [raylib Discord server](https://discord.gg/raylib).*
|
||||
|
||||
### Environment
|
||||
|
||||
*Provide your Platform, Operating System, OpenGL version, GPU details where you experienced the issue.*
|
||||
|
||||
### Issue Screenshot
|
||||
|
||||
*If possible, provide a screenshot that illustrates the issue. Usually an image is better than a thousand words.*
|
||||
|
||||
### Code Example
|
||||
|
||||
*Provide minimal reproduction code to test the issue. Please, format the code properly and try to keep it as simple as possible, just focusing on the experienced issue.*
|
100
.github/workflows/android.yml
vendored
|
@ -1,100 +0,0 @@
|
|||
name: Android
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- '.github/workflows/android.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- '.github/workflows/android.yml'
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
permissions:
|
||||
contents: write # for actions/upload-release-asset to upload release asset
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
ARCH: ["arm64", "x86_64"]
|
||||
|
||||
env:
|
||||
RELEASE_NAME: raylib-dev_android_api29_${{ matrix.ARCH }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Setup Release Version
|
||||
run: |
|
||||
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_android_api29_${{ matrix.ARCH }}" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
|
||||
- name: Setup Android NDK
|
||||
id: setup-ndk
|
||||
uses: nttld/setup-ndk@v1
|
||||
with:
|
||||
ndk-version: r25
|
||||
add-to-path: false
|
||||
env:
|
||||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||
|
||||
- name: Setup Environment
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
mkdir ${{ env.RELEASE_NAME }}
|
||||
cd ${{ env.RELEASE_NAME }}
|
||||
mkdir include
|
||||
mkdir lib
|
||||
cd ../..
|
||||
|
||||
# Generating static + shared library for 64bit arquitectures and API version 29
|
||||
- name: Build Library
|
||||
run: |
|
||||
cd src
|
||||
make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=${{ matrix.ARCH }} ANDROID_API_VERSION=29 ANDROID_NDK=${{ env.ANDROID_NDK_HOME }} RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
|
||||
make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=${{ matrix.ARCH }} ANDROID_API_VERSION=29 ANDROID_NDK=${{ env.ANDROID_NDK_HOME }} RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||
cd ..
|
||||
shell: cmd
|
||||
|
||||
- name: Generate Artifacts
|
||||
run: |
|
||||
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
|
||||
cp -v ./src/raymath.h ./build/${{ env.RELEASE_NAME }}/include
|
||||
cp -v ./src/rlgl.h ./build/${{ env.RELEASE_NAME }}/include
|
||||
cp -v ./CHANGELOG ./build/${{ env.RELEASE_NAME }}/CHANGELOG
|
||||
cp -v ./README.md ./build/${{ env.RELEASE_NAME }}/README.md
|
||||
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
|
||||
cd build
|
||||
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ env.RELEASE_NAME }}.tar.gz
|
||||
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||
|
||||
- name: Upload Artifact to Release
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||
asset_name: ${{ env.RELEASE_NAME }}.tar.gz
|
||||
asset_content_type: application/gzip
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
|
111
.github/workflows/cmake.yml
vendored
|
@ -1,111 +0,0 @@
|
|||
name: CMakeBuilds
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- '.github/workflows/cmake.yml'
|
||||
- 'CMakeList.txt'
|
||||
- 'CMakeOptions.txt'
|
||||
- 'cmake/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- '.github/workflows/cmake.yml'
|
||||
- 'CMakeList.txt'
|
||||
- 'CMakeOptions.txt'
|
||||
- 'cmake/**'
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: Release
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build_windows:
|
||||
name: Windows Build
|
||||
# The CMake configure and build commands are platform agnostic and should work equally
|
||||
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||
# cross-platform coverage.
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Create Build Environment
|
||||
# Some projects don't allow in-source building, so create a separate build directory
|
||||
# We'll use this as our working directory for all subsequent commands
|
||||
run: cmake -E make_directory ${{github.workspace}}/build
|
||||
|
||||
- name: Configure CMake
|
||||
# Use a bash shell so we can use the same syntax for environment variable
|
||||
# access regardless of the host operating system
|
||||
shell: powershell
|
||||
working-directory: ${{github.workspace}}/build
|
||||
# Note the current convention is to use the -S and -B options here to specify source
|
||||
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||
run: cmake $env:GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$env:BUILD_TYPE -DPLATFORM=Desktop
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: powershell
|
||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||
run: cmake --build . --config $env:BUILD_TYPE
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: powershell
|
||||
# Execute tests defined by the CMake configuration.
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: ctest -C $env:BUILD_TYPE
|
||||
|
||||
build_linux:
|
||||
name: Linux Build
|
||||
# The CMake configure and build commands are platform agnostic and should work equally
|
||||
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||
# cross-platform coverage.
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Create Build Environment
|
||||
# Some projects don't allow in-source building, so create a separate build directory
|
||||
# We'll use this as our working directory for all subsequent commands
|
||||
run: cmake -E make_directory ${{github.workspace}}/build
|
||||
|
||||
- name: Setup Environment
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install gcc-multilib
|
||||
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
|
||||
- name: Configure CMake
|
||||
# Use a bash shell so we can use the same syntax for environment variable
|
||||
# access regardless of the host operating system
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
# Note the current convention is to use the -S and -B options here to specify source
|
||||
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPLATFORM=Desktop
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||
run: cmake --build . --config $BUILD_TYPE
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
# Execute tests defined by the CMake configuration.
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: ctest -C $BUILD_TYPE
|
111
.github/workflows/linux.yml
vendored
|
@ -1,111 +0,0 @@
|
|||
name: Linux
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- '.github/workflows/linux.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- '.github/workflows/linux.yml'
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
permissions:
|
||||
contents: write # for actions/upload-release-asset to upload release asset
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
bits: [32, 64]
|
||||
include:
|
||||
- bits: 32
|
||||
ARCH: "i386"
|
||||
ARCH_NAME: "i386"
|
||||
COMPILER_PATH: "/user/bin"
|
||||
- bits: 64
|
||||
ARCH: "x86_64"
|
||||
ARCH_NAME: "amd64"
|
||||
COMPILER_PATH: "/user/bin"
|
||||
|
||||
env:
|
||||
RELEASE_NAME: raylib-dev_linux_${{ matrix.ARCH_NAME }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Setup Release Version
|
||||
run: |
|
||||
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_linux_${{ matrix.ARCH_NAME }}" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
|
||||
- name: Setup Environment
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install gcc-multilib
|
||||
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
|
||||
mkdir build
|
||||
cd build
|
||||
mkdir ${{ env.RELEASE_NAME }}
|
||||
cd ${{ env.RELEASE_NAME }}
|
||||
mkdir include
|
||||
mkdir lib
|
||||
cd ../../../raylib
|
||||
# ${{ matrix.ARCH }}-linux-gnu-gcc -v
|
||||
|
||||
# TODO: Support 32bit (i386) static/shared library building
|
||||
- name: Build Library
|
||||
run: |
|
||||
cd src
|
||||
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CUSTOM_CFLAGS="-m32" -B
|
||||
# make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||
cd ..
|
||||
if: matrix.bits == 32
|
||||
|
||||
- name: Build Library
|
||||
run: |
|
||||
cd src
|
||||
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||
cd ..
|
||||
if: matrix.bits == 64
|
||||
|
||||
- name: Generate Artifacts
|
||||
run: |
|
||||
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
|
||||
cp -v ./src/raymath.h ./build/${{ env.RELEASE_NAME }}/include
|
||||
cp -v ./src/rlgl.h ./build/${{ env.RELEASE_NAME }}/include
|
||||
cp -v ./CHANGELOG ./build/${{ env.RELEASE_NAME }}/CHANGELOG
|
||||
cp -v ./README.md ./build/${{ env.RELEASE_NAME }}/README.md
|
||||
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
|
||||
cd build
|
||||
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ env.RELEASE_NAME }}.tar.gz
|
||||
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||
|
||||
- name: Upload Artifact to Release
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||
asset_name: ${{ env.RELEASE_NAME }}.tar.gz
|
||||
asset_content_type: application/gzip
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
42
.github/workflows/linux_examples.yml
vendored
|
@ -1,42 +0,0 @@
|
|||
name: Linux Examples
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- '.github/workflows/linux_examples.yml'
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- '.github/workflows/linux_examples.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Environment
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
|
||||
|
||||
- name: Build Library
|
||||
run: |
|
||||
cd src
|
||||
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC
|
||||
cd ..
|
||||
|
||||
- name: Build Examples
|
||||
run: |
|
||||
cd examples
|
||||
make PLATFORM=PLATFORM_DESKTOP -B
|
||||
cd ..
|
116
.github/workflows/macos.yml
vendored
|
@ -1,116 +0,0 @@
|
|||
name: macOS
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- '.github/workflows/macos.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- '.github/workflows/macos.yml'
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
permissions:
|
||||
contents: write # for actions/upload-release-asset to upload release asset
|
||||
runs-on: macos-latest
|
||||
|
||||
env:
|
||||
RELEASE_NAME: raylib-dev_macos
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Setup Release Version
|
||||
run: |
|
||||
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_macos" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
|
||||
- name: Setup Environment
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
mkdir ${{ env.RELEASE_NAME }}
|
||||
cd ${{ env.RELEASE_NAME }}
|
||||
mkdir include
|
||||
mkdir lib
|
||||
cd ../..
|
||||
|
||||
# Generating static + shared library, note that i386 architecture is deprecated
|
||||
# Defining GL_SILENCE_DEPRECATION because OpenGL is deprecated on macOS
|
||||
- name: Build Library
|
||||
run: |
|
||||
cd src
|
||||
clang --version
|
||||
|
||||
# Extract version numbers from Makefile
|
||||
brew install grep
|
||||
RAYLIB_API_VERSION=`ggrep -Po 'RAYLIB_API_VERSION\s*=\s\K(.*)' Makefile`
|
||||
RAYLIB_VERSION=`ggrep -Po 'RAYLIB_VERSION\s*=\s\K(.*)' Makefile`
|
||||
|
||||
# Build raylib x86_64 static
|
||||
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC CUSTOM_CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION"
|
||||
mv libraylib.a /tmp/libraylib_x86_64.a
|
||||
make clean
|
||||
|
||||
# Build raylib arm64 static
|
||||
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC CUSTOM_CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" -B
|
||||
mv libraylib.a /tmp/libraylib_arm64.a
|
||||
make clean
|
||||
|
||||
# Join x86_64 and arm64 static
|
||||
lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.a /tmp/libraylib_x86_64.a /tmp/libraylib_arm64.a
|
||||
|
||||
# Build raylib x86_64 dynamic
|
||||
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED CUSTOM_CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" CUSTOM_LDFLAGS="-target x86_64-apple-macos10.12" -B
|
||||
mv libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_x86_64.${RAYLIB_VERSION}.dylib
|
||||
make clean
|
||||
|
||||
# Build raylib arm64 dynamic
|
||||
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED CUSTOM_CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" CUSTOM_LDFLAGS="-target arm64-apple-macos11" -B
|
||||
mv libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_arm64.${RAYLIB_VERSION}.dylib
|
||||
|
||||
# Join x86_64 and arm64 dynamic
|
||||
lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_x86_64.${RAYLIB_VERSION}.dylib /tmp/libraylib_arm64.${RAYLIB_VERSION}.dylib
|
||||
ln -sv libraylib.${RAYLIB_VERSION}.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.dylib
|
||||
ln -sv libraylib.${RAYLIB_VERSION}.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.${RAYLIB_API_VERSION}.dylib
|
||||
cd ..
|
||||
|
||||
- name: Generate Artifacts
|
||||
run: |
|
||||
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
|
||||
cp -v ./src/raymath.h ./build/${{ env.RELEASE_NAME }}/include
|
||||
cp -v ./src/rlgl.h ./build/${{ env.RELEASE_NAME }}/include
|
||||
cp -v ./CHANGELOG ./build/${{ env.RELEASE_NAME }}/CHANGELOG
|
||||
cp -v ./README.md ./build/${{ env.RELEASE_NAME }}/README.md
|
||||
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
|
||||
cd build
|
||||
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ env.RELEASE_NAME }}.tar.gz
|
||||
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||
|
||||
- name: Upload Artifact to Release
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||
asset_name: ${{ env.RELEASE_NAME }}.tar.gz
|
||||
asset_content_type: application/gzip
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
86
.github/workflows/webassembly.yml
vendored
|
@ -1,86 +0,0 @@
|
|||
name: WebAssembly
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- '.github/workflows/webassembly.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- '.github/workflows/webassembly.yml'
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
env:
|
||||
RELEASE_NAME: raylib-dev_webassembly
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Setup emsdk
|
||||
uses: mymindstorm/setup-emsdk@v11
|
||||
with:
|
||||
version: 3.0.0
|
||||
actions-cache-folder: 'emsdk-cache'
|
||||
|
||||
- name: Setup Release Version
|
||||
run: |
|
||||
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_webassembly" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
|
||||
- name: Setup Environment
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
mkdir ${{ env.RELEASE_NAME }}
|
||||
cd ${{ env.RELEASE_NAME }}
|
||||
mkdir include
|
||||
mkdir lib
|
||||
cd ../..
|
||||
|
||||
- name: Build Library
|
||||
run: |
|
||||
cd src
|
||||
emcc -v
|
||||
make PLATFORM=PLATFORM_WEB EMSDK_PATH="D:/a/raylib/raylib/emsdk-cache/emsdk-main" RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||
cd ..
|
||||
|
||||
- name: Generate Artifacts
|
||||
run: |
|
||||
copy /Y .\src\raylib.h .\build\${{ env.RELEASE_NAME }}\include\raylib.h
|
||||
copy /Y .\src\raymath.h .\build\${{ env.RELEASE_NAME }}\include\raymath.h
|
||||
copy /Y .\src\rlgl.h .\build\${{ env.RELEASE_NAME }}\include\rlgl.h
|
||||
copy /Y .\CHANGELOG .\build/${{ env.RELEASE_NAME }}\CHANGELOG
|
||||
copy /Y .\README.md .\build\${{ env.RELEASE_NAME }}\README.md
|
||||
copy /Y .\LICENSE .\build\${{ env.RELEASE_NAME }}\LICENSE
|
||||
cd build
|
||||
7z a ./${{ env.RELEASE_NAME }}.zip ./${{ env.RELEASE_NAME }}
|
||||
dir
|
||||
shell: cmd
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ env.RELEASE_NAME }}.zip
|
||||
path: ./build/${{ env.RELEASE_NAME }}.zip
|
||||
|
||||
- name: Upload Artifact to Release
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./build/${{ env.RELEASE_NAME }}.zip
|
||||
asset_name: ${{ env.RELEASE_NAME }}.zip
|
||||
asset_content_type: application/zip
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
135
.github/workflows/windows.yml
vendored
|
@ -1,135 +0,0 @@
|
|||
name: Windows
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- '.github/workflows/windows.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- '.github/workflows/windows.yml'
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
permissions:
|
||||
contents: write # for actions/upload-release-asset to upload release asset
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
compiler: [mingw-w64, msvc16]
|
||||
bits: [32, 64]
|
||||
include:
|
||||
- compiler: mingw-w64
|
||||
bits: 32
|
||||
ARCH: "i686"
|
||||
COMPILER_PATH: "C:\\msys64\\mingw32\\bin"
|
||||
WINDRES_ARCH: pe-i386
|
||||
- compiler: mingw-w64
|
||||
bits: 64
|
||||
ARCH: "x86_64"
|
||||
COMPILER_PATH: "C:\\msys64\\mingw64\\bin"
|
||||
WINDRES_ARCH: pe-x86-64
|
||||
- compiler: msvc16
|
||||
bits: 32
|
||||
ARCH: "x86"
|
||||
VSARCHPATH: "Win32"
|
||||
- compiler: msvc16
|
||||
bits: 64
|
||||
ARCH: "x64"
|
||||
VSARCHPATH: "x64"
|
||||
|
||||
env:
|
||||
RELEASE_NAME: raylib-dev_win${{ matrix.bits }}_${{ matrix.compiler }}
|
||||
GNUTARGET: default
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Setup Release Version
|
||||
run: |
|
||||
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_win${{ matrix.bits }}_${{ matrix.compiler }}" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
|
||||
- name: Setup Environment
|
||||
run: |
|
||||
dir
|
||||
mkdir build
|
||||
cd build
|
||||
mkdir ${{ env.RELEASE_NAME }}
|
||||
cd ${{ env.RELEASE_NAME }}
|
||||
mkdir include
|
||||
mkdir lib
|
||||
cd ../../../raylib
|
||||
|
||||
# Setup MSBuild.exe path if required
|
||||
- name: Setup MSBuild
|
||||
uses: microsoft/setup-msbuild@v1.0.2
|
||||
if: matrix.compiler == 'msvc16'
|
||||
|
||||
- name: Build Library (MinGW-w64)
|
||||
run: |
|
||||
cd src
|
||||
set PATH=%PATH%;${{ matrix.COMPILER_PATH }}
|
||||
${{ matrix.ARCH }}-w64-mingw32-gcc.exe --version
|
||||
${{ matrix.COMPILER_PATH }}/windres.exe --version
|
||||
make PLATFORM=PLATFORM_DESKTOP CC=${{ matrix.ARCH }}-w64-mingw32-gcc.exe RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
|
||||
${{ matrix.COMPILER_PATH }}/windres.exe -i raylib.dll.rc -o raylib.dll.rc.data -O coff --target=${{ matrix.WINDRES_ARCH }}
|
||||
make PLATFORM=PLATFORM_DESKTOP CC=${{ matrix.ARCH }}-w64-mingw32-gcc.exe RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||
cd ..
|
||||
shell: cmd
|
||||
if: matrix.compiler == 'mingw-w64'
|
||||
|
||||
- name: Build Library (MSVC16)
|
||||
run: |
|
||||
cd projects/VS2022
|
||||
msbuild.exe raylib.sln /target:raylib /property:Configuration=Release /property:Platform=${{ matrix.ARCH }}
|
||||
copy /Y .\build\raylib\bin\${{ matrix.VSARCHPATH }}\Release\raylib.lib .\..\..\build\${{ env.RELEASE_NAME }}\lib\raylib.lib
|
||||
msbuild.exe raylib.sln /target:raylib /property:Configuration=Release.DLL /property:Platform=${{ matrix.ARCH }}
|
||||
copy /Y .\build\raylib\bin\${{ matrix.VSARCHPATH }}\Release.DLL\raylib.dll .\..\..\build\${{ env.RELEASE_NAME }}\lib\raylib.dll
|
||||
copy /Y .\build\raylib\bin\${{ matrix.VSARCHPATH }}\Release.DLL\raylib.lib .\..\..\build\${{ env.RELEASE_NAME }}\lib\raylibdll.lib
|
||||
cd ../..
|
||||
shell: cmd
|
||||
if: matrix.compiler == 'msvc16'
|
||||
|
||||
- name: Generate Artifacts
|
||||
run: |
|
||||
copy /Y .\src\raylib.h .\build\${{ env.RELEASE_NAME }}\include\raylib.h
|
||||
copy /Y .\src\raymath.h .\build\${{ env.RELEASE_NAME }}\include\raymath.h
|
||||
copy /Y .\src\rlgl.h .\build\${{ env.RELEASE_NAME }}\include\rlgl.h
|
||||
copy /Y .\CHANGELOG .\build\${{ env.RELEASE_NAME }}\CHANGELOG
|
||||
copy /Y .\README.md .\build\${{ env.RELEASE_NAME }}\README.md
|
||||
copy /Y .\LICENSE .\build\${{ env.RELEASE_NAME }}\LICENSE
|
||||
cd build
|
||||
7z a ./${{ env.RELEASE_NAME }}.zip ./${{ env.RELEASE_NAME }}
|
||||
dir
|
||||
shell: cmd
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ env.RELEASE_NAME }}.zip
|
||||
path: ./build/${{ env.RELEASE_NAME }}.zip
|
||||
|
||||
- name: Upload Artifact to Release
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./build/${{ env.RELEASE_NAME }}.zip
|
||||
asset_name: ${{ env.RELEASE_NAME }}.zip
|
||||
asset_content_type: application/zip
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
36
.github/workflows/windows_examples.yml
vendored
|
@ -1,36 +0,0 @@
|
|||
name: Windows Examples
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- '.github/workflows/windows_examples.yml'
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- '.github/workflows/windows_examples.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Add MSBuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: Build Library (MSVC16)
|
||||
run: |
|
||||
cd projects/VS2019
|
||||
msbuild.exe raylib.sln /property:Configuration=Release /property:Platform=x86
|
||||
cd ../..
|
||||
shell: cmd
|
||||
|
9
.gitignore
vendored
|
@ -54,6 +54,10 @@ packages/
|
|||
*.bc
|
||||
*.so
|
||||
*.so.*
|
||||
*.dll
|
||||
|
||||
# Emscripten
|
||||
emsdk
|
||||
|
||||
# Ignore wasm data in examples/
|
||||
examples/**/*.wasm
|
||||
|
@ -75,6 +79,9 @@ xcschememanagement.plist
|
|||
xcuserdata/
|
||||
DerivedData/
|
||||
|
||||
# VSCode project
|
||||
.vscode
|
||||
|
||||
# Jetbrains project
|
||||
.idea/
|
||||
cmake-build-*/
|
||||
|
@ -85,6 +92,7 @@ CMakeFiles
|
|||
CMakeScripts
|
||||
Testing
|
||||
cmake_install.cmake
|
||||
cmake_uninstall.cmake
|
||||
install_manifest.txt
|
||||
compile_commands.json
|
||||
CTestTestfile.cmake
|
||||
|
@ -96,6 +104,7 @@ GRTAGS
|
|||
GTAGS
|
||||
|
||||
# Zig programming language
|
||||
.zig-cache/
|
||||
zig-cache/
|
||||
zig-out/
|
||||
build/
|
||||
|
|
275
BINDINGS.md
|
@ -1,137 +1,164 @@
|
|||
# raylib bindings and wrappers
|
||||
|
||||
Some people ported raylib to other languages in form of bindings or wrappers to the library. Here is a list with all the ports available. Feel free to send a PR if you know of any binding/wrapper not in this list.
|
||||
Some people ported raylib to other languages in the form of bindings or wrappers to the library. Here is a list with all the ports available. Feel free to send a PR if you know of any binding/wrapper not in this list.
|
||||
|
||||
### Language Bindings
|
||||
|
||||
| name | raylib version | language | license | repo |
|
||||
|:------------------:|:---------------:|:---------:|:----------:|-----------------------------------------------------------|
|
||||
| raylib | **4.0** | [C/C++](https://en.wikipedia.org/wiki/C_(programming_language)) | Zlib | https://github.com/raysan5/raylib |
|
||||
| raylib-boo | 3.7 | [Boo](http://boo-language.github.io/)| MIT | https://github.com/Rabios/raylib-boo |
|
||||
| Raylib-cs | **4.0** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | Zlib | https://github.com/ChrisDill/Raylib-cs |
|
||||
| Raylib-CsLo | **4.0** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MPL-2.0 | https://github.com/NotNotTech/Raylib-CsLo |
|
||||
| cl-raylib | **4.0** | [Common Lisp](https://common-lisp.net/) | MIT | https://github.com/longlene/cl-raylib |
|
||||
| raylib-cr | **4.0** | [Crystal](https://crystal-lang.org/) | Apache-2.0 | https://github.com/sol-vin/raylib-cr |
|
||||
| dart-raylib | **4.0** | [Dart](https://dart.dev/) | MIT | https://gitlab.com/wolfenrain/dart-raylib |
|
||||
| bindbc-raylib3 | **4.0** | [D](https://dlang.org/) | BSL-1.0 | https://github.com/o3o/bindbc-raylib3 |
|
||||
| dray | **4.0** | [D](https://dlang.org/) | Apache-2.0 | https://github.com/xdrie/dray |
|
||||
| raylib-d | **4.0** | [D](https://dlang.org/) | Zlib | https://github.com/schveiguy/raylib-d |
|
||||
| dlang_raylib | **4.0** | [D](https://dlang.org) | MPL-2.0 |https://github.com/rc-05/dlang_raylib |
|
||||
| rayex | 3.7 | [elixir](https://elixir-lang.org/) | Apache-2.0 | https://github.com/shiryel/rayex |
|
||||
| raylib-factor | **4.0** | [Factor](https://factorcode.org/) | BSD | https://github.com/factor/factor/blob/master/extra/raylib/raylib.factor |
|
||||
| raylib-freebasic | **4.0** | [FreeBASIC](https://www.freebasic.net/) | MIT | https://github.com/WIITD/raylib-freebasic |
|
||||
| raylib-go | **4.0** | [Go](https://golang.org/) | Zlib | https://github.com/gen2brain/raylib-go |
|
||||
| raylib-guile | auto | [Guile](https://www.gnu.org/software/guile/) | Zlib | https://github.com/petelliott/raylib-guile |
|
||||
| gforth-raylib | 3.5 | [Gforth](https://gforth.org/) | MIT | https://github.com/ArnautDaniel/gforth-raylib |
|
||||
| raylib-hx | 4.0 | [Haxe](https://haxe.org/) | Zlib | https://github.com/foreignsasquatch/raylib-hx |
|
||||
| hb-raylib | 3.5 | [Harbour](https://harbour.github.io) | MIT | https://github.com/MarcosLeonardoMendezGerencir/hb-raylib |
|
||||
| jaylib | **4.2** | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | GPLv3+CE | https://github.com/electronstudio/jaylib/ |
|
||||
| raylib-j | **4.0** | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | Zlib | https://github.com/CreedVI/Raylib-J |
|
||||
| raylib.jl | **4.0** | [Julia](https://julialang.org/) | Zlib | https://github.com/irishgreencitrus/raylib.jl |
|
||||
| kaylib | 3.7 | [Kotlin/native](https://kotlinlang.org) | ? | https://github.com/electronstudio/kaylib |
|
||||
| raylib-lua | **4.0** | [Lua](http://www.lua.org/) | ISC | https://github.com/TSnake41/raylib-lua |
|
||||
| raylua | **4.0** | [Lua](http://www.lua.org/) | MIT | https://github.com/Rabios/raylua |
|
||||
| nelua-raylib | 4.0 | [nelua](https://nelua.io/) | MIT | https://github.com/AKDev21/nelua-raylib |
|
||||
| NimraylibNow! | 4.0 | [Nim](https://nim-lang.org/) | MIT | https://github.com/greenfork/nimraylib_now |
|
||||
| raylib-Forever | auto | [Nim](https://nim-lang.org/) | ? | https://github.com/Guevara-chan/Raylib-Forever |
|
||||
| naylib | auto | [Nim](https://nim-lang.org/) | MIT | https://github.com/planetis-m/naylib |
|
||||
| node-raylib | **4.0** | [Node.js](https://nodejs.org/en/) | Zlib | https://github.com/RobLoach/node-raylib |
|
||||
| raylib_odin_bindings | 4.0-dev | [Odin](https://odin-lang.org/) | MIT | https://github.com/Deathbat2190/raylib_odin_bindings |
|
||||
| raylib-odin | **4.0** | [Odin](https://odin-lang.org/) | BSD-3Clause | https://github.com/odin-lang/Odin/tree/master/vendor/raylib |
|
||||
| raylib-ocaml | **4.0** | [OCaml](https://ocaml.org/) | MIT | https://github.com/tjammer/raylib-ocaml |
|
||||
| Ray4Laz | **4.2** | [Pascal](https://en.wikipedia.org/wiki/Pascal_(programming_language))| Zlib | https://github.com/GuvaCode/Ray4Laz |
|
||||
| Raylib.4.0.Pascal | **4.0** | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal)| Zlib | https://github.com/sysrpl/Raylib.4.0.Pascal |
|
||||
| pyraylib | 3.7 | [Python](https://www.python.org/) | Zlib | https://github.com/Ho011/pyraylib |
|
||||
| raylib-python-cffi | **4.2** | [Python](https://www.python.org/) | EPL-2.0 | https://github.com/electronstudio/raylib-python-cffi |
|
||||
| raylib-php | 3.5 | [PHP](https://en.wikipedia.org/wiki/PHP) | Zlib | https://github.com/joseph-montanez/raylib-php |
|
||||
| raylib-phpcpp | 3.5 | [PHP](https://en.wikipedia.org/wiki/PHP) | Zlib | https://github.com/oraoto/raylib-phpcpp |
|
||||
| raylibr | **4.0** | [R](https://www.r-project.org) | MIT | https://github.com/jeroenjanssens/raylibr |
|
||||
| raylib-rs | 3.5 | [Rust](https://www.rust-lang.org/) | Zlib | https://github.com/deltaphc/raylib-rs |
|
||||
| Relib | 3.5 | [ReCT](https://github.com/RedCubeDev-ByteSpace/ReCT) | ? | https://github.com/RedCubeDev-ByteSpace/Relib |
|
||||
| racket-raylib | **4.0** | [Racket](https://racket-lang.org/) | MIT/Apache-2.0 | https://github.com/eutro/racket-raylib |
|
||||
| raylib-swift | **4.0** | [Swift](https://swift.org/) | MIT | https://github.com/STREGAsGate/Raylib |
|
||||
| raylib-scopes | auto | [Scopes](http://scopes.rocks) | MIT | https://github.com/salotz/raylib-scopes |
|
||||
| raylib-smallBasic | 4.1-dev | [SmallBASIC](https://github.com/smallbasic/SmallBASIC) | GPLv3 | https://github.com/smallbasic/smallbasic.plugins/tree/master/raylib |
|
||||
| raylib.v | **4.0** | [V](https://vlang.io/) | Zlib | https://github.com/irishgreencitrus/raylib.v |
|
||||
| raylib-wren | **4.0** | [Wren](http://wren.io/) | ISC | https://github.com/TSnake41/raylib-wren |
|
||||
| raylib-zig | **4.0** | [Zig](https://ziglang.org/) | MIT | https://github.com/Not-Nik/raylib-zig |
|
||||
| raylib.zig | **4.1-dev** | [Zig](https://ziglang.org/) | MIT | https://github.com/ryupold/raylib.zig |
|
||||
| hare-raylib | auto | [Hare](https://harelang.org/) | Zlib | https://git.sr.ht/~evantj/hare-raylib |
|
||||
|
||||
|
||||
| Name | raylib Version | Language | License |
|
||||
| :--------------------------------------------------------------------------------------- | :--------------: | :------------------------------------------------------------------: | :------------------: |
|
||||
| [raylib](https://github.com/raysan5/raylib) | **5.0** | [C/C++](https://en.wikipedia.org/wiki/C_(programming_language)) | Zlib |
|
||||
| [raylib-beef](https://github.com/Starpelly/raylib-beef) | **5.0** | [Beef](https://www.beeflang.org) | MIT |
|
||||
| [raylib-boo](https://github.com/Rabios/raylib-boo) | 3.7 | [Boo](http://boo-language.github.io) | MIT |
|
||||
| [raybit](https://github.com/Alex-Velez/raybit) | **5.0** | [Brainfuck](https://en.wikipedia.org/wiki/Brainfuck) | MIT |
|
||||
| [Raylib-cs](https://github.com/ChrisDill/Raylib-cs) | **5.0** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | Zlib |
|
||||
| [Raylib-CsLo](https://github.com/NotNotTech/Raylib-CsLo) | 4.2 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MPL-2.0 |
|
||||
| [Raylib-CSharp-Vinculum](https://github.com/ZeroElectric/Raylib-CSharp-Vinculum) | **5.0** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MPL-2.0 |
|
||||
| [Raylib-CSharp](https://github.com/MrScautHD/Raylib-CSharp) | **5.1-dev** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MIT |
|
||||
| [cl-raylib](https://github.com/longlene/cl-raylib) | 4.0 | [Common Lisp](https://common-lisp.net) | MIT |
|
||||
| [claylib/wrap](https://github.com/defun-games/claylib) | 4.5 | [Common Lisp](https://common-lisp.net) | Zlib |
|
||||
| [claw-raylib](https://github.com/bohonghuang/claw-raylib) | **auto** | [Common Lisp](https://common-lisp.net) | Apache-2.0 |
|
||||
| [chez-raylib](https://github.com/Yunoinsky/chez-raylib) | **auto** | [Chez Scheme](https://cisco.github.io/ChezScheme) | GPLv3 |
|
||||
| [raylib-cr](https://github.com/sol-vin/raylib-cr) | 4.6-dev (5e1a81) | [Crystal](https://crystal-lang.org) | Apache-2.0 |
|
||||
| [ray-cyber](https://github.com/fubark/ray-cyber) | **5.0** | [Cyber](https://cyberscript.dev) | MIT |
|
||||
| [dart-raylib](https://gitlab.com/wolfenrain/dart-raylib) | 4.0 | [Dart](https://dart.dev) | MIT |
|
||||
| [bindbc-raylib3](https://github.com/o3o/bindbc-raylib3) | **5.0** | [D](https://dlang.org) | BSL-1.0 |
|
||||
| [dray](https://github.com/redthing1/dray) | **5.0** | [D](https://dlang.org) | Apache-2.0 |
|
||||
| [raylib-d](https://github.com/schveiguy/raylib-d) | **5.0** | [D](https://dlang.org) | Zlib |
|
||||
| [rayex](https://github.com/shiryel/rayex) | 3.7 | [elixir](https://elixir-lang.org) | Apache-2.0 |
|
||||
| [raylib-factor](https://github.com/factor/factor/blob/master/extra/raylib/raylib.factor) | 4.5 | [Factor](https://factorcode.org) | BSD |
|
||||
| [raylib-freebasic](https://github.com/WIITD/raylib-freebasic) | **5.0** | [FreeBASIC](https://www.freebasic.net) | MIT |
|
||||
| [fortran-raylib](https://github.com/interkosmos/fortran-raylib) | 4.5 | [Fortran](https://fortran-lang.org) | ISC |
|
||||
| [raylib-go](https://github.com/gen2brain/raylib-go) | **5.0** | [Go](https://golang.org) | Zlib |
|
||||
| [raylib-guile](https://github.com/petelliott/raylib-guile) | **auto** | [Guile](https://www.gnu.org/software/guile) | Zlib |
|
||||
| [gforth-raylib](https://github.com/ArnautDaniel/gforth-raylib) | 3.5 | [Gforth](https://gforth.org) | **???** |
|
||||
| [h-raylib](https://github.com/Anut-py/h-raylib) | **5.5-dev** | [Haskell](https://haskell.org) | Apache-2.0 |
|
||||
| [raylib-hx](https://github.com/foreignsasquatch/raylib-hx) | 4.2 | [Haxe](https://haxe.org) | Zlib |
|
||||
| [hb-raylib](https://github.com/MarcosLeonardoMendezGerencir/hb-raylib) | 3.5 | [Harbour](https://harbour.github.io) | MIT |
|
||||
| [jaylib](https://github.com/janet-lang/jaylib) | **5.0** | [Janet](https://janet-lang.org) | MIT |
|
||||
| [jaylib](https://github.com/electronstudio/jaylib/) | 4.5 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | GPLv3+CE |
|
||||
| [raylib-j](https://github.com/CreedVI/Raylib-J) | 4.0 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | Zlib |
|
||||
| [Raylib.jl](https://github.com/chengchingwen/Raylib.jl) | 4.2 | [Julia](https://julialang.org) | Zlib |
|
||||
| [kaylib](https://github.com/electronstudio/kaylib) | 3.7 | [Kotlin/native](https://kotlinlang.org) | **???** |
|
||||
| [KaylibKit](https://codeberg.org/Kenta/KaylibKit) | 4.5 | [Kotlin/native](https://kotlinlang.org) | Zlib |
|
||||
| [raylib-lua](https://github.com/TSnake41/raylib-lua) | 4.5 | [Lua](http://www.lua.org) | ISC |
|
||||
| [raylua](https://github.com/Rabios/raylua) | 4.0 | [Lua](http://www.lua.org) | MIT |
|
||||
| [raylib-matte](https://github.com/jcorks/raylib-matte) | 4.6-dev | [Matte](https://github.com/jcorks/matte) | MIT |
|
||||
| [Raylib.nelua](https://github.com/AuzFox/Raylib.nelua) | **5.0** | [nelua](https://nelua.io) | Zlib |
|
||||
| [raylib-bindings](https://github.com/vaiorabbit/raylib-bindings) | 4.5 | [Ruby](https://www.ruby-lang.org/en) | Zlib |
|
||||
| [naylib](https://github.com/planetis-m/naylib) | **5.1-dev** | [Nim](https://nim-lang.org) | MIT |
|
||||
| [node-raylib](https://github.com/RobLoach/node-raylib) | 4.5 | [Node.js](https://nodejs.org/en) | Zlib |
|
||||
| [raylib-odin](https://github.com/odin-lang/Odin/tree/master/vendor/raylib) | **5.0** | [Odin](https://odin-lang.org) | BSD-3Clause |
|
||||
| [raylib_odin_bindings](https://github.com/Deathbat2190/raylib_odin_bindings) | 4.0-dev | [Odin](https://odin-lang.org) | MIT |
|
||||
| [raylib-ocaml](https://github.com/tjammer/raylib-ocaml) | **5.0** | [OCaml](https://ocaml.org) | MIT |
|
||||
| [TurboRaylib](https://github.com/turborium/TurboRaylib) | 4.5 | [Object Pascal](https://en.wikipedia.org/wiki/Object_Pascal) | MIT |
|
||||
| [Ray4Laz](https://github.com/GuvaCode/Ray4Laz) | **5.0** | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal) | Zlib |
|
||||
| [Raylib.4.0.Pascal](https://github.com/sysrpl/Raylib.4.0.Pascal) | 4.0 | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal) | Zlib |
|
||||
| [pyraylib](https://github.com/Ho011/pyraylib) | 3.7 | [Python](https://www.python.org) | Zlib |
|
||||
| [raylib-python-cffi](https://github.com/electronstudio/raylib-python-cffi) | 4.2 | [Python](https://www.python.org) | EPL-2.0 |
|
||||
| [raylibpyctbg](https://github.com/overdev/raylibpyctbg) | 4.5 | [Python](https://www.python.org) | MIT |
|
||||
| [raylib-py](https://github.com/overdev/raylib-py) | **5.0b1** | [Python](https://www.python.org) | MIT |
|
||||
| [raylib-python-ctypes](https://github.com/sDos280/raylib-python-ctypes) | 4.6-dev | [Python](https://www.python.org) | MIT |
|
||||
| [raylib-pkpy-bindings](https://github.com/blueloveTH/pkpy-bindings) | 4.6-dev | [pocketpy](https://pocketpy.dev) | MIT |
|
||||
| [raylib-php](https://github.com/joseph-montanez/raylib-php) | 4.5 | [PHP](https://en.wikipedia.org/wiki/PHP) | Zlib |
|
||||
| [raylib-phpcpp](https://github.com/oraoto/raylib-phpcpp) | 3.5 | [PHP](https://en.wikipedia.org/wiki/PHP) | Zlib |
|
||||
| [raylibr](https://github.com/jeroenjanssens/raylibr) | 4.0 | [R](https://www.r-project.org) | MIT |
|
||||
| [raylib-ffi](https://github.com/ewpratten/raylib-ffi) | 4.5 | [Rust](https://www.rust-lang.org) | GPLv3 |
|
||||
| [raylib-rs](https://github.com/raylib-rs/raylib-rs) | **5.0** | [Rust](https://www.rust-lang.org) | Zlib |
|
||||
| [Relib](https://github.com/RedCubeDev-ByteSpace/Relib) | 3.5 | [ReCT](https://github.com/RedCubeDev-ByteSpace/ReCT) | **???** |
|
||||
| [racket-raylib](https://github.com/eutro/racket-raylib) | 4.0 | [Racket](https://racket-lang.org) | MIT/Apache-2.0 |
|
||||
| [raylib-swift](https://github.com/STREGAsGate/Raylib) | 4.0 | [Swift](https://swift.org) | MIT |
|
||||
| [raylib-scopes](https://github.com/salotz/raylib-scopes) | auto | [Scopes](http://scopes.rocks) | MIT |
|
||||
| [raylib-SmallBASIC](https://github.com/smallbasic/smallbasic.plugins/tree/master/raylib) | **5.0** | [SmallBASIC](https://github.com/smallbasic/SmallBASIC) | GPLv3 |
|
||||
| [raylib-umka](https://github.com/robloach/raylib-umka) | 4.5 | [Umka](https://github.com/vtereshkov/umka-lang) | Zlib |
|
||||
| [raylib.v](https://github.com/irishgreencitrus/raylib.v) | 4.2 | [V](https://vlang.io) | Zlib |
|
||||
| [raylib-vapi](https://github.com/lxmcf/raylib-vapi) | **5.0** | [Vala](https://vala.dev) | Zlib |
|
||||
| [raylib-wren](https://github.com/TSnake41/raylib-wren) | 4.0 | [Wren](http://wren.io) | ISC |
|
||||
| [raylib-zig](https://github.com/Not-Nik/raylib-zig) | **5.0** | [Zig](https://ziglang.org) | MIT |
|
||||
| [raylib.zig](https://github.com/ryupold/raylib.zig) | **5.1-dev** | [Zig](https://ziglang.org) | MIT |
|
||||
| [raylib-zig-bindings](https://github.com/L-Briand/raylib-zig-bindings) | **5.0** | [Zig](https://ziglang.org) | Zlib |
|
||||
| [hare-raylib](https://git.sr.ht/~evantj/hare-raylib) | **auto** | [Hare](https://harelang.org) | Zlib |
|
||||
| [raylib-sunder](https://github.com/ashn-dot-dev/raylib-sunder) | **auto** | [Sunder](https://github.com/ashn-dot-dev/sunder) | 0BSD |
|
||||
| [raylib-bqn](https://github.com/Brian-ED/raylib-bqn) | **5.0** | [BQN](https://mlochbaum.github.io/BQN) | MIT |
|
||||
| [rayjs](https://github.com/mode777/rayjs) | 4.6-dev | [QuickJS](https://bellard.org/quickjs) | MIT |
|
||||
| [raylib-raku](https://github.com/vushu/raylib-raku) | **auto** | [Raku](https://www.raku.org) | Artistic License 2.0 |
|
||||
| [Raylib.lean](https://github.com/KislyjKisel/Raylib.lean) | **5.5-dev** | [Lean4](https://lean-lang.org) | BSD-3-Clause |
|
||||
| [raylib-cobol](https://codeberg.org/glowiak/raylib-cobol) | **auto** | [COBOL](https://gnucobol.sourceforge.io) | Public domain |
|
||||
| [raylib-apl](https://github.com/Brian-ED/raylib-apl) | **5.0** | [Dyalog APL](https://www.dyalog.com/) | MIT |
|
||||
|
||||
### Utility Wrapers
|
||||
These are utility wrappers for specific languages, they are not required to use raylib in the language but may adapt the raylib API to be more inline with the language's pardigm.
|
||||
| name | raylib version | language | license | repo |
|
||||
|:------------------:|:-------------: | :--------:|:-------:|:-------------------------------------------------------------|
|
||||
| raylib-cpp | **4.0** | [C++](https://en.wikipedia.org/wiki/C%2B%2B) | Zlib | https://github.com/robloach/raylib-cpp |
|
||||
|
||||
These are utility wrappers for specific languages, they are not required to use raylib in the language but may adapt the raylib API to be more inline with the language's paradigm.
|
||||
| Name | raylib Version | Language | License |
|
||||
| ---------------------------------------------------- | :------------: | :------------------------------------------: | :-----: |
|
||||
| [raylib-cpp](https://github.com/robloach/raylib-cpp) | **5.0** | [C++](https://en.wikipedia.org/wiki/C%2B%2B) | Zlib |
|
||||
| [claylib](https://github.com/defun-games/claylib) | 4.5 | [Common Lisp](https://common-lisp.net) | Zlib |
|
||||
| [rayed-bqn](https://github.com/Brian-ED/rayed-bqn) | **5.0** | [BQN](https://mlochbaum.github.io/BQN) | MIT |
|
||||
|
||||
### Older or Unmaintained Language Bindings
|
||||
These are older raylib bindings that are more than 2 versions old or have not been maintained.
|
||||
| name | raylib version | language | repo |
|
||||
|:------------------:|:-------------: | :--------:|----------------------------------------------------------------------|
|
||||
| raylib-cppsharp | 2.5 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | https://github.com/phxvyper/raylib-cppsharp |
|
||||
| RaylibFS | 2.5 | [F#](https://fsharp.org/) | https://github.com/dallinbeutler/RaylibFS |
|
||||
| raylib_d | 2.5 | [D](https://dlang.org/) | https://github.com/Sepheus/raylib_d |
|
||||
| bindbc-raylib | 3.0 | [D](https://dlang.org/) | https://github.com/o3o/bindbc-raylib |
|
||||
| go-raylib | 3.5 | [Go](https://golang.org/) | https://github.com/chunqian/go-raylib |
|
||||
| raylib-goplus | 2.6-dev | [Go](https://golang.org/) | https://github.com/Lachee/raylib-goplus |
|
||||
| ray-go | 2.6-dev | [Go](https://golang.org/) | https://github.com/hecate-tech/ray-go |
|
||||
| raylib-luamore | 3.0 | [Lua](http://www.lua.org/) | https://github.com/HDPLocust/raylib-luamore |
|
||||
| LuaJIT-Raylib | 2.6 | [Lua](http://www.lua.org/) | https://github.com/Bambofy/LuaJIT-Raylib |
|
||||
| raylib-lua-sol | 2.5 | [Lua](http://www.lua.org/) | https://github.com/RobLoach/raylib-lua-sol |
|
||||
| raylib-lua-ffi | 2.0 | [Lua](http://www.lua.org/) | https://github.com/raysan5/raylib/issues/693 |
|
||||
| raylib-lua | 1.7 | [Lua](http://www.lua.org/) | https://github.com/raysan5/raylib-lua |
|
||||
| raylib-nelua | 3.0 | [Nelua](https://nelua.io/) | https://github.com/Andre-LA/raylib-nelua |
|
||||
| raylib-nim | 2.0 | [Nim](https://nim-lang.org/) | https://github.com/Skrylar/raylib-nim |
|
||||
| raylib-Nim | 1.7 | [Nim](https://nim-lang.org/) | https://gitlab.com/define-private-public/raylib-Nim |
|
||||
| nim-raylib | 3.1-dev | [Nim](https://nim-lang.org/) | https://github.com/tomc1998/nim-raylib |
|
||||
| raylib-haskell | 2.0 | [Haskell](https://www.haskell.org/) | https://github.com/DevJac/raylib-haskell |
|
||||
| raylib-cr | 2.5-dev | [Crystal](https://crystal-lang.org/) | https://github.com/AregevDev/raylib-cr |
|
||||
| raylib.cr | 2.0 | [Crystal](https://crystal-lang.org/) | https://github.com/sam0x17/raylib.cr |
|
||||
| cray | 1.8 | [Crystal](https://crystal-lang.org/) | https://gitlab.com/Zatherz/cray |
|
||||
| raylib-pas | 3.0 | [Pascal](https://en.wikipedia.org/wiki/Pascal_(programming_language)) | https://github.com/tazdij/raylib-pas |
|
||||
| raylib-pascal | 2.0 | [Pascal](https://en.wikipedia.org/wiki/Pascal_(programming_language)) | https://github.com/drezgames/raylib-pascal |
|
||||
| Graphics-Raylib | 1.4 | [Perl](https://www.perl.org/) | https://github.com/athreef/Graphics-Raylib |
|
||||
| raylib-ruby | 2.6 | [Ruby](https://www.ruby-lang.org/en/) | https://github.com/a0/raylib-ruby |
|
||||
| raylib-ruby-ffi | 2.0 | [Ruby](https://www.ruby-lang.org/en/) | https://github.com/D3nX/raylib-ruby-ffi |
|
||||
| raylib-mruby | 2.5-dev | [mruby](https://github.com/mruby/mruby) | https://github.com/lihaochen910/raylib-mruby |
|
||||
| raylib-py-ctbg | 2.6 | [Python](https://www.python.org/) | https://github.com/overdev/raylib-py-ctbg |
|
||||
| raylib-py | 2.0 | [Python](https://www.python.org/) | https://github.com/overdev/raylib-py |
|
||||
| raylib-java | 2.0 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | https://github.com/XoanaIO/raylib-java |
|
||||
| clj-raylib | 3.0 | [Clojure](https://clojure.org/) | https://github.com/lsevero/clj-raylib |
|
||||
| QuickJS-raylib | 3.0 | [QuickJS](https://bellard.org/quickjs/) | https://github.com/sntg-p/QuickJS-raylib |
|
||||
| raylib-duktape | 2.6 | [JavaScript (Duktape)](https://en.wikipedia.org/wiki/JavaScript) | https://github.com/RobLoach/raylib-duktape |
|
||||
| raylib-v7 | 3.5 | [JavaScript (v7)](https://en.wikipedia.org/wiki/JavaScript) | https://github.com/Rabios/raylib-v7 |
|
||||
| raylib-chaiscript | 2.6 | [ChaiScript](http://chaiscript.com/) | https://github.com/RobLoach/raylib-chaiscript |
|
||||
| raylib-squirrel | 2.5 | [Squirrel](http://www.squirrel-lang.org/) | https://github.com/RobLoach/raylib-squirrel |
|
||||
| racket-raylib-2d | 2.5 | [Racket](https://racket-lang.org/) | https://github.com/arvyy/racket-raylib-2d |
|
||||
| raylib-php-ffi | 2.4-dev | [PHP](https://en.wikipedia.org/wiki/PHP) | https://github.com/oraoto/raylib-php-ffi |
|
||||
| raylib-haxe | 2.4 | [Haxe](https://haxe.org/) | https://github.com/ibilon/raylib-haxe |
|
||||
| ringraylib | 2.6 | [Ring](http://ring-lang.sourceforge.net/) | https://github.com/ringpackages/ringraylib |
|
||||
| raylib-scm | 2.5 | [Chicken Scheme](https://www.call-cc.org/) | https://github.com/yashrk/raylib-scm |
|
||||
| raylib-chibi | 2.5 | [Chibi-Scheme](https://github.com/ashinn/chibi-scheme) | https://github.com/VincentToups/raylib-chibi |
|
||||
| raylib-gambit-scheme | 3.1-dev | [Gambit Scheme](https://github.com/gambit/gambit) | https://github.com/georgjz/raylib-gambit-scheme |
|
||||
| Euraylib | 3.0 | [Euphoria](https://openeuphoria.org/) | https://github.com/gAndy50/Euraylib |
|
||||
| raylib-odin | 3.0 | [Odin](https://odin-lang.org/) | https://github.com/kevinw/raylib-odin |
|
||||
| vraylib | 3.5 | [V](https://vlang.io/) | https://github.com/waotzi/vraylib |
|
||||
| raylib-vala | 3.0 | [Vala](https://wiki.gnome.org/Projects/Vala) | https://code.guddler.uk/mart/raylibVapi |
|
||||
| raylib-jai | 3.1-dev | [Jai](https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md) | https://github.com/kujukuju/raylib-jai |
|
||||
| ray.zig | 2.5 | [Zig](https://ziglang.org/) | https://github.com/BitPuffin/zig-raylib-experiments |
|
||||
| raylib-Ada | 3.0 | [Ada](https://www.adacore.com/about-ada) | https://github.com/mimo/raylib-Ada |
|
||||
| jaylib | 3.0 | [Janet](https://janet-lang.org/) | https://github.com/janet-lang/jaylib |
|
||||
| raykit | ? | [Kit](https://www.kitlang.org/) | https://github.com/Gamerfiend/raykit |
|
||||
| ray.mod | 3.0 | [BlitzMax](https://blitzmax.org/) | https://github.com/bmx-ng/ray.mod |
|
||||
| raylib-mosaic | 3.0 | [Mosaic](https://github.com/sal55/langs/tree/master/Mosaic) | https://github.com/pluckyporcupine/raylib-mosaic |
|
||||
| raylib-xdpw | 2.6 | [XD Pascal](https://github.com/vtereshkov/xdpw) | https://github.com/vtereshkov/raylib-xdpw |
|
||||
| raylib-carp | 3.0 | [Carp](https://github.com/carp-lang/Carp) | https://github.com/pluckyporcupine/raylib-carp |
|
||||
| raylib-fb | 3.0 | [FreeBasic](https://www.freebasic.net/) | https://github.com/IchMagBier/raylib-fb |
|
||||
| raylib-purebasic | 3.0 | [PureBasic](https://www.purebasic.com/) | https://github.com/D-a-n-i-l-o/raylib-purebasic |
|
||||
| raylib-ats2 | 3.0 | [ATS2](http://www.ats-lang.org/) | https://github.com/mephistopheles-8/raylib-ats2 |
|
||||
| raylib-beef | 3.0 | [Beef](https://www.beeflang.org/) | https://github.com/M0n7y5/raylib-beef |
|
||||
| raylib-never | 3.0 | [Never](https://github.com/never-lang/never) | https://github.com/never-lang/raylib-never |
|
||||
| raylib.cbl | 2.0 | [COBOL](https://en.wikipedia.org/wiki/COBOL) | *[code examples](https://github.com/Martinfx/Cobol/tree/master/OpenCobol/Games/raylib)* |
|
||||
|
||||
These are older raylib bindings that are more than 2 versions old or have not been maintained.
|
||||
| Name | raylib Version | Language |
|
||||
| ---------------------------------------------------------------------------------- | :------------: | :---------------------------------------------------------------------: |
|
||||
| [raylib-cppsharp](https://github.com/phxvyper/raylib-cppsharp) | 2.5 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) |
|
||||
| [RaylibFS](https://github.com/dallinbeutler/RaylibFS) | 2.5 | [F#](https://fsharp.org) |
|
||||
| [raylib\*d](https://github.com/Sepheus/raylib_d) | 2.5 | [D](https://dlang.org) |
|
||||
| [bindbc-raylib](https://github.com/o3o/bindbc-raylib) | 3.0 | [D](https://dlang.org) |
|
||||
| [go-raylib](https://github.com/chunqian/go-raylib) | 3.5 | [Go](https://golang.org) |
|
||||
| [raylib-goplus](https://github.com/Lachee/raylib-goplus) | 2.6-dev | [Go](https://golang.org) |
|
||||
| [ray-go](https://github.com/hecate-tech/ray-go) | 2.6-dev | [Go](https://golang.org) |
|
||||
| [raylib-luamore](https://github.com/HDPLocust/raylib-luamore) | 3.0 | [Lua](http://www.lua.org) |
|
||||
| [LuaJIT-Raylib](https://github.com/Bambofy/LuaJIT-Raylib) | 2.6 | [Lua](http://www.lua.org) |
|
||||
| [raylib-lua-sol](https://github.com/RobLoach/raylib-lua-sol) | 2.5 | [Lua](http://www.lua.org) |
|
||||
| [raylib-lua-ffi](https://github.com/raysan5/raylib/issues/693) | 2.0 | [Lua](http://www.lua.org) |
|
||||
| [raylib-lua](https://github.com/raysan5/raylib-lua) | 1.7 | [Lua](http://www.lua.org) |
|
||||
| [raylib-nelua](https://github.com/Andre-LA/raylib-nelua) | 3.0 | [Nelua](https://nelua.io) |
|
||||
| [raylib-nim](https://github.com/Skrylar/raylib-nim) | 2.0 | [Nim](https://nim-lang.org) |
|
||||
| [raylib-Nim](https://gitlab.com/define-private-public/raylib-Nim) | 1.7 | [Nim](https://nim-lang.org) |
|
||||
| [nim-raylib](https://github.com/tomc1998/nim-raylib) | 3.1-dev | [Nim](https://nim-lang.org) |
|
||||
| [raylib-Forever](https://github.com/Guevara-chan/Raylib-Forever) | auto | [Nim](https://nim-lang.org) |
|
||||
| [NimraylibNow!](https://github.com/greenfork/nimraylib_now) | 4.2 | [Nim](https://nim-lang.org) |
|
||||
| [raylib-haskell](https://github.com/DevJac/raylib-haskell) | 2.0 | [Haskell](https://www.haskell.org) |
|
||||
| [raylib-cr](https://github.com/AregevDev/raylib-cr) | 2.5-dev | [Crystal](https://crystal-lang.org) |
|
||||
| [raylib.cr](https://github.com/sam0x17/raylib.cr) | 2.0 | [Crystal](https://crystal-lang.org) |
|
||||
| [cray](https://gitlab.com/Zatherz/cray) | 1.8 | [Crystal](https://crystal-lang.org) |
|
||||
| [raylib-pas](https://github.com/tazdij/raylib-pas) | 3.0 | [Pascal](https://en.wikipedia.org/wiki/Pascal*(programming*language)) |
|
||||
| [raylib-pascal](https://github.com/drezgames/raylib-pascal) | 2.0 | [Pascal](https://en.wikipedia.org/wiki/Pascal*(programming*language)) |
|
||||
| [Graphics-Raylib](https://github.com/athreef/Graphics-Raylib) | 1.4 | [Perl](https://www.perl.org) |
|
||||
| [raylib-ruby](https://github.com/a0/raylib-ruby) | 2.6 | [Ruby](https://www.ruby-lang.org/en) |
|
||||
| [raylib-ruby-ffi](https://github.com/D3nX/raylib-ruby-ffi) | 2.0 | [Ruby](https://www.ruby-lang.org/en) |
|
||||
| [raylib-mruby](https://github.com/lihaochen910/raylib-mruby) | 2.5-dev | [mruby](https://github.com/mruby/mruby) |
|
||||
| [raylib-java](https://github.com/XoanaIO/raylib-java) | 2.0 | [Java](https://en.wikipedia.org/wiki/Java*(programming_language)) |
|
||||
| [clj-raylib](https://github.com/lsevero/clj-raylib) | 3.0 | [Clojure](https://clojure.org) |
|
||||
| [QuickJS-raylib](https://github.com/sntg-p/QuickJS-raylib) | 3.0 | [QuickJS](https://bellard.org/quickjs) |
|
||||
| [raylib-duktape](https://github.com/RobLoach/raylib-duktape) | 2.6 | [JavaScript (Duktape)](https://en.wikipedia.org/wiki/JavaScript) |
|
||||
| [raylib-v7](https://github.com/Rabios/raylib-v7) | 3.5 | [JavaScript (v7)](https://en.wikipedia.org/wiki/JavaScript) |
|
||||
| [raylib-chaiscript](https://github.com/RobLoach/raylib-chaiscript) | 2.6 | [ChaiScript](http://chaiscript.com) |
|
||||
| [raylib-squirrel](https://github.com/RobLoach/raylib-squirrel) | 2.5 | [Squirrel](http://www.squirrel-lang.org) |
|
||||
| [racket-raylib-2d](https://github.com/arvyy/racket-raylib-2d) | 2.5 | [Racket](https://racket-lang.org) |
|
||||
| [raylib-php-ffi](https://github.com/oraoto/raylib-php-ffi) | 2.4-dev | [PHP](https://en.wikipedia.org/wiki/PHP) |
|
||||
| [raylib-haxe](https://github.com/ibilon/raylib-haxe) | 2.4 | [Haxe](https://haxe.org) |
|
||||
| [ringraylib](https://github.com/ringpackages/ringraylib) | 2.6 | [Ring](http://ring-lang.sourceforge.net) |
|
||||
| [raylib-scm](https://github.com/yashrk/raylib-scm) | 2.5 | [Chicken Scheme](https://www.call-cc.org) |
|
||||
| [raylib-chibi](https://github.com/VincentToups/raylib-chibi) | 2.5 | [Chibi-Scheme](https://github.com/ashinn/chibi-scheme) |
|
||||
| [raylib-gambit-scheme](https://github.com/georgjz/raylib-gambit-scheme) | 3.1-dev | [Gambit Scheme](https://github.com/gambit/gambit) |
|
||||
| [Euraylib](https://github.com/gAndy50/Euraylib) | 3.0 | [Euphoria](https://openeuphoria.org) |
|
||||
| [raylib-odin](https://github.com/kevinw/raylib-odin) | 3.0 | [Odin](https://odin-lang.org) |
|
||||
| [vraylib](https://github.com/waotzi/vraylib) | 3.5 | [V](https://vlang.io) |
|
||||
| [raylib-vala](https://code.guddler.uk/mart/raylibVapi) | 3.0 | [Vala](https://wiki.gnome.org/Projects/Vala) |
|
||||
| [raylib-jai](https://github.com/kujukuju/raylib-jai) | 3.1-dev | [Jai](https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md) |
|
||||
| [ray.zig](https://github.com/BitPuffin/zig-raylib-experiments) | 2.5 | [Zig](https://ziglang.org) |
|
||||
| [raylib-Ada](https://github.com/mimo/raylib-Ada) | 3.0 | [Ada](https://www.adacore.com/about-ada) |
|
||||
| [raykit](https://github.com/Gamerfiend/raykit) | **???** | [Kit](https://www.kitlang.org) |
|
||||
| [ray.mod](https://github.com/bmx-ng/ray.mod) | 3.0 | [BlitzMax](https://blitzmax.org) |
|
||||
| [raylib-mosaic](https://github.com/pluckyporcupine/raylib-mosaic) | 3.0 | [Mosaic](https://github.com/sal55/langs/tree/master/Mosaic) |
|
||||
| [raylib-xdpw](https://github.com/vtereshkov/raylib-xdpw) | 2.6 | [XD Pascal](https://github.com/vtereshkov/xdpw) |
|
||||
| [raylib-carp](https://github.com/sacredbirdman/raylib-carp) | 3.0 | [Carp](https://github.com/carp-lang/Carp) |
|
||||
| [raylib-fb](https://github.com/IchMagBier/raylib-fb) | 3.0 | [FreeBasic](https://www.freebasic.net) |
|
||||
| [raylib-purebasic](https://github.com/D-a-n-i-l-o/raylib-purebasic) | 3.0 | [PureBasic](https://www.purebasic.com) |
|
||||
| [raylib-ats2](https://github.com/mephistopheles-8/raylib-ats2) | 3.0 | [ATS2](http://www.ats-lang.org) |
|
||||
| [raylib-beef](https://github.com/M0n7y5/raylib-beef) | 3.0 | [Beef](https://www.beeflang.org) |
|
||||
| [raylib-never](https://github.com/never-lang/raylib-never) | 3.0 | [Never](https://github.com/never-lang/never) |
|
||||
| [raylib.cbl](https://github.com/Martinfx/Cobol/tree/master/OpenCobol/Games/raylib) | 2.0 | [COBOL](https://en.wikipedia.org/wiki/COBOL) |
|
||||
|
||||
Missing some language or wrapper? Feel free to create a new one! :)
|
||||
|
||||
|
|
903
CHANGELOG
|
@ -1,7 +1,898 @@
|
|||
changelog
|
||||
---------
|
||||
|
||||
Current Release: raylib 4.2.0 (11 August 2022)
|
||||
Current Release: raylib 5.5 (18 November 2024)
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
Release: raylib 5.5 (18 November 2024)
|
||||
-------------------------------------------------------------------------
|
||||
KEY CHANGES:
|
||||
- New tool: raylib project creator
|
||||
- New rcore backends: RGFW and SDL3
|
||||
- New platforms supported: Dreamcast, N64, PSP, PSVita, PS4
|
||||
- Added GPU Skinning support (all platforms and GL versions)
|
||||
- Added raymath C++ operators
|
||||
|
||||
Detailed changes:
|
||||
|
||||
WIP: Last update with commit from 02-Nov-2024
|
||||
|
||||
[rcore] ADDED: Working directory info at initialization by @Ray
|
||||
[rcore] ADDED: `GetClipboardImage()`, supported by multiple backends (#4459) by @evertonse
|
||||
[rcore] ADDED: `MakeDirectory()`, supporting recursive directory creation by @Ray
|
||||
[rcore] ADDED: `ComputeSHA1()` (#4390) by @Anthony Carbajal
|
||||
[rcore] ADDED: `ComputeCRC32()` and `ComputeMD5()` by @Ray
|
||||
[rcore] ADDED: `GetKeyName()` (#4161) by @MrScautHD
|
||||
[rcore] ADDED: `IsFileNameValid()` by @Ray
|
||||
[rcore] ADDED: `GetViewRay()`, viewport independent raycast (#3709) by @Luís Almeida
|
||||
[rcore] RENAMED: `GetMouseRay()` to `GetScreenToWorldRay()` (#3830) by @Ray
|
||||
[rcore] RENAMED: `GetViewRay()` to `GetScreenToWorldRayEx()` (#3830) by @Ray
|
||||
[rcore] REVIEWED: `GetApplicationDirectory()` for FreeBSD (#4318) by @base
|
||||
[rcore] REVIEWED: `LoadDirectoryFilesEx()`/`ScanDirectoryFiles()`, support directory on filter (#4302) by @foxblock
|
||||
[rcore] REVIEWED: Update comments on fullscreen and boderless window to describe what they do (#4280) by @Jeffery Myers
|
||||
[rcore] REVIEWED: Correct processing of mouse wheel on Automation events #4263 by @Ray
|
||||
[rcore] REVIEWED: Fix gamepad axis movement and its automation event recording (#4184) by @maxmutant
|
||||
[rcore] REVIEWED: Do not set RL_TEXTURE_FILTER_LINEAR when high dpi flag is enabled (#4189) by @Dave Green
|
||||
[rcore] REVIEWED: `GetScreenWidth()`/`GetScreenHeight()` (#4074) by @Anthony Carbajal
|
||||
[rcore] REVIEWED: Initial window dimensions checks (#3950) by @Christian Haas
|
||||
[rcore] REVIEWED: Set default init values for random #3954 by @Ray
|
||||
[rcore] REVIEWED: Window positioning, avoid out-of-screen window-bar by @Ray
|
||||
[rcore] REVIEWED: Fix framerate recording for .gif (#3894) by @Rob Loach
|
||||
[rcore] REVIEWED: Screen space related functions consistency (#3830) by @aiafrasinei
|
||||
[rcore] REVIEWED: `GetFileNameWithoutExt()` (#3771) by @oblerion
|
||||
[rcore] REVIEWED: `GetWindowScaleDPI()`, simplified (#3701) by @Karl Zylinski
|
||||
[rcore] REVIEWED: `UnloadAutomationEventList()` (#3658) by @Antonis Geralis
|
||||
[rcore] REVIEWED: Flip VR screens (#3633) by @Matthew Oros
|
||||
[rcore] REVIEWED: Remove unused vScreenCenter (#3632) by @Matthew Oros
|
||||
[rcore] REVIEWED: `LoadRandomSequence()`, issue in sequence generation #3612 by @Ray
|
||||
[rcore] REVIEWED: `IsMouseButtonUp()` (#3609) by @Kenneth M
|
||||
[rcore] REVIEWED: Fix typos in src/platforms/rcore_*.c (#3581) by @RadsammyT
|
||||
[rcore] REVIEWED: `ExportDataAsCode()`, change sanitization check (#3837) by @Laurentino Luna
|
||||
[rcore] REVIEWED: `ExportDataAsCode()`, add little sanitization to indentifier names (#3832) by @4rk
|
||||
[rcore] REVIEWED: `GetScreenWidth()`/`GetScreenHeight()` align with all platforms (#4451) by @Arche Washi
|
||||
[rcore] REVIEWED: `SetGamepadVibration()`, added duration parameter (#4410) by @Asdqwe -WARNING-
|
||||
[rcore] REVIEWED: `GetGamepadAxisMovement()`, fix #4405 (#4420) by @Asdqwe
|
||||
[rcore] REVIEWED: `GetGestureHoldDuration()` comments by @Ray
|
||||
[rcore][rlgl] REVIEWED: Fix scale issues when ending a view mode (#3746) by @Jeffery Myers
|
||||
[rcore][GLFW] REVIEWED: Keep CORE.Window.position properly in sync with glfw window position (#4190) by @Dave Green
|
||||
[rcore][GLFW] REVIEWED: Set AUTO_ICONIFY flag to false per default (#4188) by @Dave Green
|
||||
[rcore][GLFW] REVIEWED: `InitPlatform()`, add workaround for NetBSD (#4139) by @NishiOwO
|
||||
[rcore][GLFW] REVIEWED: Fix window not initializing on primary monitor (#3923) by @Rafael Bordoni
|
||||
[rcore][GLFW] REVIEWED: Set relative mouse mode when the cursor is disabled (#3874) by @Jeffery Myers
|
||||
[rcore][GLFW] REVIEWED: Remove GLFW mouse passthrough hack and increase GLFW version in CMake (#3852) by @Alexandre Almeida
|
||||
[rcore][GLFW] REVIEWED: Updated GLFW to 3.4 (#3827) by @Alexandre Almeida
|
||||
[rcore][GLFW] REVIEWED: Feature test macros before include (#3737) by @John
|
||||
[rcore][GLFW] REVIEWED: Fix inconsistent dll linkage warning on windows (#4447) by @Jeffery Myers
|
||||
[rcore][Web] ADDED: `SetWindowOpacity()` implementation (#4403) by @Asdqwe
|
||||
[rcore][Web] ADDED: `MaximizeWindow()` and `RestoreWindow()` implementations (#4397) by @Asdqwe
|
||||
[rcore][Web] ADDED: `ToggleFullscreen()` implementation (#3634) by @ubkp
|
||||
[rcore][Web] ADDED: `GetWindowPosition()` implementation (#3637) by @ubkp
|
||||
[rcore][Web] ADDED: `ToggleBorderlessWindowed()` implementation (#3622) by @ubkp
|
||||
[rcore][Web] ADDED: `GetMonitorWidth()` and `GetMonitorHeight()` implementations (#3636) by @ubkp
|
||||
[rcore][Web] REVIEWED: Update `SetWindowState()` and `ClearWindowState()` to handle `FLAG_WINDOW_MAXIMIZED` (#4402) by @Asdqwe
|
||||
[rcore][Web] REVIEWED: `WindowSizeCallback()`, do not try to handle DPI, already managed by GLFW (#4143) by @SuperUserNameMan
|
||||
[rcore][Web] REVIEWED: Relative mouse mode issues (#3940) by @Cemal Gönültaş
|
||||
[rcore][Web] REVIEWED: `ShowCursor()`, `HideCursor()` and `SetMouseCursor()` (#3647) by @ubkp
|
||||
[rcore][Web] REVIEWED: Fix CORE.Input.Mouse.cursorHidden with callbacks (#3644) by @ubkp
|
||||
[rcore][Web] REVIEWED: Fix `IsMouseButtonUp()` (#3611) by @ubkp
|
||||
[rcore][Web] REVIEWED: HighDPI support #3372 by @Ray
|
||||
[rcore][Web] REVIEWED: `SetWindowSize()` (#4452) by @Asdqwe
|
||||
[rcore][Web] REVIEWED: `EmscriptenResizeCallback()`, simplified (#4415) by @Asdqwe
|
||||
[rcore][SDL] ADDED: `IsCursorOnScreen()` (#3862) by @Peter0x44
|
||||
[rcore][SDL] ADDED: Gamepad rumble/vibration support (#3819) by @GideonSerf
|
||||
[rcore][SDL] REVIEWED: Gamepad support (#3776) by @A
|
||||
[rcore][SDL] REVIEWED: `GetWorkingDirectory()`, return correct path (#4392) by @Asdqwe
|
||||
[rcore][SDL] REVIEWED: `GetClipboardText()`, fix memory leak (#4354) by @Asdqwe
|
||||
[rcore][SDL] REVIEWED: Change SDL_Joystick to SDL_GameController (#4129) by @Frank Kartheuser
|
||||
[rcore][SDL] REVIEWED: Update storage base path, use provided SDL base path by @Ray
|
||||
[rcore][SDL] REVIEWED: Call SDL_GL_SetSwapInterval() after GL context creation (#3997) by @JupiterRider
|
||||
[rcore][SDL] REVIEWED: `GetKeyPressed()` (#3869) by @Arthur
|
||||
[rcore][SDL] REVIEWED: Fix SDL multitouch tracking (#3810) by @mooff
|
||||
[rcore][SDL] REVIEWED: Fix `SUPPORT_WINMM_HIGHRES_TIMER` (#3679) by @ubkp
|
||||
[rcore][SDL] REVIEWED: SDL text input to Unicode codepoints #3650 by @Ray
|
||||
[rcore][SDL] REVIEWED: `IsMouseButtonUp()` and add touch events (#3610) by @ubkp
|
||||
[rcore][SDL] REVIEWED: Fix real touch gestures (#3614) by @ubkp
|
||||
[rcore][SDL] REVIEWED: `IsKeyPressedRepeat()` (#3605) by @ubkp
|
||||
[rcore][SDL] REVIEWED: `GetKeyPressed()` and `GetCharPressed()` for SDL (#3604) by @ubkp
|
||||
[rcore][SDL] REVIEWED: `SetMousePosition()` for SDL (#3580) by @ubkp
|
||||
[rcore][SDL] REVIEWED: `SetWindowIcon()` for SDL (#3578) by @ubkp
|
||||
[rcore][SDL][rlgl] REVIEWED: Fix for running gles2 with SDL on desktop (#3542) by @_Tradam
|
||||
[rcore][Android] REVIEWED: Issue with isGpuReady flag (#4340) by @Menno van der Graaf
|
||||
[rcore][Android] REVIEWED: Allow main() to return it its caller on configuration changes (#4288) by @Hesham Abourgheba
|
||||
[rcore][Android] REVIEWED: Replace deprecated Android function ALooper_pollAll with ALooper_pollOnce (#4275) by @Menno van der Graaf
|
||||
[rcore][Android] REVIEWED: `PollInputEvents()`, register previous gamepad events (#3910) by @Aria
|
||||
[rcore][Android] REVIEWED: Fix Android keycode translation and duplicate key constants (#3733) by @Alexandre Almeida
|
||||
[rcore][DRM] ADDED: uConsole keys mapping (#4297) by @carverdamien
|
||||
[rcore][DRM] ADDED: `GetMonitorWidth/Height()` (#3956) by @gabriel-marques
|
||||
[rcore][DRM] REVIEWED: `IsMouseButtonUp()` (#3611) by @ubkp
|
||||
[rcore][DRM] REVIEWED: Optimize gesture handling (#3616) by @ubkp
|
||||
[rcore][DRM] REVIEWED: `IsKeyPressedRepeat()` for PLATFORM_DRM direct input (#3583) by @ubkp
|
||||
[rcore][DRM] REVIEWED: Fix gamepad buttons not working in drm backend (#3888) by @MrMugame
|
||||
[rcore][DRM] REVIEWED: DRM backend to only use one api to allow for more devices (#3879) by @MrMugame
|
||||
[rcore][DRM] REVIEWED: Avoid separate thread when polling for gamepad events (#3641) by @Cinghy Creations
|
||||
[rcore][DRM] REVIEWED: Connector status reported as UNKNOWN but should be considered as CONNECTED (#4305) by @Michał Jaskólski
|
||||
[rcore][RGFW] ADDED: RGFW, new rcore backend platform (#3941) by @Colleague Riley
|
||||
[rcore][RGFW] REVIEWED: RGFW 1.0 (#4144) by @Colleague Riley
|
||||
[rcore][RGFW] REVIEWED: Fix errors when compiling with mingw (#4282) by @Colleague Riley
|
||||
[rcore][RGFW] REVIEWED: Replace long switch with a lookup table (#4108) by @Colleague Riley
|
||||
[rcore][RGFW] REVIEWED: Fix MSVC build errors (#4441) by @Colleague Riley
|
||||
[rlgl] ADDED: More uniform data type options #4137 by @Ray
|
||||
[rlgl] ADDED: Vertex normals for RLGL immediate drawing mode (#3866) by @bohonghuang -WARNING-
|
||||
[rlgl] ADDED: `rlCullDistance*()` variables and getters (#3912) by @KotzaBoss
|
||||
[rlgl] ADDED: `rlSetClipPlanes()` function (#3912) by @KotzaBoss
|
||||
[rlgl] ADDED: `isGpuReady` flag, allow font loading with no GPU acceleration by @Ray -WARNING-
|
||||
[rlgl] REVIEWED: Changed RLGL_VERSION from 4.5 to 5.0 (#3914) by @Mute
|
||||
[rlgl] REVIEWED: Shader load failing returns 0, instead of fallback by @Ray -WARNING-
|
||||
[rlgl] REVIEWED: Standalone mode default flags (#4334) by @Asdqwe
|
||||
[rlgl] REVIEWED: Fix hardcoded index values in vboID array (#4312) by @Jett
|
||||
[rlgl] REVIEWED: GLint64 did not exist before OpenGL 3.2 (#4284) by @Tchan0
|
||||
[rlgl] REVIEWED: Extra warnings in case OpenGL 4.3 is not enabled (#4202) by @Maxim Knyazkin
|
||||
[rlgl] REVIEWED: Using GLint64 for glGetBufferParameteri64v() (#4197) by @Randy Palamar
|
||||
[rlgl] REVIEWED: Replace `glGetInteger64v()` with `glGetBufferParameteri64v()` (#4154) by @Kai Kitagawa-Jones
|
||||
[rlgl] REVIEWED: `rlMultMatrixf()`, fix matrix multiplication order (#3935) by @bohonghuang
|
||||
[rlgl] REVIEWED: `rlSetVertexAttribute()`, define last parameter as offset #3800 by @Ray
|
||||
[rlgl] REVIEWED: `rlDisableVertexAttribute()`, remove redundat calls for SHADER_LOC_VERTEX_COLOR (#3871) by @Kacper Zybała
|
||||
[rlgl] REVIEWED: `rlLoadTextureCubemap()`, load mipmaps for cubemaps (#4429) by @Nikolas
|
||||
[rlgl] REVIEWED: `rlLoadFramebuffer()`, parameters not required by @Ray
|
||||
[rlgl] REVIEWED: `rlSetUniformSampler()` (#3759) by @veins1
|
||||
[rlgl] REVIEWED: Renamed near/far variables (#4039) by @jgabaut
|
||||
[rlgl] REVIEWED: Expose OpenGL symbols (#3588) by @Peter0x44
|
||||
[rlgl] REVIEWED: Fix OpenGL 1.1 build issues (#3876) by @Ray
|
||||
[rlgl] REVIEWED: Fixed compilation for OpenGL ES (#4243) by @Maxim Knyazkin
|
||||
[rlgl] REVIEWED: rlgl function description and comments by @Ray
|
||||
[rlgl] REVIEWED: Expose glad functions when building raylib as a shared lib (#3572) by @Peter0x44
|
||||
[rlgl] REVIEWED: Fix version info in rlgl.h (#3558) by @Steven Schveighoffer
|
||||
[rlgl] REVIEWED: Use the vertex color to the base shader in GLSL330 (#4431) by @Jeffery Myers
|
||||
[rcamera] REVIEWED: Make camera movement independant of framerate (#4247) by @hanaxars -WARNING-
|
||||
[rcamera] REVIEWED: Updated camera speeds with GetFrameTime() (#4362) by @Anthony Carbajal
|
||||
[rcamera] REVIEWED: `UpdateCamera()`, added CAMERA_CUSTOM check (#3938) by @Tomas Fabrizio Orsi
|
||||
[rcamera] REVIEWED: Support mouse/keyboard and gamepad coexistence for input (#3579) by @ubkp
|
||||
[rcamera] REVIEWED: Cleaned away unused macros(#3762) by @Brian E
|
||||
[rcamera] REVIEWED: Fix for free camera mode (#3603) by @lesleyrs
|
||||
[rcamera] REVIEWED: `GetCameraRight()` (#3784) by @Danil
|
||||
[raymath] ADDED: C++ operator overloads for common math function (#4385) by @Jeffery Myers -WARNING-
|
||||
[raymath] ADDED: Vector4 math functions and Vector2 variants of some Vector3 functions (#3828) by @Bowserinator
|
||||
[raymath] REVIEWED: Fix MSVC warnings/errors in C++ (#4125) by @Jeffery Myers
|
||||
[raymath] REVIEWED: Add extern "C" to raymath header for C++ (#3978) by @Jeffery Myers
|
||||
[raymath] REVIEWED: `QuaternionFromAxisAngle()`, remove redundant axis length calculation (#3900) by @jtainer
|
||||
[raymath] REVIEWED: `Vector3Perpendicular()`, avoid implicit conversion from float to double (#3799) by @João Foscarini
|
||||
[raymath] REVIEWED: `MatrixDecompose()`, incorrect output for certain scale and rotations (#4461) by @waveydave
|
||||
[raymath] REVIEWED: Small code refactor (#3753) by @Idir Carlos Aliane
|
||||
[rshapes] ADDED: `CheckCollisionCircleLine()` (#4018) by @kai-z99
|
||||
[rshapes] REVIEWED: Multisegment Bezier splines (#3744) by @Santiago Pelufo
|
||||
[rshapes] REVIEWED: Expose shapes drawing texture and rectangle (#3677) by @Jeffery Myers
|
||||
[rshapes] REVIEWED: `DrawLine()` #4075 by @Ray
|
||||
[rshapes] REVIEWED: `DrawPixel()` drawing by @Ray
|
||||
[rshapes] REVIEWED: `DrawLine()` to avoid pixel rounding issues #3931 by @Ray
|
||||
[rshapes] REVIEWED: `DrawRectangleLines()`, considering view matrix for lines "alignment" by @Ray
|
||||
[rshapes] REVIEWED: `DrawRectangleLines()`, pixel offset (#4261) by @RadsammyT
|
||||
[rshapes] REVIEWED: `DrawRectangleLines()`, pixel offset when scaling (#3884) by @Ray
|
||||
[rshapes] REVIEWED: `DrawRectangleLinesEx()`, make sure accounts for square tiles (#4382) by @Jojaby
|
||||
[rshapes] REVIEWED: `Draw*Gradient()` color parameter names (#4270) by @Paperdomo101
|
||||
[rshapes] REVIEWED: `DrawGrid()`, remove duplicate color calls (#4148) by @Jeffery Myers
|
||||
[rshapes] REVIEWED: `DrawSplineLinear()` to `SUPPORT_SPLINE_MITERS` by @Ray
|
||||
[rshapes] REVIEWED: `DrawSplineLinear()`, implement miters (#3585) by @Toctave
|
||||
[rshapes] REVIEWED: `CheckCollisionPointRec()` by @Ray
|
||||
[rshapes] REVIEWED: `CheckCollisionPointCircle()`, new implementation (#4135) by @kai-z99
|
||||
[rshapes] REVIEWED: `CheckCollisionCircles()`, optimized (#4065) by @kai-z99
|
||||
[rshapes] REVIEWED: `CheckCollisionPointPoly()` (#3750) by @Antonio Raúl
|
||||
[rshapes] REVIEWED: `CheckCollisionCircleRec()` (#3584) by @ubkp
|
||||
[rshapes] REVIEWED: Add more detail to function comment (#4344) by @Jeffery Myers
|
||||
[rshapes] REVIEWED: Functions that draw point arrays take them as const (#4051) by @Jeffery Myers
|
||||
[rtextures] ADDED: `ColorIsEqual()` by @Ray
|
||||
[rtextures] ADDED: `ColorLerp()`, to mix 2 colors together (#4310) by @SusgUY446
|
||||
[rtextures] ADDED: `LoadImageAnimFromMemory()` (#3681) by @IoIxD
|
||||
[rtextures] ADDED: `ImageKernelConvolution()` (#3528) by @Karim
|
||||
[rtextures] ADDED: `ImageFromChannel()` (#4105) by @Bruno Cabral
|
||||
[rtextures] ADDED: `ImageDrawLineEx()` (#4097) by @Le Juez Victor
|
||||
[rtextures] ADDED: `ImageDrawTriangle()` (#4094) by @Le Juez Victor
|
||||
[rtextures] REMOVED: SVG files loading and drawing, moving it to raylib-extras by @Ray -WARNING-
|
||||
[rtextures] REVIEWED: `LoadImage()`, added support for 3-channel QOI images (#4384) by @R-YaTian
|
||||
[rtextures] REVIEWED: `LoadImageRaw()` #3926 by @Ray
|
||||
[rtextures] REVIEWED: `LoadImageColors()`, advance k in loop (#4120) by @Bruno Cabral
|
||||
[rtextures] REVIEWED: `LoadTextureCubemap()`, added `mipmaps` #3665 by @Ray
|
||||
[rtextures] REVIEWED: `LoadTextureCubemap()`, assign format to cubemap (#3823) by @Gary M
|
||||
[rtextures] REVIEWED: `LoadTextureCubemap()`, load mipmaps for cubemaps (#4429) by @Nikolas
|
||||
[rtextures] REVIEWED: `LoadTextureCubemap()`, avoid dangling re-allocated pointers (#4439) by @Nikolas
|
||||
[rtextures] REVIEWED: `LoadImageFromScreen()`, fix scaling (#3881) by @proberge-dev
|
||||
[rtextures] REVIEWED: `LoadImageFromMemory()`, warnings on invalid image data (#4179) by @Jutastre
|
||||
[rtextures] REVIEWED: `LoadImageAnimFromMemory()`, added security checks (#3924) by @Ray
|
||||
[rtextures] REVIEWED: `ImageColorTint()` and `ColorTint()`, optimized (#4015) by @Le Juez Victor
|
||||
[rtextures] REVIEWED: `ImageKernelConvolution()`, formating and warnings by @Ray
|
||||
[rtextures] REVIEWED: `ImageDrawRectangleRec`, fix bounds check (#3732) by @Blockguy24
|
||||
[rtextures] REVIEWED: `ImageResizeCanvas()`, implemented fill color (#3720) by @Lieven Petersen
|
||||
[rtextures] REVIEWED: `ImageDrawRectangleRec()` (#3721) by @Le Juez Victor
|
||||
[rtextures] REVIEWED: `ImageDraw()`, don't try to blend images without alpha (#4395) by @Nikolas
|
||||
[rtextures] REVIEWED: `GenImagePerlinNoise()` being stretched (#4276) by @Bugsia
|
||||
[rtextures] REVIEWED: `GenImageGradientLinear()`, fix some angles (#4462) by @decromo
|
||||
[rtextures] REVIEWED: `DrawTexturePro()` to avoid negative dest rec #4316 by @Ray
|
||||
[rtextures] REVIEWED: `ColorToInt()`, fix undefined behaviour (#3996) by @OetkenPurveyorOfCode
|
||||
[rtextures] REVIEWED: Remove panorama cubemap layout option (#4425) by @Jeffery Myers
|
||||
[rtextures] REVIEWED: Removed unneeded module check, `rtextures` should not depend on `rtext` by @Ray
|
||||
[rtextures] REVIEWED: Simplified for loop for some image manipulation functions (#3712) by @Alice Nyaa
|
||||
[rtext] ADDED: BDF fonts support (#3735) by @Stanley Fuller -WARNING-
|
||||
[rtext] ADDED: `TextToCamel()` (#4033) by @IoIxD
|
||||
[rtext] ADDED: `TextToSnake()` (#4033) by @IoIxD
|
||||
[rtext] ADDED: `TextToFloat()` (#3627) by @Benjamin Schmid Ties
|
||||
[rtext] REDESIGNED: `SetTextLineSpacing()` by @Ray -WARNING-
|
||||
[rtext] REVIEWED: `LoadFontDataBDF()` name and formating by @Ray
|
||||
[rtext] REVIEWED: `LoadFontDefault()`, initialize glyphs and recs to zero #4319 by @Ray
|
||||
[rtext] REVIEWED: `LoadFontEx()`, avoid default font fallback (#4077) by @Peter0x44 -WARNING-
|
||||
[rtext] REVIEWED: `LoadBMFont()`, extended functionality (#3536) by @Dongkun Lee
|
||||
[rtext] REVIEWED: `LoadBMFont()`, issue on not glyph data initialized by @Ray
|
||||
[rtext] REVIEWED: `LoadFontFromMemory()`, use strncpy() to fix buffer overflow (#3795) by @Mingjie Shen
|
||||
[rtext] REVIEWED: `LoadCodepoints()` returning a freed ptr when count is 0 (#4089) by @Alice Nyaa
|
||||
[rtext] REVIEWED: `LoadFontData()` avoid fallback glyphs by @Ray -WARNING-
|
||||
[rtext] REVIEWED: `LoadFontData()`, load image only if glyph has been found in font by @Ray
|
||||
[rtext] REVIEWED: `ExportFontAsCode()`, fix C++ compiler errors (#4013) by @DarkAssassin23
|
||||
[rtext] REVIEWED: `MeasureTextEx()` height calculation (#3770) by @Marrony Neris
|
||||
[rtext] REVIEWED: `MeasureTextEx()`, additional check for empty input string (#4448) by @mpv-enjoyer
|
||||
[rtext] REVIEWED: `CodepointToUTF8()`, clean static buffer #4379 by @Ray
|
||||
[rtext] REVIEWED: `TextToFloat()`, always multiply by sign (#4273) by @listeria
|
||||
[rtext] REVIEWED: `TextReplace()` const correctness (#3678) by @maverikou
|
||||
[rtext] REVIEWED: `TextToFloat()`, coding style (#3627) by @Benjamin Schmid Ties
|
||||
[rtext] REVIEWED: Some comments to align to style (#3756) by @Idir Carlos Aliane
|
||||
[rtext] REVIEWED: Adjust font atlas area calculation so padding area is not underestimated at small font sizes (#3719) by @Tim Romero
|
||||
[rmodels] ADDED: GPU skinning support for models animations (#4321) by @Daniel Holden -WARNING-
|
||||
[rmodels] ADDED: Support 16-bit unsigned short vec4 format for gltf joint loading (#3821) by @Gary M
|
||||
[rmodels] ADDED: Support animation names for the m3d model format (#3714) by @kolunmi
|
||||
[rmodels] ADDED: `DrawModelPoints()`, more performant point cloud rendering (#4203) by @Reese Gallagher
|
||||
[rmodels] ADDED: `ExportMeshAsCode()` by @Ray
|
||||
[rmodels] REVIEWED: Multiple updates to gltf loading, improved macro (#4373) by @Harald Scheirich
|
||||
[rmodels] REVIEWED: `LoadOBJ()`, correctly split obj meshes by material (#4285) by @Jeffery Myers
|
||||
[rmodels] REVIEWED: `LoadOBJ()`, add warning when loading an OBJ with multiple materials (#4271) by @Jeffery Myers
|
||||
[rmodels] REVIEWED: `LoadOBJ()`, fix bug that fragmented the loaded meshes (#4494) by @Eike Decker
|
||||
[rmodels] REVIEWED: `LoadIQM()`, set model.meshMaterial[] (#4092) by @SuperUserNameMan
|
||||
[rmodels] REVIEWED: `LoadIQM()`, attempt to load texture from IQM at loadtime (#4029) by @Jett
|
||||
[rmodels] REVIEWED: `LoadM3D(), fix vertex colors for m3d files (#3859) by @Jeffery Myers
|
||||
[rmodels] REVIEWED: `LoadGLTF()`, supporting additional vertex data formats (#3546) by @MrScautHD
|
||||
[rmodels] REVIEWED: `LoadGLTF()`, correctly handle the node hierarchy in a glTF file (#4037) by @Paul Melis
|
||||
[rmodels] REVIEWED: `LoadGLTF()`, replaced SQUAD quat interpolation with cubic hermite (gltf 2.0 specs) (#3920) by @Benji
|
||||
[rmodels] REVIEWED: `LoadGLTF()`, support 2nd texture coordinates loading by @Ray
|
||||
[rmodels] REVIEWED: `LoadGLTF()`, support additional vertex attributes data formats #3890 by @Ray
|
||||
[rmodels] REVIEWED: `LoadGLTF()`, set cgltf callbacks to use `LoadFileData()` and `UnloadFileData()` (#3652) by @kolunmi
|
||||
[rmodels] REVIEWED: `LoadGLTF()`, JOINTS loading #3836 by @Ray
|
||||
[rmodels] REVIEWED: `LoadImageFromCgltfImage()`, fix base64 padding support (#4112) by @SuperUserNameMan
|
||||
[rmodels] REVIEWED: `LoadModelAnimationsIQM()`, fix corrupted animation names (#4026) by @Jett
|
||||
[rmodels] REVIEWED: `LoadModelAnimationsGLTF()`, load animations with 1 frame (#3804) by @Nikita Blizniuk
|
||||
[rmodels] REVIEWED: `LoadModelAnimationsGLTF()`, added missing interpolation types (#3919) by @Benji
|
||||
[rmodels] REVIEWED: `LoadModelAnimationsGLTF()` (#4107) by @VitoTringolo
|
||||
[rmodels] REVIEWED: `LoadBoneInfoGLTF()`, add check for animation name being NULL (#4053) by @VitoTringolo
|
||||
[rmodels] REVIEWED: `GenMeshSphere()`, fix artifacts (#4460) by @MikiZX1
|
||||
[rmodels] REVIEWED: `GenMeshTangents()`, read uninitialized values, fix bounding case (#4066) by @kai-z99
|
||||
[rmodels] REVIEWED: `GenMeshTangents()`, fixed out of bounds error (#3990) by @Salvador Galindo
|
||||
[rmodels] REVIEWED: `UpdateModelAnimation()`, performance speedup (#4470) by @JettMonstersGoBoom
|
||||
[rmodels] REVIEWED: `DrawCylinder()`, fix drawing due to imprecise angle (#4034) by @Paul Melis
|
||||
[rmodels] REVIEWED: `DrawCylinder()`, fix drawing of cap (#4478) by @JeffM2501
|
||||
[rmodels] REVIEWED: `DrawMesh()`, send full matModel to shader in DrawMesh (#4005) (#4022) by @David Holland
|
||||
[rmodels] REVIEWED: `DrawMesh()`, fix material specular map retrieval (#3758) by @Victor Gallet
|
||||
[rmodels] REVIEWED: `DrawModelEx()`, simplified multiplication of colors (#4002) by @Le Juez Victor
|
||||
[rmodels] REVIEWED: `DrawBillboardPro()`, to be consistend with `DrawTexturePro()` (#4132) by @bohonghuang
|
||||
[rmodels] REVIEWED: `DrawSphereEx()` optimization (#4106) by @smalltimewizard
|
||||
[raudio] REVIEWED: `LoadMusicStreamFromMemory()`, support 24-bit FLACs (#4279) by @konstruktor227
|
||||
[raudio] REVIEWED: `LoadWaveSamples()`, fix mapping of wave data (#4062) by @listeria
|
||||
[raudio] REVIEWED: `LoadMusicStream()`, remove drwav_uninit() (#3986) by @FishingHacks
|
||||
[raudio] REVIEWED: `LoadMusicStream()` qoa and wav loading (#3966) by @veins1
|
||||
[raudio] REVIEWED: `ExportWaveAsCode()`, segfault (#3769) by @IoIxD
|
||||
[raudio] REVIEWED: `WaveCrop()`, fix issues and use frames instead of samples (#3994) by @listeria
|
||||
[raudio] REVIEWED: Crash from multithreading issues (#3907) by @Christian Haas
|
||||
[raudio] REVIEWED: Reset music.ctxType if loading wasn't succesful (#3917) by @veins1
|
||||
[raudio] REVIEWED: Added missing functions in "standalone" mode (#3760) by @Alessandro Nikolaev
|
||||
[raudio] REVIEWED: Disable unused miniaudio features (#3544) by @Alexandre Almeida
|
||||
[raudio] REVIEWED: Fix crash when switching playback device at runtime (#4102) by @jkaup
|
||||
[raudio] REVIEWED: Support 24 bits samples for FLAC format (#4058) by @Alexey Kutepov
|
||||
[examples] ADDED: `core_random_sequence` (#3846) by @Dalton Overmyer
|
||||
[examples] ADDED: `core_input_virtual_controls` (#4342) by @oblerion
|
||||
[examples] ADDED: `shapes_rectangle_advanced `, implementing `DrawRectangleRoundedGradientH()` (#4435) by @Everton Jr.
|
||||
[examples] ADDED: `models_bone_socket` (#3833) by @iP
|
||||
[examples] ADDED: `shaders_vertex_displacement` (#4186) by @Alex ZH
|
||||
[examples] ADDED: `shaders_shadowmap` (#3653) by @TheManTheMythTheGameDev
|
||||
[examples] REVIEWED: `core_2d_camera_platformer` by @Ray
|
||||
[examples] REVIEWED: `core_2d_camera_mouse_zoom`, use logarithmic scaling for a 2d zoom functionality (#3977) by @Mike Will
|
||||
[examples] REVIEWED: `core_input_gamepad_info`, all buttons displayed within the window (#4241) by @Asdqwe
|
||||
[examples] REVIEWED: `core_input_gamepad_info`, show ps3 controller (#4040) by @Konrad Gutvik Grande
|
||||
[examples] REVIEWED: `core_input_gamepad`, add drawing for generic gamepad (#4424) by @Asdqwe
|
||||
[examples] REVIEWED: `core_input_gamepad`, add deadzone handling (#4422) by @Asdqwe
|
||||
[examples] REVIEWED: `shapes_bouncing_ball` (#4226) by @Anthony Carbajal
|
||||
[examples] REVIEWED: `shapes_following_eyes` (#3710) by @Hongyu Ouyang
|
||||
[examples] REVIEWED: `shapes_draw_rectangle_rounded` by @Ray
|
||||
[examples] REVIEWED: `shapes_draw_ring`, fix other examples (#4211) by @kai-z99
|
||||
[examples] REVIEWED: `shapes_lines_bezier` by @Ray
|
||||
[examples] REVIEWED: `textures_image_kernel` #3556 by @Ray
|
||||
[examples] REVIEWED: `text_input_box` (#4229) by @Anthony Carbajal
|
||||
[examples] REVIEWED: `text_writing_anim` (#4230) by @Anthony Carbajal
|
||||
[examples] REVIEWED: `models_billboard` by @Ray
|
||||
[examples] REVIEWED: `models_cubicmap` by @Ray
|
||||
[examples] REVIEWED: `models_point_rendering` by @Ray
|
||||
[examples] REVIEWED: `models_box_collisions` (#4224) by @Anthony Carbajal
|
||||
[examples] REVIEWED: `models_skybox`, do not use HDR by default (#4115) by @Jeffery Myers
|
||||
[examples] REVIEWED: `shaders_basic_pbr` (#4225) by @Anthony Carbajal
|
||||
[examples] REVIEWED: `shaders_palette_switch` by @Ray
|
||||
[examples] REVIEWED: `shaders_hybrid_render` (#3908) by @Yousif
|
||||
[examples] REVIEWED: `shaders_lighting_instancing`, fix vertex shader (#4056) by @Karl Zylinski
|
||||
[examples] REVIEWED: `shaders_raymarching`, add `raymarching.fs` for GLSL120 (#4183) by @CDM15y
|
||||
[examples] REVIEWED: `shaders_shadowmap`, fix shaders for GLSL 1.20 (#4167) by @CDM15y
|
||||
[examples] REVIEWED: `shaders_deferred_render` (#3655) by @Jett
|
||||
[examples] REVIEWED: `shaders_basic_pbr` (#3621) by @devdad
|
||||
[examples] REVIEWED: `shaders_basic_pbr`, remove dependencies (#3649) by @TheManTheMythTheGameDev
|
||||
[examples] REVIEWED: `shaders_basic_pbr`, added more comments by @Ray
|
||||
[examples] REVIEWED: `shaders_gpu_skinning`, to work with OpenGL ES 2.0 #4412 by @Ray
|
||||
[examples] REVIEWED: `shaders_model_shader`, use free camera (#4428) by @IcyLeave6109
|
||||
[examples] REVIEWED: `audio_stream_effects` (#3618) by @lipx
|
||||
[examples] REVIEWED: `audio_raw_stream` (#3624) by @riadbettole
|
||||
[examples] REVIEWED: `audio_mixed_processor` (#4214) by @Anthony Carbajal
|
||||
[examples] REVIEWED: `raylib_opengl_interop`, fix building on PLATFORM_DESKTOP_SDL (#3826) by @Peter0x44
|
||||
[examples] REVIEWED: Update examples missing UnloadTexture() calls (#4234) by @Anthony Carbajal
|
||||
[examples] REVIEWED: Added GLSL 100 and 120 shaders to lightmap example (#3543) by @Jussi Viitala
|
||||
[examples] REVIEWED: Set FPS to always 60 in all exampels (#4235) by @Anthony Carbajal
|
||||
[build] REVIEWED: Makefile by @Ray
|
||||
[build] REVIEWED: Makefile, fix wrong flag #3593 by @Ray
|
||||
[build] REVIEWED: Makefile, disable wayland by default (#4369) by @Anthony Carbajal
|
||||
[build] REVIEWED: Makefile, VSCode, fix to support multiple .c files (#4391) by @Alan Arrecis
|
||||
[build] REVIEWED: Makefile, fix -Wstringop-truncation warning (#4096) by @Peter0x44
|
||||
[build] REVIEWED: Makefile, fix issues for RGFW on Linux/macOS (#3969) by @Colleague Riley
|
||||
[build] REVIEWED: Makefile, update RAYLIB_VERSION (#3901) by @Belllg
|
||||
[build] REVIEWED: Makefile, use mingw32-make for Windows (#4436) by @Asdqwe
|
||||
[build] REVIEWED: Makefile, move CUSTOM_CFLAGS for better visibility (#4054) by @Lázaro Albuquerque
|
||||
[build] REVIEWED: Makefile, update emsdk paths to latest versions by @Ray
|
||||
[build] REVIEWED: Makefile examples, align /usr/local with /src Makefile (#4286) by @Tchan0
|
||||
[build] REVIEWED: Makefile examples, added `textures_image_kernel` (#3555) by @Sergey Zapunidi
|
||||
[build] REVIEWED: Makefile examples (#4209) by @Anthony Carbajal
|
||||
[build] REVIEWED: Makefile examples, to work on NetBSD (#4438) by @NishiOwO
|
||||
[build] REVIEWED: Makefile examples, WebGL2 (OpenGL ES 3.0) backend flags #4330 by @Ray
|
||||
[build] REVIEWED: Makefile examples, web building (#4434) by @Asdqwe
|
||||
[build] REVIEWED: build.zig, fix various issues around `-Dconfig` (#4398) by @Sage Hane
|
||||
[build] REVIEWED: build.zig, fix type mismatch (#4383) by @yuval_dev
|
||||
[build] REVIEWED: build.zig, minor fixes (#4381) by @Sage Hane
|
||||
[build] REVIEWED: build.zig, fix @src logic and a few things (#4380) by @Sage Hane
|
||||
[build] REVIEWED: build.zig, improve logic (#4375) by @Sage Hane
|
||||
[build] REVIEWED: build.zig, issues (#4374) by @William Culver
|
||||
[build] REVIEWED: build.zig, issues (#4366) by @Visen
|
||||
[build] REVIEWED: build.zig, support desktop backend change (#4358) by @Nikolas
|
||||
[build] REVIEWED: build.zig, use zig fmt (#4242) by @freakmangd
|
||||
[build] REVIEWED: build.zig, check if wayland-scanner is installed (#4217) by @lnc3l0t
|
||||
[build] REVIEWED: build.zig, override config.h definitions (#4193) by @lnc3l0t
|
||||
[build] REVIEWED: build.zig, support GLFW platform detection (#4150) by @InventorXtreme
|
||||
[build] REVIEWED: build.zig, make emscripten build compatible with Zig 0.13.0 (#4121) by @Mike Will
|
||||
[build] REVIEWED: build.zig, pass the real build.zig file (#4113) by @InKryption
|
||||
[build] REVIEWED: build.zig, leverage `dependencyFromBuildZig` (#4109) by @InKryption
|
||||
[build] REVIEWED: build.zig, run examples from their directories (#4063) by @Mike Will
|
||||
[build] REVIEWED: build.zig, fix raygui build when using addRaygui externally (#4027) by @Viktor Pocedulić
|
||||
[build] REVIEWED: build.zig, fix emscripten build (#4012) by @Dylan
|
||||
[build] REVIEWED: build.zig, update to zig 0.12.0dev while keeping 0.11.0 compatibility (#3715) by @freakmangd
|
||||
[build] REVIEWED: build.zig, drop support for 0.11.0 and use more idiomatic build script code (#3927) by @freakmangd
|
||||
[build] REVIEWED: build.zig, sdd shared library build option and update to zig 0.12.0-dev.2139 (#3727) by @Andrew Lee
|
||||
[build] REVIEWED: build.zig, add `opengl_version` option (#3979) by @Alexei Mozaidze
|
||||
[build] REVIEWED: build.zig, fix local dependency break (#3913) by @freakmangd
|
||||
[build] REVIEWED: build.zig, fix breaking builds for Zig v0.11.0 (#3896) by @iarkn
|
||||
[build] REVIEWED: build.zig, update to latest version and simplify (#3905) by @freakmangd
|
||||
[build] REVIEWED: build.zig, remove all uses of deps/mingw (#3805) by @Peter0x44
|
||||
[build] REVIEWED: build.zig, fixed illegal instruction crash (#3682) by @WisonYe
|
||||
[build] REVIEWED: build.zig, fix broken build on #3863 (#3891) by @Nikolas Mauropoulos
|
||||
[build] REVIEWED: build.zig, improve cross-compilation (#4468) by @deathbeam
|
||||
[build] REVIEWED: CMake, update to raylib 5.0 (#3623) by @Peter0x44
|
||||
[build] REVIEWED: CMake, added PLATFORM option for Desktop SDL (#3809) by @mooff
|
||||
[build] REVIEWED: CMake, fix GRAPHICS_* check (#4359) by @Kacper Zybała
|
||||
[build] REVIEWED: CMake, examples projects (#4332) by @Ridge3Dproductions
|
||||
[build] REVIEWED: CMake, fix warnings in projects/CMake/CMakeLists.txt (#4278) by @Peter0x44
|
||||
[build] REVIEWED: CMake, delete BuildOptions.cmake (#4277) by @Peter0x44
|
||||
[build] REVIEWED: CMake, update version to 5.0 so libraries are correctly versioned (#3615) by @David Williams
|
||||
[build] REVIEWED: CMake, improved linkage flags to save 28KB on the final bundle (#4177) by @Lázaro Albuquerque
|
||||
[build] REVIEWED: CMake, support OpenGL ES3 in `LibraryConfigurations.cmake` (#4079) by @manuel5975p
|
||||
[build] REVIEWED: CMake, `config.h` fully available to users (#4044) by @Lázaro Albuquerque
|
||||
[build] REVIEWED: CMake, pass -sFULL_ES3 instead of -sFULL_ES3=1 (#4090) by @manuel5975p
|
||||
[build] REVIEWED: CMake, SDL build link the glfw dependency (#3860) by @Rob Loach
|
||||
[build] REVIEWED: CMake, infer CMAKE_MODULE_PATH in super-build (#4042) by @fruzitent
|
||||
[build] REVIEWED: CMake, remove USE_WAYLAND option (#3851) by @Alexandre Almeida
|
||||
[build] REVIEWED: CMake, disable SDL rlgl_standalone example (#3861) by @Rob Loach
|
||||
[build] REVIEWED: CMake, bump version required to avoid deprecated #3639 by @Ray
|
||||
[build] REVIEWED: CMake, fix examples linking -DPLATFORM=SDL (#3825) by @Peter0x44
|
||||
[build] REVIEWED: CMake, don't build for wayland by default (#4432) by @Peter0x44
|
||||
[build] REVIEWED: VS2022, misc improvements by @Ray
|
||||
[build] REVIEWED: VS2022, fix build warnings (#4095) by @Jeffery Myers
|
||||
[build] REVIEWED: VS2022, added new examples (#4492) by @Jeffery Myers
|
||||
[build] REVIEWED: Fix fix-build-paths (#3849) by @Caleb Barger
|
||||
[build] REVIEWED: Fix build paths (#3835) by @Steve Biedermann
|
||||
[build] REVIEWED: Fix VSCode sample project for macOS (#3666) by @Tim Romero
|
||||
[build] REVIEWED: Fix some warnings on web builds and remove some redundant flags (#4069) by @Lázaro Albuquerque
|
||||
[build] REVIEWED: Fix examples not building with gestures system disabled (#4020) by @Sprix
|
||||
[build] REVIEWED: Fix GLFW runtime platform detection (#3863) by @Alexandre Almeida
|
||||
[build] REVIEWED: Fix DRM cross-compile without sysroot (#3839) by @Christian W. Zuckschwerdt
|
||||
[build] REVIEWED: Fix cmake-built libraylib.a to properly include GLFW's object files (#3598) by @Peter0x44
|
||||
[build] REVIEWED: Hide unneeded internal symbols when building raylib as an so or dylib (#3573) by @Peter0x44
|
||||
[build] REVIEWED: Corrected the path of android ndk toolchains for OSX platforms (#3574) by @Emmanuel Méra
|
||||
[build][CI] ADDED: Automatic update for raylib_api.* (#3692) by @seiren
|
||||
[build][CI] REVIEWED: Update workflows to use latest actions/upload-artifact by @Ray
|
||||
[build][CI] REVIEWED: CodeQL minor tweaks to avoid some warnings by @Ray
|
||||
[build][CI] REVIEWED: Update linux_examples.yml by @Ray
|
||||
[build][CI] REVIEWED: Update linux.yml by @Ray
|
||||
[build][CI] REVIEWED: Update webassembly.yml by @Ray
|
||||
[build][CI] REVIEWED: Update cmake.yml by @Ray
|
||||
[build][CI] REVIEWED: Update codeql.yml, exclude src/external files by @Ray
|
||||
[bindings] ADDED: raylib-APL (#4253) by @Brian E
|
||||
[bindings] ADDED: raylib-bqn, moved rayed-bqn (#4331) by @Brian E
|
||||
[bindings] ADDED: brainfuck binding (#4169) by @_Tradam
|
||||
[bindings] ADDED: raylib-zig-bindings (#4004) by @Lionel Briand
|
||||
[bindings] ADDED: Raylib-CSharp wrapper (#3963) by @MrScautHD
|
||||
[bindings] ADDED: COBOL binding (#3661) by @glowiak
|
||||
[bindings] ADDED: raylib-beef binding (#3640) by @Braedon Lewis
|
||||
[bindings] ADDED: Raylib-CSharp-Vinculum (#3571) by @Danil
|
||||
[bindings] REVIEWED: Remove broken-link bindings #3899 by @Ray
|
||||
[bindings] REVIEWED: Updated some versions on BINDINGS.md by @Ray
|
||||
[bindings] REVIEWED: Removed umaintained repos (#3999) by @Antonis Geralis
|
||||
[bindings] REDESIGNED: Add binding link to name, instead of separate column (#3995) by @Carmine Pietroluongo
|
||||
[bindings] UPDATED: h-raylib (#4378) by @Anand Swaroop
|
||||
[bindings] UPDATED: Raylib.lean, to master version (#4337) by @Daniil Kisel
|
||||
[bindings] UPDATED: raybit, to latest master (#4311) by @Alex
|
||||
[bindings] UPDATED: dray binding (#4163) by @red thing
|
||||
[bindings] UPDATED: Julia (#4068) by @ShalokShalom
|
||||
[bindings] UPDATED: nim to latest master (#3999) by @Antonis Geralis
|
||||
[bindings] UPDATED: raylib-rs (#3991) by @IoIxD
|
||||
[bindings] UPDATED: raylib-zig version (#3902) by @Nikolas
|
||||
[bindings] UPDATED: raylib-odin (#3868) by @joyousblunder
|
||||
[bindings] UPDATED: Raylib VAPI (#3829) by @Alex Macafee
|
||||
[bindings] UPDATED: Raylib-cs (#3774) by @Brandon Baker
|
||||
[bindings] UPDATED: h-raylib (#3739) by @Anand Swaroop
|
||||
[bindings] UPDATED: OCaml bindings version (#3730) by @Tobias Mock
|
||||
[bindings] UPDATED: Raylib.c3 (#3689) by @Kenta
|
||||
[bindings] UPDATED: ray-cyber to 5.0 (#3654) by @fubark
|
||||
[bindings] UPDATED: raylib-freebasic binding (#3591) by @WIITD
|
||||
[bindings] UPDATED: SmallBASIC (#3562) by @Chris Warren-Smith
|
||||
[bindings] UPDATED: Python raylib-py v5.0.0beta1 (#3557) by @Jorge A. Gomes
|
||||
[bindings] UPDATED: raylib-d binding (#3561) by @Steven Schveighoffer
|
||||
[bindings] UPDATED: Janet (#3553) by @Dmitry Matveyev
|
||||
[bindings] UPDATED: Raylib.nelua (#3552) by @Auz
|
||||
[bindings] UPDATED: raylib-cpp to 5.0 (#3551) by @Rob Loach
|
||||
[bindings] UPDATED: Pascal binding (#3548) by @Gunko Vadim
|
||||
[external] UPDATED: stb_truetype.h to latest version by @Ray
|
||||
[external] UPDATED: stb_image_resize2.h to latest version by @Ray
|
||||
[external] UPDATED: stb_image.h to latest version by @Ray
|
||||
[external] UPDATED: qoa.h to latest version by @Ray
|
||||
[external] UPDATED: dr_wav.h to latest version by @Ray
|
||||
[external] UPDATED: dr_mp3.h to latest version by @Ray
|
||||
[external] UPDATED: cgltf.h to latest version by @Ray
|
||||
[external] REVIEWED: rl_gputex, correctly load mipmaps from DDS files (#4399) by @Nikolas
|
||||
[external] REVIEWED: stb_image_resize2, dix vld1q_f16 undeclared in arm (#4309) by @masnm
|
||||
[external] REVIEWED: miniaudio, fix library and Makefile for NetBSD (#4212) by @NishiOwO
|
||||
[external] REVIEWED: raygui, update to latest version 4.5-dev (#4238) by @Anthony Carbajal
|
||||
[external] REVIEWED: jar_xml, replace unicode characters by ascii characters to avoid warning in MSVC (#4196) by @Rico P
|
||||
[external] REVIEWED: vox_loader, normals and new voxels shader (#3843) by @johann nadalutti
|
||||
[parser] REVIEWED: README.md, to mirror fixed help text (#4336) by @Daniil Kisel
|
||||
[parser] REVIEWED: Fix seg fault with long comment lines (#4306) by @Chris Warren-Smith
|
||||
[parser] REVIEWED: Don't crash for files that don't end in newlines (#3981) by @Peter0x44
|
||||
[parser] REVIEWED: Issues in usage example help text (#4084) by @Peter0x44
|
||||
[parser] REVIEWED: Fix parsing of empty parentheses (#3974) by @Filyus
|
||||
[parser] REVIEWED: Address parsing issue when generating XML #3893 by @Ray
|
||||
[parser] REVIEWED: `MemoryCopy()`, prevent buffer overflow by replacing hard-coded arguments (#4011) by @avx0
|
||||
[misc] ADDED: Create logo/raylib.icns by @Ray
|
||||
[misc] ADDED: Create logo/raylib_1024x1024.png by @Ray
|
||||
[misc] ADDED: Default vertex/fragment shader for OpenGL ES 3.0 (#4178) by @Lázaro Albuquerque
|
||||
[misc] REVIEWED: README.md, fix Reddit badge (#4136) by @Ninad Sachania
|
||||
[misc] REVIEWED: .gitignore, ignore compiled dll binaries (#3628) by @2Bear
|
||||
[misc] REVIEWED: Fix undesired scrollbars on web shell files (#4104) by @jspast
|
||||
[misc] REVIEWED: Made comments on raylib.h match comments in rcamera.h (#3942) by @Tomas Fabrizio Orsi
|
||||
[misc] REVIEWED: Make raylib/raygui work better on touchscreen (#3728) by @Hongyu Ouyang
|
||||
[misc] REVIEWED: Update config.h by @Ray
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
Release: raylib 5.0 - 10th Anniversary Edition (18 November 2023)
|
||||
-------------------------------------------------------------------------
|
||||
KEY CHANGES:
|
||||
- REDESIGNED: rcore module platform-split, by @ubkp, @michaelfiber, @Bigfoot71, @raysan5
|
||||
- ADDED: New platform backend supported: SDL
|
||||
- ADDED: New platform backend supported: Nintendo Switch (closed source)
|
||||
- ADDED: New Splines drawing and evaluation API
|
||||
- ADDED: New pseudo-random numbers generator: rprand
|
||||
- ADDED: Automation Events System API
|
||||
- UPDATED: raygui 4.0: New version of this immediate-mode gui system for tools development with raylib
|
||||
|
||||
Detailed changes:
|
||||
[rcore] ADDED: RAYLIB_VERSION_* values to raylib.h (#2856) by @RobLoach
|
||||
[rcore] ADDED: IsKeyPressedRepeat() on PLATFORM_DESKTOP (#3245) by @actondev
|
||||
[rcore] ADDED: SetWindowTitle() for PLATFORM_WEB (#3222) by @VitusVeit
|
||||
[rcore] ADDED: FLAG_WINDOW_RESIZABLE for web (#3305) by @Peter0x44
|
||||
[rcore] ADDED: SetWindowMaxSize() for desktop and web (#3309) by @ubkp
|
||||
[rcore] ADDED: SetMouseCursor() for PLATFORM_WEB (#3414) by @BeardedBread
|
||||
[rcore] ADDED: LoadRandomSequence()/UnloadRandomSequence() by @raysan5
|
||||
[rcore] REMOVED: PLATFORM_RPI (#3232) by @michaelfiber
|
||||
[rcore] REVIEWED: GetFileLength(), added comment (#3262) by @raysan5
|
||||
[rcore] REVIEWED: Default shaders precission issue on PLATFORM_WEB (#3261) by @branc116
|
||||
[rcore] REVIEWED: IsKey*() key validation checks (#3256) by @n77y
|
||||
[rcore] REVIEWED: SetClipboardText() for PLATFORM_WEB (#3257) by @ubkp
|
||||
[rcore] REVIEWED: Check if Ctrl modifier is among the currently set modifiers (#3230) by @mohad12211
|
||||
[rcore] REVIEWED: Android app black screen when reopening by @Bigfoot71
|
||||
[rcore] REVIEWED: Warnings when casting int to floats (#3218) by @JeffM2501
|
||||
[rcore] REVIEWED: GetCurrentMonitor() detection inconsistency issue (#3215) by @ubkp
|
||||
[rcore] REVIEWED: SetWindowMonitor() to no longer force fullscreen (#3209) by @ubkp
|
||||
[rcore] REVIEWED: Fix mouse wheel not working in PLATFORM_RPI or PLATFORM_DRM (#3193) by @ubkp
|
||||
[rcore] REVIEWED: GetMonitorName() description (#3184) (#3189) by @danilwhale
|
||||
[rcore] REVIEWED: BeginScissorMode(), identify rendering to texture (#3510) by @gulrak
|
||||
[rcore] REVIEWED: Window flags order (#3114) by @lesleyrs
|
||||
[rcore] REVIEWED: Full movement for right analog stick (#3095) by @PixelPhobicGames
|
||||
[rcore] REVIEWED: Fix Android app freeze after calling CloseWindow() (#3067) by @Bigfoot71
|
||||
[rcore] REVIEWED: Lazy loading of default font used on image drawing (no InitWindow) by @raysan5
|
||||
[rcore] REVIEWED: Minor tweaks to raylib events automation system @raysan5
|
||||
[rcore] REVIEWED: GetCurrentMonitor() bugfix (#3058) by @hamyyy
|
||||
[rcore] REVIEWED: Update CORE.Input.Touch.pointCount (#3024) by @raysan5
|
||||
[rcore] REVIEWED: Mouse offset and scaling must be considered also on web!
|
||||
[rcore] REVIEWED: CompressData(), possible stack overflow
|
||||
[rcore] REVIEWED: GetWorldToScreenEx() (#3351) by @Brian-ED
|
||||
[rcore] REVIEWED: Fix GetMouseDelta() issue for Android (#3404) by @Bigfoot71
|
||||
[rcore] REVIEWED: GetFPS(), reset FPS averages when window is inited (#3445) by @JeffM2501
|
||||
[rcore] REVIEWED: GetCurrentMonitor(), check window center position by @M374LX
|
||||
[rcore] REVIEWED: GetRender*() issue on macOS highDPI (#3367) by @raysan5
|
||||
[rcore] REVIEWED: ScanDirectoryFiles*(), paths building slashes sides (#3507)
|
||||
[rlgl] ADDED: Experimental support for OpenGL ES 3.0 by @raysan5
|
||||
[rlgl] ADDED: Support 16-Bit HDR textures (#3220) by @Not-Nik
|
||||
[rlgl] ADDED: rlEnablePointMode() (#3490) by @JettMonstersGoBoom
|
||||
[rlgl] ADDED: rlBlitFramebuffer(), required for deferred render
|
||||
[rlgl] REVIEWED: LoadModel(), removed cube fallback mechanism (#3459)
|
||||
[rlgl] REVIEWED: Improved support for ES3/WebGL2 (#3107) by @chemaguerra
|
||||
[rlgl] REVIEWED: OpenGL 2.1 half floats support as part of an extension by @Not-Nik
|
||||
[rlgl] REVIEWED: Avoid shader attribute not found log by @raysan5
|
||||
[rlgl] REVIEWED: Avoid tracelog about not found uniforms (#3003) by @raysan5
|
||||
[rlgl] REVIEWED: rLoadTexture() UBSAN complaints #1891 (#3321) by @Codom
|
||||
[rlgl] REVIEWED: glInternalFormat as unsigned int
|
||||
[rlgl] REVIEWED: OpenGL ES 3.0 support
|
||||
[rshapes] ADDED: Spline drawing functions by @raysan5
|
||||
[rshapes] ADDED: GetSplinePoint*() functions for spline evaluation by @raysan5
|
||||
[rshapes] ADDED: DrawCircleLinesV() for consistency (#3452) by @Peter0x44
|
||||
[rshapes] REVIEWED: DrawSplineCatmullRom() by @raysan5
|
||||
[rshapes] REVIEWED: Minor fix in DrawLineBezier* (#3006) by @eternalStudent
|
||||
[rshapes] REVIEWED: GetCollisionRec(), more performant (#3052) by @manuel5975p
|
||||
[rshapes] REVIEWED: Fix off-by-one error in CheckCollisionPointRec() (#3022) by @dbechrd
|
||||
[rtextures] ADDED: Basic SVG loading support (#2738) by @bXi
|
||||
[rtextures] ADDED: Support 16-Bit HDR textures (#3220) by @Not-Nik
|
||||
[rtextures] ADDED: ExportImageToMemory() by @raysan5
|
||||
[rtextures] ADDED: ImageRotate() (#3078) by @danemadsen
|
||||
[rtextures] ADDED: GenImageGradientSquare() (#3077) by @danemadsen
|
||||
[rtextures] ADDED: GenImageLinearGradient() by @danemadsen
|
||||
[rtextures] REMOVED: GenImageGradientH() and GenImageGradientV() by @danemadsen
|
||||
[rtextures] REVIEWED: LoadImageSvg() by @raysan5
|
||||
[rtextures] REVIEWED: Uninitialized thread-locals in stbi (#3282) (#3283) by @jbarthelmes
|
||||
[rtextures] REVIEWED: ImageDrawRectangleRec(), validate drawing inside bounds by @JeffM2501
|
||||
[rtextures] REVIEWED: LoadTextureCubemap() for manual layouts (#3204) by @Not-Nik
|
||||
[rtextures] REVIEWED: Optimization of ImageDrawRectangleRec() (#3185) by @smalltimewizard
|
||||
[rtextures] REVIEWED: ImageRotate() formatting by @raysan5
|
||||
[rtextures] REVIEWED: GenImagePerlinNoise(), clamp values (#3071) by @raysan5
|
||||
[rtextures] REVIEWED: Packing logic error in GenImageFontAtlas() (#2979) by @hanaxar
|
||||
[rtextures] REVIEWED: Calculate exact image size in GenImageFontAtlas() (#2963) by @hanaxar
|
||||
[rtextures] REVIEWED: ImageDrawRectangleRec() (#3027) by @raysan5
|
||||
[rtextures] REVIEWED: ImageDraw() source clipping when drawing beyond top left (#3306) by @RobLoach
|
||||
[rtextures] REVIEWED: UnloadRenderTexture(), additional checks
|
||||
[rtextures] REVIEWED: Fixed compressed DDS texture loading issues (#3483) by @JaanDev
|
||||
[rtext] ADDED: Font altas white rectangle and flag SUPPORT_FONT_ATLAS_WHITE_REC by @raysan5
|
||||
[rtext] ADDED: SetTextLineSpacing() to define line breaks text drawing spacing by @raysan5
|
||||
[rtext] RENAMED: LoadFont*() parameter names for consistency and coherence by @raysan5
|
||||
[rtext] REVIEWED: GetCodepointCount(), ignore unused return value of GetCodepointNext by @ashn-dot-dev
|
||||
[rtext] REVIEWED: TextFormat() warn user if buffer overflow occured (#3399) by @Murlocohol
|
||||
[rtext] REVIEWED: TextFormat(), added "..." for truncation (#3366) by @raysan5
|
||||
[rtext] REVIEWED: GetGlyphIndex() (#3000) by @raysan5
|
||||
[rtext] REVIEWED: GetCodepointNext() to return default value by @chocolate42
|
||||
[rtext] REVIEWED: TextToPascal() issue when first char is uppercase
|
||||
[rmodels] ADDED: ModelAnimation.name field, initially with GLTF animation names by @alfredbaudisch
|
||||
[rmodels] REDESIGNED: LoadOBJ(), avoid mesh splitting by materials, fix (#3398) by @raysan5
|
||||
[rmodels] REVIEWED: Support .vox model files version 200 (#3097) by @Bigfoot71
|
||||
[rmodels] REVIEWED: Materials loading (#3126) @raysan5
|
||||
[rmodels] REVIEWED: DrawBillboardPro() to allow source of negative size (#3197) by @bohonghuang
|
||||
[rmodels] REVIEWED: glTF loading segfault in animNormals memcpy by @charles-l
|
||||
[rmodels] REVIEWED: LoadModelAnimationsGLTF(), free fileData after use (#3065) by @crynux
|
||||
[rmodels] REVIEWED: GenMeshCubicmap(), correction of values (#3032) by @Bigfoot71
|
||||
[rmodels] REVIEWED: DrawMesh() to avoid UBSAN complaining (#1891)
|
||||
[rmodels] REVIEWED: GenMeshPlane() when resX != resZ (#3425) by @neyrox, @s-yablonskiy
|
||||
[rmodels] REVIEWED: GetModelBoundingBox() (#3485)
|
||||
[raudio] ADDED: LoadSoundAlias() by @JeffM2501
|
||||
[raudio] ADDED: Missing structure on standalone mode (#3160) by @raysan5
|
||||
[raudio] ADDED: GetMasterVolume() (#3434) by @rexim
|
||||
[raudio] REVIEWED: Comments about sample format to AttachAudioStreamProcessor() (#3188) by @AlbertoGP
|
||||
[raudio] REVIEWED: Documented buffer format for audio processors (#3186) by @AlbertoGP
|
||||
[raudio] REVIEWED: ExportWaveAsCode() file saving by @RadsammyT
|
||||
[raudio] REVIEWED: Fix warning on discarded const qualifier (#2967) by @RobLoach
|
||||
[raudio] REVIEWED: Move mutex initialization before ma_device_start() (#3325) by @Bigfoot71
|
||||
[raudio] REVIEWED: Fix UpdateSound() parameter name (#3405) by @KislyjKisel
|
||||
[raudio] REVIEWED: Fix QOA seeking (#3494) by @veins1
|
||||
[rcamera] REVIEWED: File-macros for consistency (#3161) by @raysan5
|
||||
[rcamera] REVIEWED: Support analog stick camera controls (#3066) by @PixelPhobicGames
|
||||
[rcamera] REVIEWED: CameraMoveToTarget(), ensure distance is greater than 0 (#3031) by @kolunmi
|
||||
[rcamera] REVIEWED: Exposing rcamera functions to the dll (#3355) by @JeffM2501
|
||||
[raymath] ADDED: Vector3Projection() and Vector3Rejection() (#3263) by @Dial0
|
||||
[raymath] ADDED: EPSILON macro to each function requiring it (#3330) by @Brian-ED
|
||||
[raymath] REVIEWED: Usage of 'sinf()' and 'cosf()' to be correct (#3181) by @RokasPuzonas
|
||||
[raymath] REVIEWED: Slightly optimized Vector3Normalize() (#2982) by @RicoP
|
||||
[raymath] REVIEWED: Comment to clarify raymath semantics by @raysan5
|
||||
[raymath] REVIEWED: Comment about Matrix conventions by @raysan5
|
||||
[raymath] REVIEWED: Vector2Angle() and Vector2LineAngle() (#3396) by @Murlocohol
|
||||
[rgestures] REVIEWED: Optimize and simplify the gesture system (#3190) by @ubkp
|
||||
[rgestures] REVIEWED: GESTURE_DRAG and GESTURE_SWIPE_* issues (mostly) for web (#3183) by @ubkp
|
||||
[rgestures] REVIEWED: Touch pointCount for web (#3163) by @ubkp
|
||||
[rgestures] REVIEWED: IsGestureDetected() parameter type
|
||||
[utils] ADDED: Security checks to file reading (memory allocations) by @raysan5
|
||||
[utils] REVIEWED: LoadFileData() potential issues with dataSize
|
||||
[examples] ADDED: shaders_lightmap (#3043) by @nullstare
|
||||
[examples] ADDED: core_2d_camera_split_screen (#3298) by @gabrielssanches
|
||||
[examples] ADDED: LoadSoundAlias() usage example (#3223) by @JeffM2501
|
||||
[examples] ADDED: textures_tiling (#3353) by @luis605
|
||||
[examples] ADDED: shader_deferred_render (#3496) by @27justin
|
||||
[examples] RENAMED: 2d_camera examples for consistency
|
||||
[examples] REVIEWED: Text examples SetTextLineSpacing() to multiline examples by @raysan5
|
||||
[examples] REVIEWED: examples/shapes/shapes_collision_area.c help instructions (#3279) by @asdqwe
|
||||
[examples] REVIEWED: examples/shaders/shaders_texture_outline.c help instructions (#3278) by @asdqwe
|
||||
[examples] REVIEWED: examples/others/easings_testbed.c help instructions and small twe… by @asdqwe
|
||||
[examples] REVIEWED: example/audio/audio_module_player.c help instructions and small b… by @asdqwe
|
||||
[examples] REVIEWED: example/models/models_loading_m3d.c controls (#3269) by @asdqwe
|
||||
[examples] REVIEWED: example/models/models_loading_gltf.c controls (#3268) by @asdqwe
|
||||
[examples] REVIEWED: text_unicode.c example crashing (#3250) by @ubkp
|
||||
[examples] REVIEWED: rlgl_standalone.c compilation issue (#3242) by @ubkp
|
||||
[examples] REVIEWED: core_input_gestures for Web (#3172) by @ubkp
|
||||
[examples] REVIEWED: core_input_gamepad (#3110) by @iacore
|
||||
[examples] REVIEWED: examples using raygui to raygui 4.0 by @raysan5
|
||||
[examples] REVIEWED: Julia set shader example (#3467) by @joshcol9232
|
||||
[build] ADDED: CMake option for SUPPORT_CUSTOM_FRAME_CONTROL (#3221) by @ubkp
|
||||
[build] ADDED: New BORDERLESS_WINDOWED_MODE for PLATFORM_DESKTOP (#3216) by @ubkp
|
||||
[build] ADDED: New examples to VS2022 solution by @raysan5
|
||||
[build] REVIEWED: Updated Makefile and Makefile.Web, include new examples
|
||||
[build] REVIEWED: Fix CMake extraneous -lglfw (#3266) by @iacore
|
||||
[build] REVIEWED: Add missing cmake options (#3267) by @asdqwe
|
||||
[build] REVIEWED: Match CMakeOptions.txt options default values (#3258) by @asdqwe
|
||||
[build] REVIEWED: Add build.zig options for individual modules (#3254) by @actondev
|
||||
[build] REVIEWED: build.zig to work with cross-compiling (#3225) by @yujiri8
|
||||
[build] REVIEWED: Makefile build on PLATFORM_ANDROID, soname (#3211) by @ndytts
|
||||
[build] REVIEWED: src/Makefile, fix misleading indentation (#3202) by @ashn-dot-dev
|
||||
[build] REVIEWED: build.zig: Support for building with PLAFORM_DRM (#3191) by @jakubvf
|
||||
[build] REVIEWED: Update CMakeOptions.txt by @raysan5
|
||||
[build] REVIEWED: fix: cmake option "OPENGL_VERSION" doesn't work (#3170) by @royqh1979
|
||||
[build] REVIEWED: Add error if raylib.h is included in a C++98 program (#3093) by @Peter0x44
|
||||
[build] REVIEWED: Cross compilation for PLATFORM_DRM (#3091) by @TheLastBilly
|
||||
[build] REVIEWED: build.zigm fixed cross-compiling from Linux (#3090)by @yujiri8
|
||||
[build] REVIEWED: Enhanced cmake part for OpenBSD (#3086) by @rayit
|
||||
[build] REVIEWED: Fixed compile on OpenBSD (#3085)by @rayit
|
||||
[build] REVIEWED: CMake project example: fix a couple of typos (#3014) by @benjamin-thomas
|
||||
[build] REVIEWED: Fix warnings in raylib for MSVC (#3004) by @JeffM2501
|
||||
[build] REVIEWED: Update cmake example project (#3062) by @lesleyrs
|
||||
[build] REVIEWED: Update build.zig be be able to build with current zig master (#3064) by @ryupold
|
||||
[build] REVIEWED: VSCode project template (#3048) by @Shoozza
|
||||
[build] REVIEWED: Fixed broken build.zig files. Now works with latest stable compiler (… by @Gamer-Kold
|
||||
[build] REVIEWED: Fix missing symbol when rglfw.c on BSD platforms (#2968) by @Koromix
|
||||
[build] REVIEWED: Update Makefile comment to indicate arm64 as a supported Linux deskto… @ashn-dot-dev
|
||||
[build] REVIEWED: Update Makefile : clean raygui.c & physac.c (#3296) by @SuperUserNameMan
|
||||
[build] REVIEWED: Update webassembly.yml and linux.yml
|
||||
[build] REVIEWED: Update zig build system to zig version 0.11.0 (#3393) by @purple4pur
|
||||
[build] REVIEWED: Fix for latest zig master (#3037) by @star-tek-mb
|
||||
[build] REVIEWED: Examples Makefile to use Makefile.Web when building for web (#3449) by @keithstellyes
|
||||
[build] REVIEWED: build.zig updates for 0.11.0 release. (#3501) by @cabarger
|
||||
[build] REVIEWED: Support OpenGL ES 3.0 building on Web platform
|
||||
[build] REVIEWED: Fix warnings in Visual Studio (#3512) by @JeffM2501
|
||||
[build] REVIEWED: OpenGL ES 3.0 flags on CMakeOptions (#3514) by @awfulcooking
|
||||
[bindings] ADDED: fortran-raylib
|
||||
[bindings] ADDED: raylib-raku to bindings (#3299) by @vushu
|
||||
[bindings] ADDED: claw-raylib to BINDINGS.md (#3310) by @bohonghuang
|
||||
[bindings] ADDED: vaiorabbit/raylib-bindings (#3318) by @wilsonsilva
|
||||
[bindings] ADDED: TurboRaylib (#3317) by @turborium
|
||||
[bindings] ADDED: raylib-ffi to bindings list (#3164) by @ewpratten
|
||||
[bindings] ADDED: raylib-pkpy-bindings (#3361) by @blueloveTH
|
||||
[bindings] ADDED: Raylib.lean to BINDINGS.md (#3409) by @KislyjKisel
|
||||
[bindings] UPDATED: BINDINGS.md (#3217) by @joseph-montanez
|
||||
[bindings] UPDATED: BINDINGS.md to include rayjs (#3212) by @mode777
|
||||
[bindings] UPDATED: latest h-raylib version (#3166) by @Anut-py
|
||||
[bindings] UPDATED: bindbd-raylib3 to raylib 4.5 (#3157) by @o3o
|
||||
[bindings] UPDATED: Janet bindings supported version update (#3083)by @archydragon
|
||||
[bindings] UPDATED: BINDINGS.md (raylib-py -> 4.5) (#2992) by @overdev
|
||||
[bindings] UPDATED: BINDINGS.md (raylib-lua -> 4.5) (#2989) by @TSnake41
|
||||
[bindings] UPDATED: raylib-d binding version to 4.5 (#2988) by @schveiguy
|
||||
[bindings] UPDATED: raylib-freebasic to 4.5 (#2986) by @WIITD
|
||||
[bindings] UPDATED: BINDINGS.md (#2983) by @jarroddavis68
|
||||
[bindings] UPDATED: BINDINGS.md for raylib Odin 4.5 (#2981) by @gingerBill
|
||||
[bindings] UPDATED: BINDINGS.md (#2980) by @GuvaCode
|
||||
[bindings] UPDATED: BINDINGS.md (#3002) by @fubark
|
||||
[bindings] UPDATED: BINDINGS.md (#3053) by @JupiterRider
|
||||
[bindings] UPDATED: BINDINGS.md (#3050) by @Its-Kenta
|
||||
[bindings] UPDATED: CL bindings version (#3049) by @shelvick
|
||||
[bindings] UPDATED: BINDINGS.md (#3026) by @ChrisDill
|
||||
[bindings] UPDATED: BINDINGS.md (#3023) by @sDos280
|
||||
[bindings] UPDATED: BINDINGS.md (#3017) by @Soutaisei
|
||||
[bindings] UPDATED: Various versions to 4.5 (#2974) by @RobLoach
|
||||
[bindings] UPDATED: raylib.zig version to 4.5 (#2971) by @ryupold
|
||||
[bindings] UPDATED: h-raylib version (#2970) by @Anut-py
|
||||
[bindings] UPDATED: Factor's raylib binding to v4.5 (#3350) by @WraithGlade
|
||||
[bindings] UPDATED: raylib-ocaml bindings to 4.5 version (#3322) by @tjammer
|
||||
[bindings] UPDATED: Jaylib binding (#3508) by @glowiak
|
||||
[external] UPDATED: sdefl and sinfl DEFLATE compression libraries by @raysan5
|
||||
[external] UPDATED: miniaudio v0.11.12 --> v0.11.19 by @raysan5
|
||||
[external] UPDATED: rl_gputex.h compressed images loading library by @raysan5
|
||||
[external] UPDATED: Replaced stb_image_resize.c by stb_image_resize2.h (#3403) by @BabakSamimi
|
||||
[external] UPDATED: qoi and qoa libraries
|
||||
[external] UPDATED: stb libraries (required ones)
|
||||
[external] UPDATED: cgltf and m3d libraries
|
||||
[external] REVIEWED: msf_gif.h, some warnings
|
||||
[external] REVIEWED: sinfl external library to avoid ASAN complaints (#3349) by @raysan5
|
||||
[misc] ADDED: New task point to issue template about checking the wiki (#3169) by @ubkp
|
||||
[misc] ADDED: CodeQL for static code analysis (#3476) by @b4yuan
|
||||
[misc] REVIEWED: Update FAQ.md by @raysan5
|
||||
[misc] REVIEWED: Potential code issues reported by CodeQL (#3476)
|
||||
[misc] REVIEWED: Fix a link in the FAQ (#3082)by @jasonliang-dev
|
||||
[misc] REVIEWED: New file formats to FAQ (#3079) by @Luramoth
|
||||
[misc] REVIEWED: Make assets loading extension case insensitive #3008 by @raysan5
|
||||
[misc] REVIEWED: Updated web shells open-graph info by @raysan5
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
Release: raylib 4.5 (18 March 2023)
|
||||
-------------------------------------------------------------------------
|
||||
KEY CHANGES:
|
||||
- ADDED: Improved ANGLE support on Desktop platforms
|
||||
- ADDED: rcamera module, simpler and more extendable
|
||||
- ADDED: Support for M3D models and M3D/GLTF animations
|
||||
- ADDED: Support QOA audio format (import/export)
|
||||
- ADDED: rl_gputex module for compressed textures loading
|
||||
- REDESIGNED: rlgl module for automatic render-batch limits checking
|
||||
- REDESIGNED: rshapes module to minimize the rlgl dependency
|
||||
|
||||
Detailed changes:
|
||||
[core] ADDED: RAYLIB_VERSION_* values to raylib.h (#2856) by @RobLoach
|
||||
[core] ADDED: Basic gamepad support for Android (#2709) by @deniska
|
||||
[core] ADDED: Support CAPS/NUM lock keys registering if locked
|
||||
[core] ADDED: _GNU_SOURCE define on Linux (#2729)
|
||||
[core] ADDED: SetWindowIcons() to set multiple icon image sizes
|
||||
[core] `WARNING`: RENAMED: Exported raylib version symbol to raylib_version #2671
|
||||
[core] REMOVED: Touch points on touch up events on Android (#2711) by @deniska
|
||||
[core] REVIEWED: Window position setup on InitWindow() (#2732) by @RandomErrorMessage
|
||||
[core] REVIEWED: Touchscreen input related functions on Android (#2702) by @deniska
|
||||
[core] REVIEWED: Viewport scaling on Android after context rebind (#2703) by @deniska
|
||||
[core] REVIEWED: ScanDirectoryFilesRecursively() (#2704)
|
||||
[core] REVIEWED: Gamepad mappings with latest gamecontrollerdb (#2725)
|
||||
[core] REVIEWED: Monitor order check on app initialization
|
||||
[core] REVIEWED: Application monitor when opening (#2728, #2731) by @RandomErrorMessage
|
||||
[core] REVIEWED: Gestures module to use GetTime() if available (#2733) by @RobLoach
|
||||
[core] REVIEWED: Resolve GLFW3 some symbols re-definition of windows.h in glfw3native (#2643) by @daipom
|
||||
[core] REVIEWED: OpenURL(), string buffer too short sometimes
|
||||
[core] REVIEWED: GetRandomValue() range limit warning (#2800) by @Pere001
|
||||
[core] REVIEWED: UnloadDirectoryFiles()
|
||||
[core] REVIEWED: GetKeyPressed(), out of range issue (#2814) by @daipom
|
||||
[core] REVIEWED: GetTime(), renamed variable 'time' to 'nanoSeconds' (#2816) by @jtainer
|
||||
[core] REVIEWED: LoadShaderFromMemory(), issue with shader linkage
|
||||
[core] REVIEWED: Avoid possible gamepad index as -1 (#2839)
|
||||
[core] REVIEWED: SetShaderValue*(), avoid setup uniforms for invalid locations
|
||||
[core] REVIEWED: GetClipboardText() on PLATFORM_WEB, permissions issues
|
||||
[core] REVIEWED: Initial window position for display-sized fullscreen (#2742) by @daipom
|
||||
[core] REVIEWED: Sticky touches input (#2857) by @ImazighenGhost
|
||||
[core] REVIEWED: Enable GetWindowHandle() on macOS (#2915) by @Not-Nik
|
||||
[core] REVIEWED: Window position always inits centered in current monitor
|
||||
[core] REVIEWED: IsWindowFocused() to consider Android App state (#2935)
|
||||
[core] REVIEWED: GetMonitorWidth() and GetMonitorHeight() (#2934)
|
||||
[core] REVIEWED: GetWindowHandle() to return Linux window (#2938)
|
||||
[core] REVIEWED: WindowDropCallback(), additional security check (#2943)
|
||||
[core] REVIEWED: Security checks for emscripten_run_script() (#2954)
|
||||
[utils] REVIEWED: TraceLog() message size limit overflow
|
||||
[rcamera] REDESIGNED: New implementation from scratch (#2563) by @Crydsch
|
||||
[rcamera] REVIEWED: Make orbital camera work as expected (#2926) by @JeffM2501
|
||||
[rcamera] REVIEWED: Multiple reviews on the new implementation
|
||||
[rcamera] ADDED: UpdateCameraPro(), supporting custom user inputs
|
||||
[rlgl] ADDED: OpenGL ES 2.0 support on PLATFORM_DESKTOP (#2840) by @wtnbgo
|
||||
[rlgl] ADDED: Separate blending modes for color and alpha, BLEND_CUSTOM_SEPARATE (#2741)
|
||||
[rlgl] ADDED: rlSetBlendFactorsSeparate and custom blend mode modification checks (#2741) by @pure01fx
|
||||
[rlgl] ADDED: RL_TEXTURE_MIPMAP_BIAS_RATIO support to `rlTextureParameters()` for OpenGL 3.3 #2674
|
||||
[rlgl] ADDED: rlCubemapParameters() (#2862) by @GithubPrankster
|
||||
[rlgl] ADDED: rlSetCullFace() (#2797) by @jtainer
|
||||
[rlgl] REMOVED: Mipmaps software generation for OpenGL 1.1
|
||||
[rlgl] REVIEWED: Check for extensions before enabling them (#2706) by @Not-Nik
|
||||
[rlgl] REVIEWED: SSBO usage to avoid long long data types
|
||||
[rlgl] REVIEWED: Enable DXT compression on __APPLE__ targets (#2694) by @Not-Nik
|
||||
[rlgl] REVIEWED: enums exposed and description comments
|
||||
[rlgl] REVIEWED: rlBindImageTexture(), correct data types (#2808) by @planetis-m
|
||||
[rlgl] REVIEWED: rlMultMatrixf(), use const pointer (#2807) by @planetis-m
|
||||
[rlgl] REVIEWED: Expose OpenGL blending mode factors and functions/equations
|
||||
[rlgl] REVIEWED: rLoadTextureDepth(), issue with depth textures on WebGL (#2824)
|
||||
[rlgl] REVIEWED: rlUnloadFramebuffer() (#2937)
|
||||
[raymath] ADDED: Vector2LineAngle() (#2887)
|
||||
[raymath] REVIEWED: Vector2Angle() (#2829, #2832) by @AlxHnr, @planetis-m
|
||||
[shapes] ADDED: CheckCollisionPointPoly() (#2685) by @acejacek
|
||||
[shapes] REVIEWED: DrawPixel*(), use RL_QUADS/RL_TRIANGLES (#2750) by @hatkidchan
|
||||
[shapes] REVIEWED: DrawLineBezier*(), fix bezier line breaking (#2735, #2767) by @nobytesgiven
|
||||
[textures] ADDED: ColorBrightness()
|
||||
[textures] ADDED: ColorTint()
|
||||
[textures] ADDED: ColorContrast()
|
||||
[textures] ADDED: Support for PNM images (.ppm, .pgm)
|
||||
[textures] ADDED: GenImagePerlinNoise()
|
||||
[textures] ADDED: GenImageText(), generate grayscale image from text byte data
|
||||
[textures] ADDED: ImageDrawCircleLines(), ImageDrawCircleLinesV() (#2713) by @RobLoach
|
||||
[textures] ADDED: ImageBlurGaussian() (#2770) by @nobytesgiven
|
||||
[textures] REVIEWED: Image fileformat support: PIC, PNM
|
||||
[textures] REVIEWED: ImageTextEx() and ImageDrawTextEx() scaling (#2756) by @hatkidchan
|
||||
[textures] `WARNING`: REMOVED: DrawTextureQuad()
|
||||
[textures] `WARNING`: REMOVED: DrawTexturePoly(), function moved to example: `textures_polygon`
|
||||
[textures] `WARNING`: REMOVED: DrawTextureTiled(),function implementation moved to the textures_tiled.c
|
||||
[text] ADDED: GetCodepointPrevious()
|
||||
[text] ADDED: UnloadUTF8(), aligned with LoadUTF8()
|
||||
[text] `WARNING`: RENAMED: TextCodepointsToUTF8() to LoadUTF8()
|
||||
[text] `WARNING`: RENAMED: GetCodepoint() -> GetCodepointNext()
|
||||
[text] REDESIGNED: GetCodepointNext()
|
||||
[text] REVIEWED: MeasureTextEx(), avoid crash on bad data
|
||||
[text] REVIEWED: UnloadFontData(), avoid crash on invalid font data
|
||||
[models] ADDED: Support M3D model file format (meshes and materials) (#2648) by @bztsrc
|
||||
[models] ADDED: Support for M3D animations (#2648) by @bztsrc
|
||||
[models] ADDED: GLTF animation support (#2844) by @charles-l
|
||||
[models] ADDED: DrawCapsule() and DrawCapsuleWires() (#2761) by @IanBand
|
||||
[models] ADDED: LoadMaterials(), MTL files loading, same code as OBJ loader (#2872) by @JeffM2501
|
||||
[models] `WARNING`: REMOVED: UnloadModelKeepMeshes()
|
||||
[models] `WARNING`: REMOVED: DrawCubeTexture(), DrawCubeTextureRec(), functions moved to new example: `models_draw_cube_texture`
|
||||
[models] REVIEWED: DrawMesh(), using SHADER_LOC_COLOR_SPECULAR as a material map (#2908) by @haved
|
||||
[models] REVIEWED: LoadM3D() vertex color support (#2878) by @GithubPrankster, @bztsrc
|
||||
[models] REVIEWED: GenMeshHeightmap() (#2716)
|
||||
[models] REVIEWED: LoadIQM() (#2676)
|
||||
[models] REVIEWED: Simplify .vox signature check (#2752) by @CrezyDud
|
||||
[models] REVIEWED: LoadIQM(), support bone names loading if available (#2882) by @PencilAmazing
|
||||
[models] REVIEWED: GenMeshTangents(), avoid crash on missing texcoords data (#2927)
|
||||
[audio] ADDED: Full support for QOA audio file format
|
||||
[audio] ADDED: Mixed audio processor (#2929) by @hatkidchan
|
||||
[audio] ADDED: IsWaveReady()`, IsSoundReady(), IsMusicReady() (#2892) by @RobLoach
|
||||
[audio] `WARNING`: REMOVED: Multichannel audio API: PlaySoundMulti(), StopSoundMulti()
|
||||
[audio] REVIEWED: Clear PCM buffer state when closing audio device (#2736) by @veins1
|
||||
[audio] REVIEWED: Android backend selected (#2118, #2875) by @planetis-m
|
||||
[audio] REVIEWED: Change default threading model for COM objects in miniaudio
|
||||
[multi] ADDED: IsShaderReady(), IsImageReady(), IsFontReady() (#2892) by @RobLoach
|
||||
[multi] ADDED: IsModelReady(), IsMaterialReady(), IsTextureReady(), IsRenderTextureReady() (#2895) by @RobLoach
|
||||
[multi] REVIEWED: Multiple code/comment typos by @sDos280
|
||||
[multi] REVIEWED: Grammar mistakes and typos (#2914) by @stickM4N
|
||||
[multi] REVIEWED: Use TRACELOG() macro instead of TraceLog() in internal modules (#2881) by @RobLoach
|
||||
[examples] ADDED: textures_textured_curve (#2821) by @JeffM2501
|
||||
[examples] ADDED: models_draw_cube_texture
|
||||
[examples] ADDED: models_loading_m3d (#2648) by @bztsrc
|
||||
[examples] ADDED: shaders_write_depth (#2836) by @BugraAlptekinSari
|
||||
[examples] ADDED: shaders_hybrid_render (#2919) by @BugraAlptekinSari
|
||||
[examples] REMOVED: audio_multichannel_sound
|
||||
[examples] RENAMED: Several shaders for naming consistency (#2707)
|
||||
[examples] RENAMED: lighting_instanced.fs to lighting_instancing.fs (glsl100) (#2805) by @gtrxAC
|
||||
[examples] REVIEWED: core_custom_logging.c (#2692) by @hartmannathan
|
||||
[examples] REVIEWED: core_camera_2d_platformer (#2687) by @skylar779
|
||||
[examples] REVIEWED: core_input_gamepad.c (#2903) by @planetis-m
|
||||
[examples] REVIEWED: core_custom_frame_control
|
||||
[examples] REVIEWED: core_drop_files (#2943)
|
||||
[examples] REVIEWED: text_rectangle_bounds (#2746) by @SzieberthAdam
|
||||
[examples] REVIEWED: textures_image_processing, added gaussian blurring (#2775) by @nobytesgiven
|
||||
[examples] REVIEWED: models_billboard, highlighting rotation and draw order (#2779) by @nobytesgiven
|
||||
[examples] REVIEWED: core_loading_thread, join thread on completion (#2845) by @planetis-m
|
||||
[examples] REVIEWED: models_loading_gltf
|
||||
[examples] REVIEWED: Shader lighting.fs for GLSL120 (#2651)
|
||||
[examples] REVIEWED: text_codepoints_loading.c
|
||||
[parser] REVIEWED: raylib-parser Makefile (#2765) by @Peter0x44
|
||||
[build] ADDED: Packaging for distros with deb-based and rpm-based packages (#2877) by @KOLANICH
|
||||
[build] ADDED: Linkage library -latomic on Linux (only required for ARM32)
|
||||
[build] ADDED: Required frameworks on macOS (#2793) by @SpexGuy
|
||||
[build] ADDED: WASM support for Zig build (#2901) by @Not-Nik
|
||||
[build] ADDED: New raylib examples as VS2022 project (to raylib solution)
|
||||
[build] REVIEWED: config.h format and inconsistencies
|
||||
[build] REVIEWED: Zig build to latest master, avoid deprecated functions (#2910) by @star-tek-mb
|
||||
[build] REVIEWED: CMake project template to easily target raylib version (#2700) by @RobLoach
|
||||
[build] REVIEWED: PATH for PLATFORM_WEB target (#2647) by @futureapricot
|
||||
[build] REVIEWED: build.zig to let user decide how to set build mode and linker fixes by @InKryption
|
||||
[build] REVIEWED: Deprecation error on Android API higher than 23 (#2778) by @anggape
|
||||
[build] REVIEWED: Android x86 Architecture name (#2783) by @IsaacTCB
|
||||
[build] REVIEWED: examples/build.zig for the latest Zig version (#2786) by @RomanAkberov
|
||||
[utils] REVIEWED: ExportDataAsCode() data types (#2787) by @RGDTAB
|
||||
[build] REVIEWED: Makefile emscripten path (#2785) by @Julianiolo
|
||||
[build] REVIEWED: Several compilation warnings (for strict rules)
|
||||
[build] REVIEWED: All github workflows using deprecated actions
|
||||
[build] REVIEWED: CMake when compiling for web (#2820) by @object71
|
||||
[build] REVIEWED: DLL build on Windows (#2951) by @Skaytacium
|
||||
[build] REVIEWED: Avoid MSVC warnings in raylib project (#2871) by @JeffM2501
|
||||
[build] REVIEWED: Paths in .bat files to build examples (#2870) by @masoudd
|
||||
[build] REVIEWED: CMake, use GLVND for old cmake versions (#2826) by @simendsjo
|
||||
[build] REVIEWED: Makefile, multiple tweaks
|
||||
[build] REVIEWED: CI action: linux_examples.yml
|
||||
[build] REVIEWED: CI action: cmake.yml
|
||||
[bindings] ADDED: h-raylib (Haskell) by @Anut-py
|
||||
[bindings] ADDED: raylib-c3 (C3) by @Its-Kenta
|
||||
[bindings] ADDED: raylib-umka (Umka) by @RobLoach
|
||||
[bindings] ADDED: chez-raylib (Chez Scheme) by @Yunoinsky
|
||||
[bindings] ADDED: raylib-python-ctypes (Python) by @sDos280
|
||||
[bindings] ADDED: claylib (Common Lisp) by @shelvick
|
||||
[bindings] ADDED: raylib-vapi (Vala) by @lxmcf
|
||||
[bindings] ADDED: TurboRaylib (Object Pascal) by @turborium
|
||||
[bindings] ADDED: Kaylib (Kotlin/Native) by @Its-Kenta
|
||||
[bindings] ADDED: Raylib-Nelua (Nelua) by @Its-Kenta
|
||||
[bindings] ADDED: Cyber (Cyber) by @fubark
|
||||
[bindings] ADDED: raylib-sunder (Sunder) by @ashn-dot-dev
|
||||
[bindings] ADDED: raylib BQN (#2962) by @Brian-ED
|
||||
[misc] REVIEWED: Update external libraries to latest versions
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
Release: raylib 4.2 (11 August 2022)
|
||||
|
@ -222,7 +1113,7 @@ Release: raylib 4.0 - 8th Anniversary Edition (05 November 2021)
|
|||
KEY CHANGES:
|
||||
- Naming consistency and coherency: Complete review of the library: syntax, naming, comments, decriptions, logs...
|
||||
- Event Automation System: Support for input events recording and automatic re-playing, useful for automated testing and more!
|
||||
- Custom game-loop control: Intended for advance users that want to control the events polling and the timming mechanisms
|
||||
- Custom game-loop control: Intended for advanced users that want to control the events polling and the timming mechanisms
|
||||
- rlgl 4.0: Completely decoupling from platform layer and raylib, intended for standalone usage as single-file header-only
|
||||
- raymath 1.5: Complete review following new conventions, to make it more portable and self-contained
|
||||
- raygui 3.0: Complete review and official new release, more portable and self-contained, intended for tools development
|
||||
|
@ -265,7 +1156,7 @@ Detailed changes:
|
|||
[raymath] REVIEWED: QuaternionFromAxisAngle() (#1892)
|
||||
[raymath] REVIEWED: QuaternionToMatrix() returning transposed result. (#1793) by @object71
|
||||
[shapes] ADDED: RenderPolyLinesEx() (#1758) by @lambertwang
|
||||
[shapes] ADDED: DrawLineBezierCubic() (#2021) by @SAOMDVN
|
||||
[shapes] ADDED: DrawSplineBezierCubic() (#2021) by @SAOMDVN
|
||||
[textures] ADDED: GetImageColor() #2024
|
||||
[textures] REMOVED: GenImagePerlinNoise()
|
||||
[textures] RENAMED: GetTextureData() to LoadImageFromTexture()
|
||||
|
@ -403,7 +1294,7 @@ Detailed changes:
|
|||
[rlgl] REDESIGNED: rlLoadExtensions(), more details exposed
|
||||
[raymath] REVIEWED: QuaternionFromEuler() (#1651)
|
||||
[raymath] REVIEWED: MatrixRotateZYX() (#1642)
|
||||
[shapes] ADDED: DrawLineBezierQuad() (#1468) by @epsilon-phase
|
||||
[shapes] ADDED: DrawSplineBezierQuad() (#1468) by @epsilon-phase
|
||||
[shapes] ADDED: CheckCollisionLines()
|
||||
[shapes] ADDED: CheckCollisionPointLine() by @mkupiec1
|
||||
[shapes] REVIEWED: CheckCollisionPointTriangle() by @mkupiec1
|
||||
|
@ -1485,9 +2376,9 @@ other changes:
|
|||
[models] Added function DrawCubeTexture()
|
||||
[models] Added function DrawQuad()
|
||||
[models] Added function DrawRay()
|
||||
[models] Simplified funtion DrawPlane()
|
||||
[models] Simplified function DrawPlane()
|
||||
[models] Removed function DrawPlaneEx()
|
||||
[models] Simplified funtion DrawGizmo()
|
||||
[models] Simplified function DrawGizmo()
|
||||
[models] Removed function DrawGizmoEx()
|
||||
[models] Added function LoadModelEx()
|
||||
[models] Review of function LoadCubicMap()
|
||||
|
|
29
CMakeLists.txt
Executable file → Normal file
|
@ -1,8 +1,8 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(raylib)
|
||||
|
||||
# Avoid excessive expansion of variables in conditionals. In particular, if
|
||||
# "PLATFORM" is "DRM" than:
|
||||
# "PLATFORM" is "DRM" then:
|
||||
#
|
||||
# if (${PLATFORM} MATCHES "DRM")
|
||||
#
|
||||
|
@ -13,9 +13,14 @@ project(raylib)
|
|||
# See https://cmake.org/cmake/help/latest/policy/CMP0054.html
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
|
||||
# Makes a hidden visibility preset on a static lib respected
|
||||
# This is used to hide glfw's symbols from the library exports when building an so/dylib
|
||||
# See https://cmake.org/cmake/help/latest/policy/CMP0063.html
|
||||
cmake_policy(SET CMP0063 NEW)
|
||||
|
||||
# Directory for easier includes
|
||||
# Anywhere you see include(...) you can check <root>/cmake for that file
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
|
||||
# RAYLIB_IS_MAIN determines whether the project is being used from root
|
||||
# or if it is added as a dependency (through add_subdirectory for example).
|
||||
|
@ -31,12 +36,26 @@ include(CompilerFlags)
|
|||
# Registers build options that are exposed to cmake
|
||||
include(CMakeOptions.txt)
|
||||
|
||||
# Enforces a few environment and compiler configurations
|
||||
include(BuildOptions)
|
||||
if (UNIX AND NOT APPLE)
|
||||
if (NOT GLFW_BUILD_WAYLAND AND NOT GLFW_BUILD_X11)
|
||||
MESSAGE(FATAL_ERROR "Cannot disable both Wayland and X11")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Main sources directory (the second parameter sets the output directory name to raylib)
|
||||
add_subdirectory(src raylib)
|
||||
|
||||
# Uninstall target
|
||||
if(NOT TARGET uninstall)
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/Uninstall.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
add_custom_target(uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
||||
endif()
|
||||
|
||||
if (${BUILD_EXAMPLES})
|
||||
MESSAGE(STATUS "Building examples is enabled")
|
||||
add_subdirectory(examples)
|
||||
|
|
|
@ -2,93 +2,39 @@
|
|||
include(CMakeDependentOption)
|
||||
include(EnumOption)
|
||||
|
||||
enum_option(PLATFORM "Desktop;Web;Android;Raspberry Pi;DRM" "Platform to build for.")
|
||||
enum_option(PLATFORM "Desktop;Web;Android;Raspberry Pi;DRM;SDL" "Platform to build for.")
|
||||
|
||||
enum_option(OPENGL_VERSION "OFF;4.3;3.3;2.1;1.1;ES 2.0" "Force a specific OpenGL Version?")
|
||||
enum_option(OPENGL_VERSION "OFF;4.3;3.3;2.1;1.1;ES 2.0;ES 3.0" "Force a specific OpenGL Version?")
|
||||
|
||||
# Configuration options
|
||||
option(BUILD_EXAMPLES "Build the examples." ${RAYLIB_IS_MAIN})
|
||||
option(CUSTOMIZE_BUILD "Show options for customizing your Raylib library build." OFF)
|
||||
option(ENABLE_ASAN "Enable AddressSanitizer (ASAN) for debugging (degrades performance)" OFF)
|
||||
option(ENABLE_ASAN "Enable AddressSanitizer (ASAN) for debugging (degrades performance)" OFF)
|
||||
option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan) for debugging" OFF)
|
||||
option(ENABLE_MSAN "Enable MemorySanitizer (MSan) for debugging (not recommended to run with ASAN)" OFF)
|
||||
|
||||
# Shared library is always PIC. Static library should be PIC too if linked into a shared library
|
||||
option(WITH_PIC "Compile static library as position-independent code" OFF)
|
||||
option(BUILD_SHARED_LIBS "Build raylib as a shared library" OFF)
|
||||
option(MACOS_FATLIB "Build fat library for both i386 and x86_64 on macOS" OFF)
|
||||
cmake_dependent_option(USE_AUDIO "Build raylib with audio module" ON CUSTOMIZE_BUILD ON)
|
||||
|
||||
enum_option(USE_EXTERNAL_GLFW "OFF;IF_POSSIBLE;ON" "Link raylib against system GLFW instead of embedded one")
|
||||
if(UNIX AND NOT APPLE)
|
||||
option(USE_WAYLAND "Use Wayland for window creation" OFF)
|
||||
endif()
|
||||
|
||||
# GLFW build options
|
||||
option(GLFW_BUILD_WAYLAND "Build the bundled GLFW with Wayland support" OFF)
|
||||
option(GLFW_BUILD_X11 "Build the bundled GLFW with X11 support" ON)
|
||||
|
||||
option(INCLUDE_EVERYTHING "Include everything disabled by default (for CI usage" OFF)
|
||||
set(OFF ${INCLUDE_EVERYTHING} CACHE INTERNAL "Replace any OFF by default with \${OFF} to have it covered by this option")
|
||||
|
||||
# raylib modules included
|
||||
cmake_dependent_option(SUPPORT_MODULE_RSHAPES "Include module: rshapes" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_MODULE_RTEXTURES "Include module: rtextures" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_MODULE_RTEXT "Include module: rtext" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_MODULE_RMODELS "Include module: rmodels" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_MODULE_RAUDIO "Include module: raudio" ON CUSTOMIZE_BUILD ON)
|
||||
# DRM build options
|
||||
option(ENABLE_WAYLAND_DRM_LEASING "Enables DRM leasing in the DRM backend via the Wayland desktop" OFF)
|
||||
option(DISABLE_EVDEV_INPUT "Disable evdev input in the DRM backend" OFF)
|
||||
option(SUPPORT_SSH_KEYBOARD_RPI "Support using keyboard input from stdin" ON)
|
||||
|
||||
# rcore.c
|
||||
cmake_dependent_option(SUPPORT_CAMERA_SYSTEM "Provide camera module (rcamera.h) with multiple predefined cameras: free, 1st/3rd person, orbital" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_GESTURES_SYSTEM "Gestures module is included (rgestures.h) to support gestures detection: tap, hold, swipe, drag" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_MOUSE_GESTURES "Mouse gestures are directly mapped like touches and processed by gestures system" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_SSH_KEYBOARD_RPI "Reconfigure standard input to receive key inputs, works with SSH connection" OFF CUSTOMIZE_BUILD OFF)
|
||||
cmake_dependent_option(SUPPORT_DEFAULT_FONT "Default font is loaded on window initialization to be available for the user to render simple text. If enabled, uses external module functions to load default raylib font (module: text)" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_SCREEN_CAPTURE "Allow automatic screen capture of current screen pressing F12, defined in KeyCallback()" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_GIF_RECORDING "Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback()" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_BUSY_WAIT_LOOP "Use busy wait loop for timing sync instead of a high-resolution timer" OFF CUSTOMIZE_BUILD OFF)
|
||||
cmake_dependent_option(SUPPORT_EVENTS_WAITING "Wait for events passively (sleeping while no events) instead of polling them actively every frame" OFF CUSTOMIZE_BUILD OFF)
|
||||
cmake_dependent_option(SUPPORT_WINMM_HIGHRES_TIMER "Setting a higher resolution can improve the accuracy of time-out intervals in wait functions" OFF CUSTOMIZE_BUILD OFF)
|
||||
cmake_dependent_option(SUPPORT_COMPRESSION_API "Support for compression API" ON CUSTOMIZE_BUILD ON)
|
||||
include(ParseConfigHeader)
|
||||
|
||||
# rshapes.c
|
||||
cmake_dependent_option(SUPPORT_QUADS_DRAW_MODE "Use QUADS instead of TRIANGLES for drawing when possible. Some lines-based shapes could still use lines" ON CUSTOMIZE_BUILD ON)
|
||||
|
||||
# rtextures.c
|
||||
cmake_dependent_option(SUPPORT_IMAGE_EXPORT "Support image exporting to file" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_IMAGE_GENERATION "Support procedural image generation functionality (gradient, spot, perlin-noise, cellular)" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_IMAGE_MANIPULATION "Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop... If not defined only three image editing functions supported: ImageFormat(), ImageAlphaMask(), ImageToPOT()" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_PNG "Support loading PNG as textures" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_DDS "Support loading DDS as textures" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_HDR "Support loading HDR as textures" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_KTX "Support loading KTX as textures" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_ASTC "Support loading ASTC as textures" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_BMP "Support loading BMP as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_TGA "Support loading TGA as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_JPG "Support loading JPG as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_GIF "Support loading GIF as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_QOI "Support loading QOI as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_PSD "Support loading PSD as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_PKM "Support loading PKM as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_PVR "Support loading PVR as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||
|
||||
# rtext.c
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_FNT "Support loading fonts in FNT format" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_TTF "Support loading font in TTF/OTF format" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_TEXT_MANIPULATION "Support text manipulation functions" ON CUSTOMIZE_BUILD ON)
|
||||
|
||||
# rmodels.c
|
||||
cmake_dependent_option(SUPPORT_MESH_GENERATION "Support procedural mesh generation functions, uses external par_shapes.h library. NOTE: Some generated meshes DO NOT include generated texture coordinates" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_OBJ "Support loading OBJ file format" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_MTL "Support loading MTL file format" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_IQM "Support loading IQM file format" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_GLTF "Support loading GLTF file format" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_VOX "Support loading VOX file format" ON CUSTOMIZE_BUILD ON)
|
||||
|
||||
# raudio.c
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_WAV "Support loading WAV for sound" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_OGG "Support loading OGG for sound" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_XM "Support loading XM for sound" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_MOD "Support loading MOD for sound" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_MP3 "Support loading MP3 for sound" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_FILEFORMAT_FLAC "Support loading FLAC for sound" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||
|
||||
# utils.c
|
||||
cmake_dependent_option(SUPPORT_STANDARD_FILEIO "Support standard file io library (stdio.h)" ON CUSTOMIZE_BUILD ON)
|
||||
cmake_dependent_option(SUPPORT_TRACELOG "Show TraceLog() output messages. NOTE: By default LOG_DEBUG traces not shown" ON CUSTOMIZE_BUILD ON)
|
||||
foreach(FLAG IN LISTS CONFIG_HEADER_FLAGS)
|
||||
string(REGEX MATCH "([^=]+)=(.+)" _ ${FLAG})
|
||||
cmake_dependent_option(${CMAKE_MATCH_1} "" ${CMAKE_MATCH_2} CUSTOMIZE_BUILD ${CMAKE_MATCH_2})
|
||||
endforeach()
|
||||
|
|
|
@ -5,13 +5,13 @@ Hello contributors! Welcome to raylib!
|
|||
Do you enjoy raylib and want to contribute? Nice! You can help with the following points:
|
||||
|
||||
- `C programming` - Can you write/review/test/improve the code?
|
||||
- `Documentation/Tutorials/Example` - Can you write some tutorial/example?
|
||||
- `Documentation/Tutorials/Example` - Can you write some tutorials/examples?
|
||||
- `Porting to other platforms` - Can you port/adapt/compile raylib on other systems?
|
||||
- `Web Development` - Can you help [with the website](https://github.com/raysan5/raylib.com)?
|
||||
- `Testing` - Can you find some bugs in raylib?
|
||||
|
||||
This document contains a set of guidelines to contribute to the project. These are mostly guidelines, not rules.
|
||||
Use your best judgement, and feel free to propose changes to this document in a pull request.
|
||||
Use your best judgment, and feel free to propose changes to this document in a pull request.
|
||||
|
||||
### raylib philosophy
|
||||
|
||||
|
@ -28,14 +28,14 @@ Use your best judgement, and feel free to propose changes to this document in a
|
|||
- [raylib license](LICENSE)
|
||||
- [raylib roadmap](ROADMAP.md)
|
||||
|
||||
[raylib Wiki](https://github.com/raysan5/raylib/wiki) contains some information about the library and is open to anyone for edit.
|
||||
[raylib Wiki](https://github.com/raysan5/raylib/wiki) contains some information about the library and is open to anyone to edit.
|
||||
Feel free to review it if required, just take care not to break something.
|
||||
|
||||
### raylib C coding conventions
|
||||
|
||||
Despite being written in C, raylib does not follow the standard Hungarian notation for C,
|
||||
it [follows Pascal-case/camel-case notation](https://github.com/raysan5/raylib/wiki/raylib-coding-conventions),
|
||||
more common on C# language. All code formatting decisions have been carefully taken
|
||||
more common in C# language. All code formatting decisions have been carefully taken
|
||||
to make it easier for students/users to read, write and understand code.
|
||||
|
||||
Source code is extensively commented for that purpose, raylib primary learning method is:
|
||||
|
@ -46,12 +46,12 @@ For detailed information on building raylib and examples, please check [raylib W
|
|||
|
||||
### Opening new Issues
|
||||
|
||||
To open new issue for raylib (bug, enhancement, discussion...), just try to follow these rules:
|
||||
To open new issues for raylib (bug, enhancement, discussion...), just try to follow these rules:
|
||||
|
||||
- Make sure the issue has not already been reported before by searching on GitHub under Issues.
|
||||
- If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a
|
||||
title and clear description, as much relevant information as possible, and a code sample demonstrating the unexpected behavior.
|
||||
- If applies, attach some screenshot of the issue and a .zip file with the code sample and required resources.
|
||||
- If applicable, attach some screenshot of the issue and a .zip file with the code sample and required resources.
|
||||
- On issue description, add a brackets tag about the raylib module that relates to this issue.
|
||||
If don't know which module, just report the issue, I will review it.
|
||||
- You can check other issues to see how is being done!
|
||||
|
@ -60,7 +60,7 @@ To open new issue for raylib (bug, enhancement, discussion...), just try to foll
|
|||
|
||||
- Make sure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
|
||||
- Don't send big pull requests (lots of changelists), they are difficult to review. It's better to send small pull requests, one at a time.
|
||||
- Verify that changes don't break the build (at least on Windows platform). As many platforms where you can test it, the better, but don't worry
|
||||
- Verify that changes don't break the build (at least on Windows platform). The more platforms where you can test it, the better, but don't worry
|
||||
if you cannot test all the platforms.
|
||||
|
||||
### Contact information
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## C Coding Style Conventions
|
||||
|
||||
Here it is a list with some of the code conventions used by raylib:
|
||||
Here is a list with some of the code conventions used by raylib:
|
||||
|
||||
Code element | Convention | Example
|
||||
--- | :---: | ---
|
||||
|
@ -79,7 +79,7 @@ _NOTE: Avoid any space or special character in the files/dir naming!_
|
|||
|
||||
- Data files should be organized by context and usage in the game, think about the loading requirements for data and put all the resources that need to be loaded at the same time together.
|
||||
- Use descriptive names for the files, it would be perfect if just reading the name of the file, it was possible to know what is that file and where fits in the game.
|
||||
- Here it is an example, note that some resources require to be loaded all at once while other require to be loaded only at initialization (gui, font).
|
||||
- Here is an example, note that some resources require to be loaded all at once while other require to be loaded only at initialization (gui, font).
|
||||
|
||||
```
|
||||
resources/audio/fx/long_jump.wav
|
||||
|
|
27
FAQ.md
|
@ -14,12 +14,13 @@
|
|||
- [What does raylib provide that other engines or libraries don't?](#what-does-raylib-provide-that-other-engines-or-libraries-dont)
|
||||
- [How does raylib compare to Unity/Unreal/Godot?](#how-does-raylib-compare-to-unityunrealgodot)
|
||||
- [What development tools are required for raylib?](#what-development-tools-are-required-for-raylib)
|
||||
- [Which are raylib external dependencies?](#which-are-raylib-external-dependencies)
|
||||
- [What are raylib's external dependencies?](#what-are-raylibs-external-dependencies)
|
||||
- [Can I use raylib with other technologies or libraries?](#can-i-use-raylib-with-other-technologies-or-libraries)
|
||||
- [What file formats are supported by raylib?](#what-file-formats-are-supported-by-raylib)
|
||||
- [Does raylib support the Vulkan API?](#does-raylib-support-the-vulkan-api)
|
||||
- [What could I expect to see in raylib in the future?](#what-could-i-expect-to-see-in-raylib-in-the-future)
|
||||
- [Who are the raylib developers?](#who-are-the-raylib-developers)
|
||||
- [MORE QUESTIONS...](https://github.com/raysan5/raylib/wiki/Frequently-Asked-Questions)
|
||||
|
||||
### What is raylib?
|
||||
|
||||
|
@ -39,13 +40,13 @@ Yes, raylib can be used to create any kind of application, not just videogames.
|
|||
|
||||
### How can I learn to use raylib? Is there some official documentation or tutorials?
|
||||
|
||||
raylib does not provide a "standard" API reference documentation like other libraries, all of the raylib functionality is exposed in a simple [cheatsheet](https://www.raylib.com/cheatsheet/cheatsheet.html). Most of the functions are self-explanatory and the required parameters are very intuitive. It's also highly recommended to take a look to [`raylib.h`](https://github.com/raysan5/raylib/blob/master/src/raylib.h) header file or even the source code, that is very clean and organized, intended for teaching.
|
||||
raylib does not provide a "standard" API reference documentation like other libraries, all of the raylib functionality is exposed in a simple [cheatsheet](https://www.raylib.com/cheatsheet/cheatsheet.html). Most of the functions are self-explanatory and the required parameters are very intuitive. It's also highly recommended to take a look at [`raylib.h`](https://github.com/raysan5/raylib/blob/master/src/raylib.h) header file or even the source code, that is very clean and organized, intended for teaching.
|
||||
|
||||
raylib also provides a big [collection of examples](https://www.raylib.com/examples.html), to showcase the multiple functionality usage (+120 examples). Examples are categorized by the internal module functionality and also define an estimated level of difficulty to guide the users checking them.
|
||||
|
||||
There is also a [FAQ on the raylib Wiki](https://github.com/raysan5/raylib/wiki/Frequently-Asked-Questions) with common technical questions.
|
||||
|
||||
There are also many tutorials on the internet and YouTube created by the growing raylib community along the years.
|
||||
There are also many tutorials on the internet and YouTube created by the growing raylib community over the years.
|
||||
|
||||
[raylib Discord Community](https://discord.gg/raylib) is also a great place to join and ask questions, the community is very friendly and always ready to help.
|
||||
|
||||
|
@ -55,7 +56,7 @@ raylib is [free and open source](https://github.com/raysan5/raylib). Anyone can
|
|||
|
||||
### What is the raylib license?
|
||||
|
||||
raylib source code is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check [LICENSE](https://github.com/raysan5/raylib/blob/master/LICENSE) for further details.
|
||||
raylib source code is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed-source software. Check [LICENSE](https://github.com/raysan5/raylib/blob/master/LICENSE) for further details.
|
||||
|
||||
### What platforms are supported by raylib?
|
||||
|
||||
|
@ -89,25 +90,25 @@ I personally consider raylib a graphics library with some high-level features ra
|
|||
|
||||
### What does raylib provide that other engines or libraries don't?
|
||||
|
||||
I would say "simplicity" and "enjoyment" at a really low-level of coding but actually is up to the user to discover it, to try it and to see if it fits their needs. raylib is not good for everyone but it's worth a try.
|
||||
I would say "simplicity" and "enjoyment" at a really low level of coding but actually is up to the user to discover it, to try it and to see if it fits their needs. raylib is not good for everyone but it's worth a try.
|
||||
|
||||
### How does raylib compare to Unity/Unreal/Godot?
|
||||
|
||||
Those engines are usually big and complex to use, providing lot of functionality. They require some time to learn and test, they usually abstract many parts of the game development process and they usually provide a set of tools to assist users on their creations (like a GUI editor).
|
||||
|
||||
raylib is a simple programming library, with no integrated tools or editors. It gives full control to users at a very low-level to create graphics applications in a more handmade way.
|
||||
raylib is a simple programming library, with no integrated tools or editors. It gives full control to users at a very low level to create graphics applications in a more handmade way.
|
||||
|
||||
### What development tools are required for raylib?
|
||||
|
||||
To develop raylib programs you only need a text editor (with recommended code syntax highlighting) and a compiler.
|
||||
|
||||
A [raylib Windows Installer](https://raysan5.itch.io/raylib) package is distributed including the Notepad++ editor and MinGW (GCC) compiler pre-configured for Windows for new users as an starter-pack but for more advance configurations with other editors/compilers, [raylib Wiki](https://github.com/raysan5/raylib/wiki) provides plenty of configuration tutorials.
|
||||
A [raylib Windows Installer](https://raysan5.itch.io/raylib) package is distributed including the Notepad++ editor and MinGW (GCC) compiler pre-configured for Windows for new users as an starter-pack but for more advanced configurations with other editors/compilers, [raylib Wiki](https://github.com/raysan5/raylib/wiki) provides plenty of configuration tutorials.
|
||||
|
||||
### What are raylib's external dependencies?
|
||||
|
||||
raylib is self-contained, it has no external dependencies to build it. But internally raylib uses several libraries from other developers, mostly used to load specific file-formats.
|
||||
raylib is self-contained, it has no external dependencies to build it. But internally raylib uses several libraries from other developers, mostly used to load specific file formats.
|
||||
|
||||
A detailed list of raylib dependencies could be found on the [raylib Wiki](https://github.com/raysan5/raylib/wiki/raylib-dependencies).
|
||||
A detailed list of raylib dependencies can be found on the [raylib Wiki](https://github.com/raysan5/raylib/wiki/raylib-dependencies).
|
||||
|
||||
### Can I use raylib with other technologies or libraries?
|
||||
|
||||
|
@ -119,8 +120,8 @@ raylib can load data from multiple standard file formats:
|
|||
|
||||
- Image/Textures: PNG, BMP, TGA, JPG, GIF, QOI, PSD, DDS, HDR, KTX, ASTC, PKM, PVR
|
||||
- Fonts: FNT (sprite font), TTF, OTF
|
||||
- Models/Meshes: OBJ, IQM, GLTF, VOX
|
||||
- Audio: WAV, OGG, MP3, FLAC, XM, MOD
|
||||
- Models/Meshes: OBJ, IQM, GLTF, VOX, M3D
|
||||
- Audio: WAV, OGG, MP3, FLAC, XM, MOD, QOA
|
||||
|
||||
### Does raylib support the Vulkan API?
|
||||
|
||||
|
@ -128,10 +129,10 @@ No, raylib is built on top of OpenGL API, and there are currently no plans to su
|
|||
|
||||
### What could I expect to see in raylib in the future?
|
||||
|
||||
The main focus of the library is simplicity. Most of the efforts are invested in maintainability and bug-fixing. Despite new small features are regularly added, it's not the objective for raylib to become a full-featured engine. Personally I prefer to keep it small and enjoyable.
|
||||
The main focus of the library is simplicity. Most of the efforts are invested in maintainability and bug-fixing. Despite new small features being regularly added, it's not the objective for raylib to become a full-featured engine. Personally I prefer to keep it small and enjoyable.
|
||||
|
||||
### Who are the raylib developers?
|
||||
|
||||
The main raylib developer and maintainer is [Ramon Santamaria](https://www.linkedin.com/in/raysan/) but there's 360+ contributors that have helped by adding new features, testing the library and solving issues in the 9+ years life of raylib.
|
||||
The main raylib developer and maintainer is [Ramon Santamaria](https://www.linkedin.com/in/raysan/) but there are 360+ contributors that have helped by adding new features, testing the library and solving issues in the 9+ years life of raylib.
|
||||
|
||||
The full list of raylib contributors can be seen [on GitHub](https://github.com/raysan5/raylib/graphs/contributors).
|
||||
|
|
275
HISTORY.md
|
@ -3,13 +3,13 @@
|
|||
introduction
|
||||
------------
|
||||
|
||||
I started developing videogames in 2006 and some years later I started teaching videogames development to young people with artistic profile, most of students had never written a single line of code.
|
||||
I started developing videogames in 2006 and some years later I started teaching videogames development to young people with artistic profiles, most of students had never written a single line of code.
|
||||
|
||||
I decided to start with C language basis and, after searching for the most simple and easy-to-use library to teach videogames programming, I found [WinBGI](http://www.codecutter.net/tools/winbgim/); it was great and it worked very well with students, in just a couple of weeks, those students that had never written a single line of code were able to program (and understand) a simple PONG game, some of them even a BREAKOUT!
|
||||
I decided to start with C language basis and, after searching for the most simple and easy-to-use library to teach videogames programming, I found [WinBGI](https://winbgim.codecutter.org/); it was great and it worked very well with students, in just a couple of weeks, those students that had never written a single line of code were able to program (and understand) a simple PONG game, some of them even a BREAKOUT!
|
||||
|
||||
But WinBGI was not the clearer and most organized library for my taste. There were lots of things I found confusing and some function names were not clear enough for most of the students; not to mention the lack of transparencies support and no hardware acceleration.
|
||||
But WinBGI was not the clearest and most organized library for my taste. There were lots of things I found confusing and some function names were not clear enough for most of the students; not to mention the lack of transparencies support and no hardware acceleration.
|
||||
|
||||
So, I decided to create my own library, hardware accelerated, clear function names, quite organized, well structured, plain C coding and, the most important, primarily intended to learn videogames programming.
|
||||
So, I decided to create my own library, hardware accelerated, clear function names, quite organized, well structured, plain C coding and, most importantly, primarily intended to learn videogames programming.
|
||||
|
||||
My previous videogames development experience was mostly in C# and [XNA](https://en.wikipedia.org/wiki/Microsoft_XNA) and I really loved it, so, I decided to use C# language style notation and XNA naming conventions. That way, students were able to move from raylib to XNA, MonoGame or similar libs extremely easily.
|
||||
|
||||
|
@ -20,28 +20,28 @@ Enjoy it.
|
|||
notes on raylib 1.1
|
||||
-------------------
|
||||
|
||||
On April 2014, after 6 month of first raylib release, raylib 1.1 has been released. This new version presents a complete internal redesign of the library to support OpenGL 1.1, OpenGL 3.3+ and OpenGL ES 2.0.
|
||||
On April 2014, after 6 months of first raylib release, raylib 1.1 was released. This new version presents a complete internal redesign of the library to support OpenGL 1.1, OpenGL 3.3+ and OpenGL ES 2.0.
|
||||
|
||||
- A new module named [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) has been added to the library. This new module translates raylib-OpenGL-style immediate mode functions (i.e. rlVertex3f(), rlBegin(), ...) to different versions of OpenGL (1.1, 3.3+, ES2), selectable by one define.
|
||||
|
||||
- [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) also comes with a second new module named [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h), which includes a bunch of useful functions for 3d-math with vectors, matrices and quaternions.
|
||||
|
||||
Some other big changes of this new version have been the support for OGG files loading and stream playing, and the support of DDS texture files (compressed and uncompressed) along with mipmaps support.
|
||||
Some other big changes of this new version have been the support for OGG file loading and stream playing, and the support of DDS texture files (compressed and uncompressed) along with mipmaps support.
|
||||
|
||||
Lots of code changes and lot of testing have concluded in this amazing new raylib 1.1.
|
||||
Lots of code changes and a lot of testing have concluded in this amazing new raylib 1.1.
|
||||
|
||||
notes on raylib 1.2
|
||||
-------------------
|
||||
|
||||
On September 2014, after 5 month of raylib 1.1 release, it comes raylib 1.2. Again, this version presents a complete internal redesign of [core](https://github.com/raysan5/raylib/blob/master/src/rcore.c) module to support two new platforms: [Android](http://www.android.com/) and [Raspberry Pi](http://www.raspberrypi.org/).
|
||||
On September 2014, after 5 months of raylib 1.1 release, it comes raylib 1.2. Again, this version presents a complete internal redesign of [core](https://github.com/raysan5/raylib/blob/master/src/rcore.c) module to support two new platforms: [Android](http://www.android.com/) and [Raspberry Pi](http://www.raspberrypi.org/).
|
||||
|
||||
It's been some month of really hard work to accomodate raylib to those new platforms while keeping it easy for the users. On Android, raylib manages internally the activity cicle, as well as the inputs; on Raspberry Pi, a complete raw input system has been written from scratch.
|
||||
It's been some months of really hard work to accommodate raylib to those new platforms while keeping it easy for the users. On Android, raylib manages internally the activity cycle, as well as the inputs; on Raspberry Pi, a complete raw input system has been written from scratch.
|
||||
|
||||
- A new display initialization system has been created to support multiple resolutions, adding black bars if required; user only defines desired screen size and it gets properly displayed.
|
||||
- A new display initialization system has been created to support multiple resolutions, adding black bars if required; the user only defines the desired screen size and it gets properly displayed.
|
||||
|
||||
- Now raylib can easily deploy games to Android devices and Raspberry Pi (console mode).
|
||||
|
||||
Lots of code changes and lot of testing have concluded in this amazing new raylib 1.2.
|
||||
Lots of code changes and a lot of testing have concluded in this amazing new raylib 1.2.
|
||||
|
||||
In December 2014, new raylib 1.2.2 was published with support to compile directly for web (html5) using [emscripten](http://kripken.github.io/emscripten-site/) and [asm.js](http://asmjs.org/).
|
||||
|
||||
|
@ -50,26 +50,26 @@ notes on raylib 1.3
|
|||
|
||||
On September 2015, after 1 year of raylib 1.2 release, arrives raylib 1.3. This version adds shaders functionality, improves tremendously textures module and also provides some new modules (camera system, gestures system, immediate-mode gui).
|
||||
|
||||
- Shaders support is the biggest addition to raylib 1.3, with support for easy shaders loading and use. Loaded shaders can be attached to 3d models or used as fullscreen postrocessing effects. A bunch of postprocessing shaders are also included in this release, check raylib/shaders folder.
|
||||
- Shaders support is the biggest addition to raylib 1.3, with support for easy shaders loading and use. Loaded shaders can be attached to 3d models or used as fullscreen post-processing effects. A bunch of postprocessing shaders are also included in this release, check raylib/shaders folder.
|
||||
|
||||
- Textures module has grown to support most of the internal texture formats available in OpenGL (RGB565, RGB888, RGBA5551, RGBA4444, etc.), including compressed texture formats (DXT, ETC1, ETC2, ASTC, PVRT); raylib 1.3 can load .dds, .pkm, .ktx, .astc and .pvr files.
|
||||
|
||||
- A brand new [camera](https://github.com/raysan5/raylib/blob/master/src/rcamera.c) module offers to the user multiple preconfigured ready-to-use camera systems (free camera, 1st person, 3rd person). Camera modes are very easy to use, just check examples: [core_3d_camera_free.c](https://github.com/raysan5/raylib/blob/master/examples/core_3d_camera_free.c) and [core_3d_camera_first_person.c](https://github.com/raysan5/raylib/blob/master/examples/core_3d_camera_first_person.c).
|
||||
- A brand new [camera](https://github.com/raysan5/raylib/blob/master/src/rcamera.h) module offers to the user multiple preconfigured ready-to-use camera systems (free camera, 1st person, 3rd person). Camera modes are very easy to use, just check examples: [core_3d_camera_free.c](https://github.com/raysan5/raylib/blob/master/examples/core/core_3d_camera_free.c) and [core_3d_camera_first_person.c](https://github.com/raysan5/raylib/blob/master/examples/core/core_3d_camera_first_person.c).
|
||||
|
||||
- New [gestures](https://github.com/raysan5/raylib/blob/master/src/rgestures.h) module simplifies gestures detection on Android and HTML5 programs.
|
||||
|
||||
- [raygui](https://github.com/raysan5/raylib/blob/master/src/raygui.h), the new immediate-mode GUI module offers a set of functions to create simple user interfaces, primary intended for tools development. It's still in experimental state but already fully functional.
|
||||
- [raygui](https://github.com/raysan5/raylib/blob/master/examples/shapes/raygui.h), the new immediate-mode GUI module offers a set of functions to create simple user interfaces, primarily intended for tools development. It's still in an experimental state but already fully functional.
|
||||
|
||||
Most of the examples have been completely rewritten and +10 new examples have been added to show the new raylib features.
|
||||
|
||||
Lots of code changes and lot of testing have concluded in this amazing new raylib 1.3.
|
||||
Lots of code changes and a lot of testing have concluded in this amazing new raylib 1.3.
|
||||
|
||||
notes on raylib 1.4
|
||||
-------------------
|
||||
|
||||
On February 2016, after 4 months of raylib 1.3 release, it comes raylib 1.4. For this new version, lots of parts of the library have been reviewed, lots of bugs have been solved and some interesting features have been added.
|
||||
|
||||
- First big addition is a set of [Image manipulation functions](https://github.com/raysan5/raylib/blob/master/src/raylib.h#L673) have been added to crop, resize, colorize, flip, dither and even draw image-to-image or text-to-image. Now a basic image processing can be done before converting the image to texture for usage.
|
||||
- First big addition is a set of [Image manipulation functions](https://github.com/raysan5/raylib/blob/master/src/raylib.h#L1331) that have been added to crop, resize, colorize, flip, dither and even draw image-to-image or text-to-image. Now basic image processing can be done before converting the image to texture for usage.
|
||||
|
||||
- SpriteFonts system has been improved, adding support for AngelCode fonts (.fnt) and TrueType Fonts (using [stb_truetype](https://github.com/nothings/stb/blob/master/stb_truetype.h) helper library). Now raylib can read standard .fnt font data and also generate at loading a SpriteFont from a TTF file.
|
||||
|
||||
|
@ -77,12 +77,12 @@ On February 2016, after 4 months of raylib 1.3 release, it comes raylib 1.4. For
|
|||
|
||||
- [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h) module has been reviewed; some bugs have been solved and the module has been converted to a header-only file for easier portability, optionally, functions can also be used as inline.
|
||||
|
||||
- [gestures](https://github.com/raysan5/raylib/blob/master/src/rgestures.c) module has redesigned and simplified, now it can process touch events from any source, including mouse. This way, gestures system can be used on any platform providing an unified way to work with inputs and allowing the user to create multiplatform games with only one source code.
|
||||
- [gestures](https://github.com/raysan5/raylib/blob/master/src/rgestures.h) module has been redesigned and simplified, now it can process touch events from any source, including the mouse. This way, gestures system can be used on any platform providing a unified way to work with inputs and allowing the user to create multiplatform games with only one source code.
|
||||
|
||||
- Raspberry Pi input system has been redesigned to better read raw inputs using generic Linux event handlers (keyboard:`stdin`, mouse:`/dev/input/mouse0`, gamepad:`/dev/input/js0`). Gamepad support has also been added (experimental).
|
||||
|
||||
Other important improvements are the functional raycast system for 3D picking, including some ray collision-detection functions,
|
||||
and the addition of two simple functions for persistent data storage. Now raylib user can save and load game data in a file (only some platforms supported). A simple [easings](https://github.com/raysan5/raylib/blob/master/src/easings.h) module has also been added for values animation.
|
||||
and the addition of two simple functions for persistent data storage. Now raylib users can save and load game data in a file (only some platforms are supported). A simple [easings](https://github.com/raysan5/raylib/blob/master/examples/shapes/reasings.h) module has also been added for values animation.
|
||||
|
||||
Up to 8 new code examples have been added to show the new raylib features and +10 complete game samples have been provided to learn
|
||||
how to create some classic games like Arkanoid, Asteroids, Missile Commander, Snake or Tetris.
|
||||
|
@ -94,36 +94,36 @@ notes on raylib 1.5
|
|||
|
||||
On July 2016, after 5 months of raylib 1.4 release, arrives raylib 1.5. This new version is the biggest boost of the library until now, lots of parts of the library have been redesigned, lots of bugs have been solved and some **AMAZING** new features have been added.
|
||||
|
||||
- VR support: raylib supports **Oculus Rift CV1**, one of the most anticipated VR devices in the market. Additionally, raylib supports simulated VR stereo rendering, independent of the VR device; it means, raylib can generate stereo renders with custom head-mounted-display device parameteres, that way, any VR device in the market can be **simulated in any platform** just configuring device parameters (and consequently, lens distortion). To enable VR is [extremely easy](https://github.com/raysan5/raylib/blob/master/examples/core_oculus_rift.c).
|
||||
- VR support: raylib supports **Oculus Rift CV1**, one of the most anticipated VR devices in the market. Additionally, raylib supports simulated VR stereo rendering, independent of the VR device; it means, raylib can generate stereo renders with custom head-mounted-display device parameters, that way, any VR device in the market can be **simulated in any platform** just configuring device parameters (and consequently, lens distortion). To enable VR is [extremely easy](https://github.com/raysan5/raylib/blob/master/examples/core_oculus_rift.c).
|
||||
|
||||
- New materials system: now raylib supports standard material properties for 3D models, including diffuse-ambient-specular colors and diffuse-normal-specular textures. Just assign values to standard material and everything is processed internally.
|
||||
|
||||
- New lighting system: added support for up to 8 configurable lights and 3 light types: **point**, **directional** and **spot** lights. Just create a light, configure its parameters and raylib manages render internally for every 3d object using standard material.
|
||||
- New lighting system: added support for up to 8 configurable lights and 3 light types: **point**, **directional** and **spot** lights. Just create a light, configure its parameters and raylib manages to render internally for every 3d object using standard material.
|
||||
|
||||
- Complete gamepad support on Raspberry Pi: Gamepad system has been completely redesigned. Now multiple gamepads can be easily configured and used; gamepad data is read and processed in raw mode in a second thread.
|
||||
|
||||
- Redesigned physics module: [physac](https://github.com/raysan5/raylib/blob/master/src/physac.h) module has been converted to header only and usage [has been simplified](https://github.com/raysan5/raylib/blob/master/examples/physics_basic_rigidbody.c). Performance has also been singnificantly improved, now physic objects are managed internally in a second thread.
|
||||
- Redesigned physics module: [physac](https://github.com/raysan5/raylib/blob/master/src/physac.h) module has been converted to header only and usage [has been simplified](https://github.com/raysan5/raylib/blob/master/examples/physics_basic_rigidbody.c). Performance has also been significantly improved, now physic objects are managed internally in a second thread.
|
||||
|
||||
- Audio chiptunese support and mixing channels: Added support for module audio music (.xm, .mod) loading and playing. Multiple mixing channels are now also supported. All this features thanks to the amazing work of @kd7tck.
|
||||
- Audio chiptunes support and mixing channels: Added support for module audio music (.xm, .mod) loading and playing. Multiple mixing channels are now also supported. All these features thanks to the amazing work of @kd7tck.
|
||||
|
||||
Other additions include a [2D camera system](https://github.com/raysan5/raylib/blob/master/examples/core_2d_rcamera.c), render textures for offline render (and most comprehensive [postprocessing](https://github.com/raysan5/raylib/blob/master/examples/shaders_postprocessing.c)) or support for legacy OpenGL 2.1 on desktop platforms.
|
||||
Other additions include a [2D camera system](https://github.com/raysan5/raylib/blob/master/examples/core/core_2d_rcamera.c), render textures for offline render (and most comprehensive [postprocessing](https://github.com/raysan5/raylib/blob/master/examples/shaders/shaders_postprocessing.c)) or support for legacy OpenGL 2.1 on desktop platforms.
|
||||
|
||||
This new version is so massive that is difficult to list all the improvements, most of raylib modules have been reviewed and [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.c) module has been completely redesigned to accomodate to new material-lighting systems and stereo rendering. You can check [CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG) file for a more detailed list of changes.
|
||||
This new version is so massive that is difficult to list all the improvements, most of the raylib modules have been reviewed and [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) module has been completely redesigned to accommodate to new material-lighting systems and stereo rendering. You can check [CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG) file for a more detailed list of changes.
|
||||
|
||||
Up to 8 new code examples have been added to show the new raylib features and also some samples to show the usage of [rlgl](https://github.com/raysan5/raylib/blob/master/examples/rlgl_standalone.c) and [audio](https://github.com/raysan5/raylib/blob/master/examples/audio_standalone.c) raylib modules as standalone libraries.
|
||||
Up to 8 new code examples have been added to show the new raylib features and also some samples to show the usage of [rlgl](https://github.com/raysan5/raylib/blob/master/examples/others/rlgl_standalone.c) and [audio](https://github.com/raysan5/raylib/blob/master/examples/audio_standalone.c) raylib modules as standalone libraries.
|
||||
|
||||
Lots of code changes (+400 commits) and lots of hours of hard work have concluded in this amazing new raylib 1.5.
|
||||
|
||||
notes on raylib 1.6
|
||||
-------------------
|
||||
|
||||
On November 2016, only 4 months after raylib 1.5, arrives raylib 1.6. This new version represents another big review of the library and includes some interesting additions. This version conmmemorates raylib 3rd anniversary (raylib 1.0 was published on November 2013) and it is a stepping stone for raylib future. raylib roadmap has been reviewed and redefined to focus on its primary objective: create a simple and easy-to-use library to learn videogames programming. Some of the new features:
|
||||
On November 2016, only 4 months after raylib 1.5, arrives raylib 1.6. This new version represents another big review of the library and includes some interesting additions. This version commemorates raylib 3rd anniversary (raylib 1.0 was published on November 2013) and it is a stepping stone for raylib future. raylib roadmap has been reviewed and redefined to focus on its primary objective: create a simple and easy-to-use library to learn videogames programming. Some of the new features:
|
||||
|
||||
- Complete [raylib Lua binding](https://github.com/raysan5/raylib-lua). All raylib functions plus the +60 code examples have been ported to Lua, now Lua users can enjoy coding videogames in Lua while using all the internal power of raylib. This addition also open the doors to Lua scripting support for a future raylib-based engine, being able to move game logic (Init, Update, Draw, De-Init) to Lua scripts while keep using raylib functionality.
|
||||
|
||||
- Completely redesigned [audio module](https://github.com/raysan5/raylib/blob/master/src/raudio.c). Based on the new direction taken in raylib 1.5, it has been further improved and more functionality added (+20 new functions) to allow raw audio processing and streaming. [FLAC file format support](https://github.com/raysan5/raylib/blob/master/src/external/dr_flac.h) has also been added. In the same line, [OpenAL Soft](https://github.com/kcat/openal-soft) backend is now provided as a static library in Windows to allow static linking and get ride of OpenAL32.dll. Now raylib Windows games are completey self-contained, no external libraries required any more!
|
||||
- Completely redesigned [audio module](https://github.com/raysan5/raylib/blob/master/src/raudio.c). Based on the new direction taken in raylib 1.5, it has been further improved and more functionality added (+20 new functions) to allow raw audio processing and streaming. [FLAC file format support](https://github.com/raysan5/raylib/blob/master/src/external/dr_flac.h) has also been added. In the same line, [OpenAL Soft](https://github.com/kcat/openal-soft) backend is now provided as a static library in Windows to allow static linking and get ride of OpenAL32.dll. Now raylib Windows games are completely self-contained, no external libraries are required anymore!
|
||||
|
||||
- [Physac](https://github.com/victorfisac/Physac) module has been moved to its own repository and it has been improved A LOT, actually, library has been completely rewritten from scratch by [@victorfisac](https://github.com/victorfisac), multiple samples have been added together with countless new features to match current standard 2D physic libraries. Results are amazing!
|
||||
- [Physac](https://github.com/victorfisac/Physac) module has been moved to its own repository and it has been improved A LOT, actually, the library has been completely rewritten from scratch by [@victorfisac](https://github.com/victorfisac), multiple samples have been added together with countless new features to match current standard 2D physic libraries. Results are amazing!
|
||||
|
||||
- Camera and gestures modules have been reviewed, highly simplified and ported to single-file header-only libraries for easier portability and usage flexibility. Consequently, camera system usage has been simplified in all examples.
|
||||
|
||||
|
@ -131,41 +131,41 @@ On November 2016, only 4 months after raylib 1.5, arrives raylib 1.6. This new v
|
|||
|
||||
- Improved textures and text functionality, adding new functions for texture filtering control and better TTF/AngelCode fonts loading and generation support.
|
||||
|
||||
Build system improvement. Added support for raylib dynamic library generation (raylib.dll) for users that prefer dynamic library linking. Also thinking on advance users, it has been added pre-configured [Visual Studio C++ 2015 solution](https://github.com/raysan5/raylib/tree/master/project/vs2015) with raylib project and C/C++ examples for users that prefer that professional IDE and compiler.
|
||||
Build system improvement. Added support for raylib dynamic library generation (raylib.dll) for users that prefer dynamic library linking. Also thinking on advanced users, it has been added pre-configured [Visual Studio C++ 2015 solution](https://github.com/raysan5/raylib/tree/master/projects/vs2015) with raylib project and C/C++ examples for users that prefer that professional IDE and compiler.
|
||||
|
||||
New examples, new functions, complete code-base review, multiple bugs corrected... this is raylib 1.6. Enjoy making games.
|
||||
|
||||
notes on raylib 1.7
|
||||
-------------------
|
||||
|
||||
On May 2017, around 6 month after raylib 1.6, comes another raylib instalment, raylib 1.7. This time library has been improved a lot in terms of consistency and cleanness. As stated in [this patreon article](https://www.patreon.com/posts/raylib-future-7501034), this new raylib version has focused efforts in becoming more simple and easy-to-use to learn videogames programming. Some highlights of this new version are:
|
||||
On May 2017, around 6 months after raylib 1.6, comes another raylib installment, raylib 1.7. This time library has been improved a lot in terms of consistency and cleanness. As stated in [this patreon article](https://www.patreon.com/posts/raylib-future-7501034), this new raylib version has focused efforts in becoming more simple and easy-to-use to learn videogames programming. Some highlights of this new version are:
|
||||
|
||||
- More than 30 new functions added to the library, functions to control Window, utils to work with filenames and extensions, functions to draw lines with custom thick, mesh loading, functions for 3d ray collisions detailed detection, funtions for VR simulation and much more... Just check [CHANGELOG](CHANGELOG) for a detailed list of additions!
|
||||
- More than 30 new functions added to the library, functions to control Window, utils to work with filenames and extensions, functions to draw lines with custom thick, mesh loading, functions for 3d ray collisions detailed detection, functions for VR simulation and much more... Just check [CHANGELOG](CHANGELOG) for a detailed list of additions!
|
||||
|
||||
- Support of [configuration flags](https://github.com/raysan5/raylib/issues/200) on every raylib module. Advance users can customize raylib just choosing desired features, defining some configuration flags on modules compilation. That way users can control library size and available functionality.
|
||||
- Support of [configuration flags](https://github.com/raysan5/raylib/issues/200) on every raylib module. Advanced users can customize raylib just by choosing desired features, and defining some configuration flags on modules compilation. That way users can control library size and available functionality.
|
||||
|
||||
- Improved [build system](https://github.com/raysan5/raylib/blob/master/src/Makefile) for all supported platforms (Windows, Linux, OSX, RPI, Android, HTML5) with a unique Makefile to compile sources. Added support for Android compilation with a custom standalone toolchain and also multiple build compliation flags.
|
||||
- Improved [build system](https://github.com/raysan5/raylib/blob/master/src/Makefile) for all supported platforms (Windows, Linux, OSX, RPI, Android, HTML5) with a unique Makefile to compile sources. Added support for Android compilation with a custom standalone toolchain and also multiple build compilation flags.
|
||||
|
||||
- New [examples](http://www.raylib.com/examples.html) and [sample games](http://www.raylib.com/games.html) added. All samples material has been reviewed, removing useless examples and adding more comprehensive ones; all material has been ported to latest raylib version and tested in multiple platforms. Examples folder structure has been improved and also build systems.
|
||||
- New [examples](http://www.raylib.com/examples.html) and [sample games](http://www.raylib.com/games.html) added. All sample material has been reviewed, removing useless examples and adding more comprehensive ones; all material has been ported to the latest raylib version and tested on multiple platforms. Examples folder structure has been improved and also build systems.
|
||||
|
||||
- Improved library consistency and organization in general. Functions and parameters have been renamed, some parts of the library have been cleaned and simplyfied, some functions has been moved to examples (lighting, Oculus Rift CV1 support) towards a more generic library implementation. Lots of hours have been invested in this process...
|
||||
- Improved library consistency and organization in general. Functions and parameters have been renamed, some parts of the library have been cleaned and simplified, some functions have been moved to examples (lighting, Oculus Rift CV1 support) towards a more generic library implementation. Lots of hours have been invested in this process...
|
||||
|
||||
Some other features: Gamepad support on HTML5, RPI touch screen support, 32bit audio support, frames timing improvements, public log system, rres file format support, automatic GIF recording...
|
||||
|
||||
And here it is another version of **raylib, a simple and easy-to-use library to enjoy videogames programming**. Enjoy it.
|
||||
And here is another version of **raylib, a simple and easy-to-use library to enjoy videogames programming**. Enjoy it.
|
||||
|
||||
notes on raylib 1.8
|
||||
-------------------
|
||||
|
||||
October 2017, around 5 months after latest raylib version, another release is published: raylib 1.8. Again, several modules of the library have been reviewed and some new functionality added. Main changes of this new release are:
|
||||
|
||||
- [Procedural image generation](https://github.com/raysan5/raylib/blob/master/examples/textures/textures_image_generation.c) function, a set of new functions have been added to generate gradients, checked, noise and cellular images from scratch. Image generation could be useful for certain textures or learning pourpouses.
|
||||
- [Procedural image generation](https://github.com/raysan5/raylib/blob/master/examples/textures/textures_image_generation.c) function, a set of new functions have been added to generate gradients, checked, noise and cellular images from scratch. Image generation could be useful for certain textures or learning purposes.
|
||||
|
||||
- [Parametric mesh generation](https://github.com/raysan5/raylib/blob/master/examples/models/models_mesh_generation.c) functions, create 3d meshes from scratch just defining a set of parameters, meshes like cube, sphere, cylinder, torus, knot and more can be very useful for prototyping or for lighting and texture testing.
|
||||
|
||||
- PBR Materials support, a completely redesigned shaders and material system allows advance materials definition and usage, with fully customizable shaders. Some new functions have been added to generate the environment textures required for PBR shading and a a new complete [PBR material example](https://github.com/raysan5/raylib/blob/master/examples/models/models_material_pbr.c) is also provided for reference.
|
||||
- PBR Materials support, a completely redesigned shaders and material system allows advanced materials definition and usage, with fully customizable shaders. Some new functions have been added to generate the environment textures required for PBR shading and a a new complete [PBR material example](https://github.com/raysan5/raylib/blob/master/examples/models/models_material_pbr.c) is also provided for reference.
|
||||
|
||||
- Custom Android APK build pipeline with [simple Makefile](https://github.com/raysan5/raylib/blob/master/templates/simple_game/Makefile). Actually, full code building mechanism based on plain Makefile has been completely reviewed and Android building has been added for sources and also for examples and templates building into final APK package. This way, raylib Android building has been greatly simplified and integrated seamlessly into standard build scripts.
|
||||
- Custom Android APK build pipeline with [simple Makefile](https://github.com/raysan5/raylib/blob/master/templates/simple_game/Makefile). Actually, full code building mechanism based on plain Makefile has been completely reviewed and Android building has been added for sources and also for examples and templates building into the final APK package. This way, raylib Android building has been greatly simplified and integrated seamlessly into standard build scripts.
|
||||
|
||||
- [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) module has been completely reviewed and most of the functions renamed for consistency. This way, standalone usage of rlgl is promoted, with a [complete example provided](https://github.com/raysan5/raylib/blob/master/examples/others/rlgl_standalone.c). rlgl offers a pseudo-OpenGL 1.1 immediate-mode programming-style layer, with backends to multiple OpenGL versions.
|
||||
|
||||
|
@ -178,37 +178,37 @@ New installer provided, web updated, examples re-builded, documentation reviewed
|
|||
notes on raylib 2.0
|
||||
-------------------
|
||||
|
||||
It's been 9 month since last raylib version was published, a lots of things have changed since then... This new raylib version represents an inflexion point in the development of the library and so, we jump to a new major version... Here it is the result of almost **5 years and thousands of hours of hard work**... here it is... **raylib 2.0**
|
||||
It's been 9 months since last raylib version was published, a lot of things have changed since then... This new raylib version represents an inflection point in the development of the library and so, we jump to a new major version... Here is the result of almost **5 years and thousands of hours of hard work**... here is... **raylib 2.0**
|
||||
|
||||
In **raylib 2.0** the full API has been carefully reviewed for better consistency, some new functionality has been added and the overall raylib experience has been greatly improved... The key features of new version are:
|
||||
|
||||
- **Complete removal of external dependencies.** Finally, raylib does not require external libraries to be installed and linked along with raylib, all required libraries are contained and compiled within raylib. Obviously some external libraries are required but only the strictly platform-dependant ones, the ones that come installed with the OS. So, raylib becomes a self-contained platform-independent games development library.
|
||||
- **Complete removal of external dependencies.** Finally, raylib does not require external libraries to be installed and linked along with raylib, all required libraries are contained and compiled within raylib. Obviously some external libraries are required but only the strictly platform-dependent ones, the ones that come installed with the OS. So, raylib becomes a self-contained platform-independent games development library.
|
||||
|
||||
- **Full redesign of audio module to use the amazing miniaudio library**, along with external dependencies removal, OpenAL library has been replaced by [miniaudio](https://github.com/dr-soft/miniaudio), this brand new library offers automatic dynamic linking with default OS audio systems. Undoubtly, the perfect low-level companion for raylib audio module!
|
||||
- **Full redesign of audio module to use the amazing miniaudio library**, along with external dependencies removal, OpenAL library has been replaced by [miniaudio](https://github.com/dr-soft/miniaudio), this brand new library offers automatic dynamic linking with default OS audio systems. Undoubtedly, the perfect low-level companion for raylib audio module!
|
||||
|
||||
- **Support for continuous integration building*** through AppVeyor and Travis CI. Consequently, raylib GitHub develop branch has been removed, simplyfing the code-base to a single master branch, always stable. Every time a new commit is deployed, library is compiled for **up-to 12 different configurations**, including multiple platforms, 32bit/64bit and multiple compiler options! All those binaries are automatically attached to any new release!
|
||||
- **Support for continuous integration building*** through AppVeyor and Travis CI. Consequently, raylib GitHub develop branch has been removed, simplifying the code-base to a single master branch, always stable. Every time a new commit is deployed, library is compiled for **up-to 12 different configurations**, including multiple platforms, 32bit/64bit and multiple compiler options! All those binaries are automatically attached to any new release!
|
||||
|
||||
- **More platforms supported and tested**, including BSD family (FreeBSD, openBSD, NetBSD, DragonFly) and Linux-based family platforms (openSUSE, Debian, Ubuntu, Arch, NixOS...). raylib has already been added to some package managers! Oh, and last but not less important, **Android 64bit** is already supported by raylib!
|
||||
|
||||
- **Support for TCC compiler!** Thanks to the lack of external dependencies, raylib can now be easily compiled with a **minimal toolchain**, like the one provide by Tiny C Compiler. It opens the door to an amazing future, allowing, for example, static linkage of libtcc for **runtime compilation of raylib-based code**... and the library itself if required! Moreover, TCC is blazing fast, it can compile all raylib in a couple of seconds!
|
||||
- **Support for TCC compiler!** Thanks to the lack of external dependencies, raylib can now be easily compiled with a **minimal toolchain**, like the one provided by Tiny C Compiler. It opens the door to an amazing future, allowing, for example, static linkage of libtcc for **runtime compilation of raylib-based code**... and the library itself if required! Moreover, TCC is blazing fast, it can compile all raylib in a couple of seconds!
|
||||
|
||||
- Refactored all raylib configuration #defines into a **centralized `config.h` header**, with more than **40 possible configuration options** to compile a totally customizable raylib version including only desired options like supported file-formats or specific functionality support. It allows generating a trully ligth-weight version of the library if desired!
|
||||
- Refactored all raylib configuration #defines into a **centralized `config.h` header**, with more than **40 possible configuration options** to compile a totally customizable raylib version including only desired options like supported file formats or specific functionality support. It allows generating a trully ligth-weight version of the library if desired!
|
||||
|
||||
A part of that, lots of new features, like a brand **new font rendering and packaging system** for TTF fonts with **SDF support** (thanks to the amazing STB headers), new functions for **CPU image data manipulation**, new orthographic 3d camera mode, a complete review of `raymath.h` single-file header-only library for better consistency and performance, new examples and way, [way more](https://github.com/raysan5/raylib/blob/master/CHANGELOG).
|
||||
|
||||
Probably by now, **raylib 2.0 is the simplest and easiest-to-use library to enjoy (and learn) videogames programming**... but, undoubtly its development has exceeded any initial objective; raylib has become a simple and easy-to-use trully multiplatform portable standalone media library with thousands of possibilities... and that's just the beginning!
|
||||
Probably by now, **raylib 2.0 is the simplest and easiest-to-use library to enjoy (and learn) videogames programming**... but, undoubtedly its development has exceeded any initial objective; raylib has become a simple and easy-to-use truly multiplatform portable standalone media library with thousands of possibilities... and that's just the beginning!
|
||||
|
||||
notes on raylib 2.5
|
||||
-------------------
|
||||
|
||||
After almost one years since latest raylib installment, here it is **raylib 2.5**. A lot of work has been put on this new version and consequently I decided to bump versioning several digits. The complete list of changes and additions is humungous, details can be found in the [CHANGELOG](CHANGELOG), and here it is a short recap with the highlight improvements.
|
||||
After almost one years since latest raylib installment, here is **raylib 2.5**. A lot of work has been put on this new version and consequently I decided to bump versioning several digits. The complete list of changes and additions is humungous, details can be found in the [CHANGELOG](CHANGELOG), and here is a short recap with the highlight improvements.
|
||||
|
||||
- New **window management and file system functions** to query monitor information, deal with clipboard, check directory files info and even launch a URL with default system web browser. Experimental **High-DPI monitor support** has also been added through a compile flag.
|
||||
|
||||
- **Redesigned Gamepad mechanism**, now generic for all platforms and gamepads, no more specific gamepad configurations.
|
||||
**Redesigned UWP input system**, now raylib supports UWP seamlessly, previous implementation required a custom input system implemented in user code.
|
||||
|
||||
- `rlgl` module has been redesigned to **support a unique buffer for shapes drawing batching**, including LINES, TRIANGLES, QUADS in the same indexed buffer, also added support for multi-buffering if required. Additionally, `rlPushMatrix()`/`rlPopMatrix()` functionality has been reviewed to behave exactly like OpenGL 1.1, `models_rlgl_solar_system` example has been added to illustrate this behaviour.
|
||||
- `rlgl` module has been redesigned to **support a unique buffer for shapes drawing batching**, including LINES, TRIANGLES, QUADS in the same indexed buffer, also added support for multi-buffering if required. Additionally, `rlPushMatrix()`/`rlPopMatrix()` functionality has been reviewed to behave exactly like OpenGL 1.1, `models_rlgl_solar_system` example has been added to illustrate this behavior.
|
||||
|
||||
- **VR simulator** has been reviewed to **allow custom configuration of Head-Mounted-Device parameters and distortion shader**, `core_vr_simulator` has been properly adapted to showcase this new functionality, now the VR simulator is a generic configurable stereo rendering system that allows any VR device simulation with just a few lines of code or even dynamic tweaking of HMD parameters.
|
||||
|
||||
|
@ -220,30 +220,30 @@ After almost one years since latest raylib installment, here it is **raylib 2.5*
|
|||
|
||||
- Experimental **cubemap support**, to automatically load multiple cubemap layouts (`LoadTextureCubemap()`). It required some internal `rlgl` redesign to allow cubemap textures.
|
||||
|
||||
- **Skeletal animation support for 3d models**, this addition implied a redesign of `Model` data structure to accomodate multiple mesh/multiple materials support and bones information. Multiple models functions have been reviewed and added on this process, also **glTF models loading support** has been added.
|
||||
- **Skeletal animation support for 3d models**, this addition implied a redesign of `Model` data structure to accommodate multiple mesh/multiple materials support and bones information. Multiple models functions have been reviewed and added on this process, also **glTF models loading support** has been added.
|
||||
|
||||
This is a just a brief list with some of the changes of the new **raylib 2.5** but there is way more, about **70 new functions** have been added and several subsystems have been redesigned. More than **30 new examples** have been created to show the new functionalities and better illustrate already available ones.
|
||||
This is just a brief list with some of the changes of the new **raylib 2.5** but there is way more, about **70 new functions** have been added and several subsystems have been redesigned. More than **30 new examples** have been created to show the new functionalities and better illustrate already available ones.
|
||||
|
||||
It has been a long year of hard work to make raylib a solid technology to develop new products over it.
|
||||
|
||||
notes on raylib 3.0
|
||||
-------------------
|
||||
|
||||
After **10 months of intense development**, new raylib version is ready. Despite primary intended as a minor release, the [CHANGELIST](CHANGELOG) has grown so big and the library has changed so much internally that it finally became a major release. Library **internal ABI** has reveived a big redesign and review, targeting portability, integration with other platforms and making it a perfect option for other progamming [language bindings](BINDINGS.md).
|
||||
After **10 months of intense development**, new raylib version is ready. Despite primary intended as a minor release, the [CHANGELIST](CHANGELOG) has grown so big and the library has changed so much internally that it finally became a major release. Library **internal ABI** has received a big redesign and review, targeting portability, integration with other platforms and making it a perfect option for other programming [language bindings](BINDINGS.md).
|
||||
|
||||
- All **global variables** from the multiple raylib modules have been moved to a **global context state**, it has several benefits, first, better code readability with more comprehensive variables naming and categorization (organized by types, i.e. `CORE.Window.display.width`, `CORE.Input.Keyboard.currentKeyState` or `RLGL.State.modelview`). Second, it allows better memory management to load global context state dynamically when required (not at the moment), making it easy to implement a **hot-reloading mechanism** if desired.
|
||||
- All **global variables** from the multiple raylib modules have been moved to a **global context state**, it has several benefits, first, better code readability with more comprehensive variable naming and categorization (organized by types, i.e. `CORE.Window.display.width`, `CORE.Input.Keyboard.currentKeyState` or `RLGL.State.modelview`). Second, it allows better memory management to load global context state dynamically when required (not at the moment), making it easy to implement a **hot-reloading mechanism** if desired.
|
||||
|
||||
- All **memory allocations** on raylib and its dependencies now use `RL_MALLOC`, `RL_FREE` and similar macros. Now users can easely hook their own memory allocations mechanism if desired, having more control over memory allocated internally by the library. Additionally, it makes it easier to port the library to embedded devices where memory control is critical. For more info check raylib issue #1074.
|
||||
- All **memory allocations** on raylib and its dependencies now use `RL_MALLOC`, `RL_FREE` and similar macros. Now users can easily hook their own memory allocation mechanism if desired, having more control over memory allocated internally by the library. Additionally, it makes it easier to port the library to embedded devices where memory control is critical. For more info check raylib issue #1074.
|
||||
|
||||
- All **I/O file accesses** from raylib are being moved to **memory data access**, now all I/O file access is centralized into just four functions: `LoadFileData()`, `SaveFileData()`, `LoadFileText()`, `SaveFileText()`. Users can just update those functions to any I/O file system. This change makes it easier to integrate raylib with **Virtual File Systems** or custom I/O file implementations.
|
||||
|
||||
- All **raylib data structures** have been reviewed and optimized for pass-by-value usage. One of raylib distinctive design decisions is that most of its functions receive and return data by value. This design makes raylib really simple for newcomers, avoiding pointers and allowing complete access to all structures data in a simple way. The downside is that data is copied on stack every function call and that copy could be costly so, all raylib data structures have been optimized to **stay under 64 bytes** for fast copy and retrieve.
|
||||
|
||||
- All **raylib tracelog messages** have been reviewd and categorized for a more comprehensive output information when developing raylib applications, now all display, input, timer, platform, auxiliar libraries, file-accesses, data loading/unloading issues are properly reported with more detailed and visual messages.
|
||||
- All **raylib tracelog messages** have been reviewed and categorized for a more comprehensive output information when developing raylib applications, now all display, input, timer, platform, auxiliar libraries, file-accesses, data loading/unloading issues are properly reported with more detailed and visual messages.
|
||||
|
||||
- `raudio` module has been internally reviewed to accomodate the new `Music` structure (converted from previous pointer format) and the module has been adapted to the **highly improved** [`miniaudio v0.10`](https://github.com/dr-soft/miniaudio).
|
||||
- `raudio` module has been internally reviewed to accommodate the new `Music` structure (converted from previous pointer format) and the module has been adapted to the **highly improved** [`miniaudio v0.10`](https://github.com/dr-soft/miniaudio).
|
||||
|
||||
- `text` module reviewed to **improve fonts generation** and text management functions, `Font` structure has been redesigned to better accomodate characters data, decoupling individual characters as `Image` glyphs from the font atlas parameters. Several improvements have been made to better support Unicode strings with UTF-8 encoding.
|
||||
- `text` module reviewed to **improve fonts generation** and text management functions, `Font` structure has been redesigned to better accommodate characters data, decoupling individual characters as `Image` glyphs from the font atlas parameters. Several improvements have been made to better support Unicode strings with UTF-8 encoding.
|
||||
|
||||
- **Multiple new examples added** (most of them contributed by raylib users) and all examples reviewed for correct execution on most of the supported platforms, specially Web and Raspberry Pi. A detailed categorized table has been created on github for easy examples navigation and code access.
|
||||
|
||||
|
@ -274,19 +274,19 @@ Here the list with some highlights for `raylib 3.5`.
|
|||
|
||||
- NEW **configuration options** exposed: For custom raylib builds, `config.h` now exposes **more than 150 flags and defines** to build raylib with only the desired features, for example, it allows to build a minimal raylib library in just some KB removing all external data filetypes supported, very useful to generate **small executables or embedded devices**.
|
||||
|
||||
- NEW **automatic GIF recording** feature: Actually, automatic GIF recording (**CTRL+F12**) for any raylib application has been available for some versions but this feature was really slow and low-performant using an old gif library with many file-accesses. It has been replaced by a **high-performant alternative** (`msf_gif.h`) that operates directly on memory... and actually works very well! Try it out!
|
||||
- NEW **automatic GIF recording** feature: Actually, automatic GIF recording (**CTRL+F12**) for any raylib application has been available for some versions but this feature was really slow and low-performant using an old gif library with many file accesses. It has been replaced by a **high-performant alternative** (`msf_gif.h`) that operates directly on memory... and actually works very well! Try it out!
|
||||
|
||||
- NEW **RenderBatch** system: `rlgl` module has been redesigned to support custom **render batches** to allow grouping draw calls as desired, previous implementation just had one default render batch. This feature has not been exposed to raylib API yet but it can be used by advance users dealing with `rlgl` directly. For example, multiple `RenderBatch` can be created for 2D sprites and 3D geometry independently.
|
||||
- NEW **RenderBatch** system: `rlgl` module has been redesigned to support custom **render batches** to allow grouping draw calls as desired, previous implementation just had one default render batch. This feature has not been exposed to raylib API yet but it can be used by advanced users dealing with `rlgl` directly. For example, multiple `RenderBatch` can be created for 2D sprites and 3D geometry independently.
|
||||
|
||||
- NEW **Framebuffer** system: `rlgl` module now exposes an API for custom **Framebuffer attachments** (including cubemaps!). raylib `RenderTexture` is a basic use-case, just allowing color and depth textures, but this new API allows the creation of more advance Framebuffers with multiple attachments, like the **G-Buffers**. `GenTexture*()` functions have been redesigned to use this new API.
|
||||
- NEW **Framebuffer** system: `rlgl` module now exposes an API for custom **Framebuffer attachments** (including cubemaps!). raylib `RenderTexture` is a basic use-case, just allowing color and depth textures, but this new API allows the creation of more advanced Framebuffers with multiple attachments, like the **G-Buffers**. `GenTexture*()` functions have been redesigned to use this new API.
|
||||
|
||||
- Improved **software rendering**: raylib `Image*()` API is intended for software rendering, for those cases when **no GPU or no Window is available**. Those functions operate directly with **multi-format** pixel data on RAM and they have been completely redesigned to be way faster, specially for small resolutions and retro-gaming. Low-end embedded devices like **microcontrollers with custom displays** could benefit of this raylib functionality!
|
||||
|
||||
- File **loading from memory**: Multiple functions have been redesigned to load data from memory buffers **instead of directly accessing the files**, now all raylib file loading/saving goes through a couple of functions that load data into memory. This feature allows **custom virtual-file-systems** and it gives more control to the user to access data already loaded in memory (i.e. images, fonts, sounds...).
|
||||
|
||||
- NEW **Window states** management system: raylib `core` module has been redesigned to support Window **state check and setup more easily** and also **before/after Window initialization**, `SetConfigFlags()` has been reviewed and `SetWindowState()` has been added to control Window minification, maximization, hidding, focusing, topmost and more.
|
||||
- NEW **Window states** management system: raylib `core` module has been redesigned to support Window **state check and setup more easily** and also **before/after Window initialization**, `SetConfigFlags()` has been reviewed and `SetWindowState()` has been added to control Window minification, maximization, hiding, focusing, topmost and more.
|
||||
|
||||
- NEW **GitHub Actions** CI/CD system: Previous CI implementation has been reviewed and improved a lot to support **multiple build configurations** (platforms, compilers, static/shared build) and also an **automatic deploy system** has been implemented to automatically attach the diferent generated artifacts to every new release. As the system seems to work very good, previous CI platforms (AppVeyor/TravisCI) have been removed.
|
||||
- NEW **GitHub Actions** CI/CD system: Previous CI implementation has been reviewed and improved a lot to support **multiple build configurations** (platforms, compilers, static/shared build) and also an **automatic deploy system** has been implemented to automatically attach the different generated artifacts to every new release. As the system seems to work very good, previous CI platforms (AppVeyor/TravisCI) have been removed.
|
||||
|
||||
A part of those changes, many new functions have been added, some redundant functions removed and many functions have been reviewed for consistency with the full API (function name, parameters name and order, code formatting...). Again, this release represents is a **great improvement for raylib and marks the way forward** for the library. Make sure to check [CHANGELOG](CHANGELOG) for details! Hope you enjoy it!
|
||||
|
||||
|
@ -295,7 +295,7 @@ Happy holidays! :)
|
|||
notes on raylib 3.7
|
||||
-------------------
|
||||
|
||||
April 2021, it's been about 4 months since last raylib release and here it is already a new one, this time with a bunch of internal redesigns and improvements. Surprisingly, on April the 8th I was awarded for a second time with the [Google Open Source Peer Bonus Award](https://opensource.googleblog.com/2021/04/announcing-first-group-of-google-open-source-peer-bonus-winners.html) for my contribution to open source world with raylib and it seems the library is getting some traction, what a better moment for a new release? Let's see what can be found in this new version:
|
||||
April 2021, it's been about 4 months since the last raylib release and here is already a new one, this time with a bunch of internal redesigns and improvements. Surprisingly, on April 8th I was awarded for a second time with the [Google Open Source Peer Bonus Award](https://opensource.googleblog.com/2021/04/announcing-first-group-of-google-open-source-peer-bonus-winners.html) for my contribution to open source world with raylib and it seems the library is getting some traction, what a better moment for a new release? Let's see what can be found in this new version:
|
||||
|
||||
Let's start with some numbers:
|
||||
|
||||
|
@ -315,18 +315,18 @@ Highlights for `raylib 3.7`:
|
|||
|
||||
- **ADDED: glTF animations support**. glTF is the preferred models file format to be used with raylib and along the addition of a models animation API on latest raylib versions, now animations support for glTF format has come to raylib, thanks for this great contribution to [Hristo Stamenov](@object71)
|
||||
|
||||
- **ADDED: Music streaming support from memory**. raylib has been adding the `Load*FromMemory()` option to all its supported file formats but **music streaming** was not supported yet... until now. Thanks to this great contribution by [Agnis "NeZvērs" Aldiņš](@nezvers), now raylib supports music streamming from memory data for all supported file formats: WAV, OGG, MP3, FLAC, XM and MOD.
|
||||
- **ADDED: Music streaming support from memory**. raylib has been adding the `Load*FromMemory()` option to all its supported file formats but **music streaming** was not supported yet... until now. Thanks to this great contribution by [Agnis "NeZvērs" Aldiņš](@nezvers), now raylib supports music streaming from memory data for all supported file formats: WAV, OGG, MP3, FLAC, XM and MOD.
|
||||
|
||||
- **RENAMED: enums values for consistency**. Most raylib enums names and values names have been renamed for consistency, now all value names start with the type of data they represent. It increases clarity and readability when using those values and also **improves overall library consistency**.
|
||||
|
||||
Beside those key changes, many functions have been reviewed with improvements and bug fixes, many of them contributed by the community! Thanks! And again, this release sets a **new milestone for raylib library**. Make sure to check [CHANGELOG](CHANGELOG) for detailed list of changes! Hope you enjoy this new raylib installment!
|
||||
Besides those key changes, many functions have been reviewed with improvements and bug fixes, many of them contributed by the community! Thanks! And again, this release sets a **new milestone for raylib library**. Make sure to check [CHANGELOG](CHANGELOG) for detailed list of changes! Hope you enjoy this new raylib installment!
|
||||
|
||||
Happy **gamedev/tools/graphics** programming! :)
|
||||
|
||||
notes on raylib 4.0 - 8th Anniversary Edition
|
||||
---------------------------------------------
|
||||
|
||||
It's been about 6 months since last raylib release and it's been **8 years since I started with this project**, what an adventure! It's time for a new release: `raylib 4.0`, **the biggest release ever** and an inflexion point for the library. Many hours have been put in this release to make it special, **many library details have been polished**: syntax, naming conventions, code comments, functions descriptions, log outputs... Almost all the issues have been closed (only 3 remain open at the moment of this writing) and some amazing new features have been added. I expect this **`raylib 4.0`** to be a long term version (LTS), stable and complete enough for any new graphic/game/tool application development.
|
||||
It's been about 6 months since last raylib release and it's been **8 years since I started with this project**, what an adventure! It's time for a new release: `raylib 4.0`, **the biggest release ever** and an inflection point for the library. Many hours have been put in this release to make it special, **many library details have been polished**: syntax, naming conventions, code comments, functions descriptions, log outputs... Almost all the issues have been closed (only 3 remain open at the moment of this writing) and some amazing new features have been added. I expect this **`raylib 4.0`** to be a long-term version (LTS), stable and complete enough for any new graphic/game/tool application development.
|
||||
|
||||
Let's start with some numbers:
|
||||
|
||||
|
@ -339,11 +339,11 @@ Let's start with some numbers:
|
|||
|
||||
Highlights for `raylib 4.0`:
|
||||
|
||||
- **Naming consistency and coherency**: `raylib` API has been completely reviewed to be consistent on naming conventions for data structures and functions, comments and descriptions have been reviewed, also the syntax of many symbols for consistency; some functions and structs have been renamed (i.e. `struct CharInfo` to `struct GlyphInfo`). Output log messages have been also improved to show more info to the users. Several articles have been writen in this process: [raylib_syntax analysis](https://github.com/raysan5/raylib/wiki/raylib-syntax-analysis) and [raylib API usage analysis](https://gist.github.com/raysan5/7c0c9fff1b6c19af24bb4a51b7383f1e). In general, a big polishment of the library to make it more consistent and coherent.
|
||||
- **Naming consistency and coherency**: `raylib` API has been completely reviewed to be consistent on naming conventions for data structures and functions, comments and descriptions have been reviewed, also the syntax of many symbols for consistency; some functions and structs have been renamed (i.e. `struct CharInfo` to `struct GlyphInfo`). Output log messages have been also improved to show more info to the users. Several articles have been written in this process: [raylib_syntax analysis](https://github.com/raysan5/raylib/wiki/raylib-syntax-analysis) and [raylib API usage analysis](https://gist.github.com/raysan5/7c0c9fff1b6c19af24bb4a51b7383f1e). In general, a big polishment of the library to make it more consistent and coherent.
|
||||
|
||||
- **Event Automation System**: This new _experimental_ feature has been added for future usage, it allows to **record input events and re-play them automatically**. This feature could be very useful to automatize examples testing but also for tutorials with assited game playing, in-game cinematics, speedruns, AI playing and more! Note this feature is still experimental.
|
||||
- **Event Automation System**: This new _experimental_ feature has been added for future usage, it allows to **record input events and re-play them automatically**. This feature could be very useful to automatize examples testing but also for tutorials with assisted game playing, in-game cinematics, speedruns, AI playing and more! Note this feature is still experimental.
|
||||
|
||||
- **Custom game-loop control**: As requested by some advance users, **the game-loop control can be exposed** compiling raylib with the config flag: `SUPPORT_CUSTOM_FRAME_CONTROL`. It's intended for advance users that want to control the events polling and also the timming mechanisms of their games.
|
||||
- **Custom game-loop control**: As requested by some advanced users, **the game-loop control can be exposed** compiling raylib with the config flag: `SUPPORT_CUSTOM_FRAME_CONTROL`. It's intended for advanced users that want to control the events polling and also the timing mechanisms of their games.
|
||||
|
||||
- [**`rlgl 4.0`**](https://github.com/raysan5/raylib/blob/master/src/rlgl.h): This module has been completely **decoupled from platform layer** and raylib, now `rlgl` single-file header-only library only depends on the multiple OpenGL backends supported, even the dependency on `raymath` has been removed. Additionally, **support for OpenGL 4.3** has been added, supporting compute shaders and Shader Storage Buffer Objects (SSBO). Now `rlgl` can be used as a complete standalone portable library to wrap several OpenGL version and providing **a simple and easy-to-use pseudo-OpenGL immediate-mode API**.
|
||||
|
||||
|
@ -361,12 +361,12 @@ Highlights for `raylib 4.0`:
|
|||
|
||||
Those are some of the key features for this new release but actually there is way more! **Support for `VOX` ([MagikaVoxel](https://ephtracy.github.io/)) 3d model format** has been added, **new [raylib_game_template](https://github.com/raysan5/raylib-game-template)** repo shared, **new `EncodeDataBase64()` and `DecodeDataBase64()` functions** added, **improved HiDPI support**, new `DrawTextPro()` with support for text rotations, completely **reviewed `glTF` models loading**, added **`SeekMusicStream()` for music seeking**, many new examples and +20 examples reviewed... **hundreds of improvements and bug fixes**! Make sure to check [CHANGELOG](CHANGELOG) for a detailed list of changes!
|
||||
|
||||
Undoubtely, **this is the best raylib ever**. Enjoy gamedev/tools/graphics programming! :)
|
||||
Undoubtedly, **this is the best raylib ever**. Enjoy gamedev/tools/graphics programming! :)
|
||||
|
||||
notes on raylib 4.2
|
||||
-------------------
|
||||
|
||||
**New raylib release!** Nine months after latest raylib, here it is a new version. It was supposed to be just a small update but, actually, it's a huge update with lots of changes a improvements. It has been possible thanks to the many contributors that has helped with issues and improvements, it's the **update with more contributors to date** and that's amazing!
|
||||
**New raylib release!** Nine months after latest raylib, here is a new version. It was supposed to be just a small update but, actually, it's a huge update with lots of changes a improvements. It has been possible thanks to the many contributors that has helped with issues and improvements, it's the **update with more contributors to date** and that's amazing!
|
||||
|
||||
Some numbers to start with:
|
||||
|
||||
|
@ -379,19 +379,146 @@ Some numbers to start with:
|
|||
Highlights for `raylib 4.2`:
|
||||
|
||||
- **raylib extra libraries cleanup**: raylib has been on diet and all the _extra_ libraries included on previous releases have been removed from raylib. Now raylib only includes the original **7** raylib modules: `rcore`, `rlgl`, `rshapes`, `rtextures`, `rtext`, `rmodels` and `raudio`. But no worries, _extra_ libraries have not been deleted, they have been moved to their own repos for better maintainability and more focus on its functionality. The libraries moved out from raylib repo are: [`raygui`](https://github.com/raysan5/raygui), [`physac`](https://github.com/raysan5/physac), [`rmem`](https://github.com/raylib-extras/rmem), [`reasings`](https://github.com/raylib-extras/reasings) and [`raudio`](https://github.com/raysan5/raudio) (standalone mode). On that same line, a new **amazing GitHub group:** [`raylib-extras`](https://github.com/raylib-extras) has been created by @JeffM2501 to contain raylib extra libraries as well as other raylib add-ons provided by the community. Jeff has done an amazing work on that line, providing multiple libraries and examples for raylib, like [custom first-person and third person camera systems](https://github.com/raylib-extras/extras-c/tree/main/cameras), [Dear ImGui raylib integration](https://github.com/raylib-extras/rlImGui), [multiple specific examples](https://github.com/raylib-extras/examples-c) and even a complete [RPG Game Example](https://github.com/raylib-extras/RPGExample)! Great work Jeff! :D
|
||||
|
||||
- **raylib examples review**: The +120 raylib examples have been reviewed to add clearer information about when the were first created (raylib version used) and when they were updated for the last time. But the greatest improvement for users has been the **addition of an estimated difficulty level** for every example, [web has been updated accordingly](https://www.raylib.com/examples.html) to reflect those difficulty levels. Now examples are classified with **1 to 4 stars** depending on difficulty to help users with their learning process. Personally, I think this "small" addition could be a game-changer to better guide new users on the library adoption! Additionally, this new raylib release includes 7 new examples; the most interesting one: [`text_codepoints_loading`](https://www.raylib.com/examples/text/loader.html?name=text_codepoints_loading) that illustrates how to load and draw custom codepoints from a font file, very useful for Asian languages.
|
||||
|
||||
- **raylib examples review**: The +120 raylib examples have been reviewed to add clearer information about when the were first created (raylib version used) and when they were updated for the last time. But the greatest improvement for users has been the **addition of an estimated difficulty level** for every example, [web has been updated accordingly](https://www.raylib.com/examples.html) to reflect those difficulty levels. Now examples are classified with **1 to 4 stars** depending on difficulty to help users with their learning process. Personally, I think this "small" addition could be a game-changer to better guide new users on the library adoption! Additionally, this new raylib release includes 7 new examples; the most interesting one: [`text_codepoints_loading`](https://www.raylib.com/examples/text/loader.html?name=text_codepoints_loading) that illustrates how to load and draw custom codepoints from a font file, very useful for Asian languages.
|
||||
|
||||
- [**`rres 1.0`**](https://github.com/raysan5/rres): New `rres` **resources packaging file-format**, including a [`rres-raylib`](https://github.com/raysan5/rres/blob/master/src/rres-raylib.h) library implementation and [`rrespacker`](https://raylibtech.itch.io/rrespacker) tool. `rres` file format has been [under development for +8 years](https://github.com/raysan5/rres#design-history) and it was originally created to be part of raylib. It was highly inspired by _XNA XNB_ resources file format but design has changed a lot along the years. This first release of the format specs is engine-agnostic and has been designed to be portable to any engine, including lots of professional features like data processing, compression and encryption.
|
||||
|
||||
- [**`raygui 3.2`**](https://github.com/raysan5/raygui): The **official raylib immediate-mode gui library** designed for tools development has been updated to a new version aligned with raylib 4.2. Multiple controls have been reviewed for library consistency, now all controls follow a similar function signature. It has been battle-tested with the development of +8 published tools in the last months. The tools can be seen and used for free in the [raylib technologies tools page](https://raylibtech.itch.io/). Worth mentioning that several of those **tools have been open sourced** for anyone to use, compile, contribute or learn how the code works.
|
||||
|
||||
|
||||
- [**`raylib_parser`**](https://github.com/raysan5/raylib/tree/master/parser): Multiple contributors **using the tool to automatize bindings creation** have contributed with improvements of this **tool to parse `raylib.h`** (and other raylib-style headers) to tokenize its enums, structs and functions. Processed data can be exported to custom file formats (i.e XML, JSON, LUA) for bindings generation or even docs generation if required.
|
||||
|
||||
- **New file system API**: Current API has been redesigned to be more comprehensive and better aligned with raylib naming conventions, two new functions are provided `LoadDirectoryFiles()`/`LoadDirectoryFilesEx()` to load a `FilePathList` for provided path, supporting extension filtering and recursive directory scan. `LoadDroppedFiles()` has been renamed to better reflect its internal functionality. Now, all raylib functions that start with `Load*()` allocate memory internally and a equivalent `Unload*()` function is defined to take care of that memory internally when not required any more!
|
||||
|
||||
- **New audio stream processors API** (_experimental_): Now real-time audio stream data processors can be added using callbacks to played Music. It allows users to create custom effects for audio like delays of low-pass-filtering (example provided). The new API uses a callback system and it's still _ highly experimental_, it differs from the usual level of complexity that provides raylib and it is intended for advance users. It could change in the future but, actually, `raudio` module is in the spotlight for future updates; [miniaudio](https://github.com/mackron/miniaudio) implements a new higher-level API that can be useful in the future for raylib.
|
||||
- **New audio stream processors API** (_experimental_): Now real-time audio stream data processors can be added using callbacks to played Music. It allows users to create custom effects for audio like delays of low-pass-filtering (example provided). The new API uses a callback system and it's still _ highly experimental_, it differs from the usual level of complexity that provides raylib and it is intended for advanced users. It could change in the future but, actually, `raudio` module is in the spotlight for future updates; [miniaudio](https://github.com/mackron/miniaudio) implements a new higher-level API that can be useful in the future for raylib.
|
||||
|
||||
As always, there are more improvements than the key features listed, make sure to check raylib [CHANGELOG](CHANGELOG) for the detailed list of changes; for this release a `WARNING` flag has been added to all the changes that could affect bindings or productivity code. **raylib keeps improving one more version** and a special focus on maintainability has been put on the library for the future. Specific/advance functionality will be provided through **raylib-extras** repos and raylib main repo devlelopment will be focused on what made raylib popular: being a simple and easy-to-use library to **enjoy videogames programming**.
|
||||
|
||||
**Enjoy gamedev/tools/graphics programming!** :)
|
||||
|
||||
notes on raylib 4.5
|
||||
-------------------
|
||||
|
||||
It's been **7 months** since latest raylib release. As usual, **many parts of the library have been reviewed and improved** along those months. Many issues have been closed, staying under 10 open issues at the moment of this writting and also many PRs from contributors have been received, reviewed and merged into raylib library. Some new functions have been added and some others have been removed to improve library coherence and avoid moving too high level, giving the users the tools to implement advance functionality themselfs over raylib. Again, this is a big release with a considerable amount of changes and improvements. Here is a small summary highlighting this new **rayib 4.5**.
|
||||
|
||||
Some numbers for this release:
|
||||
|
||||
- **+100** closed issues (for a TOTAL of **+1340**!)
|
||||
- **+350** commits since previous RELEASE (for a TOTAL of **+6350**!)
|
||||
- **+25** functions ADDED to raylib API (for a TOTAL of **516**!)
|
||||
- **+40** functions REVIEWED/REDESIGNED
|
||||
- **+40** new contributors (for a TOTAL of **405**!)
|
||||
|
||||
Highlights for `raylib 4.5`:
|
||||
|
||||
- **`NEW` Improved ANGLE support on Desktop platforms**: Support for OpenGL ES 2.0 on Desktop platforms (Windows, Linux, macOS) has been reviewed by @wtnbgo GitHub user. Now raylib can be compiled on desktop for OpenGL ES 2.0 and linked against [`ANGLE`](https://github.com/google/angle). This _small_ addition open the door to building raylib for all **ANGLE supported backends: Direct3D 11, Vulkan and Metal**. Please note that this new feature is still experimental and requires further testing!
|
||||
|
||||
- **`NEW` Camera module**: A brand new implementation from scratch for `rcamera` module, contributed by @Crydsch GitHub user! **New camera system is simpler, more flexible, more granular and more extendable**. Specific camera math transformations (movement/rotation) have been moved to individual functions, exposing them to users if required. Global state has been removed from the module and standalone usage has been greatly improved; now `rcamera.h` single-file header-only library can be used externally, independently of raylib. A new `UpdateCameraPro()` function has been added to address input-dependency of `UpdateCamera()`, now advanced users have **full control over camera inputs and movement/rotation speeds**!
|
||||
|
||||
- **`NEW` Support for M3D models and M3D/GLTF animations**: 3d models animations support has been a limited aspect of raylib for long time, some versions ago IQM animations were supported but raylib 4.5 also adds support for the brand new [M3D file format](https://bztsrc.gitlab.io/model3d/), including animations and the long expected support for **GLTF animations**! The new M3D file format is **simple, portable, feature complete, extensible and open source**. It also provides a complete set of tools to export/visualize M3D models from/to Blender! Now raylib supports up to **3 model file-formats with animations**: `IQM`, `GLTF` and `M3D`.
|
||||
|
||||
- **`NEW` Support QOA audio format (import/export)**: Just a couple of months ago the new [QOA file format](https://qoaformat.org/) was published, a very simple, portable and open source quite-ok-audio file format. raylib already supports it, added to `raudio` module and including audio loading from file, loading from memory, streaming from file, streaming from memory and **exporting to QOA** audio format. **Because simplicity really matters to raylib!**
|
||||
|
||||
- **`NEW` Module for compressed textures loading**: [`rl_gputex`](https://github.com/raysan5/raylib/blob/master/src/external/rl_gputex.h), a portable single-file header-only small library to load compressed texture file-formats (DDS, PKM, KTX, PVR, ASTC). Provided functionality is not new to raylib but it was part of the raylib `rtextures` module, now it has been moved into a separate self-contained library, **improving portability**. Note that this module is only intended to **load compressed data from files, ready to be uploaded to GPU**, no compression/decompression functionality is provided. This change is a first step towards a better modularization of raylib library.
|
||||
|
||||
- **Reviewed `rlgl` module for automatic limits checking**: Again, [`rlgl`](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) has been reviewed to simplify usage. Now users do not need to worry about reaching the internal render-batch limits when they send their triangles to draw 2d/3d, `rlgl` manages it automatically! This change allows a **great simplification for other modules** like `rshapes`, `rtextures` and `rmodels` that do not need to worry about bufffer overflows and can just define as many vertex as desired!
|
||||
|
||||
- **Reviewed `rshapes` module to minimize the rlgl dependency**: Now `rshapes` 2d shapes drawing functions **only depend on 6 low-level functions**: `rlBegin()`, `rlEnd()`, `rlVertex3f()`, `rlTexCoord2f()`, `rlNormal3f()`, `rlSetTexture()`. With only those pseudo-OpenGl 1.1 minimal functionality, everything can be drawn! This improvement converts `rshapes` module in a **self-contained, portable shapes-drawing library that can be used independently of raylib**, as far as entry points for those 6 functions are provided by the user. It even allows to be used for software rendering, with the proper backend!
|
||||
|
||||
- **Added data structures validation functions**: Multiple functions have been added by @RobLoach GitHub user to ease the validation of raylib data structures: `IsImageReady()`, `IsTextureReady()`, `IsSoundReady()`... Now users have a simple mechanism to **make sure data has been correctly loaded**, instead of checking internal structure values by themselves.
|
||||
|
||||
As usual, those are only some highlights but there is much more! New image generators, new color transformation functionality, improved blending support for color/alpha, etc... Make sure to check raylib [CHANGELOG]([CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG)) for a detailed list of changes! Please, note that all breaking changes have been flagged with a `WARNING` in the CHANGELOG, specially useful for binding creators!
|
||||
|
||||
**raylib keeps improving one more version** with a special focus on maintainability and sustainability. Always working towards making the library more **simple and easy-to-use**.
|
||||
|
||||
Let's keep **enjoying games/tools/graphics programming!** :)
|
||||
|
||||
notes on raylib 5.0
|
||||
-------------------
|
||||
|
||||
It's been **7 months** since latest raylib release and **10 years** since raylib 1.0 was officially released... what an adventure! In the last 10 years raylib has improved a lot, new functions have been added, many new features and improvements implemented, up to **500 contributors** have helped to shape the library as it is today. `raylib 5.0` is the final result of all this incredible amount of work and dedication. Here is the summary with the key features and additions of this NEW major version of raylib.
|
||||
|
||||
Some numbers for this release:
|
||||
|
||||
- **+200** closed issues (for a TOTAL of **+1540**!)
|
||||
- **+550** commits since previous RELEASE (for a TOTAL of **+6950**!)
|
||||
- **+35** functions ADDED to raylib API (for a TOTAL of **552**!)
|
||||
- **+60** functions REVIEWED/REDESIGNED
|
||||
- **+80** new contributors (for a TOTAL of **+500**!)
|
||||
|
||||
Highlights for `raylib 5.0`:
|
||||
|
||||
- **`rcore` module platform-split**: Probably the biggest raylib redesign in the last 10 years. raylib started as a library targeting 3 desktop platforms: `Windows`, `Linux` and `macOS` (thanks to `GLFW` underlying library) but with the years support for several new platforms has been added (`Android`, `Web`, `Rapsberry Pi`, `RPI native`...); lot of the platform code was shared so the logic was all together on `rcore.c` module, separated by compilation flags. This approach was very handy but also made it very difficult to support new platforms and specially painful for contributors not familiar with the module, navigating +8000 lines of code in a single file. A big redesign was really needed but the amount of work required was humungous and quite scary for a solo-developer like me, moreover considering that everything was working and the chances to break things were really high. Fortunately, some contributors were ready for the task (@ubkp, @michaelfiber, @Bigfoot71) and thanks to their initiative and super-hard work, the `rcore` [platform split](https://github.com/raysan5/raylib/blob/master/src/platforms) has been possible! This new raylib architecture greatly improves the platforms maintenance but also greatly simplifies the addition of new platforms. A [`platforms/rcore_template.c`](https://github.com/raysan5/raylib/blob/master/src/platforms/rcore_template.c) file is provided with the required structure and functions to be filled for the addition of new platforms, actually it has been simplified to mostly filling some pre-defined functions: `InitPlatform()`, `ClosePlatform`, `PollInputEvents`... Undoubtedly, **this redesign opens the doors to a new era for raylib**, letting the users to plug new platforms as desired.
|
||||
|
||||
- **`NEW` Platform backend supported: SDL**: Thanks to the new `rcore` platform-split, the addition of new platforms/backends to raylib has been greatly simplified. As a proof of concept, [`SDL2`](https://libsdl.org/) platform backend has been added to raylib as an alternative for `GLFW` library for desktop builds: [`platforms/rcore_desktop_sdl`](https://github.com/raysan5/raylib/blob/master/src/platforms/rcore_desktop_sdl.c). Lot of work has been put to provide exactly the same features as the other platforms and carefully test the new implementation. Now `SDL2` fans can use this new backend, just providing the required include libraries on compilation and linkage (not included in raylib, like `GLFW`). `SDL` backend support also **eases the process of supporting a wider range of platforms** that already support `SDL`.
|
||||
|
||||
- **`NEW` Platform backend supported: Nintendo Switch (closed source)**: The addition of the `SDL` backend was quite a challenge but to really verify the robustness and ease of the new platform plugin system, adding support for a console was a more demanding adventure. Surprisingly, only two days of work were required to add support for `Nintendo Switch` to raylib! Implementation result showed an outstanding level of simplicity, with a **self-contained module** (`rcore_swith.cpp`) supporting graphics and inputs. Unfortunately this module can not be open-sourced due to licensing restrictions.
|
||||
|
||||
- **`NEW` Splines drawing and evaluation API**: A complete set of functions has been added to [draw](https://github.com/raysan5/raylib/blob/master/src/raylib.h#L1258) and [evaluate](https://github.com/raysan5/raylib/blob/master/src/raylib.h#L1270) different types of splines: `Linear`, `Basis`, `Catmull-Rom`, `Quadratic Bezier` and `Cubic Bezier`. Splines are extremely useful for game development (describe paths, control NPC movement...) but they can also be very useful on tools development (node-conections, elements-movement, 3d modelling, animations...). This was the missing feature on the raylib [`rshapes`](https://github.com/raysan5/raylib/blob/master/src/rshapes.h) module to make it complete! Note that `rshapes` module can also be used independently of raylib just providing the **only 6 functions required for vertex definition and drawing**.
|
||||
|
||||
- **`NEW` Pseudo-random numbers generator: rprand**: After several years of users asking for this missing piece, a brand new pseudo-random generator module has been added to raylib. [`rprand`](https://github.com/raysan5/raylib/blob/master/src/external/rprand.h) implements the `Xoshiro128**` algorithm combined with `SplitMix64`, specially suited for **fast software pseudo-random numbers generation**. The module also implies some useful functions to generate non-repetitive random numbers sequences, functionality exposed by raylib. usage of this module can be controlled by a compilation flag, in case the default libc `rand()` function was preferred.
|
||||
|
||||
- **`NEW` Automation Events System API**: This new system was first added in `raylib 4.0` as an experimental feature but it was a bit clumsy and there was no API exposed to users. For the new `raylib 5.0` the system has been redesigned and [proper API](https://github.com/raysan5/raylib/blob/master/src/raylib.h#L1135) added for the users. With this new events automation system, users can **record input events for later replay**, very useful feature for testing automation, tutorials generation, assisted game playing, in-game cinematics, speedruns saving or even AI assited game playing!
|
||||
|
||||
- **`NEW` [`raygui 4.0`](https://github.com/raysan5/raygui)**: The **official raylib immediate-mode gui library** designed for tools development has been updated to a new version, aligned with raylib 5.0. This new version is a complete redesign of raygui to unify all controls structure and usage, now all controls have the same function signature!. `raygui` has been battle-tested with the development of +12 published tools in the last few years. The tools can be seen and used for free in the [raylib technologies tools page](https://raylibtech.itch.io/). Worth mentioning that several of those **tools have been open sourced** for anyone to use, compile, contribute or learn how the code works.
|
||||
|
||||
- **`NEW` raylib web examples functionality**: Beside the addition of several new examples, the web examples functionality has been improved. Examples have been organized by [complexity level](https://www.raylib.com/examples.html), marked with one star for simple examples and up to 4 stars for more complex ones. A new option has been added to web to allow to **filter examples by function-name** usage, to ease the learning process when looking for an usage example of some function. Finally, **open-graph metadata** information has been added to all examples individual webpages, improving a the visuals and information when sharing those webpages on social networks, sharing the example screenshot and details.
|
||||
|
||||
As always, those are only some highlights of the new `raylib 5.0` but there is many more improvements! Support for 16-bit HDR images/textures, SVG loading and scaling support, new OpenGL ES 3.0 graphic backend, new image gradient generators, sound alias loading, improved 3d models loading, multiple optimizations, new bindings, CodeQL integration and much more!
|
||||
|
||||
Make sure to check raylib [CHANGELOG]([CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG)) for a detailed list of changes!
|
||||
|
||||
Undoubtedly, this is the **biggest raylib update in 10 years**. Many new features and improvements with a special focus on maintainability and long-term sustainability. **Undoubtedly, this is the raylib of the future**.
|
||||
|
||||
**Enjoy programming!** :)
|
||||
|
||||
notes on raylib 5.5
|
||||
-------------------
|
||||
|
||||
One year after raylib 5.0 release, arribes `raylib 5.5`, the next big revision of the library. It's been **11 years** since raylib 1.0 release and in all this time it has never stopped growing and improving. With an outstanding number of new contributors and improvements, it's, again, the biggest raylib release to date.
|
||||
|
||||
Some numbers for this release:
|
||||
|
||||
- **+270** closed issues (for a TOTAL of **+1810**!)
|
||||
- **+800** commits since previous RELEASE (for a TOTAL of **+7770**!)
|
||||
- **+30** functions ADDED to raylib API (for a TOTAL of **580**!)
|
||||
- **+110** functions REVIEWED with fixes and improvements
|
||||
- **+140** new contributors (for a TOTAL of **+640**!)
|
||||
|
||||
Highlights for `raylib 5.5`:
|
||||
|
||||
- **`NEW` raylib pre-configured Windows package**: The new raylib **portable and self-contained Windows package** for `raylib 5.5`, intended for nobel devs that start in programming world, comes with one big addition: support for **C code building for Web platform with one-single-mouse-click!** For the last 10 years, the pre-configured raylib Windows package allowed to edit simple C projects on Notepad++ and easely compile Windows executables with an automatic script; this new release adds the possibility to compile the same C projects for Web platform with a simple mouse click. This new addition **greatly simplifies C to WebAssembly project building for new users**. The `raylib Windows Installer` package can be downloaded for free from [raylib on itch.io](https://raysan5.itch.io/raylib).
|
||||
|
||||
- **`NEW` raylib project creator tool**: A brand new tool developed to help raylib users to **setup new projects in a professional way**. `raylib project creator` generates a complete project structure with **multiple build systems ready-to-use** and **GitHub CI/CD actions pre-configured**. It only requires providing some C files and basic project parameters! The tools is [free and open-source](https://raysan5.itch.io/raylib-project-creator), and [it can be used online](https://raysan5.itch.io/raylib-project-creator)!.
|
||||
|
||||
- **`NEW` Platform backend supported: RGFW**: Thanks to the `rcore` platform-split implemented in `raylib 5.0`, **adding new platforms backends has been greatly simplified**, new backends can be added using provided template, self-contained in a single C module, completely portable. A new platform backend has been added: [`RGFW`](https://github.com/raysan5/raylib/blob/master/src/platforms/rcore_desktop_rgfw.c). `RGFW` is a **new single-file header-only portable library** ([`RGFW.h`](https://github.com/ColleagueRiley/RGFW)) intended for platform-functionality management (windowing and inputs); in this case for **desktop platforms** (Windows, Linux, macOS) but also for **Web platform**. It adds a new alternative to the already existing `GLFW` and `SDL` platform backends.
|
||||
|
||||
- **`NEW` Platform backend version supported: SDL3**: Previous `raylib 5.0` added support for `SDL2` library, and `raylib 5.5` not only improves SDL2 functionality, with several issues reviewed, but also adds support for the recently released big SDL update in years: [`SDL3`](https://wiki.libsdl.org/SDL3/FrontPage). Now users can **select at compile time the desired SDL version to use**, increasing the number of potential platforms supported in the future!
|
||||
|
||||
- **`NEW` Retro-console platforms supported: Dreamcast, N64, PSP, PSVita, PS4**: Thanks to the platform-split on `raylib 5.0`, **supporting new platform backends is easier than ever!** Along the raylib `rlgl` module support for the `OpenGL 1.1` graphics API, it opened the door to [**multiple homebrew retro-consoles backend implementations!**](https://github.com/raylib4Consoles) It's amazing to see raylib running on +20 year old consoles like [Dreamcast](https://github.com/raylib4Consoles/raylib4Dreamcast), [PSP](https://github.com/raylib4Consoles/raylib4Psp) or [PSVita](https://github.com/psp2dev/raylib4Vita), considering the hardware constraints of those platforms and proves **raylib outstanding versability!** Those additional platforms can be found in separate repositories and have been created by the amazing programmer Antonio Jose Ramos Marquez (@psxdev).
|
||||
|
||||
- **`NEW` GPU Skinning support**: After lots of requests for this feature, it has been finally added to raylib thanks to the contributor Daniel Holden (@orangeduck), probably the developer that has further pushed models animations with raylib, developing two amazing tools to visualize and test animations: [GenoView](https://github.com/orangeduck/GenoView) and [BVHView](https://github.com/orangeduck/BVHView). Adding GPU skinning was a tricky feature, considering it had to be **available for all raylib supported platforms**, including limited ones like Raspberry Pi with OpenGL ES 2.0, where some advance OpenGL features are not available (UBO, SSBO, Transform Feedback) but a multi-platform solution was found to make it possible. A new example, [`models_gpu_skinning`](https://github.com/raysan5/raylib/blob/master/examples/models/models_gpu_skinning.c) has been added to illustrate this new functionality. As an extra, previous existing CPU animation system has been greatly improved, multiplying performance by a factor (simplifiying required maths).
|
||||
|
||||
- **`NEW` [`raymath`](https://github.com/raysan5/raylib/blob/master/src/raymath.h) C++ operators**: After several requested for this feature, C++ math operators for `Vector2`, `Vector3`, `Vector4`, `Quaternion` and `Matrix` has been added to `raymath` as an extension to current implementation. Despite being only available for C++ because C does not support it, these operators **simplify C++ code when doing math operations**.
|
||||
|
||||
Beside those new big features, `raylib 5.5` comes with MANY other improvements:
|
||||
|
||||
- Normals support on batching system
|
||||
- Clipboard images reading support
|
||||
- CRC32/MD5/SHA1 hash computation
|
||||
- Gamepad vibration support
|
||||
- Improved font loading (no GPU required) with BDF fonts support
|
||||
- Time-based camera movement
|
||||
- Improved GLTF animations loading
|
||||
|
||||
...and [much much more](https://github.com/raysan5/raylib/blob/master/CHANGELOG), including **many functions reviews and new functions added!**
|
||||
|
||||
Make sure to check raylib [CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG) for a detailed list of changes!
|
||||
|
||||
To end with, I want to **thank all the contributors (+640!**) that along the years have **greatly improved raylib** and pushed it further and better day after day. Thanks to all of them, raylib is the amazing library it is today.
|
||||
|
||||
Last but not least, I want to thank **raylib sponsors and all the raylib community** for their support and continuous engagement with the library, creating and sharing amazing raylib projects on a daily basis. **Thanks for making raylib a great platform to enjoy games/tools/graphic programming!**
|
||||
|
||||
**After 11 years of development, `raylib 5.5` is the best raylib ever.**
|
||||
|
||||
**Enjoy programming with raylib!** :)
|
||||
|
|
2
LICENSE
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2013-2022 Ramon Santamaria (@raysan5)
|
||||
Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
|
||||
|
||||
This software is provided "as-is", without any express or implied warranty. In no event
|
||||
will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
67
README.md
|
@ -1,8 +1,10 @@
|
|||
<img align="left" src="https://github.com/raysan5/raylib/blob/master/logo/raylib_logo_animation.gif" width="288px">
|
||||
<img align="left" style="width:260px" src="https://git.terah.dev/imterah/raylib-drm-leasing/raw/branch/master/logo/raylib_logo_animation.gif" width="288px">
|
||||
|
||||
**raylib is a simple and easy-to-use library to enjoy videogames programming.**
|
||||
|
||||
raylib is highly inspired by Borland BGI graphics lib and by XNA framework and it's specially well suited for prototyping, tooling, graphical applications, embedded systems and education.
|
||||
raylib is highly inspired by Borland BGI graphics lib and by XNA framework and it's especially well suited for prototyping, tooling, graphical applications, embedded systems and education.
|
||||
|
||||
This is a fork of raylib designed to add DRM leasing support, which is used in [UnrealXR](https://git.terah.dev/imterah/unrealxr). Please go support the raylib developers!
|
||||
|
||||
*NOTE for ADVENTURERS: raylib is a programming library to enjoy videogames programming; no fancy interface, no visual helpers, no debug button... just coding in the most pure spartan-programmers way.*
|
||||
|
||||
|
@ -12,53 +14,29 @@ Ready to learn? Jump to [code examples!](https://www.raylib.com/examples.html)
|
|||
|
||||
<br>
|
||||
|
||||
[](https://github.com/raysan5/raylib/graphs/contributors)
|
||||
[](https://github.com/raysan5/raylib/releases)
|
||||
[](https://github.com/raysan5/raylib/stargazers)
|
||||
[](https://github.com/raysan5/raylib/commits/master)
|
||||
[](https://repology.org/project/raylib/versions)
|
||||
[](LICENSE)
|
||||
|
||||
[](https://discord.gg/raylib)
|
||||
[](https://www.reddit.com/r/raylib/)
|
||||
[](https://www.youtube.com/c/raylib)
|
||||
[](https://www.twitch.tv/raysan5)
|
||||
[](https://twitter.com/raysan5)
|
||||
|
||||
|
||||
[](https://github.com/raysan5/raylib/actions?query=workflow%3AWindows)
|
||||
[](https://github.com/raysan5/raylib/actions?query=workflow%3ALinux)
|
||||
[](https://github.com/raysan5/raylib/actions?query=workflow%3AmacOS)
|
||||
[](https://github.com/raysan5/raylib/actions?query=workflow%3AAndroid)
|
||||
[](https://github.com/raysan5/raylib/actions?query=workflow%3AWebAssembly)
|
||||
|
||||
[](https://github.com/raysan5/raylib/actions?query=workflow%3ACMakeBuilds)
|
||||
[](https://github.com/raysan5/raylib/actions/workflows/windows_examples.yml)
|
||||
[](https://github.com/raysan5/raylib/actions/workflows/linux_examples.yml)
|
||||
|
||||
features
|
||||
--------
|
||||
- **NO external dependencies**, all required libraries are [bundled into raylib](https://github.com/raysan5/raylib/tree/master/src/external)
|
||||
- Multiple platforms supported: **Windows, Linux, MacOS, RPI, Android, HTML5... and more!**
|
||||
- Written in plain C code (C99) in PascalCase/camelCase notation
|
||||
- Hardware accelerated with OpenGL (**1.1, 2.1, 3.3, 4.3 or ES 2.0**)
|
||||
- Written in plain C code (C99) using PascalCase/camelCase notation
|
||||
- Hardware accelerated with OpenGL (**1.1, 2.1, 3.3, 4.3, ES 2.0, ES 3.0**)
|
||||
- **Unique OpenGL abstraction layer** (usable as standalone module): [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h)
|
||||
- Multiple **Fonts** formats supported (TTF, XNA fonts, AngelCode fonts)
|
||||
- Multiple **Fonts** formats supported (TTF, OTF, FNT, BDF, sprite fonts)
|
||||
- Multiple texture formats supported, including **compressed formats** (DXT, ETC, ASTC)
|
||||
- **Full 3D support**, including 3D Shapes, Models, Billboards, Heightmaps and more!
|
||||
- **Full 3D support**, including 3D Shapes, Models, Billboards, Heightmaps and more!
|
||||
- Flexible Materials system, supporting classic maps and **PBR maps**
|
||||
- **Animated 3D models** supported (skeletal bones animation) (IQM)
|
||||
- Shaders support, including model and **postprocessing** shaders.
|
||||
- **Animated 3D models** supported (skeletal bones animation) (IQM, M3D, glTF)
|
||||
- Shaders support, including model shaders and **postprocessing** shaders
|
||||
- **Powerful math module** for Vector, Matrix and Quaternion operations: [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h)
|
||||
- Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
|
||||
- Audio loading and playing with streaming support (WAV, QOA, OGG, MP3, FLAC, XM, MOD)
|
||||
- **VR stereo rendering** support with configurable HMD device parameters
|
||||
- Huge examples collection with [+120 code examples](https://github.com/raysan5/raylib/tree/master/examples)!
|
||||
- Bindings to [+50 programming languages](https://github.com/raysan5/raylib/blob/master/BINDINGS.md)!
|
||||
- **Free and open source**.
|
||||
- Huge examples collection with [+140 code examples](https://github.com/raysan5/raylib/tree/master/examples)!
|
||||
- Bindings to [+70 programming languages](https://github.com/raysan5/raylib/blob/master/BINDINGS.md)!
|
||||
- **Free and open source**
|
||||
|
||||
basic example
|
||||
--------------
|
||||
This is a basic raylib example, it creates a window and it draws the text `"Congrats! You created your first window!"` in the middle of the screen. Check this example [running live on web here](https://www.raylib.com/examples/core/loader.html?name=core_basic_window).
|
||||
This is a basic raylib example, it creates a window and draws the text `"Congrats! You created your first window!"` in the middle of the screen. Check this example [running live on web here](https://www.raylib.com/examples/core/loader.html?name=core_basic_window).
|
||||
```c
|
||||
#include "raylib.h"
|
||||
|
||||
|
@ -85,7 +63,7 @@ build and installation
|
|||
|
||||
raylib binary releases for Windows, Linux, macOS, Android and HTML5 are available at the [Github Releases page](https://github.com/raysan5/raylib/releases).
|
||||
|
||||
raylib is also available via multiple [package managers](https://github.com/raysan5/raylib/issues/613) on multiple OS distributions.
|
||||
raylib is also available via multiple package managers on multiple OS distributions.
|
||||
|
||||
#### Installing and building raylib on multiple platforms
|
||||
|
||||
|
@ -114,9 +92,9 @@ raylib has been developed on Windows platform using [Notepad++](https://notepad-
|
|||
learning and docs
|
||||
------------------
|
||||
|
||||
raylib is designed to be learned using [the examples](https://github.com/raysan5/raylib/tree/master/examples) as the main reference. There is no standard API documentation but there is a [**cheatsheet**](https://www.raylib.com/cheatsheet/cheatsheet.html) containing all the functions available on the library a short description of each one of them, input parameters and result value names should be intuitive enough to understand how each function works.
|
||||
raylib is designed to be learned using [the examples](https://github.com/raysan5/raylib/tree/master/examples) as the main reference. There is no standard API documentation but there is a [**cheatsheet**](https://www.raylib.com/cheatsheet/cheatsheet.html) containing all the functions available on the library a short description of each one of them, input parameters and result value names should be intuitive enough to understand how each function works.
|
||||
|
||||
Some additional documentation about raylib design can be found in raylib GitHub Wiki. Here are the relevant links:
|
||||
Some additional documentation about raylib design can be found in [raylib GitHub Wiki](https://github.com/raysan5/raylib/wiki). Here are the relevant links:
|
||||
|
||||
- [raylib cheatsheet](https://www.raylib.com/cheatsheet/cheatsheet.html)
|
||||
- [raylib architecture](https://github.com/raysan5/raylib/wiki/raylib-architecture)
|
||||
|
@ -138,9 +116,16 @@ raylib is present in several networks and raylib community is growing everyday.
|
|||
- Patreon: [https://www.patreon.com/raylib](https://www.patreon.com/raylib)
|
||||
- YouTube: [https://www.youtube.com/channel/raylib](https://www.youtube.com/c/raylib)
|
||||
|
||||
contributors
|
||||
------------
|
||||
|
||||
<a href="https://github.com/raysan5/raylib/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=raysan5/raylib&max=500&columns=20&anon=1" />
|
||||
</a>
|
||||
|
||||
license
|
||||
-------
|
||||
|
||||
raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check [LICENSE](LICENSE) for further details.
|
||||
|
||||
raylib uses internally some libraries for window/graphics/inputs management and also to support different file formats loading, all those libraries are embedded with and are available in [src/external](https://github.com/raysan5/raylib/tree/master/src/external) directory. Check [raylib dependencies LICENSES](https://github.com/raysan5/raylib/wiki/raylib-dependencies) on raylib Wiki for details.
|
||||
raylib uses internally some libraries for window/graphics/inputs management and also to support different file formats loading, all those libraries are embedded with and are available in [src/external](https://github.com/raysan5/raylib/tree/master/src/external) directory. Check [raylib dependencies LICENSES](https://github.com/raysan5/raylib/wiki/raylib-dependencies) on [raylib Wiki](https://github.com/raysan5/raylib/wiki) for details.
|
||||
|
|
40
ROADMAP.md
|
@ -1,21 +1,35 @@
|
|||
# raylib roadmap
|
||||
|
||||
Here it is a wishlist with features and ideas to improve the library. Note that features listed here are usually long term improvements or just describe a route to follow for the library. There are also some additional places to look for raylib improvements and ideas:
|
||||
Here is a wishlist with features and ideas to improve the library. Note that features listed here are usually long term improvements or just describe a route to follow for the library. There are also some additional places to look for raylib improvements and ideas:
|
||||
|
||||
- [GitHub Issues](https://github.com/raysan5/raylib/issues) has several open issues for possible improvements or bugs to fix.
|
||||
- [raylib source code](https://github.com/raysan5/raylib/tree/master/src) has multiple *TODO* comments around code with pending things to review or improve.
|
||||
- raylib wishlists discussions (https://github.com/raysan5/raylib/discussions/1502, https://github.com/raysan5/raylib/discussions/2272) are open to everyone to ask for improvements, feel free to check and comment.
|
||||
- [raylib source code](https://github.com/raysan5/raylib/tree/master/src) has multiple *TODO* comments around code with pending things to review or improve.
|
||||
- raylib wishlists discussions are open to everyone to ask for improvements, feel free to check and comment:
|
||||
- [raylib wishlist 2021](https://github.com/raysan5/raylib/discussions/1502)
|
||||
- [raylib wishlist 2022](https://github.com/raysan5/raylib/discussions/2272)
|
||||
- [raylib 5.0 wishlist](https://github.com/raysan5/raylib/discussions/2952)
|
||||
|
||||
_Current version of raylib is complete and functional but there is always room for improvements._
|
||||
|
||||
**raylib 5.x**
|
||||
- [ ] `rcore`: Support additional platforms: iOS, Xbox Series S|X
|
||||
- [ ] `rcore_web`: Avoid GLFW dependency, functionality can be directly implemented using emscripten SDK
|
||||
- [ ] `rlgl`: Review GLSL shaders naming conventions for consistency
|
||||
- [ ] `textures`: Improve compressed textures support, loading and saving
|
||||
- [ ] `rmodels`: Improve 3d objects loading, specially animations (obj, gltf)
|
||||
- [ ] `raudio`: Implement miniaudio high-level provided features
|
||||
- [ ] `examples`: Review all examples, add more and better code explanations
|
||||
- [ ] Software renderer backend? Maybe using `Image` provided API
|
||||
|
||||
**raylib 4.x**
|
||||
- [ ] Redesign camera module (more flexible) ([#1143](https://github.com/raysan5/raylib/issues/1143), https://github.com/raysan5/raylib/discussions/2507)
|
||||
- [ ] Redesign gestures system, improve touch inputs management
|
||||
- [ ] Redesign raudio module, implement miniaudio high-level provided features
|
||||
- [x] Better documentation and improved examples
|
||||
- [x] Split core module into separate platforms?
|
||||
- [x] Redesign gestures system, improve touch inputs management
|
||||
- [x] Redesign camera module (more flexible) ([#1143](https://github.com/raysan5/raylib/issues/1143), https://github.com/raysan5/raylib/discussions/2507)
|
||||
- [x] Better documentation and improved examples, reviewed webpage with examples complexity level
|
||||
- [x] Focus on HTML5 ([raylib 5k gamejam](https://itch.io/jam/raylib-5k-gamejam)) and embedded platforms (RPI and similar SOCs)
|
||||
- [x] Additional support libraries: [raygui](https://github.com/raysan5/raygui), [rres](https://github.com/raysan5/rres)
|
||||
|
||||
|
||||
**raylib 4.0**
|
||||
- [x] Improved consistency and coherency in raylib API
|
||||
- [x] Continuous Deployment using GitHub Actions
|
||||
|
@ -23,23 +37,23 @@ _Current version of raylib is complete and functional but there is always room f
|
|||
- Basic CPU/GPU stats system (memory, draws, time...) ([#1295](https://github.com/raysan5/raylib/issues/1295)) - _DISCARDED_
|
||||
- Software rendering backend (avoiding OpenGL) ([#1370](https://github.com/raysan5/raylib/issues/1370)) - _DISCARDED_
|
||||
- Network module (UDP): `rnet` ([#753](https://github.com/raysan5/raylib/issues/753)) - _DISCARDED_ - Use [nbnet](https://github.com/nathhB/nbnet).
|
||||
|
||||
|
||||
**raylib 3.0**
|
||||
- [x] Custom memory allocators support
|
||||
- [x] Global variables moved to global context
|
||||
- [x] Optimize data structures for pass-by-value
|
||||
- [x] Trace log messages redesign ([#1065](https://github.com/raysan5/raylib/issues/1065))
|
||||
- [x] Continuous Integration using GitHub Actions
|
||||
|
||||
|
||||
**raylib 2.5**
|
||||
- [x] Support Animated models
|
||||
- [x] Support glTF models file format
|
||||
- [x] Unicode support on text drawing
|
||||
|
||||
|
||||
**raylib 2.0**
|
||||
- [x] Removed external dependencies (GLFW3 and OpenAL)
|
||||
- [x] Support TCC compiler (32bit and 64bit)
|
||||
|
||||
|
||||
**raylib 1.8**
|
||||
- [x] Improved Materials system with PBR support
|
||||
- [x] Procedural image generation functions (spot, gradient, noise...)
|
||||
|
@ -50,7 +64,7 @@ _Current version of raylib is complete and functional but there is always room f
|
|||
- [x] Support configuration flags
|
||||
- [x] Improved build system for Android
|
||||
- [x] Gamepad support on HTML5
|
||||
|
||||
|
||||
**raylib 1.6**
|
||||
- [x] Lua scripting support (raylib Lua wrapper)
|
||||
- [x] Redesigned audio module
|
||||
|
@ -59,7 +73,7 @@ _Current version of raylib is complete and functional but there is always room f
|
|||
**raylib 1.5**
|
||||
- [x] Support Oculus Rift CV1 and VR stereo rendering (simulator)
|
||||
- [x] Redesign Shaders/Textures system -> New Materials system
|
||||
- [x] Support lighting: Omni, Directional and Spot lights
|
||||
- [x] Support lighting: Omni, Directional and Spotlights
|
||||
- [x] Redesign physics module (physac)
|
||||
- [x] Chiptunes audio modules support
|
||||
|
||||
|
|
422
build.zig
Normal file
|
@ -0,0 +1,422 @@
|
|||
const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
|
||||
/// Minimum supported version of Zig
|
||||
const min_ver = "0.13.0";
|
||||
|
||||
comptime {
|
||||
const order = std.SemanticVersion.order;
|
||||
const parse = std.SemanticVersion.parse;
|
||||
if (order(builtin.zig_version, parse(min_ver) catch unreachable) == .lt)
|
||||
@compileError("Raylib requires zig version " ++ min_ver);
|
||||
}
|
||||
|
||||
fn setDesktopPlatform(raylib: *std.Build.Step.Compile, platform: PlatformBackend) void {
|
||||
raylib.defineCMacro("PLATFORM_DESKTOP", null);
|
||||
|
||||
switch (platform) {
|
||||
.glfw => raylib.defineCMacro("PLATFORM_DESKTOP_GLFW", null),
|
||||
.rgfw => raylib.defineCMacro("PLATFORM_DESKTOP_RGFW", null),
|
||||
.sdl => raylib.defineCMacro("PLATFORM_DESKTOP_SDL", null),
|
||||
else => {},
|
||||
}
|
||||
}
|
||||
|
||||
fn createEmsdkStep(b: *std.Build, emsdk: *std.Build.Dependency) *std.Build.Step.Run {
|
||||
if (builtin.os.tag == .windows) {
|
||||
return b.addSystemCommand(&.{emsdk.path("emsdk.bat").getPath(b)});
|
||||
} else {
|
||||
return b.addSystemCommand(&.{emsdk.path("emsdk").getPath(b)});
|
||||
}
|
||||
}
|
||||
|
||||
fn emSdkSetupStep(b: *std.Build, emsdk: *std.Build.Dependency) !?*std.Build.Step.Run {
|
||||
const dot_emsc_path = emsdk.path(".emscripten").getPath(b);
|
||||
const dot_emsc_exists = !std.meta.isError(std.fs.accessAbsolute(dot_emsc_path, .{}));
|
||||
|
||||
if (!dot_emsc_exists) {
|
||||
const emsdk_install = createEmsdkStep(b, emsdk);
|
||||
emsdk_install.addArgs(&.{ "install", "latest" });
|
||||
const emsdk_activate = createEmsdkStep(b, emsdk);
|
||||
emsdk_activate.addArgs(&.{ "activate", "latest" });
|
||||
emsdk_activate.step.dependOn(&emsdk_install.step);
|
||||
return emsdk_activate;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// A list of all flags from `src/config.h` that one may override
|
||||
const config_h_flags = outer: {
|
||||
// Set this value higher if compile errors happen as `src/config.h` gets larger
|
||||
@setEvalBranchQuota(1 << 20);
|
||||
|
||||
const config_h = @embedFile("src/config.h");
|
||||
var flags: [std.mem.count(u8, config_h, "\n") + 1][]const u8 = undefined;
|
||||
|
||||
var i = 0;
|
||||
var lines = std.mem.tokenizeScalar(u8, config_h, '\n');
|
||||
while (lines.next()) |line| {
|
||||
if (!std.mem.containsAtLeast(u8, line, 1, "SUPPORT")) continue;
|
||||
if (std.mem.startsWith(u8, line, "//")) continue;
|
||||
if (std.mem.startsWith(u8, line, "#if")) continue;
|
||||
|
||||
var flag = std.mem.trimLeft(u8, line, " \t"); // Trim whitespace
|
||||
flag = flag["#define ".len - 1 ..]; // Remove #define
|
||||
flag = std.mem.trimLeft(u8, flag, " \t"); // Trim whitespace
|
||||
flag = flag[0 .. std.mem.indexOf(u8, flag, " ") orelse continue]; // Flag is only one word, so capture till space
|
||||
flag = "-D" ++ flag; // Prepend with -D
|
||||
|
||||
flags[i] = flag;
|
||||
i += 1;
|
||||
}
|
||||
|
||||
// Uncomment this to check what flags normally get passed
|
||||
//@compileLog(flags[0..i].*);
|
||||
break :outer flags[0..i].*;
|
||||
};
|
||||
|
||||
fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, options: Options) !*std.Build.Step.Compile {
|
||||
var raylib_flags_arr = std.ArrayList([]const u8).init(b.allocator);
|
||||
defer raylib_flags_arr.deinit();
|
||||
|
||||
try raylib_flags_arr.appendSlice(&[_][]const u8{
|
||||
"-std=gnu99",
|
||||
"-D_GNU_SOURCE",
|
||||
"-DGL_SILENCE_DEPRECATION=199309L",
|
||||
"-fno-sanitize=undefined", // https://github.com/raysan5/raylib/issues/3674
|
||||
});
|
||||
|
||||
if (options.shared) {
|
||||
try raylib_flags_arr.appendSlice(&[_][]const u8{
|
||||
"-fPIC",
|
||||
"-DBUILD_LIBTYPE_SHARED",
|
||||
});
|
||||
}
|
||||
|
||||
if (options.config.len > 0) {
|
||||
// Sets a flag indiciating the use of a custom `config.h`
|
||||
try raylib_flags_arr.append("-DEXTERNAL_CONFIG_FLAGS");
|
||||
|
||||
// Splits a space-separated list of config flags into multiple flags
|
||||
//
|
||||
// Note: This means certain flags like `-x c++` won't be processed properly.
|
||||
// `-xc++` or similar should be used when possible
|
||||
var config_iter = std.mem.tokenizeScalar(u8, options.config, ' ');
|
||||
|
||||
// Apply config flags supplied by the user
|
||||
while (config_iter.next()) |config_flag|
|
||||
try raylib_flags_arr.append(config_flag);
|
||||
|
||||
// Apply all relevant configs from `src/config.h` *except* the user-specified ones
|
||||
//
|
||||
// Note: Currently using a suboptimal `O(m*n)` time algorithm where:
|
||||
// `m` corresponds roughly to the number of lines in `src/config.h`
|
||||
// `n` corresponds to the number of user-specified flags
|
||||
outer: for (config_h_flags) |flag| {
|
||||
// If a user already specified the flag, skip it
|
||||
config_iter.reset();
|
||||
while (config_iter.next()) |config_flag| {
|
||||
// For a user-specified flag to match, it must share the same prefix and have the
|
||||
// same length or be followed by an equals sign
|
||||
if (!std.mem.startsWith(u8, config_flag, flag)) continue;
|
||||
if (config_flag.len == flag.len or config_flag[flag.len] == '=') continue :outer;
|
||||
}
|
||||
|
||||
// Otherwise, append default value from config.h to compile flags
|
||||
try raylib_flags_arr.append(flag);
|
||||
}
|
||||
}
|
||||
|
||||
const raylib = if (options.shared)
|
||||
b.addSharedLibrary(.{
|
||||
.name = "raylib",
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
})
|
||||
else
|
||||
b.addStaticLibrary(.{
|
||||
.name = "raylib",
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
raylib.linkLibC();
|
||||
|
||||
// No GLFW required on PLATFORM_DRM
|
||||
if (options.platform != .drm) {
|
||||
raylib.addIncludePath(b.path("src/external/glfw/include"));
|
||||
}
|
||||
|
||||
var c_source_files = try std.ArrayList([]const u8).initCapacity(b.allocator, 2);
|
||||
c_source_files.appendSliceAssumeCapacity(&.{ "src/rcore.c", "src/utils.c" });
|
||||
|
||||
if (options.raudio) {
|
||||
try c_source_files.append("src/raudio.c");
|
||||
}
|
||||
if (options.rmodels) {
|
||||
try c_source_files.append("src/rmodels.c");
|
||||
}
|
||||
if (options.rshapes) {
|
||||
try c_source_files.append("src/rshapes.c");
|
||||
}
|
||||
if (options.rtext) {
|
||||
try c_source_files.append("src/rtext.c");
|
||||
}
|
||||
if (options.rtextures) {
|
||||
try c_source_files.append("src/rtextures.c");
|
||||
}
|
||||
|
||||
if (options.opengl_version != .auto) {
|
||||
raylib.defineCMacro(options.opengl_version.toCMacroStr(), null);
|
||||
}
|
||||
|
||||
switch (target.result.os.tag) {
|
||||
.windows => {
|
||||
try c_source_files.append("src/rglfw.c");
|
||||
raylib.linkSystemLibrary("winmm");
|
||||
raylib.linkSystemLibrary("gdi32");
|
||||
raylib.linkSystemLibrary("opengl32");
|
||||
|
||||
setDesktopPlatform(raylib, options.platform);
|
||||
},
|
||||
.linux => {
|
||||
if (options.platform != .drm) {
|
||||
try c_source_files.append("src/rglfw.c");
|
||||
|
||||
if (options.linux_display_backend == .X11 or options.linux_display_backend == .Both) {
|
||||
raylib.defineCMacro("_GLFW_X11", null);
|
||||
raylib.linkSystemLibrary("GLX");
|
||||
raylib.linkSystemLibrary("X11");
|
||||
raylib.linkSystemLibrary("Xcursor");
|
||||
raylib.linkSystemLibrary("Xext");
|
||||
raylib.linkSystemLibrary("Xfixes");
|
||||
raylib.linkSystemLibrary("Xi");
|
||||
raylib.linkSystemLibrary("Xinerama");
|
||||
raylib.linkSystemLibrary("Xrandr");
|
||||
raylib.linkSystemLibrary("Xrender");
|
||||
}
|
||||
|
||||
if (options.linux_display_backend == .Wayland or options.linux_display_backend == .Both) {
|
||||
_ = b.findProgram(&.{"wayland-scanner"}, &.{}) catch {
|
||||
std.log.err(
|
||||
\\ `wayland-scanner` may not be installed on the system.
|
||||
\\ You can switch to X11 in your `build.zig` by changing `Options.linux_display_backend`
|
||||
, .{});
|
||||
@panic("`wayland-scanner` not found");
|
||||
};
|
||||
raylib.defineCMacro("_GLFW_WAYLAND", null);
|
||||
raylib.linkSystemLibrary("EGL");
|
||||
raylib.linkSystemLibrary("wayland-client");
|
||||
raylib.linkSystemLibrary("xkbcommon");
|
||||
waylandGenerate(b, raylib, "wayland.xml", "wayland-client-protocol");
|
||||
waylandGenerate(b, raylib, "xdg-shell.xml", "xdg-shell-client-protocol");
|
||||
waylandGenerate(b, raylib, "xdg-decoration-unstable-v1.xml", "xdg-decoration-unstable-v1-client-protocol");
|
||||
waylandGenerate(b, raylib, "viewporter.xml", "viewporter-client-protocol");
|
||||
waylandGenerate(b, raylib, "relative-pointer-unstable-v1.xml", "relative-pointer-unstable-v1-client-protocol");
|
||||
waylandGenerate(b, raylib, "pointer-constraints-unstable-v1.xml", "pointer-constraints-unstable-v1-client-protocol");
|
||||
waylandGenerate(b, raylib, "fractional-scale-v1.xml", "fractional-scale-v1-client-protocol");
|
||||
waylandGenerate(b, raylib, "xdg-activation-v1.xml", "xdg-activation-v1-client-protocol");
|
||||
waylandGenerate(b, raylib, "idle-inhibit-unstable-v1.xml", "idle-inhibit-unstable-v1-client-protocol");
|
||||
}
|
||||
|
||||
setDesktopPlatform(raylib, options.platform);
|
||||
} else {
|
||||
if (options.opengl_version == .auto) {
|
||||
raylib.linkSystemLibrary("GLESv2");
|
||||
raylib.defineCMacro("GRAPHICS_API_OPENGL_ES2", null);
|
||||
}
|
||||
|
||||
raylib.linkSystemLibrary("EGL");
|
||||
raylib.linkSystemLibrary("gbm");
|
||||
raylib.linkSystemLibrary2("libdrm", .{ .use_pkg_config = .force });
|
||||
|
||||
raylib.defineCMacro("PLATFORM_DRM", null);
|
||||
raylib.defineCMacro("EGL_NO_X11", null);
|
||||
raylib.defineCMacro("DEFAULT_BATCH_BUFFER_ELEMENT", "2048");
|
||||
}
|
||||
},
|
||||
.freebsd, .openbsd, .netbsd, .dragonfly => {
|
||||
try c_source_files.append("rglfw.c");
|
||||
raylib.linkSystemLibrary("GL");
|
||||
raylib.linkSystemLibrary("rt");
|
||||
raylib.linkSystemLibrary("dl");
|
||||
raylib.linkSystemLibrary("m");
|
||||
raylib.linkSystemLibrary("X11");
|
||||
raylib.linkSystemLibrary("Xrandr");
|
||||
raylib.linkSystemLibrary("Xinerama");
|
||||
raylib.linkSystemLibrary("Xi");
|
||||
raylib.linkSystemLibrary("Xxf86vm");
|
||||
raylib.linkSystemLibrary("Xcursor");
|
||||
|
||||
setDesktopPlatform(raylib, options.platform);
|
||||
},
|
||||
.macos => {
|
||||
// Include xcode_frameworks for cross compilation
|
||||
if (b.lazyDependency("xcode_frameworks", .{})) |dep| {
|
||||
raylib.addSystemFrameworkPath(dep.path("Frameworks"));
|
||||
raylib.addSystemIncludePath(dep.path("include"));
|
||||
raylib.addLibraryPath(dep.path("lib"));
|
||||
}
|
||||
|
||||
// On macos rglfw.c include Objective-C files.
|
||||
try raylib_flags_arr.append("-ObjC");
|
||||
raylib.root_module.addCSourceFile(.{
|
||||
.file = b.path("src/rglfw.c"),
|
||||
.flags = raylib_flags_arr.items,
|
||||
});
|
||||
_ = raylib_flags_arr.pop();
|
||||
raylib.linkFramework("Foundation");
|
||||
raylib.linkFramework("CoreServices");
|
||||
raylib.linkFramework("CoreGraphics");
|
||||
raylib.linkFramework("AppKit");
|
||||
raylib.linkFramework("IOKit");
|
||||
|
||||
setDesktopPlatform(raylib, options.platform);
|
||||
},
|
||||
.emscripten => {
|
||||
// Include emscripten for cross compilation
|
||||
if (b.lazyDependency("emsdk", .{})) |dep| {
|
||||
if (try emSdkSetupStep(b, dep)) |emSdkStep| {
|
||||
raylib.step.dependOn(&emSdkStep.step);
|
||||
}
|
||||
|
||||
raylib.addIncludePath(dep.path("upstream/emscripten/cache/sysroot/include"));
|
||||
}
|
||||
|
||||
raylib.defineCMacro("PLATFORM_WEB", null);
|
||||
if (options.opengl_version == .auto) {
|
||||
raylib.defineCMacro("GRAPHICS_API_OPENGL_ES2", null);
|
||||
}
|
||||
},
|
||||
else => {
|
||||
@panic("Unsupported OS");
|
||||
},
|
||||
}
|
||||
|
||||
raylib.root_module.addCSourceFiles(.{
|
||||
.files = c_source_files.items,
|
||||
.flags = raylib_flags_arr.items,
|
||||
});
|
||||
|
||||
return raylib;
|
||||
}
|
||||
|
||||
pub fn addRaygui(b: *std.Build, raylib: *std.Build.Step.Compile, raygui_dep: *std.Build.Dependency) void {
|
||||
var gen_step = b.addWriteFiles();
|
||||
raylib.step.dependOn(&gen_step.step);
|
||||
|
||||
const raygui_c_path = gen_step.add("raygui.c", "#define RAYGUI_IMPLEMENTATION\n#include \"raygui.h\"\n");
|
||||
raylib.addCSourceFile(.{ .file = raygui_c_path });
|
||||
raylib.addIncludePath(raygui_dep.path("src"));
|
||||
|
||||
raylib.installHeader(raygui_dep.path("src/raygui.h"), "raygui.h");
|
||||
}
|
||||
|
||||
pub const Options = struct {
|
||||
raudio: bool = true,
|
||||
rmodels: bool = true,
|
||||
rshapes: bool = true,
|
||||
rtext: bool = true,
|
||||
rtextures: bool = true,
|
||||
platform: PlatformBackend = .glfw,
|
||||
shared: bool = false,
|
||||
linux_display_backend: LinuxDisplayBackend = .Both,
|
||||
opengl_version: OpenglVersion = .auto,
|
||||
/// config should be a list of space-separated cflags, eg, "-DSUPPORT_CUSTOM_FRAME_CONTROL"
|
||||
config: []const u8 = &.{},
|
||||
|
||||
const defaults = Options{};
|
||||
|
||||
fn getOptions(b: *std.Build) Options {
|
||||
return .{
|
||||
.platform = b.option(PlatformBackend, "platform", "Choose the platform backedn for desktop target") orelse defaults.platform,
|
||||
.raudio = b.option(bool, "raudio", "Compile with audio support") orelse defaults.raudio,
|
||||
.rmodels = b.option(bool, "rmodels", "Compile with models support") orelse defaults.rmodels,
|
||||
.rtext = b.option(bool, "rtext", "Compile with text support") orelse defaults.rtext,
|
||||
.rtextures = b.option(bool, "rtextures", "Compile with textures support") orelse defaults.rtextures,
|
||||
.rshapes = b.option(bool, "rshapes", "Compile with shapes support") orelse defaults.rshapes,
|
||||
.shared = b.option(bool, "shared", "Compile as shared library") orelse defaults.shared,
|
||||
.linux_display_backend = b.option(LinuxDisplayBackend, "linux_display_backend", "Linux display backend to use") orelse defaults.linux_display_backend,
|
||||
.opengl_version = b.option(OpenglVersion, "opengl_version", "OpenGL version to use") orelse defaults.opengl_version,
|
||||
.config = b.option([]const u8, "config", "Compile with custom define macros overriding config.h") orelse &.{},
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
pub const OpenglVersion = enum {
|
||||
auto,
|
||||
gl_1_1,
|
||||
gl_2_1,
|
||||
gl_3_3,
|
||||
gl_4_3,
|
||||
gles_2,
|
||||
gles_3,
|
||||
|
||||
pub fn toCMacroStr(self: @This()) []const u8 {
|
||||
switch (self) {
|
||||
.auto => @panic("OpenglVersion.auto cannot be turned into a C macro string"),
|
||||
.gl_1_1 => return "GRAPHICS_API_OPENGL_11",
|
||||
.gl_2_1 => return "GRAPHICS_API_OPENGL_21",
|
||||
.gl_3_3 => return "GRAPHICS_API_OPENGL_33",
|
||||
.gl_4_3 => return "GRAPHICS_API_OPENGL_43",
|
||||
.gles_2 => return "GRAPHICS_API_OPENGL_ES2",
|
||||
.gles_3 => return "GRAPHICS_API_OPENGL_ES3",
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
pub const LinuxDisplayBackend = enum {
|
||||
X11,
|
||||
Wayland,
|
||||
Both,
|
||||
};
|
||||
|
||||
pub const PlatformBackend = enum {
|
||||
glfw,
|
||||
rgfw,
|
||||
sdl,
|
||||
drm,
|
||||
};
|
||||
|
||||
pub fn build(b: *std.Build) !void {
|
||||
// Standard target options allows the person running `zig build` to choose
|
||||
// what target to build for. Here we do not override the defaults, which
|
||||
// means any target is allowed, and the default is native. Other options
|
||||
// for restricting supported target set are available.
|
||||
const target = b.standardTargetOptions(.{});
|
||||
// Standard optimization options allow the person running `zig build` to select
|
||||
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not
|
||||
// set a preferred release mode, allowing the user to decide how to optimize.
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
const lib = try compileRaylib(b, target, optimize, Options.getOptions(b));
|
||||
|
||||
lib.installHeader(b.path("src/raylib.h"), "raylib.h");
|
||||
lib.installHeader(b.path("src/raymath.h"), "raymath.h");
|
||||
lib.installHeader(b.path("src/rlgl.h"), "rlgl.h");
|
||||
|
||||
b.installArtifact(lib);
|
||||
}
|
||||
|
||||
fn waylandGenerate(
|
||||
b: *std.Build,
|
||||
raylib: *std.Build.Step.Compile,
|
||||
comptime protocol: []const u8,
|
||||
comptime basename: []const u8,
|
||||
) void {
|
||||
const waylandDir = "src/external/glfw/deps/wayland";
|
||||
const protocolDir = b.pathJoin(&.{ waylandDir, protocol });
|
||||
const clientHeader = basename ++ ".h";
|
||||
const privateCode = basename ++ "-code.h";
|
||||
|
||||
const client_step = b.addSystemCommand(&.{ "wayland-scanner", "client-header" });
|
||||
client_step.addFileArg(b.path(protocolDir));
|
||||
raylib.addIncludePath(client_step.addOutputFileArg(clientHeader).dirname());
|
||||
|
||||
const private_step = b.addSystemCommand(&.{ "wayland-scanner", "private-code" });
|
||||
private_step.addFileArg(b.path(protocolDir));
|
||||
raylib.addIncludePath(private_step.addOutputFileArg(privateCode).dirname());
|
||||
|
||||
raylib.step.dependOn(&client_step.step);
|
||||
raylib.step.dependOn(&private_step.step);
|
||||
}
|
24
build.zig.zon
Normal file
|
@ -0,0 +1,24 @@
|
|||
.{
|
||||
.name = "raylib",
|
||||
.version = "5.5.0",
|
||||
.minimum_zig_version = "0.13.0",
|
||||
|
||||
.dependencies = .{
|
||||
.xcode_frameworks = .{
|
||||
.url = "git+https://github.com/hexops/xcode-frameworks#a6bf82e032d4d9923ad5c222d466710fcc05f249",
|
||||
.hash = "12208da4dfcd9b53fb367375fb612ec73f38e53015f1ce6ae6d6e8437a637078e170",
|
||||
.lazy = true,
|
||||
},
|
||||
.emsdk = .{
|
||||
.url = "git+https://github.com/emscripten-core/emsdk#3.1.50",
|
||||
.hash = "1220e8fe9509f0843e5e22326300ca415c27afbfbba3992f3c3184d71613540b5564",
|
||||
.lazy = true,
|
||||
},
|
||||
},
|
||||
|
||||
.paths = .{
|
||||
"build.zig",
|
||||
"build.zig.zon",
|
||||
"src",
|
||||
},
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
if(${PLATFORM} MATCHES "Desktop" AND APPLE)
|
||||
if(MACOS_FATLIB)
|
||||
if (CMAKE_OSX_ARCHITECTURES)
|
||||
message(FATAL_ERROR "User supplied -DCMAKE_OSX_ARCHITECTURES overrides -DMACOS_FATLIB=ON")
|
||||
else()
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64;i386")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# This helps support the case where emsdk toolchain file is used
|
||||
# either by setting it with -DCMAKE_TOOLCHAIN_FILE=<path_to_emsdk>/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
|
||||
# or by using "emcmake cmake -B build -S ." as described in https://emscripten.org/docs/compiling/Building-Projects.html
|
||||
if(EMSCRIPTEN)
|
||||
SET(PLATFORM Web CACHE STRING "Forcing PLATFORM_WEB because EMSCRIPTEN was detected")
|
||||
endif()
|
||||
|
||||
# vim: ft=cmake
|
|
@ -3,112 +3,21 @@ target_compile_definitions("raylib" PUBLIC "${PLATFORM_CPP}")
|
|||
target_compile_definitions("raylib" PUBLIC "${GRAPHICS}")
|
||||
|
||||
function(define_if target variable)
|
||||
if (${${variable}})
|
||||
if(${${variable}})
|
||||
message(STATUS "${variable}=${${variable}}")
|
||||
target_compile_definitions(${target} PUBLIC "${variable}")
|
||||
endif ()
|
||||
target_compile_definitions(${target} PRIVATE "${variable}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if (${CUSTOMIZE_BUILD})
|
||||
target_compile_definitions("raylib" PUBLIC EXTERNAL_CONFIG_FLAGS)
|
||||
define_if("raylib" USE_AUDIO)
|
||||
define_if("raylib" SUPPORT_MODULE_RSHAPES)
|
||||
define_if("raylib" SUPPORT_MODULE_RTEXTURES)
|
||||
define_if("raylib" SUPPORT_MODULE_RTEXT)
|
||||
define_if("raylib" SUPPORT_MODULE_RMODELS)
|
||||
define_if("raylib" SUPPORT_MODULE_RAUDIO)
|
||||
define_if("raylib" SUPPORT_CAMERA_SYSTEM)
|
||||
define_if("raylib" SUPPORT_GESTURES_SYSTEM)
|
||||
define_if("raylib" SUPPORT_MOUSE_GESTURES)
|
||||
define_if("raylib" SUPPORT_SSH_KEYBOARD_RPI)
|
||||
define_if("raylib" SUPPORT_DEFAULT_FONT)
|
||||
define_if("raylib" SUPPORT_SCREEN_CAPTURE)
|
||||
define_if("raylib" SUPPORT_GIF_RECORDING)
|
||||
define_if("raylib" SUPPORT_BUSY_WAIT_LOOP)
|
||||
define_if("raylib" SUPPORT_EVENTS_WAITING)
|
||||
define_if("raylib" SUPPORT_WINMM_HIGHRES_TIMER)
|
||||
define_if("raylib" SUPPORT_COMPRESSION_API)
|
||||
define_if("raylib" SUPPORT_QUADS_DRAW_MODE)
|
||||
define_if("raylib" SUPPORT_IMAGE_EXPORT)
|
||||
define_if("raylib" SUPPORT_IMAGE_GENERATION)
|
||||
define_if("raylib" SUPPORT_IMAGE_MANIPULATION)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_PNG)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_DDS)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_HDR)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_KTX)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_ASTC)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_BMP)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_TGA)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_JPG)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_GIF)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_QOI)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_PSD)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_PKM)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_PVR)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_FNT)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_TTF)
|
||||
define_if("raylib" SUPPORT_TEXT_MANIPULATION)
|
||||
define_if("raylib" SUPPORT_MESH_GENERATION)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_OBJ)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_MTL)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_IQM)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_GLTF)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_VOX)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_WAV)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_OGG)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_XM)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_MOD)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_MP3)
|
||||
define_if("raylib" SUPPORT_FILEFORMAT_FLAC)
|
||||
define_if("raylib" SUPPORT_STANDARD_FILEIO)
|
||||
define_if("raylib" SUPPORT_TRACELOG)
|
||||
if(${CUSTOMIZE_BUILD})
|
||||
target_compile_definitions("raylib" PRIVATE EXTERNAL_CONFIG_FLAGS)
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_FILEPATH_LENGTH=4096")
|
||||
else ()
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_FILEPATH_LENGTH=512")
|
||||
endif ()
|
||||
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_GAMEPADS=4")
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_GAMEPAD_AXIS=8")
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_GAMEPAD_BUTTONS=32")
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_TOUCH_POINTS=10")
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_KEY_PRESSED_QUEUE=16")
|
||||
|
||||
target_compile_definitions("raylib" PUBLIC "STORAGE_DATA_FILE=\"storage.data\"")
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_KEY_PRESSED_QUEUE=16")
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_DECOMPRESSION_SIZE=64")
|
||||
|
||||
if (${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_33" OR ${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_11")
|
||||
target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_BUFFER_ELEMENTS=8192")
|
||||
elseif (${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_ES2")
|
||||
target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_BUFFER_ELEMENTS=2048")
|
||||
endif ()
|
||||
|
||||
target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_DRAWCALLS=256")
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_MATRIX_STACK_SIZE=32")
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_SHADER_LOCATIONS=32")
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_MATERIAL_MAPS=12")
|
||||
target_compile_definitions("raylib" PUBLIC "RL_CULL_DISTANCE_NEAR=0.01")
|
||||
target_compile_definitions("raylib" PUBLIC "RL_CULL_DISTANCE_FAR=1000.0")
|
||||
|
||||
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_POSITION=\"vertexPosition\"")
|
||||
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD=\"vertexTexCoord\"")
|
||||
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_NORMAL=\"vertexNormal\"")
|
||||
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_COLOR=\"vertexColor\"")
|
||||
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_TANGENT=\"vertexTangent\"")
|
||||
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2=\"vertexTexCoord2\"")
|
||||
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_TEXT_BUFFER_LENGTH=1024")
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_TEXT_UNICODE_CHARS=512")
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_TEXTSPLIT_COUNT=128")
|
||||
|
||||
target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_FORMAT=ma_format_f32")
|
||||
target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_CHANNELS=2")
|
||||
target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_SAMPLE_RATE=44100")
|
||||
target_compile_definitions("raylib" PUBLIC "DEFAULT_AUDIO_BUFFER_SIZE=4096")
|
||||
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_TRACELOG_MSG_LENGTH=128")
|
||||
target_compile_definitions("raylib" PUBLIC "MAX_UWP_MESSAGES=512")
|
||||
endif ()
|
||||
foreach(FLAG IN LISTS CONFIG_HEADER_FLAGS)
|
||||
string(REGEX MATCH "([^=]+)=(.+)" _ ${FLAG})
|
||||
define_if("raylib" ${CMAKE_MATCH_1})
|
||||
endforeach()
|
||||
|
||||
foreach(VALUE IN LISTS CONFIG_HEADER_VALUES)
|
||||
target_compile_definitions("raylib" PRIVATE ${VALUE})
|
||||
endforeach()
|
||||
endif()
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
if(USE_EXTERNAL_GLFW STREQUAL "ON")
|
||||
find_package(glfw3 3.3.3 REQUIRED)
|
||||
find_package(glfw3 3.4 REQUIRED)
|
||||
elseif(USE_EXTERNAL_GLFW STREQUAL "IF_POSSIBLE")
|
||||
find_package(glfw3 3.3.3 QUIET)
|
||||
find_package(glfw3 3.4 QUIET)
|
||||
endif()
|
||||
if (glfw3_FOUND)
|
||||
set(LIBS_PRIVATE ${LIBS_PRIVATE} glfw)
|
||||
|
@ -16,15 +16,15 @@ if(NOT glfw3_FOUND AND NOT USE_EXTERNAL_GLFW STREQUAL "ON" AND "${PLATFORM}" MAT
|
|||
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||
set(GLFW_INSTALL OFF CACHE BOOL "" FORCE)
|
||||
set(GLFW_USE_WAYLAND ${USE_WAYLAND} CACHE BOOL "" FORCE)
|
||||
set(GLFW_LIBRARY_TYPE "OBJECT" CACHE STRING "" FORCE)
|
||||
|
||||
set(WAS_SHARED ${BUILD_SHARED_LIBS})
|
||||
set(BUILD_SHARED_LIBS OFF CACHE BOOL " " FORCE)
|
||||
|
||||
add_subdirectory(external/glfw)
|
||||
|
||||
set(BUILD_SHARED_LIBS ${WAS_SHARED} CACHE BOOL " " FORCE)
|
||||
unset(WAS_SHARED)
|
||||
# Hide glfw's symbols when building a shared lib
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set_property(TARGET glfw PROPERTY C_VISIBILITY_PRESET hidden)
|
||||
endif()
|
||||
|
||||
list(APPEND raylib_sources $<TARGET_OBJECTS:glfw>)
|
||||
include_directories(BEFORE SYSTEM external/glfw/include)
|
||||
|
|
|
@ -9,8 +9,7 @@ install(
|
|||
# PKG_CONFIG_LIBS_PRIVATE is used in raylib.pc.in
|
||||
if (NOT BUILD_SHARED_LIBS)
|
||||
include(LibraryPathToLinkerFlags)
|
||||
library_path_to_linker_flags(__PKG_CONFIG_LIBS_PRIVATE "${LIBS_PRIVATE}")
|
||||
set(PKG_CONFIG_LIBS_PRIVATE ${__PKG_CONFIG_LIBS_PRIVATE} ${GLFW_PKG_LIBS})
|
||||
set(PKG_CONFIG_LIBS_PRIVATE ${GLFW_PKG_LIBS})
|
||||
string(REPLACE ";" " " PKG_CONFIG_LIBS_PRIVATE "${PKG_CONFIG_LIBS_PRIVATE}")
|
||||
elseif (BUILD_SHARED_LIBS)
|
||||
set(PKG_CONFIG_LIBS_EXTRA "")
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
# Set OpenGL_GL_PREFERENCE to new "GLVND" even when legacy library exists and
|
||||
# cmake is <= 3.10
|
||||
#
|
||||
# See https://cmake.org/cmake/help/latest/policy/CMP0072.html for more
|
||||
# information.
|
||||
if(POLICY CMP0072)
|
||||
cmake_policy(SET CMP0072 NEW)
|
||||
endif()
|
||||
|
||||
if (${PLATFORM} MATCHES "Desktop")
|
||||
set(PLATFORM_CPP "PLATFORM_DESKTOP")
|
||||
|
||||
|
@ -16,7 +25,7 @@ if (${PLATFORM} MATCHES "Desktop")
|
|||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
find_package(OpenGL QUIET)
|
||||
set(LIBS_PRIVATE ${OPENGL_LIBRARIES} winmm)
|
||||
else ()
|
||||
elseif (UNIX)
|
||||
find_library(pthread NAMES pthread)
|
||||
find_package(OpenGL QUIET)
|
||||
if ("${OPENGL_LIBRARIES}" STREQUAL "")
|
||||
|
@ -27,17 +36,31 @@ if (${PLATFORM} MATCHES "Desktop")
|
|||
find_library(OSS_LIBRARY ossaudio)
|
||||
endif ()
|
||||
|
||||
set(LIBS_PRIVATE m pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
|
||||
else ()
|
||||
find_library(pthread NAMES pthread)
|
||||
find_package(OpenGL QUIET)
|
||||
if ("${OPENGL_LIBRARIES}" STREQUAL "")
|
||||
set(OPENGL_LIBRARIES "GL")
|
||||
endif ()
|
||||
|
||||
set(LIBS_PRIVATE m atomic pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
|
||||
|
||||
if (USE_AUDIO)
|
||||
if ("${CMAKE_SYSTEM_NAME}" MATCHES "(Net|Open)BSD")
|
||||
find_library(OSS_LIBRARY ossaudio)
|
||||
set(LIBS_PRIVATE m pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
|
||||
endif ()
|
||||
|
||||
if (NOT "${CMAKE_SYSTEM_NAME}" MATCHES "(Net|Open)BSD" AND USE_AUDIO)
|
||||
set(LIBS_PRIVATE ${LIBS_PRIVATE} dl)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
elseif (${PLATFORM} MATCHES "Web")
|
||||
set(PLATFORM_CPP "PLATFORM_WEB")
|
||||
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s USE_GLFW=3 -s ASSERTIONS=1 --profiling")
|
||||
if(NOT GRAPHICS)
|
||||
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
||||
endif()
|
||||
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
|
||||
|
||||
elseif (${PLATFORM} MATCHES "Android")
|
||||
|
@ -45,26 +68,12 @@ elseif (${PLATFORM} MATCHES "Android")
|
|||
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
list(APPEND raylib_sources ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c)
|
||||
add_definitions(-DANDROID -D__ANDROID_API__=21)
|
||||
include_directories(${ANDROID_NDK}/sources/android/native_app_glue)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--exclude-libs,libatomic.a -Wl,--build-id -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings -u ANativeActivity_onCreate -Wl,-undefined,dynamic_lookup")
|
||||
|
||||
find_library(OPENGL_LIBRARY OpenGL)
|
||||
set(LIBS_PRIVATE m log android EGL GLESv2 OpenSLES atomic c)
|
||||
|
||||
elseif (${PLATFORM} MATCHES "Raspberry Pi")
|
||||
set(PLATFORM_CPP "PLATFORM_RPI")
|
||||
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
||||
|
||||
add_definitions(-D_DEFAULT_SOURCE)
|
||||
|
||||
find_library(GLESV2 brcmGLESv2 HINTS /opt/vc/lib)
|
||||
find_library(EGL brcmEGL HINTS /opt/vc/lib)
|
||||
find_library(BCMHOST bcm_host HINTS /opt/vc/lib)
|
||||
include_directories(/opt/vc/include /opt/vc/include/interface/vmcs_host/linux /opt/vc/include/interface/vcos/pthreads)
|
||||
link_directories(/opt/vc/lib)
|
||||
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${BCMHOST} pthread rt m dl)
|
||||
|
||||
elseif ("${PLATFORM}" MATCHES "DRM")
|
||||
set(PLATFORM_CPP "PLATFORM_DRM")
|
||||
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
||||
|
@ -78,17 +87,42 @@ elseif ("${PLATFORM}" MATCHES "DRM")
|
|||
find_library(DRM drm)
|
||||
find_library(GBM gbm)
|
||||
|
||||
if (NOT CMAKE_CROSSCOMPILING)
|
||||
include_directories(/usr/include/libdrm)
|
||||
if (NOT CMAKE_CROSSCOMPILING OR NOT CMAKE_SYSROOT)
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(DRM REQUIRED libdrm)
|
||||
include_directories(${DRM_INCLUDE_DIRS})
|
||||
endif ()
|
||||
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${DRM} ${GBM} atomic pthread m dl)
|
||||
|
||||
if (ENABLE_WAYLAND_DRM_LEASING)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
add_definitions(-DENABLE_WAYLAND_DRM_LEASING)
|
||||
find_library(WAYLAND_CLIENT wayland-client)
|
||||
pkg_check_modules(WAYLAND_CLIENT_LIB REQUIRED wayland-client)
|
||||
include_directories(${WAYLAND_CLIENT_LIB})
|
||||
list(APPEND LIBS_PRIVATE ${WAYLAND_CLIENT})
|
||||
endif ()
|
||||
|
||||
if (DISABLE_EVDEV_INPUT)
|
||||
add_definitions(-DDISABLE_EVDEV_INPUT)
|
||||
endif ()
|
||||
|
||||
if (SUPPORT_SSH_KEYBOARD_RPI)
|
||||
add_definitions(-DSUPPORT_SSH_KEYBOARD_RPI)
|
||||
endif ()
|
||||
|
||||
elseif ("${PLATFORM}" MATCHES "SDL")
|
||||
find_package(SDL2 REQUIRED)
|
||||
set(PLATFORM_CPP "PLATFORM_DESKTOP_SDL")
|
||||
set(LIBS_PRIVATE SDL2::SDL2)
|
||||
|
||||
endif ()
|
||||
|
||||
if (${OPENGL_VERSION})
|
||||
set(${SUGGESTED_GRAPHICS} "${GRAPHICS}")
|
||||
if (NOT ${OPENGL_VERSION} MATCHES "OFF")
|
||||
set(SUGGESTED_GRAPHICS "${GRAPHICS}")
|
||||
|
||||
if (${OPENGL_VERSION} MATCHES "4.3")
|
||||
set(GRAPHICS "GRAPHICS_API_OPENGL_43")
|
||||
set(GRAPHICS "GRAPHICS_API_OPENGL_43")
|
||||
elseif (${OPENGL_VERSION} MATCHES "3.3")
|
||||
set(GRAPHICS "GRAPHICS_API_OPENGL_33")
|
||||
elseif (${OPENGL_VERSION} MATCHES "2.1")
|
||||
|
@ -97,9 +131,11 @@ if (${OPENGL_VERSION})
|
|||
set(GRAPHICS "GRAPHICS_API_OPENGL_11")
|
||||
elseif (${OPENGL_VERSION} MATCHES "ES 2.0")
|
||||
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
||||
elseif (${OPENGL_VERSION} MATCHES "ES 3.0")
|
||||
set(GRAPHICS "GRAPHICS_API_OPENGL_ES3")
|
||||
endif ()
|
||||
if ("${SUGGESTED_GRAPHICS}" AND NOT "${SUGGESTED_GRAPHICS}" STREQUAL "${GRAPHICS}")
|
||||
message(WARNING "You are overriding the suggested GRAPHICS=${SUGGESTED_GRAPHICS} with ${GRAPHICS}! This may fail")
|
||||
if (NOT "${SUGGESTED_GRAPHICS}" STREQUAL "" AND NOT "${SUGGESTED_GRAPHICS}" STREQUAL "${GRAPHICS}")
|
||||
message(WARNING "You are overriding the suggested GRAPHICS=${SUGGESTED_GRAPHICS} with ${GRAPHICS}! This may fail.")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# Packaging
|
||||
SET(CPACK_PACKAGE_NAME "raylib")
|
||||
SET(CPACK_PACKAGE_CONTACT "raysan5")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Simple and easy-to-use library to enjoy videogames programming")
|
||||
SET(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
|
||||
|
@ -9,5 +10,9 @@ SET(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/../README.md")
|
|||
SET(CPACK_RESOURCE_FILE_WELCOME "${PROJECT_SOURCE_DIR}/../README.md")
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/../LICENSE")
|
||||
SET(CPACK_PACKAGE_FILE_NAME "raylib-${PROJECT_VERSION}$ENV{RAYLIB_PACKAGE_SUFFIX}")
|
||||
SET(CPACK_GENERATOR "ZIP;TGZ") # Remove this, if you want the NSIS installer on Windows
|
||||
include(CPack)
|
||||
SET(CPACK_GENERATOR "ZIP;TGZ;DEB;RPM") # Remove this, if you want the NSIS installer on Windows
|
||||
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) # can be used to generate deps, slow and requires tools.
|
||||
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libatomic1, libc6, libglfw3, libglu1-mesa | libglu1, libglx0, libopengl0")
|
||||
SET(CPACK_DEBIAN_PACKAGE_NAME "lib${CPACK_PACKAGE_NAME}-dev")
|
||||
SET(CPACK_RPM_PACKAGE_NAME "lib${CPACK_PACKAGE_NAME}-devel")
|
||||
include(CPack)
|
||||
|
|
17
cmake/ParseConfigHeader.cmake
Normal file
|
@ -0,0 +1,17 @@
|
|||
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/src/config.h" CONFIG_HEADER_CONTENT)
|
||||
|
||||
set(BLANK_OR_BACKSLASH_PATTERN "[ \t\r\n\\]")
|
||||
set(VALID_IDENTIFIER_PATTERN "[A-Za-z_]+[A-Za-z_0-9]*")
|
||||
set(VALID_VALUE_PATTERN [=["?[A-Za-z_0-9.-]+"?]=]) # not really correct but does the job since the config.h file hopefully will have been checked by a C preprocessor.
|
||||
set(MACRO_REGEX "(//${BLANK_OR_BACKSLASH_PATTERN}*)?\#define${BLANK_OR_BACKSLASH_PATTERN}+(${VALID_IDENTIFIER_PATTERN})${BLANK_OR_BACKSLASH_PATTERN}+(${VALID_VALUE_PATTERN})")
|
||||
|
||||
string(REGEX MATCHALL ${MACRO_REGEX} MACRO_LIST ${CONFIG_HEADER_CONTENT})
|
||||
|
||||
set(CONFIG_HEADER_FLAGS ${MACRO_LIST})
|
||||
list(FILTER CONFIG_HEADER_FLAGS INCLUDE REGEX "^.+SUPPORT_")
|
||||
list(TRANSFORM CONFIG_HEADER_FLAGS REPLACE ${MACRO_REGEX} [[\2=OFF]] REGEX "^//")
|
||||
list(TRANSFORM CONFIG_HEADER_FLAGS REPLACE ${MACRO_REGEX} [[\2=ON]])
|
||||
|
||||
set(CONFIG_HEADER_VALUES ${MACRO_LIST})
|
||||
list(FILTER CONFIG_HEADER_VALUES EXCLUDE REGEX "(^.+SUPPORT_)|(^//)")
|
||||
list(TRANSFORM CONFIG_HEADER_VALUES REPLACE ${MACRO_REGEX} [[\2=\3]])
|
21
cmake/Uninstall.cmake
Normal file
|
@ -0,0 +1,21 @@
|
|||
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||
endif()
|
||||
|
||||
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
|
||||
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||
foreach(file ${files})
|
||||
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
||||
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
exec_program(
|
||||
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RETURN_VALUE rm_retval
|
||||
)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
|
||||
endif()
|
||||
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
|
||||
endif()
|
||||
endforeach()
|
|
@ -85,7 +85,7 @@ if (${PLATFORM} MATCHES "Android")
|
|||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_obj_viewer.c)
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_animation.c)
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_first_person_maze.c)
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_magicavoxel_loading.c)
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_magicavoxel_loading.c)
|
||||
|
||||
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_custom_uniform.c)
|
||||
|
@ -96,12 +96,13 @@ if (${PLATFORM} MATCHES "Android")
|
|||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_basic_lighting.c)
|
||||
|
||||
elseif (${PLATFORM} MATCHES "Web")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os")
|
||||
# Since WASM is used, ALLOW_MEMORY_GROWTH has no extra overheads
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s ALLOW_MEMORY_GROWTH=1 --no-heap-copy")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --shell-file ${CMAKE_SOURCE_DIR}/src/shell.html")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s WASM=1 -s ASYNCIFY -s ALLOW_MEMORY_GROWTH=1 --shell-file ${CMAKE_SOURCE_DIR}/src/shell.html")
|
||||
set(CMAKE_EXECUTABLE_SUFFIX ".html")
|
||||
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c)
|
||||
|
||||
# Remove the -rdynamic flag because otherwise emscripten
|
||||
# does not generate HTML+JS+WASM files, only a non-working
|
||||
# and fat HTML
|
||||
|
@ -111,8 +112,21 @@ elseif ("${PLATFORM}" STREQUAL "DRM")
|
|||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c)
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c)
|
||||
|
||||
elseif (NOT SUPPORT_GESTURES_SYSTEM)
|
||||
# Items requiring gestures system
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/textures/textures_mouse_painting.c)
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_basic_screen_manager.c)
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_input_gestures_web.c)
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_input_gestures.c)
|
||||
|
||||
endif ()
|
||||
|
||||
# The rlgl_standalone example only targets desktop, without shared libraries.
|
||||
if (BUILD_SHARED_LIBS OR NOT ${PLATFORM} MATCHES "Desktop")
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c)
|
||||
|
||||
endif()
|
||||
|
||||
include_directories(BEFORE SYSTEM others/external/include)
|
||||
|
||||
if (NOT TARGET raylib)
|
||||
|
@ -129,6 +143,9 @@ foreach (example_source ${example_sources})
|
|||
add_executable(${example_name} ${example_source})
|
||||
|
||||
target_link_libraries(${example_name} raylib)
|
||||
if (NOT WIN32)
|
||||
target_link_libraries(${example_name} m)
|
||||
endif()
|
||||
|
||||
string(REGEX MATCH ".*/.*/" resources_dir ${example_source})
|
||||
string(APPEND resources_dir "resources")
|
||||
|
|
|
@ -1,8 +1,34 @@
|
|||
#**************************************************************************************************
|
||||
#
|
||||
# raylib makefile for Desktop platforms, Raspberry Pi, Android and HTML5
|
||||
# raylib makefile for multiple platforms
|
||||
#
|
||||
# Copyright (c) 2013-2022 Ramon Santamaria (@raysan5)
|
||||
# This file supports building raylib examples for the following platforms:
|
||||
#
|
||||
# > PLATFORM_DESKTOP
|
||||
# - Defaults to PLATFORM_DESKTOP_GLFW
|
||||
# > PLATFORM_DESKTOP_GFLW (GLFW backend):
|
||||
# - Windows (Win32, Win64)
|
||||
# - Linux (X11/Wayland desktop mode)
|
||||
# - macOS/OSX (x64, arm64)
|
||||
# - FreeBSD, OpenBSD, NetBSD, DragonFly (X11 desktop)
|
||||
# > PLATFORM_DESKTOP_SDL (SDL backend):
|
||||
# - Windows (Win32, Win64)
|
||||
# - Linux (X11/Wayland desktop mode)
|
||||
# - Others (not tested)
|
||||
# > PLATFORM_DESKTOP_RGFW (RGFW backend):
|
||||
# - Windows (Win32, Win64)
|
||||
# - Linux (X11 desktop mode)
|
||||
# - macOS/OSX (x64, arm64 (not tested))
|
||||
# - Others (not tested)
|
||||
# > PLATFORM_WEB:
|
||||
# - HTML5 (WebAssembly)
|
||||
# > PLATFORM_DRM:
|
||||
# - Raspberry Pi 0-5 (DRM/KMS)
|
||||
# - Linux DRM subsystem (KMS mode)
|
||||
# > PLATFORM_ANDROID:
|
||||
# - Android (ARM, ARM64)
|
||||
#
|
||||
# Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
|
||||
#
|
||||
# This software is provided "as-is", without any express or implied warranty. In no event
|
||||
# will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -25,18 +51,28 @@
|
|||
|
||||
# Define required environment variables
|
||||
#------------------------------------------------------------------------------------------------
|
||||
# Define target platform: PLATFORM_DESKTOP, PLATFORM_RPI, PLATFORM_DRM, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
# Define target platform: PLATFORM_DESKTOP, PLATFORM_DESKTOP_SDL, PLATFORM_DRM, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
PLATFORM ?= PLATFORM_DESKTOP
|
||||
|
||||
ifeq ($(PLATFORM), PLATFORM_DESKTOP)
|
||||
TARGET_PLATFORM = PLATFORM_DESKTOP_GLFW
|
||||
else
|
||||
TARGET_PLATFORM = $(PLATFORM)
|
||||
endif
|
||||
|
||||
# Define required raylib variables
|
||||
PROJECT_NAME ?= raylib_examples
|
||||
RAYLIB_VERSION ?= 4.2.0
|
||||
RAYLIB_VERSION ?= 5.5.0
|
||||
RAYLIB_PATH ?= ..
|
||||
|
||||
# Define raylib source code path
|
||||
RAYLIB_SRC_PATH ?= ../src
|
||||
|
||||
# Locations of raylib.h and libraylib.a/libraylib.so
|
||||
# NOTE: Those variables are only used for PLATFORM_OS: LINUX, BSD
|
||||
RAYLIB_INCLUDE_PATH ?= /usr/local/include
|
||||
RAYLIB_LIB_PATH ?= /usr/local/lib
|
||||
DESTDIR ?= /usr/local
|
||||
RAYLIB_INCLUDE_PATH ?= $(DESTDIR)/include
|
||||
RAYLIB_LIB_PATH ?= $(DESTDIR)/lib
|
||||
|
||||
# Library type compilation: STATIC (.a) or SHARED (.so/.dll)
|
||||
RAYLIB_LIBTYPE ?= STATIC
|
||||
|
@ -47,21 +83,26 @@ BUILD_MODE ?= RELEASE
|
|||
# Use external GLFW library instead of rglfw module
|
||||
USE_EXTERNAL_GLFW ?= FALSE
|
||||
|
||||
# PLATFORM_DESKTOP_SDL: It requires SDL library to be provided externally
|
||||
# WARNING: Library is not included in raylib, it MUST be configured by users
|
||||
SDL_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/include
|
||||
SDL_LIBRARY_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/lib
|
||||
SDL_LIBRARIES ?= -lSDL2 -lSDL2main
|
||||
|
||||
|
||||
# Use Wayland display server protocol on Linux desktop (by default it uses X11 windowing system)
|
||||
# NOTE: This variable is only used for PLATFORM_OS: LINUX
|
||||
USE_WAYLAND_DISPLAY ?= FALSE
|
||||
|
||||
# Use cross-compiler for PLATFORM_RPI
|
||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
USE_RPI_CROSS_COMPILER ?= FALSE
|
||||
ifeq ($(USE_RPI_CROSS_COMPILER),TRUE)
|
||||
RPI_TOOLCHAIN ?= C:/SysGCC/Raspberry
|
||||
RPI_TOOLCHAIN_SYSROOT ?= $(RPI_TOOLCHAIN)/arm-linux-gnueabihf/sysroot
|
||||
endif
|
||||
endif
|
||||
# PLATFORM_WEB: Default properties
|
||||
BUILD_WEB_ASYNCIFY ?= TRUE
|
||||
BUILD_WEB_SHELL ?= $(RAYLIB_PATH)/src/minshell.html
|
||||
BUILD_WEB_HEAP_SIZE ?= 134217728
|
||||
BUILD_WEB_RESOURCES ?= TRUE
|
||||
BUILD_WEB_RESOURCES_PATH ?= $(dir $<)resources@resources
|
||||
|
||||
# Determine PLATFORM_OS in case PLATFORM_DESKTOP selected
|
||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
# Determine PLATFORM_OS when required
|
||||
ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW PLATFORM_DESKTOP_SDL PLATFORM_DESKTOP_RGFW PLATFORM_WEB))
|
||||
# No uname.exe on MinGW!, but OS=Windows_NT on Windows!
|
||||
# ifeq ($(UNAME),Msys) -> Windows
|
||||
ifeq ($(OS),Windows_NT)
|
||||
|
@ -88,13 +129,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
UNAMEOS = $(shell uname)
|
||||
ifeq ($(UNAMEOS),Linux)
|
||||
PLATFORM_OS = LINUX
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
|
||||
UNAMEOS = $(shell uname)
|
||||
ifeq ($(UNAMEOS),Linux)
|
||||
PLATFORM_OS = LINUX
|
||||
|
@ -103,7 +138,7 @@ endif
|
|||
|
||||
# RAYLIB_PATH adjustment for LINUX platform
|
||||
# TODO: Do we really need this?
|
||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||
ifeq ($(PLATFORM_OS),LINUX)
|
||||
RAYLIB_PREFIX ?= ..
|
||||
RAYLIB_PATH = $(realpath $(RAYLIB_PREFIX))
|
||||
|
@ -111,31 +146,30 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||
endif
|
||||
|
||||
# Default path for raylib on Raspberry Pi
|
||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
RAYLIB_PATH ?= /home/pi/raylib
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
|
||||
RAYLIB_PATH ?= /home/pi/raylib
|
||||
endif
|
||||
|
||||
# Define raylib release directory for compiled library
|
||||
RAYLIB_RELEASE_PATH ?= $(RAYLIB_PATH)/src
|
||||
RAYLIB_RELEASE_PATH ?= $(RAYLIB_PATH)/src
|
||||
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
# Emscripten required variables
|
||||
EMSDK_PATH ?= C:/emsdk
|
||||
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
||||
CLANG_PATH = $(EMSDK_PATH)/upstream/bin
|
||||
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-1_64bit
|
||||
NODE_PATH = $(EMSDK_PATH)/node/14.15.5_64bit/bin
|
||||
export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH):$$(PATH)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
# Emscripten required variables
|
||||
EMSDK_PATH ?= C:/raylib/emsdk
|
||||
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
||||
CLANG_PATH = $(EMSDK_PATH)/upstream/bin
|
||||
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-nuget_64bit
|
||||
NODE_PATH = $(EMSDK_PATH)/node/20.18.0_64bit/bin
|
||||
export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH):$$(PATH)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Define default C compiler: CC
|
||||
#------------------------------------------------------------------------------------------------
|
||||
CC = gcc
|
||||
|
||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||
ifeq ($(PLATFORM_OS),OSX)
|
||||
# OSX default compiler
|
||||
CC = clang
|
||||
|
@ -145,14 +179,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||
CC = clang
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
ifeq ($(USE_RPI_CROSS_COMPILER),TRUE)
|
||||
# Define RPI cross-compiler
|
||||
#CC = armv6j-hardfloat-linux-gnueabi-gcc
|
||||
CC = $(RPI_TOOLCHAIN)/bin/arm-linux-gnueabihf-gcc
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
|
||||
# HTML5 emscripten compiler
|
||||
# WARNING: To compile to HTML5, code must be redesigned
|
||||
# to use emscripten.h and emscripten_set_main_loop()
|
||||
|
@ -163,16 +190,25 @@ endif
|
|||
#------------------------------------------------------------------------------------------------
|
||||
MAKE ?= make
|
||||
|
||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
MAKE = mingw32-make
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_ANDROID)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID)
|
||||
MAKE = mingw32-make
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
MAKE = mingw32-make
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
|
||||
ifeq ($(OS),Windows_NT)
|
||||
MAKE = mingw32-make
|
||||
else
|
||||
EMMAKE != type emmake
|
||||
ifneq (, $(EMMAKE))
|
||||
MAKE = emmake make
|
||||
else
|
||||
MAKE = mingw32-make
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Define compiler flags: CFLAGS
|
||||
|
@ -190,14 +226,18 @@ CFLAGS = -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces -Wunused-result
|
|||
|
||||
ifeq ($(BUILD_MODE),DEBUG)
|
||||
CFLAGS += -g -D_DEBUG
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
CFLAGS += -s ASSERTIONS=1 --profiling
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
|
||||
CFLAGS += -sASSERTIONS=1 --profiling
|
||||
endif
|
||||
else
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
CFLAGS += -Os
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
|
||||
ifeq ($(BUILD_WEB_ASYNCIFY),TRUE)
|
||||
CFLAGS += -O3
|
||||
else
|
||||
CFLAGS += -Os
|
||||
endif
|
||||
else
|
||||
CFLAGS += -s -O1
|
||||
CFLAGS += -O2
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -207,7 +247,7 @@ endif
|
|||
# -Wstrict-prototypes warn if a function is declared or defined without specifying the argument types
|
||||
# -Werror=implicit-function-declaration catch function calls without prior declaration
|
||||
#CFLAGS += -Wextra -Wmissing-prototypes -Wstrict-prototypes
|
||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||
ifeq ($(PLATFORM_OS),LINUX)
|
||||
ifeq ($(RAYLIB_LIBTYPE),STATIC)
|
||||
CFLAGS += -D_DEFAULT_SOURCE
|
||||
|
@ -218,41 +258,42 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
CFLAGS += -std=gnu99
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
|
||||
CFLAGS += -std=gnu99 -DEGL_NO_X11
|
||||
endif
|
||||
|
||||
# Define include paths for required headers: INCLUDE_PATHS
|
||||
# NOTE: Some external/extras libraries could be required (stb, easings...)
|
||||
#------------------------------------------------------------------------------------------------
|
||||
INCLUDE_PATHS = -I. -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external
|
||||
|
||||
INCLUDE_PATHS = -I. -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external $(EXTRA_INCLUDE_PATHS)
|
||||
# Define additional directories containing required header files
|
||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||
ifeq ($(PLATFORM_OS),BSD)
|
||||
INCLUDE_PATHS += -I$(RAYLIB_INCLUDE_PATH)
|
||||
INCLUDE_PATHS += -I$(RAYLIB_INCLUDE_PATH) -I/usr/pkg/include -I/usr/X11R7/include
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),LINUX)
|
||||
INCLUDE_PATHS += -I$(RAYLIB_INCLUDE_PATH)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include
|
||||
INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include/interface/vmcs_host/linux
|
||||
INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include/interface/vcos/pthreads
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_SDL)
|
||||
INCLUDE_PATHS += -I$(SDL_INCLUDE_PATH)
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
|
||||
INCLUDE_PATHS += -I$(RAYLIB_INCLUDE_PATH)
|
||||
INCLUDE_PATHS += -I/usr/include/libdrm
|
||||
endif
|
||||
|
||||
# Include GLFW required for examples/others/rlgl_standalone.c
|
||||
ifeq ($(USE_EXTERNAL_GLFW),FALSE)
|
||||
all others: INCLUDE_PATHS += -I$(RAYLIB_PATH)/src/external/glfw/include
|
||||
endif
|
||||
|
||||
# Define library paths containing required libs: LDFLAGS
|
||||
#------------------------------------------------------------------------------------------------
|
||||
LDFLAGS = -L. -L$(RAYLIB_RELEASE_PATH) -L$(RAYLIB_PATH)/src
|
||||
|
||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
# NOTE: The resource .rc file contains windows executable icon and properties
|
||||
LDFLAGS += $(RAYLIB_PATH)/src/raylib.rc.data
|
||||
|
@ -268,40 +309,65 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||
LDFLAGS += -Lsrc -L$(RAYLIB_LIB_PATH)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_SDL)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
# NOTE: The resource .rc file contains windows executable icon and properties
|
||||
LDFLAGS += $(RAYLIB_PATH)/src/raylib.rc.data
|
||||
# -Wl,--subsystem,windows hides the console window
|
||||
ifeq ($(BUILD_MODE), RELEASE)
|
||||
LDFLAGS += -Wl,--subsystem,windows
|
||||
endif
|
||||
endif
|
||||
LDFLAGS += -L$(SDL_LIBRARY_PATH)
|
||||
endif
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
|
||||
# -Os # size optimization
|
||||
# -O2 # optimization level 2, if used, also set --memory-init-file 0
|
||||
# -s USE_GLFW=3 # Use glfw3 library (context/input management)
|
||||
# -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing -> WARNING: Audio buffers could FAIL!
|
||||
# -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) (67108864 = 64MB)
|
||||
# -s USE_PTHREADS=1 # multithreading support
|
||||
# -s WASM=0 # disable Web Assembly, emitted by default
|
||||
# -s ASYNCIFY # lets synchronous C/C++ code interact with asynchronous JS
|
||||
# -s FORCE_FILESYSTEM=1 # force filesystem to load/save files data
|
||||
# -s ASSERTIONS=1 # enable runtime checks for common memory allocation errors (-O1 and above turn it off)
|
||||
# -sUSE_GLFW=3 # Use glfw3 library (context/input management)
|
||||
# -sALLOW_MEMORY_GROWTH=1 # to allow memory resizing -> WARNING: Audio buffers could FAIL!
|
||||
# -sTOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) (67108864 = 64MB)
|
||||
# -sUSE_PTHREADS=1 # multithreading support
|
||||
# -sWASM=0 # disable Web Assembly, emitted by default
|
||||
# -sASYNCIFY # lets synchronous C/C++ code interact with asynchronous JS
|
||||
# -sFORCE_FILESYSTEM=1 # force filesystem to load/save files data
|
||||
# -sASSERTIONS=1 # enable runtime checks for common memory allocation errors (-O1 and above turn it off)
|
||||
# -sGL_ENABLE_GET_PROC_ADDRESS # enable using the *glGetProcAddress() family of functions, required for extensions loading
|
||||
# --profiling # include information for code profiling
|
||||
# --memory-init-file 0 # to avoid an external memory initialization code file (.mem)
|
||||
# --preload-file resources # specify a resources folder for data compilation
|
||||
# --source-map-base # allow debugging in browser with source map
|
||||
LDFLAGS += -s USE_GLFW=3 -s ASYNCIFY -s TOTAL_MEMORY=67108864 -s FORCE_FILESYSTEM=1 --preload-file $(dir $<)resources@resources
|
||||
LDFLAGS += -sUSE_GLFW=3 -sTOTAL_MEMORY=$(BUILD_WEB_HEAP_SIZE) -sFORCE_FILESYSTEM=1
|
||||
|
||||
# Build using asyncify
|
||||
ifeq ($(BUILD_WEB_ASYNCIFY),TRUE)
|
||||
LDFLAGS += -sASYNCIFY
|
||||
endif
|
||||
|
||||
# Add resources building if required
|
||||
ifeq ($(BUILD_WEB_RESOURCES),TRUE)
|
||||
LDFLAGS += --preload-file $(BUILD_WEB_RESOURCES_PATH)
|
||||
endif
|
||||
|
||||
# Add debug mode flags if required
|
||||
ifeq ($(BUILD_MODE),DEBUG)
|
||||
LDFLAGS += -sASSERTIONS=1 --profiling
|
||||
endif
|
||||
|
||||
# Define a custom shell .html and output extension
|
||||
LDFLAGS += --shell-file $(BUILD_WEB_SHELL)
|
||||
EXT = .html
|
||||
|
||||
# NOTE: Simple raylib examples are compiled to be interpreter with asyncify, that way,
|
||||
# we can compile same code for ALL platforms with no change required, but, working on bigger
|
||||
# projects, code needs to be refactored to avoid a blocking while() loop, moving Update and Draw
|
||||
# logic to a self contained function: UpdateDrawFrame(), check core_basic_window_web.c for reference.
|
||||
|
||||
# Define a custom shell .html and output extension
|
||||
LDFLAGS += --shell-file $(RAYLIB_PATH)/src/shell.html
|
||||
EXT = .html
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
LDFLAGS += -L$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/lib
|
||||
endif
|
||||
|
||||
# Define libraries required on linking: LDLIBS
|
||||
# NOTE: To link libraries (lib<name>.so or lib<name>.a), use -l<name>
|
||||
#------------------------------------------------------------------------------------------------
|
||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
# Libraries for Windows desktop compilation
|
||||
# NOTE: WinMM library required to set high-res timer resolution
|
||||
|
@ -325,6 +391,9 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||
ifeq ($(RAYLIB_LIBTYPE),SHARED)
|
||||
LDLIBS += -lc
|
||||
endif
|
||||
|
||||
# NOTE: On ARM 32bit arch, miniaudio requires atomics library
|
||||
LDLIBS += -latomic
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),OSX)
|
||||
# Libraries for OSX 10.9 desktop compiling
|
||||
|
@ -334,7 +403,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||
ifeq ($(PLATFORM_OS),BSD)
|
||||
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
||||
# NOTE: Required packages: mesa-libs
|
||||
LDLIBS = -lraylib -lGL -lpthread -lm
|
||||
LDFLAGS += -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib
|
||||
LDLIBS = -lraylib -lGL -lm -lpthread
|
||||
|
||||
# On XWindow requires also below libraries
|
||||
LDLIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
|
||||
|
@ -344,20 +414,71 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||
LDLIBS += -lglfw
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
# Libraries for Raspberry Pi compiling
|
||||
# NOTE: Required packages: libasound2-dev (ALSA)
|
||||
LDLIBS = -lraylib -lbrcmGLESv2 -lbrcmEGL -lpthread -lrt -lm -lbcm_host -ldl -latomic
|
||||
ifeq ($(USE_RPI_CROSS_COMPILER),TRUE)
|
||||
LDLIBS += -lvchiq_arm -lvcos
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_SDL)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
# Libraries for Windows desktop compilation
|
||||
LDLIBS = -lraylib $(SDL_LIBRARIES) -lopengl32 -lgdi32
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),LINUX)
|
||||
# Libraries for Debian GNU/Linux desktop compiling
|
||||
# NOTE: Required packages: libegl1-mesa-dev
|
||||
LDLIBS = -lraylib $(SDL_LIBRARIES) -lGL -lm -lpthread -ldl -lrt
|
||||
|
||||
# On X11 requires also below libraries
|
||||
LDLIBS += -lX11
|
||||
# NOTE: It seems additional libraries are not required any more, latest GLFW just dlopen them
|
||||
#LDLIBS += -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
|
||||
|
||||
# On Wayland windowing system, additional libraries requires
|
||||
ifeq ($(USE_WAYLAND_DISPLAY),TRUE)
|
||||
LDLIBS += -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon
|
||||
endif
|
||||
# Explicit link to libc
|
||||
ifeq ($(RAYLIB_LIBTYPE),SHARED)
|
||||
LDLIBS += -lc
|
||||
endif
|
||||
|
||||
# NOTE: On ARM 32bit arch, miniaudio requires atomics library
|
||||
LDLIBS += -latomic
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
# Libraries for Windows desktop compilation
|
||||
LDFLAGS += -L..\src
|
||||
LDLIBS = -lraylib -lgdi32 -lwinmm -lopengl32
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),LINUX)
|
||||
# Libraries for Debian GNU/Linux desktop compipling
|
||||
# NOTE: Required packages: libegl1-mesa-dev
|
||||
LDFLAGS += -L../src
|
||||
LDLIBS = -lraylib -lGL -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -lm -lpthread -ldl -lrt
|
||||
|
||||
# Explicit link to libc
|
||||
ifeq ($(RAYLIB_LIBTYPE),SHARED)
|
||||
LDLIBS += -lc
|
||||
endif
|
||||
|
||||
# NOTE: On ARM 32bit arch, miniaudio requires atomics library
|
||||
LDLIBS += -latomic
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),OSX)
|
||||
# Libraries for Debian GNU/Linux desktop compiling
|
||||
# NOTE: Required packages: libegl1-mesa-dev
|
||||
LDFLAGS += -L../src
|
||||
LDLIBS = -lraylib -lm
|
||||
LDLIBS += -framework Foundation -framework AppKit -framework OpenGL -framework CoreVideo
|
||||
endif
|
||||
endif
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
|
||||
# Libraries for DRM compiling
|
||||
# NOTE: Required packages: libasound2-dev (ALSA)
|
||||
LDLIBS = -lraylib -lGLESv2 -lEGL -lpthread -lrt -lm -lgbm -ldrm -ldl -latomic
|
||||
ifeq ($(ENABLE_WAYLAND_DRM_LEASING), yes)
|
||||
LDFLAGS += $(shell pkg-config --libs wayland-client) -DENABLE_WAYLAND_DRM_LEASING
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
|
||||
# Libraries for web (HTML5) compiling
|
||||
LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.a
|
||||
endif
|
||||
|
@ -365,145 +486,184 @@ endif
|
|||
# Define source code object files required
|
||||
#------------------------------------------------------------------------------------------------
|
||||
CORE = \
|
||||
core/core_basic_window \
|
||||
core/core_2d_camera \
|
||||
core/core_2d_camera_mouse_zoom \
|
||||
core/core_2d_camera_platformer \
|
||||
core/core_2d_camera_split_screen \
|
||||
core/core_3d_camera_first_person \
|
||||
core/core_3d_camera_free \
|
||||
core/core_3d_camera_mode \
|
||||
core/core_3d_camera_split_screen \
|
||||
core/core_3d_picking \
|
||||
core/core_automation_events \
|
||||
core/core_basic_screen_manager \
|
||||
core/core_basic_window \
|
||||
core/core_basic_window_web \
|
||||
core/core_custom_frame_control \
|
||||
core/core_custom_logging \
|
||||
core/core_drop_files \
|
||||
core/core_input_gamepad \
|
||||
core/core_input_gamepad_info \
|
||||
core/core_input_gestures \
|
||||
core/core_input_gestures_web \
|
||||
core/core_input_keys \
|
||||
core/core_input_mouse \
|
||||
core/core_input_mouse_wheel \
|
||||
core/core_input_gamepad \
|
||||
core/core_input_multitouch \
|
||||
core/core_input_gestures \
|
||||
core/core_2d_camera \
|
||||
core/core_2d_camera_platformer \
|
||||
core/core_2d_camera_mouse_zoom \
|
||||
core/core_3d_camera_mode \
|
||||
core/core_3d_camera_free \
|
||||
core/core_3d_camera_first_person \
|
||||
core/core_3d_picking \
|
||||
core/core_world_screen \
|
||||
core/core_custom_logging \
|
||||
core/core_drop_files \
|
||||
core/core_input_virtual_controls \
|
||||
core/core_loading_thread \
|
||||
core/core_random_sequence \
|
||||
core/core_random_values \
|
||||
core/core_scissor_test \
|
||||
core/core_smooth_pixelperfect \
|
||||
core/core_storage_values \
|
||||
core/core_vr_simulator \
|
||||
core/core_loading_thread \
|
||||
core/core_window_flags \
|
||||
core/core_window_letterbox \
|
||||
core/core_window_should_close \
|
||||
core/core_split_screen \
|
||||
core/core_smooth_pixelperfect \
|
||||
core/core_custom_frame_control
|
||||
core/core_world_screen
|
||||
|
||||
SHAPES = \
|
||||
shapes/shapes_basic_shapes \
|
||||
shapes/shapes_bouncing_ball \
|
||||
shapes/shapes_colors_palette \
|
||||
shapes/shapes_logo_raylib \
|
||||
shapes/shapes_logo_raylib_anim \
|
||||
shapes/shapes_rectangle_scaling \
|
||||
shapes/shapes_lines_bezier \
|
||||
shapes/shapes_collision_area \
|
||||
shapes/shapes_following_eyes \
|
||||
shapes/shapes_colors_palette \
|
||||
shapes/shapes_draw_circle_sector \
|
||||
shapes/shapes_draw_rectangle_rounded \
|
||||
shapes/shapes_draw_ring \
|
||||
shapes/shapes_easings_ball_anim \
|
||||
shapes/shapes_easings_box_anim \
|
||||
shapes/shapes_easings_rectangle_array \
|
||||
shapes/shapes_draw_ring \
|
||||
shapes/shapes_draw_circle_sector \
|
||||
shapes/shapes_draw_rectangle_rounded \
|
||||
shapes/shapes_top_down_lights
|
||||
shapes/shapes_following_eyes \
|
||||
shapes/shapes_lines_bezier \
|
||||
shapes/shapes_logo_raylib \
|
||||
shapes/shapes_logo_raylib_anim \
|
||||
shapes/shapes_rectangle_scaling \
|
||||
shapes/shapes_splines_drawing \
|
||||
shapes/shapes_top_down_lights \
|
||||
shapes/shapes_rectangle_advanced
|
||||
|
||||
TEXTURES = \
|
||||
textures/textures_logo_raylib \
|
||||
textures/textures_mouse_painting \
|
||||
textures/textures_srcrec_dstrec \
|
||||
textures/textures_background_scrolling \
|
||||
textures/textures_blend_modes \
|
||||
textures/textures_bunnymark \
|
||||
textures/textures_draw_tiled \
|
||||
textures/textures_fog_of_war \
|
||||
textures/textures_gif_player \
|
||||
textures/textures_image_channel \
|
||||
textures/textures_image_drawing \
|
||||
textures/textures_image_generation \
|
||||
textures/textures_image_kernel \
|
||||
textures/textures_image_loading \
|
||||
textures/textures_image_processing \
|
||||
textures/textures_image_rotate \
|
||||
textures/textures_image_text \
|
||||
textures/textures_to_image \
|
||||
textures/textures_raw_data \
|
||||
textures/textures_particles_blending \
|
||||
textures/textures_logo_raylib \
|
||||
textures/textures_mouse_painting \
|
||||
textures/textures_npatch_drawing \
|
||||
textures/textures_background_scrolling \
|
||||
textures/textures_particles_blending \
|
||||
textures/textures_polygon \
|
||||
textures/textures_raw_data \
|
||||
textures/textures_sprite_anim \
|
||||
textures/textures_sprite_button \
|
||||
textures/textures_sprite_explosion \
|
||||
textures/textures_bunnymark \
|
||||
textures/textures_blend_modes \
|
||||
textures/textures_draw_tiled \
|
||||
textures/textures_polygon \
|
||||
textures/textures_gif_player \
|
||||
textures/textures_fog_of_war
|
||||
textures/textures_srcrec_dstrec \
|
||||
textures/textures_textured_curve \
|
||||
textures/textures_to_image
|
||||
|
||||
TEXT = \
|
||||
text/text_raylib_fonts \
|
||||
text/text_font_spritefont \
|
||||
text/text_font_loading \
|
||||
text/text_codepoints_loading \
|
||||
text/text_draw_3d \
|
||||
text/text_font_filters \
|
||||
text/text_font_loading \
|
||||
text/text_font_sdf \
|
||||
text/text_font_spritefont \
|
||||
text/text_format_text \
|
||||
text/text_input_box \
|
||||
text/text_writing_anim \
|
||||
text/text_raylib_fonts \
|
||||
text/text_rectangle_bounds \
|
||||
text/text_unicode \
|
||||
text/text_draw_3d \
|
||||
text/text_codepoints_loading
|
||||
text/text_writing_anim
|
||||
|
||||
MODELS = \
|
||||
models/models_animation \
|
||||
models/models_billboard \
|
||||
models/models_bone_socket \
|
||||
models/models_box_collisions \
|
||||
models/models_cubicmap \
|
||||
models/models_draw_cube_texture \
|
||||
models/models_first_person_maze \
|
||||
models/models_geometric_shapes \
|
||||
models/models_heightmap \
|
||||
models/models_loading \
|
||||
models/models_loading_gltf \
|
||||
models/models_loading_m3d \
|
||||
models/models_loading_vox \
|
||||
models/models_mesh_generation \
|
||||
models/models_mesh_picking \
|
||||
models/models_loading \
|
||||
models/models_loading_vox \
|
||||
models/models_loading_gltf \
|
||||
models/models_orthographic_projection \
|
||||
models/models_point_rendering \
|
||||
models/models_rlgl_solar_system \
|
||||
models/models_skybox \
|
||||
models/models_waving_cubes \
|
||||
models/models_yaw_pitch_roll \
|
||||
models/models_heightmap \
|
||||
models/models_waving_cubes
|
||||
models/models_gpu_skinning
|
||||
|
||||
SHADERS = \
|
||||
shaders/shaders_model_shader \
|
||||
shaders/shaders_shapes_textures \
|
||||
shaders/shaders_custom_uniform \
|
||||
shaders/shaders_postprocessing \
|
||||
shaders/shaders_palette_switch \
|
||||
shaders/shaders_raymarching \
|
||||
shaders/shaders_texture_drawing \
|
||||
shaders/shaders_texture_waves \
|
||||
shaders/shaders_texture_outline \
|
||||
shaders/shaders_julia_set \
|
||||
shaders/shaders_eratosthenes \
|
||||
shaders/shaders_basic_lighting \
|
||||
shaders/shaders_basic_pbr \
|
||||
shaders/shaders_custom_uniform \
|
||||
shaders/shaders_deferred_render \
|
||||
shaders/shaders_eratosthenes \
|
||||
shaders/shaders_fog \
|
||||
shaders/shaders_hot_reloading \
|
||||
shaders/shaders_hybrid_render \
|
||||
shaders/shaders_julia_set \
|
||||
shaders/shaders_lightmap \
|
||||
shaders/shaders_mesh_instancing \
|
||||
shaders/shaders_model_shader \
|
||||
shaders/shaders_multi_sample2d \
|
||||
shaders/shaders_palette_switch \
|
||||
shaders/shaders_postprocessing \
|
||||
shaders/shaders_raymarching \
|
||||
shaders/shaders_shadowmap \
|
||||
shaders/shaders_shapes_textures \
|
||||
shaders/shaders_simple_mask \
|
||||
shaders/shaders_spotlight \
|
||||
shaders/shaders_hot_reloading \
|
||||
shaders/shaders_mesh_instancing \
|
||||
shaders/shaders_multi_sample2d
|
||||
shaders/shaders_texture_drawing \
|
||||
shaders/shaders_texture_outline \
|
||||
shaders/shaders_texture_tiling \
|
||||
shaders/shaders_texture_waves \
|
||||
shaders/shaders_write_depth \
|
||||
shaders/shaders_vertex_displacement
|
||||
|
||||
AUDIO = \
|
||||
audio/audio_mixed_processor \
|
||||
audio/audio_module_playing \
|
||||
audio/audio_music_stream \
|
||||
audio/audio_raw_stream \
|
||||
audio/audio_sound_loading \
|
||||
audio/audio_multichannel_sound \
|
||||
audio/audio_sound_multi \
|
||||
audio/audio_stream_effects
|
||||
|
||||
OTHERS = \
|
||||
others/easings_testbed \
|
||||
others/embedded_files_loading \
|
||||
others/raylib_opengl_interop \
|
||||
others/raymath_vector_angle \
|
||||
others/rlgl_compute_shader
|
||||
|
||||
ifeq ($(TARGET_PLATFORM), PLATFORM_DESKTOP_GFLW)
|
||||
OTHERS += others/rlgl_standalone
|
||||
endif
|
||||
|
||||
|
||||
CURRENT_MAKEFILE = $(lastword $(MAKEFILE_LIST))
|
||||
|
||||
# Define processes to execute
|
||||
#------------------------------------------------------------------------------------------------
|
||||
# Default target entry
|
||||
all: $(CORE) $(SHAPES) $(TEXT) $(TEXTURES) $(MODELS) $(SHADERS) $(AUDIO)
|
||||
all: $(CORE) $(SHAPES) $(TEXT) $(TEXTURES) $(MODELS) $(SHADERS) $(AUDIO) $(OTHERS)
|
||||
|
||||
core: $(CORE)
|
||||
shapes: $(SHAPES)
|
||||
|
@ -512,22 +672,29 @@ text: $(TEXT)
|
|||
models: $(MODELS)
|
||||
shaders: $(SHADERS)
|
||||
audio: $(AUDIO)
|
||||
others: $(OTHERS)
|
||||
|
||||
# Generic compilation pattern
|
||||
# NOTE: Examples must be ready for Android compilation!
|
||||
%: %.c
|
||||
ifeq ($(PLATFORM),PLATFORM_ANDROID)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID)
|
||||
$(MAKE) -f Makefile.Android PROJECT_NAME=$@ PROJECT_SOURCE_FILES=$<
|
||||
else ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
|
||||
$(MAKE) -f Makefile.Web $@
|
||||
else
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -D$(TARGET_PLATFORM)
|
||||
endif
|
||||
|
||||
# Clean everything
|
||||
clean:
|
||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
del *.o *.exe /s
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),BSD)
|
||||
find . -type f -perm -ugo+x -delete
|
||||
rm -fv *.o
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),LINUX)
|
||||
find . -type f -executable -delete
|
||||
rm -fv *.o
|
||||
|
@ -537,16 +704,15 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||
rm -f *.o
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
|
||||
find . -type f -executable -delete
|
||||
rm -fv *.o
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||
find . -type f -executable -delete
|
||||
rm -fv *.o
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
del *.o *.html *.js
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
del *.wasm *.html *.js *.data
|
||||
else
|
||||
rm -f */*.wasm */*.html */*.js */*.data
|
||||
endif
|
||||
endif
|
||||
@echo Cleaning done
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# raylib makefile for Android project (APK building)
|
||||
#
|
||||
# Copyright (c) 2017-2022 Ramon Santamaria (@raysan5)
|
||||
# Copyright (c) 2017-2024 Ramon Santamaria (@raysan5)
|
||||
#
|
||||
# This software is provided "as-is", without any express or implied warranty. In no event
|
||||
# will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -48,7 +48,7 @@ ifeq ($(ANDROID_ARCH),ARM64)
|
|||
ANDROID_ARCH_NAME = arm64-v8a
|
||||
endif
|
||||
ifeq ($(ANDROID_ARCH),x86)
|
||||
ANDROID_ARCH_NAME = i686
|
||||
ANDROID_ARCH_NAME = x86
|
||||
endif
|
||||
ifeq ($(ANDROID_ARCH),x86_64)
|
||||
ANDROID_ARCH_NAME = x86_64
|
||||
|
@ -158,7 +158,8 @@ LDLIBS = -lm -lc -lraylib -llog -landroid -lEGL -lGLESv2 -lOpenSLES -ldl
|
|||
OBJS = $(patsubst %.c, $(PROJECT_BUILD_PATH)/obj/%.o, $(PROJECT_SOURCE_FILES))
|
||||
|
||||
# Android APK building process... some steps required...
|
||||
# NOTE: typing 'make' will invoke the default target entry called 'all',
|
||||
# NOTE: typing 'make' will invoke the default target entry called 'all'
|
||||
# TODO: Use apksigner for APK signing, jarsigner is not recommended
|
||||
all: create_temp_project_dirs \
|
||||
copy_project_required_libs \
|
||||
copy_project_resources \
|
||||
|
@ -170,8 +171,14 @@ all: create_temp_project_dirs \
|
|||
compile_project_class \
|
||||
compile_project_class_dex \
|
||||
create_project_apk_package \
|
||||
zipalign_project_apk_package \
|
||||
sign_project_apk_package
|
||||
sign_project_apk_package \
|
||||
zipalign_project_apk_package
|
||||
|
||||
# WARNING: About build signing process:
|
||||
# - If using apksigner, zipalign must be used before the APK file has been signed.
|
||||
# - If using jarsigner (not recommended), zipalign must be used after the APK file has been signed.
|
||||
# REF: https://developer.android.com/tools/zipalign
|
||||
# REF: https://developer.android.com/tools/apksigner
|
||||
|
||||
# Create required temp directories for APK building
|
||||
create_temp_project_dirs:
|
||||
|
|
|
@ -24,36 +24,39 @@ Examples using raylib core platform functionality like window creation, inputs,
|
|||
|
||||
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||
| 01 | [core_basic_window](core/core_basic_window.c) | <img src="core/core_basic_window.png" alt="core_basic_window" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 02 | [core_input_keys](core/core_input_keys.c) | <img src="core/core_input_keys.png" alt="core_input_keys" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 03 | [core_input_mouse](core/core_input_mouse.c) | <img src="core/core_input_mouse.png" alt="core_input_mouse" width="80"> | ⭐️☆☆☆ | 1.0 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 04 | [core_input_mouse_wheel](core/core_input_mouse_wheel.c) | <img src="core/core_input_mouse_wheel.png" alt="core_input_mouse_wheel" width="80"> | ⭐️☆☆☆ | 1.1 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 05 | [core_input_gamepad](core/core_input_gamepad.c) | <img src="core/core_input_gamepad.png" alt="core_input_gamepad" width="80"> | ⭐️☆☆☆ | 1.1 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 06 | [core_input_multitouch](core/core_input_multitouch.c) | <img src="core/core_input_multitouch.png" alt="core_input_multitouch" width="80"> | ⭐️☆☆☆ | 2.1 | 2.5 | [Berni](https://github.com/Berni8k) |
|
||||
| 07 | [core_input_gestures](core/core_input_gestures.c) | <img src="core/core_input_gestures.png" alt="core_input_gestures" width="80"> | ⭐️⭐️☆☆ | 1.4 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 08 | [core_2d_camera](core/core_2d_camera.c) | <img src="core/core_2d_camera.png" alt="core_2d_camera" width="80"> | ⭐️⭐️☆☆ | 1.5 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||
| 09 | [core_2d_camera_mouse_zoom](core/core_2d_camera_mouse_zoom.c) | <img src="core/core_2d_camera_mouse_zoom.png" alt="core_2d_camera_mouse_zoom" width="80"> | ⭐️⭐️☆☆ | **4.2** | **4.2** | [Jeffery Myers](https://github.com/JeffM2501) |
|
||||
| 10 | [core_2d_camera_platformer](core/core_2d_camera_platformer.c) | <img src="core/core_2d_camera_platformer.png" alt="core_2d_camera_platformer" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.0 | [avyy](https://github.com/avyy) |
|
||||
| 11 | [core_3d_camera_mode](core/core_3d_camera_mode.c) | <img src="core/core_3d_camera_mode.png" alt="core_3d_camera_mode" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 12 | [core_3d_camera_free](core/core_3d_camera_free.c) | <img src="core/core_3d_camera_free.png" alt="core_3d_camera_free" width="80"> | ⭐️☆☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 13 | [core_3d_camera_first_person](core/core_3d_camera_first_person.c) | <img src="core/core_3d_camera_first_person.png" alt="core_3d_camera_first_person" width="80"> | ⭐️⭐️☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 14 | [core_3d_picking](core/core_3d_picking.c) | <img src="core/core_3d_picking.png" alt="core_3d_picking" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 15 | [core_world_screen](core/core_world_screen.c) | <img src="core/core_world_screen.png" alt="core_world_screen" width="80"> | ⭐️⭐️☆☆ | 1.3 | 1.4 | [Ray](https://github.com/raysan5) |
|
||||
| 16 | [core_custom_logging](core/core_custom_logging.c) | <img src="core/core_custom_logging.png" alt="core_custom_logging" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Pablo Marcos Oltra](https://github.com/pamarcos) |
|
||||
| 17 | [core_window_flags](core/core_window_flags.c) | <img src="core/core_window_flags.png" alt="core_window_flags" width="80"> | ⭐️⭐️⭐️☆ | 3.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 18 | [core_window_letterbox](core/core_window_letterbox.c) | <img src="core/core_window_letterbox.png" alt="core_window_letterbox" width="80"> | ⭐️⭐️☆☆ | 2.5 | **4.0** | [Anata](https://github.com/anatagawa) |
|
||||
| 19 | [core_window_should_close](core/core_window_should_close.c) | <img src="core/core_window_should_close.png" alt="core_window_should_close" width="80"> | ⭐️☆☆☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 20 | [core_drop_files](core/core_drop_files.c) | <img src="core/core_drop_files.png" alt="core_drop_files" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 21 | [core_random_values](core/core_random_values.c) | <img src="core/core_random_values.png" alt="core_random_values" width="80"> | ⭐️☆☆☆ | 1.1 | 1.1 | [Ray](https://github.com/raysan5) |
|
||||
| 22 | [core_storage_values](core/core_storage_values.c) | <img src="core/core_storage_values.png" alt="core_storage_values" width="80"> | ⭐️⭐️☆☆ | 1.4 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 23 | [core_vr_simulator](core/core_vr_simulator.c) | <img src="core/core_vr_simulator.png" alt="core_vr_simulator" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 24 | [core_loading_thread](core/core_loading_thread.c) | <img src="core/core_loading_thread.png" alt="core_loading_thread" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||
| 25 | [core_scissor_test](core/core_scissor_test.c) | <img src="core/core_scissor_test.png" alt="core_scissor_test" width="80"> | ⭐️☆☆☆ | 2.5 | 3.0 | [Chris Dill](https://github.com/MysteriousSpace) |
|
||||
| 26 | [core_basic_screen_manager](core/core_basic_screen_manager.c) | <img src="core/core_basic_screen_manager.png" alt="core_basic_screen_manager" width="80"> | ⭐️☆☆☆ | **4.0** | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 27 | [core_custom_frame_control](core/core_custom_frame_control.c) | <img src="core/core_custom_frame_control.png" alt="core_custom_frame_control" width="80"> | ⭐️⭐️⭐️⭐️ | **4.0** | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 28 | [core_smooth_pixelperfect](core/core_smooth_pixelperfect.c) | <img src="core/core_smooth_pixelperfect.png" alt="core_smooth_pixelperfect" width="80"> | ⭐️⭐️⭐️☆ | 3.7 | **4.0** | [Giancamillo Alessandroni](https://github.com/NotManyIdeasDev) |
|
||||
| 29 | [core_split_screen](core/core_split_screen.c) | <img src="core/core_split_screen.png" alt="core_split_screen" width="80"> | ⭐️⭐️⭐️⭐️ | 3.7 | **4.0** | [Jeffery Myers](https://github.com/JeffM2501) |
|
||||
| 30 | [core_window_should_close](core/core_window_should_close.c) | <img src="core/core_window_should_close.png" alt="core_window_should_close" width="80"> | ⭐️⭐️☆☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 01 | [core_basic_window](core/core_basic_window.c) | <img src="core/core_basic_window.png" alt="core_basic_window" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 02 | [core_input_keys](core/core_input_keys.c) | <img src="core/core_input_keys.png" alt="core_input_keys" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 03 | [core_input_mouse](core/core_input_mouse.c) | <img src="core/core_input_mouse.png" alt="core_input_mouse" width="80"> | ⭐️☆☆☆ | 1.0 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 04 | [core_input_mouse_wheel](core/core_input_mouse_wheel.c) | <img src="core/core_input_mouse_wheel.png" alt="core_input_mouse_wheel" width="80"> | ⭐️☆☆☆ | 1.1 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 05 | [core_input_gamepad](core/core_input_gamepad.c) | <img src="core/core_input_gamepad.png" alt="core_input_gamepad" width="80"> | ⭐️☆☆☆ | 1.1 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 06 | [core_input_multitouch](core/core_input_multitouch.c) | <img src="core/core_input_multitouch.png" alt="core_input_multitouch" width="80"> | ⭐️☆☆☆ | 2.1 | 2.5 | [Berni](https://github.com/Berni8k) |
|
||||
| 07 | [core_input_gestures](core/core_input_gestures.c) | <img src="core/core_input_gestures.png" alt="core_input_gestures" width="80"> | ⭐️⭐️☆☆ | 1.4 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 08 | [core_input_virtual_controls](core/core_input_virtual_controls.c) | <img src="core/core_input_virtual_controls.png" alt="core_input_virtual_controls" width="80"> | ⭐️⭐️☆☆ | **5.0** | **5.0** | [oblerion](https://github.com/oblerion) |
|
||||
| 09 | [core_2d_camera](core/core_2d_camera.c) | <img src="core/core_2d_camera.png" alt="core_2d_camera" width="80"> | ⭐️⭐️☆☆ | 1.5 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||
| 10 | [core_2d_camera_mouse_zoom](core/core_2d_camera_mouse_zoom.c) | <img src="core/core_2d_camera_mouse_zoom.png" alt="core_2d_camera_mouse_zoom" width="80"> | ⭐️⭐️☆☆ | **4.2** | **4.2** | [Jeffery Myers](https://github.com/JeffM2501) |
|
||||
| 11 | [core_2d_camera_platformer](core/core_2d_camera_platformer.c) | <img src="core/core_2d_camera_platformer.png" alt="core_2d_camera_platformer" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.0 | [avyy](https://github.com/avyy) |
|
||||
| 12 | [core_2d_camera_split_screen](core/core_2d_camera_split_screen.c) | <img src="core/core_2d_camera_split_screen.png" alt="core_2d_camera_split_screen" width="80"> | ⭐️⭐️⭐️⭐️ | **4.5** | **4.5** | [Gabriel dos Santos Sanches](https://github.com/gabrielssanches) |
|
||||
| 13 | [core_3d_camera_mode](core/core_3d_camera_mode.c) | <img src="core/core_3d_camera_mode.png" alt="core_3d_camera_mode" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 14 | [core_3d_camera_free](core/core_3d_camera_free.c) | <img src="core/core_3d_camera_free.png" alt="core_3d_camera_free" width="80"> | ⭐️☆☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 15 | [core_3d_camera_first_person](core/core_3d_camera_first_person.c) | <img src="core/core_3d_camera_first_person.png" alt="core_3d_camera_first_person" width="80"> | ⭐️⭐️☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 16 | [core_3d_camera:split_screen](core/core_3d_camera_split_screen.c) | <img src="core/core_3d_camera_split_screen.png" alt="core_3d_camera_split_screen" width="80"> | ⭐️⭐️⭐️⭐️ | 3.7 | **4.0** | [Jeffery Myers](https://github.com/JeffM2501) |
|
||||
| 17 | [core_3d_picking](core/core_3d_picking.c) | <img src="core/core_3d_picking.png" alt="core_3d_picking" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 18 | [core_world_screen](core/core_world_screen.c) | <img src="core/core_world_screen.png" alt="core_world_screen" width="80"> | ⭐️⭐️☆☆ | 1.3 | 1.4 | [Ray](https://github.com/raysan5) |
|
||||
| 19 | [core_custom_logging](core/core_custom_logging.c) | <img src="core/core_custom_logging.png" alt="core_custom_logging" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Pablo Marcos Oltra](https://github.com/pamarcos) |
|
||||
| 20 | [core_window_flags](core/core_window_flags.c) | <img src="core/core_window_flags.png" alt="core_window_flags" width="80"> | ⭐️⭐️⭐️☆ | 3.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 21 | [core_window_letterbox](core/core_window_letterbox.c) | <img src="core/core_window_letterbox.png" alt="core_window_letterbox" width="80"> | ⭐️⭐️☆☆ | 2.5 | **4.0** | [Anata](https://github.com/anatagawa) |
|
||||
| 22 | [core_window_should_close](core/core_window_should_close.c) | <img src="core/core_window_should_close.png" alt="core_window_should_close" width="80"> | ⭐️☆☆☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 23 | [core_drop_files](core/core_drop_files.c) | <img src="core/core_drop_files.png" alt="core_drop_files" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 24 | [core_random_values](core/core_random_values.c) | <img src="core/core_random_values.png" alt="core_random_values" width="80"> | ⭐️☆☆☆ | 1.1 | 1.1 | [Ray](https://github.com/raysan5) |
|
||||
| 25 | [core_storage_values](core/core_storage_values.c) | <img src="core/core_storage_values.png" alt="core_storage_values" width="80"> | ⭐️⭐️☆☆ | 1.4 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 26 | [core_vr_simulator](core/core_vr_simulator.c) | <img src="core/core_vr_simulator.png" alt="core_vr_simulator" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 27 | [core_loading_thread](core/core_loading_thread.c) | <img src="core/core_loading_thread.png" alt="core_loading_thread" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||
| 28 | [core_scissor_test](core/core_scissor_test.c) | <img src="core/core_scissor_test.png" alt="core_scissor_test" width="80"> | ⭐️☆☆☆ | 2.5 | 3.0 | [Chris Dill](https://github.com/MysteriousSpace) |
|
||||
| 29 | [core_basic_screen_manager](core/core_basic_screen_manager.c) | <img src="core/core_basic_screen_manager.png" alt="core_basic_screen_manager" width="80"> | ⭐️☆☆☆ | **4.0** | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 30 | [core_custom_frame_control](core/core_custom_frame_control.c) | <img src="core/core_custom_frame_control.png" alt="core_custom_frame_control" width="80"> | ⭐️⭐️⭐️⭐️ | **4.0** | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 31 | [core_smooth_pixelperfect](core/core_smooth_pixelperfect.c) | <img src="core/core_smooth_pixelperfect.png" alt="core_smooth_pixelperfect" width="80"> | ⭐️⭐️⭐️☆ | 3.7 | **4.0** | [Giancamillo Alessandroni](https://github.com/NotManyIdeasDev) |
|
||||
| 32 | [core_window_should_close](core/core_window_should_close.c) | <img src="core/core_window_should_close.png" alt="core_window_should_close" width="80"> | ⭐️⭐️☆☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 33 | [core_random_sequence](core/core_random_sequence.c) | <img src="core/core_random_sequence.png" alt="core_random_sequence" width="80"> | ⭐️☆☆☆ | **5.0** | **5.0** | [REDl3east](https://github.com/REDl3east) |
|
||||
|
||||
### category: shapes
|
||||
|
||||
|
@ -61,22 +64,23 @@ Examples using raylib shapes drawing functionality, provided by raylib [shapes](
|
|||
|
||||
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||
| 31 | [shapes_basic_shapes](shapes/shapes_basic_shapes.c) | <img src="shapes/shapes_basic_shapes.png" alt="shapes_basic_shapes" width="80"> | ⭐️☆☆☆ | 1.0 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 32 | [shapes_bouncing_ball](shapes/shapes_bouncing_ball.c) | <img src="shapes/shapes_bouncing_ball.png" alt="shapes_bouncing_ball" width="80"> | ⭐️☆☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 33 | [shapes_colors_palette](shapes/shapes_colors_palette.c) | <img src="shapes/shapes_colors_palette.png" alt="shapes_colors_palette" width="80"> | ⭐️⭐️☆☆ | 1.0 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 34 | [shapes_logo_raylib](shapes/shapes_logo_raylib.c) | <img src="shapes/shapes_logo_raylib.png" alt="shapes_logo_raylib" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 35 | [shapes_logo_raylib_anim](shapes/shapes_logo_raylib_anim.c) | <img src="shapes/shapes_logo_raylib_anim.png" alt="shapes_logo_raylib_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 36 | [shapes_rectangle_scaling](shapes/shapes_rectangle_scaling.c) | <img src="shapes/shapes_rectangle_scaling.png" alt="shapes_rectangle_scaling" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 37 | [shapes_lines_bezier](shapes/shapes_lines_bezier.c) | <img src="shapes/shapes_lines_bezier.png" alt="shapes_lines_bezier" width="80"> | ⭐️☆☆☆ | 1.7 | 1.7 | [Ray](https://github.com/raysan5) |
|
||||
| 38 | [shapes_collision_area](shapes/shapes_collision_area.c) | <img src="shapes/shapes_collision_area.png" alt="shapes_collision_area" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 39 | [shapes_following_eyes](shapes/shapes_following_eyes.c) | <img src="shapes/shapes_following_eyes.png" alt="shapes_following_eyes" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 40 | [shapes_easings_ball_anim](shapes/shapes_easings_ball_anim.c) | <img src="shapes/shapes_easings_ball_anim.png" alt="shapes_easings_ball_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 41 | [shapes_easings_box_anim](shapes/shapes_easings_box_anim.c) | <img src="shapes/shapes_easings_box_anim.png" alt="shapes_easings_box_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 42 | [shapes_easings_rectangle_array](shapes/shapes_easings_rectangle_array.c) | <img src="shapes/shapes_easings_rectangle_array.png" alt="shapes_easings_rectangle_array" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 43 | [shapes_draw_ring](shapes/shapes_draw_ring.c) | <img src="shapes/shapes_draw_ring.png" alt="shapes_draw_ring" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 44 | [shapes_draw_circle_sector](shapes/shapes_draw_circle_sector.c) | <img src="shapes/shapes_draw_circle_sector.png" alt="shapes_draw_circle_sector" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 45 | [shapes_draw_rectangle_rounded](shapes/shapes_draw_rectangle_rounded.c) | <img src="shapes/shapes_draw_rectangle_rounded.png" alt="shapes_draw_rectangle_rounded" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 46 | [shapes_top_down_lights](shapes/shapes_top_down_lights.c) | <img src="shapes/shapes_top_down_lights.png" alt="shapes_top_down_lights" width="80"> | ⭐️⭐️⭐️⭐️ | **4.2** | **4.2** | [Jeffery Myers](https://github.com/JeffM2501) |
|
||||
| 34 | [shapes_basic_shapes](shapes/shapes_basic_shapes.c) | <img src="shapes/shapes_basic_shapes.png" alt="shapes_basic_shapes" width="80"> | ⭐️☆☆☆ | 1.0 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 35 | [shapes_bouncing_ball](shapes/shapes_bouncing_ball.c) | <img src="shapes/shapes_bouncing_ball.png" alt="shapes_bouncing_ball" width="80"> | ⭐️☆☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 36 | [shapes_colors_palette](shapes/shapes_colors_palette.c) | <img src="shapes/shapes_colors_palette.png" alt="shapes_colors_palette" width="80"> | ⭐️⭐️☆☆ | 1.0 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 37 | [shapes_logo_raylib](shapes/shapes_logo_raylib.c) | <img src="shapes/shapes_logo_raylib.png" alt="shapes_logo_raylib" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 38 | [shapes_logo_raylib_anim](shapes/shapes_logo_raylib_anim.c) | <img src="shapes/shapes_logo_raylib_anim.png" alt="shapes_logo_raylib_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 39 | [shapes_rectangle_scaling](shapes/shapes_rectangle_scaling.c) | <img src="shapes/shapes_rectangle_scaling.png" alt="shapes_rectangle_scaling" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 40 | [shapes_lines_bezier](shapes/shapes_lines_bezier.c) | <img src="shapes/shapes_lines_bezier.png" alt="shapes_lines_bezier" width="80"> | ⭐️☆☆☆ | 1.7 | 1.7 | [Ray](https://github.com/raysan5) |
|
||||
| 41 | [shapes_collision_area](shapes/shapes_collision_area.c) | <img src="shapes/shapes_collision_area.png" alt="shapes_collision_area" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 42 | [shapes_following_eyes](shapes/shapes_following_eyes.c) | <img src="shapes/shapes_following_eyes.png" alt="shapes_following_eyes" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 43 | [shapes_easings_ball_anim](shapes/shapes_easings_ball_anim.c) | <img src="shapes/shapes_easings_ball_anim.png" alt="shapes_easings_ball_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 44 | [shapes_easings_box_anim](shapes/shapes_easings_box_anim.c) | <img src="shapes/shapes_easings_box_anim.png" alt="shapes_easings_box_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 45 | [shapes_easings_rectangle_array](shapes/shapes_easings_rectangle_array.c) | <img src="shapes/shapes_easings_rectangle_array.png" alt="shapes_easings_rectangle_array" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 46 | [shapes_draw_ring](shapes/shapes_draw_ring.c) | <img src="shapes/shapes_draw_ring.png" alt="shapes_draw_ring" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 47 | [shapes_draw_circle_sector](shapes/shapes_draw_circle_sector.c) | <img src="shapes/shapes_draw_circle_sector.png" alt="shapes_draw_circle_sector" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 48 | [shapes_draw_rectangle_rounded](shapes/shapes_draw_rectangle_rounded.c) | <img src="shapes/shapes_draw_rectangle_rounded.png" alt="shapes_draw_rectangle_rounded" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 49 | [shapes_top_down_lights](shapes/shapes_top_down_lights.c) | <img src="shapes/shapes_top_down_lights.png" alt="shapes_top_down_lights" width="80"> | ⭐️⭐️⭐️⭐️ | **4.2** | **4.2** | [Jeffery Myers](https://github.com/JeffM2501) |
|
||||
| 50 | [shapes_rectangle_advanced](shapes/shapes_rectangle_advanced.c) | <img src="shapes/shapes_rectangle_advanced.png" alt="shapes_rectangle_advanced" width="80"> | ⭐️⭐️⭐️⭐️⭐️| **5.0** | **5.0** | [ExCyber](https://github.com/evertonse) |
|
||||
|
||||
### category: textures
|
||||
|
||||
|
@ -84,28 +88,28 @@ Examples using raylib textures functionality, including image/textures loading/g
|
|||
|
||||
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||
| 47 | [textures_logo_raylib](textures/textures_logo_raylib.c) | <img src="textures/textures_logo_raylib.png" alt="textures_logo_raylib" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 48 | [textures_srcrec_dstrec](textures/textures_srcrec_dstrec.c) | <img src="textures/textures_srcrec_dstrec.png" alt="textures_srcrec_dstrec" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 49 | [textures_image_drawing](textures/textures_image_drawing.c) | <img src="textures/textures_image_drawing.png" alt="textures_image_drawing" width="80"> | ⭐️⭐️☆☆ | 1.4 | 1.4 | [Ray](https://github.com/raysan5) |
|
||||
| 50 | [textures_image_generation](textures/textures_image_generation.c) | <img src="textures/textures_image_generation.png" alt="textures_image_generation" width="80"> | ⭐️⭐️☆☆ | 1.8 | 1.8 | [Ray](https://github.com/raysan5) |
|
||||
| 51 | [textures_image_loading](textures/textures_image_loading.c) | <img src="textures/textures_image_loading.png" alt="textures_image_loading" width="80"> | ⭐️☆☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 52 | [textures_image_processing](textures/textures_image_processing.c) | <img src="textures/textures_image_processing.png" alt="textures_image_processing" width="80"> | ⭐️⭐️⭐️☆ | 1.4 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 53 | [textures_image_text](textures/textures_image_text.c) | <img src="textures/textures_image_text.png" alt="textures_image_text" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 54 | [textures_to_image](textures/textures_to_image.c) | <img src="textures/textures_to_image.png" alt="textures_to_image" width="80"> | ⭐️☆☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 55 | [textures_raw_data](textures/textures_raw_data.c) | <img src="textures/textures_raw_data.png" alt="textures_raw_data" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 56 | [textures_particles_blending](textures/textures_particles_blending.c) | <img src="textures/textures_particles_blending.png" alt="textures_particles_blending" width="80"> | ⭐️☆☆☆ | 1.7 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 57 | [textures_npatch_drawing](textures/textures_npatch_drawing.c) | <img src="textures/textures_npatch_drawing.png" alt="textures_npatch_drawing" width="80"> | ⭐️⭐️⭐️☆ | 2.0 | 2.5 | [Jorge A. Gomes](https://github.com/overdev) |
|
||||
| 58 | [textures_background_scrolling](textures/textures_background_scrolling.c) | <img src="textures/textures_background_scrolling.png" alt="textures_background_scrolling" width="80"> | ⭐️☆☆☆ | 2.0 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 59 | [textures_sprite_anim](textures/textures_sprite_anim.c) | <img src="textures/textures_sprite_anim.png" alt="textures_sprite_anim" width="80"> | ⭐️⭐️☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 60 | [textures_sprite_button](textures/textures_sprite_button.c) | <img src="textures/textures_sprite_button.png" alt="textures_sprite_button" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 61 | [textures_sprite_explosion](textures/textures_sprite_explosion.c) | <img src="textures/textures_sprite_explosion.png" alt="textures_sprite_explosion" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 62 | [textures_bunnymark](textures/textures_bunnymark.c) | <img src="textures/textures_bunnymark.png" alt="textures_bunnymark" width="80"> | ⭐️⭐️⭐️☆ | 1.6 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 63 | [textures_mouse_painting](textures/textures_mouse_painting.c) | <img src="textures/textures_mouse_painting.png" alt="textures_mouse_painting" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.0 | [Chris Dill](https://github.com/MysteriousSpace) |
|
||||
| 64 | [textures_blend_modes](textures/textures_blend_modes.c) | <img src="textures/textures_blend_modes.png" alt="textures_blend_modes" width="80"> | ⭐️☆☆☆ | 3.5 | 3.5 | [Karlo Licudine](https://github.com/accidentalrebel) |
|
||||
| 65 | [textures_draw_tiled](textures/textures_draw_tiled.c) | <img src="textures/textures_draw_tiled.png" alt="textures_draw_tiled" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | **4.2** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 66 | [textures_polygon](textures/textures_polygon.c) | <img src="textures/textures_polygon.png" alt="textures_polygon" width="80"> | ⭐️☆☆☆ | 3.7 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||
| 67 | [textures_fog_of_war](textures/textures_fog_of_war.c) | <img src="textures/textures_fog_of_war.png" alt="textures_fog_of_war" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 68 | [textures_gif_player](textures/textures_gif_player.c) | <img src="textures/textures_gif_player.png" alt="textures_gif_player" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 51 | [textures_logo_raylib](textures/textures_logo_raylib.c) | <img src="textures/textures_logo_raylib.png" alt="textures_logo_raylib" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 52 | [textures_srcrec_dstrec](textures/textures_srcrec_dstrec.c) | <img src="textures/textures_srcrec_dstrec.png" alt="textures_srcrec_dstrec" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 53 | [textures_image_drawing](textures/textures_image_drawing.c) | <img src="textures/textures_image_drawing.png" alt="textures_image_drawing" width="80"> | ⭐️⭐️☆☆ | 1.4 | 1.4 | [Ray](https://github.com/raysan5) |
|
||||
| 54 | [textures_image_generation](textures/textures_image_generation.c) | <img src="textures/textures_image_generation.png" alt="textures_image_generation" width="80"> | ⭐️⭐️☆☆ | 1.8 | 1.8 | [Ray](https://github.com/raysan5) |
|
||||
| 55 | [textures_image_loading](textures/textures_image_loading.c) | <img src="textures/textures_image_loading.png" alt="textures_image_loading" width="80"> | ⭐️☆☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 56 | [textures_image_processing](textures/textures_image_processing.c) | <img src="textures/textures_image_processing.png" alt="textures_image_processing" width="80"> | ⭐️⭐️⭐️☆ | 1.4 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 57 | [textures_image_text](textures/textures_image_text.c) | <img src="textures/textures_image_text.png" alt="textures_image_text" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 58 | [textures_to_image](textures/textures_to_image.c) | <img src="textures/textures_to_image.png" alt="textures_to_image" width="80"> | ⭐️☆☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 59 | [textures_raw_data](textures/textures_raw_data.c) | <img src="textures/textures_raw_data.png" alt="textures_raw_data" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 60 | [textures_particles_blending](textures/textures_particles_blending.c) | <img src="textures/textures_particles_blending.png" alt="textures_particles_blending" width="80"> | ⭐️☆☆☆ | 1.7 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 61 | [textures_npatch_drawing](textures/textures_npatch_drawing.c) | <img src="textures/textures_npatch_drawing.png" alt="textures_npatch_drawing" width="80"> | ⭐️⭐️⭐️☆ | 2.0 | 2.5 | [Jorge A. Gomes](https://github.com/overdev) |
|
||||
| 62 | [textures_background_scrolling](textures/textures_background_scrolling.c) | <img src="textures/textures_background_scrolling.png" alt="textures_background_scrolling" width="80"> | ⭐️☆☆☆ | 2.0 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 63 | [textures_sprite_anim](textures/textures_sprite_anim.c) | <img src="textures/textures_sprite_anim.png" alt="textures_sprite_anim" width="80"> | ⭐️⭐️☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 64 | [textures_sprite_button](textures/textures_sprite_button.c) | <img src="textures/textures_sprite_button.png" alt="textures_sprite_button" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 65 | [textures_sprite_explosion](textures/textures_sprite_explosion.c) | <img src="textures/textures_sprite_explosion.png" alt="textures_sprite_explosion" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 66 | [textures_bunnymark](textures/textures_bunnymark.c) | <img src="textures/textures_bunnymark.png" alt="textures_bunnymark" width="80"> | ⭐️⭐️⭐️☆ | 1.6 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 67 | [textures_mouse_painting](textures/textures_mouse_painting.c) | <img src="textures/textures_mouse_painting.png" alt="textures_mouse_painting" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.0 | [Chris Dill](https://github.com/MysteriousSpace) |
|
||||
| 68 | [textures_blend_modes](textures/textures_blend_modes.c) | <img src="textures/textures_blend_modes.png" alt="textures_blend_modes" width="80"> | ⭐️☆☆☆ | 3.5 | 3.5 | [Karlo Licudine](https://github.com/accidentalrebel) |
|
||||
| 69 | [textures_draw_tiled](textures/textures_draw_tiled.c) | <img src="textures/textures_draw_tiled.png" alt="textures_draw_tiled" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | **4.2** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 70 | [textures_polygon](textures/textures_polygon.c) | <img src="textures/textures_polygon.png" alt="textures_polygon" width="80"> | ⭐️☆☆☆ | 3.7 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||
| 71 | [textures_fog_of_war](textures/textures_fog_of_war.c) | <img src="textures/textures_fog_of_war.png" alt="textures_fog_of_war" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 72 | [textures_gif_player](textures/textures_gif_player.c) | <img src="textures/textures_gif_player.png" alt="textures_gif_player" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
|
||||
### category: text
|
||||
|
||||
|
@ -113,42 +117,44 @@ Examples using raylib text functionality, including sprite fonts loading/generat
|
|||
|
||||
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||
| 69 | [text_raylib_fonts](text/text_raylib_fonts.c) | <img src="text/text_raylib_fonts.png" alt="text_raylib_fonts" width="80"> | ⭐️☆☆☆ | 1.7 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||
| 70 | [text_font_spritefont](text/text_font_spritefont.c) | <img src="text/text_font_spritefont.png" alt="text_font_spritefont" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 71 | [text_font_filters](text/text_font_filters.c) | <img src="text/text_font_filters.png" alt="text_font_filters" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 72 | [text_font_loading](text/text_font_loading.c) | <img src="text/text_font_loading.png" alt="text_font_loading" width="80"> | ⭐️☆☆☆ | 1.4 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||
| 73 | [text_font_sdf](text/text_font_sdf.c) | <img src="text/text_font_sdf.png" alt="text_font_sdf" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 74 | [text_format_text](text/text_format_text.c) | <img src="text/text_format_text.png" alt="text_format_text" width="80"> | ⭐️☆☆☆ | 1.1 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||
| 75 | [text_input_box](text/text_input_box.c) | <img src="text/text_input_box.png" alt="text_input_box" width="80"> | ⭐️⭐️☆☆ | 1.7 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 76 | [text_writing_anim](text/text_writing_anim.c) | <img src="text/text_writing_anim.png" alt="text_writing_anim" width="80"> | ⭐️⭐️☆☆ | 1.4 | 1.4 | [Ray](https://github.com/raysan5) |
|
||||
| 77 | [text_rectangle_bounds](text/text_rectangle_bounds.c) | <img src="text/text_rectangle_bounds.png" alt="text_rectangle_bounds" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 78 | [text_unicode](text/text_unicode.c) | <img src="text/text_unicode.png" alt="text_unicode" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 79 | [text_draw_3d](text/text_draw_3d.c) | <img src="text/text_draw_3d.png" alt="text_draw_3d" width="80"> | ⭐️⭐️⭐️⭐️ | 3.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 80 | [text_codepoints_loading](text/text_codepoints_loading.c) | <img src="text/text_codepoints_loading.png" alt="text_codepoints_loading" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
|
||||
| 73 | [text_raylib_fonts](text/text_raylib_fonts.c) | <img src="text/text_raylib_fonts.png" alt="text_raylib_fonts" width="80"> | ⭐️☆☆☆ | 1.7 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||
| 74 | [text_font_spritefont](text/text_font_spritefont.c) | <img src="text/text_font_spritefont.png" alt="text_font_spritefont" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 75 | [text_font_filters](text/text_font_filters.c) | <img src="text/text_font_filters.png" alt="text_font_filters" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 76 | [text_font_loading](text/text_font_loading.c) | <img src="text/text_font_loading.png" alt="text_font_loading" width="80"> | ⭐️☆☆☆ | 1.4 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||
| 77 | [text_font_sdf](text/text_font_sdf.c) | <img src="text/text_font_sdf.png" alt="text_font_sdf" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 78 | [text_format_text](text/text_format_text.c) | <img src="text/text_format_text.png" alt="text_format_text" width="80"> | ⭐️☆☆☆ | 1.1 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||
| 79 | [text_input_box](text/text_input_box.c) | <img src="text/text_input_box.png" alt="text_input_box" width="80"> | ⭐️⭐️☆☆ | 1.7 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 80 | [text_writing_anim](text/text_writing_anim.c) | <img src="text/text_writing_anim.png" alt="text_writing_anim" width="80"> | ⭐️⭐️☆☆ | 1.4 | 1.4 | [Ray](https://github.com/raysan5) |
|
||||
| 81 | [text_rectangle_bounds](text/text_rectangle_bounds.c) | <img src="text/text_rectangle_bounds.png" alt="text_rectangle_bounds" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 82 | [text_unicode](text/text_unicode.c) | <img src="text/text_unicode.png" alt="text_unicode" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 83 | [text_draw_3d](text/text_draw_3d.c) | <img src="text/text_draw_3d.png" alt="text_draw_3d" width="80"> | ⭐️⭐️⭐️⭐️ | 3.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 84 | [text_codepoints_loading](text/text_codepoints_loading.c) | <img src="text/text_codepoints_loading.png" alt="text_codepoints_loading" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
|
||||
### category: models
|
||||
|
||||
Examples using raylib models functionality, including models loading/generation and drawing, provided by raylib [models](../src/models.c) module.
|
||||
|
||||
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||
| 81 | [models_animation](models/models_animation.c) | <img src="models/models_animation.png" alt="models_animation" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.5 | [culacant](https://github.com/culacant) |
|
||||
| 82 | [models_billboard](models/models_billboard.c) | <img src="models/models_billboard.png" alt="models_billboard" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 83 | [models_box_collisions](models/models_box_collisions.c) | <img src="models/models_box_collisions.png" alt="models_box_collisions" width="80"> | ⭐️☆☆☆ | 1.3 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 84 | [models_cubicmap](models/models_cubicmap.c) | <img src="models/models_cubicmap.png" alt="models_cubicmap" width="80"> | ⭐️⭐️☆☆ | 1.8 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 85 | [models_first_person_maze](models/models_first_person_maze.c) | <img src="models/models_first_person_maze.png" alt="models_first_person_maze" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 86 | [models_geometric_shapes](models/models_geometric_shapes.c) | <img src="models/models_geometric_shapes.png" alt="models_geometric_shapes" width="80"> | ⭐️☆☆☆ | 1.0 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 87 | [models_mesh_generation](models/models_mesh_generation.c) | <img src="models/models_mesh_generation.png" alt="models_mesh_generation" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 88 | [models_mesh_picking](models/models_mesh_picking.c) | <img src="models/models_mesh_picking.png" alt="models_mesh_picking" width="80"> | ⭐️⭐️⭐️☆ | 1.7 | **4.0** | [Joel Davis](https://github.com/joeld42) |
|
||||
| 89 | [models_loading](models/models_loading.c) | <img src="models/models_loading.png" alt="models_loading" width="80"> | ⭐️☆☆☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 90 | [models_loading_gltf](models/models_loading_gltf.c) | <img src="models/models_loading_gltf.png" alt="models_loading_gltf" width="80"> | ⭐️☆☆☆ | 3.7 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 91 | [models_loading_vox](models/models_loading_vox.c) | <img src="models/models_loading_vox.png" alt="models_loading_vox" width="80"> | ⭐️☆☆☆ | **4.0** | **4.0** | [Johann Nadalutti](https://github.com/procfxgen) |
|
||||
| 92 | [models_orthographic_projection](models/models_orthographic_projection.c) | <img src="models/models_orthographic_projection.png" alt="models_orthographic_projection" width="80"> | ⭐️☆☆☆ | 2.0 | 3.7 | [Max Danielsson](https://github.com/autious) |
|
||||
| 93 | [models_rlgl_solar_system](models/models_rlgl_solar_system.c) | <img src="models/models_rlgl_solar_system.png" alt="models_rlgl_solar_system" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 94 | [models_yaw_pitch_roll](models/models_yaw_pitch_roll.c) | <img src="models/models_yaw_pitch_roll.png" alt="models_yaw_pitch_roll" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Berni](https://github.com/Berni8k) |
|
||||
| 95 | [models_waving_cubes](models/models_waving_cubes.c) | <img src="models/models_waving_cubes.png" alt="models_waving_cubes" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [codecat](https://github.com/codecat) |
|
||||
| 96 | [models_heightmap](models/models_heightmap.c) | <img src="models/models_heightmap.png" alt="models_heightmap" width="80"> | ⭐️☆☆☆ | 1.8 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 97 | [models_skybox](models/models_skybox.c) | <img src="models/models_skybox.png" alt="models_skybox" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 85 | [models_animation](models/models_animation.c) | <img src="models/models_animation.png" alt="models_animation" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.5 | [culacant](https://github.com/culacant) |
|
||||
| 86 | [models_billboard](models/models_billboard.c) | <img src="models/models_billboard.png" alt="models_billboard" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 87 | [models_box_collisions](models/models_box_collisions.c) | <img src="models/models_box_collisions.png" alt="models_box_collisions" width="80"> | ⭐️☆☆☆ | 1.3 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 88 | [models_cubicmap](models/models_cubicmap.c) | <img src="models/models_cubicmap.png" alt="models_cubicmap" width="80"> | ⭐️⭐️☆☆ | 1.8 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 89 | [models_first_person_maze](models/models_first_person_maze.c) | <img src="models/models_first_person_maze.png" alt="models_first_person_maze" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 90 | [models_geometric_shapes](models/models_geometric_shapes.c) | <img src="models/models_geometric_shapes.png" alt="models_geometric_shapes" width="80"> | ⭐️☆☆☆ | 1.0 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 91 | [models_mesh_generation](models/models_mesh_generation.c) | <img src="models/models_mesh_generation.png" alt="models_mesh_generation" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 92 | [models_mesh_picking](models/models_mesh_picking.c) | <img src="models/models_mesh_picking.png" alt="models_mesh_picking" width="80"> | ⭐️⭐️⭐️☆ | 1.7 | **4.0** | [Joel Davis](https://github.com/joeld42) |
|
||||
| 93 | [models_loading](models/models_loading.c) | <img src="models/models_loading.png" alt="models_loading" width="80"> | ⭐️☆☆☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 94 | [models_loading_gltf](models/models_loading_gltf.c) | <img src="models/models_loading_gltf.png" alt="models_loading_gltf" width="80"> | ⭐️☆☆☆ | 3.7 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 95 | [models_loading_vox](models/models_loading_vox.c) | <img src="models/models_loading_vox.png" alt="models_loading_vox" width="80"> | ⭐️☆☆☆ | **4.0** | **4.0** | [Johann Nadalutti](https://github.com/procfxgen) |
|
||||
| 96 | [models_loading_m3d](models/models_loading_m3d.c) | <img src="models/models_loading_m3d.png" alt="models_loading_m3d" width="80"> | ⭐️☆☆☆ | **4.2** | **4.2** | [bzt](https://bztsrc.gitlab.io/model3d) |
|
||||
| 97 | [models_orthographic_projection](models/models_orthographic_projection.c) | <img src="models/models_orthographic_projection.png" alt="models_orthographic_projection" width="80"> | ⭐️☆☆☆ | 2.0 | 3.7 | [Max Danielsson](https://github.com/autious) |
|
||||
| 98 | [models_point_rendering](models/models_point_rendering.c) | <img src="models/models_point_rendering.png" alt="models_point_rendering" width="80"> | ⭐️⭐️☆☆ | 5.0 | 5.0 | [Reese Gallagher](https://github.com/satchelfrost) |
|
||||
| 99 | [models_rlgl_solar_system](models/models_rlgl_solar_system.c) | <img src="models/models_rlgl_solar_system.png" alt="models_rlgl_solar_system" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 100 | [models_yaw_pitch_roll](models/models_yaw_pitch_roll.c) | <img src="models/models_yaw_pitch_roll.png" alt="models_yaw_pitch_roll" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Berni](https://github.com/Berni8k) |
|
||||
| 101 | [models_waving_cubes](models/models_waving_cubes.c) | <img src="models/models_waving_cubes.png" alt="models_waving_cubes" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [codecat](https://github.com/codecat) |
|
||||
| 102 | [models_heightmap](models/models_heightmap.c) | <img src="models/models_heightmap.png" alt="models_heightmap" width="80"> | ⭐️☆☆☆ | 1.8 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 103 | [models_skybox](models/models_skybox.c) | <img src="models/models_skybox.png" alt="models_skybox" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
|
||||
### category: shaders
|
||||
|
||||
|
@ -156,36 +162,36 @@ Examples using raylib shaders functionality, including shaders loading, paramete
|
|||
|
||||
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||
| 98 | [shaders_basic_lighting](shaders/shaders_basic_lighting.c) | <img src="shaders/shaders_basic_lighting.png" alt="shaders_basic_lighting" width="80"> | ⭐️⭐️⭐️⭐️ | 3.0 | **4.2** | [Chris Camacho](https://github.com/codifies) |
|
||||
| 99 | [shaders_model_shader](shaders/shaders_model_shader.c) | <img src="shaders/shaders_model_shader.png" alt="shaders_model_shader" width="80"> | ⭐️⭐️☆☆ | 1.3 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||
| 100 | [shaders_shapes_textures](shaders/shaders_shapes_textures.c) | <img src="shaders/shaders_shapes_textures.png" alt="shaders_shapes_textures" width="80"> | ⭐️⭐️☆☆ | 1.7 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||
| 101 | [shaders_custom_uniform](shaders/shaders_custom_uniform.c) | <img src="shaders/shaders_custom_uniform.png" alt="shaders_custom_uniform" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 102 | [shaders_postprocessing](shaders/shaders_postprocessing.c) | <img src="shaders/shaders_postprocessing.png" alt="shaders_postprocessing" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 103 | [shaders_palette_switch](shaders/shaders_palette_switch.c) | <img src="shaders/shaders_palette_switch.png" alt="shaders_palette_switch" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [Marco Lizza](https://github.com/MarcoLizza) |
|
||||
| 104 | [shaders_raymarching](shaders/shaders_raymarching.c) | <img src="shaders/shaders_raymarching.png" alt="shaders_raymarching" width="80"> | ⭐️⭐️⭐️⭐️ | 2.0 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 105 | [shaders_texture_drawing](shaders/shaders_texture_drawing.c) | <img src="shaders/shaders_texture_drawing.png" alt="shaders_texture_drawing" width="80"> | ⭐️⭐️☆☆ | 2.0 | 3.7 | [Michał Ciesielski](https://github.com/) |
|
||||
| 106 | [shaders_texture_outline](shaders/shaders_texture_outline.c) | <img src="shaders/shaders_texture_outline.png" alt="shaders_texture_outline" width="80"> | ⭐️⭐️⭐️☆ | **4.0** | **4.0** | [Samuel Skiff](https://github.com/GoldenThumbs) |
|
||||
| 107 | [shaders_texture_waves](shaders/shaders_texture_waves.c) | <img src="shaders/shaders_texture_waves.png" alt="shaders_texture_waves" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Anata](https://github.com/anatagawa) |
|
||||
| 108 | [shaders_julia_set](shaders/shaders_julia_set.c) | <img src="shaders/shaders_julia_set.png" alt="shaders_julia_set" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [eggmund](https://github.com/eggmund) |
|
||||
| 109 | [shaders_eratosthenes](shaders/shaders_eratosthenes.c) | <img src="shaders/shaders_eratosthenes.png" alt="shaders_eratosthenes" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [ProfJski](https://github.com/ProfJski) |
|
||||
| 110 | [shaders_fog](shaders/shaders_fog.c) | <img src="shaders/shaders_fog.png" alt="shaders_fog" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||
| 111 | [shaders_simple_mask](shaders/shaders_simple_mask.c) | <img src="shaders/shaders_simple_mask.png" alt="shaders_simple_mask" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||
| 112 | [shaders_hot_reloading](shaders/shaders_hot_reloading.c) | <img src="shaders/shaders_hot_reloading.png" alt="shaders_hot_reloading" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 113 | [shaders_mesh_instancing](shaders/shaders_mesh_instancing.c) | <img src="shaders/shaders_mesh_instancing.png" alt="shaders_mesh_instancing" width="80"> | ⭐️⭐️⭐️⭐️ | 3.7 | **4.2** | [seanpringle](https://github.com/seanpringle) |
|
||||
| 114 | [shaders_multi_sample2d](shaders/shaders_multi_sample2d.c) | <img src="shaders/shaders_multi_sample2d.png" alt="shaders_multi_sample2d" width="80"> | ⭐️⭐️☆☆ | 3.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 115 | [shaders_spotlight](shaders/shaders_spotlight.c) | <img src="shaders/shaders_spotlight.png" alt="shaders_spotlight" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||
|
||||
| 104 | [shaders_basic_lighting](shaders/shaders_basic_lighting.c) | <img src="shaders/shaders_basic_lighting.png" alt="shaders_basic_lighting" width="80"> | ⭐️⭐️⭐️⭐️ | 3.0 | **4.2** | [Chris Camacho](https://github.com/codifies) |
|
||||
| 105 | [shaders_model_shader](shaders/shaders_model_shader.c) | <img src="shaders/shaders_model_shader.png" alt="shaders_model_shader" width="80"> | ⭐️⭐️☆☆ | 1.3 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||
| 106 | [shaders_shapes_textures](shaders/shaders_shapes_textures.c) | <img src="shaders/shaders_shapes_textures.png" alt="shaders_shapes_textures" width="80"> | ⭐️⭐️☆☆ | 1.7 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||
| 107 | [shaders_custom_uniform](shaders/shaders_custom_uniform.c) | <img src="shaders/shaders_custom_uniform.png" alt="shaders_custom_uniform" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 108 | [shaders_postprocessing](shaders/shaders_postprocessing.c) | <img src="shaders/shaders_postprocessing.png" alt="shaders_postprocessing" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 109 | [shaders_palette_switch](shaders/shaders_palette_switch.c) | <img src="shaders/shaders_palette_switch.png" alt="shaders_palette_switch" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [Marco Lizza](https://github.com/MarcoLizza) |
|
||||
| 110 | [shaders_raymarching](shaders/shaders_raymarching.c) | <img src="shaders/shaders_raymarching.png" alt="shaders_raymarching" width="80"> | ⭐️⭐️⭐️⭐️ | 2.0 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 111 | [shaders_texture_drawing](shaders/shaders_texture_drawing.c) | <img src="shaders/shaders_texture_drawing.png" alt="shaders_texture_drawing" width="80"> | ⭐️⭐️☆☆ | 2.0 | 3.7 | [Michał Ciesielski](https://github.com/) |
|
||||
| 112 | [shaders_texture_outline](shaders/shaders_texture_outline.c) | <img src="shaders/shaders_texture_outline.png" alt="shaders_texture_outline" width="80"> | ⭐️⭐️⭐️☆ | **4.0** | **4.0** | [Samuel Skiff](https://github.com/GoldenThumbs) |
|
||||
| 113 | [shaders_texture_waves](shaders/shaders_texture_waves.c) | <img src="shaders/shaders_texture_waves.png" alt="shaders_texture_waves" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Anata](https://github.com/anatagawa) |
|
||||
| 114 | [shaders_julia_set](shaders/shaders_julia_set.c) | <img src="shaders/shaders_julia_set.png" alt="shaders_julia_set" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [eggmund](https://github.com/eggmund) |
|
||||
| 115 | [shaders_eratosthenes](shaders/shaders_eratosthenes.c) | <img src="shaders/shaders_eratosthenes.png" alt="shaders_eratosthenes" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [ProfJski](https://github.com/ProfJski) |
|
||||
| 116 | [shaders_fog](shaders/shaders_fog.c) | <img src="shaders/shaders_fog.png" alt="shaders_fog" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||
| 117 | [shaders_simple_mask](shaders/shaders_simple_mask.c) | <img src="shaders/shaders_simple_mask.png" alt="shaders_simple_mask" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||
| 118 | [shaders_hot_reloading](shaders/shaders_hot_reloading.c) | <img src="shaders/shaders_hot_reloading.png" alt="shaders_hot_reloading" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 119 | [shaders_mesh_instancing](shaders/shaders_mesh_instancing.c) | <img src="shaders/shaders_mesh_instancing.png" alt="shaders_mesh_instancing" width="80"> | ⭐️⭐️⭐️⭐️ | 3.7 | **4.2** | [seanpringle](https://github.com/seanpringle) |
|
||||
| 120 | [shaders_multi_sample2d](shaders/shaders_multi_sample2d.c) | <img src="shaders/shaders_multi_sample2d.png" alt="shaders_multi_sample2d" width="80"> | ⭐️⭐️☆☆ | 3.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 121 | [shaders_spotlight](shaders/shaders_spotlight.c) | <img src="shaders/shaders_spotlight.png" alt="shaders_spotlight" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||
| 122 | [shaders_deferred_render](shaders/shaders_deferred_render.c) | <img src="shaders/shaders_deferred_render.png" alt="shaders_deferred_render" width="80"> | ⭐️⭐️⭐️⭐️ | 4.5 | 4.5 | [Justin Andreas Lacoste](https://github.com/27justin) |
|
||||
|
||||
### category: audio
|
||||
|
||||
Examples using raylib audio functionality, including sound/music loading and playing. This functionality is provided by raylib [raudio](../src/raudio.c) module. Note this module can be used standalone independently of raylib, check [raudio_standalone](others/raudio_standalone.c) example.
|
||||
|
||||
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||
| 116 | [audio_module_playing](audio/audio_module_playing.c) | <img src="audio/audio_module_playing.png" alt="audio_module_playing" width="80"> | ⭐️☆☆☆ | 1.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 117 | [audio_music_stream](audio/audio_music_stream.c) | <img src="audio/audio_music_stream.png" alt="audio_music_stream" width="80"> | ⭐️☆☆☆ | 1.3 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 118 | [audio_raw_stream](audio/audio_raw_stream.c) | <img src="audio/audio_raw_stream.png" alt="audio_raw_stream" width="80"> | ⭐️⭐️⭐️☆ | 1.6 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 119 | [audio_sound_loading](audio/audio_sound_loading.c) | <img src="audio/audio_sound_loading.png" alt="audio_sound_loading" width="80"> | ⭐️☆☆☆ | 1.1 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 120 | [audio_multichannel_sound](audio/audio_multichannel_sound.c) | <img src="audio/audio_multichannel_sound.png" alt="audio_multichannel_sound" width="80"> | ⭐️☆☆☆ | 3.0 | 3.5 | [Chris Camacho](https://github.com/codifies) |
|
||||
| 123 | [audio_module_playing](audio/audio_module_playing.c) | <img src="audio/audio_module_playing.png" alt="audio_module_playing" width="80"> | ⭐️☆☆☆ | 1.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 124 | [audio_music_stream](audio/audio_music_stream.c) | <img src="audio/audio_music_stream.png" alt="audio_music_stream" width="80"> | ⭐️☆☆☆ | 1.3 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 125 | [audio_raw_stream](audio/audio_raw_stream.c) | <img src="audio/audio_raw_stream.png" alt="audio_raw_stream" width="80"> | ⭐️⭐️⭐️☆ | 1.6 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 126 | [audio_sound_loading](audio/audio_sound_loading.c) | <img src="audio/audio_sound_loading.png" alt="audio_sound_loading" width="80"> | ⭐️☆☆☆ | 1.1 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
|
||||
### category: others
|
||||
|
||||
|
@ -193,11 +199,11 @@ Examples showing raylib misc functionality that does not fit in other categories
|
|||
|
||||
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||
| 121 | [rlgl_standalone](others/rlgl_standalone.c) | <img src="others/rlgl_standalone.png" alt="rlgl_standalone" width="80"> | ⭐️⭐️⭐️⭐️ | 1.6 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 122 | [rlgl_compute_shader](others/rlgl_compute_shader.c) | <img src="others/rlgl_compute_shader.png" alt="rlgl_compute_shader" width="80"> | ⭐️⭐️⭐️⭐️ | **4.0** | **4.0** | [Teddy Astie](https://github.com/tsnake41) |
|
||||
| 123 | [easings_testbed](others/easings_testbed.c) | <img src="others/easings_testbed.png" alt="easings_testbed" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.0 | [Juan Miguel López](https://github.com/flashback-fx) |
|
||||
| 124 | [raylib_opengl_interop](others/raylib_opengl_interop.c) | <img src="others/raylib_opengl_interop.png" alt="raylib_opengl_interop" width="80"> | ⭐️⭐️⭐️⭐️ | **4.0** | **4.0** | [Stephan Soller](https://github.com/arkanis) |
|
||||
| 125 | [embedded_files_loading](others/embedded_files_loading.c) | <img src="others/embedded_files_loading.png" alt="embedded_files_loading" width="80"> | ⭐️⭐️☆☆ | 3.5 | 3.5 | [Kristian Holmgren](https://github.com/defutura) |
|
||||
| 127 | [rlgl_standalone](others/rlgl_standalone.c) | <img src="others/rlgl_standalone.png" alt="rlgl_standalone" width="80"> | ⭐️⭐️⭐️⭐️ | 1.6 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 128 | [rlgl_compute_shader](others/rlgl_compute_shader.c) | <img src="others/rlgl_compute_shader.png" alt="rlgl_compute_shader" width="80"> | ⭐️⭐️⭐️⭐️ | **4.0** | **4.0** | [Teddy Astie](https://github.com/tsnake41) |
|
||||
| 129 | [easings_testbed](others/easings_testbed.c) | <img src="others/easings_testbed.png" alt="easings_testbed" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.0 | [Juan Miguel López](https://github.com/flashback-fx) |
|
||||
| 130 | [raylib_opengl_interop](others/raylib_opengl_interop.c) | <img src="others/raylib_opengl_interop.png" alt="raylib_opengl_interop" width="80"> | ⭐️⭐️⭐️⭐️ | **4.0** | **4.0** | [Stephan Soller](https://github.com/arkanis) |
|
||||
| 131 | [embedded_files_loading](others/embedded_files_loading.c) | <img src="others/embedded_files_loading.png" alt="embedded_files_loading" width="80"> | ⭐️⭐️☆☆ | 3.5 | 3.5 | [Kristian Holmgren](https://github.com/defutura) |
|
||||
|
||||
As always contributions are welcome, feel free to send new examples! Here it is an [examples template](examples_template.c) to start with!
|
||||
As always contributions are welcome, feel free to send new examples! Here is an [examples template](examples_template.c) to start with!
|
||||
|
||||
|
|
123
examples/audio/audio_mixed_processor.c
Normal file
|
@ -0,0 +1,123 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [audio] example - Mixed audio processing
|
||||
*
|
||||
* Example originally created with raylib 4.2, last time updated with raylib 4.2
|
||||
*
|
||||
* Example contributed by hkc (@hatkidchan) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2023 hkc (@hatkidchan)
|
||||
*
|
||||
********************************************************************************************/
|
||||
#include "raylib.h"
|
||||
#include <math.h>
|
||||
|
||||
static float exponent = 1.0f; // Audio exponentiation value
|
||||
static float averageVolume[400] = { 0.0f }; // Average volume history
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Audio processing function
|
||||
//------------------------------------------------------------------------------------
|
||||
void ProcessAudio(void *buffer, unsigned int frames)
|
||||
{
|
||||
float *samples = (float *)buffer; // Samples internally stored as <float>s
|
||||
float average = 0.0f; // Temporary average volume
|
||||
|
||||
for (unsigned int frame = 0; frame < frames; frame++)
|
||||
{
|
||||
float *left = &samples[frame * 2 + 0], *right = &samples[frame * 2 + 1];
|
||||
|
||||
*left = powf(fabsf(*left), exponent) * ( (*left < 0.0f)? -1.0f : 1.0f );
|
||||
*right = powf(fabsf(*right), exponent) * ( (*right < 0.0f)? -1.0f : 1.0f );
|
||||
|
||||
average += fabsf(*left) / frames; // accumulating average volume
|
||||
average += fabsf(*right) / frames;
|
||||
}
|
||||
|
||||
// Moving history to the left
|
||||
for (int i = 0; i < 399; i++) averageVolume[i] = averageVolume[i + 1];
|
||||
|
||||
averageVolume[399] = average; // Adding last average value
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [audio] example - processing mixed output");
|
||||
|
||||
InitAudioDevice(); // Initialize audio device
|
||||
|
||||
AttachAudioMixedProcessor(ProcessAudio);
|
||||
|
||||
Music music = LoadMusicStream("resources/country.mp3");
|
||||
Sound sound = LoadSound("resources/coin.wav");
|
||||
|
||||
PlayMusicStream(music);
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateMusicStream(music); // Update music buffer with new stream data
|
||||
|
||||
// Modify processing variables
|
||||
//----------------------------------------------------------------------------------
|
||||
if (IsKeyPressed(KEY_LEFT)) exponent -= 0.05f;
|
||||
if (IsKeyPressed(KEY_RIGHT)) exponent += 0.05f;
|
||||
|
||||
if (exponent <= 0.5f) exponent = 0.5f;
|
||||
if (exponent >= 3.0f) exponent = 3.0f;
|
||||
|
||||
if (IsKeyPressed(KEY_SPACE)) PlaySound(sound);
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawText("MUSIC SHOULD BE PLAYING!", 255, 150, 20, LIGHTGRAY);
|
||||
|
||||
DrawText(TextFormat("EXPONENT = %.2f", exponent), 215, 180, 20, LIGHTGRAY);
|
||||
|
||||
DrawRectangle(199, 199, 402, 34, LIGHTGRAY);
|
||||
for (int i = 0; i < 400; i++)
|
||||
{
|
||||
DrawLine(201 + i, 232 - (int)(averageVolume[i] * 32), 201 + i, 232, MAROON);
|
||||
}
|
||||
DrawRectangleLines(199, 199, 402, 34, GRAY);
|
||||
|
||||
DrawText("PRESS SPACE TO PLAY OTHER SOUND", 200, 250, 20, LIGHTGRAY);
|
||||
DrawText("USE LEFT AND RIGHT ARROWS TO ALTER DISTORTION", 140, 280, 20, LIGHTGRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadMusicStream(music); // Unload music stream buffers from RAM
|
||||
|
||||
DetachAudioMixedProcessor(ProcessAudio); // Disconnect audio processor
|
||||
|
||||
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
BIN
examples/audio/audio_mixed_processor.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2016-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2016-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
@ -79,6 +79,7 @@ int main(void)
|
|||
{
|
||||
StopMusicStream(music);
|
||||
PlayMusicStream(music);
|
||||
pause = false;
|
||||
}
|
||||
|
||||
// Pause/Resume music playing
|
||||
|
@ -134,6 +135,14 @@ int main(void)
|
|||
DrawRectangle(20, screenHeight - 20 - 12, (int)timePlayed, 12, MAROON);
|
||||
DrawRectangleLines(20, screenHeight - 20 - 12, screenWidth - 40, 12, GRAY);
|
||||
|
||||
// Draw help instructions
|
||||
DrawRectangle(20, 20, 425, 145, WHITE);
|
||||
DrawRectangleLines(20, 20, 425, 145, GRAY);
|
||||
DrawText("PRESS SPACE TO RESTART MUSIC", 40, 40, 20, BLACK);
|
||||
DrawText("PRESS P TO PAUSE/RESUME", 40, 70, 20, BLACK);
|
||||
DrawText("PRESS UP/DOWN TO CHANGE SPEED", 40, 100, 20, BLACK);
|
||||
DrawText(TextFormat("SPEED: %f", pitch), 40, 130, 20, MAROON);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
@ -148,4 +157,4 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 16 KiB |
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
@ -34,7 +34,7 @@ int main(void)
|
|||
float timePlayed = 0.0f; // Time played normalized [0.0f..1.0f]
|
||||
bool pause = false; // Music playing paused
|
||||
|
||||
SetTargetFPS(30); // Set our game to run at 60 frames-per-second
|
||||
SetTargetFPS(30); // Set our game to run at 30 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
|
@ -95,4 +95,4 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5) and James Hofmann (@triplefox)
|
||||
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5) and James Hofmann (@triplefox)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
@ -38,12 +38,11 @@ float sineIdx = 0.0f;
|
|||
void AudioInputCallback(void *buffer, unsigned int frames)
|
||||
{
|
||||
audioFrequency = frequency + (audioFrequency - frequency)*0.95f;
|
||||
audioFrequency += 1.0f;
|
||||
audioFrequency -= 1.0f;
|
||||
|
||||
float incr = audioFrequency/44100.0f;
|
||||
short *d = (short *)buffer;
|
||||
|
||||
for (int i = 0; i < frames; i++)
|
||||
for (unsigned int i = 0; i < frames; i++)
|
||||
{
|
||||
d[i] = (short)(32000.0f*sinf(2*PI*sineIdx));
|
||||
sineIdx += incr;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
|
|
@ -1,20 +1,22 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [audio] example - Multichannel sound playing
|
||||
* raylib [audio] example - Playing sound multiple times
|
||||
*
|
||||
* Example originally created with raylib 3.0, last time updated with raylib 3.5
|
||||
*
|
||||
* Example contributed by Chris Camacho (@chriscamacho) and reviewed by Ramon Santamaria (@raysan5)
|
||||
* Example originally created with raylib 4.6
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2019-2022 Chris Camacho (@chriscamacho) and Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2023 Jeffery Myers (@JeffM2501)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#define MAX_SOUNDS 10
|
||||
Sound soundArray[MAX_SOUNDS] = { 0 };
|
||||
int currentSound;
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
|
@ -25,16 +27,20 @@ int main(void)
|
|||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [audio] example - Multichannel sound playing");
|
||||
InitWindow(screenWidth, screenHeight, "raylib [audio] example - playing sound multiple times");
|
||||
|
||||
InitAudioDevice(); // Initialize audio device
|
||||
|
||||
Sound fxWav = LoadSound("resources/sound.wav"); // Load WAV audio file
|
||||
Sound fxOgg = LoadSound("resources/target.ogg"); // Load OGG audio file
|
||||
// load the sound list
|
||||
soundArray[0] = LoadSound("resources/sound.wav"); // Load WAV audio file into the first slot as the 'source' sound
|
||||
// this sound owns the sample data
|
||||
for (int i = 1; i < MAX_SOUNDS; i++)
|
||||
{
|
||||
soundArray[i] = LoadSoundAlias(soundArray[0]); // Load an alias of the sound into slots 1-9. These do not own the sound data, but can be played
|
||||
}
|
||||
currentSound = 0; // set the sound list to the start
|
||||
|
||||
SetSoundVolume(fxWav, 0.2f);
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
|
@ -42,8 +48,16 @@ int main(void)
|
|||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
if (IsKeyPressed(KEY_ENTER)) PlaySoundMulti(fxWav); // Play a new wav sound instance
|
||||
if (IsKeyPressed(KEY_SPACE)) PlaySoundMulti(fxOgg); // Play a new ogg sound instance
|
||||
if (IsKeyPressed(KEY_SPACE))
|
||||
{
|
||||
PlaySound(soundArray[currentSound]); // play the next open sound slot
|
||||
currentSound++; // increment the sound slot
|
||||
if (currentSound >= MAX_SOUNDS) // if the sound slot is out of bounds, go back to 0
|
||||
currentSound = 0;
|
||||
|
||||
// Note: a better way would be to look at the list for the first sound that is not playing and use that slot
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
|
@ -52,11 +66,7 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawText("MULTICHANNEL SOUND PLAYING", 20, 20, 20, GRAY);
|
||||
DrawText("Press SPACE to play new ogg instance!", 200, 120, 20, LIGHTGRAY);
|
||||
DrawText("Press ENTER to play new wav instance!", 200, 180, 20, LIGHTGRAY);
|
||||
|
||||
DrawText(TextFormat("CONCURRENT SOUNDS PLAYING: %02i", GetSoundsPlaying()), 220, 280, 20, RED);
|
||||
DrawText("Press SPACE to PLAY a WAV sound!", 200, 180, 20, LIGHTGRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
@ -64,10 +74,9 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
StopSoundMulti(); // We must stop the buffer pool before unloading
|
||||
|
||||
UnloadSound(fxWav); // Unload sound data
|
||||
UnloadSound(fxOgg); // Unload sound data
|
||||
for (int i = 1; i < MAX_SOUNDS; i++)
|
||||
UnloadSoundAlias(soundArray[i]); // Unload sound aliases
|
||||
UnloadSound(soundArray[0]); // Unload source sound data
|
||||
|
||||
CloseAudioDevice(); // Close audio device
|
||||
|
||||
|
@ -75,4 +84,4 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
BIN
examples/audio/audio_sound_multi.png
Normal file
After Width: | Height: | Size: 15 KiB |
|
@ -2,18 +2,18 @@
|
|||
*
|
||||
* raylib [audio] example - Music stream processing effects
|
||||
*
|
||||
* Example originally created with raylib 4.2, last time updated with raylib 4.2
|
||||
* Example originally created with raylib 4.2, last time updated with raylib 5.0
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2022-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include <stdlib.h> // Required for: NULL
|
||||
#include <stdlib.h> // Required for: NULL
|
||||
|
||||
// Required delay effect variables
|
||||
static float *delayBuffer = NULL;
|
||||
|
@ -149,13 +149,17 @@ static void AudioProcessEffectLPF(void *buffer, unsigned int frames)
|
|||
static const float cutoff = 70.0f / 44100.0f; // 70 Hz lowpass filter
|
||||
const float k = cutoff / (cutoff + 0.1591549431f); // RC filter formula
|
||||
|
||||
// Converts the buffer data before using it
|
||||
float *bufferData = (float *)buffer;
|
||||
for (unsigned int i = 0; i < frames*2; i += 2)
|
||||
{
|
||||
float l = ((float *)buffer)[i], r = ((float *)buffer)[i + 1];
|
||||
const float l = bufferData[i];
|
||||
const float r = bufferData[i + 1];
|
||||
|
||||
low[0] += k * (l - low[0]);
|
||||
low[1] += k * (r - low[1]);
|
||||
((float *)buffer)[i] = low[0];
|
||||
((float *)buffer)[i + 1] = low[1];
|
||||
bufferData[i] = low[0];
|
||||
bufferData[i + 1] = low[1];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -176,4 +180,4 @@ static void AudioProcessEffectDelay(void *buffer, unsigned int frames)
|
|||
delayBuffer[delayWriteIndex++] = ((float *)buffer)[i + 1];
|
||||
if (delayWriteIndex == delayBufferSize) delayWriteIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
BIN
examples/audio/resources/target.qoa
Normal file
|
@ -1,50 +1,52 @@
|
|||
const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
|
||||
fn add_module(comptime module: []const u8, b: *std.build.Builder, target: std.zig.CrossTarget) !*std.build.Step {
|
||||
// Standard release options allow the person running `zig build` to select
|
||||
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
|
||||
const mode = b.standardReleaseOptions();
|
||||
// This has been tested to work with zig 0.12.0
|
||||
fn add_module(comptime module: []const u8, b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) !*std.Build.Step {
|
||||
if (target.result.os.tag == .emscripten) {
|
||||
@panic("Emscripten building via Zig unsupported");
|
||||
}
|
||||
|
||||
const all = b.step(module, "All " ++ module ++ " examples");
|
||||
const dir = try std.fs.cwd().openIterableDir(module, .{});
|
||||
var dir = try std.fs.cwd().openDir(module, .{ .iterate = true });
|
||||
defer if (comptime builtin.zig_version.minor >= 12) dir.close();
|
||||
|
||||
var iter = dir.iterate();
|
||||
while (try iter.next()) |entry| {
|
||||
if (entry.kind != .File) continue;
|
||||
if (entry.kind != .file) continue;
|
||||
const extension_idx = std.mem.lastIndexOf(u8, entry.name, ".c") orelse continue;
|
||||
const name = entry.name[0..extension_idx];
|
||||
const path = try std.fs.path.join(b.allocator, &.{ module, entry.name });
|
||||
|
||||
// zig's mingw headers do not include pthread.h
|
||||
if (std.mem.eql(u8, "core_loading_thread", name) and target.getOsTag() == .windows) continue;
|
||||
if (std.mem.eql(u8, "core_loading_thread", name) and target.result.os.tag == .windows) continue;
|
||||
|
||||
const exe = b.addExecutable(name, null);
|
||||
exe.addCSourceFile(path, switch (target.getOsTag()) {
|
||||
.windows => &[_][]const u8{},
|
||||
.linux => &[_][]const u8{},
|
||||
.macos => &[_][]const u8{"-DPLATFORM_DESKTOP"},
|
||||
else => @panic("Unsupported OS"),
|
||||
const exe = b.addExecutable(.{
|
||||
.name = name,
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
exe.setTarget(target);
|
||||
exe.setBuildMode(mode);
|
||||
exe.addCSourceFile(.{ .file = b.path(path), .flags = &.{} });
|
||||
exe.linkLibC();
|
||||
exe.addObjectFile(switch (target.getOsTag()) {
|
||||
.windows => "../src/raylib.lib",
|
||||
.linux => "../src/libraylib.a",
|
||||
.macos => "../src/libraylib.a",
|
||||
exe.addObjectFile(switch (target.result.os.tag) {
|
||||
.windows => b.path("../zig-out/lib/raylib.lib"),
|
||||
.linux => b.path("../zig-out/lib/libraylib.a"),
|
||||
.macos => b.path("../zig-out/lib/libraylib.a"),
|
||||
.emscripten => b.path("../zig-out/lib/libraylib.a"),
|
||||
else => @panic("Unsupported OS"),
|
||||
});
|
||||
|
||||
exe.addIncludeDir("../src");
|
||||
exe.addIncludeDir("../src/external");
|
||||
exe.addIncludeDir("../src/external/glfw/include");
|
||||
exe.addIncludePath(b.path("../src"));
|
||||
exe.addIncludePath(b.path("../src/external"));
|
||||
exe.addIncludePath(b.path("../src/external/glfw/include"));
|
||||
|
||||
switch (exe.target.toTarget().os.tag) {
|
||||
switch (target.result.os.tag) {
|
||||
.windows => {
|
||||
exe.linkSystemLibrary("winmm");
|
||||
exe.linkSystemLibrary("gdi32");
|
||||
exe.linkSystemLibrary("opengl32");
|
||||
exe.addIncludeDir("external/glfw/deps/mingw");
|
||||
|
||||
exe.defineCMacro("PLATFORM_DESKTOP", null);
|
||||
},
|
||||
.linux => {
|
||||
exe.linkSystemLibrary("GL");
|
||||
|
@ -52,6 +54,8 @@ fn add_module(comptime module: []const u8, b: *std.build.Builder, target: std.zi
|
|||
exe.linkSystemLibrary("dl");
|
||||
exe.linkSystemLibrary("m");
|
||||
exe.linkSystemLibrary("X11");
|
||||
|
||||
exe.defineCMacro("PLATFORM_DESKTOP", null);
|
||||
},
|
||||
.macos => {
|
||||
exe.linkFramework("Foundation");
|
||||
|
@ -60,38 +64,47 @@ fn add_module(comptime module: []const u8, b: *std.build.Builder, target: std.zi
|
|||
exe.linkFramework("CoreAudio");
|
||||
exe.linkFramework("CoreVideo");
|
||||
exe.linkFramework("IOKit");
|
||||
|
||||
exe.defineCMacro("PLATFORM_DESKTOP", null);
|
||||
},
|
||||
else => {
|
||||
@panic("Unsupported OS");
|
||||
},
|
||||
}
|
||||
|
||||
exe.setOutputDir(module);
|
||||
const install_cmd = b.addInstallArtifact(exe, .{});
|
||||
|
||||
var run = exe.run();
|
||||
run.step.dependOn(&b.addInstallArtifact(exe).step);
|
||||
run.cwd = module;
|
||||
b.step(name, name).dependOn(&run.step);
|
||||
all.dependOn(&exe.step);
|
||||
const run_cmd = b.addRunArtifact(exe);
|
||||
run_cmd.cwd = b.path(module);
|
||||
run_cmd.step.dependOn(&install_cmd.step);
|
||||
|
||||
const run_step = b.step(name, name);
|
||||
run_step.dependOn(&run_cmd.step);
|
||||
|
||||
all.dependOn(&install_cmd.step);
|
||||
}
|
||||
return all;
|
||||
}
|
||||
|
||||
pub fn build(b: *std.build.Builder) !void {
|
||||
pub fn build(b: *std.Build) !void {
|
||||
// Standard target options allows the person running `zig build` to choose
|
||||
// what target to build for. Here we do not override the defaults, which
|
||||
// means any target is allowed, and the default is native. Other options
|
||||
// for restricting supported target set are available.
|
||||
const target = b.standardTargetOptions(.{});
|
||||
// Standard optimization options allow the person running `zig build` to select
|
||||
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not
|
||||
// set a preferred release mode, allowing the user to decide how to optimize.
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
const all = b.getInstallStep();
|
||||
|
||||
all.dependOn(try add_module("audio", b, target));
|
||||
all.dependOn(try add_module("core", b, target));
|
||||
all.dependOn(try add_module("models", b, target));
|
||||
all.dependOn(try add_module("others", b, target));
|
||||
all.dependOn(try add_module("shaders", b, target));
|
||||
all.dependOn(try add_module("shapes", b, target));
|
||||
all.dependOn(try add_module("text", b, target));
|
||||
all.dependOn(try add_module("textures", b, target));
|
||||
all.dependOn(try add_module("audio", b, target, optimize));
|
||||
all.dependOn(try add_module("core", b, target, optimize));
|
||||
all.dependOn(try add_module("models", b, target, optimize));
|
||||
all.dependOn(try add_module("others", b, target, optimize));
|
||||
all.dependOn(try add_module("shaders", b, target, optimize));
|
||||
all.dependOn(try add_module("shapes", b, target, optimize));
|
||||
all.dependOn(try add_module("text", b, target, optimize));
|
||||
all.dependOn(try add_module("textures", b, target, optimize));
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - 2d camera
|
||||
* raylib [core] example - 2D Camera system
|
||||
*
|
||||
* Example originally created with raylib 1.5, last time updated with raylib 3.0
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2016-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2016-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2022 Jeffery Myers (@JeffM2501)
|
||||
* Copyright (c) 2022-2024 Jeffery Myers (@JeffM2501)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
@ -31,6 +31,8 @@ int main ()
|
|||
Camera2D camera = { 0 };
|
||||
camera.zoom = 1.0f;
|
||||
|
||||
int zoomMode = 0; // 0-Mouse Wheel, 1-Mouse Move
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -39,42 +41,69 @@ int main ()
|
|||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
if (IsKeyPressed(KEY_ONE)) zoomMode = 0;
|
||||
else if (IsKeyPressed(KEY_TWO)) zoomMode = 1;
|
||||
|
||||
// Translate based on mouse right click
|
||||
if (IsMouseButtonDown(MOUSE_BUTTON_RIGHT))
|
||||
if (IsMouseButtonDown(MOUSE_BUTTON_LEFT))
|
||||
{
|
||||
Vector2 delta = GetMouseDelta();
|
||||
delta = Vector2Scale(delta, -1.0f/camera.zoom);
|
||||
|
||||
camera.target = Vector2Add(camera.target, delta);
|
||||
}
|
||||
|
||||
// Zoom based on mouse wheel
|
||||
float wheel = GetMouseWheelMove();
|
||||
if (wheel != 0)
|
||||
if (zoomMode == 0)
|
||||
{
|
||||
// Get the world point that is under the mouse
|
||||
Vector2 mouseWorldPos = GetScreenToWorld2D(GetMousePosition(), camera);
|
||||
|
||||
// Set the offset to where the mouse is
|
||||
camera.offset = GetMousePosition();
|
||||
// Zoom based on mouse wheel
|
||||
float wheel = GetMouseWheelMove();
|
||||
if (wheel != 0)
|
||||
{
|
||||
// Get the world point that is under the mouse
|
||||
Vector2 mouseWorldPos = GetScreenToWorld2D(GetMousePosition(), camera);
|
||||
|
||||
// Set the target to match, so that the camera maps the world space point
|
||||
// under the cursor to the screen space point under the cursor at any zoom
|
||||
camera.target = mouseWorldPos;
|
||||
// Set the offset to where the mouse is
|
||||
camera.offset = GetMousePosition();
|
||||
|
||||
// Zoom increment
|
||||
const float zoomIncrement = 0.125f;
|
||||
// Set the target to match, so that the camera maps the world space point
|
||||
// under the cursor to the screen space point under the cursor at any zoom
|
||||
camera.target = mouseWorldPos;
|
||||
|
||||
camera.zoom += (wheel*zoomIncrement);
|
||||
if (camera.zoom < zoomIncrement) camera.zoom = zoomIncrement;
|
||||
// Zoom increment
|
||||
float scaleFactor = 1.0f + (0.25f*fabsf(wheel));
|
||||
if (wheel < 0) scaleFactor = 1.0f/scaleFactor;
|
||||
camera.zoom = Clamp(camera.zoom*scaleFactor, 0.125f, 64.0f);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Zoom based on mouse right click
|
||||
if (IsMouseButtonPressed(MOUSE_BUTTON_RIGHT))
|
||||
{
|
||||
// Get the world point that is under the mouse
|
||||
Vector2 mouseWorldPos = GetScreenToWorld2D(GetMousePosition(), camera);
|
||||
|
||||
// Set the offset to where the mouse is
|
||||
camera.offset = GetMousePosition();
|
||||
|
||||
// Set the target to match, so that the camera maps the world space point
|
||||
// under the cursor to the screen space point under the cursor at any zoom
|
||||
camera.target = mouseWorldPos;
|
||||
}
|
||||
if (IsMouseButtonDown(MOUSE_BUTTON_RIGHT))
|
||||
{
|
||||
// Zoom increment
|
||||
float deltaX = GetMouseDelta().x;
|
||||
float scaleFactor = 1.0f + (0.01f*fabsf(deltaX));
|
||||
if (deltaX < 0) scaleFactor = 1.0f/scaleFactor;
|
||||
camera.zoom = Clamp(camera.zoom*scaleFactor, 0.125f, 64.0f);
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
ClearBackground(BLACK);
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginMode2D(camera);
|
||||
|
||||
|
@ -87,11 +116,19 @@ int main ()
|
|||
rlPopMatrix();
|
||||
|
||||
// Draw a reference circle
|
||||
DrawCircle(100, 100, 50, YELLOW);
|
||||
DrawCircle(GetScreenWidth()/2, GetScreenHeight()/2, 50, MAROON);
|
||||
|
||||
EndMode2D();
|
||||
|
||||
// Draw mouse reference
|
||||
//Vector2 mousePos = GetWorldToScreen2D(GetMousePosition(), camera)
|
||||
DrawCircleV(GetMousePosition(), 4, DARKGRAY);
|
||||
DrawTextEx(GetFontDefault(), TextFormat("[%i, %i]", GetMouseX(), GetMouseY()),
|
||||
Vector2Add(GetMousePosition(), (Vector2){ -44, -24 }), 20, 2, BLACK);
|
||||
|
||||
DrawText("Mouse right button drag to move, mouse wheel to zoom", 10, 10, 20, WHITE);
|
||||
DrawText("[1][2] Select mouse zoom mode (Wheel or Move)", 20, 20, 20, DARKGRAY);
|
||||
if (zoomMode == 0) DrawText("Mouse left button drag to move, mouse wheel to zoom", 20, 50, 20, DARKGRAY);
|
||||
else DrawText("Mouse left button drag to move, mouse press and move to zoom", 20, 50, 20, DARKGRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - 2d camera platformer
|
||||
* raylib [core] example - 2D Camera platformer
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 3.0
|
||||
*
|
||||
|
@ -9,7 +9,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2019-2022 arvyy (@arvyy)
|
||||
* Copyright (c) 2019-2024 arvyy (@arvyy)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
@ -90,7 +90,7 @@ int main(void)
|
|||
"Follow player center",
|
||||
"Follow player center, but clamp to map edges",
|
||||
"Follow player center; smoothed",
|
||||
"Follow player center horizontally; updateplayer center vertically after landing",
|
||||
"Follow player center horizontally; update player center vertically after landing",
|
||||
"Player push camera on getting too close to screen edge"
|
||||
};
|
||||
|
||||
|
@ -133,8 +133,10 @@ int main(void)
|
|||
|
||||
for (int i = 0; i < envItemsLength; i++) DrawRectangleRec(envItems[i].rect, envItems[i].color);
|
||||
|
||||
Rectangle playerRect = { player.position.x - 20, player.position.y - 40, 40, 40 };
|
||||
Rectangle playerRect = { player.position.x - 20, player.position.y - 40, 40.0f, 40.0f };
|
||||
DrawRectangleRec(playerRect, RED);
|
||||
|
||||
DrawCircleV(player.position, 5.0f, GOLD);
|
||||
|
||||
EndMode2D();
|
||||
|
||||
|
@ -168,7 +170,7 @@ void UpdatePlayer(Player *player, EnvItem *envItems, int envItemsLength, float d
|
|||
player->canJump = false;
|
||||
}
|
||||
|
||||
int hitObstacle = 0;
|
||||
bool hitObstacle = false;
|
||||
for (int i = 0; i < envItemsLength; i++)
|
||||
{
|
||||
EnvItem *ei = envItems + i;
|
||||
|
@ -177,11 +179,12 @@ void UpdatePlayer(Player *player, EnvItem *envItems, int envItemsLength, float d
|
|||
ei->rect.x <= p->x &&
|
||||
ei->rect.x + ei->rect.width >= p->x &&
|
||||
ei->rect.y >= p->y &&
|
||||
ei->rect.y < p->y + player->speed*delta)
|
||||
ei->rect.y <= p->y + player->speed*delta)
|
||||
{
|
||||
hitObstacle = 1;
|
||||
hitObstacle = true;
|
||||
player->speed = 0.0f;
|
||||
p->y = ei->rect.y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Before Width: | Height: | Size: 16 KiB |
167
examples/core/core_2d_camera_split_screen.c
Normal file
|
@ -0,0 +1,167 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - 2d camera split screen
|
||||
*
|
||||
* Addapted from the core_3d_camera_split_screen example:
|
||||
* https://github.com/raysan5/raylib/blob/master/examples/core/core_3d_camera_split_screen.c
|
||||
*
|
||||
* Example originally created with raylib 4.5, last time updated with raylib 4.5
|
||||
*
|
||||
* Example contributed by Gabriel dos Santos Sanches (@gabrielssanches) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2023 Gabriel dos Santos Sanches (@gabrielssanches)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#define PLAYER_SIZE 40
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 440;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - 2d camera split screen");
|
||||
|
||||
Rectangle player1 = { 200, 200, PLAYER_SIZE, PLAYER_SIZE };
|
||||
Rectangle player2 = { 250, 200, PLAYER_SIZE, PLAYER_SIZE };
|
||||
|
||||
Camera2D camera1 = { 0 };
|
||||
camera1.target = (Vector2){ player1.x, player1.y };
|
||||
camera1.offset = (Vector2){ 200.0f, 200.0f };
|
||||
camera1.rotation = 0.0f;
|
||||
camera1.zoom = 1.0f;
|
||||
|
||||
Camera2D camera2 = { 0 };
|
||||
camera2.target = (Vector2){ player2.x, player2.y };
|
||||
camera2.offset = (Vector2){ 200.0f, 200.0f };
|
||||
camera2.rotation = 0.0f;
|
||||
camera2.zoom = 1.0f;
|
||||
|
||||
RenderTexture screenCamera1 = LoadRenderTexture(screenWidth/2, screenHeight);
|
||||
RenderTexture screenCamera2 = LoadRenderTexture(screenWidth/2, screenHeight);
|
||||
|
||||
// Build a flipped rectangle the size of the split view to use for drawing later
|
||||
Rectangle splitScreenRect = { 0.0f, 0.0f, (float)screenCamera1.texture.width, (float)-screenCamera1.texture.height };
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
if (IsKeyDown(KEY_S)) player1.y += 3.0f;
|
||||
else if (IsKeyDown(KEY_W)) player1.y -= 3.0f;
|
||||
if (IsKeyDown(KEY_D)) player1.x += 3.0f;
|
||||
else if (IsKeyDown(KEY_A)) player1.x -= 3.0f;
|
||||
|
||||
if (IsKeyDown(KEY_UP)) player2.y -= 3.0f;
|
||||
else if (IsKeyDown(KEY_DOWN)) player2.y += 3.0f;
|
||||
if (IsKeyDown(KEY_RIGHT)) player2.x += 3.0f;
|
||||
else if (IsKeyDown(KEY_LEFT)) player2.x -= 3.0f;
|
||||
|
||||
camera1.target = (Vector2){ player1.x, player1.y };
|
||||
camera2.target = (Vector2){ player2.x, player2.y };
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginTextureMode(screenCamera1);
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginMode2D(camera1);
|
||||
|
||||
// Draw full scene with first camera
|
||||
for (int i = 0; i < screenWidth/PLAYER_SIZE + 1; i++)
|
||||
{
|
||||
DrawLineV((Vector2){(float)PLAYER_SIZE*i, 0}, (Vector2){ (float)PLAYER_SIZE*i, (float)screenHeight}, LIGHTGRAY);
|
||||
}
|
||||
|
||||
for (int i = 0; i < screenHeight/PLAYER_SIZE + 1; i++)
|
||||
{
|
||||
DrawLineV((Vector2){0, (float)PLAYER_SIZE*i}, (Vector2){ (float)screenWidth, (float)PLAYER_SIZE*i}, LIGHTGRAY);
|
||||
}
|
||||
|
||||
for (int i = 0; i < screenWidth/PLAYER_SIZE; i++)
|
||||
{
|
||||
for (int j = 0; j < screenHeight/PLAYER_SIZE; j++)
|
||||
{
|
||||
DrawText(TextFormat("[%i,%i]", i, j), 10 + PLAYER_SIZE*i, 15 + PLAYER_SIZE*j, 10, LIGHTGRAY);
|
||||
}
|
||||
}
|
||||
|
||||
DrawRectangleRec(player1, RED);
|
||||
DrawRectangleRec(player2, BLUE);
|
||||
EndMode2D();
|
||||
|
||||
DrawRectangle(0, 0, GetScreenWidth()/2, 30, Fade(RAYWHITE, 0.6f));
|
||||
DrawText("PLAYER1: W/S/A/D to move", 10, 10, 10, MAROON);
|
||||
|
||||
EndTextureMode();
|
||||
|
||||
BeginTextureMode(screenCamera2);
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginMode2D(camera2);
|
||||
|
||||
// Draw full scene with second camera
|
||||
for (int i = 0; i < screenWidth/PLAYER_SIZE + 1; i++)
|
||||
{
|
||||
DrawLineV((Vector2){ (float)PLAYER_SIZE*i, 0}, (Vector2){ (float)PLAYER_SIZE*i, (float)screenHeight}, LIGHTGRAY);
|
||||
}
|
||||
|
||||
for (int i = 0; i < screenHeight/PLAYER_SIZE + 1; i++)
|
||||
{
|
||||
DrawLineV((Vector2){0, (float)PLAYER_SIZE*i}, (Vector2){ (float)screenWidth, (float)PLAYER_SIZE*i}, LIGHTGRAY);
|
||||
}
|
||||
|
||||
for (int i = 0; i < screenWidth/PLAYER_SIZE; i++)
|
||||
{
|
||||
for (int j = 0; j < screenHeight/PLAYER_SIZE; j++)
|
||||
{
|
||||
DrawText(TextFormat("[%i,%i]", i, j), 10 + PLAYER_SIZE*i, 15 + PLAYER_SIZE*j, 10, LIGHTGRAY);
|
||||
}
|
||||
}
|
||||
|
||||
DrawRectangleRec(player1, RED);
|
||||
DrawRectangleRec(player2, BLUE);
|
||||
|
||||
EndMode2D();
|
||||
|
||||
DrawRectangle(0, 0, GetScreenWidth()/2, 30, Fade(RAYWHITE, 0.6f));
|
||||
DrawText("PLAYER2: UP/DOWN/LEFT/RIGHT to move", 10, 10, 10, DARKBLUE);
|
||||
|
||||
EndTextureMode();
|
||||
|
||||
// Draw both views render textures to the screen side by side
|
||||
BeginDrawing();
|
||||
ClearBackground(BLACK);
|
||||
|
||||
DrawTextureRec(screenCamera1.texture, splitScreenRect, (Vector2){ 0, 0 }, WHITE);
|
||||
DrawTextureRec(screenCamera2.texture, splitScreenRect, (Vector2){ screenWidth/2.0f, 0 }, WHITE);
|
||||
|
||||
DrawRectangle(GetScreenWidth()/2 - 2, 0, 4, GetScreenHeight(), LIGHTGRAY);
|
||||
EndDrawing();
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadRenderTexture(screenCamera1); // Unload render texture
|
||||
UnloadRenderTexture(screenCamera2); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
BIN
examples/core/core_2d_camera_split_screen.png
Normal file
After Width: | Height: | Size: 21 KiB |
|
@ -7,11 +7,12 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
#include "rcamera.h"
|
||||
|
||||
#define MAX_COLUMNS 20
|
||||
|
||||
|
@ -29,11 +30,13 @@ int main(void)
|
|||
|
||||
// Define the camera to look into our 3d world (position, target, up vector)
|
||||
Camera camera = { 0 };
|
||||
camera.position = (Vector3){ 4.0f, 2.0f, 4.0f };
|
||||
camera.target = (Vector3){ 0.0f, 1.8f, 0.0f };
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };
|
||||
camera.fovy = 60.0f;
|
||||
camera.projection = CAMERA_PERSPECTIVE;
|
||||
camera.position = (Vector3){ 0.0f, 2.0f, 4.0f }; // Camera position
|
||||
camera.target = (Vector3){ 0.0f, 2.0f, 0.0f }; // Camera looking at point
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
|
||||
camera.fovy = 60.0f; // Camera field-of-view Y
|
||||
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
|
||||
|
||||
int cameraMode = CAMERA_FIRST_PERSON;
|
||||
|
||||
// Generates some random columns
|
||||
float heights[MAX_COLUMNS] = { 0 };
|
||||
|
@ -47,17 +50,93 @@ int main(void)
|
|||
colors[i] = (Color){ GetRandomValue(20, 255), GetRandomValue(10, 55), 30, 255 };
|
||||
}
|
||||
|
||||
SetCameraMode(camera, CAMERA_FIRST_PERSON); // Set a first person camera mode
|
||||
DisableCursor(); // Limit cursor to relative movement inside the window
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera);
|
||||
// Switch camera mode
|
||||
if (IsKeyPressed(KEY_ONE))
|
||||
{
|
||||
cameraMode = CAMERA_FREE;
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Reset roll
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_TWO))
|
||||
{
|
||||
cameraMode = CAMERA_FIRST_PERSON;
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Reset roll
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_THREE))
|
||||
{
|
||||
cameraMode = CAMERA_THIRD_PERSON;
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Reset roll
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_FOUR))
|
||||
{
|
||||
cameraMode = CAMERA_ORBITAL;
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Reset roll
|
||||
}
|
||||
|
||||
// Switch camera projection
|
||||
if (IsKeyPressed(KEY_P))
|
||||
{
|
||||
if (camera.projection == CAMERA_PERSPECTIVE)
|
||||
{
|
||||
// Create isometric view
|
||||
cameraMode = CAMERA_THIRD_PERSON;
|
||||
// Note: The target distance is related to the render distance in the orthographic projection
|
||||
camera.position = (Vector3){ 0.0f, 2.0f, -100.0f };
|
||||
camera.target = (Vector3){ 0.0f, 2.0f, 0.0f };
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };
|
||||
camera.projection = CAMERA_ORTHOGRAPHIC;
|
||||
camera.fovy = 20.0f; // near plane width in CAMERA_ORTHOGRAPHIC
|
||||
CameraYaw(&camera, -135 * DEG2RAD, true);
|
||||
CameraPitch(&camera, -45 * DEG2RAD, true, true, false);
|
||||
}
|
||||
else if (camera.projection == CAMERA_ORTHOGRAPHIC)
|
||||
{
|
||||
// Reset to default view
|
||||
cameraMode = CAMERA_THIRD_PERSON;
|
||||
camera.position = (Vector3){ 0.0f, 2.0f, 10.0f };
|
||||
camera.target = (Vector3){ 0.0f, 2.0f, 0.0f };
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };
|
||||
camera.projection = CAMERA_PERSPECTIVE;
|
||||
camera.fovy = 60.0f;
|
||||
}
|
||||
}
|
||||
|
||||
// Update camera computes movement internally depending on the camera mode
|
||||
// Some default standard keyboard/mouse inputs are hardcoded to simplify use
|
||||
// For advance camera controls, it's reecommended to compute camera movement manually
|
||||
UpdateCamera(&camera, cameraMode); // Update camera
|
||||
|
||||
/*
|
||||
// Camera PRO usage example (EXPERIMENTAL)
|
||||
// This new camera function allows custom movement/rotation values to be directly provided
|
||||
// as input parameters, with this approach, rcamera module is internally independent of raylib inputs
|
||||
UpdateCameraPro(&camera,
|
||||
(Vector3){
|
||||
(IsKeyDown(KEY_W) || IsKeyDown(KEY_UP))*0.1f - // Move forward-backward
|
||||
(IsKeyDown(KEY_S) || IsKeyDown(KEY_DOWN))*0.1f,
|
||||
(IsKeyDown(KEY_D) || IsKeyDown(KEY_RIGHT))*0.1f - // Move right-left
|
||||
(IsKeyDown(KEY_A) || IsKeyDown(KEY_LEFT))*0.1f,
|
||||
0.0f // Move up-down
|
||||
},
|
||||
(Vector3){
|
||||
GetMouseDelta().x*0.05f, // Rotation: yaw
|
||||
GetMouseDelta().y*0.05f, // Rotation: pitch
|
||||
0.0f // Rotation: roll
|
||||
},
|
||||
GetMouseWheelMove()*2.0f); // Move to target (zoom)
|
||||
*/
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
|
@ -80,14 +159,39 @@ int main(void)
|
|||
DrawCubeWires(positions[i], 2.0f, heights[i], 2.0f, MAROON);
|
||||
}
|
||||
|
||||
// Draw player cube
|
||||
if (cameraMode == CAMERA_THIRD_PERSON)
|
||||
{
|
||||
DrawCube(camera.target, 0.5f, 0.5f, 0.5f, PURPLE);
|
||||
DrawCubeWires(camera.target, 0.5f, 0.5f, 0.5f, DARKPURPLE);
|
||||
}
|
||||
|
||||
EndMode3D();
|
||||
|
||||
DrawRectangle( 10, 10, 220, 70, Fade(SKYBLUE, 0.5f));
|
||||
DrawRectangleLines( 10, 10, 220, 70, BLUE);
|
||||
// Draw info boxes
|
||||
DrawRectangle(5, 5, 330, 100, Fade(SKYBLUE, 0.5f));
|
||||
DrawRectangleLines(5, 5, 330, 100, BLUE);
|
||||
|
||||
DrawText("First person camera default controls:", 20, 20, 10, BLACK);
|
||||
DrawText("- Move with keys: W, A, S, D", 40, 40, 10, DARKGRAY);
|
||||
DrawText("- Mouse move to look around", 40, 60, 10, DARKGRAY);
|
||||
DrawText("Camera controls:", 15, 15, 10, BLACK);
|
||||
DrawText("- Move keys: W, A, S, D, Space, Left-Ctrl", 15, 30, 10, BLACK);
|
||||
DrawText("- Look around: arrow keys or mouse", 15, 45, 10, BLACK);
|
||||
DrawText("- Camera mode keys: 1, 2, 3, 4", 15, 60, 10, BLACK);
|
||||
DrawText("- Zoom keys: num-plus, num-minus or mouse scroll", 15, 75, 10, BLACK);
|
||||
DrawText("- Camera projection key: P", 15, 90, 10, BLACK);
|
||||
|
||||
DrawRectangle(600, 5, 195, 100, Fade(SKYBLUE, 0.5f));
|
||||
DrawRectangleLines(600, 5, 195, 100, BLUE);
|
||||
|
||||
DrawText("Camera status:", 610, 15, 10, BLACK);
|
||||
DrawText(TextFormat("- Mode: %s", (cameraMode == CAMERA_FREE) ? "FREE" :
|
||||
(cameraMode == CAMERA_FIRST_PERSON) ? "FIRST_PERSON" :
|
||||
(cameraMode == CAMERA_THIRD_PERSON) ? "THIRD_PERSON" :
|
||||
(cameraMode == CAMERA_ORBITAL) ? "ORBITAL" : "CUSTOM"), 610, 30, 10, BLACK);
|
||||
DrawText(TextFormat("- Projection: %s", (camera.projection == CAMERA_PERSPECTIVE) ? "PERSPECTIVE" :
|
||||
(camera.projection == CAMERA_ORTHOGRAPHIC) ? "ORTHOGRAPHIC" : "CUSTOM"), 610, 45, 10, BLACK);
|
||||
DrawText(TextFormat("- Position: (%06.3f, %06.3f, %06.3f)", camera.position.x, camera.position.y, camera.position.z), 610, 60, 10, BLACK);
|
||||
DrawText(TextFormat("- Target: (%06.3f, %06.3f, %06.3f)", camera.target.x, camera.target.y, camera.target.z), 610, 75, 10, BLACK);
|
||||
DrawText(TextFormat("- Up: (%06.3f, %06.3f, %06.3f)", camera.up.x, camera.up.y, camera.up.z), 610, 90, 10, BLACK);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
@ -31,11 +31,11 @@ int main(void)
|
|||
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f }; // Camera looking at point
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
|
||||
camera.fovy = 45.0f; // Camera field-of-view Y
|
||||
camera.projection = CAMERA_PERSPECTIVE; // Camera mode type
|
||||
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
|
||||
|
||||
Vector3 cubePosition = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
SetCameraMode(camera, CAMERA_FREE); // Set a free camera mode
|
||||
DisableCursor(); // Limit cursor to relative movement inside the window
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
@ -45,9 +45,9 @@ int main(void)
|
|||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera);
|
||||
UpdateCamera(&camera, CAMERA_FREE);
|
||||
|
||||
if (IsKeyDown('Z')) camera.target = (Vector3){ 0.0f, 0.0f, 0.0f };
|
||||
if (IsKeyPressed('Z')) camera.target = (Vector3){ 0.0f, 0.0f, 0.0f };
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
|
@ -65,15 +65,13 @@ int main(void)
|
|||
|
||||
EndMode3D();
|
||||
|
||||
DrawRectangle( 10, 10, 320, 133, Fade(SKYBLUE, 0.5f));
|
||||
DrawRectangleLines( 10, 10, 320, 133, BLUE);
|
||||
DrawRectangle( 10, 10, 320, 93, Fade(SKYBLUE, 0.5f));
|
||||
DrawRectangleLines( 10, 10, 320, 93, BLUE);
|
||||
|
||||
DrawText("Free camera default controls:", 20, 20, 10, BLACK);
|
||||
DrawText("- Mouse Wheel to Zoom in-out", 40, 40, 10, DARKGRAY);
|
||||
DrawText("- Mouse Wheel Pressed to Pan", 40, 60, 10, DARKGRAY);
|
||||
DrawText("- Alt + Mouse Wheel Pressed to Rotate", 40, 80, 10, DARKGRAY);
|
||||
DrawText("- Alt + Ctrl + Mouse Wheel Pressed for Smooth Zoom", 40, 100, 10, DARKGRAY);
|
||||
DrawText("- Z to zoom to (0, 0, 0)", 40, 120, 10, DARKGRAY);
|
||||
DrawText("- Z to zoom to (0, 0, 0)", 40, 80, 10, DARKGRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
@ -85,4 +83,4 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - split screen
|
||||
* raylib [core] example - 3d cmaera split screen
|
||||
*
|
||||
* Example originally created with raylib 3.7, last time updated with raylib 4.0
|
||||
*
|
||||
|
@ -9,39 +9,12 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2021-2022 Jeffery Myers (@JeffM2501)
|
||||
* Copyright (c) 2021-2024 Jeffery Myers (@JeffM2501)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
Texture2D textureGrid = { 0 };
|
||||
Camera cameraPlayer1 = { 0 };
|
||||
Camera cameraPlayer2 = { 0 };
|
||||
|
||||
// Scene drawing
|
||||
void DrawScene(void)
|
||||
{
|
||||
int count = 5;
|
||||
float spacing = 4;
|
||||
|
||||
// Grid of cube trees on a plane to make a "world"
|
||||
DrawPlane((Vector3){ 0, 0, 0 }, (Vector2){ 50, 50 }, BEIGE); // Simple world plane
|
||||
|
||||
for (float x = -count*spacing; x <= count*spacing; x += spacing)
|
||||
{
|
||||
for (float z = -count*spacing; z <= count*spacing; z += spacing)
|
||||
{
|
||||
DrawCubeTexture(textureGrid, (Vector3) { x, 1.5f, z }, 1, 1, 1, GREEN);
|
||||
DrawCubeTexture(textureGrid, (Vector3) { x, 0.5f, z }, 0.25f, 1, 0.25f, BROWN);
|
||||
}
|
||||
}
|
||||
|
||||
// Draw a cube at each player's position
|
||||
DrawCube(cameraPlayer1.position, 1, 1, 1, RED);
|
||||
DrawCube(cameraPlayer2.position, 1, 1, 1, BLUE);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
|
@ -52,16 +25,10 @@ int main(void)
|
|||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - split screen");
|
||||
|
||||
// Generate a simple texture to use for trees
|
||||
Image img = GenImageChecked(256, 256, 32, 32, DARKGRAY, WHITE);
|
||||
textureGrid = LoadTextureFromImage(img);
|
||||
UnloadImage(img);
|
||||
SetTextureFilter(textureGrid, TEXTURE_FILTER_ANISOTROPIC_16X);
|
||||
SetTextureWrap(textureGrid, TEXTURE_WRAP_CLAMP);
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - 3d camera split screen");
|
||||
|
||||
// Setup player 1 camera and screen
|
||||
Camera cameraPlayer1 = { 0 };
|
||||
cameraPlayer1.fovy = 45.0f;
|
||||
cameraPlayer1.up.y = 1.0f;
|
||||
cameraPlayer1.target.y = 1.0f;
|
||||
|
@ -71,6 +38,7 @@ int main(void)
|
|||
RenderTexture screenPlayer1 = LoadRenderTexture(screenWidth/2, screenHeight);
|
||||
|
||||
// Setup player two camera and screen
|
||||
Camera cameraPlayer2 = { 0 };
|
||||
cameraPlayer2.fovy = 45.0f;
|
||||
cameraPlayer2.up.y = 1.0f;
|
||||
cameraPlayer2.target.y = 3.0f;
|
||||
|
@ -81,6 +49,10 @@ int main(void)
|
|||
|
||||
// Build a flipped rectangle the size of the split view to use for drawing later
|
||||
Rectangle splitScreenRect = { 0.0f, 0.0f, (float)screenPlayer1.texture.width, (float)-screenPlayer1.texture.height };
|
||||
|
||||
// Grid data
|
||||
int count = 5;
|
||||
float spacing = 4;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
@ -124,26 +96,69 @@ int main(void)
|
|||
// Draw Player1 view to the render texture
|
||||
BeginTextureMode(screenPlayer1);
|
||||
ClearBackground(SKYBLUE);
|
||||
|
||||
BeginMode3D(cameraPlayer1);
|
||||
DrawScene();
|
||||
|
||||
// Draw scene: grid of cube trees on a plane to make a "world"
|
||||
DrawPlane((Vector3){ 0, 0, 0 }, (Vector2){ 50, 50 }, BEIGE); // Simple world plane
|
||||
|
||||
for (float x = -count*spacing; x <= count*spacing; x += spacing)
|
||||
{
|
||||
for (float z = -count*spacing; z <= count*spacing; z += spacing)
|
||||
{
|
||||
DrawCube((Vector3) { x, 1.5f, z }, 1, 1, 1, LIME);
|
||||
DrawCube((Vector3) { x, 0.5f, z }, 0.25f, 1, 0.25f, BROWN);
|
||||
}
|
||||
}
|
||||
|
||||
// Draw a cube at each player's position
|
||||
DrawCube(cameraPlayer1.position, 1, 1, 1, RED);
|
||||
DrawCube(cameraPlayer2.position, 1, 1, 1, BLUE);
|
||||
|
||||
EndMode3D();
|
||||
DrawText("PLAYER1 W/S to move", 10, 10, 20, RED);
|
||||
|
||||
DrawRectangle(0, 0, GetScreenWidth()/2, 40, Fade(RAYWHITE, 0.8f));
|
||||
DrawText("PLAYER1: W/S to move", 10, 10, 20, MAROON);
|
||||
|
||||
EndTextureMode();
|
||||
|
||||
// Draw Player2 view to the render texture
|
||||
BeginTextureMode(screenPlayer2);
|
||||
ClearBackground(SKYBLUE);
|
||||
|
||||
BeginMode3D(cameraPlayer2);
|
||||
DrawScene();
|
||||
|
||||
// Draw scene: grid of cube trees on a plane to make a "world"
|
||||
DrawPlane((Vector3){ 0, 0, 0 }, (Vector2){ 50, 50 }, BEIGE); // Simple world plane
|
||||
|
||||
for (float x = -count*spacing; x <= count*spacing; x += spacing)
|
||||
{
|
||||
for (float z = -count*spacing; z <= count*spacing; z += spacing)
|
||||
{
|
||||
DrawCube((Vector3) { x, 1.5f, z }, 1, 1, 1, LIME);
|
||||
DrawCube((Vector3) { x, 0.5f, z }, 0.25f, 1, 0.25f, BROWN);
|
||||
}
|
||||
}
|
||||
|
||||
// Draw a cube at each player's position
|
||||
DrawCube(cameraPlayer1.position, 1, 1, 1, RED);
|
||||
DrawCube(cameraPlayer2.position, 1, 1, 1, BLUE);
|
||||
|
||||
EndMode3D();
|
||||
DrawText("PLAYER2 UP/DOWN to move", 10, 10, 20, BLUE);
|
||||
|
||||
DrawRectangle(0, 0, GetScreenWidth()/2, 40, Fade(RAYWHITE, 0.8f));
|
||||
DrawText("PLAYER2: UP/DOWN to move", 10, 10, 20, DARKBLUE);
|
||||
|
||||
EndTextureMode();
|
||||
|
||||
// Draw both views render textures to the screen side by side
|
||||
BeginDrawing();
|
||||
ClearBackground(BLACK);
|
||||
|
||||
DrawTextureRec(screenPlayer1.texture, splitScreenRect, (Vector2){ 0, 0 }, WHITE);
|
||||
DrawTextureRec(screenPlayer2.texture, splitScreenRect, (Vector2){ screenWidth/2.0f, 0 }, WHITE);
|
||||
|
||||
DrawRectangle(GetScreenWidth()/2 - 2, 0, 4, GetScreenHeight(), LIGHTGRAY);
|
||||
EndDrawing();
|
||||
}
|
||||
|
||||
|
@ -151,7 +166,6 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadRenderTexture(screenPlayer1); // Unload render texture
|
||||
UnloadRenderTexture(screenPlayer2); // Unload render texture
|
||||
UnloadTexture(textureGrid); // Unload texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
BIN
examples/core/core_3d_camera_split_screen.png
Normal file
After Width: | Height: | Size: 16 KiB |
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
@ -31,16 +31,13 @@ int main(void)
|
|||
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f }; // Camera looking at point
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
|
||||
camera.fovy = 45.0f; // Camera field-of-view Y
|
||||
camera.projection = CAMERA_PERSPECTIVE; // Camera mode type
|
||||
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
|
||||
|
||||
Vector3 cubePosition = { 0.0f, 1.0f, 0.0f };
|
||||
Vector3 cubeSize = { 2.0f, 2.0f, 2.0f };
|
||||
|
||||
Ray ray = { 0 }; // Picking line ray
|
||||
|
||||
RayCollision collision = { 0 };
|
||||
|
||||
SetCameraMode(camera, CAMERA_FREE); // Set a free camera mode
|
||||
RayCollision collision = { 0 }; // Ray collision hit info
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
@ -50,13 +47,20 @@ int main(void)
|
|||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera);
|
||||
if (IsCursorHidden()) UpdateCamera(&camera, CAMERA_FIRST_PERSON);
|
||||
|
||||
// Toggle camera controls
|
||||
if (IsMouseButtonPressed(MOUSE_BUTTON_RIGHT))
|
||||
{
|
||||
if (IsCursorHidden()) EnableCursor();
|
||||
else DisableCursor();
|
||||
}
|
||||
|
||||
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT))
|
||||
{
|
||||
if (!collision.hit)
|
||||
{
|
||||
ray = GetMouseRay(GetMousePosition(), camera);
|
||||
ray = GetScreenToWorldRay(GetMousePosition(), camera);
|
||||
|
||||
// Check collision between ray and box
|
||||
collision = GetRayCollisionBox(ray,
|
||||
|
@ -93,10 +97,12 @@ int main(void)
|
|||
|
||||
EndMode3D();
|
||||
|
||||
DrawText("Try selecting the box with mouse!", 240, 10, 20, DARKGRAY);
|
||||
DrawText("Try clicking on the box with your mouse!", 240, 10, 20, DARKGRAY);
|
||||
|
||||
if (collision.hit) DrawText("BOX SELECTED", (screenWidth - MeasureText("BOX SELECTED", 30)) / 2, (int)(screenHeight * 0.1f), 30, GREEN);
|
||||
|
||||
DrawText("Right click mouse to toggle camera controls", 10, 430, 10, GRAY);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
EndDrawing();
|
||||
|
|
336
examples/core/core_automation_events.c
Normal file
|
@ -0,0 +1,336 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - automation events
|
||||
*
|
||||
* Example originally created with raylib 5.0, last time updated with raylib 5.0
|
||||
*
|
||||
* Example based on 2d_camera_platformer example by arvyy (@arvyy)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
#include "raymath.h"
|
||||
|
||||
#define GRAVITY 400
|
||||
#define PLAYER_JUMP_SPD 350.0f
|
||||
#define PLAYER_HOR_SPD 200.0f
|
||||
|
||||
#define MAX_ENVIRONMENT_ELEMENTS 5
|
||||
|
||||
typedef struct Player {
|
||||
Vector2 position;
|
||||
float speed;
|
||||
bool canJump;
|
||||
} Player;
|
||||
|
||||
typedef struct EnvElement {
|
||||
Rectangle rect;
|
||||
int blocking;
|
||||
Color color;
|
||||
} EnvElement;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - automation events");
|
||||
|
||||
// Define player
|
||||
Player player = { 0 };
|
||||
player.position = (Vector2){ 400, 280 };
|
||||
player.speed = 0;
|
||||
player.canJump = false;
|
||||
|
||||
// Define environment elements (platforms)
|
||||
EnvElement envElements[MAX_ENVIRONMENT_ELEMENTS] = {
|
||||
{{ 0, 0, 1000, 400 }, 0, LIGHTGRAY },
|
||||
{{ 0, 400, 1000, 200 }, 1, GRAY },
|
||||
{{ 300, 200, 400, 10 }, 1, GRAY },
|
||||
{{ 250, 300, 100, 10 }, 1, GRAY },
|
||||
{{ 650, 300, 100, 10 }, 1, GRAY }
|
||||
};
|
||||
|
||||
// Define camera
|
||||
Camera2D camera = { 0 };
|
||||
camera.target = player.position;
|
||||
camera.offset = (Vector2){ screenWidth/2.0f, screenHeight/2.0f };
|
||||
camera.rotation = 0.0f;
|
||||
camera.zoom = 1.0f;
|
||||
|
||||
// Automation events
|
||||
AutomationEventList aelist = LoadAutomationEventList(0); // Initialize list of automation events to record new events
|
||||
SetAutomationEventList(&aelist);
|
||||
bool eventRecording = false;
|
||||
bool eventPlaying = false;
|
||||
|
||||
unsigned int frameCounter = 0;
|
||||
unsigned int playFrameCounter = 0;
|
||||
unsigned int currentPlayFrame = 0;
|
||||
|
||||
SetTargetFPS(60);
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose())
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
float deltaTime = 0.015f;//GetFrameTime();
|
||||
|
||||
// Dropped files logic
|
||||
//----------------------------------------------------------------------------------
|
||||
if (IsFileDropped())
|
||||
{
|
||||
FilePathList droppedFiles = LoadDroppedFiles();
|
||||
|
||||
// Supports loading .rgs style files (text or binary) and .png style palette images
|
||||
if (IsFileExtension(droppedFiles.paths[0], ".txt;.rae"))
|
||||
{
|
||||
UnloadAutomationEventList(aelist);
|
||||
aelist = LoadAutomationEventList(droppedFiles.paths[0]);
|
||||
|
||||
eventRecording = false;
|
||||
|
||||
// Reset scene state to play
|
||||
eventPlaying = true;
|
||||
playFrameCounter = 0;
|
||||
currentPlayFrame = 0;
|
||||
|
||||
player.position = (Vector2){ 400, 280 };
|
||||
player.speed = 0;
|
||||
player.canJump = false;
|
||||
|
||||
camera.target = player.position;
|
||||
camera.offset = (Vector2){ screenWidth/2.0f, screenHeight/2.0f };
|
||||
camera.rotation = 0.0f;
|
||||
camera.zoom = 1.0f;
|
||||
}
|
||||
|
||||
UnloadDroppedFiles(droppedFiles); // Unload filepaths from memory
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Update player
|
||||
//----------------------------------------------------------------------------------
|
||||
if (IsKeyDown(KEY_LEFT)) player.position.x -= PLAYER_HOR_SPD*deltaTime;
|
||||
if (IsKeyDown(KEY_RIGHT)) player.position.x += PLAYER_HOR_SPD*deltaTime;
|
||||
if (IsKeyDown(KEY_SPACE) && player.canJump)
|
||||
{
|
||||
player.speed = -PLAYER_JUMP_SPD;
|
||||
player.canJump = false;
|
||||
}
|
||||
|
||||
int hitObstacle = 0;
|
||||
for (int i = 0; i < MAX_ENVIRONMENT_ELEMENTS; i++)
|
||||
{
|
||||
EnvElement *element = &envElements[i];
|
||||
Vector2 *p = &(player.position);
|
||||
if (element->blocking &&
|
||||
element->rect.x <= p->x &&
|
||||
element->rect.x + element->rect.width >= p->x &&
|
||||
element->rect.y >= p->y &&
|
||||
element->rect.y <= p->y + player.speed*deltaTime)
|
||||
{
|
||||
hitObstacle = 1;
|
||||
player.speed = 0.0f;
|
||||
p->y = element->rect.y;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hitObstacle)
|
||||
{
|
||||
player.position.y += player.speed*deltaTime;
|
||||
player.speed += GRAVITY*deltaTime;
|
||||
player.canJump = false;
|
||||
}
|
||||
else player.canJump = true;
|
||||
|
||||
if (IsKeyPressed(KEY_R))
|
||||
{
|
||||
// Reset game state
|
||||
player.position = (Vector2){ 400, 280 };
|
||||
player.speed = 0;
|
||||
player.canJump = false;
|
||||
|
||||
camera.target = player.position;
|
||||
camera.offset = (Vector2){ screenWidth/2.0f, screenHeight/2.0f };
|
||||
camera.rotation = 0.0f;
|
||||
camera.zoom = 1.0f;
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Events playing
|
||||
// NOTE: Logic must be before Camera update because it depends on mouse-wheel value,
|
||||
// that can be set by the played event... but some other inputs could be affected
|
||||
//----------------------------------------------------------------------------------
|
||||
if (eventPlaying)
|
||||
{
|
||||
// NOTE: Multiple events could be executed in a single frame
|
||||
while (playFrameCounter == aelist.events[currentPlayFrame].frame)
|
||||
{
|
||||
PlayAutomationEvent(aelist.events[currentPlayFrame]);
|
||||
currentPlayFrame++;
|
||||
|
||||
if (currentPlayFrame == aelist.count)
|
||||
{
|
||||
eventPlaying = false;
|
||||
currentPlayFrame = 0;
|
||||
playFrameCounter = 0;
|
||||
|
||||
TraceLog(LOG_INFO, "FINISH PLAYING!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
playFrameCounter++;
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Update camera
|
||||
//----------------------------------------------------------------------------------
|
||||
camera.target = player.position;
|
||||
camera.offset = (Vector2){ screenWidth/2.0f, screenHeight/2.0f };
|
||||
float minX = 1000, minY = 1000, maxX = -1000, maxY = -1000;
|
||||
|
||||
// WARNING: On event replay, mouse-wheel internal value is set
|
||||
camera.zoom += ((float)GetMouseWheelMove()*0.05f);
|
||||
if (camera.zoom > 3.0f) camera.zoom = 3.0f;
|
||||
else if (camera.zoom < 0.25f) camera.zoom = 0.25f;
|
||||
|
||||
for (int i = 0; i < MAX_ENVIRONMENT_ELEMENTS; i++)
|
||||
{
|
||||
EnvElement *element = &envElements[i];
|
||||
minX = fminf(element->rect.x, minX);
|
||||
maxX = fmaxf(element->rect.x + element->rect.width, maxX);
|
||||
minY = fminf(element->rect.y, minY);
|
||||
maxY = fmaxf(element->rect.y + element->rect.height, maxY);
|
||||
}
|
||||
|
||||
Vector2 max = GetWorldToScreen2D((Vector2){ maxX, maxY }, camera);
|
||||
Vector2 min = GetWorldToScreen2D((Vector2){ minX, minY }, camera);
|
||||
|
||||
if (max.x < screenWidth) camera.offset.x = screenWidth - (max.x - screenWidth/2);
|
||||
if (max.y < screenHeight) camera.offset.y = screenHeight - (max.y - screenHeight/2);
|
||||
if (min.x > 0) camera.offset.x = screenWidth/2 - min.x;
|
||||
if (min.y > 0) camera.offset.y = screenHeight/2 - min.y;
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Events management
|
||||
if (IsKeyPressed(KEY_S)) // Toggle events recording
|
||||
{
|
||||
if (!eventPlaying)
|
||||
{
|
||||
if (eventRecording)
|
||||
{
|
||||
StopAutomationEventRecording();
|
||||
eventRecording = false;
|
||||
|
||||
ExportAutomationEventList(aelist, "automation.rae");
|
||||
|
||||
TraceLog(LOG_INFO, "RECORDED FRAMES: %i", aelist.count);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetAutomationEventBaseFrame(180);
|
||||
StartAutomationEventRecording();
|
||||
eventRecording = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (IsKeyPressed(KEY_A)) // Toggle events playing (WARNING: Starts next frame)
|
||||
{
|
||||
if (!eventRecording && (aelist.count > 0))
|
||||
{
|
||||
// Reset scene state to play
|
||||
eventPlaying = true;
|
||||
playFrameCounter = 0;
|
||||
currentPlayFrame = 0;
|
||||
|
||||
player.position = (Vector2){ 400, 280 };
|
||||
player.speed = 0;
|
||||
player.canJump = false;
|
||||
|
||||
camera.target = player.position;
|
||||
camera.offset = (Vector2){ screenWidth/2.0f, screenHeight/2.0f };
|
||||
camera.rotation = 0.0f;
|
||||
camera.zoom = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
if (eventRecording || eventPlaying) frameCounter++;
|
||||
else frameCounter = 0;
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(LIGHTGRAY);
|
||||
|
||||
BeginMode2D(camera);
|
||||
|
||||
// Draw environment elements
|
||||
for (int i = 0; i < MAX_ENVIRONMENT_ELEMENTS; i++)
|
||||
{
|
||||
DrawRectangleRec(envElements[i].rect, envElements[i].color);
|
||||
}
|
||||
|
||||
// Draw player rectangle
|
||||
DrawRectangleRec((Rectangle){ player.position.x - 20, player.position.y - 40, 40, 40 }, RED);
|
||||
|
||||
EndMode2D();
|
||||
|
||||
// Draw game controls
|
||||
DrawRectangle(10, 10, 290, 145, Fade(SKYBLUE, 0.5f));
|
||||
DrawRectangleLines(10, 10, 290, 145, Fade(BLUE, 0.8f));
|
||||
|
||||
DrawText("Controls:", 20, 20, 10, BLACK);
|
||||
DrawText("- RIGHT | LEFT: Player movement", 30, 40, 10, DARKGRAY);
|
||||
DrawText("- SPACE: Player jump", 30, 60, 10, DARKGRAY);
|
||||
DrawText("- R: Reset game state", 30, 80, 10, DARKGRAY);
|
||||
|
||||
DrawText("- S: START/STOP RECORDING INPUT EVENTS", 30, 110, 10, BLACK);
|
||||
DrawText("- A: REPLAY LAST RECORDED INPUT EVENTS", 30, 130, 10, BLACK);
|
||||
|
||||
// Draw automation events recording indicator
|
||||
if (eventRecording)
|
||||
{
|
||||
DrawRectangle(10, 160, 290, 30, Fade(RED, 0.3f));
|
||||
DrawRectangleLines(10, 160, 290, 30, Fade(MAROON, 0.8f));
|
||||
DrawCircle(30, 175, 10, MAROON);
|
||||
|
||||
if (((frameCounter/15)%2) == 1) DrawText(TextFormat("RECORDING EVENTS... [%i]", aelist.count), 50, 170, 10, MAROON);
|
||||
}
|
||||
else if (eventPlaying)
|
||||
{
|
||||
DrawRectangle(10, 160, 290, 30, Fade(LIME, 0.3f));
|
||||
DrawRectangleLines(10, 160, 290, 30, Fade(DARKGREEN, 0.8f));
|
||||
DrawTriangle((Vector2){ 20, 155 + 10 }, (Vector2){ 20, 155 + 30 }, (Vector2){ 40, 155 + 20 }, DARKGREEN);
|
||||
|
||||
if (((frameCounter/15)%2) == 1) DrawText(TextFormat("PLAYING RECORDED EVENTS... [%i]", currentPlayFrame), 50, 170, 10, DARKGREEN);
|
||||
}
|
||||
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
BIN
examples/core/core_automation_events.png
Normal file
After Width: | Height: | Size: 20 KiB |
|
@ -9,7 +9,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2021-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2021-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
|
|
@ -4,20 +4,23 @@
|
|||
*
|
||||
* Welcome to raylib!
|
||||
*
|
||||
* To test examples, just press F6 and execute raylib_compile_execute script
|
||||
* To test examples, just press F6 and execute 'raylib_compile_execute' script
|
||||
* Note that compiled executable is placed in the same folder as .c file
|
||||
*
|
||||
* To test the examples on Web, press F6 and execute 'raylib_compile_execute_web' script
|
||||
* Web version of the program is generated in the same folder as .c file
|
||||
*
|
||||
* You can find all basic examples on C:\raylib\raylib\examples folder or
|
||||
* raylib official webpage: www.raylib.com
|
||||
*
|
||||
* Enjoy using raylib. :)
|
||||
*
|
||||
* Example originally created with raylib 1.0, last time updated with raylib 1.0
|
||||
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2013-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* raylib [core] example - Basic window (adapted for HTML5 platform)
|
||||
*
|
||||
* NOTE: This example is prepared to compile for PLATFORM_WEB, PLATFORM_DESKTOP and PLATFORM_RPI
|
||||
* NOTE: This example is prepared to compile for PLATFORM_WEB, and PLATFORM_DESKTOP
|
||||
* As you will notice, code structure is slightly diferent to the other examples...
|
||||
* To compile it for PLATFORM_WEB just uncomment #define PLATFORM_WEB at beginning
|
||||
*
|
||||
|
@ -11,7 +11,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* raylib [core] example - custom frame control
|
||||
*
|
||||
* NOTE: WARNING: This is an example for advance users willing to have full control over
|
||||
* NOTE: WARNING: This is an example for advanced users willing to have full control over
|
||||
* the frame processes. By default, EndDrawing() calls the following processes:
|
||||
* 1. Draw remaining batch data: rlDrawRenderBatchActive()
|
||||
* 2. SwapScreenBuffer()
|
||||
|
@ -22,7 +22,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2021-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2021-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
@ -86,8 +86,8 @@ int main(void)
|
|||
|
||||
DrawCircle((int)position, GetScreenHeight()/2 - 25, 50, RED);
|
||||
|
||||
DrawText(TextFormat("%03.0f ms", timeCounter*1000.0f), position - 40, GetScreenHeight()/2 - 100, 20, MAROON);
|
||||
DrawText(TextFormat("PosX: %03.0f", position), position - 50, GetScreenHeight()/2 + 40, 20, BLACK);
|
||||
DrawText(TextFormat("%03.0f ms", timeCounter*1000.0f), (int)position - 40, GetScreenHeight()/2 - 100, 20, MAROON);
|
||||
DrawText(TextFormat("PosX: %03.0f", position), (int)position - 50, GetScreenHeight()/2 + 40, 20, BLACK);
|
||||
|
||||
DrawText("Circle is moving at a constant 200 pixels/sec,\nindependently of the frame rate.", 10, 10, 20, DARKGRAY);
|
||||
DrawText("PRESS SPACE to PAUSE MOVEMENT", 10, GetScreenHeight() - 60, 20, GRAY);
|
||||
|
@ -110,12 +110,12 @@ int main(void)
|
|||
waitTime = (1.0f/(float)targetFPS) - updateDrawTime;
|
||||
if (waitTime > 0.0)
|
||||
{
|
||||
WaitTime((float)waitTime*1000.0f);
|
||||
WaitTime((float)waitTime);
|
||||
currentTime = GetTime();
|
||||
deltaTime = (float)(currentTime - previousTime);
|
||||
}
|
||||
}
|
||||
else deltaTime = updateDrawTime; // Framerate could be variable
|
||||
else deltaTime = (float)updateDrawTime; // Framerate could be variable
|
||||
|
||||
previousTime = currentTime;
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2018-2022 Pablo Marcos Oltra (@pamarcos) and Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2018-2024 Pablo Marcos Oltra (@pamarcos) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
#include <stdio.h> // Required for: fopen(), fclose(), fputc(), fwrite(), printf(), fprintf(), funopen()
|
||||
#include <time.h> // Required for: time_t, tm, time(), localtime(), strftime()
|
||||
|
||||
// Custom logging funtion
|
||||
// Custom logging function
|
||||
void CustomLog(int msgType, const char *text, va_list args)
|
||||
{
|
||||
char timeStr[64] = { 0 };
|
||||
|
|
|
@ -9,12 +9,17 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include <stdlib.h> // Required for: calloc(), free()
|
||||
|
||||
#define MAX_FILEPATH_RECORDED 4096
|
||||
#define MAX_FILEPATH_SIZE 2048
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
|
@ -27,7 +32,14 @@ int main(void)
|
|||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - drop files");
|
||||
|
||||
FilePathList droppedFiles = { 0 };
|
||||
int filePathCounter = 0;
|
||||
char *filePaths[MAX_FILEPATH_RECORDED] = { 0 }; // We will register a maximum of filepaths
|
||||
|
||||
// Allocate space for the required file paths
|
||||
for (int i = 0; i < MAX_FILEPATH_RECORDED; i++)
|
||||
{
|
||||
filePaths[i] = (char *)RL_CALLOC(MAX_FILEPATH_SIZE, 1);
|
||||
}
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
@ -39,11 +51,18 @@ int main(void)
|
|||
//----------------------------------------------------------------------------------
|
||||
if (IsFileDropped())
|
||||
{
|
||||
// Is some files have been previously loaded, unload them
|
||||
if (droppedFiles.count > 0) UnloadDroppedFiles(droppedFiles);
|
||||
|
||||
// Load new dropped files
|
||||
droppedFiles = LoadDroppedFiles();
|
||||
FilePathList droppedFiles = LoadDroppedFiles();
|
||||
|
||||
for (int i = 0, offset = filePathCounter; i < (int)droppedFiles.count; i++)
|
||||
{
|
||||
if (filePathCounter < (MAX_FILEPATH_RECORDED - 1))
|
||||
{
|
||||
TextCopy(filePaths[offset + i], droppedFiles.paths[i]);
|
||||
filePathCounter++;
|
||||
}
|
||||
}
|
||||
|
||||
UnloadDroppedFiles(droppedFiles); // Unload filepaths from memory
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
|
@ -53,20 +72,20 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
if (droppedFiles.count == 0) DrawText("Drop your files to this window!", 100, 40, 20, DARKGRAY);
|
||||
if (filePathCounter == 0) DrawText("Drop your files to this window!", 100, 40, 20, DARKGRAY);
|
||||
else
|
||||
{
|
||||
DrawText("Dropped files:", 100, 40, 20, DARKGRAY);
|
||||
|
||||
for (int i = 0; i < droppedFiles.count; i++)
|
||||
for (int i = 0; i < filePathCounter; i++)
|
||||
{
|
||||
if (i%2 == 0) DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.5f));
|
||||
else DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.3f));
|
||||
|
||||
DrawText(droppedFiles.paths[i], 120, 100 + 40*i, 10, GRAY);
|
||||
DrawText(filePaths[i], 120, 100 + 40*i, 10, GRAY);
|
||||
}
|
||||
|
||||
DrawText("Drop new files...", 100, 110 + 40*droppedFiles.count, 20, DARKGRAY);
|
||||
DrawText("Drop new files...", 100, 110 + 40*filePathCounter, 20, DARKGRAY);
|
||||
}
|
||||
|
||||
EndDrawing();
|
||||
|
@ -75,7 +94,10 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadDroppedFiles(droppedFiles); // Unload files memory
|
||||
for (int i = 0; i < MAX_FILEPATH_RECORDED; i++)
|
||||
{
|
||||
RL_FREE(filePaths[i]); // Free allocated memory for all filepaths
|
||||
}
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
|
|
@ -13,21 +13,16 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2013-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
// NOTE: Gamepad name ID depends on drivers and OS
|
||||
#define XBOX360_LEGACY_NAME_ID "Xbox Controller"
|
||||
#if defined(PLATFORM_RPI)
|
||||
#define XBOX360_NAME_ID "Microsoft X-Box 360 pad"
|
||||
#define PS3_NAME_ID "PLAYSTATION(R)3 Controller"
|
||||
#else
|
||||
#define XBOX360_NAME_ID "Xbox 360 Controller"
|
||||
#define PS3_NAME_ID "PLAYSTATION(R)3 Controller"
|
||||
#endif
|
||||
#define XBOX_ALIAS_1 "xbox"
|
||||
#define XBOX_ALIAS_2 "x-box"
|
||||
#define PS_ALIAS "playstation"
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
|
@ -46,9 +41,19 @@ int main(void)
|
|||
Texture2D texPs3Pad = LoadTexture("resources/ps3.png");
|
||||
Texture2D texXboxPad = LoadTexture("resources/xbox.png");
|
||||
|
||||
// Set axis deadzones
|
||||
const float leftStickDeadzoneX = 0.1f;
|
||||
const float leftStickDeadzoneY = 0.1f;
|
||||
const float rightStickDeadzoneX = 0.1f;
|
||||
const float rightStickDeadzoneY = 0.1f;
|
||||
const float leftTriggerDeadzone = -0.9f;
|
||||
const float rightTriggerDeadzone = -0.9f;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
int gamepad = 0; // which gamepad to display
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
|
@ -63,108 +68,190 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
if (IsGamepadAvailable(0))
|
||||
{
|
||||
DrawText(TextFormat("GP1: %s", GetGamepadName(0)), 10, 10, 10, BLACK);
|
||||
if (IsKeyPressed(KEY_LEFT) && gamepad > 0) gamepad--;
|
||||
if (IsKeyPressed(KEY_RIGHT)) gamepad++;
|
||||
|
||||
if (TextIsEqual(GetGamepadName(0), XBOX360_NAME_ID) || TextIsEqual(GetGamepadName(0), XBOX360_LEGACY_NAME_ID))
|
||||
if (IsGamepadAvailable(gamepad))
|
||||
{
|
||||
DrawText(TextFormat("GP%d: %s", gamepad, GetGamepadName(gamepad)), 10, 10, 10, BLACK);
|
||||
|
||||
// Get axis values
|
||||
float leftStickX = GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_X);
|
||||
float leftStickY = GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_Y);
|
||||
float rightStickX = GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_X);
|
||||
float rightStickY = GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_Y);
|
||||
float leftTrigger = GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER);
|
||||
float rightTrigger = GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER);
|
||||
|
||||
// Calculate deadzones
|
||||
if (leftStickX > -leftStickDeadzoneX && leftStickX < leftStickDeadzoneX) leftStickX = 0.0f;
|
||||
if (leftStickY > -leftStickDeadzoneY && leftStickY < leftStickDeadzoneY) leftStickY = 0.0f;
|
||||
if (rightStickX > -rightStickDeadzoneX && rightStickX < rightStickDeadzoneX) rightStickX = 0.0f;
|
||||
if (rightStickY > -rightStickDeadzoneY && rightStickY < rightStickDeadzoneY) rightStickY = 0.0f;
|
||||
if (leftTrigger < leftTriggerDeadzone) leftTrigger = -1.0f;
|
||||
if (rightTrigger < rightTriggerDeadzone) rightTrigger = -1.0f;
|
||||
|
||||
if (TextFindIndex(TextToLower(GetGamepadName(gamepad)), XBOX_ALIAS_1) > -1 || TextFindIndex(TextToLower(GetGamepadName(gamepad)), XBOX_ALIAS_2) > -1)
|
||||
{
|
||||
DrawTexture(texXboxPad, 0, 0, DARKGRAY);
|
||||
|
||||
// Draw buttons: xbox home
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE)) DrawCircle(394, 89, 19, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE)) DrawCircle(394, 89, 19, RED);
|
||||
|
||||
// Draw buttons: basic
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE_RIGHT)) DrawCircle(436, 150, 9, RED);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawCircle(352, 150, 9, RED);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_LEFT)) DrawCircle(501, 151, 15, BLUE);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_DOWN)) DrawCircle(536, 187, 15, LIME);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT)) DrawCircle(572, 151, 15, MAROON);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(536, 115, 15, GOLD);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_RIGHT)) DrawCircle(436, 150, 9, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawCircle(352, 150, 9, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_LEFT)) DrawCircle(501, 151, 15, BLUE);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_DOWN)) DrawCircle(536, 187, 15, LIME);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT)) DrawCircle(572, 151, 15, MAROON);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(536, 115, 15, GOLD);
|
||||
|
||||
// Draw buttons: d-pad
|
||||
DrawRectangle(317, 202, 19, 71, BLACK);
|
||||
DrawRectangle(293, 228, 69, 19, BLACK);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(317, 202, 19, 26, RED);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(317, 202 + 45, 19, 26, RED);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(292, 228, 25, 19, RED);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(292 + 44, 228, 26, 19, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(317, 202, 19, 26, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(317, 202 + 45, 19, 26, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(292, 228, 25, 19, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(292 + 44, 228, 26, 19, RED);
|
||||
|
||||
// Draw buttons: left-right back
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawCircle(259, 61, 20, RED);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_TRIGGER_1)) DrawCircle(536, 61, 20, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawCircle(259, 61, 20, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_TRIGGER_1)) DrawCircle(536, 61, 20, RED);
|
||||
|
||||
// Draw axis: left joystick
|
||||
Color leftGamepadColor = BLACK;
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_THUMB)) leftGamepadColor = RED;
|
||||
DrawCircle(259, 152, 39, BLACK);
|
||||
DrawCircle(259, 152, 34, LIGHTGRAY);
|
||||
DrawCircle(259 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_X)*20),
|
||||
152 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_Y)*20), 25, BLACK);
|
||||
DrawCircle(259 + (int)(leftStickX*20),
|
||||
152 + (int)(leftStickY*20), 25, leftGamepadColor);
|
||||
|
||||
// Draw axis: right joystick
|
||||
Color rightGamepadColor = BLACK;
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_THUMB)) rightGamepadColor = RED;
|
||||
DrawCircle(461, 237, 38, BLACK);
|
||||
DrawCircle(461, 237, 33, LIGHTGRAY);
|
||||
DrawCircle(461 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_X)*20),
|
||||
237 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_Y)*20), 25, BLACK);
|
||||
DrawCircle(461 + (int)(rightStickX*20),
|
||||
237 + (int)(rightStickY*20), 25, rightGamepadColor);
|
||||
|
||||
// Draw axis: left-right triggers
|
||||
DrawRectangle(170, 30, 15, 70, GRAY);
|
||||
DrawRectangle(604, 30, 15, 70, GRAY);
|
||||
DrawRectangle(170, 30, 15, (int)(((1 + GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_TRIGGER))/2)*70), RED);
|
||||
DrawRectangle(604, 30, 15, (int)(((1 + GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_TRIGGER))/2)*70), RED);
|
||||
DrawRectangle(170, 30, 15, (int)(((1 + leftTrigger)/2)*70), RED);
|
||||
DrawRectangle(604, 30, 15, (int)(((1 + rightTrigger)/2)*70), RED);
|
||||
|
||||
//DrawText(TextFormat("Xbox axis LT: %02.02f", GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_TRIGGER)), 10, 40, 10, BLACK);
|
||||
//DrawText(TextFormat("Xbox axis RT: %02.02f", GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_TRIGGER)), 10, 60, 10, BLACK);
|
||||
//DrawText(TextFormat("Xbox axis LT: %02.02f", GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER)), 10, 40, 10, BLACK);
|
||||
//DrawText(TextFormat("Xbox axis RT: %02.02f", GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER)), 10, 60, 10, BLACK);
|
||||
}
|
||||
else if (TextIsEqual(GetGamepadName(0), PS3_NAME_ID))
|
||||
else if (TextFindIndex(TextToLower(GetGamepadName(gamepad)), PS_ALIAS) > -1)
|
||||
{
|
||||
DrawTexture(texPs3Pad, 0, 0, DARKGRAY);
|
||||
|
||||
// Draw buttons: ps
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE)) DrawCircle(396, 222, 13, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE)) DrawCircle(396, 222, 13, RED);
|
||||
|
||||
// Draw buttons: basic
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawRectangle(328, 170, 32, 13, RED);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE_RIGHT)) DrawTriangle((Vector2){ 436, 168 }, (Vector2){ 436, 185 }, (Vector2){ 464, 177 }, RED);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(557, 144, 13, LIME);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT)) DrawCircle(586, 173, 13, RED);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_DOWN)) DrawCircle(557, 203, 13, VIOLET);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_LEFT)) DrawCircle(527, 173, 13, PINK);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawRectangle(328, 170, 32, 13, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_RIGHT)) DrawTriangle((Vector2){ 436, 168 }, (Vector2){ 436, 185 }, (Vector2){ 464, 177 }, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(557, 144, 13, LIME);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT)) DrawCircle(586, 173, 13, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_DOWN)) DrawCircle(557, 203, 13, VIOLET);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_LEFT)) DrawCircle(527, 173, 13, PINK);
|
||||
|
||||
// Draw buttons: d-pad
|
||||
DrawRectangle(225, 132, 24, 84, BLACK);
|
||||
DrawRectangle(195, 161, 84, 25, BLACK);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(225, 132, 24, 29, RED);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(225, 132 + 54, 24, 30, RED);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(195, 161, 30, 25, RED);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(195 + 54, 161, 30, 25, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(225, 132, 24, 29, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(225, 132 + 54, 24, 30, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(195, 161, 30, 25, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(195 + 54, 161, 30, 25, RED);
|
||||
|
||||
// Draw buttons: left-right back buttons
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawCircle(239, 82, 20, RED);
|
||||
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_TRIGGER_1)) DrawCircle(557, 82, 20, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawCircle(239, 82, 20, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_TRIGGER_1)) DrawCircle(557, 82, 20, RED);
|
||||
|
||||
// Draw axis: left joystick
|
||||
Color leftGamepadColor = BLACK;
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_THUMB)) leftGamepadColor = RED;
|
||||
DrawCircle(319, 255, 35, BLACK);
|
||||
DrawCircle(319, 255, 31, LIGHTGRAY);
|
||||
DrawCircle(319 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_X) * 20),
|
||||
255 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_Y) * 20), 25, BLACK);
|
||||
DrawCircle(319 + (int)(leftStickX*20),
|
||||
255 + (int)(leftStickY*20), 25, leftGamepadColor);
|
||||
|
||||
// Draw axis: right joystick
|
||||
Color rightGamepadColor = BLACK;
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_THUMB)) rightGamepadColor = RED;
|
||||
DrawCircle(475, 255, 35, BLACK);
|
||||
DrawCircle(475, 255, 31, LIGHTGRAY);
|
||||
DrawCircle(475 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_X) * 20),
|
||||
255 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_Y) * 20), 25, BLACK);
|
||||
DrawCircle(475 + (int)(rightStickX*20),
|
||||
255 + (int)(rightStickY*20), 25, rightGamepadColor);
|
||||
|
||||
// Draw axis: left-right triggers
|
||||
DrawRectangle(169, 48, 15, 70, GRAY);
|
||||
DrawRectangle(611, 48, 15, 70, GRAY);
|
||||
DrawRectangle(169, 48, 15, (int)(((1 - GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_TRIGGER)) / 2) * 70), RED);
|
||||
DrawRectangle(611, 48, 15, (int)(((1 - GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_TRIGGER)) / 2) * 70), RED);
|
||||
DrawRectangle(169, 48, 15, (int)(((1 + leftTrigger)/2)*70), RED);
|
||||
DrawRectangle(611, 48, 15, (int)(((1 + rightTrigger)/2)*70), RED);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawText("- GENERIC GAMEPAD -", 280, 180, 20, GRAY);
|
||||
|
||||
// TODO: Draw generic gamepad
|
||||
// Draw background: generic
|
||||
DrawRectangleRounded((Rectangle){ 175, 110, 460, 220}, 0.3f, 16, DARKGRAY);
|
||||
|
||||
// Draw buttons: basic
|
||||
DrawCircle(365, 170, 12, RAYWHITE);
|
||||
DrawCircle(405, 170, 12, RAYWHITE);
|
||||
DrawCircle(445, 170, 12, RAYWHITE);
|
||||
DrawCircle(516, 191, 17, RAYWHITE);
|
||||
DrawCircle(551, 227, 17, RAYWHITE);
|
||||
DrawCircle(587, 191, 17, RAYWHITE);
|
||||
DrawCircle(551, 155, 17, RAYWHITE);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawCircle(365, 170, 10, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE)) DrawCircle(405, 170, 10, GREEN);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_RIGHT)) DrawCircle(445, 170, 10, BLUE);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_LEFT)) DrawCircle(516, 191, 15, GOLD);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_DOWN)) DrawCircle(551, 227, 15, BLUE);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT)) DrawCircle(587, 191, 15, GREEN);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(551, 155, 15, RED);
|
||||
|
||||
// Draw buttons: d-pad
|
||||
DrawRectangle(245, 145, 28, 88, RAYWHITE);
|
||||
DrawRectangle(215, 174, 88, 29, RAYWHITE);
|
||||
DrawRectangle(247, 147, 24, 84, BLACK);
|
||||
DrawRectangle(217, 176, 84, 25, BLACK);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(247, 147, 24, 29, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(247, 147 + 54, 24, 30, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(217, 176, 30, 25, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(217 + 54, 176, 30, 25, RED);
|
||||
|
||||
// Draw buttons: left-right back
|
||||
DrawRectangleRounded((Rectangle){ 215, 98, 100, 10}, 0.5f, 16, DARKGRAY);
|
||||
DrawRectangleRounded((Rectangle){ 495, 98, 100, 10}, 0.5f, 16, DARKGRAY);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawRectangleRounded((Rectangle){ 215, 98, 100, 10}, 0.5f, 16, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_TRIGGER_1)) DrawRectangleRounded((Rectangle){ 495, 98, 100, 10}, 0.5f, 16, RED);
|
||||
|
||||
// Draw axis: left joystick
|
||||
Color leftGamepadColor = BLACK;
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_THUMB)) leftGamepadColor = RED;
|
||||
DrawCircle(345, 260, 40, BLACK);
|
||||
DrawCircle(345, 260, 35, LIGHTGRAY);
|
||||
DrawCircle(345 + (int)(leftStickX*20),
|
||||
260 + (int)(leftStickY*20), 25, leftGamepadColor);
|
||||
|
||||
// Draw axis: right joystick
|
||||
Color rightGamepadColor = BLACK;
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_THUMB)) rightGamepadColor = RED;
|
||||
DrawCircle(465, 260, 40, BLACK);
|
||||
DrawCircle(465, 260, 35, LIGHTGRAY);
|
||||
DrawCircle(465 + (int)(rightStickX*20),
|
||||
260 + (int)(rightStickY*20), 25, rightGamepadColor);
|
||||
|
||||
// Draw axis: left-right triggers
|
||||
DrawRectangle(151, 110, 15, 70, GRAY);
|
||||
DrawRectangle(644, 110, 15, 70, GRAY);
|
||||
DrawRectangle(151, 110, 15, (int)(((1 + leftTrigger)/2)*70), RED);
|
||||
DrawRectangle(644, 110, 15, (int)(((1 + rightTrigger)/2)*70), RED);
|
||||
|
||||
}
|
||||
|
||||
DrawText(TextFormat("DETECTED AXIS [%i]:", GetGamepadAxisCount(0)), 10, 50, 10, MAROON);
|
||||
|
@ -174,12 +261,12 @@ int main(void)
|
|||
DrawText(TextFormat("AXIS %i: %.02f", i, GetGamepadAxisMovement(0, i)), 20, 70 + 20*i, 10, DARKGRAY);
|
||||
}
|
||||
|
||||
if (GetGamepadButtonPressed() != -1) DrawText(TextFormat("DETECTED BUTTON: %i", GetGamepadButtonPressed()), 10, 430, 10, RED);
|
||||
if (GetGamepadButtonPressed() != GAMEPAD_BUTTON_UNKNOWN) DrawText(TextFormat("DETECTED BUTTON: %i", GetGamepadButtonPressed()), 10, 430, 10, RED);
|
||||
else DrawText("DETECTED BUTTON: NONE", 10, 430, 10, GRAY);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawText("GP1: NOT DETECTED", 10, 10, 10, GRAY);
|
||||
DrawText(TextFormat("GP%d: NOT DETECTED", gamepad), 10, 10, 10, GRAY);
|
||||
|
||||
DrawTexture(texXboxPad, 0, 0, LIGHTGRAY);
|
||||
}
|
||||
|
|
83
examples/core/core_input_gamepad_info.c
Normal file
|
@ -0,0 +1,83 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - Gamepad information
|
||||
*
|
||||
* NOTE: This example requires a Gamepad connected to the system
|
||||
* Check raylib.h for buttons configuration
|
||||
*
|
||||
* Example originally created with raylib 4.6, last time updated with raylib 4.6
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
SetConfigFlags(FLAG_MSAA_4X_HINT); // Set MSAA 4X hint before windows creation
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - gamepad information");
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
// TODO: Update your variables here
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
for (int i = 0, y = 5; i < 4; i++) // MAX_GAMEPADS = 4
|
||||
{
|
||||
if (IsGamepadAvailable(i))
|
||||
{
|
||||
DrawText(TextFormat("Gamepad name: %s", GetGamepadName(i)), 10, y, 10, BLACK);
|
||||
y += 11;
|
||||
DrawText(TextFormat("\tAxis count: %d", GetGamepadAxisCount(i)), 10, y, 10, BLACK);
|
||||
y += 11;
|
||||
|
||||
for (int axis = 0; axis < GetGamepadAxisCount(i); axis++)
|
||||
{
|
||||
DrawText(TextFormat("\tAxis %d = %f", axis, GetGamepadAxisMovement(i, axis)), 10, y, 10, BLACK);
|
||||
y += 11;
|
||||
}
|
||||
|
||||
for (int button = 0; button < 32; button++)
|
||||
{
|
||||
DrawText(TextFormat("\tButton %d = %d", button, IsGamepadButtonDown(i, button)), 10, y, 10, BLACK);
|
||||
y += 11;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DrawFPS(GetScreenWidth() - 100, 100);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2016-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2016-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
|
330
examples/core/core_input_gestures_web.c
Normal file
|
@ -0,0 +1,330 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - Input Gestures for Web
|
||||
*
|
||||
* Example originally created with raylib 4.6-dev, last time updated with raylib 4.6-dev
|
||||
*
|
||||
* Example contributed by ubkp (@ubkp) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2023 ubkp (@ubkp)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include "math.h" // Required for the protractor angle graphic drawing
|
||||
|
||||
#if defined(PLATFORM_WEB)
|
||||
#include <emscripten/emscripten.h> // Required for the Web/HTML5
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Global definitions and declarations
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Common variables definitions
|
||||
//--------------------------------------------------------------------------------------
|
||||
int screenWidth = 800; // Update depending on web canvas
|
||||
const int screenHeight = 450;
|
||||
Vector2 messagePosition = { 160, 7 };
|
||||
|
||||
// Last gesture variables definitions
|
||||
//--------------------------------------------------------------------------------------
|
||||
int lastGesture = 0;
|
||||
Vector2 lastGesturePosition = { 165, 130 };
|
||||
|
||||
// Gesture log variables definitions and functions declarations
|
||||
//--------------------------------------------------------------------------------------
|
||||
#define GESTURE_LOG_SIZE 20
|
||||
char gestureLog[GESTURE_LOG_SIZE][12] = { "" }; // The gesture log uses an array (as an inverted circular queue) to store the performed gestures
|
||||
int gestureLogIndex = GESTURE_LOG_SIZE; // The index for the inverted circular queue (moving from last to first direction, then looping around)
|
||||
int previousGesture = 0;
|
||||
|
||||
char const *GetGestureName(int i)
|
||||
{
|
||||
switch (i) {
|
||||
case 0: return "None"; break;
|
||||
case 1: return "Tap"; break;
|
||||
case 2: return "Double Tap"; break;
|
||||
case 4: return "Hold"; break;
|
||||
case 8: return "Drag"; break;
|
||||
case 16: return "Swipe Right"; break;
|
||||
case 32: return "Swipe Left"; break;
|
||||
case 64: return "Swipe Up"; break;
|
||||
case 128: return "Swipe Down"; break;
|
||||
case 256: return "Pinch In"; break;
|
||||
case 512: return "Pinch Out"; break;
|
||||
default: return "Unknown"; break;
|
||||
}
|
||||
}
|
||||
|
||||
Color GetGestureColor(int i)
|
||||
{
|
||||
switch (i) {
|
||||
case 0: return BLACK; break;
|
||||
case 1: return BLUE; break;
|
||||
case 2: return SKYBLUE; break;
|
||||
case 4: return BLACK; break;
|
||||
case 8: return LIME; break;
|
||||
case 16: return RED; break;
|
||||
case 32: return RED; break;
|
||||
case 64: return RED; break;
|
||||
case 128: return RED; break;
|
||||
case 256: return VIOLET; break;
|
||||
case 512: return ORANGE; break;
|
||||
default: return BLACK; break;
|
||||
}
|
||||
}
|
||||
|
||||
int logMode = 1; // Log mode values: 0 shows repeated events; 1 hides repeated events; 2 shows repeated events but hide hold events; 3 hides repeated events and hide hold events
|
||||
|
||||
Color gestureColor = { 0, 0, 0, 255 };
|
||||
Rectangle logButton1 = { 53, 7, 48, 26 };
|
||||
Rectangle logButton2 = { 108, 7, 36, 26 };
|
||||
Vector2 gestureLogPosition = { 10, 10 };
|
||||
|
||||
// Protractor variables definitions
|
||||
//--------------------------------------------------------------------------------------
|
||||
float angleLength = 90.0f;
|
||||
float currentAngleDegrees = 0.0f;
|
||||
Vector2 finalVector = { 0.0f, 0.0f };
|
||||
char currentAngleStr[7] = "";
|
||||
Vector2 protractorPosition = { 266.0f, 315.0f };
|
||||
|
||||
// Update
|
||||
//--------------------------------------------------------------------------------------
|
||||
void Update(void)
|
||||
{
|
||||
// Handle common
|
||||
//--------------------------------------------------------------------------------------
|
||||
int i, ii; // Iterators that will be reused by all for loops
|
||||
const int currentGesture = GetGestureDetected();
|
||||
const float currentDragDegrees = GetGestureDragAngle();
|
||||
const float currentPitchDegrees = GetGesturePinchAngle();
|
||||
const int touchCount = GetTouchPointCount();
|
||||
|
||||
// Handle last gesture
|
||||
//--------------------------------------------------------------------------------------
|
||||
if ((currentGesture != 0) && (currentGesture != 4) && (currentGesture != previousGesture)) lastGesture = currentGesture; // Filter the meaningful gestures (1, 2, 8 to 512) for the display
|
||||
|
||||
// Handle gesture log
|
||||
//--------------------------------------------------------------------------------------
|
||||
if (IsMouseButtonReleased(MOUSE_BUTTON_LEFT))
|
||||
{
|
||||
if (CheckCollisionPointRec(GetMousePosition(), logButton1))
|
||||
{
|
||||
switch (logMode)
|
||||
{
|
||||
case 3: logMode=2; break;
|
||||
case 2: logMode=3; break;
|
||||
case 1: logMode=0; break;
|
||||
default: logMode=1; break;
|
||||
}
|
||||
}
|
||||
else if (CheckCollisionPointRec(GetMousePosition(), logButton2))
|
||||
{
|
||||
switch (logMode)
|
||||
{
|
||||
case 3: logMode=1; break;
|
||||
case 2: logMode=0; break;
|
||||
case 1: logMode=3; break;
|
||||
default: logMode=2; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int fillLog = 0; // Gate variable to be used to allow or not the gesture log to be filled
|
||||
if (currentGesture !=0)
|
||||
{
|
||||
if (logMode == 3) // 3 hides repeated events and hide hold events
|
||||
{
|
||||
if (((currentGesture != 4) && (currentGesture != previousGesture)) || (currentGesture < 3)) fillLog = 1;
|
||||
}
|
||||
else if (logMode == 2) // 2 shows repeated events but hide hold events
|
||||
{
|
||||
if (currentGesture != 4) fillLog = 1;
|
||||
}
|
||||
else if (logMode == 1) // 1 hides repeated events
|
||||
{
|
||||
if (currentGesture != previousGesture) fillLog = 1;
|
||||
}
|
||||
else // 0 shows repeated events
|
||||
{
|
||||
fillLog = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (fillLog) // If one of the conditions from logMode was met, fill the gesture log
|
||||
{
|
||||
previousGesture = currentGesture;
|
||||
gestureColor = GetGestureColor(currentGesture);
|
||||
if (gestureLogIndex <= 0) gestureLogIndex = GESTURE_LOG_SIZE;
|
||||
gestureLogIndex--;
|
||||
|
||||
// Copy the gesture respective name to the gesture log array
|
||||
TextCopy(gestureLog[gestureLogIndex], GetGestureName(currentGesture));
|
||||
}
|
||||
|
||||
// Handle protractor
|
||||
//--------------------------------------------------------------------------------------
|
||||
if (currentGesture > 255) // aka Pinch In and Pinch Out
|
||||
{
|
||||
currentAngleDegrees = currentPitchDegrees;
|
||||
}
|
||||
else if (currentGesture > 15) // aka Swipe Right, Swipe Left, Swipe Up and Swipe Down
|
||||
{
|
||||
currentAngleDegrees = currentDragDegrees;
|
||||
}
|
||||
else if (currentGesture > 0) // aka Tap, Doubletap, Hold and Grab
|
||||
{
|
||||
currentAngleDegrees = 0.0f;
|
||||
}
|
||||
|
||||
float currentAngleRadians = ((currentAngleDegrees +90.0f)*PI/180); // Convert the current angle to Radians
|
||||
finalVector = (Vector2){ (angleLength*sinf(currentAngleRadians)) + protractorPosition.x, (angleLength*cosf(currentAngleRadians)) + protractorPosition.y }; // Calculate the final vector for display
|
||||
|
||||
// Handle touch and mouse pointer points
|
||||
//--------------------------------------------------------------------------------------
|
||||
#define MAX_TOUCH_COUNT 32
|
||||
|
||||
Vector2 touchPosition[MAX_TOUCH_COUNT] = { 0 };
|
||||
Vector2 mousePosition = {0, 0};
|
||||
if (currentGesture != GESTURE_NONE)
|
||||
{
|
||||
if (touchCount != 0)
|
||||
{
|
||||
for (i = 0; i < touchCount; i++) touchPosition[i] = GetTouchPosition(i); // Fill the touch positions
|
||||
}
|
||||
else mousePosition = GetMousePosition();
|
||||
}
|
||||
|
||||
// Draw
|
||||
//--------------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
// Draw common
|
||||
//--------------------------------------------------------------------------------------
|
||||
DrawText("*", messagePosition.x + 5, messagePosition.y + 5, 10, BLACK);
|
||||
DrawText("Example optimized for Web/HTML5\non Smartphones with Touch Screen.", messagePosition.x + 15, messagePosition.y + 5, 10, BLACK);
|
||||
DrawText("*", messagePosition.x + 5, messagePosition.y + 35, 10, BLACK);
|
||||
DrawText("While running on Desktop Web Browsers,\ninspect and turn on Touch Emulation.", messagePosition.x + 15, messagePosition.y + 35, 10, BLACK);
|
||||
|
||||
// Draw last gesture
|
||||
//--------------------------------------------------------------------------------------
|
||||
DrawText("Last gesture", lastGesturePosition.x + 33, lastGesturePosition.y - 47, 20, BLACK);
|
||||
DrawText("Swipe Tap Pinch Touch", lastGesturePosition.x + 17, lastGesturePosition.y - 18, 10, BLACK);
|
||||
DrawRectangle(lastGesturePosition.x + 20, lastGesturePosition.y, 20, 20, lastGesture == GESTURE_SWIPE_UP ? RED : LIGHTGRAY);
|
||||
DrawRectangle(lastGesturePosition.x, lastGesturePosition.y + 20, 20, 20, lastGesture == GESTURE_SWIPE_LEFT ? RED : LIGHTGRAY);
|
||||
DrawRectangle(lastGesturePosition.x + 40, lastGesturePosition.y + 20, 20, 20, lastGesture == GESTURE_SWIPE_RIGHT ? RED : LIGHTGRAY);
|
||||
DrawRectangle(lastGesturePosition.x + 20, lastGesturePosition.y + 40, 20, 20, lastGesture == GESTURE_SWIPE_DOWN ? RED : LIGHTGRAY);
|
||||
DrawCircle(lastGesturePosition.x + 80, lastGesturePosition.y + 16, 10, lastGesture == GESTURE_TAP ? BLUE : LIGHTGRAY);
|
||||
DrawRing( (Vector2){lastGesturePosition.x + 103, lastGesturePosition.y + 16}, 6.0f, 11.0f, 0.0f, 360.0f, 0, lastGesture == GESTURE_DRAG ? LIME : LIGHTGRAY);
|
||||
DrawCircle(lastGesturePosition.x + 80, lastGesturePosition.y + 43, 10, lastGesture == GESTURE_DOUBLETAP ? SKYBLUE : LIGHTGRAY);
|
||||
DrawCircle(lastGesturePosition.x + 103, lastGesturePosition.y + 43, 10, lastGesture == GESTURE_DOUBLETAP ? SKYBLUE : LIGHTGRAY);
|
||||
DrawTriangle((Vector2){ lastGesturePosition.x + 122, lastGesturePosition.y + 16 }, (Vector2){ lastGesturePosition.x + 137, lastGesturePosition.y + 26 }, (Vector2){ lastGesturePosition.x + 137, lastGesturePosition.y + 6 }, lastGesture == GESTURE_PINCH_OUT? ORANGE : LIGHTGRAY);
|
||||
DrawTriangle((Vector2){ lastGesturePosition.x + 147, lastGesturePosition.y + 6 }, (Vector2){ lastGesturePosition.x + 147, lastGesturePosition.y + 26 }, (Vector2){ lastGesturePosition.x + 162, lastGesturePosition.y + 16 }, lastGesture == GESTURE_PINCH_OUT? ORANGE : LIGHTGRAY);
|
||||
DrawTriangle((Vector2){ lastGesturePosition.x + 125, lastGesturePosition.y + 33 }, (Vector2){ lastGesturePosition.x + 125, lastGesturePosition.y + 53 }, (Vector2){ lastGesturePosition.x + 140, lastGesturePosition.y + 43 }, lastGesture == GESTURE_PINCH_IN? VIOLET : LIGHTGRAY);
|
||||
DrawTriangle((Vector2){ lastGesturePosition.x + 144, lastGesturePosition.y + 43 }, (Vector2){ lastGesturePosition.x + 159, lastGesturePosition.y + 53 }, (Vector2){ lastGesturePosition.x + 159, lastGesturePosition.y + 33 }, lastGesture == GESTURE_PINCH_IN? VIOLET : LIGHTGRAY);
|
||||
for (i = 0; i < 4; i++) DrawCircle(lastGesturePosition.x + 180, lastGesturePosition.y + 7 + i*15, 5, touchCount <= i? LIGHTGRAY : gestureColor);
|
||||
|
||||
// Draw gesture log
|
||||
//--------------------------------------------------------------------------------------
|
||||
DrawText("Log", gestureLogPosition.x, gestureLogPosition.y, 20, BLACK);
|
||||
|
||||
// Loop in both directions to print the gesture log array in the inverted order (and looping around if the index started somewhere in the middle)
|
||||
for (i = 0, ii = gestureLogIndex; i < GESTURE_LOG_SIZE; i++, ii = (ii + 1) % GESTURE_LOG_SIZE) DrawText(gestureLog[ii], gestureLogPosition.x, gestureLogPosition.y + 410 - i*20, 20, (i == 0 ? gestureColor : LIGHTGRAY));
|
||||
Color logButton1Color, logButton2Color;
|
||||
switch (logMode)
|
||||
{
|
||||
case 3: logButton1Color=MAROON; logButton2Color=MAROON; break;
|
||||
case 2: logButton1Color=GRAY; logButton2Color=MAROON; break;
|
||||
case 1: logButton1Color=MAROON; logButton2Color=GRAY; break;
|
||||
default: logButton1Color=GRAY; logButton2Color=GRAY; break;
|
||||
}
|
||||
DrawRectangleRec(logButton1, logButton1Color);
|
||||
DrawText("Hide", logButton1.x + 7, logButton1.y + 3, 10, WHITE);
|
||||
DrawText("Repeat", logButton1.x + 7, logButton1.y + 13, 10, WHITE);
|
||||
DrawRectangleRec(logButton2, logButton2Color);
|
||||
DrawText("Hide", logButton1.x + 62, logButton1.y + 3, 10, WHITE);
|
||||
DrawText("Hold", logButton1.x + 62, logButton1.y + 13, 10, WHITE);
|
||||
|
||||
// Draw protractor
|
||||
//--------------------------------------------------------------------------------------
|
||||
DrawText("Angle", protractorPosition.x + 55, protractorPosition.y + 76, 10, BLACK);
|
||||
const char *angleString = TextFormat("%f", currentAngleDegrees);
|
||||
const int angleStringDot = TextFindIndex(angleString, ".");
|
||||
const char *angleStringTrim = TextSubtext(angleString, 0, angleStringDot + 3);
|
||||
DrawText( angleStringTrim, protractorPosition.x + 55, protractorPosition.y + 92, 20, gestureColor);
|
||||
DrawCircle(protractorPosition.x, protractorPosition.y, 80.0f, WHITE);
|
||||
DrawLineEx((Vector2){ protractorPosition.x - 90, protractorPosition.y }, (Vector2){ protractorPosition.x + 90, protractorPosition.y }, 3.0f, LIGHTGRAY);
|
||||
DrawLineEx((Vector2){ protractorPosition.x, protractorPosition.y - 90 }, (Vector2){ protractorPosition.x, protractorPosition.y + 90 }, 3.0f, LIGHTGRAY);
|
||||
DrawLineEx((Vector2){ protractorPosition.x - 80, protractorPosition.y - 45 }, (Vector2){ protractorPosition.x + 80, protractorPosition.y + 45 }, 3.0f, GREEN);
|
||||
DrawLineEx((Vector2){ protractorPosition.x - 80, protractorPosition.y + 45 }, (Vector2){ protractorPosition.x + 80, protractorPosition.y - 45 }, 3.0f, GREEN);
|
||||
DrawText("0", protractorPosition.x + 96, protractorPosition.y - 9, 20, BLACK);
|
||||
DrawText("30", protractorPosition.x + 74, protractorPosition.y - 68, 20, BLACK);
|
||||
DrawText("90", protractorPosition.x - 11, protractorPosition.y - 110, 20, BLACK);
|
||||
DrawText("150", protractorPosition.x - 100, protractorPosition.y - 68, 20, BLACK);
|
||||
DrawText("180", protractorPosition.x - 124, protractorPosition.y - 9, 20, BLACK);
|
||||
DrawText("210", protractorPosition.x - 100, protractorPosition.y + 50, 20, BLACK);
|
||||
DrawText("270", protractorPosition.x - 18, protractorPosition.y + 92, 20, BLACK);
|
||||
DrawText("330", protractorPosition.x + 72, protractorPosition.y + 50, 20, BLACK);
|
||||
if (currentAngleDegrees != 0.0f) DrawLineEx(protractorPosition, finalVector, 3.0f, gestureColor);
|
||||
|
||||
// Draw touch and mouse pointer points
|
||||
//--------------------------------------------------------------------------------------
|
||||
if (currentGesture != GESTURE_NONE)
|
||||
{
|
||||
if ( touchCount != 0 )
|
||||
{
|
||||
for (i = 0; i < touchCount; i++)
|
||||
{
|
||||
DrawCircleV(touchPosition[i], 50.0f, Fade(gestureColor, 0.5f));
|
||||
DrawCircleV(touchPosition[i], 5.0f, gestureColor);
|
||||
}
|
||||
|
||||
if (touchCount == 2) DrawLineEx(touchPosition[0], touchPosition[1], ((currentGesture == 512)? 8 : 12), gestureColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawCircleV(mousePosition, 35.0f, Fade(gestureColor, 0.5f));
|
||||
DrawCircleV(mousePosition, 5.0f, gestureColor);
|
||||
}
|
||||
}
|
||||
|
||||
EndDrawing();
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - input gestures web");
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
//--------------------------------------------------------------------------------------
|
||||
#if defined(PLATFORM_WEB)
|
||||
emscripten_set_main_loop(Update, 0, 1);
|
||||
#else
|
||||
SetTargetFPS(60);
|
||||
while (!WindowShouldClose()) Update(); // Detect window close button or ESC key
|
||||
#endif
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
BIN
examples/core/core_input_gestures_web.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
@ -36,7 +36,7 @@ int main(void)
|
|||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
boxPositionY -= (GetMouseWheelMove()*scrollSpeed);
|
||||
boxPositionY -= (int)(GetMouseWheelMove()*scrollSpeed);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2019-2022 Berni (@Berni8k) and Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2019-2024 Berni (@Berni8k) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
@ -39,8 +39,12 @@ int main(void)
|
|||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
// Get multiple touchpoints
|
||||
for (int i = 0; i < MAX_TOUCH_POINTS; ++i) touchPositions[i] = GetTouchPosition(i);
|
||||
// Get the touch point count ( how many fingers are touching the screen )
|
||||
int tCount = GetTouchPointCount();
|
||||
// Clamp touch points available ( set the maximum touch points allowed )
|
||||
if(tCount > MAX_TOUCH_POINTS) tCount = MAX_TOUCH_POINTS;
|
||||
// Get touch points positions
|
||||
for (int i = 0; i < tCount; ++i) touchPositions[i] = GetTouchPosition(i);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
|
@ -49,7 +53,7 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
for (int i = 0; i < MAX_TOUCH_POINTS; ++i)
|
||||
for (int i = 0; i < tCount; ++i)
|
||||
{
|
||||
// Make sure point is not (0, 0) as this means there is no touch for it
|
||||
if ((touchPositions[i].x > 0) && (touchPositions[i].y > 0))
|
||||
|
@ -72,4 +76,4 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
123
examples/core/core_input_virtual_controls.c
Normal file
|
@ -0,0 +1,123 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - input virtual controls
|
||||
*
|
||||
* Example originally created with raylib 5.0, last time updated with raylib 5.0
|
||||
*
|
||||
* Example create by GreenSnakeLinux (@GreenSnakeLinux),
|
||||
* lighter by oblerion (@oblerion) and
|
||||
* reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
#include <math.h>
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - input virtual controls");
|
||||
|
||||
const float dpadX = 90;
|
||||
const float dpadY = 300;
|
||||
const float dpadRad = 25.0f;//radius of each pad
|
||||
Color dpadColor = BLUE;
|
||||
int dpadKeydown = -1;//-1 if not down, else 0,1,2,3
|
||||
|
||||
|
||||
const float dpadCollider[4][2]= // collider array with x,y position
|
||||
{
|
||||
{dpadX,dpadY-dpadRad*1.5f},//up
|
||||
{dpadX-dpadRad*1.5f,dpadY},//left
|
||||
{dpadX+dpadRad*1.5f,dpadY},//right
|
||||
{dpadX,dpadY+dpadRad*1.5f}//down
|
||||
};
|
||||
const char dpadLabel[4]="XYBA";//label of Dpad
|
||||
|
||||
float playerX=100;
|
||||
float playerY=100;
|
||||
|
||||
SetTargetFPS(60);
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//--------------------------------------------------------------------------
|
||||
dpadKeydown = -1; //reset
|
||||
int inputX = 0;
|
||||
int inputY = 0;
|
||||
if(GetTouchPointCount()>0)
|
||||
{//use touch pos
|
||||
inputX = GetTouchX();
|
||||
inputY = GetTouchY();
|
||||
}
|
||||
else
|
||||
{//use mouse pos
|
||||
inputX = GetMouseX();
|
||||
inputY = GetMouseY();
|
||||
}
|
||||
for(int i=0;i<4;i++)
|
||||
{
|
||||
//test distance each collider and input < radius
|
||||
if( fabsf(dpadCollider[i][1]-inputY) + fabsf(dpadCollider[i][0]-inputX) < dpadRad)
|
||||
{
|
||||
dpadKeydown = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// move player
|
||||
switch(dpadKeydown){
|
||||
case 0: playerY -= 50*GetFrameTime();
|
||||
break;
|
||||
case 1: playerX -= 50*GetFrameTime();
|
||||
break;
|
||||
case 2: playerX += 50*GetFrameTime();
|
||||
break;
|
||||
case 3: playerY += 50*GetFrameTime();
|
||||
default:;
|
||||
};
|
||||
//--------------------------------------------------------------------------
|
||||
// Draw
|
||||
//--------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE);
|
||||
for(int i=0;i<4;i++)
|
||||
{
|
||||
//draw all pad
|
||||
DrawCircleV((Vector2) { dpadCollider[i][0], dpadCollider[i][1] }, dpadRad, dpadColor);
|
||||
if(i!=dpadKeydown)
|
||||
{
|
||||
//draw label
|
||||
DrawText(TextSubtext(dpadLabel,i,1),
|
||||
(int)dpadCollider[i][0]-7,
|
||||
(int)dpadCollider[i][1]-8,20,BLACK);
|
||||
}
|
||||
}
|
||||
|
||||
DrawRectangleRec((Rectangle) { playerX - 4, playerY - 4, 75, 28 }, RED);
|
||||
DrawText("Player", (int)playerX, (int)playerY, 20, WHITE);
|
||||
EndDrawing();
|
||||
//--------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
BIN
examples/core/core_input_virtual_controls.png
Normal file
After Width: | Height: | Size: 8.9 KiB |
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [cpre] example - loading thread
|
||||
* raylib [core] example - loading thread
|
||||
*
|
||||
* NOTE: This example requires linking with pthreads library on MinGW,
|
||||
* it can be accomplished passing -static parameter to compiler
|
||||
|
@ -9,12 +9,13 @@
|
|||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
*
|
||||
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
// WARNING: This example does not build on Windows with MSVC compiler
|
||||
#include "pthread.h" // POSIX style threads management
|
||||
|
||||
#include <stdatomic.h> // C11 atomic data types
|
||||
|
@ -23,10 +24,10 @@
|
|||
|
||||
// Using C11 atomics for synchronization
|
||||
// NOTE: A plain bool (or any plain data type for that matter) can't be used for inter-thread synchronization
|
||||
static atomic_bool dataLoaded = ATOMIC_VAR_INIT(false); // Data Loaded completion indicator
|
||||
static atomic_bool dataLoaded = false; // Data Loaded completion indicator
|
||||
static void *LoadDataThread(void *arg); // Loading data thread function declaration
|
||||
|
||||
static int dataProgress = 0; // Data progress accumulator
|
||||
static atomic_int dataProgress = 0; // Data progress accumulator
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
|
@ -40,7 +41,7 @@ int main(void)
|
|||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - loading thread");
|
||||
|
||||
pthread_t threadId; // Loading data thread id
|
||||
pthread_t threadId = { 0 }; // Loading data thread id
|
||||
|
||||
enum { STATE_WAITING, STATE_LOADING, STATE_FINISHED } state = STATE_WAITING;
|
||||
int framesCounter = 0;
|
||||
|
@ -69,9 +70,13 @@ int main(void)
|
|||
case STATE_LOADING:
|
||||
{
|
||||
framesCounter++;
|
||||
if (atomic_load(&dataLoaded))
|
||||
if (atomic_load_explicit(&dataLoaded, memory_order_relaxed))
|
||||
{
|
||||
framesCounter = 0;
|
||||
int error = pthread_join(threadId, NULL);
|
||||
if (error != 0) TraceLog(LOG_ERROR, "Error joining loading thread");
|
||||
else TraceLog(LOG_INFO, "Loading thread terminated successfully");
|
||||
|
||||
state = STATE_FINISHED;
|
||||
}
|
||||
} break;
|
||||
|
@ -80,8 +85,8 @@ int main(void)
|
|||
if (IsKeyPressed(KEY_ENTER))
|
||||
{
|
||||
// Reset everything to launch again
|
||||
atomic_store(&dataLoaded, false);
|
||||
dataProgress = 0;
|
||||
atomic_store_explicit(&dataLoaded, false, memory_order_relaxed);
|
||||
atomic_store_explicit(&dataProgress, 0, memory_order_relaxed);
|
||||
state = STATE_WAITING;
|
||||
}
|
||||
} break;
|
||||
|
@ -100,7 +105,7 @@ int main(void)
|
|||
case STATE_WAITING: DrawText("PRESS ENTER to START LOADING DATA", 150, 170, 20, DARKGRAY); break;
|
||||
case STATE_LOADING:
|
||||
{
|
||||
DrawRectangle(150, 200, dataProgress, 60, SKYBLUE);
|
||||
DrawRectangle(150, 200, atomic_load_explicit(&dataProgress, memory_order_relaxed), 60, SKYBLUE);
|
||||
if ((framesCounter/15)%2) DrawText("LOADING DATA...", 240, 210, 40, DARKBLUE);
|
||||
|
||||
} break;
|
||||
|
@ -141,11 +146,11 @@ static void *LoadDataThread(void *arg)
|
|||
|
||||
// We accumulate time over a global variable to be used in
|
||||
// main thread as a progress bar
|
||||
dataProgress = timeCounter/10;
|
||||
atomic_store_explicit(&dataProgress, timeCounter/10, memory_order_relaxed);
|
||||
}
|
||||
|
||||
// When data has finished loading, we set global variable
|
||||
atomic_store(&dataLoaded, true);
|
||||
atomic_store_explicit(&dataLoaded, true, memory_order_relaxed);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
176
examples/core/core_random_sequence.c
Normal file
|
@ -0,0 +1,176 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - Generates a random sequence
|
||||
*
|
||||
* Example originally created with raylib 5.0, last time updated with raylib 5.0
|
||||
*
|
||||
* Example contributed by Dalton Overmyer (@REDl3east) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2023 Dalton Overmyer (@REDl3east)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
#include "raymath.h"
|
||||
|
||||
#include <stdlib.h> // Required for: malloc() and free()
|
||||
|
||||
typedef struct ColorRect{
|
||||
Color c;
|
||||
Rectangle r;
|
||||
} ColorRect;
|
||||
|
||||
static Color GenerateRandomColor();
|
||||
static ColorRect* GenerateRandomColorRectSequence(float rectCount, float rectWidth, float screenWidth, float screenHeight);
|
||||
static void ShuffleColorRectSequence(ColorRect* rectangles, int rectCount);
|
||||
static void DrawTextCenterKeyHelp(const char* key, const char* text, int posX, int posY, int fontSize, Color color);
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void) {
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - Generates a random sequence");
|
||||
|
||||
int rectCount = 20;
|
||||
float rectSize = (float)screenWidth/rectCount;
|
||||
ColorRect* rectangles = GenerateRandomColorRectSequence((float)rectCount, rectSize, (float)screenWidth, 0.75f * screenHeight);
|
||||
|
||||
SetTargetFPS(60);
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
if(IsKeyPressed(KEY_SPACE))
|
||||
{
|
||||
ShuffleColorRectSequence(rectangles, rectCount);
|
||||
}
|
||||
|
||||
if(IsKeyPressed(KEY_UP))
|
||||
{
|
||||
rectCount++;
|
||||
rectSize = (float)screenWidth/rectCount;
|
||||
free(rectangles);
|
||||
rectangles = GenerateRandomColorRectSequence((float)rectCount, rectSize, (float)screenWidth, 0.75f * screenHeight);
|
||||
}
|
||||
|
||||
if(IsKeyPressed(KEY_DOWN))
|
||||
{
|
||||
if(rectCount >= 4){
|
||||
rectCount--;
|
||||
rectSize = (float)screenWidth/rectCount;
|
||||
free(rectangles);
|
||||
rectangles = GenerateRandomColorRectSequence((float)rectCount, rectSize, (float)screenWidth, 0.75f * screenHeight);
|
||||
}
|
||||
}
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
int fontSize = 20;
|
||||
for(int x=0;x<rectCount;x++)
|
||||
{
|
||||
DrawRectangleRec(rectangles[x].r, rectangles[x].c);
|
||||
DrawTextCenterKeyHelp("SPACE", "to shuffle the sequence.", 10, screenHeight - 96, fontSize, BLACK);
|
||||
DrawTextCenterKeyHelp("UP", "to add a rectangle and generate a new sequence.", 10, screenHeight - 64, fontSize, BLACK);
|
||||
DrawTextCenterKeyHelp("DOWN", "to remove a rectangle and generate a new sequence.", 10, screenHeight - 32, fontSize, BLACK);
|
||||
}
|
||||
|
||||
const char* rectCountText = TextFormat("%d rectangles", rectCount);
|
||||
int rectCountTextSize = MeasureText(rectCountText, fontSize);
|
||||
DrawText(rectCountText, screenWidth - rectCountTextSize - 10, 10, fontSize, BLACK);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
free(rectangles);
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Color GenerateRandomColor()
|
||||
{
|
||||
return CLITERAL(Color){
|
||||
GetRandomValue(0, 255),
|
||||
GetRandomValue(0, 255),
|
||||
GetRandomValue(0, 255),
|
||||
255,
|
||||
};
|
||||
}
|
||||
|
||||
static ColorRect* GenerateRandomColorRectSequence(float rectCount, float rectWidth, float screenWidth, float screenHeight){
|
||||
int *seq = LoadRandomSequence((unsigned int)rectCount, 0, (unsigned int)rectCount-1);
|
||||
ColorRect* rectangles = (ColorRect *)malloc((int)rectCount*sizeof(ColorRect));
|
||||
|
||||
float rectSeqWidth = rectCount * rectWidth;
|
||||
float startX = (screenWidth - rectSeqWidth) * 0.5f;
|
||||
|
||||
for(int x=0;x<rectCount;x++){
|
||||
int rectHeight = (int)Remap((float)seq[x], 0, rectCount-1, 0, screenHeight);
|
||||
rectangles[x].c = GenerateRandomColor();
|
||||
rectangles[x].r = CLITERAL(Rectangle){
|
||||
startX + x * rectWidth, screenHeight - rectHeight, rectWidth, (float)rectHeight
|
||||
};
|
||||
}
|
||||
UnloadRandomSequence(seq);
|
||||
return rectangles;
|
||||
}
|
||||
|
||||
static void ShuffleColorRectSequence(ColorRect* rectangles, int rectCount)
|
||||
{
|
||||
int *seq = LoadRandomSequence(rectCount, 0, rectCount-1);
|
||||
for(int i1=0;i1<rectCount;i1++){
|
||||
ColorRect* r1 = &rectangles[i1];
|
||||
ColorRect* r2 = &rectangles[seq[i1]];
|
||||
|
||||
// swap only the color and height
|
||||
ColorRect tmp = *r1;
|
||||
r1->c = r2->c;
|
||||
r1->r.height = r2->r.height;
|
||||
r1->r.y = r2->r.y;
|
||||
r2->c = tmp.c;
|
||||
r2->r.height = tmp.r.height;
|
||||
r2->r.y = tmp.r.y;
|
||||
|
||||
}
|
||||
UnloadRandomSequence(seq);
|
||||
}
|
||||
|
||||
static void DrawTextCenterKeyHelp(const char* key, const char* text, int posX, int posY, int fontSize, Color color)
|
||||
{
|
||||
int spaceSize = MeasureText(" ", fontSize);
|
||||
int pressSize = MeasureText("Press", fontSize);
|
||||
int keySize = MeasureText(key, fontSize);
|
||||
int textSize = MeasureText(text, fontSize);
|
||||
int totalSize = pressSize + 2 * spaceSize + keySize + 2 * spaceSize + textSize;
|
||||
int textSizeCurrent = 0;
|
||||
|
||||
DrawText("Press", posX, posY, fontSize, color);
|
||||
textSizeCurrent += pressSize + 2 * spaceSize;
|
||||
DrawText(key, posX + textSizeCurrent, posY, fontSize, RED);
|
||||
DrawRectangle(posX + textSizeCurrent, posY + fontSize, keySize, 3, RED);
|
||||
textSizeCurrent += keySize + 2 * spaceSize;
|
||||
DrawText(text, posX + textSizeCurrent, posY, fontSize, color);
|
||||
}
|
BIN
examples/core/core_random_sequence.png
Normal file
After Width: | Height: | Size: 33 KiB |
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
@ -29,7 +29,7 @@ int main(void)
|
|||
|
||||
int randValue = GetRandomValue(-8, 5); // Get a random integer number between -8 and 5 (both included)
|
||||
|
||||
int framesCounter = 0; // Variable used to count frames
|
||||
unsigned int framesCounter = 0; // Variable used to count frames
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2019-2022 Chris Dill (@MysteriousSpace)
|
||||
* Copyright (c) 2019-2024 Chris Dill (@MysteriousSpace)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - smooth pixel-perfect camera
|
||||
* raylib [core] example - Smooth Pixel-perfect camera
|
||||
*
|
||||
* Example originally created with raylib 3.7, last time updated with raylib 4.0
|
||||
*
|
||||
|
@ -10,7 +10,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2021-2022 Giancamillo Alessandroni (@NotManyIdeasDev) and Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2021-2024 Giancamillo Alessandroni (@NotManyIdeasDev) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
@ -69,18 +69,18 @@ int main(void)
|
|||
rotation += 60.0f*GetFrameTime(); // Rotate the rectangles, 60 degrees per second
|
||||
|
||||
// Make the camera move to demonstrate the effect
|
||||
cameraX = (sinf(GetTime())*50.0f) - 10.0f;
|
||||
cameraY = cosf(GetTime())*30.0f;
|
||||
cameraX = (sinf((float)GetTime())*50.0f) - 10.0f;
|
||||
cameraY = cosf((float)GetTime())*30.0f;
|
||||
|
||||
// Set the camera's target to the values computed above
|
||||
screenSpaceCamera.target = (Vector2){ cameraX, cameraY };
|
||||
|
||||
// Round worldSpace coordinates, keep decimals into screenSpace coordinates
|
||||
worldSpaceCamera.target.x = (int)screenSpaceCamera.target.x;
|
||||
worldSpaceCamera.target.x = truncf(screenSpaceCamera.target.x);
|
||||
screenSpaceCamera.target.x -= worldSpaceCamera.target.x;
|
||||
screenSpaceCamera.target.x *= virtualRatio;
|
||||
|
||||
worldSpaceCamera.target.y = (int)screenSpaceCamera.target.y;
|
||||
worldSpaceCamera.target.y = truncf(screenSpaceCamera.target.y);
|
||||
screenSpaceCamera.target.y -= worldSpaceCamera.target.y;
|
||||
screenSpaceCamera.target.y *= virtualRatio;
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
Before Width: | Height: | Size: 21 KiB |
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
@ -104,7 +104,7 @@ int main(void)
|
|||
bool SaveStorageValue(unsigned int position, int value)
|
||||
{
|
||||
bool success = false;
|
||||
unsigned int dataSize = 0;
|
||||
int dataSize = 0;
|
||||
unsigned int newDataSize = 0;
|
||||
unsigned char *fileData = LoadFileData(STORAGE_DATA_FILE, &dataSize);
|
||||
unsigned char *newFileData = NULL;
|
||||
|
@ -172,12 +172,12 @@ bool SaveStorageValue(unsigned int position, int value)
|
|||
int LoadStorageValue(unsigned int position)
|
||||
{
|
||||
int value = 0;
|
||||
unsigned int dataSize = 0;
|
||||
int dataSize = 0;
|
||||
unsigned char *fileData = LoadFileData(STORAGE_DATA_FILE, &dataSize);
|
||||
|
||||
if (fileData != NULL)
|
||||
{
|
||||
if (dataSize < (position*4)) TraceLog(LOG_WARNING, "FILEIO: [%s] Failed to find storage position: %i", STORAGE_DATA_FILE, position);
|
||||
if (dataSize < ((int)(position*4))) TraceLog(LOG_WARNING, "FILEIO: [%s] Failed to find storage position: %i", STORAGE_DATA_FILE, position);
|
||||
else
|
||||
{
|
||||
int *dataPtr = (int *)fileData;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2017-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2017-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
|||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#else // PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
|
@ -39,7 +39,6 @@ int main(void)
|
|||
.vResolution = 1200, // Vertical resolution in pixels
|
||||
.hScreenSize = 0.133793f, // Horizontal size in meters
|
||||
.vScreenSize = 0.0669f, // Vertical size in meters
|
||||
.vScreenCenter = 0.04678f, // Screen center in meters
|
||||
.eyeToScreenDistance = 0.041f, // Distance between eye and display in meters
|
||||
.lensSeparationDistance = 0.07f, // Lens separation distance in meters
|
||||
.interpupillaryDistance = 0.07f, // IPD (distance between pupils) in meters
|
||||
|
@ -95,13 +94,13 @@ int main(void)
|
|||
camera.target = (Vector3){ 0.0f, 2.0f, 0.0f }; // Camera looking at point
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector
|
||||
camera.fovy = 60.0f; // Camera field-of-view Y
|
||||
camera.projection = CAMERA_PERSPECTIVE; // Camera type
|
||||
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
|
||||
|
||||
Vector3 cubePosition = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
SetCameraMode(camera, CAMERA_FIRST_PERSON); // Set first person camera mode
|
||||
DisableCursor(); // Limit cursor to relative movement inside the window
|
||||
|
||||
SetTargetFPS(90); // Set our game to run at 90 frames-per-second
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
|
@ -109,7 +108,7 @@ int main(void)
|
|||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera);
|
||||
UpdateCamera(&camera, CAMERA_FIRST_PERSON);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2020-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2020-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2019-2022 Anata (@anatagawa) and Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2019-2024 Anata (@anatagawa) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2013-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
@ -23,20 +23,20 @@ int main(void)
|
|||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - 3d camera free");
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - core world screen");
|
||||
|
||||
// Define the camera to look into our 3d world
|
||||
Camera camera = { 0 };
|
||||
camera.position = (Vector3){ 10.0f, 10.0f, 10.0f };
|
||||
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f };
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };
|
||||
camera.fovy = 45.0f;
|
||||
camera.projection = CAMERA_PERSPECTIVE;
|
||||
camera.position = (Vector3){ 10.0f, 10.0f, 10.0f }; // Camera position
|
||||
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f }; // Camera looking at point
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
|
||||
camera.fovy = 45.0f; // Camera field-of-view Y
|
||||
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
|
||||
|
||||
Vector3 cubePosition = { 0.0f, 0.0f, 0.0f };
|
||||
Vector2 cubeScreenPosition = { 0.0f, 0.0f };
|
||||
|
||||
SetCameraMode(camera, CAMERA_FREE); // Set a free camera mode
|
||||
DisableCursor(); // Limit cursor to relative movement inside the window
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
@ -46,7 +46,7 @@ int main(void)
|
|||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera);
|
||||
UpdateCamera(&camera, CAMERA_THIRD_PERSON);
|
||||
|
||||
// Calculate cube screen space position (with a little offset to be in top)
|
||||
cubeScreenPosition = GetWorldToScreen((Vector3){cubePosition.x, cubePosition.y + 2.5f, cubePosition.z}, camera);
|
||||
|
@ -68,7 +68,9 @@ int main(void)
|
|||
EndMode3D();
|
||||
|
||||
DrawText("Enemy: 100 / 100", (int)cubeScreenPosition.x - MeasureText("Enemy: 100/100", 20)/2, (int)cubeScreenPosition.y, 20, BLACK);
|
||||
DrawText("Text is always on top of the cube", (screenWidth - MeasureText("Text is always on top of the cube", 20))/2, 25, 20, GRAY);
|
||||
|
||||
DrawText(TextFormat("Cube position in screen space coordinates: [%i, %i]", (int)cubeScreenPosition.x, (int)cubeScreenPosition.y), 10, 10, 20, LIME);
|
||||
DrawText("Text 2d should be always on top of the cube", 10, 40, 20, GRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
27
examples/examples.rc
Normal file
|
@ -0,0 +1,27 @@
|
|||
GLFW_ICON ICON "raylib.ico"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 1,0,0,0
|
||||
PRODUCTVERSION 1,0,0,0
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
//BLOCK "080904E4" // English UK
|
||||
BLOCK "040904E4" // English US
|
||||
BEGIN
|
||||
VALUE "CompanyName", "raylib technologies"
|
||||
VALUE "FileDescription", "raylib example"
|
||||
VALUE "FileVersion", "1.0"
|
||||
VALUE "InternalName", "raylib-example"
|
||||
VALUE "LegalCopyright", "(c) 2024 raylib technologies (@raylibtech)"
|
||||
//VALUE "OriginalFilename", "raylib_app.exe"
|
||||
VALUE "ProductName", "raylib-example"
|
||||
VALUE "ProductVersion", "1.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
//VALUE "Translation", 0x809, 1252 // English UK
|
||||
VALUE "Translation", 0x409, 1252 // English US
|
||||
END
|
||||
END
|