Compare commits
1339 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e25e380e80 | ||
![]() |
1320d9e303 | ||
![]() |
e4477472f3 | ||
![]() |
60ffc9f59b | ||
![]() |
79435bf34e | ||
![]() |
ef5667c078 | ||
![]() |
b6557166f2 | ||
![]() |
a7599b83a5 | ||
![]() |
047747a4cc | ||
![]() |
e8ea105b3d | ||
![]() |
1caa31396e | ||
![]() |
b973c2f08e | ||
![]() |
e0c1f25116 | ||
![]() |
d38e01d186 | ||
![]() |
ea0f6c7a26 | ||
![]() |
b93c4b0c20 | ||
![]() |
ec3845fa9f | ||
![]() |
3e041a27b1 | ||
![]() |
5ffce8f230 | ||
![]() |
8073c5ec93 | ||
![]() |
13a288d13a | ||
![]() |
5662403488 | ||
![]() |
b68e522ffc | ||
![]() |
bab1b9c1c5 | ||
![]() |
d9a9bacb48 | ||
![]() |
10a57f297e | ||
![]() |
60a3746a80 | ||
![]() |
002258aa57 | ||
![]() |
c59ea67b97 | ||
![]() |
7e459dc38b | ||
![]() |
f8a2903cec | ||
![]() |
ef46003270 | ||
![]() |
1df89039ad | ||
![]() |
0a9e080998 | ||
![]() |
547960ca71 | ||
![]() |
59949bf848 | ||
![]() |
28b3571517 | ||
![]() |
aa38532cc3 | ||
![]() |
9216e96315 | ||
![]() |
0da827d754 | ||
![]() |
871c3d87b4 | ||
![]() |
b78ee13791 | ||
![]() |
2bdb45f280 | ||
![]() |
668b3e4cfb | ||
![]() |
51e75be9d1 | ||
![]() |
976932e05e | ||
![]() |
d82113ec34 | ||
![]() |
9097d0b4ef | ||
![]() |
f30354fc35 | ||
![]() |
d2d72b1dfb | ||
![]() |
cbf7369a3d | ||
![]() |
2374281204 | ||
![]() |
015e715278 | ||
![]() |
e404a18226 | ||
![]() |
51e8f37688 | ||
![]() |
c36a6f3d9f | ||
![]() |
e07bc372a1 | ||
![]() |
5dd142beb6 | ||
![]() |
96542269d0 | ||
![]() |
893a64712e | ||
![]() |
0987507ef5 | ||
![]() |
ef0dcaabf9 | ||
![]() |
f5b4656801 | ||
![]() |
5f690819e7 | ||
![]() |
e69f2f0c26 | ||
![]() |
d360a49f36 | ||
![]() |
cd3eb3d8bd | ||
![]() |
7a0e73331d | ||
![]() |
a840d8a77d | ||
![]() |
3ec8ac52f8 | ||
![]() |
6e79476650 | ||
![]() |
11ebb54674 | ||
![]() |
a798fd401f | ||
![]() |
342d4faf14 | ||
![]() |
e6ae4879f6 | ||
![]() |
459c4754dc | ||
![]() |
039503e7c2 | ||
![]() |
03df593263 | ||
![]() |
62406259d7 | ||
![]() |
dd45d0ed64 | ||
![]() |
c4aee2d09a | ||
![]() |
7955381fb3 | ||
![]() |
7e9028ae08 | ||
![]() |
1c9726fd8c | ||
![]() |
d1119816d7 | ||
![]() |
0540f0ad32 | ||
![]() |
84ab00d52e | ||
![]() |
63d33d7a7a | ||
![]() |
679a26a195 | ||
![]() |
60928ec82c | ||
![]() |
0481053dad | ||
![]() |
59be7b9c29 | ||
![]() |
83916bd3c2 | ||
![]() |
23ed67cce0 | ||
![]() |
df249f5513 | ||
![]() |
d43268b317 | ||
![]() |
0322fc28d4 | ||
![]() |
ed0fda2b40 | ||
![]() |
d6f4f3ee88 | ||
![]() |
14c1ee2681 | ||
![]() |
28213c2a20 | ||
![]() |
687dd34c38 | ||
![]() |
3d1ae3500c | ||
![]() |
468a0bedd8 | ||
![]() |
a560fe9a1e | ||
![]() |
11da1714d5 | ||
![]() |
8e48268310 | ||
![]() |
bb9d734f69 | ||
![]() |
36dc302c25 | ||
![]() |
9bb4d84577 | ||
![]() |
4eae76302f | ||
![]() |
4a7ab0ae24 | ||
![]() |
7564097d5e | ||
![]() |
7f6cd93d62 | ||
![]() |
72e51cd6de | ||
![]() |
700bff5fd8 | ||
![]() |
9471794449 | ||
![]() |
a54d9f734b | ||
![]() |
94dd2f81e9 | ||
![]() |
f448542dd2 | ||
![]() |
4d5ee7953c | ||
![]() |
cb517d0050 | ||
![]() |
a3d33d9222 | ||
![]() |
82d61a5875 | ||
![]() |
66f9fbaa88 | ||
![]() |
321f55bce1 | ||
![]() |
8ff2b387f9 | ||
![]() |
bd287efa4c | ||
![]() |
9b2b660f91 | ||
![]() |
55dc8171f8 | ||
![]() |
c222e231f0 | ||
![]() |
3e1cd487df | ||
![]() |
f46514b855 | ||
![]() |
05ab39ed9f | ||
![]() |
5ac9cb04c2 | ||
![]() |
01d9af12f7 | ||
![]() |
8e15dae5ed | ||
![]() |
5f79ad9765 | ||
![]() |
fc1fc250e7 | ||
![]() |
8327857488 | ||
![]() |
fbc51e822b | ||
![]() |
8a16348131 | ||
![]() |
60d874caf8 | ||
![]() |
37e2d993e7 | ||
![]() |
2bcd3a6df5 | ||
![]() |
d99ac093d4 | ||
![]() |
d9e591f235 | ||
![]() |
482b8a5e7e | ||
![]() |
88dbaae3be | ||
![]() |
e820aae80b | ||
![]() |
f12db180cd | ||
![]() |
9833fe45eb | ||
![]() |
eb3e9e4df5 | ||
![]() |
5df08daa3f | ||
![]() |
3c9f7263e5 | ||
![]() |
fa357b8d5d | ||
![]() |
c62c4df749 | ||
![]() |
6ebf6b4e72 | ||
![]() |
41192c6d4a | ||
![]() |
b29311c7ca | ||
![]() |
a4ea9f872f | ||
![]() |
a8685ee4fd | ||
![]() |
7e62d973f9 | ||
![]() |
0c29ca8166 | ||
![]() |
a850246030 | ||
![]() |
446f9fff00 | ||
![]() |
4bcddc3b15 | ||
![]() |
e90b4d8915 | ||
![]() |
c2e56f2604 | ||
![]() |
b9053eebe7 | ||
![]() |
eef82b04ac | ||
![]() |
fe8bf2fa55 | ||
![]() |
b9ece86ffd | ||
![]() |
bd512764ff | ||
![]() |
4a97a5c63a | ||
![]() |
032b2db398 | ||
![]() |
59bbba19a7 | ||
![]() |
c05dbb4581 | ||
![]() |
8d41683917 | ||
![]() |
789c5fbdf9 | ||
![]() |
4a242c2889 | ||
![]() |
b5d50ee51a | ||
![]() |
79d63e6ca1 | ||
![]() |
55204dae03 | ||
![]() |
152665ff48 | ||
![]() |
b7867fb10d | ||
![]() |
ccda320be4 | ||
![]() |
6038c8fdd5 | ||
![]() |
04406c0f1a | ||
![]() |
cdc8850e68 | ||
![]() |
fa2c114636 | ||
![]() |
6da3c1e7c3 | ||
![]() |
cbdb9bfe42 | ||
![]() |
b870b9f828 | ||
![]() |
90befff4b8 | ||
![]() |
11fbd49b73 | ||
![]() |
43d82c1f21 | ||
![]() |
c5c156d65e | ||
![]() |
2d96196d25 | ||
![]() |
405d3fac0c | ||
![]() |
0983d7b45c | ||
![]() |
8cf0be4b6c | ||
![]() |
5073619962 | ||
![]() |
43b9113c0c | ||
![]() |
d7853127db | ||
![]() |
ddba31d423 | ||
![]() |
c196b09d33 | ||
![]() |
db652daf42 | ||
![]() |
88c5deac87 | ||
![]() |
250a0e3592 | ||
![]() |
63b739bbfa | ||
![]() |
dace2172d1 | ||
![]() |
5b60a743bd | ||
![]() |
768b29dd74 | ||
![]() |
cb8cbb038b | ||
![]() |
f1ed8be5d7 | ||
![]() |
85d5744679 | ||
![]() |
311aa0ab58 | ||
![]() |
6120ec9437 | ||
![]() |
4bc918fb9f | ||
![]() |
17b01e3b7a | ||
![]() |
900a28c165 | ||
![]() |
9781e1ca8f | ||
![]() |
796f61d447 | ||
![]() |
76ceb1daaa | ||
![]() |
ed6d27f495 | ||
![]() |
1134024985 | ||
![]() |
05cdaf7d01 | ||
![]() |
a1422ba1c1 | ||
![]() |
bfafb80cde | ||
![]() |
dcbe481a28 | ||
![]() |
e4d891fa37 | ||
![]() |
ffe2364334 | ||
![]() |
8b5485f822 | ||
![]() |
8d615a99f6 | ||
![]() |
103df6c408 | ||
![]() |
945a02798b | ||
![]() |
9da0656c2f | ||
![]() |
d0ebeb1713 | ||
![]() |
ea832628c4 | ||
![]() |
d140dc81c0 | ||
![]() |
816856eb75 | ||
![]() |
c101f916fa | ||
![]() |
94f32848b8 | ||
![]() |
606a69ded7 | ||
![]() |
f688ec6b51 | ||
![]() |
89cf02ba56 | ||
![]() |
b22a4ecdf9 | ||
![]() |
a33111ae9d | ||
![]() |
6b5f68af5e | ||
![]() |
336c6b7055 | ||
![]() |
2d8e8a3b84 | ||
![]() |
890ea77246 | ||
![]() |
7bb92972d1 | ||
![]() |
58ab0e462e | ||
![]() |
e785ca73b5 | ||
![]() |
06ff1ce2aa | ||
![]() |
c1585dda02 | ||
![]() |
b5f508c336 | ||
![]() |
801e255a36 | ||
![]() |
01563c2d48 | ||
![]() |
58d452c78d | ||
![]() |
c500b9c036 | ||
![]() |
5ec0f68937 | ||
![]() |
5c755d4afd | ||
![]() |
74637ef884 | ||
![]() |
3c85cea36e | ||
![]() |
f5a6397a57 | ||
![]() |
f6aa8f7c6d | ||
![]() |
418e6f3e18 | ||
![]() |
a55786c994 | ||
![]() |
145803092b | ||
![]() |
7d2243ea92 | ||
![]() |
e54ed5fc58 | ||
![]() |
00b7f08ca9 | ||
![]() |
23ca58175e | ||
![]() |
ed22e2f4a4 | ||
![]() |
85aee79050 | ||
![]() |
10c294a021 | ||
![]() |
eedea1d2de | ||
![]() |
784b24e35e | ||
![]() |
7737085c1b | ||
![]() |
3490e0c1b4 | ||
![]() |
45b28b9d3d | ||
![]() |
b499b50154 | ||
![]() |
c47fb0a463 | ||
![]() |
d6a566da06 | ||
![]() |
aa6c3c869d | ||
![]() |
d43514a44d | ||
![]() |
600d7b524d | ||
![]() |
cb5e4f9b44 | ||
![]() |
ec768bb83e | ||
![]() |
9d74f27abd | ||
![]() |
4f55d833d3 | ||
![]() |
2d86705314 | ||
![]() |
3352d54554 | ||
![]() |
5876825bcd | ||
![]() |
864ff48e11 | ||
![]() |
9c00b1338c | ||
![]() |
d64d017c1c | ||
![]() |
a91962b1de | ||
![]() |
73d401b8d7 | ||
![]() |
73c81455df | ||
![]() |
2e50485a54 | ||
![]() |
c577e7310c | ||
![]() |
771ea1f9e0 | ||
![]() |
18f98987be | ||
![]() |
249708dbb8 | ||
![]() |
78f78e69ba | ||
![]() |
c119908c15 | ||
![]() |
3178992889 | ||
![]() |
f16b9267de | ||
![]() |
c345a9a356 | ||
![]() |
9d50f23f80 | ||
![]() |
052c821102 | ||
![]() |
59277566e3 | ||
![]() |
14e12db675 | ||
![]() |
b0708c43bf | ||
![]() |
7471eb11a7 | ||
![]() |
f52c5cb9b5 | ||
![]() |
1d6d58ef5b | ||
![]() |
dfb1460236 | ||
![]() |
33002a9e91 | ||
![]() |
fdc875a579 | ||
![]() |
1e9de0f9ff | ||
![]() |
ba547648df | ||
![]() |
44dd1fc7f5 | ||
![]() |
48f0dfa18e | ||
![]() |
ac0362d30e | ||
![]() |
687187b5cf | ||
![]() |
34c8f4c39c | ||
![]() |
1bea69001c | ||
![]() |
4d627a29ad | ||
![]() |
467ef87a76 | ||
![]() |
2217b93f30 | ||
![]() |
cc8626f6bb | ||
![]() |
0c76431efb | ||
![]() |
028a86cc53 | ||
![]() |
f7d37292a6 | ||
![]() |
97a40e6140 | ||
![]() |
5df73fe627 | ||
![]() |
6760338eb0 | ||
![]() |
1316183b3a | ||
![]() |
606f4ea47c | ||
![]() |
39e267c029 | ||
![]() |
3416858d1c | ||
![]() |
0d05004468 | ||
![]() |
391a23ad84 | ||
![]() |
d98c471883 | ||
![]() |
903b7b5213 | ||
![]() |
71bd9f04fe | ||
![]() |
5427e08c18 | ||
![]() |
05b3ca0a83 | ||
![]() |
721f015e07 | ||
![]() |
d875ea4d24 | ||
![]() |
0fc897e82f | ||
![]() |
d90767ad83 | ||
![]() |
861fd68bda | ||
![]() |
9436b63f5f | ||
![]() |
f3091185ca | ||
![]() |
279182ca14 | ||
![]() |
db8927f6b1 | ||
![]() |
0d0c3d2504 | ||
![]() |
a142e7c3d0 | ||
![]() |
96e4f369bd | ||
![]() |
b6bd00ebff | ||
![]() |
0f5b01eb73 | ||
![]() |
6c9e6cb097 | ||
![]() |
a29f0695ef | ||
![]() |
3d24dbc7b4 | ||
![]() |
2a198651de | ||
![]() |
eb656a1982 | ||
![]() |
53f3103a93 | ||
![]() |
c1ee4c3e7e | ||
![]() |
3fb0fa673a | ||
![]() |
5552323553 | ||
![]() |
122f86b4c5 | ||
![]() |
45dad5d903 | ||
![]() |
b6e0766d86 | ||
![]() |
28917c0d14 | ||
![]() |
0b366ec4b6 | ||
![]() |
337068dad0 | ||
![]() |
e41ba55036 | ||
![]() |
84103ae936 | ||
![]() |
9ef1ef93e7 | ||
![]() |
ab8ec9adad | ||
![]() |
8af787cabc | ||
![]() |
d64f5ee02a | ||
![]() |
6f98c0c9b6 | ||
![]() |
eb8cf7e4d2 | ||
![]() |
5f78b78489 | ||
![]() |
5c097b26d4 | ||
![]() |
090490389e | ||
![]() |
cd1b71b3f9 | ||
![]() |
921f0c02e2 | ||
![]() |
f618c41061 | ||
![]() |
38d4768cdd | ||
![]() |
f86126aaea | ||
![]() |
e7f507c204 | ||
![]() |
c6ddaaf953 | ||
![]() |
ebeee7ebed | ||
![]() |
6df0f2c535 | ||
![]() |
1d9cdc1d83 | ||
![]() |
be6e1e7c06 | ||
![]() |
6f012d44d4 | ||
![]() |
ceea5cb99b | ||
![]() |
62302b1f71 | ||
![]() |
18aef2f781 | ||
![]() |
4fd227527e | ||
![]() |
2dd4ab9535 | ||
![]() |
a96b2b5b0d | ||
![]() |
e3709a9754 | ||
![]() |
2d0811d94c | ||
![]() |
c32ae480af | ||
![]() |
26f6a64a39 | ||
![]() |
ebdeab7e25 | ||
![]() |
7b346dbbe1 | ||
![]() |
902a97f540 | ||
![]() |
53b17765f4 | ||
![]() |
810f51b3e7 | ||
![]() |
ad1b3330b7 | ||
![]() |
702341ae6e | ||
![]() |
959d0d2591 | ||
![]() |
1841a6bd3b | ||
![]() |
6108ba89df | ||
![]() |
2c7dc70878 | ||
![]() |
2d866d5118 | ||
![]() |
9e75f870bb | ||
![]() |
168948d91d | ||
![]() |
7eb6cb470b | ||
![]() |
6e9e7bd6bc | ||
![]() |
3c095f9d34 | ||
![]() |
1d895616f7 | ||
![]() |
9c2ff464b0 | ||
![]() |
20301d1e5d | ||
![]() |
488c60d139 | ||
![]() |
b5eb104b08 | ||
![]() |
14d37464ad | ||
![]() |
cebcdea80f | ||
![]() |
6ec847a93f | ||
![]() |
feedf332a8 | ||
![]() |
642f42bb4f | ||
![]() |
bdd253a66a | ||
![]() |
7760575d3f | ||
![]() |
6fb5207694 | ||
![]() |
67acb0f840 | ||
![]() |
dd5f448f25 | ||
![]() |
0b52c57a24 | ||
![]() |
d2d50bc60f | ||
![]() |
a9d676a5fd | ||
![]() |
bf429a0058 | ||
![]() |
4de362b405 | ||
![]() |
0db0e6acd8 | ||
![]() |
7199dd570f | ||
![]() |
3f4c6fee11 | ||
![]() |
c57323f29c | ||
![]() |
fa7799143e | ||
![]() |
57dc8a91dd | ||
![]() |
86a8f1d5d5 | ||
![]() |
b4ff6fdde3 | ||
![]() |
956f61cf14 | ||
![]() |
0877019fb6 | ||
![]() |
2d4956feeb | ||
![]() |
871cd1a76a | ||
![]() |
00fda3be65 | ||
![]() |
6832da5aa7 | ||
![]() |
5986eee6ab | ||
![]() |
00557df17f | ||
![]() |
4d71e9b44f | ||
![]() |
eae6e6a828 | ||
![]() |
5b294b7cff | ||
![]() |
03846342bb | ||
![]() |
ba39a1b304 | ||
![]() |
25fb24ba7d | ||
![]() |
be80708d41 | ||
![]() |
38530ebf12 | ||
![]() |
bd13d4a471 | ||
![]() |
e18c4c1158 | ||
![]() |
6b94ce2204 | ||
![]() |
7ed7116e27 | ||
![]() |
5a862bce29 | ||
![]() |
da582e2eec | ||
![]() |
0e26d514b8 | ||
![]() |
c833644a0e | ||
![]() |
c078640fa5 | ||
![]() |
afcc584fb6 | ||
![]() |
589d606000 | ||
![]() |
32c0a7a135 | ||
![]() |
bfa6544030 | ||
![]() |
691c1f9391 | ||
![]() |
ad954dc7ab | ||
![]() |
ec09fea29a | ||
![]() |
15bfe44e73 | ||
![]() |
a6e6a99cb6 | ||
![]() |
4745ebeed5 | ||
![]() |
dea0279a74 | ||
![]() |
7ef0fb4192 | ||
![]() |
82f7dd017e | ||
![]() |
40bc6afdbd | ||
![]() |
6264c4901b | ||
![]() |
73cc33b493 | ||
![]() |
87592e2625 | ||
![]() |
d0e9228660 | ||
![]() |
a9fb0aa207 | ||
![]() |
b5174a9990 | ||
![]() |
b7d53ce314 | ||
![]() |
78c3d619f9 | ||
![]() |
02ff68e1a3 | ||
![]() |
7cf1e76d53 | ||
![]() |
776e4a37ef | ||
![]() |
79e2fbe0c6 | ||
![]() |
d278eae4a3 | ||
![]() |
93d6dd3023 | ||
![]() |
5d0b2c796e | ||
![]() |
992fefa823 | ||
![]() |
0fda4b1183 | ||
![]() |
e07512e213 | ||
![]() |
00af1c0607 | ||
![]() |
9ce838806b | ||
![]() |
6b9e49e965 | ||
![]() |
5867a63068 | ||
![]() |
d8e079dad3 | ||
![]() |
3792951023 | ||
![]() |
a4333035c7 | ||
![]() |
b00ab118c6 | ||
![]() |
8a501ef06d | ||
![]() |
82fca43406 | ||
![]() |
0e1d7d6430 | ||
![]() |
fed4716c3b | ||
![]() |
15e1e9ba24 | ||
![]() |
64747478fe | ||
![]() |
36a15a745c | ||
![]() |
6e84120b89 | ||
![]() |
c43e889e39 | ||
![]() |
aff47d1564 | ||
![]() |
ae334e9a6e | ||
![]() |
1c5df677e1 | ||
![]() |
b0f245d8c5 | ||
![]() |
8120547639 | ||
![]() |
a6fcd32339 | ||
![]() |
427e543d84 | ||
![]() |
fe5fe230b9 | ||
![]() |
394bf00ba5 | ||
![]() |
4e8e90b6df | ||
![]() |
0bcb892975 | ||
![]() |
94789dd24a | ||
![]() |
b95673f701 | ||
![]() |
d3dece3343 | ||
![]() |
c1e0978555 | ||
![]() |
795c079c55 | ||
![]() |
a33dd87c99 | ||
![]() |
c1bb051e61 | ||
![]() |
76f8e84901 | ||
![]() |
70cd2f1edf | ||
![]() |
0e56bc2929 | ||
![]() |
a2955bc5b3 | ||
![]() |
cdbe1b6190 | ||
![]() |
b3eea3d322 | ||
![]() |
6acb7bcfe4 | ||
![]() |
d9a96c4ca0 | ||
![]() |
abb94bd2ff | ||
![]() |
b897ae092a | ||
![]() |
d14c51aa2a | ||
![]() |
7b001164ef | ||
![]() |
64d44d131d | ||
![]() |
730375faf7 | ||
![]() |
257f232d41 | ||
![]() |
3a33fe0fd9 | ||
![]() |
65b7047111 | ||
![]() |
ca6016cc71 | ||
![]() |
4ec40e720c | ||
![]() |
45450db45a | ||
![]() |
d7b0422769 | ||
![]() |
763aa5b8a2 | ||
![]() |
4e3ab8f27d | ||
![]() |
3a4e3d8747 | ||
![]() |
3a6af2cc57 | ||
![]() |
913ef1d56f | ||
![]() |
0bd64b7975 | ||
![]() |
7efed56b66 | ||
![]() |
7a1d3d807f | ||
![]() |
cb3bdf09c6 | ||
![]() |
959447d8ed | ||
![]() |
2d1cbe3cb3 | ||
![]() |
db4a618c6f | ||
![]() |
df5c522049 | ||
![]() |
4e29294caa | ||
![]() |
a813c40abf | ||
![]() |
37dccd98a6 | ||
![]() |
d357b116fe | ||
![]() |
6fa6757a8b | ||
![]() |
f6ca045735 | ||
![]() |
2e8299742b | ||
![]() |
67d8b43b0e | ||
![]() |
fdad1f023b | ||
![]() |
9a1e934621 | ||
![]() |
526c85773f | ||
![]() |
845596c30a | ||
![]() |
72443f8f25 | ||
![]() |
695e937102 | ||
![]() |
b8055925bf | ||
![]() |
6a8e4795da | ||
![]() |
af744b07c3 | ||
![]() |
4583987fb9 | ||
![]() |
c83477ffca | ||
![]() |
51c3bef497 | ||
![]() |
1c15dc7292 | ||
![]() |
0981dde9d4 | ||
![]() |
4ca4326bf9 | ||
![]() |
4b03860810 | ||
![]() |
2f454aa4b0 | ||
![]() |
b1a0f9873b | ||
![]() |
ac8f436c3b | ||
![]() |
e65d15f6ad | ||
![]() |
94ab5e2aab | ||
![]() |
06f6497181 | ||
![]() |
6e2d39c51b | ||
![]() |
ce2e48af52 | ||
![]() |
72cc3e0530 | ||
![]() |
8e59ecb50c | ||
![]() |
b73e7372d8 | ||
![]() |
dd7dd1ac8b | ||
![]() |
0570e49d14 | ||
![]() |
3494a29603 | ||
![]() |
596499416f | ||
![]() |
00b3199859 | ||
![]() |
c8309327f8 | ||
![]() |
baf5e02f43 | ||
![]() |
2f044acb4e | ||
![]() |
ff58f7e846 | ||
![]() |
736c6761a2 | ||
![]() |
c30d394efe | ||
![]() |
6582084e9b | ||
![]() |
3f1029c281 | ||
![]() |
8d51ad567f | ||
![]() |
32387317bf | ||
![]() |
f0fe03087a | ||
![]() |
26f39e41a9 | ||
![]() |
fd5d1dfcb6 | ||
![]() |
eb04be8141 | ||
![]() |
c21e9a721b | ||
![]() |
b4af1b2cc0 | ||
![]() |
5ff5be388f | ||
![]() |
a7311af8c3 | ||
![]() |
17ee57c458 | ||
![]() |
cc816345bf | ||
![]() |
b132da0ac2 | ||
![]() |
d419602c99 | ||
![]() |
926651b708 | ||
![]() |
0abe557af1 | ||
![]() |
6c9f6cf084 | ||
![]() |
81c44e32c3 | ||
![]() |
2b5188c4b3 | ||
![]() |
a25d3b7ff4 | ||
![]() |
42f09eb2b8 | ||
![]() |
ef9e9bfa7d | ||
![]() |
f31b87fae8 | ||
![]() |
3b174876b3 | ||
![]() |
62b7064e90 | ||
![]() |
0a25b9d39b | ||
![]() |
5fb6155eea | ||
![]() |
4f40f8bc47 | ||
![]() |
8d0888afef | ||
![]() |
2d6303e9fe | ||
![]() |
90fb53bccc | ||
![]() |
4ceb4d3bf3 | ||
![]() |
9c280bc7af | ||
![]() |
8444c3f705 | ||
![]() |
7ef114d1da | ||
![]() |
adb20569be | ||
![]() |
07f3a65a96 | ||
![]() |
6a8b1079c1 | ||
![]() |
703850b341 | ||
![]() |
8da6307456 | ||
![]() |
e469f4ebf7 | ||
![]() |
8941cf3e66 | ||
![]() |
68cad30646 | ||
![]() |
fc7ec5e907 | ||
![]() |
1a948849f3 | ||
![]() |
bba10504e2 | ||
![]() |
ff11a6fbe8 | ||
![]() |
27ebe78313 | ||
![]() |
44961d1975 | ||
![]() |
e8a8d544c5 | ||
![]() |
62cdb2299b | ||
![]() |
9b66883e0b | ||
![]() |
d1b0d6a6dc | ||
![]() |
c47ba58494 | ||
![]() |
41582f0448 | ||
![]() |
3e76d3a3d3 | ||
![]() |
733ed972f7 | ||
![]() |
5d7050bdf9 | ||
![]() |
a025636fa1 | ||
![]() |
3c3dfde3f9 | ||
![]() |
5829fdb73e | ||
![]() |
9b74c40fc2 | ||
![]() |
66e0d774bd | ||
![]() |
a5e1aff99b | ||
![]() |
e333eb415b | ||
![]() |
02df366a7a | ||
![]() |
976a10c891 | ||
![]() |
d28e73849b | ||
![]() |
d7b15ac1cf | ||
![]() |
c0c775e45d | ||
![]() |
b5842434c2 | ||
![]() |
c7e9951795 | ||
![]() |
70ed975b99 | ||
![]() |
7e2b1b4ff0 | ||
![]() |
915b5f370b | ||
![]() |
0c6c421508 | ||
![]() |
bc2c6251f8 | ||
![]() |
b9dd459d5a | ||
![]() |
28da2522fe | ||
![]() |
2528854664 | ||
![]() |
7ae7a87f8a | ||
![]() |
3d41c1b6cd | ||
![]() |
96005f2566 | ||
![]() |
e37d021cd3 | ||
![]() |
133a882556 | ||
![]() |
74339b9fdc | ||
![]() |
2dbcef218c | ||
![]() |
e07281f8bd | ||
![]() |
5e670be239 | ||
![]() |
05abaee0e0 | ||
![]() |
d657537821 | ||
![]() |
5fe0db347c | ||
![]() |
649665eac9 | ||
![]() |
efe359d613 | ||
![]() |
c45fe62abc | ||
![]() |
584e2d664c | ||
![]() |
51a8e1d692 | ||
![]() |
da836a732c | ||
![]() |
6bab884d1d | ||
![]() |
4e6db307e4 | ||
![]() |
0229f9b1a4 | ||
![]() |
6bbaca118f | ||
![]() |
ba3b4b2d08 | ||
![]() |
fcdb120935 | ||
![]() |
8f45370073 | ||
![]() |
502bc61931 | ||
![]() |
5a39b22521 | ||
![]() |
6c44c9d730 | ||
![]() |
a523c64718 | ||
![]() |
5aebd2a16c | ||
![]() |
574c689ff7 | ||
![]() |
b178c992a1 | ||
![]() |
a4d31e1dad | ||
![]() |
e151487fde | ||
![]() |
061848cd0c | ||
![]() |
ab1c12c449 | ||
![]() |
8db8401bc1 | ||
![]() |
58a81dd760 | ||
![]() |
a5838e40d9 | ||
![]() |
78e8fd1c31 | ||
![]() |
2d07d29a1c | ||
![]() |
19bbcbb486 | ||
![]() |
b6ba3dacb9 | ||
![]() |
65d9d0aac1 | ||
![]() |
b9c966f902 | ||
![]() |
d62368f133 | ||
![]() |
3d66a6c93f | ||
![]() |
01e035e28b | ||
![]() |
4af4483f5f | ||
![]() |
2344941974 | ||
![]() |
6f41b9594a | ||
![]() |
3e049c09d5 | ||
![]() |
92e1205f40 | ||
![]() |
71b06caed4 | ||
![]() |
4611406c68 | ||
![]() |
427be604b9 | ||
![]() |
d57b5ac89a | ||
![]() |
82937e1564 | ||
![]() |
7fa12844ed | ||
![]() |
af011bc952 | ||
![]() |
4c728f0b54 | ||
![]() |
5895fb6adc | ||
![]() |
eb6f8bd0ba | ||
![]() |
b7c0d5b6dd | ||
![]() |
680f9d5772 | ||
![]() |
20d8889a03 | ||
![]() |
c67bc02dd1 | ||
![]() |
1b56f7917e | ||
![]() |
7639726193 | ||
![]() |
fb2ed693e4 | ||
![]() |
966e8adcf9 | ||
![]() |
c3386300d3 | ||
![]() |
cb4c676f5d | ||
![]() |
74c486201d | ||
![]() |
6b8f30964d | ||
![]() |
dc2e5c1751 | ||
![]() |
645a5b2507 | ||
![]() |
3a073db029 | ||
![]() |
a6297a2be1 | ||
![]() |
8724cf2ea5 | ||
![]() |
485787059a | ||
![]() |
08615d3247 | ||
![]() |
a1b2d96d9c | ||
![]() |
3c2ee1cc75 | ||
![]() |
117696a893 | ||
![]() |
2f5a7ddcc6 | ||
![]() |
18a9982126 | ||
![]() |
41d3c47ffe | ||
![]() |
7428747ef0 | ||
![]() |
1ee6290fcf | ||
![]() |
572969d8b7 | ||
![]() |
f2247c6f0a | ||
![]() |
05992a6fce | ||
![]() |
c8464bc731 | ||
![]() |
b2098a2d60 | ||
![]() |
ac73e3b5e2 | ||
![]() |
1be68d8cfe | ||
![]() |
eb86d69a38 | ||
![]() |
acfa967e89 | ||
![]() |
5ff0776235 | ||
![]() |
2a408d789c | ||
![]() |
5100cb3e7f | ||
![]() |
b029fb6d31 | ||
![]() |
245ba2a152 | ||
![]() |
89ecad1e29 | ||
![]() |
23bde477e5 | ||
![]() |
2294947660 | ||
![]() |
5aed36e76d | ||
![]() |
e5b5aea998 | ||
![]() |
fadd74358b | ||
![]() |
7912fac815 | ||
![]() |
fa4e0c1a26 | ||
![]() |
1046449339 | ||
![]() |
c5d5d19443 | ||
![]() |
0f783aab34 | ||
![]() |
7849db65e0 | ||
![]() |
9b5a796213 | ||
![]() |
32e374d941 | ||
![]() |
113a580021 | ||
![]() |
a77273d8d8 | ||
![]() |
310fd9b147 | ||
![]() |
01d8642520 | ||
![]() |
30f3e49f3d | ||
![]() |
0b8aded399 | ||
![]() |
d2aeafcf1e | ||
![]() |
81881a120c | ||
![]() |
e7fdf8a13d | ||
![]() |
a750bcceec | ||
![]() |
67d0bf75a7 | ||
![]() |
a8a21312e1 | ||
![]() |
42dad5df95 | ||
![]() |
e176a476c0 | ||
![]() |
19390eaf09 | ||
![]() |
faff512140 | ||
![]() |
946a6cb280 | ||
![]() |
7d789763d6 | ||
![]() |
d62a2f793f | ||
![]() |
9eefcb7939 | ||
![]() |
36bf8a60d8 | ||
![]() |
6d1cdf25a7 | ||
![]() |
51db3b589d | ||
![]() |
b18940d3c6 | ||
![]() |
3f25c52a29 | ||
![]() |
39e73ccc4d | ||
![]() |
df4b55d657 | ||
![]() |
80dbbef0f5 | ||
![]() |
23b75281ad | ||
![]() |
91b2dc2aa9 | ||
![]() |
7459a5c6ef | ||
![]() |
8820baf5cc | ||
![]() |
3b3e163c48 | ||
![]() |
83fb4613c1 | ||
![]() |
1b20182d33 | ||
![]() |
7dfe42d6d0 | ||
![]() |
55f0647213 | ||
![]() |
484c6b360f | ||
![]() |
dec85f741a | ||
![]() |
87d5b51256 | ||
![]() |
aa3b413390 | ||
![]() |
ee43a14f19 | ||
![]() |
64c23f8477 | ||
![]() |
49145e90a2 | ||
![]() |
28e12a6c6a | ||
![]() |
131132f17d | ||
![]() |
884e868e92 | ||
![]() |
eb2483338f | ||
![]() |
becd3c3831 | ||
![]() |
34fafb733f | ||
![]() |
90c129fd61 | ||
![]() |
9922160ab4 | ||
![]() |
1d324d5496 | ||
![]() |
03c38396f3 | ||
![]() |
85cecb2aae | ||
![]() |
d15b93839b | ||
![]() |
b06497cad6 | ||
![]() |
f632e32100 | ||
![]() |
52a6d756f4 | ||
![]() |
f4ca5b378a | ||
![]() |
97054e4e0f | ||
![]() |
86bdf60887 | ||
![]() |
4b4f052fea | ||
![]() |
2de92e3c07 | ||
![]() |
85e7856989 | ||
![]() |
b4293edd70 | ||
![]() |
6c7685da3f | ||
![]() |
ea40bda88c | ||
![]() |
1184db83f7 | ||
![]() |
ca600b44a0 | ||
![]() |
b5fe41f41a | ||
![]() |
3cd9e3896a | ||
![]() |
7024628c65 | ||
![]() |
d2bb6185f1 | ||
![]() |
c3f06b7470 | ||
![]() |
a7afd8de99 | ||
![]() |
cde26c743c | ||
![]() |
40b73a8a91 | ||
![]() |
6f3c99a295 | ||
![]() |
9ce2331cc1 | ||
![]() |
cacd4a9d90 | ||
![]() |
be7f717a24 | ||
![]() |
4992edab24 | ||
![]() |
af3df8bdd6 | ||
![]() |
02a533768c | ||
![]() |
46046bf018 | ||
![]() |
bc29720024 | ||
![]() |
6a2e51ec78 | ||
![]() |
e6d304cdc2 | ||
![]() |
4663cc03f3 | ||
![]() |
77484cb19c | ||
![]() |
15345ded25 | ||
![]() |
c715cae18d | ||
![]() |
98a7d35bab | ||
![]() |
4f7d090fb2 | ||
![]() |
954f029118 | ||
![]() |
4fa2c32906 | ||
![]() |
7e9bed5c89 | ||
![]() |
5ec87c4c6f | ||
![]() |
05443cd0c8 | ||
![]() |
b02c6127a0 | ||
![]() |
46774a8167 | ||
![]() |
f28c1ef675 | ||
![]() |
eee995ec3d | ||
![]() |
a3ca859db2 | ||
![]() |
40d6c15798 | ||
![]() |
d41386d661 | ||
![]() |
7ae426c377 | ||
![]() |
fa0d5bbf9e | ||
![]() |
d10ff78822 | ||
![]() |
e932d23cf4 | ||
![]() |
49b723e76d | ||
![]() |
71017993ce | ||
![]() |
42d56d2f37 | ||
![]() |
cff38308b7 | ||
![]() |
9c52a4932d | ||
![]() |
edc1d2511d | ||
![]() |
1c4dadcf68 | ||
![]() |
d797bb3e1c | ||
![]() |
bec467705e | ||
![]() |
fe0d04c879 | ||
![]() |
406373caa9 | ||
![]() |
6a46dcb374 | ||
![]() |
7e77dc7a21 | ||
![]() |
56e7a75a77 | ||
![]() |
0b4af7d341 | ||
![]() |
8deac79028 | ||
![]() |
2031c06880 | ||
![]() |
20e446cc7d | ||
![]() |
1eae4b483b | ||
![]() |
1f82b0d847 | ||
![]() |
b0ce16b460 | ||
![]() |
237972652d | ||
![]() |
9f699af138 | ||
![]() |
4525c897e2 | ||
![]() |
019434a37e | ||
![]() |
22b7713287 | ||
![]() |
a748c3bf25 | ||
![]() |
cc827041a9 | ||
![]() |
95d31b0986 | ||
![]() |
e30995c65c | ||
![]() |
2829cec720 | ||
![]() |
a63a422972 | ||
![]() |
e043dad2a6 | ||
![]() |
aca9f20c2e | ||
![]() |
da51abf07f | ||
![]() |
31af42ee8e | ||
![]() |
c77f97c84a | ||
![]() |
d8f1aad494 | ||
![]() |
6b2aa173fc | ||
![]() |
2cf8352b95 | ||
![]() |
55e7428924 | ||
![]() |
c7fe2c772e | ||
![]() |
a4a10a6edd | ||
![]() |
c2e79a212c | ||
![]() |
680cbdf1f0 | ||
![]() |
9961e3b0d7 | ||
![]() |
5997fa8fe1 | ||
![]() |
59a44bf5b9 | ||
![]() |
30f21438bc | ||
![]() |
ebcbe292c1 | ||
![]() |
b978dec51c | ||
![]() |
8cef1d12f2 | ||
![]() |
a77505c554 | ||
![]() |
e0d4cc3143 | ||
![]() |
fcf15fe8c0 | ||
![]() |
1694887f9b | ||
![]() |
0237231a8d | ||
![]() |
e88099bfd3 | ||
![]() |
887881486b | ||
![]() |
f21bd8836a | ||
![]() |
18c309fb38 | ||
![]() |
bc07636d6b | ||
![]() |
7104911236 | ||
![]() |
ca329bba0d | ||
![]() |
d1a4c1f789 | ||
![]() |
451969de1b | ||
![]() |
7fe8d25253 | ||
![]() |
b17937dda8 | ||
![]() |
6f0a4a7663 | ||
![]() |
98f4e06a37 | ||
![]() |
1db9a85b5d | ||
![]() |
e5c9e5e328 | ||
![]() |
eb8512b43c | ||
![]() |
6321dd4614 | ||
![]() |
689f3c086b | ||
![]() |
9f79ed2972 | ||
![]() |
421bbde1e0 | ||
![]() |
10982fa184 | ||
![]() |
a1809fad4c | ||
![]() |
8f05322263 | ||
![]() |
358ca7595d | ||
![]() |
89fedf0bb9 | ||
![]() |
4211056354 | ||
![]() |
6d56c99a37 | ||
![]() |
f46fcb8307 | ||
![]() |
b708965ab7 | ||
![]() |
3c8b7a41b2 | ||
![]() |
a08508f6a4 | ||
![]() |
7e0929e3b4 | ||
![]() |
793977db4a | ||
![]() |
b5b3bbb30b | ||
![]() |
615cb35d96 | ||
![]() |
21c30f43d4 | ||
![]() |
c20ccfe274 | ||
![]() |
c0d1425aac | ||
![]() |
350cb0a8a8 | ||
![]() |
cedd5efe4c | ||
![]() |
f8bd56b07f | ||
![]() |
9fbf5c8ca2 | ||
![]() |
caa1f45643 | ||
![]() |
5e8b6b0157 | ||
![]() |
8473e94879 | ||
![]() |
8dece6a179 | ||
![]() |
ccf085ac70 | ||
![]() |
dde1d68a02 | ||
![]() |
14884a2a6c | ||
![]() |
9c62d8a400 | ||
![]() |
6e1326143e | ||
![]() |
03e6006ac8 | ||
![]() |
e614942a2d | ||
![]() |
1397242d88 | ||
![]() |
b8246d8592 | ||
![]() |
7eacac24d5 | ||
![]() |
2a64aa2abd | ||
![]() |
f976b03a4f | ||
![]() |
8db130289e | ||
![]() |
3aad221b1e | ||
![]() |
ff499fe57d | ||
![]() |
3c75bb5e6d | ||
![]() |
8a08a9b225 | ||
![]() |
1b7d136daa | ||
![]() |
f346c672fb | ||
![]() |
08adb4b8c3 | ||
![]() |
3d936061c8 | ||
![]() |
95f3b6e18e | ||
![]() |
8eecbbe4aa | ||
![]() |
ea5cd42e6c | ||
![]() |
3ffe34f9bb | ||
![]() |
416a52b5bc | ||
![]() |
91faf72dda | ||
![]() |
60e8511543 | ||
![]() |
97abaff4c5 | ||
![]() |
5ad65d9291 | ||
![]() |
776304e8e8 | ||
![]() |
d5aab98ac9 | ||
![]() |
1f66f0d9a2 | ||
![]() |
c1a02e9fca | ||
![]() |
f987ac9dca | ||
![]() |
1d3f230c92 | ||
![]() |
ae301a1d23 | ||
![]() |
b132ae099b | ||
![]() |
2783d0d63e | ||
![]() |
5d27c1e6c9 | ||
![]() |
d2882a68fe | ||
![]() |
2ae5849826 | ||
![]() |
25ae374f62 | ||
![]() |
8b7db29ba0 | ||
![]() |
74642ba1c6 | ||
![]() |
96b0563249 | ||
![]() |
00c611a5fb | ||
![]() |
bba8454034 | ||
![]() |
29b9b054dd | ||
![]() |
e8b89b5ecf | ||
![]() |
5d9df629d7 | ||
![]() |
dc6136e820 | ||
![]() |
75b0264f35 | ||
![]() |
64c588e9d8 | ||
![]() |
862ef0524e | ||
![]() |
d73abe73e5 | ||
![]() |
6bf746d531 | ||
![]() |
f6df47dfe5 | ||
![]() |
3f12fa54f7 | ||
![]() |
90b3dceb54 | ||
![]() |
a6db31c01e | ||
![]() |
39e22046c1 | ||
![]() |
3d8b1165a8 | ||
![]() |
163a9e1f41 | ||
![]() |
9b6227688f | ||
![]() |
3c2ce77b7b | ||
![]() |
1878a9ea01 | ||
![]() |
06910eedfd | ||
![]() |
ca92f43c27 | ||
![]() |
ea70c47a1a | ||
![]() |
3f7fa6d6e7 | ||
![]() |
ab52f98480 | ||
![]() |
c1d282d9e8 | ||
![]() |
e25f4dca1f | ||
![]() |
68dcb55349 | ||
![]() |
b75511248d | ||
![]() |
e40c26dea5 | ||
![]() |
7baa2975ec | ||
![]() |
e0cb892d2d | ||
![]() |
12d3e21f1b | ||
![]() |
161c8b7d08 | ||
![]() |
82306af111 | ||
![]() |
596338b26a | ||
![]() |
eb772bc1e0 | ||
![]() |
047f093503 | ||
![]() |
df84f93938 | ||
![]() |
a8e63b9724 | ||
![]() |
99e86d180b | ||
![]() |
8adcec185e | ||
![]() |
3fcf2ee19a | ||
![]() |
bdcb16e7bb | ||
![]() |
a679b0ccc0 | ||
![]() |
acedf4a0d5 | ||
![]() |
1f730b3b35 | ||
![]() |
b331edd7a6 | ||
![]() |
9d53e07883 | ||
![]() |
bce2dd1231 | ||
![]() |
d089e1cd34 | ||
![]() |
741afde3bc | ||
![]() |
314c4061df | ||
![]() |
08165fed18 | ||
![]() |
112874fe07 | ||
![]() |
c10348cc85 | ||
![]() |
904a7ee032 | ||
![]() |
4ccf1e61be | ||
![]() |
6916ff58b1 | ||
![]() |
e5d5f6e367 | ||
![]() |
7caedff9ca | ||
![]() |
d9d9c6111b | ||
![]() |
8d6f179062 | ||
![]() |
7e08b312d5 | ||
![]() |
c6d2502bdb | ||
![]() |
a2fd427224 | ||
![]() |
74ed3d07f9 | ||
![]() |
ce58b168f6 | ||
![]() |
c247c371c3 | ||
![]() |
0a2177b4bc | ||
![]() |
ae2452d280 | ||
![]() |
2d6bc1ff42 | ||
![]() |
dec5f332ad | ||
![]() |
d93f8eadf8 | ||
![]() |
53b32f1c20 | ||
![]() |
402ce4e53b | ||
![]() |
861a619053 | ||
![]() |
fc95ceadf0 | ||
![]() |
dde1e0671f | ||
![]() |
4e43192561 | ||
![]() |
97101d1003 | ||
![]() |
37bb8e9554 | ||
![]() |
41732bebe8 | ||
![]() |
e2183f0b99 | ||
![]() |
f565ff018e | ||
![]() |
8241dcf80b | ||
![]() |
c661cad692 | ||
![]() |
37a6f12037 | ||
![]() |
addbd88833 | ||
![]() |
8e86f3586d | ||
![]() |
e67c842faa | ||
![]() |
061294e4d1 | ||
![]() |
20fa362700 | ||
![]() |
20257f3e49 | ||
![]() |
3db13edd89 | ||
![]() |
a727f5768f | ||
![]() |
bf0db83134 | ||
![]() |
ef3b01dffc | ||
![]() |
64575e711b | ||
![]() |
3414910809 | ||
![]() |
2f42b0ce85 | ||
![]() |
12bcdb977a | ||
![]() |
973d32f9a7 | ||
![]() |
049a1c8f6d | ||
![]() |
4b79f63d07 | ||
![]() |
7ebcd06652 | ||
![]() |
ce8d7042c6 | ||
![]() |
d8b8c0f3fc | ||
![]() |
c387bc586d | ||
![]() |
c629b16ebc | ||
![]() |
cef1e6e2e2 | ||
![]() |
740834bb83 | ||
![]() |
2c2ccadd32 | ||
![]() |
6f2f09947f | ||
![]() |
e6e48675cc | ||
![]() |
108f7f6fee | ||
![]() |
2234158049 | ||
![]() |
3ebc55fdfe | ||
![]() |
084fb31186 | ||
![]() |
2d5cc5ddbf | ||
![]() |
f3555a1016 | ||
![]() |
5f1990e044 | ||
![]() |
3d46297cc1 | ||
![]() |
439e73a8ec | ||
![]() |
3d5fa81bf2 | ||
![]() |
2a913b6587 | ||
![]() |
042499188c | ||
![]() |
b354c10072 | ||
![]() |
6267fd1865 | ||
![]() |
f518c4e939 | ||
![]() |
e53e42f43d | ||
![]() |
94abe0db88 | ||
![]() |
89c16baf18 | ||
![]() |
68ffbc06c7 | ||
![]() |
f81cb1a252 | ||
![]() |
1da7e1da8c | ||
![]() |
5775f9d224 | ||
![]() |
38ee6156f8 | ||
![]() |
b83d165764 | ||
![]() |
895f9613d2 | ||
![]() |
602d2a65dd | ||
![]() |
879c874330 | ||
![]() |
153f078bd1 | ||
![]() |
9a478bef1a | ||
![]() |
a1c551c6c4 | ||
![]() |
e44eae3cd5 | ||
![]() |
814952c01d | ||
![]() |
6baf8bccb1 | ||
![]() |
f46ffb98a6 | ||
![]() |
65d003507b | ||
![]() |
251f90cd31 | ||
![]() |
8e870f0eda | ||
![]() |
7c05e498fc | ||
![]() |
eed53a5b44 | ||
![]() |
9909c83012 | ||
![]() |
73a3d4a183 | ||
![]() |
ae95111006 | ||
![]() |
8730f22371 | ||
![]() |
a5329efb23 | ||
![]() |
b4d67499a7 | ||
![]() |
543c0ba30d | ||
![]() |
47137b1489 | ||
![]() |
7b448f59e2 | ||
![]() |
2cb3b91913 | ||
![]() |
2433f30b4b | ||
![]() |
b44b7dd310 | ||
![]() |
632d064b21 | ||
![]() |
bc3983a3dd | ||
![]() |
f501d42e47 | ||
![]() |
4b2f6b2b5f | ||
![]() |
3fd48a14a2 | ||
![]() |
55e76dab47 | ||
![]() |
8d576aaf2b | ||
![]() |
e5271dbdc3 | ||
![]() |
e8829538c9 | ||
![]() |
c563b53afb | ||
![]() |
e19616592d | ||
![]() |
24566c0cf3 | ||
![]() |
a386cedae6 | ||
![]() |
83f6ae148a | ||
![]() |
f9a2d89ed2 | ||
![]() |
b4da7b6777 | ||
![]() |
4ad1fa85a4 | ||
![]() |
892813de76 | ||
![]() |
83a4eb0852 | ||
![]() |
a4e307ed96 | ||
![]() |
65a21ab416 | ||
![]() |
1b249ac1e1 | ||
![]() |
e0854696b4 | ||
![]() |
f951f0c536 | ||
![]() |
e36a80f730 | ||
![]() |
d21422687a | ||
![]() |
9a7d4ccb79 | ||
![]() |
5baab54f93 | ||
![]() |
721d18589f | ||
![]() |
dccd61bef9 | ||
![]() |
9c991bd079 | ||
![]() |
81d8302d53 | ||
![]() |
a43d49ed72 | ||
![]() |
0c60af8981 | ||
![]() |
9609ebf49a | ||
![]() |
55380f8489 | ||
![]() |
266df463cc | ||
![]() |
5fec3ef895 | ||
![]() |
396b830db5 | ||
![]() |
034e9ba1b8 | ||
![]() |
d7f4be0715 | ||
![]() |
baf7d7d19a | ||
![]() |
632d16e27d | ||
![]() |
f6db1ef9c5 | ||
![]() |
9b3b28c81f | ||
![]() |
391555a063 | ||
![]() |
63e320d405 | ||
![]() |
59b7412772 | ||
![]() |
718f7a0161 | ||
![]() |
dee602464b | ||
![]() |
baf225dc01 | ||
![]() |
6945511e82 | ||
![]() |
e1f3f84e84 | ||
![]() |
eb1b2535f6 | ||
![]() |
566a8d17c8 | ||
![]() |
af38e18389 | ||
![]() |
37ce51b274 | ||
![]() |
498c172d8e | ||
![]() |
272d9d58e3 | ||
![]() |
7b4831f1b7 | ||
![]() |
bdbc05c0dc | ||
![]() |
e3ef738264 | ||
![]() |
03720b30a1 | ||
![]() |
ddaa4a304d | ||
![]() |
24c7549698 | ||
![]() |
c5f605e888 | ||
![]() |
5c8191f8a7 | ||
![]() |
923f4b9bbd | ||
![]() |
e103320ad8 | ||
![]() |
7367140fb4 | ||
![]() |
df7a058216 | ||
![]() |
1ba5f1515d | ||
![]() |
0b7373446d | ||
![]() |
767ac9bc3e | ||
![]() |
6f9c176d93 | ||
![]() |
538dfa010d | ||
![]() |
2eb7e96f4b | ||
![]() |
093042b760 | ||
![]() |
434e460c18 | ||
![]() |
65474c621c |
6
.github/FUNDING.yml
vendored
@@ -1,8 +1,8 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: raylib
|
||||
github: raysan5
|
||||
patreon: # raylib
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: raysan
|
||||
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
Normal file
@@ -0,0 +1 @@
|
||||
blank_issues_enabled: false
|
10
.github/ISSUE_TEMPLATE/new-issue-template.md
vendored
@@ -7,6 +7,16 @@ 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/VkzNHUE) 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
|
||||
|
72
.github/workflows/android.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
name: Android
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
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 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="C:\PROGRA~2\Android\android-sdk\ndk-bundle" 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="C:\PROGRA~2\Android\android-sdk\ndk-bundle" 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
|
||||
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'
|
||||
|
92
.github/workflows/linux.yml
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
name: Linux
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
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) 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" CFLAGS="-m32"
|
||||
# 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"
|
||||
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
|
||||
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'
|
77
.github/workflows/macos.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
name: macOS
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
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
|
||||
# TODO: Support Universal ARCH libraries (build arm64 + x86_64 and merge)
|
||||
- name: Build Library
|
||||
run: |
|
||||
cd src
|
||||
clang --version
|
||||
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION"
|
||||
# make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC RAYLIB_LIB_NAME=raylib_x86_64 CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION"
|
||||
# make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC RAYLIB_LIB_NAME=raylib_arm64 CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" -B
|
||||
# lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.a libraylib_x86_64.a libraylib_arm64.a
|
||||
make clean
|
||||
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION"
|
||||
# make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_LIB_NAME=raylib_x86_64 CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" -B
|
||||
# make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_LIB_NAME=raylib_arm64 CFLAGS="-target i686-apple-macos -DGL_SILENCE_DEPRECATION" -B
|
||||
# lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.3.1.0.dylib libraylib_x86_64.3.1.0.dylib libraylib_arm64.3.1.0.dylib
|
||||
# cp -v ./libraylib_arm64.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.dylib
|
||||
# cp -v ./libraylib_arm64.310.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.310.dylib
|
||||
cd ..
|
||||
|
||||
- name: Generate Artifacts
|
||||
run: |
|
||||
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
|
||||
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'
|
72
.github/workflows/webassembly.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
name: WebAssembly
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
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@v7
|
||||
with:
|
||||
version: 2.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-master" RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
|
||||
cd ..
|
||||
|
||||
- name: Generate Artifacts
|
||||
run: |
|
||||
copy /Y .\src\raylib.h .\build\${{ env.RELEASE_NAME }}\include\raylib.h
|
||||
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'
|
116
.github/workflows/windows.yml
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
name: Windows
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
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"
|
||||
VSBINPATH: "Win32"
|
||||
- compiler: msvc16
|
||||
bits: 64
|
||||
ARCH: "x64"
|
||||
VSBINPATH: "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/VS2017
|
||||
msbuild.exe raylib.sln /target:raylib /property:Configuration=Release /property:Platform=${{ matrix.ARCH }}
|
||||
copy /Y .\bin\${{ matrix.VSBINPATH }}\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 .\bin\${{ matrix.VSBINPATH }}\Release.DLL\raylib.dll .\..\..\build\${{ env.RELEASE_NAME }}\lib\raylib.dll
|
||||
copy /Y .\bin\${{ matrix.VSBINPATH }}\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
|
||||
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'
|
46
.gitignore
vendored
@@ -30,15 +30,14 @@ Thumbs.db
|
||||
*.cache
|
||||
*.ilk
|
||||
*.log
|
||||
.vs
|
||||
|
||||
[Bb]in
|
||||
[Dd]ebug/
|
||||
[Dd]ebug.win32/
|
||||
[Dd]ebug.DLL/
|
||||
*.sbr
|
||||
*.sdf
|
||||
obj/
|
||||
[R]elease/
|
||||
[Rr]elease.win32/
|
||||
_ReSharper*/
|
||||
[Tt]est[Rr]esult*
|
||||
ipch/
|
||||
@@ -52,7 +51,7 @@ packages/
|
||||
*.exe
|
||||
*.a
|
||||
*.bc
|
||||
!raylib.rc.o
|
||||
*.so
|
||||
|
||||
# Ignore all examples files
|
||||
examples/*
|
||||
@@ -60,7 +59,6 @@ examples/*
|
||||
!examples/*/
|
||||
# Unignore all examples files with extension
|
||||
!examples/*.c
|
||||
!examples/*.lua
|
||||
!examples/*.png
|
||||
# Unignore examples Makefile
|
||||
!examples/Makefile
|
||||
@@ -68,18 +66,6 @@ examples/*
|
||||
!examples/raylib_compile_execute.bat
|
||||
!examples/raylib_makefile_example.bat
|
||||
|
||||
# Ignore all games files
|
||||
games/*
|
||||
# Unignore all games dirs
|
||||
!games/*/
|
||||
# Unignore all games files with extension
|
||||
!games/*.c
|
||||
!games/*.lua
|
||||
!games/*.png
|
||||
# Unignore games makefile
|
||||
!games/Makefile
|
||||
!games/Makefile.Android
|
||||
|
||||
# Ignore files build by xcode
|
||||
*.mode*v*
|
||||
*.pbxuser
|
||||
@@ -94,45 +80,25 @@ xcschememanagement.plist
|
||||
xcuserdata/
|
||||
DerivedData/
|
||||
|
||||
# Visual Studio project
|
||||
project/VS2015.UWP/packages
|
||||
project/VS2017/packages
|
||||
|
||||
# Web examples
|
||||
docs/examples/web/*.html
|
||||
docs/examples/web/*/*.html
|
||||
!docs/examples/web/loader.html
|
||||
!docs/examples/web/core/loader.html
|
||||
!docs/examples/web/shapes/loader.html
|
||||
!docs/examples/web/text/loader.html
|
||||
!docs/examples/web/textures/loader.html
|
||||
!docs/examples/web/audio/loader.html
|
||||
!docs/examples/web/physac/loader.html
|
||||
!docs/examples/web/shaders/loader.html
|
||||
!docs/examples/web/models/loader.html
|
||||
# Jetbrains project
|
||||
.idea/
|
||||
cmake-build-debug/
|
||||
|
||||
# CMake stuff
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
CMakeScripts
|
||||
Testing
|
||||
TestingIfSymlinkWorks
|
||||
cmake_install.cmake
|
||||
install_manifest.txt
|
||||
compile_commands.json
|
||||
CTestTestfile.cmake
|
||||
build
|
||||
!templates/android_project/Makefile
|
||||
|
||||
# Unignore These makefiles...
|
||||
!examples/CMakeLists.txt
|
||||
!games/CMakeLists.txt
|
||||
|
||||
# Ignore Android generated files and folders
|
||||
templates/android_project/output
|
||||
|
||||
# Ignore GNU global tags
|
||||
GPATH
|
||||
GRTAGS
|
||||
GTAGS
|
||||
.vs
|
||||
|
166
.travis.yml
@@ -1,166 +0,0 @@
|
||||
language: c
|
||||
dist: trusty
|
||||
|
||||
git:
|
||||
depth: 3
|
||||
|
||||
# TODO we could use a 32 bit Docker container for running true 32-bit tests
|
||||
services:
|
||||
- docker
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
env: ARCH=i386
|
||||
sudo: required
|
||||
- os: linux
|
||||
env: ARCH=amd64 INSTALL_GLFW=YES USE_EXTERNAL_GLFW=OFF
|
||||
sudo: required
|
||||
- os: linux
|
||||
env: ARCH=amd64 INSTALL_GLFW=YES STATIC=OFF RELEASE=NO
|
||||
sudo: required
|
||||
- os: linux
|
||||
env: WAYLAND=ON ARCH=amd64 RELEASE=NO
|
||||
sudo: required
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libwayland-dev
|
||||
- libxkbcommon-dev
|
||||
- libegl1-mesa-dev
|
||||
- os: osx
|
||||
env: ARCH=universal
|
||||
- os: osx
|
||||
osx_image: xcode9.4
|
||||
env: ARCH=universal SHARED=OFF RELEASE=NO
|
||||
- os: linux
|
||||
env: ARCH=arm64-android RELEASE=NO
|
||||
sudo: required
|
||||
- os: linux
|
||||
env: ARCH=arm32-android RELEASE=NO
|
||||
sudo: required
|
||||
- os: linux
|
||||
env: ARCH=html5 RELEASE=NO
|
||||
sudo: required
|
||||
- os: windows
|
||||
compiler: gcc
|
||||
env: ARCH=i386 SHARED=OFF RELEASE=NO
|
||||
|
||||
before_script:
|
||||
|
||||
before_install:
|
||||
- if [ -z "$USE_EXTERNAL_GLFW" ]; then export USE_EXTERNAL_GLFW=IF_POSSIBLE; fi
|
||||
- if [ -z "$SHARED" ]; then export SHARED=ON ; fi
|
||||
- if [ -z "$STATIC" ]; then export STATIC=ON ; fi
|
||||
- if [[ "$INSTALL_GLFW" == "YES" && "$USE_EXTERNAL_GLFW" != "OFF" ]]; then
|
||||
export DONT_TEST=1;
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
|
||||
if [[ "$ARCH" == *-android ]]; then
|
||||
export DONT_TEST=1;
|
||||
export RAYLIB_PACKAGE_SUFFIX="-Android-arm64";
|
||||
wget https://dl.google.com/android/repository/android-ndk-r17-linux-x86_64.zip;
|
||||
unzip -qq android-ndk*.zip;
|
||||
if [[ "$ARCH" == arm64-* ]]; then
|
||||
export RAYLIB_PACKAGE_SUFFIX="-Android-arm64";
|
||||
TOOLCHAIN_ARCH=arm64;
|
||||
PREFIX=aarch64-linux-android-;
|
||||
else
|
||||
export RAYLIB_PACKAGE_SUFFIX="-Android-arm32";
|
||||
TOOLCHAIN_ARCH=arm;
|
||||
PREFIX=arm-linux-androideabi-;
|
||||
fi;
|
||||
android-ndk*/build/tools/make_standalone_toolchain.py --arch $TOOLCHAIN_ARCH --api 21 --install-dir /tmp/android-toolchain;
|
||||
export PATH=/tmp/android-toolchain/bin:$PATH;
|
||||
export CC=${PREFIX}clang;
|
||||
export CXX=${PREFIX}clang++;
|
||||
export CMAKE_ARCH_ARGS='-DPLATFORM=Android';
|
||||
elif [ "$ARCH" == "html5" ]; then
|
||||
export DONT_TEST=1;
|
||||
export RAYLIB_PACKAGE_SUFFIX="-html5";
|
||||
docker run --privileged=true -dit --name emscripten -v $(pwd):/src trzeci/emscripten:sdk-incoming-64bit bash;
|
||||
export CMAKE_ARCH_ARGS='-DPLATFORM=Web -DCMAKE_TOOLCHAIN_FILE=../cmake/emscripten.cmake';
|
||||
RUNNER='docker exec -it emscripten cmake -E chdir build';
|
||||
else
|
||||
sudo apt-get install -y gcc-multilib
|
||||
libasound2-dev:$ARCH
|
||||
libxcursor-dev:$ARCH libxinerama-dev:$ARCH mesa-common-dev:$ARCH
|
||||
libx11-dev:$ARCH libxrandr-dev:$ARCH libxrandr2:$ARCH libxi-dev:$ARCH
|
||||
libgl1-mesa-dev:$ARCH libglu1-mesa-dev:$ARCH;
|
||||
|
||||
if [ "$OPENAL" == "ON" ]; then sudo apt-get install -y libopenal-dev; fi;
|
||||
if [ "$ARCH" == "i386" ]; then export CMAKE_ARCH_ARGS='-DCMAKE_C_FLAGS=-m32 -DCMAKE_SYSTEM_LIBRARY_PATH=/usr/lib/i386-linux-gnu -DSUPPORT_FILEFORMAT_FLAC=OFF'; fi;
|
||||
|
||||
export RAYLIB_PACKAGE_SUFFIX="-Linux-$ARCH";
|
||||
if [ "$INSTALL_GLFW" == "YES" ]; then
|
||||
pushd src/external/glfw;
|
||||
cmake . -DGLFW_BUILD_DOCS=OFF
|
||||
-DGLFW_BUILD_TESTS=OFF
|
||||
-DGLFW_BUILD_EXAMPLES=OFF
|
||||
-DGLFW_INSTALL=ON
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DGLFW_USE_WAYLAND=$WAYLAND;
|
||||
make;
|
||||
sudo make install;
|
||||
popd;
|
||||
fi;
|
||||
fi;
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
export RAYLIB_PACKAGE_SUFFIX="-macOS";
|
||||
if [ "$INSTALL_GLFW" == "YES" ]; then brew update; brew install glfw; fi;
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then
|
||||
export DONT_TEST=1;
|
||||
export RAYLIB_PACKAGE_SUFFIX="-windows";
|
||||
export CMAKE_ARCH_ARGS='-DPLATFORM=Desktop';
|
||||
fi
|
||||
- mkdir build
|
||||
- $RUNNER $CC --version
|
||||
|
||||
script:
|
||||
- cd build
|
||||
- if test -n "$WAYLAND"; then
|
||||
wget https://mirrors.edge.kernel.org/ubuntu/pool/universe/e/extra-cmake-modules/extra-cmake-modules_5.44.0-0ubuntu1_amd64.deb;
|
||||
sudo apt-get clean;
|
||||
sudo apt-get update;
|
||||
sudo apt-get install dpkg;
|
||||
sudo dpkg -i extra-cmake-modules_5.44.0-0ubuntu1_amd64.deb;
|
||||
git clone git://anongit.freedesktop.org/wayland/wayland-protocols;
|
||||
pushd wayland-protocols;
|
||||
git checkout 1.15 && ./autogen.sh --prefix=/usr && make && sudo make install;
|
||||
popd;
|
||||
fi
|
||||
- $RUNNER cmake $CMAKE_ARCH_ARGS
|
||||
-DMACOS_FATLIB=ON
|
||||
-DSTATIC=$STATIC -DSHARED=$SHARED
|
||||
-DBUILD_EXAMPLES=ON -DBUILD_GAMES=ON
|
||||
-DUSE_EXTERNAL_GLFW=$USE_EXTERNAL_GLFW
|
||||
-DUSE_WAYLAND=$WAYLAND
|
||||
-DINCLUDE_EVERYTHING=ON
|
||||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
|
||||
..
|
||||
- $RUNNER cmake --build . --target
|
||||
- if [ "$RELEASE" != "NO" ]; then $RUNNER cmake --build . --target package; fi
|
||||
- if [ -n "$RUNNER" ]; then
|
||||
sudo $RUNNER cmake --build . --target install;
|
||||
else
|
||||
$(which sudo) $RUNNER "$(which cmake)" --build . --target install;
|
||||
fi
|
||||
- if [ ! "$DONT_TEST" ]; then
|
||||
pkg-config --static --libs raylib;
|
||||
nm -g release/libraylib.a | grep glfwGetProcAddress || (echo "libraylib.a doesn't contain GLFW symbols! Aborting..." && false);
|
||||
ctest --output-on-failure;
|
||||
fi
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
secure: LvqUIAN/3dJul+Ra2iK3tSaNG5IwsNMmGIwVMy0DK5IBCxiQPBc9pWGiE30RTBPt6Z+N4BhMEE8DtUl+vnISlMoHWNIIhF2zwC66hs/F7zY7qEITMRSmfiLcqxQysknFOnJB06CATgXcFqlEo9j+t4abrG/f3qcb92J4O2uNz336Au2myTx93Q5MxbyA7KiUuEutFnb2dWiPCY4d+sGeXEfsiD2R7aj/8MaWOkoGdZVrTkI9juMgvpImkjQBArvqdjUMeT3MsRrwgOIq5v2GFV9dOl8k1WzPeT8B2JHh00ed/o1/wuFq/cLLOxtYo2+Pv3+xatOrlexoX0WkDm7C9/L1W5U4rLexU3CQ9mMBmHPnp6k/WXZ5QXEE4uUF0+LpN3XlIXzFpdZmZiVV8VLxg2WvyncMmivYiu7/MTkyfZxyKkzwl7sZZslzHA9kOGedGaN7b7/2B77OFHoQK8lKfdFml7jJnarh+89nenNZYMab0E8qkOJOyb2bYlDTa0/2nyxGiyymYgq6YHLNrDbhqB/1LzdgzjMliQ8ri5q9Ux2vjfcqOzhfAmcwFwnY/D6yXJWYi0DWpHZdpKl3du6dYDrypW91/yDWbwiJ/YhrE7ZunzrcB6GH/QkbuzWxdCth39rQAHih8DG01co/K3Gvi4yGjvIH5tFUpyEolMnpMiA=
|
||||
file_glob: true
|
||||
file: raylib-*.tar.gz
|
||||
skip_cleanup: true
|
||||
on:
|
||||
repo: raysan5/raylib
|
||||
branch: master
|
||||
tags: true
|
121
BINDINGS.md
@@ -1,33 +1,98 @@
|
||||
### raylib bindings
|
||||
## raylib bindings
|
||||
|
||||
Some people ported raylib to other languages in form of bindings or wrappers to the library, here is a list with the ones I'm aware of:
|
||||
Some people ported raylib to other languages in form of bindings or wrappers to the library.
|
||||
|
||||
Here it is a list with the ones I'm aware of:
|
||||
|
||||
| name | raylib version | language | repo |
|
||||
|:------------------:|:-------------: | :--------:|----------------------------------------------------------------------|
|
||||
| raylib | **3.1-dev** | [C](https://en.wikipedia.org/wiki/C_(programming_language)) | https://github.com/raysan5/raylib |
|
||||
| raylib-cpp | 3.1-dev | [C++](https://en.wikipedia.org/wiki/C%2B%2B) | https://github.com/robloach/raylib-cpp |
|
||||
| Raylib-cs | 3.0 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | https://github.com/ChrisDill/Raylib-cs |
|
||||
| raylib-cppsharp | 2.5 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | https://github.com/phxvyper/raylib-cppsharp |
|
||||
| raylib-boo | 3.0 | [Boo](http://boo-language.github.io/) | https://github.com/Rabios/raylib-boo |
|
||||
| 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 |
|
||||
| raylib-d | 3.0 | [D](https://dlang.org/) | https://github.com/onroundit/raylib-d |
|
||||
| bindbc-raylib | 3.0 | [D](https://dlang.org/) | https://github.com/o3o/bindbc-raylib |
|
||||
| dray | 3.0 | [D](https://dlang.org/) | https://github.com/xdrie/dray |
|
||||
| raylib-go | 3.0 | [Go](https://golang.org/) | https://github.com/gen2brain/raylib-go |
|
||||
| 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 |
|
||||
| go-raylib | 3.1-dev | [Go](https://golang.org/) | https://github.com/chunqian/go-raylib |
|
||||
| raylib-rs | 3.0 | [Rust](https://www.rust-lang.org/) | https://github.com/deltaphc/raylib-rs |
|
||||
| raylib-lua | 1.7 | [Lua](http://www.lua.org/) | https://github.com/raysan5/raylib-lua |
|
||||
| raylib-lua-ffi | 2.0 | [Lua](http://www.lua.org/) | https://github.com/raysan5/raylib/issues/693 |
|
||||
| raylib-lua-sol | 2.5 | [Lua](http://www.lua.org/) | https://github.com/RobLoach/raylib-lua-sol |
|
||||
| raylib-lua | 3.0 | [Lua](http://www.lua.org/) | https://github.com/TSnake41/raylib-lua |
|
||||
| raylib-luamore | 3.0 | [Lua](http://www.lua.org/) | https://github.com/HDPLocust/raylib-luamore |
|
||||
| raylua | 3.0 | [Lua](http://www.lua.org/) | https://github.com/Rabios/raylua |
|
||||
| LuaJIT-Raylib | 2.6 | [Lua](http://www.lua.org/) | https://github.com/Bambofy/LuaJIT-Raylib |
|
||||
| raylib-nelua | 3.0 | [Nelua](https://nelua.io/) | https://github.com/Andre-LA/raylib-nelua |
|
||||
| raylib-Nim | ? | [Nim](https://nim-lang.org/) | https://gitlab.com/define-private-public/raylib-Nim |
|
||||
| raylib-nim | 2.0 | [Nim](https://nim-lang.org/) | https://github.com/Skrylar/raylib-nim |
|
||||
| raylib-Forever | 3.1-dev | [Nim](https://nim-lang.org/) | https://github.com/Guevara-chan/Raylib-Forever |
|
||||
| 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 | ? | [Crystal](https://crystal-lang.org/) | https://github.com/AregevDev/raylib-cr |
|
||||
| cray | 1.8 | [Crystal](https://crystal-lang.org/) | https://gitlab.com/Zatherz/cray |
|
||||
| raylib.cr | ? | [Crystal](https://crystal-lang.org/) | https://github.com/sam0x17/raylib.cr |
|
||||
| raylib-pascal | 2.0 | [Pascal](https://en.wikipedia.org/wiki/Pascal_(programming_language)) | https://github.com/drezgames/raylib-pascal |
|
||||
| raylib-pas | 3.0 | [Pascal](https://en.wikipedia.org/wiki/Pascal_(programming_language)) | https://github.com/tazdij/raylib-pas |
|
||||
| Graphics-Raylib | ? | [Perl](https://www.perl.org/) | https://github.com/athreef/Graphics-Raylib |
|
||||
| raylib-ruby-ffi | ? | [Ruby](https://www.ruby-lang.org/en/) | https://github.com/D3nX/raylib-ruby-ffi |
|
||||
| raylib-ruby | 2.6 | [Ruby](https://www.ruby-lang.org/en/) | https://github.com/a0/raylib-ruby |
|
||||
| raylib-mruby | ? | [mruby](https://github.com/mruby/mruby) | https://github.com/lihaochen910/raylib-mruby |
|
||||
| raylib-py | 2.0 | [Python](https://www.python.org/) | https://github.com/overdev/raylib-py |
|
||||
| raylib-python-cffi | 3.1-dev | [Python](https://www.python.org/) | https://github.com/electronstudio/raylib-python-cffi |
|
||||
| raylib-py-ctbg | 2.6 | [Python](https://www.python.org/) | https://github.com/overdev/raylib-py-ctbg |
|
||||
| jaylib | 3.0 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | https://github.com/electronstudio/jaylib/ |
|
||||
| raylib-java | 2.0 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | https://github.com/XoanaIO/raylib-java |
|
||||
| clj-raylib | ? | [Clojure](https://clojure.org/) | https://github.com/lsevero/clj-raylib |
|
||||
| node-raylib | 3.0 | [Node.js](https://nodejs.org/en/) | https://github.com/RobLoach/node-raylib |
|
||||
| QuickJS-raylib | 3.0 | [QuickJS](https://bellard.org/quickjs/) | https://github.com/sntg-p/QuickJS-raylib |
|
||||
| raylib-js | 2.6 | [JavaScript](https://en.wikipedia.org/wiki/JavaScript) | https://github.com/RobLoach/raylib-js |
|
||||
| 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 | 3.0 | [PHP](https://en.wikipedia.org/wiki/PHP) | https://github.com/joseph-montanez/raylib-php |
|
||||
| raylib-php-ffi | 2.4-dev | [PHP](https://en.wikipedia.org/wiki/PHP) | https://github.com/oraoto/raylib-php-ffi |
|
||||
| raylib-phpcpp | 3.0 | [PHP](https://en.wikipedia.org/wiki/PHP) | https://github.com/oraoto/raylib-phpcpp |
|
||||
| raylib-factor | 2.5 | [Factor](https://factorcode.org/) | https://github.com/ArnautDaniel/raylib-factor |
|
||||
| gforth-raylib | 3.0 | [Gforth](https://gforth.org/) | https://github.com/ArnautDaniel/gforth-raylib |
|
||||
| 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 |
|
||||
| cl-raylib | 3.0 | [Common Lisp](https://common-lisp.net/) | https://github.com/longlene/cl-raylib |
|
||||
| raylib-scm | 2.5 | [Chicken Scheme](https://www.call-cc.org/) | https://github.com/yashrk/raylib-scm |
|
||||
| raylib-chibi | ? | [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-wren | 3.0 | [Wren](http://wren.io/) | https://github.com/TSnake41/raylib-wren |
|
||||
| raylib-odin | 3.0 | [Odin](https://odin-lang.org/) | https://github.com/kevinw/raylib-odin |
|
||||
| raylib-zig | 3.0 | [Zig](https://ziglang.org/) | https://github.com/Not-Nik/raylib-zig |
|
||||
| raylib-jai | 3.1-dev | [Jai](https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md) | https://github.com/kevinw/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 |
|
||||
| vraylib | 2.5 | [V](https://vlang.io/) | https://github.com/MajorHard/vraylib |
|
||||
| hb-raylib | 3.0 | [Harbour](https://harbour.github.io/) | https://github.com/rjopek/hb-raylib |
|
||||
| ray.mod | 3.0 | [BlitzMax](https://blitzmax.org/) | https://github.com/bmx-ng/ray.mod |
|
||||
| ray-ocaml | 3.0 | [OCaml](https://ocaml.org/) | https://github.com/tjammer/raylib-ocaml |
|
||||
| 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-smallBasic | 3.1-dev | [SmallBASIC](https://github.com/smallbasic/SmallBASIC) | https://github.com/smallbasic/smallbasic.plugins/tree/master/raylib |
|
||||
| raylib-ats2 | ? | [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 | ? | [COBOL](https://en.wikipedia.org/wiki/COBOL) | *[code examples](https://github.com/Martinfx/Cobol/tree/master/OpenCobol/Games/raylib)* |
|
||||
|
||||
- [raylib](https://github.com/raysan5/raylib) : raylib **C/C++** version (default)
|
||||
- [raylib-lua](https://github.com/raysan5/raylib-lua) : raylib **Lua** binding
|
||||
- [raylib-lua-ffi](https://github.com/raysan5/raylib/issues/693) : raylib **Lua** ffi binding
|
||||
- [raylib-go](https://github.com/gen2brain/raylib-go) : raylib **Go** binding
|
||||
- [raylib-Nim](https://gitlab.com/define-private-public/raylib-Nim) : raylib **Nim** binding
|
||||
- [raylib-cr](https://github.com/AregevDev/raylib-cr) : raylib **Crystal** binding
|
||||
- [cray](https://gitlab.com/Zatherz/cray) - raylib **Crystal** binding
|
||||
- [Graphics::Raylib](https://metacpan.org/pod/Graphics::Raylib) : raylib **Perl** wrapper
|
||||
- [raylib-pascal](https://github.com/drezgames/raylib-pascal) - raylib **Pascal** binding
|
||||
- [Raylib-cs](https://github.com/ChrisDill/Raylib-cs) : raylib **C#** binding
|
||||
- [RaylibSharp](https://github.com/TheLumaio/RaylibSharp) : raylib **C#** binding
|
||||
- [raylib-ruby-ffi](https://github.com/D3nX/raylib-ruby-ffi) : raylib **Ruby** binding
|
||||
- [raylib-rs](https://github.com/deltaphc/raylib-rs) : raylib **Rust** binding
|
||||
- [raylib-py](https://github.com/overdev/raylib-py) : raylib **Python** binding
|
||||
- [raylib-haskell](https://github.com/DevJac/raylib-haskell) : raylib **Haskell** binding
|
||||
- [raylib-java](https://github.com/XoanaIO/raylib-java) : raylib **Java** binding
|
||||
- [raylib-chaiscript](https://github.com/RobLoach/raylib-chaiscript) : raylib **ChaiScript** binding
|
||||
- [node-raylib](https://github.com/RobLoach/node-raylib) : **Node.js** raylib binding
|
||||
- [raylib-odin](https://github.com/kevinw/raylib-odin): **Odin** raylib binding
|
||||
- [raylib-factor](https://github.com/Silverbeard00/raylib-factor): **Factor** raylib binding
|
||||
- *[raylib COBOL Usage example](https://github.com/Martinfx/Cobol/tree/master/OpenCobol/Games/raylib)*
|
||||
- *raylib flat-assembler Usage example*: not uploaded yet...
|
||||
|
||||
Missing some language? Check the [bindings not yet in this list](https://gist.github.com/raysan5/5764cc5b885183f523fce47f098f3d9b#bindings-not-yet-in-the-official-list) or create a new binding! :)
|
||||
|
||||
Missing some language? Feel free to create a new binding! :)
|
||||
|
||||
Usually, raylib bindings follow the convention: `raylib-{language}`
|
||||
|
||||
Let me know if you're writing a new binding for raylib, I will list it here and I usually
|
||||
provide the icon/logo for that new language binding.
|
||||
Let me know if you're writing a new binding for raylib, I will list it here!
|
||||
|
350
CHANGELOG
@@ -1,7 +1,355 @@
|
||||
changelog
|
||||
---------
|
||||
|
||||
Current Release: raylib 2.5.0 (31 May 2019)
|
||||
Current Release: raylib 3.5.0 (25 December 2020)
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
Release: raylib 3.5 - 7th Anniversary Edition (25 December 2020)
|
||||
-------------------------------------------------------------------------
|
||||
KEY CHANGES:
|
||||
- [core] ADDED: PLATFORM_DRM to support RPI4 and other devices (#1388) by @kernelkinetic
|
||||
- [core] REDESIGNED: Window states management system through FLAGS
|
||||
- [rlgl] ADDED: RenderBatch type and related functions to allow custom batching (internal only)
|
||||
- [rlgl] REDESIGNED: Framebuffers API to support multiple attachment types (#721)
|
||||
- [textures] REDESIGNED: Image*() functions, big performance improvements (software rendering)
|
||||
- [*] REVIEWED: Multiple functions to replace file accesses by memory accesses
|
||||
- [*] ADDED: GitHub Actions CI to support multiple raylib build configurations
|
||||
|
||||
Detailed changes:
|
||||
[core] ADDED: SetWindowState() / ClearWindowState() -> New flags added!
|
||||
[core] ADDED: IsWindowFocused()
|
||||
[core] ADDED: GetWindowScaleDPI()
|
||||
[core] ADDED: GetMonitorRefreshRate() (#1289) by @Shylie
|
||||
[core] ADDED: IsCursorOnScreen() (#1262) by @ChrisDill
|
||||
[core] ADDED: SetMouseCursor() and GetMouseCursor() for standard Desktop cursors (#1407) by @chances
|
||||
[core] REMOVED: struct RenderTexture2D: depthTexture variable
|
||||
[core] REMOVED: HideWindow() / UnhideWindow() -> Use SetWindowState()
|
||||
[core] REMOVED: DecorateWindow() / UndecorateWindow() -> Use SetWindowState()
|
||||
[core] RENAMED: GetExtension() to GetFileExtension()
|
||||
[core] REVIEWED: Several structs to reduce size and padding
|
||||
[core] REVIEWED: struct Texture maps to Texture2D and TextureCubemap
|
||||
[core] REVIEWED: ToggleFullscreen() (#1287)
|
||||
[core] REVIEWED: InitWindow(), support empty title for window (#1323)
|
||||
[core] REVIEWED: RPI: Mouse movements are bound to the screen resolution (#1392) (#1410) by @kernelkinetic
|
||||
[core] REVIEWED: GetPrevDirectoryPath() fixes on Unix-like systems (#1246) by @ivan-cx
|
||||
[core] REPLACED: rgif.h by msf_gif.h for automatic gif recording
|
||||
[core] REDESIGNED: GetMouseWheelMove() to return float movement for precise scrolling (#1397) by @Doy-lee
|
||||
[core] REDESIGNED: GetKeyPressed(), and added GetCharPressed() (#1336)
|
||||
[core] UWP rework with improvements (#1231) by @Rover656
|
||||
[core] Gamepad axis bug fixes and improvement (#1228) by @mmalecot
|
||||
[core] Updated joystick mappings with latest version of gamecontrollerdb (#1381) by @coderoth
|
||||
[rlgl] Corrected issue with OpenGL 1.1 support
|
||||
[rlgl] ADDED: rlDrawMeshInstanced() (#1318) by @seanpringle
|
||||
[rlgl] ADDED: rlCheckErrors (#1321) by @seanpringle
|
||||
[rlgl] ADDED: BLEND_SET blending mode (#1251) by @RandomErrorMessage
|
||||
[rlgl] ADDED: rlSetLineWidth(), rlGetLineWidth(), rlEnableSmoothLines(), rlDisableSmoothLines() (#1457) by @JeffM2501
|
||||
[rlgl] RENAMED: rlUnproject() to Vector3Unproject() [raymath]
|
||||
[rlgl] REVIEWED: Replace rlglDraw() calls by DrawRenderBatch() internal calls
|
||||
[rlgl] REVIEWED: GenTextureCubemap(), use rlgl functionality only
|
||||
[rlgl] REVIEWED: rlFramebufferAttach() to support texture layers
|
||||
[rlgl] REVIEWED: GenDrawCube() and GenDrawQuad()
|
||||
[rlgl] REVIEWED: Issues with vertex batch overflow (#1223)
|
||||
[rlgl] REVIEWED: rlUpdateTexture(), issue with offsets
|
||||
[rlgl] REDESIGNED: GenTexture*() to use the new fbo API (#721)
|
||||
[raymath] ADDED: Normalize() and Remap() functions (#1247) by @NoorWachid
|
||||
[raymath] ADDED: Vector2Reflect() (#1400) by @daniel-junior-dube
|
||||
[raymath] ADDED: Vector2LengthSqr() and Vector3LengthSqr() (#1248) by @ThePituLegend
|
||||
[raymath] ADDED: Vector2MoveTowards() function (#1233) by @anatagawa
|
||||
[raymath] REVIEWED: Some functions consistency (#1197) by @Not-Nik
|
||||
[raymath] REVIEWED: QuaternionFromVector3ToVector3() (#1263) by @jvocaturo
|
||||
[raymath] REVIEWED: MatrixLookAt(), optimized (#1442) by @RandomErrorMessage
|
||||
[shapes] ADDED: CheckCollisionLines(), by @Elkantor
|
||||
[text] Avoid [textures] functions dependencies
|
||||
[text] ADDED: Config flag: SUPPORT_TEXT_MANIPULATION
|
||||
[text] ADDED: LoadFontFromMemory() (TTF only) (#1327)
|
||||
[text] ADDED: UnloadFontData()
|
||||
[text] RENAMED: FormatText() -> TextFormat()
|
||||
[text] REVIEWED: Font struct, added charsPadding (#1432)
|
||||
[text] REVIEWED: TextJoin()
|
||||
[text] REVIEWED: TextReplace() (#1172)
|
||||
[text] REVIEWED: LoadBMFont() to load data from memory (#1232)
|
||||
[text] REVIEWED: GenImageFontAtlas(), fixed offset (#1171)
|
||||
[text] REDESIGNED: LoadFontData(), reviewed input parameters
|
||||
[text] REDESIGNED: LoadFontDefault(), some code simplifications
|
||||
[text] REDESIGNED: LoadFontFromImage(), avoid LoadImageEx()
|
||||
[text] REDESIGNED: LoadFontData(), avoid GenImageColor(), ImageFormat()
|
||||
[text] REDESIGNED: LoadBMFont(), avoid ImageCopy(), ImageFormat(), ImageAlphaMask()
|
||||
[textures] Move Color functions from [core] to [textures] module
|
||||
[textures] ADDED: ColorAlphaBlend()
|
||||
[textures] ADDED: GetPixelColor()
|
||||
[textures] ADDED: SetPixelColor()
|
||||
[textures] ADDED: LoadImageFromMemory() (#1327)
|
||||
[textures] ADDED: LoadImageAnim() to load animated sequence of images
|
||||
[textures] ADDED: DrawTextureTiled() (#1291) - @Demizdor
|
||||
[textures] ADDED: UpdateTextureRec()
|
||||
[textures] ADDED: UnloadImageColors(), UnloadImagePalette(), UnloadWaveSamples()
|
||||
[textures] REMOVED: Config flag: SUPPORT_IMAGE_DRAWING
|
||||
[textures] REMOVED: LoadImageEx()
|
||||
[textures] REMOVED: LoadImagePro()
|
||||
[textures] REMOVED: GetImageDataNormalized(), not exposed in the API
|
||||
[textures] RENAMED: ImageExtractPalette() to GetImagePalette()
|
||||
[textures] RENAMED: Fade() to ColorAlpha(), added #define for compatibility
|
||||
[textures] RENAMED: GetImageData() -> LoadImageColors()
|
||||
[textures] RENAMED: GetImagePalette() -> LoadImagePalette()
|
||||
[textures] RENAMED: GetWaveData() -> LoadWaveSamples()
|
||||
[textures] REVIEWED: GetPixelDataSize() to consider compressed data properly
|
||||
[textures] REVIEWED: GetTextureData(), allow retrieving 32bit float data
|
||||
[textures] REVIEWED: ImageDrawText*() params order
|
||||
[textures] REVIEWED: ColorAlphaBlend(), support tint color
|
||||
[textures] REVIEWED: ColorAlphaBlend(), integers-version, optimized (#1218)
|
||||
[textures] REVIEWED: ImageDraw(), consider negative source offset properly (#1283)
|
||||
[textures] REVIEWED: ImageDraw(), optimizations test (#1218)
|
||||
[textures] REVIEWED: ImageResizeCanvas(), optimization (#1218)
|
||||
[textures] REVIEWED: ExportImage(), optimized
|
||||
[textures] REVIEWED: ImageAlphaPremultiply(), optimization
|
||||
[textures] REVIEWED: ImageAlphaClear(), minor optimization
|
||||
[textures] REVIEWED: ImageToPOT(), renamed parameter
|
||||
[textures] REVIEWED: ImageCrop() (#1218)
|
||||
[textures] REVIEWED: ImageToPOT() (#1218)
|
||||
[textures] REVIEWED: ImageAlphaCrop() (#1218)
|
||||
[textures] REVIEWED: ExportImage(), optimized (#1218)
|
||||
[textures] REDESIGNED: ImageCrop(), optimized (#1218)
|
||||
[textures] REDESIGNED: ImageRotateCCW(), optimized (#1218)
|
||||
[textures] REDESIGNED: ImageRotateCW(), optimized (#1218)
|
||||
[textures] REDESIGNED: ImageFlipHorizontal(), optimized (#1218)
|
||||
[textures] REDESIGNED: ImageFlipVertical(), optimized (#1218)
|
||||
[textures] REDESIGNED: ImageResizeCanvas(), optimized (#1218)
|
||||
[textures] REDESIGNED: ImageDrawPixel(), optimized
|
||||
[textures] REDESIGNED: ImageDrawLine(), optimized
|
||||
[textures] REDESIGNED: ImageDraw(), optimized (#1218)
|
||||
[textures] REDESIGNED: ImageResize(), optimized (#1218)
|
||||
[textures] REDESIGNED: ImageFromImage(), optimized (#1218)
|
||||
[textures] REDESIGNED: ImageDraw(), optimization (#1218)
|
||||
[textures] REDESIGNED: ImageAlphaClear(), optimized (#1218)
|
||||
[textures] REDESIGNED: ExportImageAsCode() to use memory buffer (#1232)
|
||||
[textures] REDESIGNED: ColorFromHSV()
|
||||
[models] ADDED: DrawTriangle3D() and DrawTriangleStrip3D()
|
||||
[models] ADDED: UnloadModelKeepMeshes()
|
||||
[models] REVIEWED: LoadModel(), avoid loading texcoords and normals from model if not existent
|
||||
[models] REVIEWED: GenMeshCubicmap(), added comments and simplification
|
||||
[models] REVIEWED: GenMeshCubicmap(), fixed generated normals (#1244) by @GoldenThumbs
|
||||
[models] REVIEWED: GenMeshPoly(), fixed buffer overflow (#1269) by @frithrah
|
||||
[models] REVIEWED: LoadOBJ(): Allow for multiple materials in obj files (#1408) by @chriscamacho and @codifies
|
||||
[models] REVIEWED: LoadIQM() materials loading (#1227) by @sikor666
|
||||
[models] REVIEWED: LoadGLTF() to read from memory buffer
|
||||
[models] REVIEWED: UpdateMesh(), fix extra memory allocated when updating color buffer (#1271) by @4yn
|
||||
[models] REVIEWED: MeshNormalsSmooth() (#1317) by @seanpringle
|
||||
[models] REVIEWED: DrawGrid() (#1417)
|
||||
[models] REDESIGNED: ExportMesh() to use memory buffer (#1232)
|
||||
[models] REDESIGNED: LoadIQM() and LoadModelAnimations() to use memory buffers
|
||||
[audio] ADDED: LoadWaveFromMemory() (#1327)
|
||||
[audio] REMOVED: SetMusicLoopCount()
|
||||
[audio] REVIEWED: Several functions, sampleCount vs frameCount (#1423)
|
||||
[audio] REVIEWED: SaveWAV() to use memory write insted of file
|
||||
[audio] REVIEWED: LoadMusicStream(), support WAV music streaming (#1198)
|
||||
[audio] REVIEWED: Support multiple WAV sampleSize for MusicStream (#1340)
|
||||
[audio] REVIEWED: SetAudioBufferPitch()
|
||||
[audio] REDESIGNED: Audio looping system
|
||||
[audio] REDESIGNED: LoadSound(): Use memory loading (WAV, OGG, MP3, FLAC) (#1312)
|
||||
[audio] REDESIGNED: ExportWaveAsCode() to use memory buffers
|
||||
[utils] ADDED: MemAlloc() / MemFree() (#1440)
|
||||
[utils] ADDED: UnloadFileData() / UnloadFileText()
|
||||
[utils] REVIEWED: android_fopen() to support SDCard access
|
||||
[utils] REDESIGNED: SaveFile*() functions to expose file access results (#1420)
|
||||
[rmem] REVIEWED: MemPool and other allocators optimization (#1211) by @assyrianic
|
||||
[examples] ADDED: core/core_window_flags
|
||||
[examples] ADDED: core/core_quat_conversion by @chriscamacho and @codifies
|
||||
[examples] ADDED: textures/textures_blend_modes (#1261) by @accidentalrebel
|
||||
[examples] ADDED: textures/textures_draw_tiled (#1291) by @Demizdor
|
||||
[examples] ADDED: shaders/shaders_hot_reloading (#1198)
|
||||
[examples] ADDED: shaders/shaders_rlgl_mesh_instanced (#1318) by @seanpringle
|
||||
[examples] ADDED: shaders/shaders_multi_sampler2d
|
||||
[examples] ADDED: others/embedded_files_loading
|
||||
[examples] REVIEWED: textures/textures_raw_data (#1286)
|
||||
[examples] REVIEWED: textures/textures_sprite_explosion, replace resources
|
||||
[examples] REVIEWED: textures/textures_particles_blending, replace resources
|
||||
[examples] REVIEWED: textures/textures_image_processing, support mouse
|
||||
[examples] REVIEWED: models/models_skybox to work on OpenGL ES 2.0
|
||||
[examples] REVIEWED: audio/resources, use open license resources
|
||||
[examples] REVIEWED: others/raudio_standalone.c
|
||||
[build] ADDED: New config.h configuration options exposing multiple #define values
|
||||
[build] REMOVED: ANGLE VS2017 template project
|
||||
[build] REVIEWED: All MSVC compile warnings
|
||||
[build] Updated Makefile for web (#1332) by @rfaile313
|
||||
[build] Updated build pipelines to use latest emscripten and Android NDK
|
||||
[build] Updated emscriptem build script to generate .a on WebAssembly
|
||||
[build] Updated Android build for Linux, supporting ANDROID_NDK at compile time by @branlix3000
|
||||
[build] Updated VSCode project template tasks
|
||||
[build] Updated VS2017.UWP project template by @Rover656
|
||||
[build] Updated Android build pipeline
|
||||
[build] REMOVED: AppVeyor and Travis CI build systems
|
||||
[*] Moved raysan5/raylib/games to independent repo: raysan5/raylib-games
|
||||
[*] Replaced several examples resources with more open licensed alternatives
|
||||
[*] Updated BINDINGS.md with NEW bindings and added raylib version binding!
|
||||
[*] Updated all external libraries to latest versions
|
||||
[*] Multiple code improvements and small fixes
|
||||
|
||||
-----------------------------------------------
|
||||
Release: raylib 3.0 (01 April 2020)
|
||||
-----------------------------------------------
|
||||
KEY CHANGES:
|
||||
- Global context states used on all modules.
|
||||
- Custom memory allocators for all modules and dependencies.
|
||||
- Centralized file access system and memory data loading.
|
||||
- Structures reviewed to reduce size and always be used as pass-by-value.
|
||||
- Tracelog messages completely reviewed and categorized.
|
||||
- raudio module reviewed to accomodate new Music struct and new miniaudio.
|
||||
- text module reviewed to improve fonts generation and text management functions.
|
||||
- Multiple new examples added and categorized examples table.
|
||||
- GitHub Actions CI implemented for Windows, Linux and macOS.
|
||||
|
||||
Detailed changes:
|
||||
[build] ADDED: VS2017.ANGLE project, by @msmshazan
|
||||
[build] ADDED: VS2017 project support for x64 platform configuration
|
||||
[build] ADDED: Makefile for Android building on macOS, by @Yunoinsky
|
||||
[build] ADDED: Makefile for Android building on Linux, by @pamarcos
|
||||
[build] REMOVED: VS2015 project
|
||||
[build] REVIEWED: VSCode project
|
||||
[build] REVIEWED: Makefile build system
|
||||
[build] REVIEWED: Android building, by @NimbusFox
|
||||
[build] REVIEWED: Compilation with CLion IDE, by @Rover656
|
||||
[build] REVIEWED: Generation of web examples, by @pamarcos
|
||||
[build] REVIEWED: Makefiles path to 'shell.html', by @niorad
|
||||
[build] REVIEWED: VS2017 64bit compilation issues, by @spec-chum
|
||||
[build] REVIEWED: Multiple fixes on projects building, by @ChrisDill, @JuDelCo, @electronstudio
|
||||
[core] ADDED: Support touch/mouse indistinctly
|
||||
[core] ADDED: FLAG_WINDOW_ALWAYS_RUN to avoid pause on minimize
|
||||
[core] ADDED: Config flag SUPPORT_HALFBUSY_WAIT_LOOP
|
||||
[core] ADDED: RPI mouse cursor point support on native mode
|
||||
[core] ADDED: GetWorldToScreen2D()- Get screen space position for a 2d camera world space position, by @arvyy
|
||||
[core] ADDED: GetScreenToWorld2D() - Get world space position for a 2d camera screen space position, by @arvyy
|
||||
[core] ADDED: GetWorldToScreenEx() - Get size position for a 3d world space position
|
||||
[core] ADDED: DirectoryExists() - Check if a directory path exists
|
||||
[core] ADDED: GetPrevDirectoryPath() - Get previous directory path for a given path
|
||||
[core] ADDED: CompressData() - Compress data (DEFLATE algorythm)
|
||||
[core] ADDED: DecompressData() - Decompress data (DEFLATE algorythm)
|
||||
[core] ADDED: GetWindowPosition() - Get window position XY on monitor
|
||||
[core] ADDED: LoadFileData() - Load file data as byte array (read)
|
||||
[core] ADDED: SaveFileData() - Save data to file from byte array (write)
|
||||
[core] ADDED: LoadFileText() - Load text data from file (read), returns a '\0' terminated string
|
||||
[core] ADDED: SaveFileText() - Save text data to file (write), string must be '\0' terminated
|
||||
[core] REMOVED: Show raylib logo at initialization
|
||||
[core] REVIEWED: GetFileName(), security checks
|
||||
[core] REVIEWED: LoadStorageValue(), by @danimartin82
|
||||
[core] REVIEWED: SaveStorageValue(), by @danimartin82
|
||||
[core] REVIEWED: IsMouseButtonReleased(), when press/release events come too fast, by @oswjk
|
||||
[core] REVIEWED: SetWindowMonitor(), by @DropsOfSerenity
|
||||
[core] REVIEWED: IsFileExtension() to be case-insensitive
|
||||
[core] REVIEWED: IsFileExtension() when checking no-extension files
|
||||
[core] REVIEWED: Default font scale filter for HighDPI mode
|
||||
[core] REVIEWED: Touch input scaling for PLATFORM_WEB
|
||||
[core] REVIEWED: RPI input system, by @DarkElvenAngel
|
||||
[core] REVIEWED: RPI input threads issues
|
||||
[core] REVIEWED: OpenGL extensions loading and freeing
|
||||
[core] REVIEWED: GetDirectoryPath()
|
||||
[core] REVIEWED: Camera2D behavior, by @arvyy
|
||||
[core] REVIEWED: OpenGL ES 2.0 extensions check
|
||||
[rlgl] ADDED: Flags to allow frustrum culling near/far distance configuration at compile time
|
||||
[rlgl] ADDED: Flags to sllow MAX_BATCH_BUFFERING config at compile time
|
||||
[rlgl] ADDED: GetMatrixProjection(), by @chriscamacho
|
||||
[rlgl] ADDED: rlUpdateMeshAt() - Update vertex or index data on GPU, at index, by @brankoku
|
||||
[rlgl] REVIEWED: Vertex padding not zeroed for quads, by @kawa-yoiko
|
||||
[rlgl] REVIEWED: Read texture data as RGBA from FBO on GLES 2.0
|
||||
[rlgl] REVIEWED: LoadShaderCode() for const correctness, by @heretique
|
||||
[rlgl] REVIEWED: rlLoadTexture()
|
||||
[rlgl] REVIEWED: rlReadTexturePixels()
|
||||
[rlgl] REVIEWED: rlUpdateMesh() to supports updating indices, by @brankoku
|
||||
[rlgl] REVIEWED: GenTextureCubemap(), renamed parameters for consistency
|
||||
[rlgl] REVIEWED: HDR pixels loading
|
||||
[raymath] ADDED: MatrixRotateXYZ(), by @chriscamacho
|
||||
[raymath] RENAMED: Vector3Multiply() to Vector3Scale()
|
||||
[camera] REVIEWED: Free camera pitch, by @chriscamacho
|
||||
[camera] REVIEWED: Camera not working properly at z-align, by @Ushio
|
||||
[shapes] ADDED: DrawTriangleStrip() - Draw a triangle strip defined by points
|
||||
[shapes] ADDED: DrawEllipse() - Draw ellipse
|
||||
[shapes] ADDED: DrawEllipseLines() - Draw ellipse outline
|
||||
[shapes] ADDED: DrawPolyLines() - Draw a polygon outline of n sides
|
||||
[shapes] REVIEWED: DrawPoly() shape rendering, by @AlexHCC
|
||||
[textures] ADDED: LoadAnimatedGIF() - Load animated GIF file
|
||||
[textures] ADDED: GetImageAlphaBorder() - Get image alpha border rectangle
|
||||
[textures] ADDED: ImageFromImage() - Create an image from another image piece
|
||||
[textures] ADDED: ImageClearBackground(), by @iamsouravgupta
|
||||
[textures] ADDED: ImageDrawPixel(), by @iamsouravgupta
|
||||
[textures] ADDED: ImageDrawCircle(), by @iamsouravgupta
|
||||
[textures] ADDED: ImageDrawLineEx(), by @iamsouravgupta
|
||||
[textures] ADDED: ImageDrawPixelV(), by @RobLoach
|
||||
[textures] ADDED: ImageDrawCircleV(), by @RobLoach
|
||||
[textures] ADDED: ImageDrawLineV(), by @RobLoach
|
||||
[textures] ADDED: ImageDrawRectangleV(), by @RobLoach
|
||||
[textures] ADDED: ImageDrawRectangleRec(), by @RobLoach
|
||||
[textures] REVIEWED: ImageDrawPixel(), by @RobLoach
|
||||
[textures] REVIEWED: ImageDrawLine(), by @RobLoach
|
||||
[textures] REVIEWED: ImageDrawCircle(), by @RobLoach
|
||||
[textures] REVIEWED: ImageDrawRectangle(), by @RobLoach
|
||||
[textures] REVIEWED: ImageDraw(), now it supports color tint parameter
|
||||
[textures] REVIEWED: ImageResizeCanvas()
|
||||
[textures] REVIEWED: ImageCrop() with security checks
|
||||
[textures] REVIEWED: ImageAlphaMask()
|
||||
[textures] REVIEWED: ImageDrawRectangleLines()
|
||||
[textures] REVIEWED: GetImageData()
|
||||
[text] ADDED: TextCopy() - Copy one string to another, returns bytes copied
|
||||
[text] ADDED: GetCodepoints() - Get all codepoints in a string
|
||||
[text] ADDED: CodepointToUtf8() - Encode codepoint into utf8 text
|
||||
[text] ADDED: DrawTextCodepoint() - Draw one character (codepoint)
|
||||
[text] RENAMED: LoadDefaultFont() -> LoadFontDefault()
|
||||
[text] RENAMED: TextCountCodepoints() -> GetCodepointsCount()
|
||||
[text] REVIEWED: TextFormat(), to support caching, by @brankoku
|
||||
[text] REVIEWED: LoadFontData(), generate empty image for space character
|
||||
[text] REVIEWED: TextSplit()
|
||||
[text] REVIEWED: TextToInteger()
|
||||
[text] REVIEWED: GetNextCodepoint(), renamed parameters for clarity
|
||||
[text] REVIEWED: GenImageFontAtlas(), improved atlas size computing
|
||||
[text] REDESIGNED: struct Font, character rectangles have been moved out from CharInfo to Font
|
||||
[text] REDESIGNED: struct CharInfo, now includes directly an Image of the glyph
|
||||
[text] REDESIGNED: GenImageFontAtlas(), additional recs parameter added
|
||||
[text] REDESIGNED: ImageTextEx(), to avoid font retrieval from GPU
|
||||
[models] ADDED: Support rlPushMatrix() and rlPopMatrix() on mesh drawing
|
||||
[models] ADDED: DrawPoint3D() - Draw a point in 3D space, actually a small line, by @ProfJski
|
||||
[models] ADDED: Multi texture support for materials in GLTF format, by @Gamerfiend, @chriscamacho
|
||||
[models] REVIEWED: LoadGLTF(), fixed memory leak, by @jubalh
|
||||
[models] REVIEWED: LoadIQM(), support multiple animations loading, by @culacant
|
||||
[models] REVIEWED: GetCollisionRayModel(), to avoid pointers
|
||||
[models] REVIEWED: CheckCollisionRay*(), parameters renamed
|
||||
[models] REVIEWED: UnloadMesh(), to avoid pointers
|
||||
[models] REVIEWED: LoadModel(), memory initialization
|
||||
[models] REVIEWED: UpdateModelAnimation(), added security checks
|
||||
[models] REVIEWED: Multiple fixes on models loading, by @jubalh
|
||||
[models] REVIEWED: Normals updated when using animated meshes, by @@las3rlars
|
||||
[models] REVIEWED: Compilation when the SUPPORT_MESH_GENERATION not set, by @@Elkantor
|
||||
[raudio] ADDED: Multi-channel audio playing, by @chriscamacho
|
||||
[raudio] REMOVED: LoadWaveEx()
|
||||
[raudio] RENAMED: IsAudioBufferProcessed() to IsAudioStreamProcessed()
|
||||
[raudio] REVIEWED: Ensure .xm playback starts in the right place, by @illegalinstruction
|
||||
[raudio] REVIEWED: Fix short non-looping sounds, by @jbosh
|
||||
[raudio] REVIEWED: Modules playing time to full length
|
||||
[raudio] REDESIGNED: Replaced Music pointer by struct
|
||||
[raudio] REDESIGNED: Removed sampleLeft from Music struct
|
||||
[examples] ADDED: core_scissor_test, by @ChrisDill
|
||||
[examples] ADDED: core_2d_camera_platformer, by @arvyy
|
||||
[examples] ADDED: textures_mouse_painting, by @ChrisDill
|
||||
[examples] ADDED: models_waving_cubes, by @codecat
|
||||
[examples] ADDED: models_solar_system, by @aldrinmartoq
|
||||
[examples] ADDED: shaders_fog, by @chriscamacho
|
||||
[examples] ADDED: shaders_texture_waves, by @Anata
|
||||
[examples] ADDED: shaders_basic_lighting, by @chriscamacho
|
||||
[examples] ADDED: shaders_simple_mask, by @chriscamacho
|
||||
[examples] ADDED: audio_multichannel_sound, by @chriscamacho
|
||||
[examples] ADDED: shaders_spotlight, by @chriscamacho
|
||||
[examples] RENAMED: text_sprite_font > text_font_spritefont
|
||||
[examples] RENAMED: text_ttf_loading > text_font_filters
|
||||
[examples] RENAMED: text_bmfont_ttf > text_font_loading
|
||||
[examples] REMOVED: models_obj_viewer
|
||||
[examples] REMOVED: models_solar_system
|
||||
[examples] REVIEWED: models_obj_loading > models_loading
|
||||
[examples] REVIEWED: models_materials_pbr, shader issues
|
||||
[examples] REVIEWED: core_window_letterbox, detailed explanation, by @jotac0
|
||||
[examples] REVIEWED: core_window_letterbox, virtual mouse, by @anatagawa
|
||||
[games] ADDED: GGJ2020 game - RE-PAIR
|
||||
[*] Misc fixes and tweaks, by @yaram, @oraoto, @zatherz, @piecedigital, @Shylie
|
||||
[*] Update ALL supported projects (Notepad++, VS2017)
|
||||
[*] Update ALL external libraries to latest versions (29.Jan.2020)
|
||||
[*] Update ALL examples and games
|
||||
[*] Update BINDINGS list
|
||||
|
||||
-----------------------------------------------
|
||||
Release: raylib 2.5 (May 2019)
|
||||
|
23
CMakeLists.txt
Normal file → Executable file
@@ -1,13 +1,25 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
|
||||
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(RAYLIB_IS_MAIN TRUE)
|
||||
else()
|
||||
set(RAYLIB_IS_MAIN FALSE)
|
||||
endif()
|
||||
|
||||
# Config options
|
||||
option(BUILD_EXAMPLES "Build the examples." ON)
|
||||
option(BUILD_GAMES "Build the example games." ON)
|
||||
option(BUILD_EXAMPLES "Build the examples." ${RAYLIB_IS_MAIN})
|
||||
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)
|
||||
|
||||
# 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()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS "3.1")
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
|
||||
@@ -22,8 +34,6 @@ add_if_flag_compiles(-Werror=implicit-function-declaration CMAKE_C_FLAGS)
|
||||
# src/external/jar_xm.h does shady stuff
|
||||
add_if_flag_compiles(-fno-strict-aliasing CMAKE_C_FLAGS)
|
||||
|
||||
include(CheckFileSystemSymlinkSupport)
|
||||
|
||||
if (ENABLE_ASAN)
|
||||
add_if_flag_compiles(-fno-omit-frame-pointer CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
||||
add_if_flag_compiles(-fsanitize=address CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
||||
@@ -44,11 +54,8 @@ endif()
|
||||
add_subdirectory(src)
|
||||
|
||||
if (${BUILD_EXAMPLES})
|
||||
MESSAGE(STATUS "Building examples is enabled")
|
||||
add_subdirectory(examples)
|
||||
endif()
|
||||
|
||||
if (${BUILD_GAMES})
|
||||
add_subdirectory(games)
|
||||
endif()
|
||||
|
||||
enable_testing()
|
||||
|
@@ -1,46 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at ray@raylib.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
@@ -6,26 +6,26 @@ Do you enjoy raylib and want to contribute? Nice! You can help with the followin
|
||||
|
||||
- C programming - Can you write/review/test/improve the code?
|
||||
- Documentation/Tutorials/Example - Can you write some tutorial/example?
|
||||
- Web Development - Can you help [with the web](https://github.com/raysan5/raylib.com)?
|
||||
- Porting to other platforms - Can you port and compile raylib on another systems?
|
||||
- Testing - Can you find some bugs on raylib?
|
||||
- Porting to other platforms - Can you port and 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 judgement, and feel free to propose changes to this document in a pull request.
|
||||
|
||||
### raylib philosophy
|
||||
|
||||
- raylib is a tool to enjoy videogames programming, every single function in raylib should be a tutorial on itself.
|
||||
- raylib is SIMPLE and EASY-TO-USE, I tried to keep it compact with a small set of functions, if a function is too complex or is not clearly useful, better not to include it.
|
||||
- raylib is open source and free; educators and institutions can use this tool to TEACH videogames programming completely by free.
|
||||
- raylib is collaborative; contribution of tutorials / code-examples / bugs-solving / code-comments are highly appreciated.
|
||||
- raylib's license (and its external libs respective licenses) allow using it for commercial products.
|
||||
- raylib is **SIMPLE** and **EASY-TO-USE**, I tried to keep it compact with a small set of functions, if a function is too complex or is not clearly useful, better not including it.
|
||||
- raylib is open source and free; educators and institutions can use this tool to **TEACH** videogames programming completely for free.
|
||||
- raylib is collaborative; contribution of tutorials / code examples / bug fixes / code comments are highly appreciated.
|
||||
- raylib's license (and its external libs respective licenses) allow using it on commercial projects.
|
||||
|
||||
### Some interesting reads to start with
|
||||
|
||||
- [raylib history](HISTORY.md)
|
||||
- [raylib architecture](https://github.com/raysan5/raylib/wiki/raylib-architecture)
|
||||
- [raylib license](LICENSE.md)
|
||||
- [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.
|
||||
@@ -36,13 +36,13 @@ Feel free to review it if required, just take care not to break something.
|
||||
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
|
||||
to make it easier for students to read, write and understand code.
|
||||
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:
|
||||
|
||||
> learn by reading code and examples
|
||||
|
||||
For detailed information on building raylib and examples, please check [raylib Wiki](https://github.com/raysan5/raylib/wiki).
|
||||
For detailed information on building raylib and examples, please see [raylib Wiki](https://github.com/raysan5/raylib/wiki).
|
||||
|
||||
### Opening new Issues
|
||||
|
||||
@@ -53,13 +53,13 @@ To open new issue for raylib (bug, enhancement, discussion...), just try to foll
|
||||
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.
|
||||
- On issue description, add a brackets tag about the raylib module that relates to this issue.
|
||||
If don't know the module, just report the issue, I will review it.
|
||||
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!
|
||||
|
||||
### Sending a Pull-Request
|
||||
|
||||
- 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-request, one at a time.
|
||||
- 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
|
||||
if you cannot test all the platforms.
|
||||
|
||||
@@ -107,15 +107,13 @@ contributing (in some way or another) to make the raylib project better. Huge th
|
||||
- [Richard Goodwin](https://github.com/AudioMorphology) for adding RPI touchscreen support.
|
||||
- [Milan Nikolic](https://github.com/gen2brain) for adding Android build support with custom standalone toolchain.
|
||||
- [Michael Vetter](https://github.com/jubalh) for improvements on build system and his work on Suse Linux package... and multiple fixes!
|
||||
- [Wilhem Barbier](https://github.com/nounoursheureux) for adding Image generation functions and some fixes.
|
||||
- [Wilhem Barbier](https://github.com/nounoursheureux) for adding Image generation functions, shaders work and some fixes.
|
||||
- [Benjamin Summerton](https://github.com/define-private-public) for improving OSX building and his amazing work on CMake build sytem.
|
||||
- [MartinFX](https://github.com/Martinfx) for adding compilation support for FreeBSD OS and derivatives.
|
||||
- [Wilhem Barbier](https://github.com/nounoursheureux) for supporting default shaders on shader loading, if shader not provided.
|
||||
- [Ahmad Fatoum](https://github.com/a3f) for implementing CI support for raylib (Travis and AppVeyor) and great improvements on build system.
|
||||
- [SamNChiet](https://github.com/SamNChiet) for a greatly improved UWP input implementation.
|
||||
- [David Reid](https://github.com/mackron) for a complete review of audio module to support his amazing miniaudio library.
|
||||
- [Kai](https://github.com/questor) for multiple code reviews and improvements.
|
||||
- [RDR8](https://github.com/RDR8) for improvements on Makefiles for Linux.
|
||||
- [Max Danielsson](https://github.com/autious) for adding support for orthographic 3d camera projection
|
||||
- [Lumaio](https://github.com/TheLumaio) for his great work on GBuffers and GetCollisionRayModel().
|
||||
- [Jonas Daeyaert](https://github.com/culacant) for an amazing work on IQM animated models support.
|
||||
@@ -132,5 +130,7 @@ contributing (in some way or another) to make the raylib project better. Huge th
|
||||
- [Anata](https://github.com/anatagawa) for creating amazing examples and contributing with them
|
||||
- [Narice](https://github.com/narice) made easings.h includable as standalone header
|
||||
- [Eric J.](https://github.com/ProfJski) for shaders_eratosthenes example contribution
|
||||
- [PompPenguin](https://github.com/PompPenguin) for reviewing 3rd person camera
|
||||
- [Mohamed Shazan](https://github.com/msmshazan) for adding support for ANGLE graphics backend
|
||||
|
||||
Please, if I forget someone in this list, excuse me and send a PR!
|
||||
Please, if I forget someone in this list, excuse me and send me a PR!
|
||||
|
186
HISTORY.md
@@ -1,19 +1,19 @@
|
||||

|
||||
|
||||
history
|
||||
-------
|
||||
introduction
|
||||
------------
|
||||
|
||||
I've developed videogames since 2006 and in 2012 I started teaching videogames development to young people with artistic profile, most of them 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 profile, most of students had never written a single line of code.
|
||||
|
||||
I started with C language basis and, after searching for the most simple and easy-to-use library to teach videogames programming, I found WinBGI; it was great and it worked very well with students, in just a couple of weeks that people that had never written a single line of code were able to program (and understand) a simple PONG and 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](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!
|
||||
|
||||
But WinBGI was not the clearer and most organized lib. There were a lot of things I found confusing and some function names were not clear enough for most of the students; not to mention points like no transparencies support or no hardware acceleration.
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
Most of my videogames coding experience was in C# and XNA and I really love it (in fact, my students learn C# after C), so, I decided to use C# language notation and XNA naming conventions. That way, students can jump from raylib to XNA, MonoGame or similar libs extremely easily.
|
||||
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.
|
||||
|
||||
raylib started as a weekend project and after three months of hard work, raylib 1.0 was published on November 2013.
|
||||
raylib started as a weekend project and after three months of hard work, **raylib 1.0 was published on November 2013**.
|
||||
|
||||
Enjoy it.
|
||||
|
||||
@@ -22,9 +22,9 @@ 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.
|
||||
|
||||
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.
|
||||
- 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.
|
||||
- [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.
|
||||
|
||||
@@ -37,9 +37,9 @@ On September 2014, after 5 month of raylib 1.1 release, it comes raylib 1.2. Aga
|
||||
|
||||
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.
|
||||
|
||||
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; user only defines desired screen size and it gets properly displayed.
|
||||
|
||||
Now raylib can easily deploy games to Android devices and Raspberry Pi (console mode).
|
||||
- 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.
|
||||
|
||||
@@ -50,15 +50,15 @@ 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 postrocessing 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.
|
||||
- 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/camera.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/camera.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).
|
||||
|
||||
New [gestures](https://github.com/raysan5/raylib/blob/master/src/gestures.h) module simplifies gestures detection on Android and HTML5 programs.
|
||||
- New [gestures](https://github.com/raysan5/raylib/blob/master/src/gestures.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/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.
|
||||
|
||||
Most of the examples have been completely rewritten and +10 new examples have been added to show the new raylib features.
|
||||
|
||||
@@ -69,17 +69,17 @@ 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#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.
|
||||
|
||||
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.
|
||||
- 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.
|
||||
|
||||
New [physac](https://github.com/raysan5/raylib/blob/master/src/physac.h) physics module for basic 2D physics support. Still in development but already functional. Module comes with some usage examples for basic jump and level interaction and also force-based physic movements.
|
||||
- New [physac](https://github.com/raysan5/raylib/blob/master/src/physac.h) physics module for basic 2D physics support. Still in development but already functional. Module comes with some usage examples for basic jump and level interaction and also force-based physic movements.
|
||||
|
||||
[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.
|
||||
- [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/gestures.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/gestures.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.
|
||||
|
||||
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).
|
||||
- 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.
|
||||
@@ -94,17 +94,17 @@ 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 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).
|
||||
|
||||
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 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 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.
|
||||
- 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 singnificantly 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 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.
|
||||
|
||||
Other additions include a [2D camera system](https://github.com/raysan5/raylib/blob/master/examples/core_2d_camera.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.
|
||||
|
||||
@@ -119,17 +119,17 @@ 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:
|
||||
|
||||
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.
|
||||
- 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 completey self-contained, no external libraries required any more!
|
||||
|
||||
[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, 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.
|
||||
- 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.
|
||||
|
||||
Improved Gamepad support on Windows and Raspberry Pi with the addition of new functions for custom gamepad configurations but supporting by default PS3 and Xbox-based gamepads.
|
||||
- Improved Gamepad support on Windows and Raspberry Pi with the addition of new functions for custom gamepad configurations but supporting by default PS3 and Xbox-based gamepads.
|
||||
|
||||
Improved textures and text functionality, adding new functions for texture filtering control and better TTF/AngelCode fonts loading and generation support.
|
||||
- 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.
|
||||
|
||||
@@ -140,15 +140,15 @@ 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:
|
||||
|
||||
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, funtions 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. 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.
|
||||
|
||||
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 compliation 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 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.
|
||||
|
||||
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 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...
|
||||
|
||||
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...
|
||||
|
||||
@@ -159,17 +159,17 @@ 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 pourpouses.
|
||||
|
||||
[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.
|
||||
- [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 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.
|
||||
|
||||
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 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.
|
||||
- [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.
|
||||
|
||||
[raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h) library has been also reviewed to align with other advance math libraries like [GLM](https://github.com/g-truc/glm). Matrix math has been improved and simplified, some new Quaternion functions have been added and Vector3 functions have been renamed all around the library for consistency with new Vector2 functionality.
|
||||
- [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h) library has been also reviewed to align with other advance math libraries like [GLM](https://github.com/g-truc/glm). Matrix math has been improved and simplified, some new Quaternion functions have been added and Vector3 functions have been renamed all around the library for consistency with new Vector2 functionality.
|
||||
|
||||
Additionally, as always, examples and templates have been reviewed to work with new version (some new examples have been added), all external libraries have been updated to latest stable version and latest Notepad++ and MinGW have been configured to work with new raylib. For a full list of changes, just check [CHANGELOG](CHANGELOG).
|
||||
|
||||
@@ -182,17 +182,17 @@ It's been 9 month since last raylib version was published, a lots of things have
|
||||
|
||||
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-dependant 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. Undoubtly, 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, 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!
|
||||
|
||||
**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!
|
||||
- **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 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!
|
||||
|
||||
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).
|
||||
|
||||
@@ -203,25 +203,91 @@ 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.
|
||||
|
||||
New **window management and filesystem 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.
|
||||
- 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 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 behaviour.
|
||||
|
||||
**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.
|
||||
- **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.
|
||||
|
||||
Support for **Unicode text drawing**; now raylib processes UTF8 strings on drawing, supporting Unicode codepoints, allowing rendering mostly any existent language (as long as the font with the glyphs is provided). An amazing example showing this feature has also been added: `text_unicode`.
|
||||
- Support for **Unicode text drawing**; now raylib processes UTF8 strings on drawing, supporting Unicode codepoints, allowing rendering mostly any existent language (as long as the font with the glyphs is provided). An amazing example showing this feature has also been added: `text_unicode`.
|
||||
|
||||
Brand **new text management API**, with the addition of multiple functions to deal with string data, including functionality like replace, insert, join, split, append, to uppercase, to lower... Note that most of those functions are intended for text management on rendering, using pre-loaded internal buffers, avoiding new memory allocation that user should free manually.
|
||||
- Brand **new text management API**, with the addition of multiple functions to deal with string data, including functionality like replace, insert, join, split, append, to uppercase, to lower... Note that most of those functions are intended for text management on rendering, using pre-loaded internal buffers, avoiding new memory allocation that user should free manually.
|
||||
|
||||
Multiple **new shapes and textures drawing functions** to support rings (`DrawRing()`, `DrawRingLines()`), circle sectors (`DrawCircleSector()`, `DrawCircleSectorLines()`), rounded rectangles (`DrawRectangleRounded()`, `DrawRectangleRoundedLines()`) and also n-patch textures (`DrawTextureNPatch()`), detailed examples have been added to illustrate all this new functionality.
|
||||
- Multiple **new shapes and textures drawing functions** to support rings (`DrawRing()`, `DrawRingLines()`), circle sectors (`DrawCircleSector()`, `DrawCircleSectorLines()`), rounded rectangles (`DrawRectangleRounded()`, `DrawRectangleRoundedLines()`) and also n-patch textures (`DrawTextureNPatch()`), detailed examples have been added to illustrate all this new functionality.
|
||||
|
||||
Experimental **cubemap support**, to automatically load multiple cubemap layouts (`LoadTextureCubemap()`). It required some internal `rlgl` redesign to allow cubemap textures.
|
||||
- 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 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.
|
||||
|
||||
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.
|
||||
|
||||
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).
|
||||
|
||||
- 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 **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 **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.
|
||||
|
||||
- `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).
|
||||
|
||||
- `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.
|
||||
|
||||
- **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.
|
||||
|
||||
- New **GitHub Actions CI** system has been implemented for Windows, Linux and macOS code and examples compilation on every new commit or PR to make sure library keeps stable and usable with no breaking bugs.
|
||||
|
||||
Note that only key changes are listed here but there is way more! About **30 new functions**, multiple functions reviewed, bindings to [+40 programming languages](https://github.com/raysan5/raylib/blob/master/BINDINGS.md) and great samples/demos/tutorials [created by the community](https://discord.gg/VkzNHUE), including raylib integration with [Spine](https://github.com/WEREMSOFT/spine-raylib-runtimes), [Unity](https://unitycoder.com/blog/2019/12/09/using-raylib-dll-in-unity/), [Tiled](https://github.com/OnACoffeeBreak/raylib_tiled_import_with_tmx), [Nuklear](http://bedroomcoders.co.uk/implementing-a-3d-gui-with-raylib/), [enet](https://github.com/nxrighthere/NetDynamics) and [more](https://github.com/raysan5/raylib/issues/1079)!
|
||||
|
||||
It has been **10 months of improvements** to create the best raylib ever.
|
||||
|
||||
Welcome to **raylib 3.0**.
|
||||
|
||||
notes on raylib 3.5
|
||||
-------------------
|
||||
|
||||
It's December 25th... this crazy 2020 is about to finish and finally the holidays gave me some time to put a new version of raylib. It's been **9 months since last release** and last November raylib become 7 years old... I was not able to release this new version back then but here it is. Many changes and improvements have happened in those months and, even, last August, raylib was awarded with an [Epic Megagrant](https://www.unrealengine.com/en-US/blog/epic-megagrants-fall-2020-update)! Bindings list kept growing to [+50 programming languages](BINDINGS.md) and some new platforms have been supported. Let's see this new version details:
|
||||
|
||||
First, some general numbers of this new update:
|
||||
|
||||
- **+650** commits since previous RELEASE
|
||||
- **+30** functions ADDED (for a TOTAL of **475**!)
|
||||
- **+90** functions REVIEWED/REDESIGNED
|
||||
- **+30** contributors (for a TOTAL of **170**!)
|
||||
- **+8** new examples (for a TOTAL of **+120**!)
|
||||
|
||||
Here the list with some highlights for `raylib 3.5`.
|
||||
|
||||
- NEW **Platform** supported: **Raspberry Pi 4 native mode** (no X11 windows) through [DRM](https://en.wikipedia.org/wiki/Direct_Rendering_Manager) subsystem and GBM API. Actually this is a really interesting improvement because it opens the door to raylib to support other embedded platforms (Odroid, GameShell, NanoPi...). Also worth mentioning the un-official homebrew ports of raylib for [PS4](https://github.com/orbisdev/orbisdev-orbisGl2) and PSVita.
|
||||
|
||||
- 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 **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 **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.
|
||||
|
||||
- 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 **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.
|
||||
|
||||
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!
|
||||
|
||||
Happy holidays! :)
|
||||
|
@@ -1,8 +1,4 @@
|
||||
|
||||
This game sources are licensed under an unmodified zlib/libpng license,
|
||||
which is an OSI-certified, BSD-like license:
|
||||
|
||||
Copyright (c) 2013-2017 Ramon Santamaria (@raysan5)
|
||||
Copyright (c) 2013-2020 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.
|
||||
@@ -17,4 +13,4 @@ applications, and to alter it and redistribute it freely, subject to the followi
|
||||
2. Altered source versions must be plainly marked as such, and must not be misrepresented
|
||||
as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
51
LICENSE.md
@@ -1,51 +0,0 @@
|
||||
license
|
||||
=======
|
||||
|
||||
source code
|
||||
-----------
|
||||
|
||||
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:
|
||||
|
||||
Copyright (c) 2013-2019 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.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose, including commercial
|
||||
applications, and to alter it and redistribute it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not claim that you
|
||||
wrote the original software. If you use this software in a product, an acknowledgment
|
||||
in the product documentation would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not be misrepresented
|
||||
as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
fonts
|
||||
------
|
||||
|
||||
The following fonts [provided with raylib](https://github.com/raysan5/raylib/tree/master/examples/text/resources/fonts) are free to use (freeware) and have been designed by the following people:
|
||||
|
||||
* Alpha Beta - Brian Kent (AEnigma)
|
||||
* Setback - Brian Kent (AEnigma)
|
||||
* Jupiter Crash - Brian Kent (AEnigma)
|
||||
* Alagard - Hewett Tsoi
|
||||
* Romulus - Hewett Tsoi
|
||||
* Mecha - Captain Falcon
|
||||
* PixelPlay - Aleksander Shevchuk
|
||||
* PixAntiqua - Gerhard Großmann
|
||||
|
||||
2d art
|
||||
------
|
||||
|
||||
[scarfy spritesheet](https://github.com/raysan5/raylib/blob/master/examples/textures/resources/scarfy.png) and [fudesumi image](https://github.com/raysan5/raylib/blob/master/examples/textures/resources/fudesumi.png) have been created by [Eiden Marsal](https://www.artstation.com/artist/marshall_z) and are licensed as [Creative Commons Attribution-NonCommercial 3.0](https://creativecommons.org/licenses/by-nc/3.0/legalcode)
|
||||
|
||||
[cyberpunk street environments](https://github.com/raysan5/raylib/blob/master/examples/textures/resources) have been created by Luis Zuno ([@ansimuz](https://twitter.com/ansimuz)) and are licensed as [CC-BY-3.0](http://creativecommons.org/licenses/by/3.0/)
|
||||
|
||||
3d models
|
||||
---------
|
||||
|
||||
[medieval city 3d models and textures](https://github.com/raysan5/raylib/tree/master/examples/models/resources/medieval) have been created by Alberto Cano and are licensed as [Creative Commons Attribution-NonCommercial 4.0](https://creativecommons.org/licenses/by-nc/4.0/legalcode)
|
86
README.md
@@ -8,56 +8,100 @@ raylib is highly inspired by Borland BGI graphics lib and by XNA framework and i
|
||||
|
||||
Ready to learn? Jump to [code examples!](http://www.raylib.com/examples.html)
|
||||
|
||||
<br>
|
||||
|
||||
[](https://github.com/raysan5/raylib/graphs/contributors)
|
||||
[](https://github.com/raysan5/raylib/releases)
|
||||
[](https://github.com/raysan5/raylib/commits/master)
|
||||
[](LICENSE)
|
||||
|
||||
[](https://travis-ci.org/raysan5/raylib)
|
||||
[](https://ci.appveyor.com/project/raysan5/raylib)
|
||||
[](https://discord.gg/VkzNHUE)
|
||||
[](LICENSE.md)
|
||||
[](https://twitter.com/raysan5)
|
||||
[](https://github.com/raysan5/raylib/stargazers)
|
||||
[](https://twitter.com/raysan5)
|
||||
[](https://www.reddit.com/r/raylib/)
|
||||
|
||||
[](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)
|
||||
|
||||
features
|
||||
--------
|
||||
- **NO external dependencies**, all required libraries are bundled into raylib
|
||||
- Multiple platforms supported: **Windows, Linux, MacOS, Android... and many more!**
|
||||
- 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 or ES 2.0**)
|
||||
- **Unique OpenGL abstraction layer** (usable as standalone module): [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h)
|
||||
- Multiple **Fonts** formats supported (XNA fonts, AngelCode fonts, TTF)
|
||||
- Multiple **Fonts** formats supported (TTF, XNA fonts, AngelCode fonts)
|
||||
- Outstanding texture formats support, including compressed formats (DXT, ETC, ASTC)
|
||||
- **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)
|
||||
- Shaders support, including model and postprocessing shaders.
|
||||
- Shaders support, including model 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)
|
||||
- **VR stereo rendering** support with configurable HMD device parameters
|
||||
- Huge examples collection with [+95 code examples](https://www.raylib.com/examples.html)!
|
||||
- Bindings to [+25 programming languages](https://github.com/raysan5/raylib/blob/master/BINDINGS.md)!
|
||||
|
||||
- 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.
|
||||
|
||||
raylib uses on its [core](https://github.com/raysan5/raylib/blob/master/src/core.c) module the outstanding [GLFW3](http://www.glfw.org/) library, embedded in the form of [rglfw](https://github.com/raysan5/raylib/blob/master/src/rglfw.c) module, to avoid external dependencies.
|
||||
|
||||
raylib uses on its [raudio](https://github.com/raysan5/raylib/blob/master/src/raudio.c) module, the amazing [miniaudio](https://github.com/dr-soft/miniaudio) library to support multiple platforms and multiple audio backends.
|
||||
|
||||
raylib uses internally multiple single-file header-only libraries to support different fileformats loading and saving, all those libraries are embedded with raylib and available in [src/external](https://github.com/raysan5/raylib/tree/master/src/external) directory. Check [raylib Wiki](https://github.com/raysan5/raylib/wiki/raylib-dependencies) for a detailed list.
|
||||
raylib uses internally several single-file header-only libraries to support different fileformats loading and saving, all those libraries are embedded with raylib and available in [src/external](https://github.com/raysan5/raylib/tree/master/src/external) directory. Check [raylib Wiki](https://github.com/raysan5/raylib/wiki/raylib-dependencies) for a detailed list.
|
||||
|
||||
*On Android platform, `native_app_glue module` module (provided by Android NDK) and native Android libraries are used to manage window/context, inputs and activity life cycle.*
|
||||
*On Android platform, `native_app_glue` module (provided by Android NDK) and native Android libraries are used to manage window/context, inputs and activity life cycle.*
|
||||
|
||||
*On Raspberry Pi platform (native mode), `Videocore API` and `EGL` libraries are used for window/context management. Inputs are processed using `evdev` Linux libraries*
|
||||
*On Raspberry Pi 0,1,2,3 platform (native mode), `Videocore API` and `EGL` libraries are used for window/context management. Inputs are processed using `evdev` Linux libraries*
|
||||
|
||||
*On Raspberry Pi 4 platform (native mode), `DRM subsystem` and `GBM API` libraries are used for window/context management. Inputs are processed using `evdev` Linux libraries*
|
||||
|
||||
*On Web platform, raylib uses `emscripten` provided libraries for several input events management, specially noticeable the touch events support.*
|
||||
|
||||
build and installation
|
||||
----------------------
|
||||
|
||||
Binary releases for Windows, Linux and macOS are available at the [Github Releases page](https://github.com/raysan5/raylib/releases). raylib is also available via multiple package managers on multiple OS distributions. Check [raylib Wiki](https://github.com/raysan5/raylib/wiki) for more info.
|
||||
raylib binary releases for Windows, Linux and macOS are available at the [Github Releases page](https://github.com/raysan5/raylib/releases).
|
||||
|
||||
If you wish to build raylib yourself, [the raylib Wiki](https://github.com/raysan5/raylib/wiki) also contains detailed instructions on how to approach that.
|
||||
raylib is also available via multiple [package managers](https://github.com/raysan5/raylib/issues/613) on multiple OS distributions.
|
||||
|
||||
raylib has been developed using two tools:
|
||||
#### Installing and building raylib via vcpkg
|
||||
|
||||
* Notepad++ (text editor) - [http://notepad-plus-plus.org](http://notepad-plus-plus.org/)
|
||||
* MinGW (GCC compiler) - [http://www.mingw.org](http://www.mingw.org/)
|
||||
You can download and install raylib using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
|
||||
|
||||
Those are the tools recommended to enjoy raylib development.
|
||||
git clone https://github.com/Microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
./bootstrap-vcpkg.sh
|
||||
./vcpkg integrate install
|
||||
vcpkg install raylib
|
||||
|
||||
*The raylib port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.*
|
||||
|
||||
#### Building raylib on multiple platforms
|
||||
|
||||
[raylib Wiki](https://github.com/raysan5/raylib/wiki#development-platforms) contains detailed instructions on building and usage on multiple platforms.
|
||||
|
||||
- [Working on Windows](https://github.com/raysan5/raylib/wiki/Working-on-Windows)
|
||||
- [Working on macOS](https://github.com/raysan5/raylib/wiki/Working-on-macOS)
|
||||
- [Working on GNU Linux](https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux)
|
||||
- [Working on FreeBSD](https://github.com/raysan5/raylib/wiki/Working-on-FreeBSD)
|
||||
- [Working on Raspberry Pi](https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi)
|
||||
- [Working for Android](https://github.com/raysan5/raylib/wiki/Working-for-Android)
|
||||
- [Working for Web (HTML5)](https://github.com/raysan5/raylib/wiki/Working-for-Web-(HTML5))
|
||||
- [Working for UWP (Universal Window Platform)](https://github.com/raysan5/raylib/wiki/Working-for-UWP)
|
||||
- [Working anywhere with CMake](https://github.com/raysan5/raylib/wiki/Working-with-CMake)
|
||||
|
||||
*Note that Wiki is open for edit, if you find some issue while building raylib for your target platform, feel free to edit the Wiki or open and issue related to it.*
|
||||
|
||||
#### Using raylib with multiple IDEs
|
||||
|
||||
raylib has been developed on Windows platform using [Notepad++](https://notepad-plus-plus.org/) and [MinGW GCC](http://mingw-w64.org/doku.php) compiler but it can be used with other IDEs on multiple platforms.
|
||||
|
||||
[Projects directory](https://github.com/raysan5/raylib/tree/master/projects) contains several ready-to-use **project templates** to build raylib and code examples with multiple IDEs.
|
||||
|
||||
*Note that there are lots of IDEs supported, some of the provided templates could require some review, please, if you find some issue with some template or you think they could be improved, feel free to send a PR or open a related issue.*
|
||||
|
||||
contact
|
||||
-------
|
||||
@@ -70,9 +114,9 @@ contact
|
||||
* Patreon: [https://www.patreon.com/raylib](https://www.patreon.com/raylib)
|
||||
* YouTube: [https://www.youtube.com/channel/raylib](https://www.youtube.com/channel/UC8WIBkhYb5sBNqXO1mZ7WSQ)
|
||||
|
||||
If you are using raylib and you enjoy it, please, join our [Discord server](https://discord.gg/VkzNHUE).
|
||||
If you are using raylib and enjoying it, please, join our [Discord server](https://discord.gg/VkzNHUE) and let us know! :)
|
||||
|
||||
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.md) for further details.
|
||||
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.
|
||||
|
20
ROADMAP.md
@@ -3,14 +3,20 @@ roadmap
|
||||
|
||||
Here it is a wish-list with features and ideas to improve the library. Note that features listed here are quite high-level and could be long term additions for the library. Current version of raylib is complete and functional but there is a lot of room for improvement.
|
||||
|
||||
[raylib source code](https://github.com/raysan5/raylib/tree/master/src) has some *TODO* marks around code with pending things to review and improve.
|
||||
Also, check [GitHub Issues](https://github.com/raysan5/raylib/issues) for further details!
|
||||
[raylib source code](https://github.com/raysan5/raylib/tree/master/src) has some *TODO* marks around code with pending things to review and improve. Check also [GitHub Issues](https://github.com/raysan5/raylib/issues) for further details!
|
||||
|
||||
**raylib 2.x**
|
||||
- [ ] rnet: raylib network module
|
||||
- [ ] rres: raylib resource packer
|
||||
- [ ] rlvk: raylib Vulkan API support (GRAPHICS_API_VULKAN)
|
||||
- [ ] Basic CPU/GPU stats sytem (memory, draws, time...)
|
||||
**raylib 3.x**
|
||||
- [ ] Network module (UDP): `rnet` ([info](https://github.com/raysan5/raylib/issues/753))
|
||||
- [ ] Custom raylib resource packer: `rres` ([info](https://github.com/raysan5/rres))
|
||||
- [ ] Basic CPU/GPU stats system (memory, draws, time...)
|
||||
- [x] Continuous Deployment using GitHub Actions
|
||||
|
||||
**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 ([info](https://github.com/raysan5/raylib/issues/1065))
|
||||
- [x] Continuous Integration using GitHub Actions
|
||||
|
||||
**raylib 2.5**
|
||||
- [x] Support Animated models
|
||||
|
47
SPONSORS.md
Normal file
@@ -0,0 +1,47 @@
|
||||
The following people has contributed with a generous donation to the raylib project.
|
||||
|
||||
## 🥇 Gold Contributors
|
||||
|
||||
...
|
||||
|
||||
## 🥈 Silver Contributors
|
||||
|
||||
- Jonathan Johnson ([@ecton](https://github.com/ecton))
|
||||
- Eric J. ([@ProfJski](https://github.com/ProfJski))
|
||||
- Rudy Faile ([@rfaile313](https://github.com/rfaile313)) - https://rudyfaile.com/
|
||||
- devdad ([@devdad](https://github.com/devdad))
|
||||
- frithrah ([@frithrah](https://github.com/frithrah))
|
||||
- Zach Geis ([@zacgeis](https://github.com/zacgeis))
|
||||
|
||||
## 🥉 Bronze Contributors
|
||||
|
||||
- minirop ([@minirop](https://github.com/minirop))
|
||||
- Daniel Gómez ([@Koocachookies](https://github.com/Koocachookies))
|
||||
- Sergio ([@anidealgift](https://github.com/anidealgift))
|
||||
- JFons ([@JFonS](https://github.com/JFonS))
|
||||
- Marc Agüera ([@maguera93](https://github.com/maguera93))
|
||||
- Pau Fernández ([@pauek](https://github.com/pauek))
|
||||
- Jens Pitkänen ([@neonmoe](https://github.com/neonmoe))
|
||||
- Snowminx ([@Gamerfiend](https://github.com/Gamerfiend))
|
||||
- NimbusFox ([@NimbusFox](https://github.com/NimbusFox))
|
||||
- Robin Mattheussen ([@romatthe](https://github.com/romatthe))
|
||||
- Rahul Nair ([@rahulunair](https://github.com/rahulunair))
|
||||
- Grant Haywood ([@cinterloper](https://github.com/cinterloper))
|
||||
- Terry Nguyen ([@terrehbyte](https://github.com/terrehbyte))
|
||||
- albatros-hmd ([@albatros-hmd](https://github.com/albatros-hmd))
|
||||
- Benjamin Stigsen ([@BenStigsen](https://github.com/BenStigsen))
|
||||
- Louis Johnson ([@louisgjohnson](https://github.com/louisgjohnson))
|
||||
- Dani Martin ([@danimartin82](https://github.com/danimartin82))
|
||||
- Tommi Sinivuo ([@TommiSinivuo](https://github.com/TommiSinivuo))
|
||||
- Joakim Wennergren ([@joakimwennergren](https://github.com/joakimwennergren))
|
||||
- Richard Urbanec ([@Poryg1](https://github.com/Poryg1))
|
||||
- pmgl ([@pmgl](https://github.com/pmgl))
|
||||
- cob ([@majorcob](https://github.com/majorcob))
|
||||
- Samuel Batista ([@gamedevsam](https://github.com/gamedevsam))
|
||||
- Alexandre Chêne ([@kooparse](https://github.com/kooparse))
|
||||
- daddio69 ([@daddio69](https://github.com/daddio69))
|
||||
- James Ghawaly ([@jghawaly](https://github.com/jghawaly))
|
||||
- jack ([@Jack-Ji](https://github.com/Jack-Ji))
|
||||
- Merlyn Morgan-Graham ([@kavika13](https://github.com/kavika13))
|
||||
|
||||
|
65
appveyor.yml
@@ -1,65 +0,0 @@
|
||||
#os: Visual Studio 2015
|
||||
|
||||
clone_depth: 5
|
||||
|
||||
cache:
|
||||
- C:\ProgramData\chocolatey\bin -> appveyor.yml
|
||||
- C:\ProgramData\chocolatey\lib -> appveyor.yml
|
||||
|
||||
init:
|
||||
- cmake -E remove c:\programdata\chocolatey\bin\cpack.exe
|
||||
- set PATH=%PATH:C:\Program Files (x86)\Git\usr\bin;=%
|
||||
- set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
|
||||
- if [%BITS%]==[32] set MINGW=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32
|
||||
- if [%BITS%]==[64] set MINGW=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64
|
||||
- if [%COMPILER%]==[mingw] set PATH=%MINGW%\bin;%PATH%
|
||||
- set RAYLIB_PACKAGE_SUFFIX=-Win%BITS%-%COMPILER%
|
||||
- set VERBOSE=1
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- compiler: mingw
|
||||
bits: 32
|
||||
examples: ON
|
||||
- compiler: mingw
|
||||
bits: 64
|
||||
examples: ON
|
||||
- compiler: msvc15
|
||||
bits: 32
|
||||
examples: OFF
|
||||
- compiler: msvc15
|
||||
bits: 64
|
||||
examples: OFF
|
||||
|
||||
before_build:
|
||||
- if [%compiler%]==[mingw] set CFLAGS=-m%BITS% & set LDFLAGS=-m%BITS% & set GENERATOR="MinGW Makefiles"
|
||||
- if [%COMPILER%]==[msvc15] if [%BITS%]==[32] set GENERATOR="Visual Studio 14 2015"
|
||||
- if [%COMPILER%]==[msvc15] if [%BITS%]==[64] set GENERATOR="Visual Studio 14 2015 Win64"
|
||||
- mkdir build
|
||||
- cd build
|
||||
|
||||
build_script:
|
||||
- cmake -G %GENERATOR% -DSTATIC=ON -DSHARED=ON -DBUILD_EXAMPLES=%examples% -DBUILD_GAMES=%examples% -DINCLUDE_EVERYTHING=ON ..
|
||||
- cmake --build . --target install
|
||||
|
||||
after_build:
|
||||
- cmake --build . --target package
|
||||
|
||||
before_test:
|
||||
|
||||
test_script:
|
||||
|
||||
artifacts:
|
||||
- path: 'build\*.zip'
|
||||
|
||||
deploy:
|
||||
- provider: GitHub
|
||||
auth_token:
|
||||
secure: OxKnnT3tlkPl9365cOO84rDWU4UkHIYJc0D3r3Tv7rB3HaR2BBhlhCnl7g3nuOJy
|
||||
artifact: /.*\.zip/
|
||||
draft: false
|
||||
prerelease: false
|
||||
force_update: true
|
||||
on:
|
||||
branch: master
|
||||
appveyor_repo_tag: true # deploy on tag push only
|
@@ -1,13 +0,0 @@
|
||||
# Populates a ${FILESYSTEM_LACKS_SYMLINKS} variable
|
||||
message(STATUS "Testing if file system supports symlinks")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink CMakeLists.txt "${CMAKE_CURRENT_BINARY_DIR}/TestingIfSymlinkWorks"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
RESULT_VARIABLE FILESYSTEM_LACKS_SYMLINKS
|
||||
)
|
||||
If (FILESYSTEM_LACKS_SYMLINKS)
|
||||
message(STATUS "Testing if file system supports symlinks -- unsupported")
|
||||
else()
|
||||
message(STATUS "Testing if file system supports symlinks -- supported")
|
||||
endif()
|
||||
|
26
cmake/JoinPaths.cmake
Normal file
@@ -0,0 +1,26 @@
|
||||
# This module provides function for joining paths
|
||||
# known from most languages
|
||||
#
|
||||
# Original license:
|
||||
# SPDX-License-Identifier: (MIT OR CC0-1.0)
|
||||
# Explicit permission given to distribute this module under
|
||||
# the terms of the project as described in /LICENSE.rst.
|
||||
# Copyright 2020 Jan Tojnar
|
||||
# https://github.com/jtojnar/cmake-snips
|
||||
#
|
||||
# Modelled after Python’s os.path.join
|
||||
# https://docs.python.org/3.7/library/os.path.html#os.path.join
|
||||
# Windows not supported
|
||||
function(join_paths joined_path first_path_segment)
|
||||
set(temp_path "${first_path_segment}")
|
||||
foreach(current_segment IN LISTS ARGN)
|
||||
if(NOT ("${current_segment}" STREQUAL ""))
|
||||
if(IS_ABSOLUTE "${current_segment}")
|
||||
set(temp_path "${current_segment}")
|
||||
else()
|
||||
set(temp_path "${temp_path}/${current_segment}")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
set(${joined_path} "${temp_path}" PARENT_SCOPE)
|
||||
endfunction()
|
@@ -1,12 +1,20 @@
|
||||
SET(CMAKE_SYSTEM_NAME Linux)
|
||||
SET(CMAKE_SYSTEM_PROCESSOR x86)
|
||||
|
||||
if (CMAKE_HOST_WIN32)
|
||||
SET(EMSCRIPTEN_EXTENSION ".bat")
|
||||
else ()
|
||||
SET(EMSCRIPTEN_EXTENSION "")
|
||||
endif()
|
||||
|
||||
SET(CMAKE_C_COMPILER emcc${EMSCRIPTEN_EXTENSION})
|
||||
SET(CMAKE_CXX_COMPILER em++${EMSCRIPTEN_EXTENSION})
|
||||
|
||||
SET(CMAKE_C_COMPILER emcc)
|
||||
SET(CMAKE_CXX_COMPILER em++)
|
||||
if(NOT DEFINED CMAKE_AR)
|
||||
find_program(CMAKE_AR NAMES emar)
|
||||
find_program(CMAKE_AR NAMES emar${EMSCRIPTEN_EXTENSION})
|
||||
endif()
|
||||
if(NOT DEFINED CMAKE_RANLIB)
|
||||
find_program(CMAKE_RANLIB NAMES emranlib)
|
||||
find_program(CMAKE_RANLIB NAMES emranlib${EMSCRIPTEN_EXTENSION})
|
||||
endif()
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
|
@@ -12,12 +12,14 @@
|
||||
# raylib_DEFINITIONS - Compiler switches required for using raylib
|
||||
|
||||
set(XPREFIX PC_RAYLIB)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(${XPREFIX} QUIET raylib)
|
||||
|
||||
if (raylib_USE_STATIC_LIBS)
|
||||
set(XPREFIX ${XPREFIX}_STATIC)
|
||||
endif()
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(${XPREFIX} QUIET raylib)
|
||||
set(raylib_DEFINITIONS ${${XPREFIX}_CFLAGS})
|
||||
|
||||
find_path(raylib_INCLUDE_DIR
|
||||
@@ -25,17 +27,16 @@ find_path(raylib_INCLUDE_DIR
|
||||
HINTS ${${XPREFIX}_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(RAYLIB_NAMES raylib)
|
||||
|
||||
if (raylib_USE_STATIC_LIBS)
|
||||
find_library(raylib_LIBRARY
|
||||
NAMES raylib_static
|
||||
HINTS ${${XPREFIX}_LIBRARY_DIRS}
|
||||
)
|
||||
else ()
|
||||
find_library(raylib_LIBRARY
|
||||
NAMES raylib
|
||||
HINTS ${${XPREFIX}_LIBRARY_DIRS}
|
||||
)
|
||||
endif ()
|
||||
set(RAYLIB_NAMES libraylib.a raylib.lib ${RAYLIB_NAMES})
|
||||
endif()
|
||||
|
||||
find_library(raylib_LIBRARY
|
||||
NAMES ${RAYLIB_NAMES}
|
||||
HINTS ${${XPREFIX}_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
set(raylib_LIBRARIES ${raylib_LIBRARY})
|
||||
set(raylib_LIBRARY_DIRS ${${XPREFIX}_LIBRARY_DIRS})
|
||||
|
@@ -28,7 +28,6 @@ if (APPLE AND NOT CMAKE_SYSTEM STRLESS "Darwin-18.0.0")
|
||||
add_definitions(-DGL_SILENCE_DEPRECATION)
|
||||
MESSAGE(AUTHOR_WARNING "OpenGL is deprecated starting with macOS 10.14 (Mojave)!")
|
||||
endif()
|
||||
set(OUTPUT_EXT)
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c)
|
||||
|
||||
include(CheckIncludeFile)
|
||||
@@ -67,6 +66,8 @@ if(${PLATFORM} MATCHES "Android")
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_heightmap.c)
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_billboard.c)
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_rlgl_solar_system.c)
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_rlgl_full_solar_system.c)
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_solar_system.c)
|
||||
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)
|
||||
@@ -76,15 +77,19 @@ if(${PLATFORM} MATCHES "Android")
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_postprocessing.c)
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_raymarching.c)
|
||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_palette_switch.c)
|
||||
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 EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY")
|
||||
# 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_EXECUTABLE_SUFFIX ".html")
|
||||
|
||||
set(OUTPUT_EXT ".html")
|
||||
|
||||
# Remove the -rdynamic flag because otherwise emscripten
|
||||
# does not generate HTML+JS+WASM files, only a non-working
|
||||
# and fat HTML
|
||||
string(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}")
|
||||
endif()
|
||||
|
||||
include_directories(BEFORE SYSTEM others/external/include)
|
||||
@@ -97,7 +102,7 @@ endif()
|
||||
foreach(example_source ${example_sources})
|
||||
# Create the basename for the example
|
||||
get_filename_component(example_name ${example_source} NAME)
|
||||
string(REPLACE ".c" "${OUTPUT_EXT}" example_name ${example_name})
|
||||
string(REPLACE ".c" "" example_name ${example_name})
|
||||
|
||||
# Setup the example
|
||||
add_executable(${example_name} ${example_source})
|
||||
@@ -119,7 +124,7 @@ if (${PLATFORM} MATCHES "Desktop")
|
||||
foreach (example_source "others/rlgl_standalone.c")
|
||||
# Create the basename for the example
|
||||
get_filename_component(example_name ${example_source} NAME)
|
||||
string(REPLACE ".c" "${OUTPUT_EXT}" example_name ${example_name})
|
||||
string(REPLACE ".c" "" example_name ${example_name})
|
||||
add_executable(${example_name} ${example_source})
|
||||
add_dependencies(${example_name} raylib)
|
||||
target_link_libraries(${example_name} ${raylib_LDFLAGS})
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# raylib makefile for Desktop platforms, Raspberry Pi, Android and HTML5
|
||||
#
|
||||
# Copyright (c) 2013-2019 Ramon Santamaria (@raysan5)
|
||||
# Copyright (c) 2013-2020 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,8 +25,7 @@
|
||||
|
||||
# Define required raylib variables
|
||||
PROJECT_NAME ?= raylib_examples
|
||||
RAYLIB_VERSION ?= 2.5.0
|
||||
RAYLIB_API_VERSION ?= 2
|
||||
RAYLIB_VERSION ?= 3.5.0
|
||||
RAYLIB_PATH ?= ..
|
||||
|
||||
# Define default options
|
||||
@@ -96,6 +95,12 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
PLATFORM_OS=LINUX
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||
UNAMEOS=$(shell uname)
|
||||
ifeq ($(UNAMEOS),Linux)
|
||||
PLATFORM_OS=LINUX
|
||||
endif
|
||||
endif
|
||||
|
||||
# RAYLIB_PATH adjustment for different platforms.
|
||||
# If using GNU make, we can get the full path to the top of the tree. Windows? BSD?
|
||||
@@ -110,18 +115,20 @@ endif
|
||||
# This is not currently used by src/Makefile. Not sure of its origin or usage. Refer to wiki.
|
||||
# TODO: update install: target in src/Makefile for RPI, consider relation to LINUX.
|
||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
RAYLIB_PATH ?= /home/pi/raylib
|
||||
RAYLIB_PATH ?= /home/pi/raylib
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||
RAYLIB_PATH ?= /home/pi/raylib
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
# Emscripten required variables
|
||||
EMSDK_PATH ?= C:/emsdk
|
||||
EMSCRIPTEN_VERSION ?= 1.38.31
|
||||
CLANG_VERSION = e$(EMSCRIPTEN_VERSION)_64bit
|
||||
PYTHON_VERSION = 2.7.13.1_64bit\python-2.7.13.amd64
|
||||
NODE_VERSION = 8.9.1_64bit
|
||||
export PATH = $(EMSDK_PATH);$(EMSDK_PATH)\clang\$(CLANG_VERSION);$(EMSDK_PATH)\node\$(NODE_VERSION)\bin;$(EMSDK_PATH)\python\$(PYTHON_VERSION);$(EMSDK_PATH)\emscripten\$(EMSCRIPTEN_VERSION);C:\raylib\MinGW\bin:$$(PATH)
|
||||
EMSCRIPTEN = $(EMSDK_PATH)\emscripten\$(EMSCRIPTEN_VERSION)
|
||||
EMSDK_PATH ?= C:/emsdk
|
||||
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
||||
CLANG_PATH = $(EMSDK_PATH)/upstream/bin
|
||||
PYTHON_PATH = $(EMSDK_PATH)/python/3.7.4-pywin32_64bit
|
||||
NODE_PATH = $(EMSDK_PATH)/node/12.18.1_64bit/bin
|
||||
export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH);C:\raylib\MinGW\bin:$$(PATH)
|
||||
endif
|
||||
|
||||
# Define raylib release directory for compiled library.
|
||||
@@ -165,7 +172,7 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
# HTML5 emscripten compiler
|
||||
# WARNING: To compile to HTML5, code must be redesigned
|
||||
# WARNING: To compile to HTML5, code must be redesigned
|
||||
# to use emscripten.h and emscripten_set_main_loop()
|
||||
CC = emcc
|
||||
endif
|
||||
@@ -177,6 +184,9 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
ifeq ($(PLATFORM_OS),LINUX)
|
||||
MAKE = make
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),OSX)
|
||||
MAKE = make
|
||||
endif
|
||||
endif
|
||||
|
||||
# Define compiler flags:
|
||||
@@ -188,20 +198,24 @@ endif
|
||||
# -std=gnu99 defines C language mode (GNU C from 1999 revision)
|
||||
# -Wno-missing-braces ignore invalid warning (GCC bug 53119)
|
||||
# -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec
|
||||
CFLAGS += -O1 -s -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces
|
||||
CFLAGS += -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces
|
||||
|
||||
ifeq ($(BUILD_MODE),DEBUG)
|
||||
CFLAGS += -g
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
CFLAGS += -s ASSERTIONS=1 --profiling
|
||||
endif
|
||||
else
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
CFLAGS += -Os
|
||||
else
|
||||
CFLAGS += -s -O1
|
||||
endif
|
||||
endif
|
||||
|
||||
# Additional flags for compiler (if desired)
|
||||
#CFLAGS += -Wextra -Wmissing-prototypes -Wstrict-prototypes
|
||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
# resource file contains windows executable icon and properties
|
||||
# -Wl,--subsystem,windows hides the console window
|
||||
CFLAGS += $(RAYLIB_PATH)/raylib.rc.data -Wl,--subsystem,windows
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),LINUX)
|
||||
ifeq ($(RAYLIB_LIBTYPE),STATIC)
|
||||
CFLAGS += -D_DEFAULT_SOURCE
|
||||
@@ -215,6 +229,9 @@ endif
|
||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
CFLAGS += -std=gnu99
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||
CFLAGS += -std=gnu99 -DEGL_NO_X11
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
# -Os # size optimization
|
||||
# -O2 # optimization level 2, if used, also set --memory-init-file 0
|
||||
@@ -223,24 +240,22 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
# -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB)
|
||||
# -s USE_PTHREADS=1 # multithreading support
|
||||
# -s WASM=0 # disable Web Assembly, emitted by default
|
||||
# -s EMTERPRETIFY=1 # enable emscripten code interpreter (very slow)
|
||||
# -s EMTERPRETIFY_ASYNC=1 # support synchronous loops by emterpreter
|
||||
# -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)
|
||||
# --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
|
||||
CFLAGS += -Os -s USE_GLFW=3 -s FORCE_FILESYSTEM=1 -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1 --preload-file $(dir $<)resources@resources
|
||||
ifeq ($(BUILD_MODE), DEBUG)
|
||||
CFLAGS += -s ASSERTIONS=1 --profiling
|
||||
endif
|
||||
# NOTE: Simple raylib examples are compiled to be interpreter by emterpreter, that way,
|
||||
# --source-map-base # allow debugging in browser with source map
|
||||
CFLAGS += -s USE_GLFW=3 -s ASYNCIFY -s TOTAL_MEMORY=67108864 -s FORCE_FILESYSTEM=1 $(dir $<)resources@resources
|
||||
|
||||
# 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
|
||||
CFLAGS += --shell-file $(RAYLIB_PATH)\src\shell.html
|
||||
CFLAGS += --shell-file $(RAYLIB_PATH)/src/shell.html
|
||||
EXT = .html
|
||||
endif
|
||||
|
||||
@@ -255,15 +270,17 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
INCLUDE_PATHS += -I/opt/vc/include/interface/vmcs_host/linux
|
||||
INCLUDE_PATHS += -I/opt/vc/include/interface/vcos/pthreads
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||
# DRM required libraries
|
||||
INCLUDE_PATHS += -I/usr/include/libdrm
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
ifeq ($(PLATFORM_OS),BSD)
|
||||
# Consider -L$(RAYLIB_H_INSTALL_PATH)
|
||||
INCLUDE_PATHS += -I/usr/local/include
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),LINUX)
|
||||
# Reset everything.
|
||||
# Precedence: immediately local, installed version, raysan5 provided libs -I$(RAYLIB_H_INSTALL_PATH) -I$(RAYLIB_PATH)/release/include
|
||||
INCLUDE_PATHS = -I$(RAYLIB_H_INSTALL_PATH) -isystem. -isystem$(RAYLIB_PATH)/src -isystem$(RAYLIB_PATH)/release/include -isystem$(RAYLIB_PATH)/src/external
|
||||
INCLUDE_PATHS = -I$(RAYLIB_H_INSTALL_PATH) -I. -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -271,6 +288,14 @@ endif
|
||||
LDFLAGS = -L. -L$(RAYLIB_RELEASE_PATH) -L$(RAYLIB_PATH)/src
|
||||
|
||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
# resource 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
|
||||
ifeq ($(PLATFORM_OS),BSD)
|
||||
# Consider -L$(RAYLIB_INSTALL_PATH)
|
||||
LDFLAGS += -L. -Lsrc -L/usr/local/lib
|
||||
@@ -278,7 +303,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
ifeq ($(PLATFORM_OS),LINUX)
|
||||
# Reset everything.
|
||||
# Precedence: immediately local, installed version, raysan5 provided libs
|
||||
LDFLAGS = -L. -L$(RAYLIB_INSTALL_PATH) -L$(RAYLIB_RELEASE_PATH)
|
||||
LDFLAGS = -L. -L$(RAYLIB_INSTALL_PATH) -L$(RAYLIB_RELEASE_PATH) -L$(RAYLIB_PATH)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -286,6 +311,10 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
LDFLAGS += -L/opt/vc/lib
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||
LDFLAGS += -lGLESv2 -lEGL -ldrm -lgbm
|
||||
endif
|
||||
|
||||
# Define any libraries required on linking
|
||||
# if you want to link libraries (libname.so or libname.a), use the -lname
|
||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
@@ -300,12 +329,12 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
# Libraries for Debian GNU/Linux desktop compiling
|
||||
# NOTE: Required packages: libegl1-mesa-dev
|
||||
LDLIBS = -lraylib -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
|
||||
@@ -318,7 +347,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
ifeq ($(PLATFORM_OS),OSX)
|
||||
# Libraries for OSX 10.9 desktop compiling
|
||||
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
||||
LDLIBS = -lraylib -framework OpenGL -framework OpenAL -framework Cocoa
|
||||
LDLIBS = -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),BSD)
|
||||
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
||||
@@ -338,13 +367,18 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
# NOTE: Required packages: libasound2-dev (ALSA)
|
||||
LDLIBS = -lraylib -lbrcmGLESv2 -lbrcmEGL -lpthread -lrt -lm -lbcm_host -ldl
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||
# Libraries for DRM compiling
|
||||
# NOTE: Required packages: libasound2-dev (ALSA)
|
||||
LDLIBS = -lraylib -lGLESv2 -lEGL -lpthread -lrt -lm -lgbm -ldrm -ldl
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
# Libraries for web (HTML5) compiling
|
||||
LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.bc
|
||||
LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.a
|
||||
endif
|
||||
|
||||
# Define all source files required
|
||||
EXAMPLES = \
|
||||
# Define all object files required
|
||||
CORE = \
|
||||
core/core_basic_window \
|
||||
core/core_input_keys \
|
||||
core/core_input_mouse \
|
||||
@@ -353,6 +387,7 @@ EXAMPLES = \
|
||||
core/core_input_multitouch \
|
||||
core/core_input_gestures \
|
||||
core/core_2d_camera \
|
||||
core/core_2d_camera_platformer \
|
||||
core/core_3d_camera_mode \
|
||||
core/core_3d_camera_free \
|
||||
core/core_3d_camera_first_person \
|
||||
@@ -362,9 +397,14 @@ EXAMPLES = \
|
||||
core/core_window_letterbox \
|
||||
core/core_drop_files \
|
||||
core/core_random_values \
|
||||
core/core_scissor_test \
|
||||
core/core_storage_values \
|
||||
core/core_vr_simulator \
|
||||
core/core_loading_thread \
|
||||
core/core_quat_conversion \
|
||||
core/core_window_flags
|
||||
|
||||
SHAPES = \
|
||||
shapes/shapes_basic_shapes \
|
||||
shapes/shapes_bouncing_ball \
|
||||
shapes/shapes_colors_palette \
|
||||
@@ -379,18 +419,11 @@ EXAMPLES = \
|
||||
shapes/shapes_easings_rectangle_array \
|
||||
shapes/shapes_draw_ring \
|
||||
shapes/shapes_draw_circle_sector \
|
||||
shapes/shapes_draw_rectangle_rounded \
|
||||
text/text_raylib_fonts \
|
||||
text/text_sprite_fonts \
|
||||
text/text_ttf_loading \
|
||||
text/text_bmfont_ttf \
|
||||
text/text_font_sdf \
|
||||
text/text_format_text \
|
||||
text/text_input_box \
|
||||
text/text_writing_anim \
|
||||
text/text_rectangle_bounds \
|
||||
text/text_unicode \
|
||||
shapes/shapes_draw_rectangle_rounded
|
||||
|
||||
TEXTURES = \
|
||||
textures/textures_logo_raylib \
|
||||
textures/textures_mouse_painting \
|
||||
textures/textures_rectangle \
|
||||
textures/textures_srcrec_dstrec \
|
||||
textures/textures_image_drawing \
|
||||
@@ -406,6 +439,22 @@ EXAMPLES = \
|
||||
textures/textures_sprite_button \
|
||||
textures/textures_sprite_explosion \
|
||||
textures/textures_bunnymark \
|
||||
textures/textures_blend_modes \
|
||||
textures/textures_draw_tiled
|
||||
|
||||
TEXT = \
|
||||
text/text_raylib_fonts \
|
||||
text/text_font_spritefont \
|
||||
text/text_font_loading \
|
||||
text/text_font_filters \
|
||||
text/text_font_sdf \
|
||||
text/text_format_text \
|
||||
text/text_input_box \
|
||||
text/text_writing_anim \
|
||||
text/text_rectangle_bounds \
|
||||
text/text_unicode
|
||||
|
||||
MODELS = \
|
||||
models/models_animation \
|
||||
models/models_billboard \
|
||||
models/models_box_collisions \
|
||||
@@ -415,13 +464,15 @@ EXAMPLES = \
|
||||
models/models_material_pbr \
|
||||
models/models_mesh_generation \
|
||||
models/models_mesh_picking \
|
||||
models/models_obj_loading \
|
||||
models/models_obj_viewer \
|
||||
models/models_loading \
|
||||
models/models_orthographic_projection \
|
||||
models/models_rlgl_solar_system \
|
||||
models/models_skybox \
|
||||
models/models_yaw_pitch_roll \
|
||||
models/models_heightmap \
|
||||
models/models_waving_cubes
|
||||
|
||||
SHADERS = \
|
||||
shaders/shaders_model_shader \
|
||||
shaders/shaders_shapes_textures \
|
||||
shaders/shaders_custom_uniform \
|
||||
@@ -432,21 +483,42 @@ EXAMPLES = \
|
||||
shaders/shaders_texture_waves \
|
||||
shaders/shaders_julia_set \
|
||||
shaders/shaders_eratosthenes \
|
||||
shaders/shaders_basic_lighting \
|
||||
shaders/shaders_fog \
|
||||
shaders/shaders_simple_mask \
|
||||
shaders/shaders_spotlight \
|
||||
shaders/shaders_hot_reloading \
|
||||
shaders/shaders_rlgl_mesh_instanced \
|
||||
shaders/shaders_multi_sample2d
|
||||
|
||||
AUDIO = \
|
||||
audio/audio_module_playing \
|
||||
audio/audio_music_stream \
|
||||
audio/audio_raw_stream \
|
||||
audio/audio_sound_loading \
|
||||
physac/physics_demo \
|
||||
physac/physics_friction \
|
||||
physac/physics_movement \
|
||||
physac/physics_restitution \
|
||||
physac/physics_shatter
|
||||
audio/audio_multichannel_sound
|
||||
|
||||
PHYSICS = \
|
||||
physics/physics_demo \
|
||||
physics/physics_friction \
|
||||
physics/physics_movement \
|
||||
physics/physics_restitution \
|
||||
physics/physics_shatter
|
||||
|
||||
|
||||
CURRENT_MAKEFILE = $(lastword $(MAKEFILE_LIST))
|
||||
|
||||
# Default target entry
|
||||
all: $(EXAMPLES)
|
||||
all: $(CORE) $(SHAPES) $(TEXT) $(TEXTURES) $(MODELS) $(SHADERS) $(AUDIO) $(PHYSICS)
|
||||
|
||||
core: $(CORE)
|
||||
shapes: $(SHAPES)
|
||||
textures: $(TEXTURES)
|
||||
text: $(TEXT)
|
||||
models: $(MODELS)
|
||||
shaders: $(SHADERS)
|
||||
audio: $(AUDIO)
|
||||
physics: $(PHYSICS)
|
||||
|
||||
# Generic compilation pattern
|
||||
# NOTE: Examples must be ready for Android compilation!
|
||||
@@ -464,7 +536,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
del *.o *.exe /s
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),LINUX)
|
||||
find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -fv
|
||||
find . -type f -executable -delete
|
||||
rm -fv *.o
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),OSX)
|
||||
find . -type f -perm +ugo+x -delete
|
||||
@@ -475,6 +548,10 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||
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
|
||||
endif
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# raylib makefile for Android project (APK building)
|
||||
#
|
||||
# Copyright (c) 2017 Ramon Santamaria (@raysan5)
|
||||
# Copyright (c) 2017-2020 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.
|
||||
@@ -26,21 +26,40 @@ PLATFORM ?= PLATFORM_ANDROID
|
||||
RAYLIB_PATH ?= ..\..
|
||||
|
||||
# Define Android architecture (armeabi-v7a, arm64-v8a, x86, x86-64) and API version
|
||||
ANDROID_ARCH ?= ARM
|
||||
ANDROID_API_VERSION = 21
|
||||
# Starting in 2019 using ARM64 is mandatory for published apps,
|
||||
# Starting on August 2020, minimum required target API is Android 10 (API level 29)
|
||||
ANDROID_ARCH ?= ARM64
|
||||
ANDROID_API_VERSION = 29
|
||||
|
||||
# Android required path variables
|
||||
# NOTE: Starting with Android NDK r21, no more toolchain generation is required, NDK is the toolchain on itself
|
||||
ifeq ($(OS),Windows_NT)
|
||||
ANDROID_NDK = C:/android-ndk
|
||||
ANDROID_TOOLCHAIN = $(ANDROID_NDK)/toolchains/llvm/prebuilt/windows-x86_64
|
||||
else
|
||||
ANDROID_NDK ?= /usr/lib/android/ndk
|
||||
ANDROID_TOOLCHAIN = $(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64
|
||||
endif
|
||||
|
||||
ifeq ($(ANDROID_ARCH),ARM)
|
||||
ANDROID_ARCH_NAME = armeabi-v7a
|
||||
ANDROID_ARCH_NAME = armeabi-v7a
|
||||
endif
|
||||
ifeq ($(ANDROID_ARCH),ARM64)
|
||||
ANDROID_ARCH_NAME = arm64-v8a
|
||||
ANDROID_ARCH_NAME = arm64-v8a
|
||||
endif
|
||||
ifeq ($(ANDROID_ARCH),x86)
|
||||
ANDROID_ARCH_NAME = i686
|
||||
endif
|
||||
ifeq ($(ANDROID_ARCH),x86_64)
|
||||
ANDROID_ARCH_NAME = x86_64
|
||||
endif
|
||||
|
||||
# Required path variables
|
||||
# NOTE: JAVA_HOME must be set to JDK
|
||||
JAVA_HOME ?= C:/JavaJDK
|
||||
# NOTE: JAVA_HOME must be set to JDK (using OpenJDK 13)
|
||||
JAVA_HOME ?= C:/open-jdk
|
||||
ANDROID_HOME = C:/android-sdk
|
||||
ANDROID_TOOLCHAIN = C:/android_toolchain_$(ANDROID_ARCH)_API$(ANDROID_API_VERSION)
|
||||
ANDROID_BUILD_TOOLS = $(ANDROID_HOME)/build-tools/28.0.1
|
||||
ANDROID_TOOLCHAIN = C:/android-ndk/toolchains/llvm/prebuilt/windows-x86_64
|
||||
ANDROID_BUILD_TOOLS = $(ANDROID_HOME)/build-tools/29.0.3
|
||||
ANDROID_PLATFORM_TOOLS = $(ANDROID_HOME)/platform-tools
|
||||
|
||||
# Android project configuration variables
|
||||
@@ -81,13 +100,12 @@ ifeq ($(RAYLIB_LIBTYPE),SHARED)
|
||||
endif
|
||||
|
||||
# Compiler and archiver
|
||||
# NOTE: GCC is being deprecated in Android NDK r16
|
||||
ifeq ($(ANDROID_ARCH),ARM)
|
||||
CC = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-clang
|
||||
CC = $(ANDROID_TOOLCHAIN)/bin/armv7a-linux-androideabi$(ANDROID_API_VERSION)-clang
|
||||
AR = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-ar
|
||||
endif
|
||||
ifeq ($(ANDROID_ARCH),ARM64)
|
||||
CC = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-clang
|
||||
CC = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android$(ANDROID_API_VERSION)-clang
|
||||
AR = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-ar
|
||||
endif
|
||||
|
||||
@@ -226,7 +244,7 @@ generate_android_manifest:
|
||||
# Generate storekey for APK signing: $(PROJECT_NAME).keystore
|
||||
# NOTE: Configure here your Distinguished Names (-dname) if required!
|
||||
generate_apk_keystore:
|
||||
if not exist $(PROJECT_BUILD_PATH)/$(PROJECT_NAME).keystore $(JAVA_HOME)/bin/keytool -genkeypair -validity 1000 -dname "CN=$(APP_COMPANY_NAME),O=Android,C=ES" -keystore $(PROJECT_BUILD_PATH)/$(PROJECT_NAME).keystore -storepass $(APP_KEYSTORE_PASS) -keypass $(APP_KEYSTORE_PASS) -alias $(PROJECT_NAME)Key -keyalg RSA
|
||||
if not exist $(PROJECT_BUILD_PATH)/$(PROJECT_NAME).keystore $(JAVA_HOME)/bin/keytool -genkeypair -validity 10000 -dname "CN=$(APP_COMPANY_NAME),O=Android,C=ES" -keystore $(PROJECT_BUILD_PATH)/$(PROJECT_NAME).keystore -storepass $(APP_KEYSTORE_PASS) -keypass $(APP_KEYSTORE_PASS) -alias $(PROJECT_NAME)Key -keyalg RSA
|
||||
|
||||
# Config project package and resource using AndroidManifest.xml and res/values/strings.xml
|
||||
# NOTE: Generates resources file: src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/R.java
|
||||
@@ -274,7 +292,7 @@ zipalign_project_apk_package:
|
||||
# Install $(PROJECT_NAME).apk to default emulator/device
|
||||
# NOTE: Use -e (emulator) or -d (device) parameters if required
|
||||
install:
|
||||
$(ANDROID_PLATFORM_TOOLS)/adb install --abi $(ANDROID_ARCH_NAME) -rds $(PROJECT_NAME).apk
|
||||
$(ANDROID_PLATFORM_TOOLS)/adb install $(PROJECT_NAME).apk
|
||||
|
||||
# Check supported ABI for the device (armeabi-v7a, arm64-v8a, x86, x86_64)
|
||||
check_device_abi:
|
||||
@@ -287,7 +305,7 @@ logcat:
|
||||
|
||||
# Install and monitorize $(PROJECT_NAME).apk to default emulator/device
|
||||
deploy:
|
||||
$(ANDROID_PLATFORM_TOOLS)/adb install -r $(PROJECT_NAME).apk
|
||||
$(ANDROID_PLATFORM_TOOLS)/adb install $(PROJECT_NAME).apk
|
||||
$(ANDROID_PLATFORM_TOOLS)/adb logcat -c
|
||||
$(ANDROID_PLATFORM_TOOLS)/adb logcat raylib:V *:S
|
||||
|
||||
|
198
examples/README.md
Normal file
@@ -0,0 +1,198 @@
|
||||
## EXAMPLES LIST
|
||||
|
||||
### category: core
|
||||
|
||||
Examples using raylib core platform functionality like window creation, inputs, drawing modes and system functionality.
|
||||
|
||||
| ## | example | image | developer | new |
|
||||
|----|----------|--------|:----------:|:---:|
|
||||
| 01 | [core_basic_window](core/core_basic_window.c) | <img src="core/core_basic_window.png" alt="core_basic_window" width="200"> | ray | |
|
||||
| 02 | [core_input_keys](core/core_input_keys.c) | <img src="core/core_input_keys.png" alt="core_input_keys" width="200"> | ray | |
|
||||
| 03 | [core_input_mouse](core/core_input_mouse.c) | <img src="core/core_input_mouse.png" alt="core_input_mouse" width="200"> | ray | |
|
||||
| 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="200"> | ray | |
|
||||
| 05 | [core_input_gamepad](core/core_input_gamepad.c) | <img src="core/core_input_gamepad.png" alt="core_input_gamepad" width="200"> | ray | |
|
||||
| 06 | [core_input_multitouch](core/core_input_multitouch.c) | <img src="core/core_input_multitouch.png" alt="core_input_multitouch" width="200"> | [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="200"> | ray | |
|
||||
| 08 | [core_2d_camera](core/core_2d_camera.c) | <img src="core/core_2d_camera.png" alt="core_2d_camera" width="200"> | ray | |
|
||||
| 09 | [core_2d_camera_platformer](core/core_2d_camera_platformer.c) | <img src="core/core_2d_camera_platformer.png" alt="core_2d_camera_platformer" width="200"> | [avyy](https://github.com/avyy) | ⭐️ |
|
||||
| 10 | [core_3d_camera_mode](core/core_3d_camera_mode.c) | <img src="core/core_3d_camera_mode.png" alt="core_3d_camera_mode" width="200"> | ray | |
|
||||
| 11 | [core_3d_camera_free](core/core_3d_camera_free.c) | <img src="core/core_3d_camera_free.png" alt="core_3d_camera_free" width="200"> | ray | |
|
||||
| 12 | [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="200"> | ray | |
|
||||
| 13 | [core_3d_picking](core/core_3d_picking.c) | <img src="core/core_3d_picking.png" alt="core_3d_picking" width="200"> | ray | |
|
||||
| 14 | [core_world_screen](core/core_world_screen.c) | <img src="core/core_world_screen.png" alt="core_world_screen" width="200"> | ray | |
|
||||
| 15 | [core_custom_logging](core/core_custom_logging.c) | <img src="core/core_custom_logging.png" alt="core_custom_logging" width="200"> | [Pablo Marcos](https://github.com/pamarcos) | |
|
||||
| 16 | [core_window_letterbox](core/core_window_letterbox.c) | <img src="core/core_window_letterbox.png" alt="core_window_letterbox" width="200"> | [Anata](https://github.com/anatagawa) | |
|
||||
| 17 | [core_drop_files](core/core_drop_files.c) | <img src="core/core_drop_files.png" alt="core_drop_files" width="200"> | ray | |
|
||||
| 18 | [core_random_values](core/core_random_values.c) | <img src="core/core_random_values.png" alt="core_random_values" width="200"> | ray | |
|
||||
| 19 | [core_scissor_test](core/core_scissor_test.c) | <img src="core/core_scissor_test.png" alt="core_scissor_test" width="200"> | [Chris Dill](https://github.com/MysteriousSpace) | ⭐️ |
|
||||
| 20 | [core_storage_values](core/core_storage_values.c) | <img src="core/core_storage_values.png" alt="core_storage_values" width="200"> | ray | |
|
||||
| 21 | [core_vr_simulator](core/core_vr_simulator.c) | <img src="core/core_vr_simulator.png" alt="core_vr_simulator" width="200"> | ray | |
|
||||
| 22 | [core_loading_thread](core/core_loading_thread.c) | <img src="core/core_loading_thread.png" alt="core_loading_thread" width="200"> | ray | ⭐️ |
|
||||
| 23 | [core/core_quat_conversion](core/core_quat_conversion.c) | <img src="core/core_quat_conversion.png" alt="core_quat_conversion" width="200"> | [Chris Camacho](https://github.com/codifies) | ⭐️ |
|
||||
| 24 | [core/core_window_flags](core/core_window_flags.c) | <img src="core/core_window_flags.png" alt="core_window_flags" width="200"> | ray | ⭐️ | | ⭐️ |
|
||||
|
||||
### category: shapes
|
||||
|
||||
Examples using raylib shapes drawing functionality, provided by raylib [shapes](../src/shapes.c) module.
|
||||
|
||||
| ## | example | image | developer | new |
|
||||
|----|----------|--------|:----------:|:---:|
|
||||
| 25 | [shapes_basic_shapes](shapes/shapes_basic_shapes.c) | <img src="shapes/shapes_basic_shapes.png" alt="shapes_basic_shapes" width="200"> | ray | |
|
||||
| 26 | [shapes_bouncing_ball](shapes/shapes_bouncing_ball.c) | <img src="shapes/shapes_bouncing_ball.png" alt="shapes_bouncing_ball" width="200"> | ray | ⭐️ |
|
||||
| 27 | [shapes_colors_palette](shapes/shapes_colors_palette.c) | <img src="shapes/shapes_colors_palette.png" alt="shapes_colors_palette" width="200"> | ray | |
|
||||
| 28 | [shapes_logo_raylib](shapes/shapes_logo_raylib.c) | <img src="shapes/shapes_logo_raylib.png" alt="shapes_logo_raylib" width="200"> | ray | |
|
||||
| 29 | [shapes_logo_raylib_anim](shapes/shapes_logo_raylib_anim.c) | <img src="shapes/shapes_logo_raylib_anim.png" alt="shapes_logo_raylib_anim" width="200"> | ray | |
|
||||
| 30 | [shapes_rectangle_scaling](shapes/shapes_rectangle_scaling.c) | <img src="shapes/shapes_rectangle_scaling.png" alt="shapes_rectangle_scaling" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
|
||||
| 31 | [shapes_lines_bezier](shapes/shapes_lines_bezier.c) | <img src="shapes/shapes_lines_bezier.png" alt="shapes_lines_bezier" width="200"> | ray | |
|
||||
| 32 | [shapes_collision_area](shapes/shapes_collision_area.c) | <img src="shapes/shapes_collision_area.png" alt="shapes_collision_area" width="200"> | ray | ⭐️ |
|
||||
| 33 | [shapes_following_eyes](shapes/shapes_following_eyes.c) | <img src="shapes/shapes_following_eyes.png" alt="shapes_following_eyes" width="200"> | ray | ⭐️ |
|
||||
| 34 | [shapes_easings_ball_anim](shapes/shapes_easings_ball_anim.c) | <img src="shapes/shapes_easings_ball_anim.png" alt="shapes_easings_ball_anim" width="200"> | ray | ⭐️ |
|
||||
| 35 | [shapes_easings_box_anim](shapes/shapes_easings_box_anim.c) | <img src="shapes/shapes_easings_box_anim.png" alt="shapes_easings_box_anim" width="200"> | ray | ⭐️ |
|
||||
| 36 | [shapes_easings_rectangle_array](shapes/shapes_easings_rectangle_array.c) | <img src="shapes/shapes_easings_rectangle_array.png" alt="shapes_easings_rectangle_array" width="200"> | ray | ⭐️ |
|
||||
| 37 | [shapes_draw_ring](shapes/shapes_draw_ring.c) | <img src="shapes/shapes_draw_ring.png" alt="shapes_draw_ring" width="200"> | [Vlad Adrian](https://github.com/demizdor) | ⭐️ |
|
||||
| 38 | [shapes_draw_circle_sector](shapes/shapes_draw_circle_sector.c) | <img src="shapes/shapes_draw_circle_sector.png" alt="shapes_draw_circle_sector" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
|
||||
| 39 | [shapes_draw_rectangle_rounded](shapes/shapes_draw_rectangle_rounded.c) | <img src="shapes/shapes_draw_rectangle_rounded.png" alt="shapes_draw_rectangle_rounded" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
|
||||
|
||||
### category: textures
|
||||
|
||||
Examples using raylib textures functionality, including image/textures loading/generation and drawing, provided by raylib [textures](../src/textures.c) module.
|
||||
|
||||
| ## | example | image | developer | new |
|
||||
|----|---------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|:------------------------------------------------:|:---:|
|
||||
| 40 | [textures_logo_raylib](textures/textures_logo_raylib.c) | <img src="textures/textures_logo_raylib.png" alt="textures_logo_raylib" width="200"> | ray | |
|
||||
| 41 | [textures_rectangle](textures/textures_rectangle.c) | <img src="textures/textures_rectangle.png" alt="textures_rectangle" width="200"> | ray | |
|
||||
| 42 | [textures_srcrec_dstrec](textures/textures_srcrec_dstrec.c) | <img src="textures/textures_srcrec_dstrec.png" alt="textures_srcrec_dstrec" width="200"> | ray | |
|
||||
| 43 | [textures_image_drawing](textures/textures_image_drawing.c) | <img src="textures/textures_image_drawing.png" alt="textures_image_drawing" width="200"> | ray | |
|
||||
| 44 | [textures_image_generation](textures/textures_image_generation.c) | <img src="textures/textures_image_generation.png" alt="textures_image_generation" width="200"> | ray | |
|
||||
| 45 | [textures_image_loading](textures/textures_image_loading.c) | <img src="textures/textures_image_loading.png" alt="textures_image_loading" width="200"> | ray | |
|
||||
| 46 | [textures_image_processing](textures/textures_image_processing.c) | <img src="textures/textures_image_processing.png" alt="textures_image_processing" width="200"> | ray | |
|
||||
| 47 | [textures_image_text](textures/textures_image_text.c) | <img src="textures/textures_image_text.png" alt="textures_image_text" width="200"> | ray | |
|
||||
| 48 | [textures_to_image](textures/textures_to_image.c) | <img src="textures/textures_to_image.png" alt="textures_to_image" width="200"> | ray | ⭐️ |
|
||||
| 49 | [textures_raw_data](textures/textures_raw_data.c) | <img src="textures/textures_raw_data.png" alt="textures_raw_data" width="200"> | ray | |
|
||||
| 50 | [textures_particles_blending](textures/textures_particles_blending.c) | <img src="textures/textures_particles_blending.png" alt="textures_particles_blending" width="200"> | ray | |
|
||||
| 51 | [textures_npatch_drawing](textures/textures_npatch_drawing.c) | <img src="textures/textures_npatch_drawing.png" alt="textures_npatch_drawing" width="200"> | [Jorge A. Gomes](https://github.com/overdev) | |
|
||||
| 52 | [textures_background_scrolling](textures/textures_background_scrolling.c) | <img src="textures/textures_background_scrolling.png" alt="textures_background_scrolling" width="200"> | ray | ⭐️ |
|
||||
| 53 | [textures_sprite_button](textures/textures_sprite_button.c) | <img src="textures/textures_sprite_button.png" alt="textures_sprite_button" width="200"> | ray | ⭐️ |
|
||||
| 54 | [textures_sprite_explosion](textures/textures_sprite_explosion.c) | <img src="textures/textures_sprite_explosion.png" alt="textures_sprite_explosion" width="200"> | ray | ⭐️ |
|
||||
| 55 | [textures_bunnymark](textures/textures_bunnymark.c) | <img src="textures/textures_bunnymark.png" alt="textures_bunnymark" width="200"> | ray | |
|
||||
| 56 | [textures_mouse_painting](textures/textures_mouse_painting.c) | <img src="textures/textures_mouse_painting.png" alt="textures_mouse_painting" width="200"> | [Chris Dill](https://github.com/MysteriousSpace) | |
|
||||
| 57 | [textures_blend_modes](textures/textures_blend_modes.c) | <img src="textures/textures_blend_modes.png" alt="textures_blend_modes" width="200"> | [Karlo Licudine](https://github.com/accidentalrebel) | ⭐️ |
|
||||
| 58 | [textures/textures_draw_tiled](textures/textures_draw_tiled.c) | <img src="textures/textures_draw_tiled.png" alt="textures_draw_tiled" width="200"> | [Vlad Adrian](https://github.com/demizdor) | ⭐️ |
|
||||
|
||||
### category: text
|
||||
|
||||
Examples using raylib text functionality, including sprite fonts loading/generation and text drawing, provided by raylib [text](../src/text.c) module.
|
||||
|
||||
| ## | example | image | developer | new |
|
||||
|----|----------|--------|:----------:|:---:|
|
||||
| 59 | [text_raylib_fonts](text/text_raylib_fonts.c) | <img src="text/text_raylib_fonts.png" alt="text_raylib_fonts" width="200"> | ray | |
|
||||
| 60 | [text_font_spritefont](text/text_font_spritefont.c) | <img src="text/text_font_spritefont.png" alt="text_font_spritefont" width="200"> | ray | |
|
||||
| 61 | [text_font_filters](text/text_font_filters.c) | <img src="text/text_font_filters.png" alt="text_font_filters" width="200"> | ray | |
|
||||
| 62 | [text_font_loading](text/text_font_loading.c) | <img src="text/text_font_loading.png" alt="text_font_loading" width="200"> | ray | |
|
||||
| 63 | [text_font_sdf](text/text_font_sdf.c) | <img src="text/text_font_sdf.png" alt="text_font_sdf" width="200"> | ray | |
|
||||
| 64 | [text_format_text](text/text_format_text.c) | <img src="text/text_format_text.png" alt="text_format_text" width="200"> | ray | |
|
||||
| 65 | [text_input_box](text/text_input_box.c) | <img src="text/text_input_box.png" alt="text_input_box" width="200"> | ray | |
|
||||
| 66 | [text_writing_anim](text/text_writing_anim.c) | <img src="text/text_writing_anim.png" alt="text_writing_anim" width="200"> | ray | |
|
||||
| 67 | [text_rectangle_bounds](text/text_rectangle_bounds.c) | <img src="text/text_rectangle_bounds.png" alt="text_rectangle_bounds" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
|
||||
| 68 | [text_unicode](text/text_unicode.c) | <img src="text/text_unicode.png" alt="text_unicode" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
|
||||
|
||||
### category: models
|
||||
|
||||
Examples using raylib models functionality, including models loading/generation and drawing, provided by raylib [models](../src/models.c) module.
|
||||
|
||||
| ## | example | image | developer | new |
|
||||
|----|----------|--------|:----------:|:---:|
|
||||
| 69 | [models_animation](models/models_animation.c) | <img src="models/models_animation.png" alt="models_animation" width="200"> | [culacant](https://github.com/culacant) | |
|
||||
| 70 | [models_billboard](models/models_billboard.c) | <img src="models/models_billboard.png" alt="models_billboard" width="200"> | ray | |
|
||||
| 71 | [models_box_collisions](models/models_box_collisions.c) | <img src="models/models_box_collisions.png" alt="models_box_collisions" width="200"> | ray | |
|
||||
| 72 | [models_cubicmap](models/models_cubicmap.c) | <img src="models/models_cubicmap.png" alt="models_cubicmap" width="200"> | ray | |
|
||||
| 73 | [models_first_person_maze](models/models_first_person_maze.c) | <img src="models/models_first_person_maze.png" alt="models_first_person_maze" width="200"> | ray | |
|
||||
| 74 | [models_geometric_shapes](models/models_geometric_shapes.c) | <img src="models/models_geometric_shapes.png" alt="models_geometric_shapes" width="200"> | ray | |
|
||||
| 75 | [models_material_pbr](models/models_material_pbr.c) | <img src="models/models_material_pbr.png" alt="models_material_pbr" width="200"> | ray | |
|
||||
| 76 | [models_mesh_generation](models/models_mesh_generation.c) | <img src="models/models_mesh_generation.png" alt="models_mesh_generation" width="200"> | ray | |
|
||||
| 77 | [models_mesh_picking](models/models_mesh_picking.c) | <img src="models/models_mesh_picking.png" alt="models_mesh_picking" width="200"> | [Joel Davis](https://github.com/joeld42) | |
|
||||
| 78 | [models_loading](models/models_loading.c) | <img src="models/models_loading.png" alt="models_loading" width="200"> | ray | |
|
||||
| 79 | [models_orthographic_projection](models/models_orthographic_projection.c) | <img src="models/models_orthographic_projection.png" alt="models_orthographic_projection" width="200"> | [Max Danielsson](https://github.com/autious) | |
|
||||
| 80 | [models_rlgl_solar_system](models/models_rlgl_solar_system.c) | <img src="models/models_rlgl_solar_system.png" alt="models_rlgl_solar_system" width="200"> | ray | |
|
||||
| 81 | [models_skybox](models/models_skybox.c) | <img src="models/models_skybox.png" alt="models_skybox" width="200"> | ray | |
|
||||
| 82 | [models_yaw_pitch_roll](models/models_yaw_pitch_roll.c) | <img src="models/models_yaw_pitch_roll.png" alt="models_yaw_pitch_roll" width="200"> | [Berni](https://github.com/Berni8k) | |
|
||||
| 83 | [models_heightmap](models/models_heightmap.c) | <img src="models/models_heightmap.png" alt="models_heightmap" width="200"> | ray | |
|
||||
| 84 | [models_waving_cubes](models/models_waving_cubes.c) | <img src="models/models_waving_cubes.png" alt="models_waving_cubes" width="200"> | [codecat](https://github.com/codecat) | ⭐️ |
|
||||
|
||||
### category: shaders
|
||||
|
||||
Examples using raylib shaders functionality, including shaders loading, parameters configuration and drawing using them (model shaders and postprocessing shaders). This functionality is directly provided by raylib [rlgl](../src/rlgl.c) module.
|
||||
|
||||
| ## | example | image | developer | new |
|
||||
|----|----------|--------|:----------:|:---:|
|
||||
| 85 | [shaders_basic_lighting](shaders/shaders_basic_lighting.c) | <img src="shaders/shaders_basic_lighting.png" alt="shaders_basic_lighting" width="200"> | [Chris Camacho](https://github.com/codifies) | |
|
||||
| 86 | [shaders_model_shader](shaders/shaders_model_shader.c) | <img src="shaders/shaders_model_shader.png" alt="shaders_model_shader" width="200"> | ray | |
|
||||
| 87 | [shaders_shapes_textures](shaders/shaders_shapes_textures.c) | <img src="shaders/shaders_shapes_textures.png" alt="shaders_shapes_textures" width="200"> | ray | |
|
||||
| 88 | [shaders_custom_uniform](shaders/shaders_custom_uniform.c) | <img src="shaders/shaders_custom_uniform.png" alt="shaders_custom_uniform" width="200"> | ray | |
|
||||
| 89 | [shaders_postprocessing](shaders/shaders_postprocessing.c) | <img src="shaders/shaders_postprocessing.png" alt="shaders_postprocessing" width="200"> | ray | |
|
||||
| 90 | [shaders_palette_switch](shaders/shaders_palette_switch.c) | <img src="shaders/shaders_palette_switch.png" alt="shaders_palette_switch" width="200"> | [Marco Lizza](https://github.com/MarcoLizza) | |
|
||||
| 91 | [shaders_raymarching](shaders/shaders_raymarching.c) | <img src="shaders/shaders_raymarching.png" alt="shaders_raymarching" width="200"> | Shader by Iñigo Quilez | |
|
||||
| 92 | [shaders_texture_drawing](shaders/shaders_texture_drawing.c) | <img src="shaders/shaders_texture_drawing.png" alt="shaders_texture_drawing" width="200"> | Michał Ciesielski | |
|
||||
| 93 | [shaders_texture_waves](shaders/shaders_texture_waves.c) | <img src="shaders/shaders_texture_waves.png" alt="shaders_texture_waves" width="200"> | [Anata](https://github.com/anatagawa) | |
|
||||
| 94 | [shaders_julia_set](shaders/shaders_julia_set.c) | <img src="shaders/shaders_julia_set.png" alt="shaders_julia_set" width="200"> | [eggmund](https://github.com/eggmund) | |
|
||||
| 95 | [shaders_eratosthenes](shaders/shaders_eratosthenes.c) | <img src="shaders/shaders_eratosthenes.png" alt="shaders_eratosthenes" width="200"> | [ProfJski](https://github.com/ProfJski) | |
|
||||
| 96 | [shaders_fog](shaders/shaders_fog.c) | <img src="shaders/shaders_fog.png" alt="shaders_fog" width="200"> | [Chris Camacho](https://github.com/codifies) | |
|
||||
| 97 | [shaders_simple_mask](shaders/shaders_simple_mask.c) | <img src="shaders/shaders_simple_mask.png" alt="shaders_simple_mask" width="200"> | [Chris Camacho](https://github.com/codifies) | |
|
||||
| 98 | [shaders_spotlight](shaders/shaders_spotlight.c) | <img src="shaders/shaders_spotlight.png" alt="shaders_spotlight" width="200"> | [Chris Camacho](https://github.com/codifies) | ⭐️ |
|
||||
| 99 | [shaders_hot_reloading](shaders/shaders_hot_reloading.c) | <img src="shaders/shaders_hot_reloading.png" alt="shaders_hot_reloading" width="200"> | ray | ⭐️ |
|
||||
| 100 | [shaders_rlgl_mesh_instanced](shaders/shaders_rlgl_mesh_instanced.c) | <img src="shaders/shaders_rlgl_mesh_instanced.png" alt="shaders_rlgl_mesh_instanced" width="200"> | [Chris Camacho](https://github.com/codifies) | ⭐️ |
|
||||
| 101 | [shaders_multi_sample2d](shaders/shaders_multi_sample2d.c) | <img src="shaders/shaders_multi_sample2d.png" alt="shaders_multi_sample2d" width="200"> | ray | ⭐️ |
|
||||
|
||||
### 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 | developer | new |
|
||||
|----|----------|--------|:----------:|:---:|
|
||||
| 102 | [audio_module_playing](audio/audio_module_playing.c) | <img src="audio/audio_module_playing.png" alt="audio_module_playing" width="200"> | ray | |
|
||||
| 103 | [audio_music_stream](audio/audio_music_stream.c) | <img src="audio/audio_music_stream.png" alt="audio_music_stream" width="200"> | ray | |
|
||||
| 104 | [audio_raw_stream](audio/audio_raw_stream.c) | <img src="audio/audio_raw_stream.png" alt="audio_raw_stream" width="200"> | ray | |
|
||||
| 105 | [audio_sound_loading](audio/audio_sound_loading.c) | <img src="audio/audio_sound_loading.png" alt="audio_sound_loading" width="200"> | ray | |
|
||||
| 106 | [audio_multichannel_sound](audio/audio_multichannel_sound.c) | <img src="audio/audio_multichannel_sound.png" alt="audio_multichannel_sound" width="200"> | [Chris Camacho](https://github.com/codifies) | ⭐️ |
|
||||
|
||||
### category: physics
|
||||
|
||||
Examples showing physics functionality with raylib. This functionality is provided by [physac](https://github.com/victorfisac/Physac) library, included with raylib [sources](../src/physac.h). Note this library is not linked with raylib by default, it should be manually included in user code.
|
||||
|
||||
| ## | example | image | developer | new |
|
||||
|----|----------|--------|:----------:|:---:|
|
||||
| 107 | [physics_demo](physics/physics_demo.c) | <img src="physics/physics_demo.png" alt="physics_demo" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
|
||||
| 108 | [physics_friction](physics/physics_friction.c) | <img src="physics/physics_friction.png" alt="physics_friction" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
|
||||
| 109 | [physics_movement](physics/physics_movement.c) | <img src="physics/physics_movement.png" alt="physics_movement" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
|
||||
| 110 | [physics_restitution](physics/physics_restitution.c) | <img src="physics/physics_restitution.png" alt="physics_restitution" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
|
||||
| 111 | [physics_shatter](physics/physics_shatter.c) | <img src="physics/physics_shatter.png" alt="physics_shatter" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
|
||||
|
||||
### category: network
|
||||
|
||||
Examples showing raylib network functionality. This functionality is provided by [rnet](../src/rnet.h) module.
|
||||
|
||||
**Note that rnet module is under development and not ready yet.**
|
||||
|
||||
| ## | example | image | developer | new |
|
||||
|----|----------|--------|:----------:|:---:|
|
||||
| 112 | [network_ping_pong](network/network_ping_pong.c) | | [Jak Barnes](https://github.com/syphonx) | |
|
||||
| 113 | [network_resolve_host](network/network_resolve_host.c) | | [Jak Barnes](https://github.com/syphonx) | |
|
||||
| 114 | [network_tcp_client](network/network_tcp_client.c) | | [Jak Barnes](https://github.com/syphonx) | |
|
||||
| 115 | [network_tcp_server](network/network_tcp_server.c) | | [Jak Barnes](https://github.com/syphonx) | |
|
||||
| 116 | [network_test](network/network_test.c) | | [Jak Barnes](https://github.com/syphonx) | |
|
||||
| 117 | [network_udp_client](network/network_udp_client.c) | | [Jak Barnes](https://github.com/syphonx) | |
|
||||
| 118 | [network_udp_server](network/network_udp_server.c) | | [Jak Barnes](https://github.com/syphonx) | |
|
||||
|
||||
### category: others
|
||||
|
||||
Examples showing raylib misc functionality that does not fit in other categories, like standalone modules usage or examples integrating external libraries.
|
||||
|
||||
| ## | example | image | developer | new |
|
||||
|----|----------|--------|:----------:|:---:|
|
||||
| 119 | [raudio_standalone](others/raudio_standalone.c) | | ray | |
|
||||
| 120 | [rlgl_standalone](others/rlgl_standalone.c) | | ray | |
|
||||
| 121 | [easings_testbed](others/easings_testbed.c) | | [Juan Miguel López](https://github.com/flashback-fx) | |
|
||||
| 122 | [embedded_files_loading](others/embedded_files_loading.c)) | | [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!
|
||||
|
@@ -2,8 +2,6 @@
|
||||
*
|
||||
* raylib [audio] example - Module playing (streaming)
|
||||
*
|
||||
* NOTE: This example requires OpenAL Soft library installed
|
||||
*
|
||||
* This example has been created using raylib 1.5 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
@@ -48,13 +46,15 @@ int main(void)
|
||||
circles[i].radius = GetRandomValue(10, 40);
|
||||
circles[i].position.x = GetRandomValue(circles[i].radius, screenWidth - circles[i].radius);
|
||||
circles[i].position.y = GetRandomValue(circles[i].radius, screenHeight - circles[i].radius);
|
||||
circles[i].speed = (float)GetRandomValue(1, 100)/20000.0f;
|
||||
circles[i].speed = (float)GetRandomValue(1, 100)/2000.0f;
|
||||
circles[i].color = colors[GetRandomValue(0, 13)];
|
||||
}
|
||||
|
||||
Music xm = LoadMusicStream("resources/chiptun1.mod");
|
||||
Music music = LoadMusicStream("resources/mini1111.xm");
|
||||
music.looping = false;
|
||||
float pitch = 1.0f;
|
||||
|
||||
PlayMusicStream(xm);
|
||||
PlayMusicStream(music);
|
||||
|
||||
float timePlayed = 0.0f;
|
||||
bool pause = false;
|
||||
@@ -67,13 +67,13 @@ int main(void)
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateMusicStream(xm); // Update music buffer with new stream data
|
||||
UpdateMusicStream(music); // Update music buffer with new stream data
|
||||
|
||||
// Restart music playing (stop and play)
|
||||
if (IsKeyPressed(KEY_SPACE))
|
||||
{
|
||||
StopMusicStream(xm);
|
||||
PlayMusicStream(xm);
|
||||
StopMusicStream(music);
|
||||
PlayMusicStream(music);
|
||||
}
|
||||
|
||||
// Pause/Resume music playing
|
||||
@@ -81,12 +81,17 @@ int main(void)
|
||||
{
|
||||
pause = !pause;
|
||||
|
||||
if (pause) PauseMusicStream(xm);
|
||||
else ResumeMusicStream(xm);
|
||||
if (pause) PauseMusicStream(music);
|
||||
else ResumeMusicStream(music);
|
||||
}
|
||||
|
||||
if (IsKeyDown(KEY_DOWN)) pitch -= 0.01f;
|
||||
else if (IsKeyDown(KEY_UP)) pitch += 0.01f;
|
||||
|
||||
SetMusicPitch(music, pitch);
|
||||
|
||||
// Get timePlayed scaled to bar dimensions
|
||||
timePlayed = GetMusicTimePlayed(xm)/GetMusicTimeLength(xm)*(screenWidth - 40);
|
||||
timePlayed = GetMusicTimePlayed(music)/GetMusicTimeLength(music)*(screenWidth - 40);
|
||||
|
||||
// Color circles animation
|
||||
for (int i = MAX_CIRCLES - 1; (i >= 0) && !pause; i--)
|
||||
@@ -103,7 +108,7 @@ int main(void)
|
||||
circles[i].position.x = GetRandomValue(circles[i].radius, screenWidth - circles[i].radius);
|
||||
circles[i].position.y = GetRandomValue(circles[i].radius, screenHeight - circles[i].radius);
|
||||
circles[i].color = colors[GetRandomValue(0, 13)];
|
||||
circles[i].speed = (float)GetRandomValue(1, 100)/20000.0f;
|
||||
circles[i].speed = (float)GetRandomValue(1, 100)/2000.0f;
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
@@ -130,7 +135,7 @@ int main(void)
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadMusicStream(xm); // Unload music stream buffers from RAM
|
||||
UnloadMusicStream(music); // Unload music stream buffers from RAM
|
||||
|
||||
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
|
||||
|
||||
|
73
examples/audio/audio_multichannel_sound.c
Normal file
@@ -0,0 +1,73 @@
|
||||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [audio] example - Multichannel sound playing
|
||||
*
|
||||
* This example has been created using raylib 2.6 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Example contributed by Chris Camacho (@chriscamacho) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Copyright (c) 2019 Chris Camacho (@chriscamacho) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [audio] example - Multichannel sound playing");
|
||||
|
||||
InitAudioDevice(); // Initialize audio device
|
||||
|
||||
Sound fxWav = LoadSound("resources/sound.wav"); // Load WAV audio file
|
||||
Sound fxOgg = LoadSound("resources/target.ogg"); // Load OGG audio file
|
||||
|
||||
SetSoundVolume(fxWav, 0.2);
|
||||
|
||||
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 (IsKeyPressed(KEY_ENTER)) PlaySoundMulti(fxWav); // Play a new wav sound instance
|
||||
if (IsKeyPressed(KEY_SPACE)) PlaySoundMulti(fxOgg); // Play a new ogg sound instance
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
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);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
StopSoundMulti(); // We must stop the buffer pool before unloading
|
||||
|
||||
UnloadSound(fxWav); // Unload sound data
|
||||
UnloadSound(fxOgg); // Unload sound data
|
||||
|
||||
CloseAudioDevice(); // Close audio device
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
BIN
examples/audio/audio_multichannel_sound.png
Normal file
After Width: | Height: | Size: 16 KiB |
@@ -2,8 +2,6 @@
|
||||
*
|
||||
* raylib [audio] example - Music playing (streaming)
|
||||
*
|
||||
* NOTE: This example requires OpenAL Soft library installed
|
||||
*
|
||||
* This example has been created using raylib 1.3 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
@@ -24,7 +22,7 @@ int main(void)
|
||||
|
||||
InitAudioDevice(); // Initialize audio device
|
||||
|
||||
Music music = LoadMusicStream("resources/guitar_noodling.ogg");
|
||||
Music music = LoadMusicStream("resources/country.mp3");
|
||||
|
||||
PlayMusicStream(music);
|
||||
|
||||
|
@@ -2,11 +2,11 @@
|
||||
*
|
||||
* raylib [audio] example - Raw audio streaming
|
||||
*
|
||||
* NOTE: This example requires OpenAL Soft library installed
|
||||
*
|
||||
* This example has been created using raylib 1.6 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Example created by Ramon Santamaria (@raysan5) and reviewed by James Hofmann (@triplefox)
|
||||
*
|
||||
* Copyright (c) 2015-2019 Ramon Santamaria (@raysan5) and James Hofmann (@triplefox)
|
||||
*
|
||||
********************************************************************************************/
|
||||
@@ -99,7 +99,7 @@ int main(void)
|
||||
}
|
||||
|
||||
// Refill audio stream if required
|
||||
if (IsAudioBufferProcessed(stream))
|
||||
if (IsAudioStreamProcessed(stream))
|
||||
{
|
||||
// Synthesize a buffer that is exactly the requested size
|
||||
int writeCursor = 0;
|
||||
@@ -134,7 +134,7 @@ int main(void)
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawText(FormatText("sine frequency: %i",(int)frequency), GetScreenWidth() - 220, 10, 20, RED);
|
||||
DrawText(TextFormat("sine frequency: %i",(int)frequency), GetScreenWidth() - 220, 10, 20, RED);
|
||||
DrawText("click mouse button to change frequency", 10, 10, 20, DARKGRAY);
|
||||
|
||||
// Draw the current buffer state proportionate to the screen
|
||||
|
@@ -2,8 +2,6 @@
|
||||
*
|
||||
* raylib [audio] example - Sound loading and playing
|
||||
*
|
||||
* NOTE: This example requires OpenAL Soft library installed
|
||||
*
|
||||
* This example has been created using raylib 1.0 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
@@ -25,7 +23,7 @@ int main(void)
|
||||
InitAudioDevice(); // Initialize audio device
|
||||
|
||||
Sound fxWav = LoadSound("resources/sound.wav"); // Load WAV audio file
|
||||
Sound fxOgg = LoadSound("resources/tanatana.ogg"); // Load OGG audio file
|
||||
Sound fxOgg = LoadSound("resources/target.ogg"); // Load OGG audio file
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
10
examples/audio/resources/LICENSE.md
Normal file
@@ -0,0 +1,10 @@
|
||||
| resource | author | licence | notes |
|
||||
| :------------------- | :---------: | :------ | :---- |
|
||||
| country.mp3 | [@emegeme](https://github.com/emegeme) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Originally created for "DART that TARGET" game |
|
||||
| target.ogg | [@emegeme](https://github.com/emegeme) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Originally created for "DART that TARGET" game |
|
||||
| target.flac | [@emegeme](https://github.com/emegeme) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Originally created for "DART that TARGET" game |
|
||||
| coin.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Created using [rFXGen](https://raylibtech.itch.io/rfxgen) |
|
||||
| sound.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Created using [rFXGen](https://raylibtech.itch.io/rfxgen) |
|
||||
| spring.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Created using [rFXGen](https://raylibtech.itch.io/rfxgen) |
|
||||
| weird.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Created using [rFXGen](https://raylibtech.itch.io/rfxgen) |
|
||||
| mini1111.xm | [tPORt](https://modarchive.org/index.php?request=view_by_moduleid&query=51891) | [Mod Archive Distribution license](https://modarchive.org/index.php?terms-upload) | - |
|
BIN
examples/audio/resources/country.mp3
Normal file
BIN
examples/audio/resources/target.flac
Normal file
BIN
examples/audio/resources/target.ogg
Normal file
@@ -42,7 +42,7 @@ int main(void)
|
||||
|
||||
Camera2D camera = { 0 };
|
||||
camera.target = (Vector2){ player.x + 20, player.y + 20 };
|
||||
camera.offset = (Vector2){ 0, 0 };
|
||||
camera.offset = (Vector2){ screenWidth/2, screenHeight/2 };
|
||||
camera.rotation = 0.0f;
|
||||
camera.zoom = 1.0f;
|
||||
|
||||
@@ -54,16 +54,10 @@ int main(void)
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
if (IsKeyDown(KEY_RIGHT))
|
||||
{
|
||||
player.x += 2; // Player movement
|
||||
camera.offset.x -= 2; // Camera displacement with player movement
|
||||
}
|
||||
else if (IsKeyDown(KEY_LEFT))
|
||||
{
|
||||
player.x -= 2; // Player movement
|
||||
camera.offset.x += 2; // Camera displacement with player movement
|
||||
}
|
||||
|
||||
// Player movement
|
||||
if (IsKeyDown(KEY_RIGHT)) player.x += 2;
|
||||
else if (IsKeyDown(KEY_LEFT)) player.x -= 2;
|
||||
|
||||
// Camera target follows player
|
||||
camera.target = (Vector2){ player.x + 20, player.y + 20 };
|
||||
@@ -135,4 +129,4 @@ int main(void)
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
293
examples/core/core_2d_camera_platformer.c
Normal file
@@ -0,0 +1,293 @@
|
||||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - 2d camera platformer
|
||||
*
|
||||
* This example has been created using raylib 2.5 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Example contributed by arvyy (@arvyy) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Copyright (c) 2019 arvyy (@arvyy)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
#include "raymath.h"
|
||||
|
||||
#define G 400
|
||||
#define PLAYER_JUMP_SPD 350.0f
|
||||
#define PLAYER_HOR_SPD 200.0f
|
||||
|
||||
typedef struct Player {
|
||||
Vector2 position;
|
||||
float speed;
|
||||
bool canJump;
|
||||
} Player;
|
||||
|
||||
typedef struct EnvItem {
|
||||
Rectangle rect;
|
||||
int blocking;
|
||||
Color color;
|
||||
} EnvItem;
|
||||
|
||||
|
||||
void UpdatePlayer(Player *player, EnvItem *envItems, int envItemsLength, float delta);
|
||||
|
||||
void UpdateCameraCenter(Camera2D *camera, Player *player, EnvItem *envItems, int envItemsLength, float delta, int width, int height);
|
||||
void UpdateCameraCenterInsideMap(Camera2D *camera, Player *player, EnvItem *envItems, int envItemsLength, float delta, int width, int height);
|
||||
void UpdateCameraCenterSmoothFollow(Camera2D *camera, Player *player, EnvItem *envItems, int envItemsLength, float delta, int width, int height);
|
||||
void UpdateCameraEvenOutOnLanding(Camera2D *camera, Player *player, EnvItem *envItems, int envItemsLength, float delta, int width, int height);
|
||||
void UpdateCameraPlayerBoundsPush(Camera2D *camera, Player *player, EnvItem *envItems, int envItemsLength, float delta, int width, int height);
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - 2d camera");
|
||||
|
||||
Player player = { 0 };
|
||||
player.position = (Vector2){ 400, 280 };
|
||||
player.speed = 0;
|
||||
player.canJump = false;
|
||||
EnvItem envItems[] = {
|
||||
{{ 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 }
|
||||
};
|
||||
|
||||
int envItemsLength = sizeof(envItems)/sizeof(envItems[0]);
|
||||
|
||||
Camera2D camera = { 0 };
|
||||
camera.target = player.position;
|
||||
camera.offset = (Vector2){ screenWidth/2, screenHeight/2 };
|
||||
camera.rotation = 0.0f;
|
||||
camera.zoom = 1.0f;
|
||||
|
||||
// Store pointers to the multiple update camera functions
|
||||
void (*cameraUpdaters[])(Camera2D*, Player*, EnvItem*, int, float, int, int) = {
|
||||
UpdateCameraCenter,
|
||||
UpdateCameraCenterInsideMap,
|
||||
UpdateCameraCenterSmoothFollow,
|
||||
UpdateCameraEvenOutOnLanding,
|
||||
UpdateCameraPlayerBoundsPush
|
||||
};
|
||||
|
||||
int cameraOption = 0;
|
||||
int cameraUpdatersLength = sizeof(cameraUpdaters)/sizeof(cameraUpdaters[0]);
|
||||
|
||||
char *cameraDescriptions[] = {
|
||||
"Follow player center",
|
||||
"Follow player center, but clamp to map edges",
|
||||
"Follow player center; smoothed",
|
||||
"Follow player center horizontally; updateplayer center vertically after landing",
|
||||
"Player push camera on getting too close to screen edge"
|
||||
};
|
||||
|
||||
SetTargetFPS(60);
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose())
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
float deltaTime = GetFrameTime();
|
||||
|
||||
UpdatePlayer(&player, envItems, envItemsLength, deltaTime);
|
||||
|
||||
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;
|
||||
|
||||
if (IsKeyPressed(KEY_R))
|
||||
{
|
||||
camera.zoom = 1.0f;
|
||||
player.position = (Vector2){ 400, 280 };
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_C)) cameraOption = (cameraOption + 1)%cameraUpdatersLength;
|
||||
|
||||
// Call update camera function by its pointer
|
||||
cameraUpdaters[cameraOption](&camera, &player, envItems, envItemsLength, deltaTime, screenWidth, screenHeight);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(LIGHTGRAY);
|
||||
|
||||
BeginMode2D(camera);
|
||||
|
||||
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 };
|
||||
DrawRectangleRec(playerRect, RED);
|
||||
|
||||
EndMode2D();
|
||||
|
||||
DrawText("Controls:", 20, 20, 10, BLACK);
|
||||
DrawText("- Right/Left to move", 40, 40, 10, DARKGRAY);
|
||||
DrawText("- Space to jump", 40, 60, 10, DARKGRAY);
|
||||
DrawText("- Mouse Wheel to Zoom in-out, R to reset zoom", 40, 80, 10, DARKGRAY);
|
||||
DrawText("- C to change camera mode", 40, 100, 10, DARKGRAY);
|
||||
DrawText("Current camera mode:", 20, 120, 10, BLACK);
|
||||
DrawText(cameraDescriptions[cameraOption], 40, 140, 10, DARKGRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void UpdatePlayer(Player *player, EnvItem *envItems, int envItemsLength, float delta)
|
||||
{
|
||||
if (IsKeyDown(KEY_LEFT)) player->position.x -= PLAYER_HOR_SPD*delta;
|
||||
if (IsKeyDown(KEY_RIGHT)) player->position.x += PLAYER_HOR_SPD*delta;
|
||||
if (IsKeyDown(KEY_SPACE) && player->canJump)
|
||||
{
|
||||
player->speed = -PLAYER_JUMP_SPD;
|
||||
player->canJump = false;
|
||||
}
|
||||
|
||||
int hitObstacle = 0;
|
||||
for (int i = 0; i < envItemsLength; i++)
|
||||
{
|
||||
EnvItem *ei = envItems + i;
|
||||
Vector2 *p = &(player->position);
|
||||
if (ei->blocking &&
|
||||
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)
|
||||
{
|
||||
hitObstacle = 1;
|
||||
player->speed = 0.0f;
|
||||
p->y = ei->rect.y;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hitObstacle)
|
||||
{
|
||||
player->position.y += player->speed*delta;
|
||||
player->speed += G*delta;
|
||||
player->canJump = false;
|
||||
}
|
||||
else player->canJump = true;
|
||||
}
|
||||
|
||||
void UpdateCameraCenter(Camera2D *camera, Player *player, EnvItem *envItems, int envItemsLength, float delta, int width, int height)
|
||||
{
|
||||
camera->offset = (Vector2){ width/2, height/2 };
|
||||
camera->target = player->position;
|
||||
}
|
||||
|
||||
void UpdateCameraCenterInsideMap(Camera2D *camera, Player *player, EnvItem *envItems, int envItemsLength, float delta, int width, int height)
|
||||
{
|
||||
camera->target = player->position;
|
||||
camera->offset = (Vector2){ width/2, height/2 };
|
||||
float minX = 1000, minY = 1000, maxX = -1000, maxY = -1000;
|
||||
|
||||
for (int i = 0; i < envItemsLength; i++)
|
||||
{
|
||||
EnvItem *ei = envItems + i;
|
||||
minX = fminf(ei->rect.x, minX);
|
||||
maxX = fmaxf(ei->rect.x + ei->rect.width, maxX);
|
||||
minY = fminf(ei->rect.y, minY);
|
||||
maxY = fmaxf(ei->rect.y + ei->rect.height, maxY);
|
||||
}
|
||||
|
||||
Vector2 max = GetWorldToScreen2D((Vector2){ maxX, maxY }, *camera);
|
||||
Vector2 min = GetWorldToScreen2D((Vector2){ minX, minY }, *camera);
|
||||
|
||||
if (max.x < width) camera->offset.x = width - (max.x - width/2);
|
||||
if (max.y < height) camera->offset.y = height - (max.y - height/2);
|
||||
if (min.x > 0) camera->offset.x = width/2 - min.x;
|
||||
if (min.y > 0) camera->offset.y = height/2 - min.y;
|
||||
}
|
||||
|
||||
void UpdateCameraCenterSmoothFollow(Camera2D *camera, Player *player, EnvItem *envItems, int envItemsLength, float delta, int width, int height)
|
||||
{
|
||||
static float minSpeed = 30;
|
||||
static float minEffectLength = 10;
|
||||
static float fractionSpeed = 0.8f;
|
||||
|
||||
camera->offset = (Vector2){ width/2, height/2 };
|
||||
Vector2 diff = Vector2Subtract(player->position, camera->target);
|
||||
float length = Vector2Length(diff);
|
||||
|
||||
if (length > minEffectLength)
|
||||
{
|
||||
float speed = fmaxf(fractionSpeed*length, minSpeed);
|
||||
camera->target = Vector2Add(camera->target, Vector2Scale(diff, speed*delta/length));
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateCameraEvenOutOnLanding(Camera2D *camera, Player *player, EnvItem *envItems, int envItemsLength, float delta, int width, int height)
|
||||
{
|
||||
static float evenOutSpeed = 700;
|
||||
static int eveningOut = false;
|
||||
static float evenOutTarget;
|
||||
|
||||
camera->offset = (Vector2){ width/2, height/2 };
|
||||
camera->target.x = player->position.x;
|
||||
|
||||
if (eveningOut)
|
||||
{
|
||||
if (evenOutTarget > camera->target.y)
|
||||
{
|
||||
camera->target.y += evenOutSpeed*delta;
|
||||
|
||||
if (camera->target.y > evenOutTarget)
|
||||
{
|
||||
camera->target.y = evenOutTarget;
|
||||
eveningOut = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
camera->target.y -= evenOutSpeed*delta;
|
||||
|
||||
if (camera->target.y < evenOutTarget)
|
||||
{
|
||||
camera->target.y = evenOutTarget;
|
||||
eveningOut = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player->canJump && (player->speed == 0) && (player->position.y != camera->target.y))
|
||||
{
|
||||
eveningOut = 1;
|
||||
evenOutTarget = player->position.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateCameraPlayerBoundsPush(Camera2D *camera, Player *player, EnvItem *envItems, int envItemsLength, float delta, int width, int height)
|
||||
{
|
||||
static Vector2 bbox = { 0.2f, 0.2f };
|
||||
|
||||
Vector2 bboxWorldMin = GetScreenToWorld2D((Vector2){ (1 - bbox.x)*0.5f*width, (1 - bbox.y)*0.5f*height }, *camera);
|
||||
Vector2 bboxWorldMax = GetScreenToWorld2D((Vector2){ (1 + bbox.x)*0.5f*width, (1 + bbox.y)*0.5f*height }, *camera);
|
||||
camera->offset = (Vector2){ (1 - bbox.x)*0.5f * width, (1 - bbox.y)*0.5f*height };
|
||||
|
||||
if (player->position.x < bboxWorldMin.x) camera->target.x = player->position.x;
|
||||
if (player->position.y < bboxWorldMin.y) camera->target.y = player->position.y;
|
||||
if (player->position.x > bboxWorldMax.x) camera->target.x = bboxWorldMin.x + (player->position.x - bboxWorldMax.x);
|
||||
if (player->position.y > bboxWorldMax.y) camera->target.y = bboxWorldMin.y + (player->position.y - bboxWorldMax.y);
|
||||
}
|
BIN
examples/core/core_2d_camera_platformer.png
Normal file
After Width: | Height: | Size: 16 KiB |
@@ -31,7 +31,7 @@ int main(void)
|
||||
camera.type = CAMERA_PERSPECTIVE;
|
||||
|
||||
// Generates some random columns
|
||||
float heights[MAX_COLUMNS] = { 0.0f };
|
||||
float heights[MAX_COLUMNS] = { 0 };
|
||||
Vector3 positions[MAX_COLUMNS] = { 0 };
|
||||
Color colors[MAX_COLUMNS] = { 0 };
|
||||
|
||||
|
@@ -45,9 +45,9 @@ int main(void)
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
|
||||
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
@@ -23,40 +23,40 @@
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
int screenWidth = 800;
|
||||
int screenHeight = 450;
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
int screenWidth = 800;
|
||||
int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
|
||||
|
||||
SetTargetFPS(60);
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
// TODO: Update your variables here
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
SetTargetFPS(60);
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
// TODO: Update your variables here
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
@@ -59,7 +59,7 @@ int main(void)
|
||||
|
||||
if (IsGamepadAvailable(GAMEPAD_PLAYER1))
|
||||
{
|
||||
DrawText(FormatText("GP1: %s", GetGamepadName(GAMEPAD_PLAYER1)), 10, 10, 10, BLACK);
|
||||
DrawText(TextFormat("GP1: %s", GetGamepadName(GAMEPAD_PLAYER1)), 10, 10, 10, BLACK);
|
||||
|
||||
if (IsGamepadName(GAMEPAD_PLAYER1, XBOX360_NAME_ID))
|
||||
{
|
||||
@@ -92,13 +92,13 @@ int main(void)
|
||||
DrawCircle(259, 152, 39, BLACK);
|
||||
DrawCircle(259, 152, 34, LIGHTGRAY);
|
||||
DrawCircle(259 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_X)*20),
|
||||
152 - (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_Y)*20), 25, BLACK);
|
||||
152 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_Y)*20), 25, BLACK);
|
||||
|
||||
// Draw axis: right joystick
|
||||
DrawCircle(461, 237, 38, BLACK);
|
||||
DrawCircle(461, 237, 33, LIGHTGRAY);
|
||||
DrawCircle(461 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_X)*20),
|
||||
237 - (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_Y)*20), 25, BLACK);
|
||||
237 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_Y)*20), 25, BLACK);
|
||||
|
||||
// Draw axis: left-right triggers
|
||||
DrawRectangle(170, 30, 15, 70, GRAY);
|
||||
@@ -106,8 +106,8 @@ int main(void)
|
||||
DrawRectangle(170, 30, 15, (((1.0f + GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_TRIGGER))/2.0f)*70), RED);
|
||||
DrawRectangle(604, 30, 15, (((1.0f + GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_TRIGGER))/2.0f)*70), RED);
|
||||
|
||||
//DrawText(FormatText("Xbox axis LT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_TRIGGER)), 10, 40, 10, BLACK);
|
||||
//DrawText(FormatText("Xbox axis RT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_TRIGGER)), 10, 60, 10, BLACK);
|
||||
//DrawText(TextFormat("Xbox axis LT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_TRIGGER)), 10, 40, 10, BLACK);
|
||||
//DrawText(TextFormat("Xbox axis RT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_TRIGGER)), 10, 60, 10, BLACK);
|
||||
}
|
||||
else if (IsGamepadName(GAMEPAD_PLAYER1, PS3_NAME_ID))
|
||||
{
|
||||
@@ -161,14 +161,14 @@ int main(void)
|
||||
// TODO: Draw generic gamepad
|
||||
}
|
||||
|
||||
DrawText(FormatText("DETECTED AXIS [%i]:", GetGamepadAxisCount(GAMEPAD_PLAYER1)), 10, 50, 10, MAROON);
|
||||
DrawText(TextFormat("DETECTED AXIS [%i]:", GetGamepadAxisCount(GAMEPAD_PLAYER1)), 10, 50, 10, MAROON);
|
||||
|
||||
for (int i = 0; i < GetGamepadAxisCount(GAMEPAD_PLAYER1); i++)
|
||||
{
|
||||
DrawText(FormatText("AXIS %i: %.02f", i, GetGamepadAxisMovement(GAMEPAD_PLAYER1, i)), 20, 70 + 20*i, 10, DARKGRAY);
|
||||
DrawText(TextFormat("AXIS %i: %.02f", i, GetGamepadAxisMovement(GAMEPAD_PLAYER1, i)), 20, 70 + 20*i, 10, DARKGRAY);
|
||||
}
|
||||
|
||||
if (GetGamepadButtonPressed() != -1) DrawText(FormatText("DETECTED BUTTON: %i", GetGamepadButtonPressed()), 10, 430, 10, RED);
|
||||
if (GetGamepadButtonPressed() != -1) DrawText(TextFormat("DETECTED BUTTON: %i", GetGamepadButtonPressed()), 10, 430, 10, RED);
|
||||
else DrawText("DETECTED BUTTON: NONE", 10, 430, 10, GRAY);
|
||||
}
|
||||
else
|
||||
|
@@ -43,7 +43,7 @@ int main(void)
|
||||
DrawRectangle(screenWidth/2 - 40, boxPositionY, 80, 80, MAROON);
|
||||
|
||||
DrawText("Use mouse wheel to move the cube up and down!", 10, 10, 20, GRAY);
|
||||
DrawText(FormatText("Box position Y: %03i", boxPositionY), 10, 40, 20, LIGHTGRAY);
|
||||
DrawText(TextFormat("Box position Y: %03i", boxPositionY), 10, 40, 20, LIGHTGRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
@@ -13,6 +13,8 @@
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#define MAX_TOUCH_POINTS 10
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
@@ -26,7 +28,7 @@ int main(void)
|
||||
Color ballColor = BEIGE;
|
||||
|
||||
int touchCounter = 0;
|
||||
Vector2 touchPosition = { 0.0f };
|
||||
Vector2 touchPosition = { 0 };
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//---------------------------------------------------------------------------------------
|
||||
@@ -66,7 +68,7 @@ int main(void)
|
||||
{
|
||||
// Draw circle and touch index number
|
||||
DrawCircleV(touchPosition, 34, ORANGE);
|
||||
DrawText(FormatText("%d", i), touchPosition.x - 10, touchPosition.y - 70, 40, BLACK);
|
||||
DrawText(TextFormat("%d", i), touchPosition.x - 10, touchPosition.y - 70, 40, BLACK);
|
||||
}
|
||||
}
|
||||
|
||||
|
130
examples/core/core_quat_conversion.c
Normal file
@@ -0,0 +1,130 @@
|
||||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - quat conversions
|
||||
*
|
||||
* Generally you should really stick to eulers OR quats...
|
||||
* This tests that various conversions are equivalent.
|
||||
*
|
||||
* This example has been created using raylib 3.5 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Example contributed by Chris Camacho (@chriscamacho) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Copyright (c) 2020 Chris Camacho (@chriscamacho) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include "raymath.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - quat conversions");
|
||||
|
||||
Camera3D camera = { 0 };
|
||||
camera.position = (Vector3){ 0.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.type = CAMERA_PERSPECTIVE; // Camera mode type
|
||||
|
||||
Mesh mesh = GenMeshCylinder(0.2f, 1.0f, 32);
|
||||
Model model = LoadModelFromMesh(mesh);
|
||||
|
||||
// Some required variables
|
||||
Quaternion q1 = { 0 };
|
||||
Matrix m1 = { 0 }, m2 = { 0 }, m3 = { 0 }, m4 = { 0 };
|
||||
Vector3 v1 = { 0 }, v2 = { 0 };
|
||||
|
||||
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_SPACE))
|
||||
{
|
||||
v1.x += 0.01f;
|
||||
v1.y += 0.03f;
|
||||
v1.z += 0.05f;
|
||||
}
|
||||
|
||||
if (v1.x > PI*2) v1.x -= PI*2;
|
||||
if (v1.y > PI*2) v1.y -= PI*2;
|
||||
if (v1.z > PI*2) v1.z -= PI*2;
|
||||
|
||||
q1 = QuaternionFromEuler(v1.x, v1.y, v1.z);
|
||||
m1 = MatrixRotateZYX(v1);
|
||||
m2 = QuaternionToMatrix(q1);
|
||||
|
||||
q1 = QuaternionFromMatrix(m1);
|
||||
m3 = QuaternionToMatrix(q1);
|
||||
|
||||
v2 = QuaternionToEuler(q1);
|
||||
v2.x *= DEG2RAD;
|
||||
v2.y *= DEG2RAD;
|
||||
v2.z *= DEG2RAD;
|
||||
|
||||
m4 = MatrixRotateZYX(v2);
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginMode3D(camera);
|
||||
|
||||
model.transform = m1;
|
||||
DrawModel(model, (Vector3){ -1, 0, 0 }, 1.0f, RED);
|
||||
model.transform = m2;
|
||||
DrawModel(model, (Vector3){ 1, 0, 0 }, 1.0f, RED);
|
||||
model.transform = m3;
|
||||
DrawModel(model, (Vector3){ 0, 0, 0 }, 1.0f, RED);
|
||||
model.transform = m4;
|
||||
DrawModel(model, (Vector3){ 0, 0, -1 }, 1.0f, RED);
|
||||
|
||||
DrawGrid(10, 1.0f);
|
||||
|
||||
EndMode3D();
|
||||
|
||||
if (v2.x < 0) v2.x += PI*2;
|
||||
if (v2.y < 0) v2.y += PI*2;
|
||||
if (v2.z < 0) v2.z += PI*2;
|
||||
|
||||
Color cx,cy,cz;
|
||||
cx = cy = cz = BLACK;
|
||||
if (v1.x == v2.x) cx = GREEN;
|
||||
if (v1.y == v2.y) cy = GREEN;
|
||||
if (v1.z == v2.z) cz = GREEN;
|
||||
|
||||
DrawText(TextFormat("%2.3f", v1.x), 20, 20, 20, cx);
|
||||
DrawText(TextFormat("%2.3f", v1.y), 20, 40, 20, cy);
|
||||
DrawText(TextFormat("%2.3f", v1.z), 20, 60, 20, cz);
|
||||
|
||||
DrawText(TextFormat("%2.3f", v2.x), 200, 20, 20, cx);
|
||||
DrawText(TextFormat("%2.3f", v2.y), 200, 40, 20, cy);
|
||||
DrawText(TextFormat("%2.3f", v2.z), 200, 60, 20, cz);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadModel(model); // Unload model data (mesh and materials)
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
BIN
examples/core/core_quat_conversion.png
Normal file
After Width: | Height: | Size: 16 KiB |
@@ -50,7 +50,7 @@ int main(void)
|
||||
|
||||
DrawText("Every 2 seconds a new random value is generated:", 130, 100, 20, MAROON);
|
||||
|
||||
DrawText(FormatText("%i", randValue), 360, 180, 80, LIGHTGRAY);
|
||||
DrawText(TextFormat("%i", randValue), 360, 180, 80, LIGHTGRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
71
examples/core/core_scissor_test.c
Normal file
@@ -0,0 +1,71 @@
|
||||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - Scissor test
|
||||
*
|
||||
* This example has been created using raylib 2.5 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Example contributed by Chris Dill (@MysteriousSpace) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Copyright (c) 2019 Chris Dill (@MysteriousSpace)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - scissor test");
|
||||
|
||||
Rectangle scissorArea = { 0, 0, 300, 300 };
|
||||
bool scissorMode = true;
|
||||
|
||||
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 (IsKeyPressed(KEY_S)) scissorMode = !scissorMode;
|
||||
|
||||
// Centre the scissor area around the mouse position
|
||||
scissorArea.x = GetMouseX() - scissorArea.width/2;
|
||||
scissorArea.y = GetMouseY() - scissorArea.height/2;
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
if (scissorMode) BeginScissorMode(scissorArea.x, scissorArea.y, scissorArea.width, scissorArea.height);
|
||||
|
||||
// Draw full screen rectangle and some text
|
||||
// NOTE: Only part defined by scissor area will be rendered
|
||||
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), RED);
|
||||
DrawText("Move the mouse around to reveal this text!", 190, 200, 20, LIGHTGRAY);
|
||||
|
||||
if (scissorMode) EndScissorMode();
|
||||
|
||||
DrawRectangleLinesEx(scissorArea, 1, BLACK);
|
||||
DrawText("Press S to toggle scissor test", 10, 10, 20, BLACK);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
BIN
examples/core/core_scissor_test.png
Normal file
After Width: | Height: | Size: 15 KiB |
@@ -12,7 +12,10 @@
|
||||
#include "raylib.h"
|
||||
|
||||
// NOTE: Storage positions must start with 0, directly related to file memory layout
|
||||
typedef enum { STORAGE_SCORE = 0, STORAGE_HISCORE } StorageData;
|
||||
typedef enum {
|
||||
STORAGE_POSITION_SCORE = 0,
|
||||
STORAGE_POSITION_HISCORE = 1
|
||||
} StorageData;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
@@ -43,14 +46,14 @@ int main(void)
|
||||
|
||||
if (IsKeyPressed(KEY_ENTER))
|
||||
{
|
||||
StorageSaveValue(STORAGE_SCORE, score);
|
||||
StorageSaveValue(STORAGE_HISCORE, hiscore);
|
||||
SaveStorageValue(STORAGE_POSITION_SCORE, score);
|
||||
SaveStorageValue(STORAGE_POSITION_HISCORE, hiscore);
|
||||
}
|
||||
else if (IsKeyPressed(KEY_SPACE))
|
||||
{
|
||||
// NOTE: If requested position could not be found, value 0 is returned
|
||||
score = StorageLoadValue(STORAGE_SCORE);
|
||||
hiscore = StorageLoadValue(STORAGE_HISCORE);
|
||||
score = LoadStorageValue(STORAGE_POSITION_SCORE);
|
||||
hiscore = LoadStorageValue(STORAGE_POSITION_HISCORE);
|
||||
}
|
||||
|
||||
framesCounter++;
|
||||
@@ -62,10 +65,10 @@ int main(void)
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawText(FormatText("SCORE: %i", score), 280, 130, 40, MAROON);
|
||||
DrawText(FormatText("HI-SCORE: %i", hiscore), 210, 200, 50, BLACK);
|
||||
DrawText(TextFormat("SCORE: %i", score), 280, 130, 40, MAROON);
|
||||
DrawText(TextFormat("HI-SCORE: %i", hiscore), 210, 200, 50, BLACK);
|
||||
|
||||
DrawText(FormatText("frames: %i", framesCounter), 10, 10, 20, LIME);
|
||||
DrawText(TextFormat("frames: %i", framesCounter), 10, 10, 20, LIME);
|
||||
|
||||
DrawText("Press R to generate random numbers", 220, 40, 20, LIGHTGRAY);
|
||||
DrawText("Press ENTER to SAVE values", 250, 310, 20, LIGHTGRAY);
|
||||
|
@@ -56,7 +56,7 @@ int main(void)
|
||||
hmd.chromaAbCorrection[3] = 0.0f; // HMD chromatic aberration correction parameter 3
|
||||
|
||||
// Distortion shader (uses device lens distortion and chroma)
|
||||
Shader distortion = LoadShader(0, FormatText("resources/distortion%i.fs", GLSL_VERSION));
|
||||
Shader distortion = LoadShader(0, TextFormat("resources/distortion%i.fs", GLSL_VERSION));
|
||||
|
||||
SetVrConfiguration(hmd, distortion); // Set Vr device parameters for stereo rendering
|
||||
|
||||
|
191
examples/core/core_window_flags.c
Normal file
@@ -0,0 +1,191 @@
|
||||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - window flags
|
||||
*
|
||||
* This example has been created using raylib 3.5 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Copyright (c) 2020 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//---------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
// Possible window flags
|
||||
/*
|
||||
FLAG_VSYNC_HINT
|
||||
FLAG_FULLSCREEN_MODE -> not working properly -> wrong scaling!
|
||||
FLAG_WINDOW_RESIZABLE
|
||||
FLAG_WINDOW_UNDECORATED
|
||||
FLAG_WINDOW_TRANSPARENT
|
||||
FLAG_WINDOW_HIDDEN
|
||||
FLAG_WINDOW_MINIMIZED -> Not supported on window creation
|
||||
FLAG_WINDOW_MAXIMIZED -> Not supported on window creation
|
||||
FLAG_WINDOW_UNFOCUSED
|
||||
FLAG_WINDOW_TOPMOST
|
||||
FLAG_WINDOW_HIGHDPI -> errors after minimize-resize, fb size is recalculated
|
||||
FLAG_WINDOW_ALWAYS_RUN
|
||||
FLAG_MSAA_4X_HINT
|
||||
*/
|
||||
|
||||
// Set configuration flags for window creation
|
||||
SetConfigFlags(FLAG_VSYNC_HINT | FLAG_MSAA_4X_HINT | FLAG_WINDOW_HIGHDPI);
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - window flags");
|
||||
|
||||
Vector2 ballPosition = { GetScreenWidth() / 2, GetScreenHeight() / 2 };
|
||||
Vector2 ballSpeed = { 5.0f, 4.0f };
|
||||
int ballRadius = 20;
|
||||
|
||||
int framesCounter = 0;
|
||||
|
||||
//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 (IsKeyPressed(KEY_F)) ToggleFullscreen(); // modifies window size when scaling!
|
||||
|
||||
if (IsKeyPressed(KEY_R))
|
||||
{
|
||||
if (IsWindowState(FLAG_WINDOW_RESIZABLE)) ClearWindowState(FLAG_WINDOW_RESIZABLE);
|
||||
else SetWindowState(FLAG_WINDOW_RESIZABLE);
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_D))
|
||||
{
|
||||
if (IsWindowState(FLAG_WINDOW_UNDECORATED)) ClearWindowState(FLAG_WINDOW_UNDECORATED);
|
||||
else SetWindowState(FLAG_WINDOW_UNDECORATED);
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_H))
|
||||
{
|
||||
if (!IsWindowState(FLAG_WINDOW_HIDDEN)) SetWindowState(FLAG_WINDOW_HIDDEN);
|
||||
|
||||
framesCounter = 0;
|
||||
}
|
||||
|
||||
if (IsWindowState(FLAG_WINDOW_HIDDEN))
|
||||
{
|
||||
framesCounter++;
|
||||
if (framesCounter >= 240) ClearWindowState(FLAG_WINDOW_HIDDEN); // Show window after 3 seconds
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_N))
|
||||
{
|
||||
if (!IsWindowState(FLAG_WINDOW_MINIMIZED)) MinimizeWindow();
|
||||
|
||||
framesCounter = 0;
|
||||
}
|
||||
|
||||
if (IsWindowState(FLAG_WINDOW_MINIMIZED))
|
||||
{
|
||||
framesCounter++;
|
||||
if (framesCounter >= 240) RestoreWindow(); // Restore window after 3 seconds
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_M))
|
||||
{
|
||||
// NOTE: Requires FLAG_WINDOW_RESIZABLE enabled!
|
||||
if (IsWindowState(FLAG_WINDOW_MAXIMIZED)) RestoreWindow();
|
||||
else MaximizeWindow();
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_U))
|
||||
{
|
||||
if (IsWindowState(FLAG_WINDOW_UNFOCUSED)) ClearWindowState(FLAG_WINDOW_UNFOCUSED);
|
||||
else SetWindowState(FLAG_WINDOW_UNFOCUSED);
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_T))
|
||||
{
|
||||
if (IsWindowState(FLAG_WINDOW_TOPMOST)) ClearWindowState(FLAG_WINDOW_TOPMOST);
|
||||
else SetWindowState(FLAG_WINDOW_TOPMOST);
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_A))
|
||||
{
|
||||
if (IsWindowState(FLAG_WINDOW_ALWAYS_RUN)) ClearWindowState(FLAG_WINDOW_ALWAYS_RUN);
|
||||
else SetWindowState(FLAG_WINDOW_ALWAYS_RUN);
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_V))
|
||||
{
|
||||
if (IsWindowState(FLAG_VSYNC_HINT)) ClearWindowState(FLAG_VSYNC_HINT);
|
||||
else SetWindowState(FLAG_VSYNC_HINT);
|
||||
}
|
||||
|
||||
// Bouncing ball logic
|
||||
ballPosition.x += ballSpeed.x;
|
||||
ballPosition.y += ballSpeed.y;
|
||||
if ((ballPosition.x >= (GetScreenWidth() - ballRadius)) || (ballPosition.x <= ballRadius)) ballSpeed.x *= -1.0f;
|
||||
if ((ballPosition.y >= (GetScreenHeight() - ballRadius)) || (ballPosition.y <= ballRadius)) ballSpeed.y *= -1.0f;
|
||||
//-----------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//-----------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
if (IsWindowState(FLAG_WINDOW_TRANSPARENT)) ClearBackground(BLANK);
|
||||
else ClearBackground(RAYWHITE);
|
||||
|
||||
DrawCircleV(ballPosition, ballRadius, MAROON);
|
||||
DrawRectangleLinesEx((Rectangle) { 0, 0, GetScreenWidth(), GetScreenHeight() }, 4, RAYWHITE);
|
||||
|
||||
DrawCircleV(GetMousePosition(), 10, DARKBLUE);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
DrawText(FormatText("Screen Size: [%i, %i]", GetScreenWidth(), GetScreenHeight()), 10, 40, 10, GREEN);
|
||||
|
||||
// Draw window state info
|
||||
DrawText("Following flags can be set after window creation:", 10, 60, 10, GRAY);
|
||||
if (IsWindowState(FLAG_FULLSCREEN_MODE)) DrawText("[F] FLAG_FULLSCREEN_MODE: on", 10, 80, 10, LIME);
|
||||
else DrawText("[F] FLAG_FULLSCREEN_MODE: off", 10, 80, 10, MAROON);
|
||||
if (IsWindowState(FLAG_WINDOW_RESIZABLE)) DrawText("[R] FLAG_WINDOW_RESIZABLE: on", 10, 100, 10, LIME);
|
||||
else DrawText("[R] FLAG_WINDOW_RESIZABLE: off", 10, 100, 10, MAROON);
|
||||
if (IsWindowState(FLAG_WINDOW_UNDECORATED)) DrawText("[D] FLAG_WINDOW_UNDECORATED: on", 10, 120, 10, LIME);
|
||||
else DrawText("[D] FLAG_WINDOW_UNDECORATED: off", 10, 120, 10, MAROON);
|
||||
if (IsWindowState(FLAG_WINDOW_HIDDEN)) DrawText("[H] FLAG_WINDOW_HIDDEN: on", 10, 140, 10, LIME);
|
||||
else DrawText("[H] FLAG_WINDOW_HIDDEN: off", 10, 140, 10, MAROON);
|
||||
if (IsWindowState(FLAG_WINDOW_MINIMIZED)) DrawText("[N] FLAG_WINDOW_MINIMIZED: on", 10, 160, 10, LIME);
|
||||
else DrawText("[N] FLAG_WINDOW_MINIMIZED: off", 10, 160, 10, MAROON);
|
||||
if (IsWindowState(FLAG_WINDOW_MAXIMIZED)) DrawText("[M] FLAG_WINDOW_MAXIMIZED: on", 10, 180, 10, LIME);
|
||||
else DrawText("[M] FLAG_WINDOW_MAXIMIZED: off", 10, 180, 10, MAROON);
|
||||
if (IsWindowState(FLAG_WINDOW_UNFOCUSED)) DrawText("[G] FLAG_WINDOW_UNFOCUSED: on", 10, 200, 10, LIME);
|
||||
else DrawText("[U] FLAG_WINDOW_UNFOCUSED: off", 10, 200, 10, MAROON);
|
||||
if (IsWindowState(FLAG_WINDOW_TOPMOST)) DrawText("[T] FLAG_WINDOW_TOPMOST: on", 10, 220, 10, LIME);
|
||||
else DrawText("[T] FLAG_WINDOW_TOPMOST: off", 10, 220, 10, MAROON);
|
||||
if (IsWindowState(FLAG_WINDOW_ALWAYS_RUN)) DrawText("[A] FLAG_WINDOW_ALWAYS_RUN: on", 10, 240, 10, LIME);
|
||||
else DrawText("[A] FLAG_WINDOW_ALWAYS_RUN: off", 10, 240, 10, MAROON);
|
||||
if (IsWindowState(FLAG_VSYNC_HINT)) DrawText("[V] FLAG_VSYNC_HINT: on", 10, 260, 10, LIME);
|
||||
else DrawText("[V] FLAG_VSYNC_HINT: off", 10, 260, 10, MAROON);
|
||||
|
||||
DrawText("Following flags can only be set before window creation:", 10, 300, 10, GRAY);
|
||||
if (IsWindowState(FLAG_WINDOW_HIGHDPI)) DrawText("FLAG_WINDOW_HIGHDPI: on", 10, 320, 10, LIME);
|
||||
else DrawText("FLAG_WINDOW_HIGHDPI: off", 10, 320, 10, MAROON);
|
||||
if (IsWindowState(FLAG_WINDOW_TRANSPARENT)) DrawText("FLAG_WINDOW_TRANSPARENT: on", 10, 340, 10, LIME);
|
||||
else DrawText("FLAG_WINDOW_TRANSPARENT: off", 10, 340, 10, MAROON);
|
||||
if (IsWindowState(FLAG_MSAA_4X_HINT)) DrawText("FLAG_MSAA_4X_HINT: on", 10, 360, 10, LIME);
|
||||
else DrawText("FLAG_MSAA_4X_HINT: off", 10, 360, 10, MAROON);
|
||||
|
||||
EndDrawing();
|
||||
//-----------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//---------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//----------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
BIN
examples/core/core_window_flags.png
Normal file
After Width: | Height: | Size: 22 KiB |
@@ -1,6 +1,6 @@
|
||||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - window scale letterbox
|
||||
* raylib [core] example - window scale letterbox (and virtual mouse)
|
||||
*
|
||||
* This example has been created using raylib 2.5 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
@@ -16,6 +16,18 @@
|
||||
#define max(a, b) ((a)>(b)? (a) : (b))
|
||||
#define min(a, b) ((a)<(b)? (a) : (b))
|
||||
|
||||
// Clamp Vector2 value with min and max and return a new vector2
|
||||
// NOTE: Required for virtual mouse, to clamp inside virtual game size
|
||||
Vector2 ClampValue(Vector2 value, Vector2 min, Vector2 max)
|
||||
{
|
||||
Vector2 result = value;
|
||||
result.x = (result.x > max.x)? max.x : result.x;
|
||||
result.x = (result.x < min.x)? min.x : result.x;
|
||||
result.y = (result.y > max.y)? max.y : result.y;
|
||||
result.y = (result.y < min.y)? min.y : result.y;
|
||||
return result;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
const int windowWidth = 800;
|
||||
@@ -29,7 +41,7 @@ int main(void)
|
||||
int gameScreenWidth = 640;
|
||||
int gameScreenHeight = 480;
|
||||
|
||||
// Render texture initialization
|
||||
// Render texture initialization, used to hold the rendering result so we can easily resize it
|
||||
RenderTexture2D target = LoadRenderTexture(gameScreenWidth, gameScreenHeight);
|
||||
SetTextureFilter(target.texture, FILTER_BILINEAR); // Texture scale filter to use
|
||||
|
||||
@@ -52,6 +64,13 @@ int main(void)
|
||||
// Recalculate random colors for the bars
|
||||
for (int i = 0; i < 10; i++) colors[i] = (Color){ GetRandomValue(100, 250), GetRandomValue(50, 150), GetRandomValue(10, 100), 255 };
|
||||
}
|
||||
|
||||
// Update virtual mouse (clamped mouse value behind game screen)
|
||||
Vector2 mouse = GetMousePosition();
|
||||
Vector2 virtualMouse = { 0 };
|
||||
virtualMouse.x = (mouse.x - (GetScreenWidth() - (gameScreenWidth*scale))*0.5f)/scale;
|
||||
virtualMouse.y = (mouse.y - (GetScreenHeight() - (gameScreenHeight*scale))*0.5f)/scale;
|
||||
virtualMouse = ClampValue(virtualMouse, (Vector2){ 0, 0 }, (Vector2){ gameScreenWidth, gameScreenHeight });
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
@@ -59,14 +78,17 @@ int main(void)
|
||||
BeginDrawing();
|
||||
ClearBackground(BLACK);
|
||||
|
||||
// Draw everything in the render texture
|
||||
// Draw everything in the render texture, note this will not be rendered on screen, yet
|
||||
BeginTextureMode(target);
|
||||
|
||||
ClearBackground(RAYWHITE); // Clear render texture background color
|
||||
|
||||
for (int i = 0; i < 10; i++) DrawRectangle(0, (gameScreenHeight/10)*i, gameScreenWidth, gameScreenHeight/10, colors[i]);
|
||||
|
||||
DrawText("You can resize the window,\nand see the screen scaling!", 10, 25, 20, WHITE);
|
||||
DrawText("If executed inside a window,\nyou can resize the window,\nand see the screen scaling!", 10, 25, 20, WHITE);
|
||||
|
||||
DrawText(TextFormat("Default Mouse: [%i , %i]", (int)mouse.x, (int)mouse.y), 350, 25, 20, GREEN);
|
||||
DrawText(TextFormat("Virtual Mouse: [%i , %i]", (int)virtualMouse.x, (int)virtualMouse.y), 350, 55, 20, YELLOW);
|
||||
|
||||
EndTextureMode();
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 23 KiB |
@@ -62,8 +62,8 @@ int main(void)
|
||||
|
||||
EndMode3D();
|
||||
|
||||
DrawText("Enemy: 100 / 100", cubeScreenPosition.x - MeasureText("Enemy: 100 / 100", 20) / 2, 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("Enemy: 100 / 100", cubeScreenPosition.x - MeasureText("Enemy: 100/100", 20)/2, 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);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
4
examples/core/resources/LICENSE
Normal file
@@ -0,0 +1,4 @@
|
||||
| resource | author | licence | notes |
|
||||
| :------------ | :---------: | :------ | :---- |
|
||||
| ps3.png | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - |
|
||||
| xbox.png | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - |
|
@@ -11,14 +11,14 @@ uniform sampler2D texture0;
|
||||
uniform vec4 colDiffuse;
|
||||
|
||||
// NOTE: Add here your custom variables
|
||||
uniform vec2 leftLensCenter = vec2(0.288, 0.5);
|
||||
uniform vec2 rightLensCenter = vec2(0.712, 0.5);
|
||||
uniform vec2 leftScreenCenter = vec2(0.25, 0.5);
|
||||
uniform vec2 rightScreenCenter = vec2(0.75, 0.5);
|
||||
uniform vec2 scale = vec2(0.25, 0.45);
|
||||
uniform vec2 scaleIn = vec2(4, 2.2222);
|
||||
uniform vec4 hmdWarpParam = vec4(1, 0.22, 0.24, 0);
|
||||
uniform vec4 chromaAbParam = vec4(0.996, -0.004, 1.014, 0.0);
|
||||
uniform vec2 leftLensCenter;
|
||||
uniform vec2 rightLensCenter;
|
||||
uniform vec2 leftScreenCenter;
|
||||
uniform vec2 rightScreenCenter;
|
||||
uniform vec2 scale;
|
||||
uniform vec2 scaleIn;
|
||||
uniform vec4 hmdWarpParam;
|
||||
uniform vec4 chromaAbParam;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@@ -5,12 +5,23 @@
|
||||
* This example has been created using raylib 2.5 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Copyright (c) 2019 Ramon Santamaria (@raysan5) and @culacant
|
||||
* Example contributed by Culacant (@culacant) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Copyright (c) 2019 Culacant (@culacant) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************
|
||||
*
|
||||
* To export a model from blender, make sure it is not posed, the vertices need to be in the
|
||||
* same position as they would be in edit mode.
|
||||
* and that the scale of your models is set to 0. Scaling can be done from the export menu.
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
@@ -28,7 +39,6 @@ int main(void)
|
||||
camera.fovy = 45.0f; // Camera field-of-view Y
|
||||
camera.type = CAMERA_PERSPECTIVE; // Camera mode type
|
||||
|
||||
|
||||
Model model = LoadModel("resources/guy/guy.iqm"); // Load the animated model mesh and basic data
|
||||
Texture2D texture = LoadTexture("resources/guy/guytex.png"); // Load model texture and set material
|
||||
SetMaterialTexture(&model.materials[0], MAP_DIFFUSE, texture); // Set model material map texture
|
||||
@@ -89,8 +99,11 @@ int main(void)
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(texture); // Unload texture
|
||||
|
||||
// Unload model animations data
|
||||
for (int i = 0; i < animsCount; i++) UnloadModelAnimation(anims[i]);
|
||||
RL_FREE(anims);
|
||||
|
||||
UnloadModel(model); // Unload model
|
||||
|
||||
|
@@ -21,7 +21,7 @@ int main(void)
|
||||
InitWindow(screenWidth, screenHeight, "raylib [models] example - heightmap loading and drawing");
|
||||
|
||||
// Define our custom camera to look into our 3d world
|
||||
Camera camera = { { 18.0f, 16.0f, 18.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
|
||||
Camera camera = { { 18.0f, 18.0f, 18.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
|
||||
|
||||
Image image = LoadImage("resources/heightmap.png"); // Load heightmap image (RAM)
|
||||
Texture2D texture = LoadTextureFromImage(image); // Convert image to texture (VRAM)
|
||||
|
142
examples/models/models_loading.c
Normal file
@@ -0,0 +1,142 @@
|
||||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [models] example - Models loading
|
||||
*
|
||||
* raylib supports multiple models file formats:
|
||||
*
|
||||
* - OBJ > Text file, must include vertex position-texcoords-normals information,
|
||||
* if files references some .mtl materials file, it will be loaded (or try to)
|
||||
* - GLTF > Modern text/binary file format, includes lot of information and it could
|
||||
* also reference external files, raylib will try loading mesh and materials data
|
||||
* - IQM > Binary file format including mesh vertex data but also animation data,
|
||||
* raylib can load .iqm animations.
|
||||
*
|
||||
* This example has been created using raylib 2.6 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Copyright (c) 2014-2019 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [models] example - models loading");
|
||||
|
||||
// Define the camera to look into our 3d world
|
||||
Camera camera = { 0 };
|
||||
camera.position = (Vector3){ 50.0f, 50.0f, 50.0f }; // Camera position
|
||||
camera.target = (Vector3){ 0.0f, 10.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.type = CAMERA_PERSPECTIVE; // Camera mode type
|
||||
|
||||
Model model = LoadModel("resources/models/castle.obj"); // Load model
|
||||
Texture2D texture = LoadTexture("resources/models/castle_diffuse.png"); // Load model texture
|
||||
model.materials[0].maps[MAP_DIFFUSE].texture = texture; // Set map diffuse texture
|
||||
|
||||
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
|
||||
|
||||
BoundingBox bounds = MeshBoundingBox(model.meshes[0]); // Set model bounds
|
||||
|
||||
// NOTE: bounds are calculated from the original size of the model,
|
||||
// if model is scaled on drawing, bounds must be also scaled
|
||||
|
||||
SetCameraMode(camera, CAMERA_FREE); // Set a free camera mode
|
||||
|
||||
bool selected = false; // Selected object flag
|
||||
|
||||
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
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera);
|
||||
|
||||
// Load new models/textures on drag&drop
|
||||
if (IsFileDropped())
|
||||
{
|
||||
int count = 0;
|
||||
char **droppedFiles = GetDroppedFiles(&count);
|
||||
|
||||
if (count == 1) // Only support one file dropped
|
||||
{
|
||||
if (IsFileExtension(droppedFiles[0], ".obj") ||
|
||||
IsFileExtension(droppedFiles[0], ".gltf") ||
|
||||
IsFileExtension(droppedFiles[0], ".iqm")) // Model file formats supported
|
||||
{
|
||||
UnloadModel(model); // Unload previous model
|
||||
model = LoadModel(droppedFiles[0]); // Load new model
|
||||
model.materials[0].maps[MAP_DIFFUSE].texture = texture; // Set current map diffuse texture
|
||||
|
||||
bounds = MeshBoundingBox(model.meshes[0]);
|
||||
|
||||
// TODO: Move camera position from target enough distance to visualize model properly
|
||||
}
|
||||
else if (IsFileExtension(droppedFiles[0], ".png")) // Texture file formats supported
|
||||
{
|
||||
// Unload current model texture and load new one
|
||||
UnloadTexture(texture);
|
||||
texture = LoadTexture(droppedFiles[0]);
|
||||
model.materials[0].maps[MAP_DIFFUSE].texture = texture;
|
||||
}
|
||||
}
|
||||
|
||||
ClearDroppedFiles(); // Clear internal buffers
|
||||
}
|
||||
|
||||
// Select model on mouse click
|
||||
if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON))
|
||||
{
|
||||
// Check collision between ray and box
|
||||
if (CheckCollisionRayBox(GetMouseRay(GetMousePosition(), camera), bounds)) selected = !selected;
|
||||
else selected = false;
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginMode3D(camera);
|
||||
|
||||
DrawModel(model, position, 1.0f, WHITE); // Draw 3d model with texture
|
||||
|
||||
DrawGrid(20, 10.0f); // Draw a grid
|
||||
|
||||
if (selected) DrawBoundingBox(bounds, GREEN); // Draw selection box
|
||||
|
||||
EndMode3D();
|
||||
|
||||
DrawText("Drag & drop model to load mesh/texture.", 10, GetScreenHeight() - 20, 10, DARKGRAY);
|
||||
if (selected) DrawText("MODEL SELECTED", GetScreenWidth() - 110, 10, 10, GREEN);
|
||||
|
||||
DrawText("(c) Castle 3D model by Alberto Cano", screenWidth - 200, screenHeight - 20, 10, GRAY);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(texture); // Unload texture
|
||||
UnloadModel(model); // Unload model
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
BIN
examples/models/models_loading.png
Normal file
After Width: | Height: | Size: 217 KiB |
@@ -2,6 +2,9 @@
|
||||
*
|
||||
* raylib [models] example - PBR material
|
||||
*
|
||||
* NOTE: This example requires raylib OpenGL 3.3 for shaders support and only #version 330
|
||||
* is currently supported. OpenGL ES 2.0 platforms are not supported at the moment.
|
||||
*
|
||||
* This example has been created using raylib 1.8 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
@@ -17,7 +20,7 @@
|
||||
#define RLIGHTS_IMPLEMENTATION
|
||||
#include "rlights.h"
|
||||
|
||||
#define CUBEMAP_SIZE 512 // Cubemap texture size
|
||||
#define CUBEMAP_SIZE 1024 // Cubemap texture size
|
||||
#define IRRADIANCE_SIZE 32 // Irradiance texture size
|
||||
#define PREFILTERED_SIZE 256 // Prefiltered HDR environment texture size
|
||||
#define BRDF_SIZE 512 // BRDF LUT texture size
|
||||
@@ -48,18 +51,16 @@ int main(void)
|
||||
|
||||
// Mesh tangents are generated... and uploaded to GPU
|
||||
// NOTE: New VBO for tangents is generated at default location and also binded to mesh VAO
|
||||
MeshTangents(&model.meshes[0]);
|
||||
//MeshTangents(&model.meshes[0]);
|
||||
|
||||
model.materials[0] = LoadMaterialPBR((Color){ 255, 255, 255, 255 }, 1.0f, 1.0f);
|
||||
|
||||
// Define lights attributes
|
||||
// NOTE: Shader is passed to every light on creation to define shader bindings internally
|
||||
Light lights[MAX_LIGHTS] = {
|
||||
CreateLight(LIGHT_POINT, (Vector3){ LIGHT_DISTANCE, LIGHT_HEIGHT, 0.0f }, (Vector3){ 0.0f, 0.0f, 0.0f }, (Color){ 255, 0, 0, 255 }, model.materials[0].shader),
|
||||
CreateLight(LIGHT_POINT, (Vector3){ 0.0f, LIGHT_HEIGHT, LIGHT_DISTANCE }, (Vector3){ 0.0f, 0.0f, 0.0f }, (Color){ 0, 255, 0, 255 }, model.materials[0].shader),
|
||||
CreateLight(LIGHT_POINT, (Vector3){ -LIGHT_DISTANCE, LIGHT_HEIGHT, 0.0f }, (Vector3){ 0.0f, 0.0f, 0.0f }, (Color){ 0, 0, 255, 255 }, model.materials[0].shader),
|
||||
CreateLight(LIGHT_DIRECTIONAL, (Vector3){ 0.0f, LIGHT_HEIGHT*2.0f, -LIGHT_DISTANCE }, (Vector3){ 0.0f, 0.0f, 0.0f }, (Color){ 255, 0, 255, 255 }, model.materials[0].shader)
|
||||
};
|
||||
// Create lights
|
||||
// NOTE: Lights are added to an internal lights pool automatically
|
||||
CreateLight(LIGHT_POINT, (Vector3){ LIGHT_DISTANCE, LIGHT_HEIGHT, 0.0f }, (Vector3){ 0.0f, 0.0f, 0.0f }, (Color){ 255, 0, 0, 255 }, model.materials[0].shader);
|
||||
CreateLight(LIGHT_POINT, (Vector3){ 0.0f, LIGHT_HEIGHT, LIGHT_DISTANCE }, (Vector3){ 0.0f, 0.0f, 0.0f }, (Color){ 0, 255, 0, 255 }, model.materials[0].shader);
|
||||
CreateLight(LIGHT_POINT, (Vector3){ -LIGHT_DISTANCE, LIGHT_HEIGHT, 0.0f }, (Vector3){ 0.0f, 0.0f, 0.0f }, (Color){ 0, 0, 255, 255 }, model.materials[0].shader);
|
||||
CreateLight(LIGHT_DIRECTIONAL, (Vector3){ 0.0f, LIGHT_HEIGHT*2.0f, -LIGHT_DISTANCE }, (Vector3){ 0.0f, 0.0f, 0.0f }, (Color){ 255, 0, 255, 255 }, model.materials[0].shader);
|
||||
|
||||
SetCameraMode(camera, CAMERA_ORBITAL); // Set an orbital camera mode
|
||||
|
||||
@@ -100,7 +101,9 @@ int main(void)
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadModel(model); // Unload skybox model
|
||||
UnloadMaterial(model.materials[0]); // Unload material: shader and textures
|
||||
|
||||
UnloadModel(model); // Unload model
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
@@ -112,8 +115,9 @@ int main(void)
|
||||
// NOTE: PBR shader is loaded inside this function
|
||||
static Material LoadMaterialPBR(Color albedo, float metalness, float roughness)
|
||||
{
|
||||
Material mat = { 0 }; // NOTE: All maps textures are set to { 0 }
|
||||
|
||||
Material mat = LoadMaterialDefault(); // Initialize material to default
|
||||
|
||||
// Load PBR shader (requires several maps)
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
mat.shader = LoadShader("resources/shaders/glsl330/pbr.vs", "resources/shaders/glsl330/pbr.fs");
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
@@ -135,7 +139,7 @@ static Material LoadMaterialPBR(Color albedo, float metalness, float roughness)
|
||||
|
||||
// Set view matrix location
|
||||
mat.shader.locs[LOC_MATRIX_MODEL] = GetShaderLocation(mat.shader, "matModel");
|
||||
mat.shader.locs[LOC_MATRIX_VIEW] = GetShaderLocation(mat.shader, "view");
|
||||
//mat.shader.locs[LOC_MATRIX_VIEW] = GetShaderLocation(mat.shader, "view");
|
||||
mat.shader.locs[LOC_VECTOR_VIEW] = GetShaderLocation(mat.shader, "viewPos");
|
||||
|
||||
// Set PBR standard maps
|
||||
@@ -145,60 +149,13 @@ static Material LoadMaterialPBR(Color albedo, float metalness, float roughness)
|
||||
mat.maps[MAP_ROUGHNESS].texture = LoadTexture("resources/pbr/trooper_roughness.png");
|
||||
mat.maps[MAP_OCCLUSION].texture = LoadTexture("resources/pbr/trooper_ao.png");
|
||||
|
||||
// Load equirectangular to cubemap shader
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
Shader shdrCubemap = LoadShader("resources/shaders/glsl330/cubemap.vs", "resources/shaders/glsl330/cubemap.fs");
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
Shader shdrCubemap = LoadShader("resources/shaders/glsl100/cubemap.vs", "resources/shaders/glsl100/cubemap.fs");
|
||||
#endif
|
||||
|
||||
// Load irradiance (GI) calculation shader
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
Shader shdrIrradiance = LoadShader("resources/shaders/glsl330/skybox.vs", "resources/shaders/glsl330/irradiance.fs");
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
Shader shdrIrradiance = LoadShader("resources/shaders/glsl100/skybox.vs", "resources/shaders/glsl100/irradiance.fs");
|
||||
#endif
|
||||
|
||||
// Load reflection prefilter calculation shader
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
Shader shdrPrefilter = LoadShader("resources/shaders/glsl330/skybox.vs", "resources/shaders/glsl330/prefilter.fs");
|
||||
#else
|
||||
Shader shdrPrefilter = LoadShader("resources/shaders/glsl100/skybox.vs", "resources/shaders/glsl100/prefilter.fs");
|
||||
#endif
|
||||
|
||||
// Load bidirectional reflectance distribution function shader
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
Shader shdrBRDF = LoadShader("resources/shaders/glsl330/brdf.vs", "resources/shaders/glsl330/brdf.fs");
|
||||
#else
|
||||
Shader shdrBRDF = LoadShader("resources/shaders/glsl100/brdf.vs", "resources/shaders/glsl100/brdf.fs");
|
||||
#endif
|
||||
|
||||
// Setup required shader locations
|
||||
SetShaderValue(shdrCubemap, GetShaderLocation(shdrCubemap, "equirectangularMap"), (int[1]){ 0 }, UNIFORM_INT);
|
||||
SetShaderValue(shdrIrradiance, GetShaderLocation(shdrIrradiance, "environmentMap"), (int[1]){ 0 }, UNIFORM_INT);
|
||||
SetShaderValue(shdrPrefilter, GetShaderLocation(shdrPrefilter, "environmentMap"), (int[1]){ 0 }, UNIFORM_INT);
|
||||
|
||||
Texture2D texHDR = LoadTexture("resources/dresden_square.hdr");
|
||||
Texture2D cubemap = GenTextureCubemap(shdrCubemap, texHDR, CUBEMAP_SIZE);
|
||||
mat.maps[MAP_IRRADIANCE].texture = GenTextureIrradiance(shdrIrradiance, cubemap, IRRADIANCE_SIZE);
|
||||
mat.maps[MAP_PREFILTER].texture = GenTexturePrefilter(shdrPrefilter, cubemap, PREFILTERED_SIZE);
|
||||
mat.maps[MAP_BRDF].texture = GenTextureBRDF(shdrBRDF, BRDF_SIZE);
|
||||
UnloadTexture(cubemap);
|
||||
UnloadTexture(texHDR);
|
||||
|
||||
// Unload already used shaders (to create specific textures)
|
||||
UnloadShader(shdrCubemap);
|
||||
UnloadShader(shdrIrradiance);
|
||||
UnloadShader(shdrPrefilter);
|
||||
UnloadShader(shdrBRDF);
|
||||
|
||||
// Set textures filtering for better quality
|
||||
SetTextureFilter(mat.maps[MAP_ALBEDO].texture, FILTER_BILINEAR);
|
||||
SetTextureFilter(mat.maps[MAP_NORMAL].texture, FILTER_BILINEAR);
|
||||
SetTextureFilter(mat.maps[MAP_METALNESS].texture, FILTER_BILINEAR);
|
||||
SetTextureFilter(mat.maps[MAP_ROUGHNESS].texture, FILTER_BILINEAR);
|
||||
SetTextureFilter(mat.maps[MAP_OCCLUSION].texture, FILTER_BILINEAR);
|
||||
|
||||
|
||||
// Enable sample usage in shader for assigned textures
|
||||
SetShaderValue(mat.shader, GetShaderLocation(mat.shader, "albedo.useSampler"), (int[1]){ 1 }, UNIFORM_INT);
|
||||
SetShaderValue(mat.shader, GetShaderLocation(mat.shader, "normals.useSampler"), (int[1]){ 1 }, UNIFORM_INT);
|
||||
@@ -217,6 +174,59 @@ static Material LoadMaterialPBR(Color albedo, float metalness, float roughness)
|
||||
mat.maps[MAP_OCCLUSION].value = 1.0f;
|
||||
mat.maps[MAP_EMISSION].value = 0.5f;
|
||||
mat.maps[MAP_HEIGHT].value = 0.5f;
|
||||
|
||||
// Generate cubemap from panorama texture
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
Texture2D panorama = LoadTexture("resources/dresden_square.hdr");
|
||||
// Load equirectangular to cubemap shader
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
Shader shdrCubemap = LoadShader("resources/shaders/glsl330/cubemap.vs", "resources/shaders/glsl330/cubemap.fs");
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
Shader shdrCubemap = LoadShader("resources/shaders/glsl100/cubemap.vs", "resources/shaders/glsl100/cubemap.fs");
|
||||
#endif
|
||||
SetShaderValue(shdrCubemap, GetShaderLocation(shdrCubemap, "equirectangularMap"), (int[1]){ 0 }, UNIFORM_INT);
|
||||
TextureCubemap cubemap = GenTextureCubemap(shdrCubemap, panorama, CUBEMAP_SIZE, UNCOMPRESSED_R32G32B32);
|
||||
UnloadTexture(panorama);
|
||||
UnloadShader(shdrCubemap);
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
|
||||
// Generate irradiance map from cubemap texture
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
// Load irradiance (GI) calculation shader
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
Shader shdrIrradiance = LoadShader("resources/shaders/glsl330/skybox.vs", "resources/shaders/glsl330/irradiance.fs");
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
Shader shdrIrradiance = LoadShader("resources/shaders/glsl100/skybox.vs", "resources/shaders/glsl100/irradiance.fs");
|
||||
#endif
|
||||
SetShaderValue(shdrIrradiance, GetShaderLocation(shdrIrradiance, "environmentMap"), (int[1]){ 0 }, UNIFORM_INT);
|
||||
mat.maps[MAP_IRRADIANCE].texture = GenTextureIrradiance(shdrIrradiance, cubemap, IRRADIANCE_SIZE);
|
||||
UnloadShader(shdrIrradiance);
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
|
||||
// Generate prefilter map from cubemap texture
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
// Load reflection prefilter calculation shader
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
Shader shdrPrefilter = LoadShader("resources/shaders/glsl330/skybox.vs", "resources/shaders/glsl330/prefilter.fs");
|
||||
#else
|
||||
Shader shdrPrefilter = LoadShader("resources/shaders/glsl100/skybox.vs", "resources/shaders/glsl100/prefilter.fs");
|
||||
#endif
|
||||
SetShaderValue(shdrPrefilter, GetShaderLocation(shdrPrefilter, "environmentMap"), (int[1]){ 0 }, UNIFORM_INT);
|
||||
mat.maps[MAP_PREFILTER].texture = GenTexturePrefilter(shdrPrefilter, cubemap, PREFILTERED_SIZE);
|
||||
UnloadTexture(cubemap);
|
||||
UnloadShader(shdrPrefilter);
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
|
||||
// Generate BRDF (bidirectional reflectance distribution function) texture (using shader)
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
Shader shdrBRDF = LoadShader("resources/shaders/glsl330/brdf.vs", "resources/shaders/glsl330/brdf.fs");
|
||||
#else
|
||||
Shader shdrBRDF = LoadShader("resources/shaders/glsl100/brdf.vs", "resources/shaders/glsl100/brdf.fs");
|
||||
#endif
|
||||
mat.maps[MAP_BRDF].texture = GenTextureBRDF(shdrBRDF, BRDF_SIZE);
|
||||
UnloadShader(shdrBRDF);
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
|
||||
return mat;
|
||||
}
|
||||
|
@@ -115,11 +115,12 @@ int main(void)
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(texture); // Unload texture
|
||||
|
||||
// Unload models data (GPU VRAM)
|
||||
for (int i = 0; i < NUM_MODELS; i++) UnloadModel(models[i]);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
@@ -105,7 +105,7 @@ int main(void)
|
||||
|
||||
// Check ray collision against model
|
||||
// NOTE: It considers model.transform matrix!
|
||||
meshHitInfo = GetCollisionRayModel(ray, &tower);
|
||||
meshHitInfo = GetCollisionRayModel(ray, tower);
|
||||
|
||||
if ((meshHitInfo.hit) && (meshHitInfo.distance < nearestHit.distance))
|
||||
{
|
||||
@@ -160,25 +160,25 @@ int main(void)
|
||||
EndMode3D();
|
||||
|
||||
// Draw some debug GUI text
|
||||
DrawText(FormatText("Hit Object: %s", hitObjectName), 10, 50, 10, BLACK);
|
||||
DrawText(TextFormat("Hit Object: %s", hitObjectName), 10, 50, 10, BLACK);
|
||||
|
||||
if (nearestHit.hit)
|
||||
{
|
||||
int ypos = 70;
|
||||
|
||||
DrawText(FormatText("Distance: %3.2f", nearestHit.distance), 10, ypos, 10, BLACK);
|
||||
DrawText(TextFormat("Distance: %3.2f", nearestHit.distance), 10, ypos, 10, BLACK);
|
||||
|
||||
DrawText(FormatText("Hit Pos: %3.2f %3.2f %3.2f",
|
||||
DrawText(TextFormat("Hit Pos: %3.2f %3.2f %3.2f",
|
||||
nearestHit.position.x,
|
||||
nearestHit.position.y,
|
||||
nearestHit.position.z), 10, ypos + 15, 10, BLACK);
|
||||
|
||||
DrawText(FormatText("Hit Norm: %3.2f %3.2f %3.2f",
|
||||
DrawText(TextFormat("Hit Norm: %3.2f %3.2f %3.2f",
|
||||
nearestHit.normal.x,
|
||||
nearestHit.normal.y,
|
||||
nearestHit.normal.z), 10, ypos + 30, 10, BLACK);
|
||||
|
||||
if (hitTriangle) DrawText(FormatText("Barycenter: %3.2f %3.2f %3.2f", bary.x, bary.y, bary.z), 10, ypos + 45, 10, BLACK);
|
||||
if (hitTriangle) DrawText(TextFormat("Barycenter: %3.2f %3.2f %3.2f", bary.x, bary.y, bary.z), 10, ypos + 45, 10, BLACK);
|
||||
}
|
||||
|
||||
DrawText("Use Mouse to Move Camera", 10, 430, 10, GRAY);
|
||||
|
@@ -1,80 +0,0 @@
|
||||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [models] example - Load and draw a 3d model (OBJ)
|
||||
*
|
||||
* This example has been created using raylib 1.3 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Copyright (c) 2014 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [models] example - obj model loading");
|
||||
|
||||
// Define the camera to look into our 3d world
|
||||
Camera camera = { 0 };
|
||||
camera.position = (Vector3){ 8.0f, 8.0f, 8.0f }; // Camera position
|
||||
camera.target = (Vector3){ 0.0f, 2.5f, 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.type = CAMERA_PERSPECTIVE; // Camera mode type
|
||||
|
||||
Model model = LoadModel("resources/models/castle.obj"); // Load OBJ model
|
||||
Texture2D texture = LoadTexture("resources/models/castle_diffuse.png"); // Load model texture
|
||||
model.materials[0].maps[MAP_DIFFUSE].texture = texture; // Set map diffuse texture
|
||||
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
|
||||
|
||||
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
|
||||
//----------------------------------------------------------------------------------
|
||||
//...
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginMode3D(camera);
|
||||
|
||||
DrawModel(model, position, 0.2f, WHITE); // Draw 3d model with texture
|
||||
|
||||
DrawGrid(10, 1.0f); // Draw a grid
|
||||
|
||||
DrawGizmo(position); // Draw gizmo
|
||||
|
||||
EndMode3D();
|
||||
|
||||
DrawText("(c) Castle 3D model by Alberto Cano", screenWidth - 200, screenHeight - 20, 10, GRAY);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(texture); // Unload texture
|
||||
UnloadModel(model); // Unload model
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
Before Width: | Height: | Size: 260 KiB |
@@ -1,127 +0,0 @@
|
||||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [models] example - OBJ models viewer
|
||||
*
|
||||
* This example has been created using raylib 2.0 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Copyright (c) 2014-2019 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include <string.h> // Required for: strcpy()
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib example - obj viewer");
|
||||
|
||||
// Define the camera to look into our 3d world
|
||||
Camera camera = { { 30.0f, 30.0f, 30.0f }, { 0.0f, 10.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
|
||||
|
||||
Model model = LoadModel("resources/models/turret.obj"); // Load default model obj
|
||||
Texture2D texture = LoadTexture("resources/models/turret_diffuse.png"); // Load default model texture
|
||||
model.materials[0].maps[MAP_DIFFUSE].texture = texture; // Bind texture to model
|
||||
|
||||
Vector3 position = { 0.0, 0.0, 0.0 }; // Set model position
|
||||
BoundingBox bounds = MeshBoundingBox(model.meshes[0]); // Set model bounds
|
||||
bool selected = false; // Selected object flag
|
||||
|
||||
SetCameraMode(camera, CAMERA_FREE); // Set a free camera mode
|
||||
|
||||
char objFilename[64] = "turret.obj";
|
||||
|
||||
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 (IsFileDropped())
|
||||
{
|
||||
int count = 0;
|
||||
char **droppedFiles = GetDroppedFiles(&count);
|
||||
|
||||
if (count == 1)
|
||||
{
|
||||
if (IsFileExtension(droppedFiles[0], ".obj"))
|
||||
{
|
||||
for (int i = 0; i < model.meshCount; i++) UnloadMesh(&model.meshes[i]);
|
||||
model.meshes = LoadMeshes(droppedFiles[0], &model.meshCount);
|
||||
bounds = MeshBoundingBox(model.meshes[0]);
|
||||
}
|
||||
else if (IsFileExtension(droppedFiles[0], ".png"))
|
||||
{
|
||||
UnloadTexture(texture);
|
||||
texture = LoadTexture(droppedFiles[0]);
|
||||
model.materials[0].maps[MAP_DIFFUSE].texture = texture;
|
||||
}
|
||||
|
||||
strcpy(objFilename, GetFileName(droppedFiles[0]));
|
||||
}
|
||||
|
||||
ClearDroppedFiles(); // Clear internal buffers
|
||||
}
|
||||
|
||||
UpdateCamera(&camera);
|
||||
|
||||
// Select model on mouse click
|
||||
if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON))
|
||||
{
|
||||
// Check collision between ray and box
|
||||
if (CheckCollisionRayBox(GetMouseRay(GetMousePosition(), camera), bounds)) selected = !selected;
|
||||
else selected = false;
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginMode3D(camera);
|
||||
|
||||
DrawModel(model, position, 1.0f, WHITE); // Draw 3d model with texture
|
||||
|
||||
DrawGrid(20.0, 10.0); // Draw a grid
|
||||
|
||||
if (selected) DrawBoundingBox(bounds, GREEN);
|
||||
|
||||
EndMode3D();
|
||||
|
||||
DrawText("Free camera default controls:", 10, 20, 10, DARKGRAY);
|
||||
DrawText("- Mouse Wheel to Zoom in-out", 20, 40, 10, GRAY);
|
||||
DrawText("- Mouse Wheel Pressed to Pan", 20, 60, 10, GRAY);
|
||||
DrawText("- Alt + Mouse Wheel Pressed to Rotate", 20, 80, 10, GRAY);
|
||||
DrawText("- Alt + Ctrl + Mouse Wheel Pressed for Smooth Zoom", 20, 100, 10, GRAY);
|
||||
|
||||
DrawText("Drag & drop .obj/.png to load mesh/texture.", 10, GetScreenHeight() - 20, 10, DARKGRAY);
|
||||
DrawText(FormatText("Current file: %s", objFilename), 250, GetScreenHeight() - 20, 10, GRAY);
|
||||
if (selected) DrawText("MODEL SELECTED", GetScreenWidth() - 110, 10, 10, GREEN);
|
||||
|
||||
DrawText("(c) Turret 3D model by Alberto Cano", screenWidth - 200, screenHeight - 20, 10, GRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadModel(model); // Unload model
|
||||
|
||||
ClearDroppedFiles(); // Clear internal buffers
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
Before Width: | Height: | Size: 95 KiB |
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* This example uses [rlgl] module funtionality (pseudo-OpenGL 1.1 style coding)
|
||||
*
|
||||
* This example has been created using raylib 2.2 (www.raylib.com)
|
||||
* This example has been created using raylib 2.5 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Copyright (c) 2018 Ramon Santamaria (@raysan5)
|
||||
|
@@ -2,10 +2,10 @@
|
||||
*
|
||||
* raylib [models] example - Skybox loading and drawing
|
||||
*
|
||||
* This example has been created using raylib 1.8 (www.raylib.com)
|
||||
* This example has been created using raylib 3.5 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Copyright (c) 2017 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2017-2020 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
@@ -35,6 +35,7 @@ int main(void)
|
||||
skybox.materials[0].shader = LoadShader("resources/shaders/glsl100/skybox.vs", "resources/shaders/glsl100/skybox.fs");
|
||||
#endif
|
||||
SetShaderValue(skybox.materials[0].shader, GetShaderLocation(skybox.materials[0].shader, "environmentMap"), (int[1]){ MAP_CUBEMAP }, UNIFORM_INT);
|
||||
SetShaderValue(skybox.materials[0].shader, GetShaderLocation(skybox.materials[0].shader, "vflipped"), (int[1]){ 1 }, UNIFORM_INT);
|
||||
|
||||
// Load cubemap shader and setup required shader locations
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
@@ -45,14 +46,17 @@ int main(void)
|
||||
SetShaderValue(shdrCubemap, GetShaderLocation(shdrCubemap, "equirectangularMap"), (int[1]){ 0 }, UNIFORM_INT);
|
||||
|
||||
// Load HDR panorama (sphere) texture
|
||||
Texture2D texHDR = LoadTexture("resources/dresden_square.hdr");
|
||||
char panoFileName[256] = { 0 };
|
||||
TextCopy(panoFileName, "resources/dresden_square_2k.hdr");
|
||||
Texture2D panorama = LoadTexture(panoFileName);
|
||||
|
||||
// Generate cubemap (texture with 6 quads-cube-mapping) from panorama HDR texture
|
||||
// NOTE: New texture is generated rendering to texture, shader computes the sphre->cube coordinates mapping
|
||||
skybox.materials[0].maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, texHDR, 512);
|
||||
// NOTE 1: New texture is generated rendering to texture, shader calculates the sphere->cube coordinates mapping
|
||||
// NOTE 2: It seems on some Android devices WebGL, fbo does not properly support a FLOAT-based attachment,
|
||||
// despite texture can be successfully created.. so using UNCOMPRESSED_R8G8B8A8 instead of UNCOMPRESSED_R32G32B32A32
|
||||
skybox.materials[0].maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, panorama, 1024, UNCOMPRESSED_R8G8B8A8);
|
||||
|
||||
UnloadTexture(texHDR); // Texture not required anymore, cubemap already generated
|
||||
UnloadShader(shdrCubemap); // Unload cubemap generation shader, not required anymore
|
||||
UnloadTexture(panorama); // Texture not required anymore, cubemap already generated
|
||||
|
||||
SetCameraMode(camera, CAMERA_FIRST_PERSON); // Set a first person camera mode
|
||||
|
||||
@@ -65,6 +69,30 @@ int main(void)
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera); // Update camera
|
||||
|
||||
// Load new cubemap texture on drag&drop
|
||||
if (IsFileDropped())
|
||||
{
|
||||
int count = 0;
|
||||
char **droppedFiles = GetDroppedFiles(&count);
|
||||
|
||||
if (count == 1) // Only support one file dropped
|
||||
{
|
||||
if (IsFileExtension(droppedFiles[0], ".png;.jpg;.hdr;.bmp;.tga"))
|
||||
{
|
||||
// Unload current cubemap texture and load new one
|
||||
UnloadTexture(skybox.materials[0].maps[MAP_CUBEMAP].texture);
|
||||
panorama = LoadTexture(droppedFiles[0]);
|
||||
TextCopy(panoFileName, droppedFiles[0]);
|
||||
|
||||
// Generate cubemap from panorama texture
|
||||
skybox.materials[0].maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, panorama, 1024, UNCOMPRESSED_R8G8B8A8);
|
||||
UnloadTexture(panorama);
|
||||
}
|
||||
}
|
||||
|
||||
ClearDroppedFiles(); // Clear internal buffers
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
@@ -74,13 +102,11 @@ int main(void)
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginMode3D(camera);
|
||||
|
||||
DrawModel(skybox, (Vector3){0, 0, 0}, 1.0f, WHITE);
|
||||
|
||||
DrawGrid(10, 1.0f);
|
||||
|
||||
EndMode3D();
|
||||
|
||||
DrawText(TextFormat("Panorama image from hdrihaven.com: %s", GetFileName(panoFileName)), 10, GetScreenHeight() - 20, 10, BLACK);
|
||||
DrawFPS(10, 10);
|
||||
|
||||
EndDrawing();
|
||||
@@ -89,7 +115,10 @@ int main(void)
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadModel(skybox); // Unload skybox model (and textures)
|
||||
UnloadShader(skybox.materials[0].shader);
|
||||
UnloadTexture(skybox.materials[0].maps[MAP_CUBEMAP].texture);
|
||||
|
||||
UnloadModel(skybox); // Unload skybox model
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
112
examples/models/models_waving_cubes.c
Normal file
@@ -0,0 +1,112 @@
|
||||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [models] example - Waving cubes
|
||||
*
|
||||
* This example has been created using raylib 2.5 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Example contributed by Codecat (@codecat) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Copyright (c) 2019 Codecat (@codecat) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [models] example - waving cubes");
|
||||
|
||||
// Initialize the camera
|
||||
Camera3D camera = { 0 };
|
||||
camera.position = (Vector3){ 30.0f, 20.0f, 30.0f };
|
||||
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f };
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };
|
||||
camera.fovy = 70.0f;
|
||||
camera.type = CAMERA_PERSPECTIVE;
|
||||
|
||||
// Specify the amount of blocks in each direction
|
||||
const int numBlocks = 15;
|
||||
|
||||
SetTargetFPS(60);
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
double time = GetTime();
|
||||
|
||||
// Calculate time scale for cube position and size
|
||||
float scale = (2.0f + (float)sin(time))*0.7f;
|
||||
|
||||
// Move camera around the scene
|
||||
double cameraTime = time*0.3;
|
||||
camera.position.x = (float)cos(cameraTime)*40.0f;
|
||||
camera.position.z = (float)sin(cameraTime)*40.0f;
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginMode3D(camera);
|
||||
|
||||
DrawGrid(10, 5.0f);
|
||||
|
||||
for (int x = 0; x < numBlocks; x++)
|
||||
{
|
||||
for (int y = 0; y < numBlocks; y++)
|
||||
{
|
||||
for (int z = 0; z < numBlocks; z++)
|
||||
{
|
||||
// Scale of the blocks depends on x/y/z positions
|
||||
float blockScale = (x + y + z)/30.0f;
|
||||
|
||||
// Scatter makes the waving effect by adding blockScale over time
|
||||
float scatter = sinf(blockScale*20.0f + (float)(time*4.0f));
|
||||
|
||||
// Calculate the cube position
|
||||
Vector3 cubePos = {
|
||||
(float)(x - numBlocks/2)*(scale*3.0f) + scatter,
|
||||
(float)(y - numBlocks/2)*(scale*2.0f) + scatter,
|
||||
(float)(z - numBlocks/2)*(scale*3.0f) + scatter
|
||||
};
|
||||
|
||||
// Pick a color with a hue depending on cube position for the rainbow color effect
|
||||
Color cubeColor = ColorFromHSV((float)(((x + y + z)*18)%360), 0.75f, 0.9f);
|
||||
|
||||
// Calculate cube size
|
||||
float cubeSize = (2.4f - scale)*blockScale;
|
||||
|
||||
// And finally, draw the cube!
|
||||
DrawCube(cubePos, cubeSize, cubeSize, cubeSize, cubeColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EndMode3D();
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
BIN
examples/models/models_waving_cubes.png
Normal file
After Width: | Height: | Size: 37 KiB |
@@ -92,6 +92,7 @@ int main(void)
|
||||
while (pitchOffset < -180) pitchOffset += 360;
|
||||
pitchOffset *= 10;
|
||||
|
||||
/* matrix transform done with multiplication to combine rotations
|
||||
Matrix transform = MatrixIdentity();
|
||||
|
||||
transform = MatrixMultiply(transform, MatrixRotateZ(DEG2RAD*roll));
|
||||
@@ -99,8 +100,11 @@ int main(void)
|
||||
transform = MatrixMultiply(transform, MatrixRotateY(DEG2RAD*yaw));
|
||||
|
||||
model.transform = transform;
|
||||
//----------------------------------------------------------------------------------
|
||||
*/
|
||||
// matrix created from multiple axes at once
|
||||
model.transform = MatrixRotateXYZ((Vector3){DEG2RAD*pitch,DEG2RAD*yaw,DEG2RAD*roll});
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
@@ -110,23 +114,23 @@ int main(void)
|
||||
// Draw framebuffer texture (Ahrs Display)
|
||||
int centerX = framebuffer.texture.width/2;
|
||||
int centerY = framebuffer.texture.height/2;
|
||||
float scaleFactor = 0.5f;
|
||||
|
||||
BeginTextureMode(framebuffer);
|
||||
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
BeginBlendMode(BLEND_ALPHA);
|
||||
|
||||
DrawTexturePro(texBackground, (Rectangle){ 0, 0, texBackground.width, texBackground.height },
|
||||
(Rectangle){ centerX, centerY, texBackground.width*scaleFactor, texBackground.height*scaleFactor},
|
||||
(Vector2){ texBackground.width/2*scaleFactor, texBackground.height/2*scaleFactor + pitchOffset*scaleFactor }, roll, WHITE);
|
||||
(Rectangle){ centerX, centerY, texBackground.width, texBackground.height},
|
||||
(Vector2){ texBackground.width/2, texBackground.height/2 + pitchOffset }, roll, WHITE);
|
||||
|
||||
DrawTexturePro(texPitch, (Rectangle){ 0, 0, texPitch.width, texPitch.height },
|
||||
(Rectangle){ centerX, centerY, texPitch.width*scaleFactor, texPitch.height*scaleFactor },
|
||||
(Vector2){ texPitch.width/2*scaleFactor, texPitch.height/2*scaleFactor + pitchOffset*scaleFactor }, roll, WHITE);
|
||||
(Rectangle){ centerX, centerY, texPitch.width, texPitch.height },
|
||||
(Vector2){ texPitch.width/2, texPitch.height/2 + pitchOffset }, roll, WHITE);
|
||||
|
||||
DrawTexturePro(texPlane, (Rectangle){ 0, 0, texPlane.width, texPlane.height },
|
||||
(Rectangle){ centerX, centerY, texPlane.width*scaleFactor, texPlane.height*scaleFactor },
|
||||
(Vector2){ texPlane.width/2*scaleFactor, texPlane.height/2*scaleFactor }, 0, WHITE);
|
||||
(Rectangle){ centerX, centerY, texPlane.width, texPlane.height },
|
||||
(Vector2){ texPlane.width/2, texPlane.height/2 }, 0, WHITE);
|
||||
|
||||
EndBlendMode();
|
||||
|
||||
@@ -165,6 +169,7 @@ int main(void)
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Unload all loaded data
|
||||
UnloadTexture(model.materials[0].maps[MAP_DIFFUSE].texture);
|
||||
UnloadModel(model);
|
||||
|
||||
UnloadRenderTexture(framebuffer);
|
||||
@@ -190,6 +195,6 @@ void DrawAngleGauge(Texture2D angleGauge, int x, int y, float angle, char title[
|
||||
|
||||
DrawTexturePro(angleGauge, srcRec, dstRec, origin, angle, color);
|
||||
|
||||
DrawText(FormatText("%5.1f", angle), x - MeasureText(FormatText("%5.1f", angle), textSize) / 2, y + 10, textSize, DARKGRAY);
|
||||
DrawText(TextFormat("%5.1f", angle), x - MeasureText(TextFormat("%5.1f", angle), textSize) / 2, y + 10, textSize, DARKGRAY);
|
||||
DrawText(title, x - MeasureText(title, textSize) / 2, y + 60, textSize, DARKGRAY);
|
||||
}
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 164 B |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
BIN
examples/models/resources/dresden_square_2k.hdr
Normal file
Before Width: | Height: | Size: 295 KiB After Width: | Height: | Size: 295 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
4
examples/models/resources/models/LICENSE
Normal file
@@ -0,0 +1,4 @@
|
||||
Medieval City models and textures have been created by Alberto Cano,
|
||||
and licensed as Creative Commons Attribution-NonCommercial 4.0.
|
||||
|
||||
Check for details: https://creativecommons.org/licenses/by-nc/4.0/legalcode
|
Before Width: | Height: | Size: 311 KiB After Width: | Height: | Size: 311 KiB |
Before Width: | Height: | Size: 434 KiB After Width: | Height: | Size: 434 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 384 KiB After Width: | Height: | Size: 383 KiB |
Before Width: | Height: | Size: 381 KiB After Width: | Height: | Size: 380 KiB |