Compare commits
2465 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bf2ad9df5f | |||
| 092b6f956e | |||
| 48c7f65b77 | |||
| e0b487c641 | |||
| 56072a631d | |||
| f2fbdd1999 | |||
| 03bf7e81dd | |||
| 14b1aef194 | |||
| d658e6772d | |||
| 965057dbe2 | |||
| b38dceb2de | |||
| 764254d93e | |||
| b55cb32d9b | |||
| 931af3a242 | |||
| 372983c06e | |||
| 8b8b5ef70e | |||
| feb9c52374 | |||
| 71e43612d6 | |||
| b24947c0d0 | |||
| 60d9cbd754 | |||
| 4c71f5f76e | |||
| 75ece337ae | |||
| 4f6fbaed41 | |||
| ddb8be3564 | |||
| b3ed01dbab | |||
| e87caa2687 | |||
| b0f3a2c217 | |||
| d1a5d381d8 | |||
| 621d6ae856 | |||
| 8127044748 | |||
| 2c0071c851 | |||
| 63a23a6b74 | |||
| 304c820a8e | |||
| 86ac792d9a | |||
| 4b2357dc34 | |||
| e47a3afbd8 | |||
| 3ce5941106 | |||
| 3edf43f1d6 | |||
| e06ed6c608 | |||
| ec8fabceeb | |||
| 14990209ef | |||
| d1c53910b7 | |||
| 5940790379 | |||
| 19d6f2a961 | |||
| 7faeaa757c | |||
| d70e5cd26b | |||
| 82b76149da | |||
| b0b6381745 | |||
| 3e4a8bb640 | |||
| 090e47dca0 | |||
| 1a35f73d84 | |||
| 50663f0890 | |||
| 7c9d55f4d9 | |||
| 0739152057 | |||
| 66108c47d9 | |||
| 75c8df348f | |||
| 273c780b67 | |||
| 2ce0722fb8 | |||
| 72b2d1335a | |||
| b79df1c329 | |||
| d791c1cf64 | |||
| 94165a40b9 | |||
| dd455c626e | |||
| 0ce8a8f360 | |||
| b187d6ca16 | |||
| 5840cd6e50 | |||
| df5514088e | |||
| 312fa64b88 | |||
| 222997f951 | |||
| 2a2c9e4da8 | |||
| 6ecb29f33f | |||
| ddbe8972bc | |||
| 9cbbf149d8 | |||
| 328d65b1b3 | |||
| c457835938 | |||
| d68ddda766 | |||
| 24e6bf0565 | |||
| 4492e64cb5 | |||
| 191c340409 | |||
| ed7548051b | |||
| eb8d14e5b2 | |||
| fd191a32ea | |||
| fe9e82b2e6 | |||
| b20d416131 | |||
| dacd500ef0 | |||
| a0b4b28427 | |||
| f9b71e7bcd | |||
| 0f47054ece | |||
| a6b3c8aa1e | |||
| 2e5fc3d0c2 | |||
| f596815973 | |||
| 7853155f99 | |||
| f31e4ebb3d | |||
| 85bd13c41d | |||
| d59ea21405 | |||
| 93b633b6e6 | |||
| bc8cecc6aa | |||
| 6c61f83d63 | |||
| 0ef3e4c4d5 | |||
| b6f87023ad | |||
| fccdb68df8 | |||
| 277dd2bb57 | |||
| 721e7914b1 | |||
| e4229e1be7 | |||
| bb6b43b7cb | |||
| 52345fd883 | |||
| 241d6526b0 | |||
| 7b05444af8 | |||
| 024a803665 | |||
| 5a2f25cc7c | |||
| 6f3a633f2e | |||
| 00c7509454 | |||
| 64710e6030 | |||
| d78177d246 | |||
| 39d9d1da42 | |||
| 4b0f28b782 | |||
| 65c3edf797 | |||
| 6ed1ce0082 | |||
| 0abba4dc18 | |||
| 55c43fcd26 | |||
| b40696eab6 | |||
| 4a9391ae83 | |||
| 4fced50fd1 | |||
| a3a6b3f24a | |||
| 39ead974a4 | |||
| e9029d3d00 | |||
| 0f7c4f762f | |||
| 49a534b5d4 | |||
| cccea34c6f | |||
| 8aa105fd5b | |||
| 6c2c176a99 | |||
| 3ebfee5dbc | |||
| 0379b94b7a | |||
| b92573e711 | |||
| 0ac825b22a | |||
| 2245500245 | |||
| 066bd5be87 | |||
| 29a0f60778 | |||
| 05dc300296 | |||
| d1aabb3957 | |||
| 5842a6a399 | |||
| 53e3375186 | |||
| f7e1550eea | |||
| 41a19cd007 | |||
| 5f9972dfd1 | |||
| 1343f5f31f | |||
| 0295ab968c | |||
| ab23e2f130 | |||
| 61695c5315 | |||
| 4e763b4aa3 | |||
| 870b7fa05f | |||
| ff838b48fd | |||
| 8e229ada1d | |||
| e121058eb6 | |||
| e3ff5f3dc2 | |||
| 9e97a2c4a1 | |||
| 8f65cb1d94 | |||
| 7fb7591e4f | |||
| e722a8dbef | |||
| e0f0a5f663 | |||
| d0f53db65f | |||
| cd53531050 | |||
| bf07d17cec | |||
| 5c5db2c016 | |||
| c6c71fe73c | |||
| 850321cf2b | |||
| f579a3a708 | |||
| 061e828524 | |||
| b84fc30284 | |||
| 9be186624c | |||
| 61e691d94f | |||
| e9fcc8a391 | |||
| da5d04061e | |||
| e4972f4cdd | |||
| 1211047e1c | |||
| 63568721f9 | |||
| 3c3f08c416 | |||
| 6f231ea9ac | |||
| b1fb469e0d | |||
| d7a0b46006 | |||
| 77b9ca50e0 | |||
| 3879decb9f | |||
| 371aa0fe7f | |||
| 5044ce9de3 | |||
| 68c7cc0cc4 | |||
| c1b01c0d5d | |||
| 8bd3ecaa66 | |||
| 0afa79067b | |||
| 5426262ae6 | |||
| 8fe6bfabbf | |||
| 6f3b2a7661 | |||
| c1d9489294 | |||
| 8d9c45a08a | |||
| d4f60f8303 | |||
| a6e31cadbd | |||
| 0964353073 | |||
| 309ad3e08b | |||
| 7ed3d870fe | |||
| 2824aacd5d | |||
| c392f0c16b | |||
| 377dcef9f4 | |||
| 81157e4e72 | |||
| d37a63fad7 | |||
| 9998a86625 | |||
| a2c56b5929 | |||
| 043fa4cba7 | |||
| 7743af853a | |||
| ad56a49da8 | |||
| e1e0bc4266 | |||
| 875601c4cc | |||
| 96292bc859 | |||
| f9426912f6 | |||
| ad332f49ed | |||
| 8c2019f5ad | |||
| b8f67c6285 | |||
| f7744404d6 | |||
| b1c413237c | |||
| b9f617aaee | |||
| 702f2bccfc | |||
| b549baa6b7 | |||
| 4a6e8bb90b | |||
| 5e3ef42201 | |||
| 59a808516e | |||
| 484a61c1d4 | |||
| 3fc1bd0670 | |||
| 70ec71a373 | |||
| 8c55b40e9e | |||
| ae715ba0d8 | |||
| b3187e1291 | |||
| a7459043c6 | |||
| b5191a03b2 | |||
| a53411013a | |||
| dca23cb3ff | |||
| fc86b5c1b4 | |||
| 9dd28feadf | |||
| bf208decc0 | |||
| 06db2767fe | |||
| 9c676e599e | |||
| e6bc401c93 | |||
| ebbcc2ffce | |||
| 461cdda71e | |||
| c11d30bafe | |||
| 609d92003b | |||
| 8da566d6e7 | |||
| 865a44adda | |||
| cda89ebb58 | |||
| 6fccfc57a4 | |||
| 91af3a3152 | |||
| 99841b8fde | |||
| a28dfbae9f | |||
| 023eb3380d | |||
| d0318aac4a | |||
| 8294e04749 | |||
| fe28aa7c9b | |||
| 1f806b555d | |||
| 789e504069 | |||
| 76c3881944 | |||
| 5bdd8f134f | |||
| 426e8252d4 | |||
| d3caee0e72 | |||
| 6259dc4121 | |||
| d786af83fc | |||
| 5ecc289201 | |||
| 020e903193 | |||
| db16833d8c | |||
| f3aac87422 | |||
| ea598f7d77 | |||
| c0275df820 | |||
| b2c2b5ee21 | |||
| df3f64bfd2 | |||
| aa318674e8 | |||
| bbc8d39185 | |||
| 19f88241ec | |||
| 7fc9662480 | |||
| ed29b4eedf | |||
| d9a30b8480 | |||
| ed2ab55034 | |||
| 4eb3d8857f | |||
| df6caea25d | |||
| 8cb03ef524 | |||
| 6f044c57ac | |||
| 666aa44a84 | |||
| f169530d8f | |||
| 5c66cc1c9b | |||
| db6c677755 | |||
| 28ac82aeb0 | |||
| 3580267479 | |||
| a7ce537d32 | |||
| 38a3523f59 | |||
| bdfa256cea | |||
| 6e722d416b | |||
| e543922055 | |||
| f2c7b0d3bf | |||
| 74ca81338e | |||
| dc553d1996 | |||
| f798ee2bc1 | |||
| ccfac59c60 | |||
| e1ee4b1466 | |||
| d433de7efa | |||
| 233cf3970c | |||
| ff95f05386 | |||
| 47d768c3d6 | |||
| 015a71fc40 | |||
| be3ae71aec | |||
| 52befa0815 | |||
| a5daee3812 | |||
| 559ffc6331 | |||
| f71cc53bc9 | |||
| 07240b96ad | |||
| aa8af23f10 | |||
| 9c66e2f97e | |||
| c064eefe26 | |||
| 709ec1663d | |||
| 1612ba63ab | |||
| 90fc7c0376 | |||
| 5abb87a0d2 | |||
| 9c2d337e99 | |||
| 3bcb19e040 | |||
| cfe7823453 | |||
| c2c1c93041 | |||
| 418a595b6f | |||
| 45cc806a5c | |||
| 69ccf6d472 | |||
| a2399bd2bc | |||
| 8e28872fe1 | |||
| 381236051f | |||
| bcd84cd36d | |||
| 22c17da4d7 | |||
| ca12ef48e9 | |||
| 65f28460a1 | |||
| 3634adf8d4 | |||
| bd95408b06 | |||
| cb62cb675f | |||
| 40794da9e4 | |||
| 0da7830745 | |||
| c65efecf0a | |||
| 9ecbc465a9 | |||
| 9723489ccc | |||
| 3d812f8d0c | |||
| 4954778f68 | |||
| ec7250ca54 | |||
| d2119848ed | |||
| f3b0d7f2fe | |||
| c3a7bd8c51 | |||
| 3f01b8a93f | |||
| a5a098c97f | |||
| 8065504aba | |||
| cda1324e87 | |||
| 43dbe67431 | |||
| e9f97e1165 | |||
| c5d2cc8e66 | |||
| 7584ce6f48 | |||
| 7bbaba38e4 | |||
| 7fa75cb24e | |||
| ead8003044 | |||
| 296b57e1f5 | |||
| 6e9ec253c8 | |||
| 937e7b3dd9 | |||
| 68bad6986d | |||
| 761669272f | |||
| d4382f4a52 | |||
| 963de06d08 | |||
| 4f2bfc5476 | |||
| 4815065c47 | |||
| b54e9db764 | |||
| f40eed5adf | |||
| 4bc6e0d7de | |||
| 9cf170e6e9 | |||
| 8c9a0221a4 | |||
| 2f3fc41c33 | |||
| 6ef6dbff2d | |||
| d0008ae8cd | |||
| dd15531e25 | |||
| ddba8478c5 | |||
| ab47c6401e | |||
| 81cced4d83 | |||
| 30797d3201 | |||
| 96452637d9 | |||
| 1e436be51d | |||
| c895bed5e6 | |||
| a0895f1a3c | |||
| c54d9cd552 | |||
| 680cc72d43 | |||
| 6e9bb7e480 | |||
| 44d3cee5d1 | |||
| d38fe92c3f | |||
| 0f00c41aad | |||
| 524bf57b74 | |||
| e5ee69a0f5 | |||
| 76b6efc827 | |||
| ebdc34a20e | |||
| b4e0f7ab08 | |||
| b422e407e8 | |||
| 5b8b24c0c5 | |||
| 45ef46c5e8 | |||
| dfac74ffa7 | |||
| 3c359ff4bc | |||
| bec27a6ebc | |||
| 61d0c71b3c | |||
| 4b998cfd05 | |||
| 15b36e04b2 | |||
| 5ac07122bd | |||
| 48a463cca8 | |||
| 8ee0eb8f36 | |||
| f4dea6919a | |||
| f57727995a | |||
| e621efe79f | |||
| 464026f15c | |||
| a134b8bc6d | |||
| b61c9afd04 | |||
| 0416d5ff7b | |||
| cabb5518e5 | |||
| aaf0175d07 | |||
| 7b7424802f | |||
| 8db56cfc3b | |||
| 8089ef0f2d | |||
| b4e0ed6007 | |||
| c0da80c2b8 | |||
| a6aa5a1e4c | |||
| 9d6fcd1710 | |||
| 7a159664bc | |||
| 612c4ad1dc | |||
| fbf34f7c0d | |||
| 549ca669aa | |||
| f7ed804131 | |||
| 2e3cfdcc2f | |||
| 2116a98745 | |||
| 62858e11f7 | |||
| 744bbd12a7 | |||
| ba1e91b4d7 | |||
| 7eb341ccaf | |||
| f5a832e770 | |||
| a940f41b4b | |||
| bb875b1db7 | |||
| 8f2d9838a3 | |||
| 4bb894f171 | |||
| d91b9171fa | |||
| fef5be0bc7 | |||
| c862c4bdf2 | |||
| 79992a8d50 | |||
| be5f36444d | |||
| b1607ad9e7 | |||
| e222209732 | |||
| 0d064b7808 | |||
| c9db9e6bb7 | |||
| 803ce9f44b | |||
| 611e54e67e | |||
| 5f2bc20191 | |||
| 8844ad6f0b | |||
| bf0fed8431 | |||
| 011aebe4b3 | |||
| 423fdb320a | |||
| dcc0791502 | |||
| f66ae2366f | |||
| 4874c45ebf | |||
| 31dd7b95bc | |||
| bb014ee61b | |||
| 9e5a9892be | |||
| 58f2bf4181 | |||
| a7bc5196cc | |||
| bb7b13ef3c | |||
| 87b9ee9183 | |||
| 588de4d095 | |||
| 22d0baa896 | |||
| dcb0e62095 | |||
| 5499388a4c | |||
| 278c9fa5bd | |||
| 76daf6e364 | |||
| 05428df667 | |||
| f5e951145a | |||
| ef5be632fe | |||
| 87fa23beee | |||
| 51c929ef21 | |||
| 60b1f29783 | |||
| 2db44bc34a | |||
| 86611e6459 | |||
| 55d310fcc3 | |||
| fffd78e7c8 | |||
| 48918ca5c6 | |||
| 1653fc5bb5 | |||
| 0454acaacf | |||
| 20f4d8c147 | |||
| 7787102573 | |||
| c0715c1225 | |||
| fd0e3a4fdd | |||
| fe95d82890 | |||
| f09a916587 | |||
| ed1e1f35df | |||
| 7d25480723 | |||
| 81240fe960 | |||
| 72f3b00b00 | |||
| 3d0b56045a | |||
| ef6959ed54 | |||
| e7f48eb16b | |||
| 3cb4ef2599 | |||
| fa7337e19c | |||
| 93f05d851d | |||
| c5eaaed873 | |||
| c4a62ca1e4 | |||
| 895f5ddd98 | |||
| e637ad9d2a | |||
| 48d4806e53 | |||
| 930941e85e | |||
| ba8c73a327 | |||
| d6517f9cd9 | |||
| 3aff6dd63e | |||
| 6a0d5f6335 | |||
| 59c4facd90 | |||
| 7c6adc5d97 | |||
| 65e07036a6 | |||
| d1b8d4f2c7 | |||
| 71f2e2b1e4 | |||
| 2b2141902b | |||
| 49a5547386 | |||
| 9088135b49 | |||
| b248a00c90 | |||
| e60aa8e935 | |||
| c5fc7c7640 | |||
| 460eba53c7 | |||
| 924b1c7b0c | |||
| 478b70e53e | |||
| 4d3c79f91f | |||
| 73bded3b0c | |||
| 7755cd0019 | |||
| 3a9f089018 | |||
| e24443bbbc | |||
| 03f55d8f9e | |||
| be371ebf99 | |||
| b7bf220598 | |||
| ed125f27b0 | |||
| 5a6aa52a7c | |||
| 6342cf103a | |||
| 864e3ee9f3 | |||
| 2c38dad214 | |||
| c8f029dba9 | |||
| 802a1a1529 | |||
| fc268129ef | |||
| 91135c8799 | |||
| da7e0ba9d9 | |||
| c82390e3f1 | |||
| 4853082a4f | |||
| f6180efd35 | |||
| 7158c80448 | |||
| 15fffa12a6 | |||
| 35cbacc68b | |||
| 44ba3a50ba | |||
| 14e4992d73 | |||
| 21ec8c38ae | |||
| 8ec5b2dc2f | |||
| 3f595fda26 | |||
| 42f5903b91 | |||
| bb87d2ae82 | |||
| 43c8c8ec34 | |||
| 9cb8934688 | |||
| f67947325b | |||
| 1bfdc468da | |||
| f78b666c26 | |||
| 34f9f51835 | |||
| 9e6133bb09 | |||
| bf6dac5fa3 | |||
| 2021f09db4 | |||
| 6055e44518 | |||
| db0cc3c036 | |||
| 87a4ee52b9 | |||
| 7bf8d6bc98 | |||
| a56b8cd2b7 | |||
| 0851960397 | |||
| a31784759d | |||
| 453a5b49a0 | |||
| e7f24ade0b | |||
| e14c6441ce | |||
| d18f3fca30 | |||
| 7f4ae653f3 | |||
| 703df42586 | |||
| 13376de059 | |||
| 677f5b0795 | |||
| d32bbabe0e | |||
| c3d32c156c | |||
| 1aaa55c38e | |||
| de0fca51a8 | |||
| 5e3db0aa83 | |||
| fadef24b62 | |||
| 689a534c66 | |||
| 9d93ca6fc8 | |||
| 86d3e68d55 | |||
| 9e17134949 | |||
| 290d68c11e | |||
| 2c8bc8ad47 | |||
| de070ba25f | |||
| e930ad3102 | |||
| 2fe488a71c | |||
| 0af2c139e2 | |||
| 191e8cf02b | |||
| 8737d697dc | |||
| 765a31597a | |||
| 70a2118c49 | |||
| b02e737074 | |||
| fdb7cd0587 | |||
| bba035c20c | |||
| be361ed3dc | |||
| 8c0f9c7f5a | |||
| 8abba960c7 | |||
| 8649032428 | |||
| 6e8387468f | |||
| 27987f3fe6 | |||
| ef32377336 | |||
| a2b69c0905 | |||
| 1fac09d0f4 | |||
| f090f5444c | |||
| 2bb4d36c43 | |||
| b7240d6a36 | |||
| 65076464d5 | |||
| 72758de6ea | |||
| 25642cff36 | |||
| cd61463d23 | |||
| 0171bdfb9c | |||
| daeccd03ac | |||
| 086f76ba7a | |||
| e5cdfab97d | |||
| affb707dd9 | |||
| 4c497779a2 | |||
| 08441e8b2d | |||
| d02310e8ce | |||
| 62965aa6d7 | |||
| 04a4efb591 | |||
| c4f0e80895 | |||
| ebee8ba3bb | |||
| 8f5bd3e185 | |||
| fcc6a61d9e | |||
| ae13f438ba | |||
| 18db2c4f01 | |||
| 1fd8052527 | |||
| 6ce38e599a | |||
| 83b6cd00c6 | |||
| 1883343944 | |||
| ebad28d831 | |||
| befdb5963e | |||
| 83cd22ee5a | |||
| dd6e006d78 | |||
| cbeb29d9d1 | |||
| 317db34059 | |||
| 1d61be5804 | |||
| 13bb656a91 | |||
| 16f5a04983 | |||
| 9afda9359b | |||
| 2d82788e42 | |||
| 5761bf7e19 | |||
| fba117478d | |||
| 8e599908d9 | |||
| ae7127232d | |||
| 2e151408bb | |||
| fec0ce34c5 | |||
| 719c1551cc | |||
| 9f2ff3e4d6 | |||
| 963021d393 | |||
| 7763ccd8ad | |||
| d8e0b2e27c | |||
| 6ac3043e88 | |||
| 2ec8ce649a | |||
| bc47d36e90 | |||
| 1c9093fd24 | |||
| 0543f897a9 | |||
| b28e353626 | |||
| a3f9ba8704 | |||
| ccf4329792 | |||
| a6fb2dafc6 | |||
| 7a16834124 | |||
| 628e6e52f3 | |||
| f437f7b405 | |||
| cf12992b6a | |||
| 67a1e84859 | |||
| 6243466770 | |||
| 0f8caeb186 | |||
| c20df9aa47 | |||
| c41e0f0c45 | |||
| 16d015d81e | |||
| d47d7c0001 | |||
| c87e91d27a | |||
| 99f6707e2c | |||
| e36dc01b91 | |||
| 8523d13683 | |||
| dba29e4405 | |||
| 0aefe256d0 | |||
| 1b793e76dc | |||
| 226c0e362c | |||
| 84edd22612 | |||
| 2a6bd973bd | |||
| d7266ea8f3 | |||
| ef858b0dbb | |||
| 588131c9d5 | |||
| 52c1a4e7d0 | |||
| f9c8e31ed7 | |||
| 9ac5a96408 | |||
| 8a5bc933de | |||
| 3e604a8645 | |||
| 83b3478fe4 | |||
| 51b147cd32 | |||
| 4390d3a122 | |||
| a77afd5c8f | |||
| 32c9d411b2 | |||
| 1350361f58 | |||
| e545286369 | |||
| 942731cc22 | |||
| 4e88160e78 | |||
| a1db0220a1 | |||
| f9d4601057 | |||
| f1659d78d3 | |||
| 007e840be1 | |||
| d92531b81d | |||
| 670eab8b17 | |||
| 252bd22738 | |||
| 0b0711027a | |||
| e168c6dd81 | |||
| 526e68afa8 | |||
| 1b91ac0b0d | |||
| 599d6e810f | |||
| 75b5cc0084 | |||
| 9a568654be | |||
| 4a1bd12e2d | |||
| 282ec9bb76 | |||
| a91f61262e | |||
| f8719e7ec3 | |||
| 7c36f3f6b8 | |||
| 3d6d5558c9 | |||
| a39a44c12f | |||
| 60bedb4f87 | |||
| 62554db48d | |||
| 94650f0def | |||
| 33ed452439 | |||
| bb2763cc1f | |||
| 3e71232a04 | |||
| 700d448d75 | |||
| 8722ff7043 | |||
| 8d7f97ee04 | |||
| 9a4fb25285 | |||
| 7439c7547b | |||
| c8b16d72e2 | |||
| b972b8d324 | |||
| 67de7c4483 | |||
| 9f4a839853 | |||
| 6541895901 | |||
| 5d8c477d12 | |||
| 79f36799e7 | |||
| 369cb0a3c5 | |||
| 9b3d74db6b | |||
| 92417c4485 | |||
| 22345ff62a | |||
| 3fc4a4c974 | |||
| 03a88678da | |||
| f60e0e6c94 | |||
| 9fce26bb06 | |||
| f869229b7f | |||
| 239c37246a | |||
| 9882796df0 | |||
| e34c0911f9 | |||
| 93efa565f9 | |||
| dfbb134bfe | |||
| 92f6290dbb | |||
| 2474d50dba | |||
| e40ece55d5 | |||
| 18c92b3104 | |||
| dd7d65a6b4 | |||
| 206e1def6f | |||
| b7063ab879 | |||
| 10d7718011 | |||
| ddc1fdf6d5 | |||
| 7fa521fae4 | |||
| 08ea5e419e | |||
| 00a763ea44 | |||
| dcd289d931 | |||
| 025246620f | |||
| 19ef765382 | |||
| 9607ea5c0a | |||
| 8a434b4fd4 | |||
| 0e037555fe | |||
| de173a93c8 | |||
| 37c047eabc | |||
| c1432386a5 | |||
| b5f281bacd | |||
| 23b827b66c | |||
| d851208413 | |||
| 3caa15e696 | |||
| 99ab4d6cb8 | |||
| 8b3d054408 | |||
| 7d995d95eb | |||
| a09311a8fc | |||
| 339fdf4c31 | |||
| c96de3a23a | |||
| 1627f34032 | |||
| 59cabc7d11 | |||
| 89f031673b | |||
| 3c55f067a8 | |||
| 23fabb1d67 | |||
| e9d3d4fa1f | |||
| 024adc2538 | |||
| 72983d4e20 | |||
| b63c2619e3 | |||
| 40ec7a6236 | |||
| 352ea80a1f | |||
| a422d2fc8b | |||
| 803094f41f | |||
| 2c13e43c32 | |||
| 18d73eef19 | |||
| 7bf31dd468 | |||
| 1a6adc5f74 | |||
| b15715ca80 | |||
| 8d3ff3fda8 | |||
| 24a38dbd3f | |||
| 4120f12375 | |||
| dfc465ca6d | |||
| 93168304cd | |||
| 9ff8ad853c | |||
| 59e7275464 | |||
| fa79ae8a3d | |||
| 9362eaf9c6 | |||
| dfadb3ee37 | |||
| 6e76baa6a9 | |||
| a0f8682905 | |||
| e8fa7ceb79 | |||
| 68bcfa1192 | |||
| d98e61c6eb | |||
| 66c6ec4465 | |||
| 936199d8de | |||
| 18af18479f | |||
| b7ae0df3d9 | |||
| cac856119c | |||
| 1286bc076f | |||
| 3d33c559e7 | |||
| 14e443afba | |||
| 7749a2805c | |||
| a04dbe7ffd | |||
| 913f185f82 | |||
| 6575d31379 | |||
| 7c1889c282 | |||
| 45fd75952d | |||
| 51fbde178f | |||
| b154bc33f5 | |||
| d98779abef | |||
| aefdb9f9cf | |||
| ff523d55ac | |||
| 6d20430ccc | |||
| a5beb940f8 | |||
| f3385b6ad2 | |||
| ef8526ae36 | |||
| 92a13878dc | |||
| 1b4c58b66f | |||
| e203fb58c6 | |||
| 462e7aec52 | |||
| aae60e1e44 | |||
| 848cdb267a | |||
| 760cfd361e | |||
| 092435d51c | |||
| 1dff5814be | |||
| 26db391576 | |||
| ce3214b82d | |||
| 621a8766a8 | |||
| b6541b7a55 | |||
| 7e27c2ffa8 | |||
| b55418effd | |||
| 5a259fa10f | |||
| 0ba49cce45 | |||
| b54422c970 | |||
| ef9fdd0fa5 | |||
| e3f0a11053 | |||
| 311fe8f35b | |||
| a135d9c25d | |||
| ee72497eef | |||
| 5e63cd3c97 | |||
| e6fe8169c2 | |||
| 7ca9131fd4 | |||
| 07e0b10515 | |||
| aa67903f96 | |||
| 5b6d83b533 | |||
| 3e75a2109d | |||
| 7013e60926 | |||
| 559f1919c6 | |||
| 73c8ddc8bf | |||
| b805754aa1 | |||
| 0f8cfd6031 | |||
| dffd1435e9 | |||
| a8e9e1387f | |||
| 1613057881 | |||
| b4fddf146b | |||
| aeb1a0da84 | |||
| 71373ee524 | |||
| 1cc25d1a2d | |||
| bd70a22412 | |||
| 8b7f43f89b | |||
| 58e9a0894f | |||
| 6ef3ab3d3a | |||
| a9f6ff6fe3 | |||
| cd1464390c | |||
| d8ca13f4c6 | |||
| 8fecf45f4c | |||
| 96aadec503 | |||
| c219fc02cd | |||
| 75d675ab4d | |||
| 69a82c7a0d | |||
| 0c3902b543 | |||
| 7c7ee1cdc8 | |||
| 0c17d1e14f | |||
| 0352aa2094 | |||
| a9230a6c07 | |||
| c706b33b30 | |||
| e9c7ab925f | |||
| 70ed52dd5d | |||
| 4e363b5479 | |||
| 9839ea6667 | |||
| 87b542085b | |||
| 647b54a2dc | |||
| 548961aea1 | |||
| 00911b0842 | |||
| ff2b8d6db1 | |||
| 0fa295c72d | |||
| 4a01139c8d | |||
| 64e786fe28 | |||
| 5c76c33d7d | |||
| 53bb87c8fb | |||
| 9aaf7a8057 | |||
| 56cab4b6a9 | |||
| c4804c4c0c | |||
| 8809ae66c6 | |||
| 85dc2cc03a | |||
| db4cfc9fbd | |||
| 7d2845a661 | |||
| 30a3dae8a6 | |||
| 59acb6dbea | |||
| 8277597bcf | |||
| 8a46b5e6c0 | |||
| ae230dae46 | |||
| 7062415aec | |||
| 5ed814e950 | |||
| 2156cd4a84 | |||
| 3a74534c39 | |||
| 4d438ed68d | |||
| bfff2c432c | |||
| bcf3ad87e8 | |||
| a958cebdd9 | |||
| e6aa713a37 | |||
| e18aad0653 | |||
| 9aedfbec69 | |||
| c0ca8a74bc | |||
| 63b1860010 | |||
| 0c78b8d182 | |||
| 4e79e23a20 | |||
| dbb2bbf207 | |||
| 64916ba232 | |||
| 8a7812f1f5 | |||
| d432d03aea | |||
| c15d08d6ec | |||
| f8753bda01 | |||
| 652b17d68d | |||
| efba81442a | |||
| 1aec0a90bc | |||
| f81dfce19f | |||
| 2a70638e26 | |||
| 1fe137db44 | |||
| fe8dad48e2 | |||
| 2cda1502a3 | |||
| a6728a2203 | |||
| 9e7ca41f58 | |||
| 0776f1e106 | |||
| de4611ecf6 | |||
| ee24d17895 | |||
| da8d76d826 | |||
| 6f30a19dd7 | |||
| 2911cf2a48 | |||
| e5cf3f9555 | |||
| 5f03201616 | |||
| 8eb7cf1fee | |||
| 0624af09fd | |||
| 2f75657350 | |||
| 00c8795385 | |||
| 89708edf7f | |||
| 71700254b4 | |||
| aa86e9d399 | |||
| 4b6e6ce20e | |||
| 7cbfca8bd1 | |||
| e0720a0a55 | |||
| d4c03b47ec | |||
| a226e11aac | |||
| d3d362090c | |||
| f3eff740ce | |||
| f4c171aa45 | |||
| 953882e86f | |||
| 46ad7b87e8 | |||
| 4e9afac2a5 | |||
| 2cce5a24c9 | |||
| 43efe92e21 | |||
| f7a6b94f46 | |||
| 7203acdef9 | |||
| 3db26f82ea | |||
| 716e26aa37 | |||
| f989048bda | |||
| 49d2897b24 | |||
| 6f60622619 | |||
| 429c5a9a9a | |||
| 7f2a071c51 | |||
| 2efb50cc63 | |||
| 9095dd9e82 | |||
| 30a0f6f292 | |||
| 52f1c7df6d | |||
| 906c7f591e | |||
| 115cc7dede | |||
| 96d5dd24aa | |||
| 28093c46a8 | |||
| c37f776e87 | |||
| 1dd9fbae94 | |||
| 8be5ec2288 | |||
| 1a420b77e3 | |||
| 0e65e5877f | |||
| e07054d0d4 | |||
| b733e76c86 | |||
| 19b71f5f13 | |||
| ab032919df | |||
| 68e408474d | |||
| 942657fc7c | |||
| 4decbb2586 | |||
| f3d38018cd | |||
| 3ae40c35e6 | |||
| 4b93feb172 | |||
| d875891a3c | |||
| 3e68059556 | |||
| 213c990eda | |||
| 929fa5780d | |||
| 7d03048f1d | |||
| ae9cea03f0 | |||
| de7b8ad551 | |||
| 4dd5643402 | |||
| 0b8e0f05a7 | |||
| b188008a1c | |||
| 7bc2e922c9 | |||
| b0dcdf688f | |||
| d3387c952a | |||
| 3643974949 | |||
| 8980bcfe4b | |||
| e1babab3cc | |||
| 97b074ac26 | |||
| 76a907bb79 | |||
| 9681a072d0 | |||
| 32f3f53718 | |||
| 246798a0ba | |||
| 88a8395b8e | |||
| e95d8bc655 | |||
| 6445200a93 | |||
| e00d2439b9 | |||
| 7e68e733f5 | |||
| 0565fb9fb6 | |||
| 121c689b78 | |||
| edeaff4bd4 | |||
| 2370af598e | |||
| deaa84d28d | |||
| 2efb5a36ca | |||
| d1ac38171c | |||
| 1a7dace57e | |||
| 0870295a7c | |||
| 5e3cf28642 | |||
| 23398f0198 | |||
| e991fefb89 | |||
| d39d26f275 | |||
| 9cc2cee936 | |||
| b359a1575e | |||
| 8f4261e9d4 | |||
| 565319184c | |||
| 2760304d66 | |||
| 9bd3d78374 | |||
| 1c5de9721a | |||
| 7bcb2ad4f1 | |||
| 89e734de6b | |||
| cc4de1d1f9 | |||
| 71995d52b3 | |||
| a178a2170b | |||
| 3c1c13b660 | |||
| 0369ec9adf | |||
| c828e481fb | |||
| e3ba11bead | |||
| beeac18eb1 | |||
| 470574517a | |||
| c5ef96272f | |||
| 1c7c8c682c | |||
| ded6754de4 | |||
| 05aff1e097 | |||
| 7959d95db0 | |||
| 6fe0a229e2 | |||
| 9f45fea31e | |||
| e5e401c640 | |||
| 6c874feb7b | |||
| 03710c9d8e | |||
| cb698dd37d | |||
| b36422083e | |||
| 5765b7895c | |||
| 4aa680d6d3 | |||
| 60ca8acd0a | |||
| 352db3a183 | |||
| 4a099c3658 | |||
| 23a08a483e | |||
| f33cec64aa | |||
| e401d5c48e | |||
| 9360e4e2c1 | |||
| 7b6b87ec5b | |||
| b90ac7bd31 | |||
| a84e98ba6c | |||
| 232378ed2d | |||
| 3baba7ffe8 | |||
| 45b0dc63cd | |||
| fff06d24da | |||
| 6c56fe2670 | |||
| dbe1c9c6e6 | |||
| d8e1a77da5 | |||
| 6bd63de8d0 | |||
| ac204a11f7 | |||
| 4ab28fffb4 | |||
| e39e45824d | |||
| 5d831f3f18 | |||
| 1d0767022d | |||
| 2545f62565 | |||
| 2565c01158 | |||
| 133e6f097d | |||
| b62c86572e | |||
| c82d9cb89a | |||
| 1269ce8a6f | |||
| a41ed986bd | |||
| c4eaf0076d | |||
| e5708a8f36 | |||
| 2015828fc6 | |||
| 4c1af4cc90 | |||
| ecc00357b4 | |||
| a3e7664dcf | |||
| ffadeeeb84 | |||
| f516f4099b | |||
| d6708de7b0 | |||
| a113d3326b | |||
| fe607323aa | |||
| 131672f199 | |||
| 9b6a005819 | |||
| 399894ac90 | |||
| 89d5b3df44 | |||
| 6ebe76cba7 | |||
| 1aa8a4ff90 | |||
| fcf3a04825 | |||
| 5751776a73 | |||
| b6c8d343dc | |||
| b663724293 | |||
| bb33033389 | |||
| a44815e939 | |||
| 30db611e92 | |||
| 6c518008a5 | |||
| 8719858655 | |||
| 0e2845ec26 | |||
| c4041043f5 | |||
| 7ad17386f6 | |||
| f4abc05d62 | |||
| 8a55c60e47 | |||
| 03815ec4fe | |||
| 9a0accddb8 | |||
| dcf52c132f | |||
| f92ee46d86 | |||
| 2a9ffcc0a1 | |||
| b4e586f272 | |||
| cf201e0794 | |||
| 1161df0ee4 | |||
| 715a46277e | |||
| 5ef777219a | |||
| ac79d22a9b | |||
| 0a6694708d | |||
| 52f91bc652 | |||
| 8812213c01 | |||
| ca8329c330 | |||
| dec9f24673 | |||
| 1e65817d05 | |||
| a599fd1095 | |||
| 3bf9ea1a4b | |||
| bb743e8c6e | |||
| d533183b7f | |||
| f903686060 | |||
| f21e520c9c | |||
| 1c5cf90a52 | |||
| d1537bfd61 | |||
| 9b0dd543e0 | |||
| 9011b936cf | |||
| 93d3212914 | |||
| 63a1bf373c | |||
| 899afcbdca | |||
| 7f1068ef96 | |||
| 1c45a882f7 | |||
| 581bd0eb02 | |||
| 63432724c7 | |||
| 223091f44c | |||
| d4ccca81db | |||
| 2ad3eb1d57 | |||
| 640fc4d0a0 | |||
| 657b527bc6 | |||
| 74fc4b1a03 | |||
| e91eabdb09 | |||
| a3a9416b33 | |||
| 815a064abe | |||
| 929ff45568 | |||
| c96304c83f | |||
| 8453ff837b | |||
| 4badff1c2f | |||
| 68f664afa4 | |||
| fbf1f32807 | |||
| ac95a2e27c | |||
| 45823a36eb | |||
| 37f523fdeb | |||
| 646f1f06c4 | |||
| d7b6505f64 | |||
| dc8a86557e | |||
| d289085ce3 | |||
| 06f16f199a | |||
| afb254b985 | |||
| d2cb628a66 | |||
| fcab72f915 | |||
| caa375412b | |||
| 88089f22f3 | |||
| 44f7f8a997 | |||
| c74230a9ea | |||
| d17c519f88 | |||
| f6f9a3d925 | |||
| 09e6f42f2e | |||
| 3cdac3e11e | |||
| 8a8948780e | |||
| 49e17044c9 | |||
| 15ee280632 | |||
| 45c964c1e6 | |||
| bafa13f207 | |||
| bdc5686e4c | |||
| ed96bc6441 | |||
| 6719c3a1cd | |||
| 85ef9d8f2e | |||
| b3f75b91ff | |||
| 84d0d21f23 | |||
| 71b86bf4d0 | |||
| fd663024ea | |||
| 6d3c66a179 | |||
| 68124599e1 | |||
| b2545e053a | |||
| 109d00cb14 | |||
| 551944e15b | |||
| 0a34a35403 | |||
| 802ca161d3 | |||
| a8dd4127f3 | |||
| 0e04ae561e | |||
| 7b37caa96c | |||
| abf481023b | |||
| c2c141f941 | |||
| b52cd8f605 | |||
| 5fd441969d | |||
| 14aa29d18b | |||
| 4c9d2e719e | |||
| 66f3434571 | |||
| d58b7b509e | |||
| c21baf0d92 | |||
| 46650b5fb1 | |||
| 51f3129c5d | |||
| ccdf7ff335 | |||
| 67dda62867 | |||
| 7e2531fe35 | |||
| 38df0760cc | |||
| d64f27bad1 | |||
| 2b6e7c8632 | |||
| b54d96205f | |||
| 1da0176cad | |||
| aed0fee2ca | |||
| b4975619ed | |||
| 736d5920c7 | |||
| cdc3754449 | |||
| 2488d361b6 | |||
| c772de702b | |||
| 434a3a276d | |||
| 8e51e6d1df | |||
| fd3e2fda00 | |||
| 8f1d81df0f | |||
| 3d1a05d588 | |||
| 98a2e16d4d | |||
| b5aaf33058 | |||
| aaf0d8b839 | |||
| 00e71faed6 | |||
| 6a24dd8945 | |||
| b8c3b8277c | |||
| 8f3e91ae83 | |||
| 23a764190e | |||
| bc6b16beb2 | |||
| 668ba870e4 | |||
| 7eaeffc8d9 | |||
| f38ced15e7 | |||
| b6ca524bdd | |||
| f9bab14fdb | |||
| c6828070dc | |||
| fb9a437f8a | |||
| cba412cc31 | |||
| 9569d6a802 | |||
| dd59350485 | |||
| 7e58838895 | |||
| 13f97471a2 | |||
| bb73a8089a | |||
| 9bea64b5e4 | |||
| 9047025ab7 | |||
| c2bc3d22a1 | |||
| 60bfee4a7d | |||
| c5b0a1f005 | |||
| 2532c396ed | |||
| 71fe0bff95 | |||
| 89278953ae | |||
| 3e6ee028e5 | |||
| 6f5a4a9351 | |||
| 5325d8d2ba | |||
| 81738bfa98 | |||
| e48b9a6da1 | |||
| c6dd41495b | |||
| 2ce28f75ad | |||
| 24dae29a03 | |||
| 2c0a533948 | |||
| 8e1e1ef970 | |||
| b573ff3e7a | |||
| c37f61d31f | |||
| e0e68aad54 | |||
| 2f943aaff0 | |||
| ed4ca6a7f3 | |||
| f4f6f665f7 | |||
| dcde99bbb8 | |||
| 364fbbd283 | |||
| 95f9a6171b | |||
| f4d6bad607 | |||
| a76fcaba3e | |||
| 4fba09794f | |||
| 5049137715 | |||
| 4fb6f4af75 | |||
| 95282edaf9 | |||
| 96e5e0dfb2 | |||
| 75882f3254 | |||
| 442abaab72 | |||
| 5967c1ba1a | |||
| be8d5a7ae2 | |||
| 9909068714 | |||
| e28f754fbe | |||
| 45670fbf2d | |||
| 2f367a905e | |||
| 7a566a07ea | |||
| fe9181c1b4 | |||
| 3e25760950 | |||
| 8527dbc6e2 | |||
| 07d82a91c5 | |||
| d4e2c331b1 | |||
| a1d9987e7c | |||
| 664fbb87f5 | |||
| ca1f2f9078 | |||
| 8b0574a217 | |||
| 0cbb3878c9 | |||
| 2b9d81c9bc | |||
| 45b1e3c72c | |||
| e5834210d3 | |||
| 1cc838cef4 | |||
| bae423be41 | |||
| ff6d5c8ddb | |||
| aba69146f2 | |||
| 3c76b5cc8e | |||
| 811e241f22 | |||
| bc9194690c | |||
| f7e48c95cd | |||
| 1afd56dbf6 | |||
| f9b79403d1 | |||
| 01e28263be | |||
| 75038baf71 | |||
| fe3256be9f | |||
| 0872365938 | |||
| 755ed388b2 | |||
| 5c2983f510 | |||
| f0ab4723b9 | |||
| b7f2059dc3 | |||
| ef9f67749a | |||
| 19651cfaad | |||
| 8dc3057fe5 | |||
| 915b0780d6 | |||
| 55bf595cae | |||
| 955d4d3d1a | |||
| 8a30a2408c | |||
| 3e6f0d7372 | |||
| 0d096b43c2 | |||
| b084552808 | |||
| 7ad1370193 | |||
| 1ed72b7812 | |||
| c4a7c702b4 | |||
| af3926af4b | |||
| c8ed231eca | |||
| ca22a87949 | |||
| c938d71d15 | |||
| 0b108c2087 | |||
| dfe797060a | |||
| 408f5aedb8 | |||
| 81908f7960 | |||
| e09f5179e6 | |||
| ab36fbf24a | |||
| 2a5ce96047 | |||
| 01b3c97c42 | |||
| 8df56c5843 | |||
| c514431e79 | |||
| bcc4418ff0 | |||
| 2ff5fa73e9 | |||
| 742206c1f2 | |||
| 4e6253b546 | |||
| 5902cc6d9b | |||
| 3f6a08535f | |||
| 0f10c44578 | |||
| b64fe4dfed | |||
| 58e4efbba8 | |||
| 4e1c7a9f46 | |||
| ead339fa96 | |||
| 24839c7cfb | |||
| 84ab4ce007 | |||
| 0cb748f30b | |||
| 209445ccde | |||
| 478f4de7ae | |||
| ef8318f5e3 | |||
| 34f5532fad | |||
| d84a015725 | |||
| 48a7cd3c87 | |||
| 82cdd88ffe | |||
| 0726491ef8 | |||
| eb47cc5e93 | |||
| 4604271c6a | |||
| 0a8cb60eee | |||
| 2375464213 | |||
| d96b422809 | |||
| 0f5aab3a1c | |||
| b530b584b5 | |||
| e300d268f9 | |||
| ccb083af52 | |||
| c7476f0aa5 | |||
| f3df64210b | |||
| 7035435948 | |||
| 0c63c7c907 | |||
| 2b1ec5d8d2 | |||
| a474511356 | |||
| 6037adcace | |||
| 83f0c771d5 | |||
| 44a6b86d68 | |||
| 02d6402f4f | |||
| ccdf2a3a9e | |||
| aaab355df7 | |||
| d93b8f6544 | |||
| 36e434099d | |||
| bf008234e2 | |||
| 16c0f92f18 | |||
| a5af604b2d | |||
| 4f40b4a961 | |||
| 043eb5882b | |||
| 00a0461c7a | |||
| cdf8ea7e30 | |||
| 9619e5cbf8 | |||
| 4e68524871 | |||
| 52d0e86cc6 | |||
| cdd35d4b09 | |||
| 70965f20d5 | |||
| 67206a5415 | |||
| 9081defd46 | |||
| 090c790e50 | |||
| 6be1be4573 | |||
| c49ce58f02 | |||
| b2215cf017 | |||
| b7b718a545 | |||
| 0f309b9b16 | |||
| edb54c6cb1 | |||
| 5663c81803 | |||
| 56ff944def | |||
| 62ccec0ac5 | |||
| 421e5d4829 | |||
| e831bf02c5 | |||
| 97a7875648 | |||
| 4407533a41 | |||
| 3431d58586 | |||
| 005bc4c414 | |||
| ed9c10a3e6 | |||
| c8e427ad23 | |||
| 2884b88101 | |||
| aebcd9b551 | |||
| 96db787657 | |||
| e818dc27cd | |||
| bc332018f6 | |||
| 731ab15d57 | |||
| 88a6f16c9a | |||
| 65b299c6cf | |||
| f3ce3a6f74 | |||
| 4bf7b00013 | |||
| 1d23e15692 | |||
| a0d2b64747 | |||
| f4f208c4ae | |||
| 721768bdb0 | |||
| f2c0981c57 | |||
| 05dfbf3cd4 | |||
| 18ab694f70 | |||
| 677f420bf0 | |||
| b845f3886a | |||
| d20efde49d | |||
| 01b7509a39 | |||
| 407c014eb4 | |||
| 5e6eb0b847 | |||
| 3e3e41eaba | |||
| f21aa0352b | |||
| 6cc27e9797 | |||
| 1866be0475 | |||
| eb7820b2b0 | |||
| b7f275efb3 | |||
| 186e52c4d8 | |||
| a3c56d9052 | |||
| 8d3381b490 | |||
| 9821725c6b | |||
| 3d22709808 | |||
| a0a840101c | |||
| 5d1d590692 | |||
| dfa11e22cf | |||
| c256b26629 | |||
| 12e7be63f7 | |||
| 477653a0d6 | |||
| 04a1bb1390 | |||
| bbc09288bd | |||
| b76dc06297 | |||
| 33ed142306 | |||
| 49f9bff260 | |||
| 22da9087b1 | |||
| a6cd6eedbe | |||
| 7bd33e4406 | |||
| 5d4aada526 | |||
| 551597d579 | |||
| 4bce0f27e6 | |||
| 320732ae6b | |||
| d7b4b9e485 | |||
| f5815b781a | |||
| 10b5e2e73a | |||
| 57fef97433 | |||
| 03278a74bf | |||
| 9fe153ae29 | |||
| 2f966531a7 | |||
| 4c8bebc0d7 | |||
| 24b6dcf29f | |||
| 22b179e66c | |||
| 9ed29725a0 | |||
| 59bb759855 | |||
| 75c6fd047b | |||
| d3db690c42 | |||
| abdd57db0b | |||
| 227496bea7 | |||
| 068fc48fda | |||
| af39344e99 | |||
| 92b7e63bb5 | |||
| b74be185c2 | |||
| ad8a46d261 | |||
| 10626ad6f8 | |||
| f5db106eb6 | |||
| 521ed1cef0 | |||
| de13fca3b1 | |||
| b59ca95a16 | |||
| 6631fc4c6d | |||
| 23208357c1 | |||
| 9f3351cf7b | |||
| 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 |
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
blank_issues_enabled: false
|
||||||
12
.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/raylib) or [raylib reddit](https://www.reddit.com/r/raylib/).
|
||||||
|
|
||||||
|
Remember that asking for support questions here actively takes developer time away from improving raylib.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
Please, before submitting a new issue verify and check:
|
Please, before submitting a new issue verify and check:
|
||||||
|
|
||||||
- [ ] I tested it on latest raylib version from master branch
|
- [ ] I tested it on latest raylib version from master branch
|
||||||
@ -15,7 +25,7 @@ Please, before submitting a new issue verify and check:
|
|||||||
|
|
||||||
### Issue description
|
### Issue description
|
||||||
|
|
||||||
*Briefly describe the issue you are experiencing (or the feature you want to see added to raylib). Tell us what you were trying to do and what happened instead. Remember, this is not the best place to ask questions. For questions, go to [raylib Discord server](https://discord.gg/VkzNHUE).*
|
*Briefly describe the issue you are experiencing (or the feature you want to see added to raylib). Tell us what you were trying to do and what happened instead. Remember, this is not the best place to ask questions. For questions, go to [raylib Discord server](https://discord.gg/raylib).*
|
||||||
|
|
||||||
### Environment
|
### Environment
|
||||||
|
|
||||||
|
|||||||
100
.github/workflows/android.yml
vendored
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
name: Android
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/android.yml'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/android.yml'
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
permissions:
|
||||||
|
contents: write # for actions/upload-release-asset to upload release asset
|
||||||
|
runs-on: windows-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
max-parallel: 1
|
||||||
|
matrix:
|
||||||
|
ARCH: ["arm64", "x86_64"]
|
||||||
|
|
||||||
|
env:
|
||||||
|
RELEASE_NAME: raylib-dev_android_api29_${{ matrix.ARCH }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Setup Release Version
|
||||||
|
run: |
|
||||||
|
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_android_api29_${{ matrix.ARCH }}" >> $GITHUB_ENV
|
||||||
|
shell: bash
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
|
|
||||||
|
- name: Setup Android NDK
|
||||||
|
id: setup-ndk
|
||||||
|
uses: nttld/setup-ndk@v1
|
||||||
|
with:
|
||||||
|
ndk-version: r25
|
||||||
|
add-to-path: false
|
||||||
|
env:
|
||||||
|
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
mkdir ${{ env.RELEASE_NAME }}
|
||||||
|
cd ${{ env.RELEASE_NAME }}
|
||||||
|
mkdir include
|
||||||
|
mkdir lib
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
# Generating static + shared library for 64bit arquitectures and API version 29
|
||||||
|
- name: Build Library
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=${{ matrix.ARCH }} ANDROID_API_VERSION=29 ANDROID_NDK=${{ env.ANDROID_NDK_HOME }} RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
|
||||||
|
make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=${{ matrix.ARCH }} ANDROID_API_VERSION=29 ANDROID_NDK=${{ env.ANDROID_NDK_HOME }} RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||||
|
cd ..
|
||||||
|
shell: cmd
|
||||||
|
|
||||||
|
- name: Generate Artifacts
|
||||||
|
run: |
|
||||||
|
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./src/raymath.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./src/rlgl.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./CHANGELOG ./build/${{ env.RELEASE_NAME }}/CHANGELOG
|
||||||
|
cp -v ./README.md ./build/${{ env.RELEASE_NAME }}/README.md
|
||||||
|
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
|
||||||
|
cd build
|
||||||
|
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
|
||||||
|
|
||||||
|
- name: Upload Artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
|
||||||
|
- name: Upload Artifact to Release
|
||||||
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ github.event.release.upload_url }}
|
||||||
|
asset_path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
asset_name: ${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
asset_content_type: application/gzip
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
|
|
||||||
30
.github/workflows/cd_src_release.yml
vendored
@ -1,30 +0,0 @@
|
|||||||
name: CD - Source Build & Release - Linux
|
|
||||||
|
|
||||||
# Trigger the workflow on release publish
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@master
|
|
||||||
|
|
||||||
# TODO: Build project and zip generated files
|
|
||||||
- name: Build project
|
|
||||||
id: build_project
|
|
||||||
run: |
|
|
||||||
zip raylib.zip README.md
|
|
||||||
|
|
||||||
- name: Upload Release Asset
|
|
||||||
id: upload-release-asset
|
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
|
||||||
asset_path: ./raylib.zip
|
|
||||||
asset_name: raylib.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
18
.github/workflows/ci_src_examples_linux.yml
vendored
@ -1,18 +0,0 @@
|
|||||||
name: CI - Source & Examples - Linux
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@master
|
|
||||||
- name: apt-update
|
|
||||||
run: sudo apt-get update -qq
|
|
||||||
- name: apt get glfw
|
|
||||||
run: sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
|
|
||||||
- name: make src
|
|
||||||
run: cd src && make PLATFORM=PLATFORM_DESKTOP
|
|
||||||
- name: make examples
|
|
||||||
run: cd examples && make PLATFORM=PLATFORM_DESKTOP
|
|
||||||
13
.github/workflows/ci_src_examples_macos.yml
vendored
@ -1,13 +0,0 @@
|
|||||||
name: CI - Source & Examples - macOS
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- name: make src
|
|
||||||
run: cd src && make PLATFORM=PLATFORM_DESKTOP
|
|
||||||
- name: make examples
|
|
||||||
run: cd examples && make PLATFORM=PLATFORM_DESKTOP
|
|
||||||
64
.github/workflows/ci_src_examples_win.yml
vendored
@ -1,64 +0,0 @@
|
|||||||
name: CI - Source & Examples - Windows
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: windows-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
max-parallel: 1
|
|
||||||
matrix:
|
|
||||||
compiler: [mingw, msvc16]
|
|
||||||
bits: [32, 64]
|
|
||||||
include:
|
|
||||||
- compiler: mingw
|
|
||||||
bits: 32
|
|
||||||
CFLAGS: -m32
|
|
||||||
GENERATOR: "MinGW Makefiles"
|
|
||||||
- compiler: mingw
|
|
||||||
bits: 64
|
|
||||||
CFLAGS: -m64
|
|
||||||
GENERATOR: "MinGW Makefiles"
|
|
||||||
- compiler: msvc16
|
|
||||||
bits: 32
|
|
||||||
GENERATOR: "Visual Studio 16 2019"
|
|
||||||
ARCH: "-A Win32"
|
|
||||||
- compiler: msvc16
|
|
||||||
bits: 64
|
|
||||||
GENERATOR: "Visual Studio 16 2019"
|
|
||||||
ARCH: "-A x64"
|
|
||||||
|
|
||||||
env:
|
|
||||||
CFLAGS: ${{ matrix.CFLAGS }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@master
|
|
||||||
|
|
||||||
- name: Setup Environment
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
|
|
||||||
# Trying to solve an issue with CMake and Chocolatey for MinGW
|
|
||||||
- run: cmake -E remove c:\ProgramData\chocolatey\bin\cpack.exe
|
|
||||||
if: matrix.compiler == 'mingw'
|
|
||||||
|
|
||||||
# Setup MSBuild.exe path if required
|
|
||||||
- uses: warrenbuckley/Setup-MSBuild@v1
|
|
||||||
if: matrix.compiler == 'msvc16'
|
|
||||||
|
|
||||||
- name: Build MinGW Project
|
|
||||||
run: |
|
|
||||||
cd ../raylib/src
|
|
||||||
make PLATFORM=PLATFORM_DESKTOP CC=gcc
|
|
||||||
if: matrix.compiler == 'mingw'
|
|
||||||
|
|
||||||
- name: Setup CMake Project
|
|
||||||
run: cmake -G "${{ matrix.GENERATOR }}" ${{ matrix.ARCH }} -DCMAKE_SH="CMAKE_SH-NOTFOUND" -DSTATIC=ON -DSHARED=ON -DBUILD_EXAMPLES=ON -DBUILD_GAMES=OFF -DINCLUDE_EVERYTHING=ON ../raylib
|
|
||||||
if: matrix.compiler == 'msvc16'
|
|
||||||
|
|
||||||
- name: Build raylib Source & Examples
|
|
||||||
run: cmake --build . --target install
|
|
||||||
if: matrix.compiler == 'msvc16'
|
|
||||||
111
.github/workflows/cmake.yml
vendored
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
name: CMakeBuilds
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/cmake.yml'
|
||||||
|
- 'CMakeList.txt'
|
||||||
|
- 'CMakeOptions.txt'
|
||||||
|
- 'cmake/**'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/cmake.yml'
|
||||||
|
- 'CMakeList.txt'
|
||||||
|
- 'CMakeOptions.txt'
|
||||||
|
- 'cmake/**'
|
||||||
|
|
||||||
|
env:
|
||||||
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||||
|
BUILD_TYPE: Release
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_windows:
|
||||||
|
name: Windows Build
|
||||||
|
# The CMake configure and build commands are platform agnostic and should work equally
|
||||||
|
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||||
|
# cross-platform coverage.
|
||||||
|
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Create Build Environment
|
||||||
|
# Some projects don't allow in-source building, so create a separate build directory
|
||||||
|
# We'll use this as our working directory for all subsequent commands
|
||||||
|
run: cmake -E make_directory ${{github.workspace}}/build
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
# Use a bash shell so we can use the same syntax for environment variable
|
||||||
|
# access regardless of the host operating system
|
||||||
|
shell: powershell
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
# Note the current convention is to use the -S and -B options here to specify source
|
||||||
|
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||||
|
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||||
|
run: cmake $env:GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$env:BUILD_TYPE -DPLATFORM=Desktop
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
shell: powershell
|
||||||
|
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||||
|
run: cmake --build . --config $env:BUILD_TYPE
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
shell: powershell
|
||||||
|
# Execute tests defined by the CMake configuration.
|
||||||
|
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||||
|
run: ctest -C $env:BUILD_TYPE
|
||||||
|
|
||||||
|
build_linux:
|
||||||
|
name: Linux Build
|
||||||
|
# The CMake configure and build commands are platform agnostic and should work equally
|
||||||
|
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||||
|
# cross-platform coverage.
|
||||||
|
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Create Build Environment
|
||||||
|
# Some projects don't allow in-source building, so create a separate build directory
|
||||||
|
# We'll use this as our working directory for all subsequent commands
|
||||||
|
run: cmake -E make_directory ${{github.workspace}}/build
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install gcc-multilib
|
||||||
|
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
|
||||||
|
- name: Configure CMake
|
||||||
|
# Use a bash shell so we can use the same syntax for environment variable
|
||||||
|
# access regardless of the host operating system
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
# Note the current convention is to use the -S and -B options here to specify source
|
||||||
|
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||||
|
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||||
|
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPLATFORM=Desktop
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
shell: bash
|
||||||
|
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||||
|
run: cmake --build . --config $BUILD_TYPE
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
shell: bash
|
||||||
|
# Execute tests defined by the CMake configuration.
|
||||||
|
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||||
|
run: ctest -C $BUILD_TYPE
|
||||||
111
.github/workflows/linux.yml
vendored
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
name: Linux
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/linux.yml'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/linux.yml'
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
permissions:
|
||||||
|
contents: write # for actions/upload-release-asset to upload release asset
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
max-parallel: 1
|
||||||
|
matrix:
|
||||||
|
bits: [32, 64]
|
||||||
|
include:
|
||||||
|
- bits: 32
|
||||||
|
ARCH: "i386"
|
||||||
|
ARCH_NAME: "i386"
|
||||||
|
COMPILER_PATH: "/user/bin"
|
||||||
|
- bits: 64
|
||||||
|
ARCH: "x86_64"
|
||||||
|
ARCH_NAME: "amd64"
|
||||||
|
COMPILER_PATH: "/user/bin"
|
||||||
|
|
||||||
|
env:
|
||||||
|
RELEASE_NAME: raylib-dev_linux_${{ matrix.ARCH_NAME }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Setup Release Version
|
||||||
|
run: |
|
||||||
|
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_linux_${{ matrix.ARCH_NAME }}" >> $GITHUB_ENV
|
||||||
|
shell: bash
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install gcc-multilib
|
||||||
|
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
mkdir ${{ env.RELEASE_NAME }}
|
||||||
|
cd ${{ env.RELEASE_NAME }}
|
||||||
|
mkdir include
|
||||||
|
mkdir lib
|
||||||
|
cd ../../../raylib
|
||||||
|
# ${{ matrix.ARCH }}-linux-gnu-gcc -v
|
||||||
|
|
||||||
|
# TODO: Support 32bit (i386) static/shared library building
|
||||||
|
- name: Build Library
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CUSTOM_CFLAGS="-m32" -B
|
||||||
|
# make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||||
|
cd ..
|
||||||
|
if: matrix.bits == 32
|
||||||
|
|
||||||
|
- name: Build Library
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||||
|
cd ..
|
||||||
|
if: matrix.bits == 64
|
||||||
|
|
||||||
|
- name: Generate Artifacts
|
||||||
|
run: |
|
||||||
|
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./src/raymath.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./src/rlgl.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./CHANGELOG ./build/${{ env.RELEASE_NAME }}/CHANGELOG
|
||||||
|
cp -v ./README.md ./build/${{ env.RELEASE_NAME }}/README.md
|
||||||
|
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
|
||||||
|
cd build
|
||||||
|
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
|
||||||
|
|
||||||
|
- name: Upload Artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
|
||||||
|
- name: Upload Artifact to Release
|
||||||
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ github.event.release.upload_url }}
|
||||||
|
asset_path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
asset_name: ${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
asset_content_type: application/gzip
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
42
.github/workflows/linux_examples.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
name: Linux Examples
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/linux_examples.yml'
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/linux_examples.yml'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
|
||||||
|
|
||||||
|
- name: Build Library
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Build Examples
|
||||||
|
run: |
|
||||||
|
cd examples
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP -B
|
||||||
|
cd ..
|
||||||
116
.github/workflows/macos.yml
vendored
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
name: macOS
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/macos.yml'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/macos.yml'
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
permissions:
|
||||||
|
contents: write # for actions/upload-release-asset to upload release asset
|
||||||
|
runs-on: macos-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
RELEASE_NAME: raylib-dev_macos
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Setup Release Version
|
||||||
|
run: |
|
||||||
|
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_macos" >> $GITHUB_ENV
|
||||||
|
shell: bash
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
mkdir ${{ env.RELEASE_NAME }}
|
||||||
|
cd ${{ env.RELEASE_NAME }}
|
||||||
|
mkdir include
|
||||||
|
mkdir lib
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
# Generating static + shared library, note that i386 architecture is deprecated
|
||||||
|
# Defining GL_SILENCE_DEPRECATION because OpenGL is deprecated on macOS
|
||||||
|
- name: Build Library
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
clang --version
|
||||||
|
|
||||||
|
# Extract version numbers from Makefile
|
||||||
|
brew install grep
|
||||||
|
RAYLIB_API_VERSION=`ggrep -Po 'RAYLIB_API_VERSION\s*=\s\K(.*)' Makefile`
|
||||||
|
RAYLIB_VERSION=`ggrep -Po 'RAYLIB_VERSION\s*=\s\K(.*)' Makefile`
|
||||||
|
|
||||||
|
# Build raylib x86_64 static
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC CUSTOM_CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION"
|
||||||
|
mv libraylib.a /tmp/libraylib_x86_64.a
|
||||||
|
make clean
|
||||||
|
|
||||||
|
# Build raylib arm64 static
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC CUSTOM_CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" -B
|
||||||
|
mv libraylib.a /tmp/libraylib_arm64.a
|
||||||
|
make clean
|
||||||
|
|
||||||
|
# Join x86_64 and arm64 static
|
||||||
|
lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.a /tmp/libraylib_x86_64.a /tmp/libraylib_arm64.a
|
||||||
|
|
||||||
|
# Build raylib x86_64 dynamic
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED CUSTOM_CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" CUSTOM_LDFLAGS="-target x86_64-apple-macos10.12" -B
|
||||||
|
mv libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_x86_64.${RAYLIB_VERSION}.dylib
|
||||||
|
make clean
|
||||||
|
|
||||||
|
# Build raylib arm64 dynamic
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED CUSTOM_CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" CUSTOM_LDFLAGS="-target arm64-apple-macos11" -B
|
||||||
|
mv libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_arm64.${RAYLIB_VERSION}.dylib
|
||||||
|
|
||||||
|
# Join x86_64 and arm64 dynamic
|
||||||
|
lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_x86_64.${RAYLIB_VERSION}.dylib /tmp/libraylib_arm64.${RAYLIB_VERSION}.dylib
|
||||||
|
ln -sv libraylib.${RAYLIB_VERSION}.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.dylib
|
||||||
|
ln -sv libraylib.${RAYLIB_VERSION}.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.${RAYLIB_API_VERSION}.dylib
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Generate Artifacts
|
||||||
|
run: |
|
||||||
|
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./src/raymath.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./src/rlgl.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./CHANGELOG ./build/${{ env.RELEASE_NAME }}/CHANGELOG
|
||||||
|
cp -v ./README.md ./build/${{ env.RELEASE_NAME }}/README.md
|
||||||
|
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
|
||||||
|
cd build
|
||||||
|
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
|
||||||
|
|
||||||
|
- name: Upload Artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
|
||||||
|
- name: Upload Artifact to Release
|
||||||
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ github.event.release.upload_url }}
|
||||||
|
asset_path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
asset_name: ${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
asset_content_type: application/gzip
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
86
.github/workflows/webassembly.yml
vendored
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
name: WebAssembly
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/webassembly.yml'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/webassembly.yml'
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
RELEASE_NAME: raylib-dev_webassembly
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Setup emsdk
|
||||||
|
uses: mymindstorm/setup-emsdk@v11
|
||||||
|
with:
|
||||||
|
version: 3.0.0
|
||||||
|
actions-cache-folder: 'emsdk-cache'
|
||||||
|
|
||||||
|
- name: Setup Release Version
|
||||||
|
run: |
|
||||||
|
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_webassembly" >> $GITHUB_ENV
|
||||||
|
shell: bash
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
mkdir ${{ env.RELEASE_NAME }}
|
||||||
|
cd ${{ env.RELEASE_NAME }}
|
||||||
|
mkdir include
|
||||||
|
mkdir lib
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
- name: Build Library
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
emcc -v
|
||||||
|
make PLATFORM=PLATFORM_WEB EMSDK_PATH="D:/a/raylib/raylib/emsdk-cache/emsdk-main" RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Generate Artifacts
|
||||||
|
run: |
|
||||||
|
copy /Y .\src\raylib.h .\build\${{ env.RELEASE_NAME }}\include\raylib.h
|
||||||
|
copy /Y .\src\raymath.h .\build\${{ env.RELEASE_NAME }}\include\raymath.h
|
||||||
|
copy /Y .\src\rlgl.h .\build\${{ env.RELEASE_NAME }}\include\rlgl.h
|
||||||
|
copy /Y .\CHANGELOG .\build/${{ env.RELEASE_NAME }}\CHANGELOG
|
||||||
|
copy /Y .\README.md .\build\${{ env.RELEASE_NAME }}\README.md
|
||||||
|
copy /Y .\LICENSE .\build\${{ env.RELEASE_NAME }}\LICENSE
|
||||||
|
cd build
|
||||||
|
7z a ./${{ env.RELEASE_NAME }}.zip ./${{ env.RELEASE_NAME }}
|
||||||
|
dir
|
||||||
|
shell: cmd
|
||||||
|
|
||||||
|
- name: Upload Artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.RELEASE_NAME }}.zip
|
||||||
|
path: ./build/${{ env.RELEASE_NAME }}.zip
|
||||||
|
|
||||||
|
- name: Upload Artifact to Release
|
||||||
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ github.event.release.upload_url }}
|
||||||
|
asset_path: ./build/${{ env.RELEASE_NAME }}.zip
|
||||||
|
asset_name: ${{ env.RELEASE_NAME }}.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
135
.github/workflows/windows.yml
vendored
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
name: Windows
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/windows.yml'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/windows.yml'
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
permissions:
|
||||||
|
contents: write # for actions/upload-release-asset to upload release asset
|
||||||
|
runs-on: windows-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
max-parallel: 1
|
||||||
|
matrix:
|
||||||
|
compiler: [mingw-w64, msvc16]
|
||||||
|
bits: [32, 64]
|
||||||
|
include:
|
||||||
|
- compiler: mingw-w64
|
||||||
|
bits: 32
|
||||||
|
ARCH: "i686"
|
||||||
|
COMPILER_PATH: "C:\\msys64\\mingw32\\bin"
|
||||||
|
WINDRES_ARCH: pe-i386
|
||||||
|
- compiler: mingw-w64
|
||||||
|
bits: 64
|
||||||
|
ARCH: "x86_64"
|
||||||
|
COMPILER_PATH: "C:\\msys64\\mingw64\\bin"
|
||||||
|
WINDRES_ARCH: pe-x86-64
|
||||||
|
- compiler: msvc16
|
||||||
|
bits: 32
|
||||||
|
ARCH: "x86"
|
||||||
|
VSARCHPATH: "Win32"
|
||||||
|
- compiler: msvc16
|
||||||
|
bits: 64
|
||||||
|
ARCH: "x64"
|
||||||
|
VSARCHPATH: "x64"
|
||||||
|
|
||||||
|
env:
|
||||||
|
RELEASE_NAME: raylib-dev_win${{ matrix.bits }}_${{ matrix.compiler }}
|
||||||
|
GNUTARGET: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Setup Release Version
|
||||||
|
run: |
|
||||||
|
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_win${{ matrix.bits }}_${{ matrix.compiler }}" >> $GITHUB_ENV
|
||||||
|
shell: bash
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
dir
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
mkdir ${{ env.RELEASE_NAME }}
|
||||||
|
cd ${{ env.RELEASE_NAME }}
|
||||||
|
mkdir include
|
||||||
|
mkdir lib
|
||||||
|
cd ../../../raylib
|
||||||
|
|
||||||
|
# Setup MSBuild.exe path if required
|
||||||
|
- name: Setup MSBuild
|
||||||
|
uses: microsoft/setup-msbuild@v1.0.2
|
||||||
|
if: matrix.compiler == 'msvc16'
|
||||||
|
|
||||||
|
- name: Build Library (MinGW-w64)
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
set PATH=%PATH%;${{ matrix.COMPILER_PATH }}
|
||||||
|
${{ matrix.ARCH }}-w64-mingw32-gcc.exe --version
|
||||||
|
${{ matrix.COMPILER_PATH }}/windres.exe --version
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP CC=${{ matrix.ARCH }}-w64-mingw32-gcc.exe RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
|
||||||
|
${{ matrix.COMPILER_PATH }}/windres.exe -i raylib.dll.rc -o raylib.dll.rc.data -O coff --target=${{ matrix.WINDRES_ARCH }}
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP CC=${{ matrix.ARCH }}-w64-mingw32-gcc.exe RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||||
|
cd ..
|
||||||
|
shell: cmd
|
||||||
|
if: matrix.compiler == 'mingw-w64'
|
||||||
|
|
||||||
|
- name: Build Library (MSVC16)
|
||||||
|
run: |
|
||||||
|
cd projects/VS2022
|
||||||
|
msbuild.exe raylib.sln /target:raylib /property:Configuration=Release /property:Platform=${{ matrix.ARCH }}
|
||||||
|
copy /Y .\build\raylib\bin\${{ matrix.VSARCHPATH }}\Release\raylib.lib .\..\..\build\${{ env.RELEASE_NAME }}\lib\raylib.lib
|
||||||
|
msbuild.exe raylib.sln /target:raylib /property:Configuration=Release.DLL /property:Platform=${{ matrix.ARCH }}
|
||||||
|
copy /Y .\build\raylib\bin\${{ matrix.VSARCHPATH }}\Release.DLL\raylib.dll .\..\..\build\${{ env.RELEASE_NAME }}\lib\raylib.dll
|
||||||
|
copy /Y .\build\raylib\bin\${{ matrix.VSARCHPATH }}\Release.DLL\raylib.lib .\..\..\build\${{ env.RELEASE_NAME }}\lib\raylibdll.lib
|
||||||
|
cd ../..
|
||||||
|
shell: cmd
|
||||||
|
if: matrix.compiler == 'msvc16'
|
||||||
|
|
||||||
|
- name: Generate Artifacts
|
||||||
|
run: |
|
||||||
|
copy /Y .\src\raylib.h .\build\${{ env.RELEASE_NAME }}\include\raylib.h
|
||||||
|
copy /Y .\src\raymath.h .\build\${{ env.RELEASE_NAME }}\include\raymath.h
|
||||||
|
copy /Y .\src\rlgl.h .\build\${{ env.RELEASE_NAME }}\include\rlgl.h
|
||||||
|
copy /Y .\CHANGELOG .\build\${{ env.RELEASE_NAME }}\CHANGELOG
|
||||||
|
copy /Y .\README.md .\build\${{ env.RELEASE_NAME }}\README.md
|
||||||
|
copy /Y .\LICENSE .\build\${{ env.RELEASE_NAME }}\LICENSE
|
||||||
|
cd build
|
||||||
|
7z a ./${{ env.RELEASE_NAME }}.zip ./${{ env.RELEASE_NAME }}
|
||||||
|
dir
|
||||||
|
shell: cmd
|
||||||
|
|
||||||
|
- name: Upload Artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.RELEASE_NAME }}.zip
|
||||||
|
path: ./build/${{ env.RELEASE_NAME }}.zip
|
||||||
|
|
||||||
|
- name: Upload Artifact to Release
|
||||||
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ github.event.release.upload_url }}
|
||||||
|
asset_path: ./build/${{ env.RELEASE_NAME }}.zip
|
||||||
|
asset_name: ${{ env.RELEASE_NAME }}.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
36
.github/workflows/windows_examples.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: Windows Examples
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/windows_examples.yml'
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/windows_examples.yml'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Add MSBuild to PATH
|
||||||
|
uses: microsoft/setup-msbuild@v1
|
||||||
|
|
||||||
|
- name: Build Library (MSVC16)
|
||||||
|
run: |
|
||||||
|
cd projects/VS2019
|
||||||
|
msbuild.exe raylib.sln /property:Configuration=Release /property:Platform=x86
|
||||||
|
cd ../..
|
||||||
|
shell: cmd
|
||||||
|
|
||||||
76
.gitignore
vendored
@ -30,16 +30,14 @@ Thumbs.db
|
|||||||
*.cache
|
*.cache
|
||||||
*.ilk
|
*.ilk
|
||||||
*.log
|
*.log
|
||||||
|
.vs
|
||||||
|
|
||||||
[Bb]in
|
[Bb]in
|
||||||
[Dd]ebug/
|
[Dd]ebug/
|
||||||
[Dd]ebug.win32/
|
|
||||||
[Dd]ebug.DLL/
|
|
||||||
*.sbr
|
*.sbr
|
||||||
*.sdf
|
*.sdf
|
||||||
obj/
|
obj/
|
||||||
[R]elease/
|
[R]elease/
|
||||||
[Rr]elease.win32/
|
|
||||||
_ReSharper*/
|
_ReSharper*/
|
||||||
[Tt]est[Rr]esult*
|
[Tt]est[Rr]esult*
|
||||||
ipch/
|
ipch/
|
||||||
@ -47,6 +45,7 @@ ipch/
|
|||||||
*.db
|
*.db
|
||||||
*.opendb
|
*.opendb
|
||||||
packages/
|
packages/
|
||||||
|
!examples/models/resources/models/obj/
|
||||||
|
|
||||||
# Ignore compiled binaries
|
# Ignore compiled binaries
|
||||||
*.o
|
*.o
|
||||||
@ -54,33 +53,13 @@ packages/
|
|||||||
*.a
|
*.a
|
||||||
*.bc
|
*.bc
|
||||||
*.so
|
*.so
|
||||||
!raylib.rc.o
|
*.so.*
|
||||||
|
|
||||||
# Ignore all examples files
|
# Ignore wasm data in examples/
|
||||||
examples/*
|
examples/**/*.wasm
|
||||||
# Unignore all examples dirs
|
examples/**/*.data
|
||||||
!examples/*/
|
examples/**/*.js
|
||||||
# Unignore all examples files with extension
|
examples/**/*.html
|
||||||
!examples/*.c
|
|
||||||
!examples/*.lua
|
|
||||||
!examples/*.png
|
|
||||||
# Unignore examples Makefile
|
|
||||||
!examples/Makefile
|
|
||||||
!examples/Makefile.Android
|
|
||||||
!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
|
# Ignore files build by xcode
|
||||||
*.mode*v*
|
*.mode*v*
|
||||||
@ -96,45 +75,32 @@ xcschememanagement.plist
|
|||||||
xcuserdata/
|
xcuserdata/
|
||||||
DerivedData/
|
DerivedData/
|
||||||
|
|
||||||
# Visual Studio project
|
# Jetbrains project
|
||||||
project/VS2015.UWP/packages
|
.idea/
|
||||||
project/VS2017/packages
|
cmake-build-*/
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# CMake stuff
|
# CMake stuff
|
||||||
CMakeCache.txt
|
CMakeCache.txt
|
||||||
CMakeFiles
|
CMakeFiles
|
||||||
CMakeScripts
|
CMakeScripts
|
||||||
Testing
|
Testing
|
||||||
TestingIfSymlinkWorks
|
|
||||||
cmake_install.cmake
|
cmake_install.cmake
|
||||||
install_manifest.txt
|
install_manifest.txt
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
CTestTestfile.cmake
|
CTestTestfile.cmake
|
||||||
build
|
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
|
# Ignore GNU global tags
|
||||||
GPATH
|
GPATH
|
||||||
GRTAGS
|
GRTAGS
|
||||||
GTAGS
|
GTAGS
|
||||||
.vs
|
|
||||||
|
# Zig programming language
|
||||||
|
zig-cache/
|
||||||
|
zig-out/
|
||||||
|
build/
|
||||||
|
build-*/
|
||||||
|
docgen_tmp/
|
||||||
|
|
||||||
|
# Parser stuff
|
||||||
|
parser/raylib_parser
|
||||||
|
|||||||
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
|
|
||||||
194
BINDINGS.md
@ -1,64 +1,140 @@
|
|||||||
### raylib bindings
|
# raylib bindings and wrappers
|
||||||
|
|
||||||
Some people ported raylib to other languages in form of bindings or wrappers to the library, here is a list with the ones I'm aware of:
|
Some people ported raylib to other languages in form of bindings or wrappers to the library. Here is a list with all the ports available. Feel free to send a PR if you know of any binding/wrapper not in this list.
|
||||||
|
|
||||||
| name | language | repo |
|
### Language Bindings
|
||||||
|:------------------:|:--------------:|----------------------------------------------------------------------|
|
|
||||||
| raylib | C | https://github.com/raysan5/raylib |
|
| name | raylib version | language | license | repo |
|
||||||
| raylib-cpp | C++ | https://github.com/robloach/raylib-cpp |
|
|:------------------:|:---------------:|:---------:|:----------:|-----------------------------------------------------------|
|
||||||
| Raylib-cs | C# | https://github.com/ChrisDill/Raylib-cs |
|
| raylib | **4.0** | [C/C++](https://en.wikipedia.org/wiki/C_(programming_language)) | Zlib | https://github.com/raysan5/raylib |
|
||||||
| RaylibSharp | C# | https://github.com/TheLumaio/RaylibSharp |
|
| raylib-boo | 3.7 | [Boo](http://boo-language.github.io/)| MIT | https://github.com/Rabios/raylib-boo |
|
||||||
| RaylibFS | F# | https://github.com/dallinbeutler/RaylibFS |
|
| Raylib-cs | **4.0** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | Zlib | https://github.com/ChrisDill/Raylib-cs |
|
||||||
| raylib_d | D | https://github.com/0xFireball/raylib_d |
|
| Raylib-CsLo | **4.0** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MPL-2.0 | https://github.com/NotNotTech/Raylib-CsLo |
|
||||||
| raylib-d | D | https://github.com/onroundit/raylib-d |
|
| cl-raylib | **4.0** | [Common Lisp](https://common-lisp.net/) | MIT | https://github.com/longlene/cl-raylib |
|
||||||
| raylib-go | Go | https://github.com/gen2brain/raylib-go |
|
| raylib-cr | **4.0** | [Crystal](https://crystal-lang.org/) | Apache-2.0 | https://github.com/sol-vin/raylib-cr |
|
||||||
| raylib-goplus | Go | https://github.com/Lachee/raylib-goplus |
|
| dart-raylib | **4.0** | [Dart](https://dart.dev/) | MIT | https://gitlab.com/wolfenrain/dart-raylib |
|
||||||
| raylib-rs | Rust | https://github.com/deltaphc/raylib-rs |
|
| bindbc-raylib3 | **4.0** | [D](https://dlang.org/) | BSL-1.0 | https://github.com/o3o/bindbc-raylib3 |
|
||||||
| raylib-lua | Lua | https://github.com/raysan5/raylib-lua |
|
| dray | **4.0** | [D](https://dlang.org/) | Apache-2.0 | https://github.com/xdrie/dray |
|
||||||
| raylib-lua-ffi | Lua | https://github.com/raysan5/raylib/issues/693 |
|
| raylib-d | **4.0** | [D](https://dlang.org/) | Zlib | https://github.com/schveiguy/raylib-d |
|
||||||
| raylib-lua-sol | Lua | https://github.com/RobLoach/raylib-lua-sol |
|
| dlang_raylib | **4.0** | [D](https://dlang.org) | MPL-2.0 |https://github.com/rc-05/dlang_raylib |
|
||||||
| raylib-Nim | Nim | https://gitlab.com/define-private-public/raylib-Nim |
|
| rayex | 3.7 | [elixir](https://elixir-lang.org/) | Apache-2.0 | https://github.com/shiryel/rayex |
|
||||||
| raylib-nim | Nim | https://github.com/Skrylar/raylib-nim |
|
| raylib-factor | **4.0** | [Factor](https://factorcode.org/) | BSD | https://github.com/factor/factor/blob/master/extra/raylib/raylib.factor |
|
||||||
| raylib-haskell | Haskell | https://github.com/DevJac/raylib-haskell |
|
| raylib-freebasic | **4.0** | [FreeBASIC](https://www.freebasic.net/) | MIT | https://github.com/WIITD/raylib-freebasic |
|
||||||
| raylib-cr | Crystal | https://github.com/AregevDev/raylib-cr |
|
| raylib-go | **4.0** | [Go](https://golang.org/) | Zlib | https://github.com/gen2brain/raylib-go |
|
||||||
| cray | Crystal | https://gitlab.com/Zatherz/cray |
|
| raylib-guile | auto | [Guile](https://www.gnu.org/software/guile/) | Zlib | https://github.com/petelliott/raylib-guile |
|
||||||
| cray | Crystal | https://github.com/tapgg/cray |
|
| gforth-raylib | 3.5 | [Gforth](https://gforth.org/) | MIT | https://github.com/ArnautDaniel/gforth-raylib |
|
||||||
| raylib-pascal | Pascal | https://github.com/drezgames/raylib-pascal |
|
| raylib-hx | 4.0 | [Haxe](https://haxe.org/) | Zlib | https://github.com/foreignsasquatch/raylib-hx |
|
||||||
| raylib-pas | Pascal | https://github.com/tazdij/raylib-pas |
|
| hb-raylib | 3.5 | [Harbour](https://harbour.github.io) | MIT | https://github.com/MarcosLeonardoMendezGerencir/hb-raylib |
|
||||||
| Graphics-Raylib | Perl | https://github.com/athreef/Graphics-Raylib |
|
| jaylib | **4.2** | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | GPLv3+CE | https://github.com/electronstudio/jaylib/ |
|
||||||
| raylib-ruby-ffi | Ruby | https://github.com/D3nX/raylib-ruby-ffi |
|
| raylib-j | **4.0** | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | Zlib | https://github.com/CreedVI/Raylib-J |
|
||||||
| raylib-ruby | Ruby | https://github.com/a0/raylib-ruby |
|
| raylib.jl | **4.0** | [Julia](https://julialang.org/) | Zlib | https://github.com/irishgreencitrus/raylib.jl |
|
||||||
| raylib-mruby | mruby | https://github.com/lihaochen910/raylib-mruby |
|
| kaylib | 3.7 | [Kotlin/native](https://kotlinlang.org) | ? | https://github.com/electronstudio/kaylib |
|
||||||
| raylib-py | Python | https://github.com/overdev/raylib-py |
|
| raylib-lua | **4.0** | [Lua](http://www.lua.org/) | ISC | https://github.com/TSnake41/raylib-lua |
|
||||||
| raylib-python-cffi | Python | https://github.com/electronstudio/raylib-python-cffi |
|
| raylua | **4.0** | [Lua](http://www.lua.org/) | MIT | https://github.com/Rabios/raylua |
|
||||||
| raylib-java | Java | https://github.com/XoanaIO/raylib-java |
|
| nelua-raylib | 4.0 | [nelua](https://nelua.io/) | MIT | https://github.com/AKDev21/nelua-raylib |
|
||||||
| node-raylib | Node.js | https://github.com/RobLoach/node-raylib |
|
| NimraylibNow! | 4.0 | [Nim](https://nim-lang.org/) | MIT | https://github.com/greenfork/nimraylib_now |
|
||||||
| QuickJS-raylib | QuickJS | https://github.com/sntg-p/QuickJS-raylib |
|
| raylib-Forever | auto | [Nim](https://nim-lang.org/) | ? | https://github.com/Guevara-chan/Raylib-Forever |
|
||||||
| raylib-js | JavaScript | https://github.com/RobLoach/raylib-js |
|
| naylib | auto | [Nim](https://nim-lang.org/) | MIT | https://github.com/planetis-m/naylib |
|
||||||
| raylib-chaiscript | ChaiScript | https://github.com/RobLoach/raylib-chaiscript |
|
| node-raylib | **4.0** | [Node.js](https://nodejs.org/en/) | Zlib | https://github.com/RobLoach/node-raylib |
|
||||||
| raylib-squirrel | Squirrel | https://github.com/RobLoach/raylib-squirrel |
|
| raylib_odin_bindings | 4.0-dev | [Odin](https://odin-lang.org/) | MIT | https://github.com/Deathbat2190/raylib_odin_bindings |
|
||||||
| racket-raylib-2d | Racket | https://github.com/arvyy/racket-raylib-2d |
|
| raylib-odin | **4.0** | [Odin](https://odin-lang.org/) | BSD-3Clause | https://github.com/odin-lang/Odin/tree/master/vendor/raylib |
|
||||||
| raylib-php | PHP | https://github.com/joseph-montanez/raylib-php |
|
| raylib-ocaml | **4.0** | [OCaml](https://ocaml.org/) | MIT | https://github.com/tjammer/raylib-ocaml |
|
||||||
| raylib-php-ffi | PHP | https://github.com/oraoto/raylib-php-ffi |
|
| Ray4Laz | **4.2** | [Pascal](https://en.wikipedia.org/wiki/Pascal_(programming_language))| Zlib | https://github.com/GuvaCode/Ray4Laz |
|
||||||
| raylib-phpcpp | PHP | https://github.com/oraoto/raylib-phpcpp |
|
| Raylib.4.0.Pascal | **4.0** | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal)| Zlib | https://github.com/sysrpl/Raylib.4.0.Pascal |
|
||||||
| raylib-factor | Factor | https://github.com/Silverbeard00/raylib-factor |
|
| pyraylib | 3.7 | [Python](https://www.python.org/) | Zlib | https://github.com/Ho011/pyraylib |
|
||||||
| raylib-haxe | Haxe | https://github.com/ibilon/raylib-haxe |
|
| raylib-python-cffi | **4.2** | [Python](https://www.python.org/) | EPL-2.0 | https://github.com/electronstudio/raylib-python-cffi |
|
||||||
| ringraylib | Ring | https://github.com/ringpackages/ringraylib |
|
| raylib-php | 3.5 | [PHP](https://en.wikipedia.org/wiki/PHP) | Zlib | https://github.com/joseph-montanez/raylib-php |
|
||||||
| cl-raylib | Common Lisp | https://github.com/longlene/cl-raylib |
|
| raylib-phpcpp | 3.5 | [PHP](https://en.wikipedia.org/wiki/PHP) | Zlib | https://github.com/oraoto/raylib-phpcpp |
|
||||||
| raylib-scm | Chicken Scheme | https://github.com/yashrk/raylib-scm |
|
| raylibr | **4.0** | [R](https://www.r-project.org) | MIT | https://github.com/jeroenjanssens/raylibr |
|
||||||
| Euraylib | Euphoria | https://github.com/gAndy50/Euraylib |
|
| raylib-rs | 3.5 | [Rust](https://www.rust-lang.org/) | Zlib | https://github.com/deltaphc/raylib-rs |
|
||||||
| raylib-wren | Wren | https://github.com/TSnake41/raylib-wren |
|
| Relib | 3.5 | [ReCT](https://github.com/RedCubeDev-ByteSpace/ReCT) | ? | https://github.com/RedCubeDev-ByteSpace/Relib |
|
||||||
| raylib-odin | Odin | https://github.com/kevinw/raylib-odin |
|
| racket-raylib | **4.0** | [Racket](https://racket-lang.org/) | MIT/Apache-2.0 | https://github.com/eutro/racket-raylib |
|
||||||
| ray.zig | Zig | https://github.com/BitPuffin/zig-raylib-experiments |
|
| raylib-swift | **4.0** | [Swift](https://swift.org/) | MIT | https://github.com/STREGAsGate/Raylib |
|
||||||
| raylib-Ada | Ada | https://github.com/mimo/raylib-Ada |
|
| raylib-scopes | auto | [Scopes](http://scopes.rocks) | MIT | https://github.com/salotz/raylib-scopes |
|
||||||
| jaylib | Janet | https://github.com/janet-lang/jaylib |
|
| raylib-smallBasic | 4.1-dev | [SmallBASIC](https://github.com/smallbasic/SmallBASIC) | GPLv3 | https://github.com/smallbasic/smallbasic.plugins/tree/master/raylib |
|
||||||
| raykit | Kit | https://github.com/Gamerfiend/raykit |
|
| raylib.v | **4.0** | [V](https://vlang.io/) | Zlib | https://github.com/irishgreencitrus/raylib.v |
|
||||||
| vraylib | V | https://github.com/MajorHard/vraylib |
|
| raylib-wren | **4.0** | [Wren](http://wren.io/) | ISC | https://github.com/TSnake41/raylib-wren |
|
||||||
| raylib.cbl | COBOL | *[code examples](https://github.com/Martinfx/Cobol/tree/master/OpenCobol/Games/raylib)* |
|
| raylib-zig | **4.0** | [Zig](https://ziglang.org/) | MIT | https://github.com/Not-Nik/raylib-zig |
|
||||||
|
| raylib.zig | **4.1-dev** | [Zig](https://ziglang.org/) | MIT | https://github.com/ryupold/raylib.zig |
|
||||||
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! :)
|
| hare-raylib | auto | [Hare](https://harelang.org/) | Zlib | https://git.sr.ht/~evantj/hare-raylib |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Utility Wrapers
|
||||||
|
These are utility wrappers for specific languages, they are not required to use raylib in the language but may adapt the raylib API to be more inline with the language's pardigm.
|
||||||
|
| name | raylib version | language | license | repo |
|
||||||
|
|:------------------:|:-------------: | :--------:|:-------:|:-------------------------------------------------------------|
|
||||||
|
| raylib-cpp | **4.0** | [C++](https://en.wikipedia.org/wiki/C%2B%2B) | Zlib | https://github.com/robloach/raylib-cpp |
|
||||||
|
|
||||||
|
### Older or Unmaintained Language Bindings
|
||||||
|
These are older raylib bindings that are more than 2 versions old or have not been maintained.
|
||||||
|
| name | raylib version | language | repo |
|
||||||
|
|:------------------:|:-------------: | :--------:|----------------------------------------------------------------------|
|
||||||
|
| raylib-cppsharp | 2.5 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | https://github.com/phxvyper/raylib-cppsharp |
|
||||||
|
| RaylibFS | 2.5 | [F#](https://fsharp.org/) | https://github.com/dallinbeutler/RaylibFS |
|
||||||
|
| raylib_d | 2.5 | [D](https://dlang.org/) | https://github.com/Sepheus/raylib_d |
|
||||||
|
| bindbc-raylib | 3.0 | [D](https://dlang.org/) | https://github.com/o3o/bindbc-raylib |
|
||||||
|
| go-raylib | 3.5 | [Go](https://golang.org/) | https://github.com/chunqian/go-raylib |
|
||||||
|
| raylib-goplus | 2.6-dev | [Go](https://golang.org/) | https://github.com/Lachee/raylib-goplus |
|
||||||
|
| ray-go | 2.6-dev | [Go](https://golang.org/) | https://github.com/hecate-tech/ray-go |
|
||||||
|
| raylib-luamore | 3.0 | [Lua](http://www.lua.org/) | https://github.com/HDPLocust/raylib-luamore |
|
||||||
|
| LuaJIT-Raylib | 2.6 | [Lua](http://www.lua.org/) | https://github.com/Bambofy/LuaJIT-Raylib |
|
||||||
|
| raylib-lua-sol | 2.5 | [Lua](http://www.lua.org/) | https://github.com/RobLoach/raylib-lua-sol |
|
||||||
|
| raylib-lua-ffi | 2.0 | [Lua](http://www.lua.org/) | https://github.com/raysan5/raylib/issues/693 |
|
||||||
|
| raylib-lua | 1.7 | [Lua](http://www.lua.org/) | https://github.com/raysan5/raylib-lua |
|
||||||
|
| raylib-nelua | 3.0 | [Nelua](https://nelua.io/) | https://github.com/Andre-LA/raylib-nelua |
|
||||||
|
| raylib-nim | 2.0 | [Nim](https://nim-lang.org/) | https://github.com/Skrylar/raylib-nim |
|
||||||
|
| raylib-Nim | 1.7 | [Nim](https://nim-lang.org/) | https://gitlab.com/define-private-public/raylib-Nim |
|
||||||
|
| nim-raylib | 3.1-dev | [Nim](https://nim-lang.org/) | https://github.com/tomc1998/nim-raylib |
|
||||||
|
| raylib-haskell | 2.0 | [Haskell](https://www.haskell.org/) | https://github.com/DevJac/raylib-haskell |
|
||||||
|
| raylib-cr | 2.5-dev | [Crystal](https://crystal-lang.org/) | https://github.com/AregevDev/raylib-cr |
|
||||||
|
| raylib.cr | 2.0 | [Crystal](https://crystal-lang.org/) | https://github.com/sam0x17/raylib.cr |
|
||||||
|
| cray | 1.8 | [Crystal](https://crystal-lang.org/) | https://gitlab.com/Zatherz/cray |
|
||||||
|
| raylib-pas | 3.0 | [Pascal](https://en.wikipedia.org/wiki/Pascal_(programming_language)) | https://github.com/tazdij/raylib-pas |
|
||||||
|
| raylib-pascal | 2.0 | [Pascal](https://en.wikipedia.org/wiki/Pascal_(programming_language)) | https://github.com/drezgames/raylib-pascal |
|
||||||
|
| Graphics-Raylib | 1.4 | [Perl](https://www.perl.org/) | https://github.com/athreef/Graphics-Raylib |
|
||||||
|
| raylib-ruby | 2.6 | [Ruby](https://www.ruby-lang.org/en/) | https://github.com/a0/raylib-ruby |
|
||||||
|
| raylib-ruby-ffi | 2.0 | [Ruby](https://www.ruby-lang.org/en/) | https://github.com/D3nX/raylib-ruby-ffi |
|
||||||
|
| raylib-mruby | 2.5-dev | [mruby](https://github.com/mruby/mruby) | https://github.com/lihaochen910/raylib-mruby |
|
||||||
|
| raylib-py-ctbg | 2.6 | [Python](https://www.python.org/) | https://github.com/overdev/raylib-py-ctbg |
|
||||||
|
| raylib-py | 2.0 | [Python](https://www.python.org/) | https://github.com/overdev/raylib-py |
|
||||||
|
| raylib-java | 2.0 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | https://github.com/XoanaIO/raylib-java |
|
||||||
|
| clj-raylib | 3.0 | [Clojure](https://clojure.org/) | https://github.com/lsevero/clj-raylib |
|
||||||
|
| QuickJS-raylib | 3.0 | [QuickJS](https://bellard.org/quickjs/) | https://github.com/sntg-p/QuickJS-raylib |
|
||||||
|
| raylib-duktape | 2.6 | [JavaScript (Duktape)](https://en.wikipedia.org/wiki/JavaScript) | https://github.com/RobLoach/raylib-duktape |
|
||||||
|
| raylib-v7 | 3.5 | [JavaScript (v7)](https://en.wikipedia.org/wiki/JavaScript) | https://github.com/Rabios/raylib-v7 |
|
||||||
|
| raylib-chaiscript | 2.6 | [ChaiScript](http://chaiscript.com/) | https://github.com/RobLoach/raylib-chaiscript |
|
||||||
|
| raylib-squirrel | 2.5 | [Squirrel](http://www.squirrel-lang.org/) | https://github.com/RobLoach/raylib-squirrel |
|
||||||
|
| racket-raylib-2d | 2.5 | [Racket](https://racket-lang.org/) | https://github.com/arvyy/racket-raylib-2d |
|
||||||
|
| raylib-php-ffi | 2.4-dev | [PHP](https://en.wikipedia.org/wiki/PHP) | https://github.com/oraoto/raylib-php-ffi |
|
||||||
|
| raylib-haxe | 2.4 | [Haxe](https://haxe.org/) | https://github.com/ibilon/raylib-haxe |
|
||||||
|
| ringraylib | 2.6 | [Ring](http://ring-lang.sourceforge.net/) | https://github.com/ringpackages/ringraylib |
|
||||||
|
| raylib-scm | 2.5 | [Chicken Scheme](https://www.call-cc.org/) | https://github.com/yashrk/raylib-scm |
|
||||||
|
| raylib-chibi | 2.5 | [Chibi-Scheme](https://github.com/ashinn/chibi-scheme) | https://github.com/VincentToups/raylib-chibi |
|
||||||
|
| raylib-gambit-scheme | 3.1-dev | [Gambit Scheme](https://github.com/gambit/gambit) | https://github.com/georgjz/raylib-gambit-scheme |
|
||||||
|
| Euraylib | 3.0 | [Euphoria](https://openeuphoria.org/) | https://github.com/gAndy50/Euraylib |
|
||||||
|
| raylib-odin | 3.0 | [Odin](https://odin-lang.org/) | https://github.com/kevinw/raylib-odin |
|
||||||
|
| vraylib | 3.5 | [V](https://vlang.io/) | https://github.com/waotzi/vraylib |
|
||||||
|
| raylib-vala | 3.0 | [Vala](https://wiki.gnome.org/Projects/Vala) | https://code.guddler.uk/mart/raylibVapi |
|
||||||
|
| raylib-jai | 3.1-dev | [Jai](https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md) | https://github.com/kujukuju/raylib-jai |
|
||||||
|
| ray.zig | 2.5 | [Zig](https://ziglang.org/) | https://github.com/BitPuffin/zig-raylib-experiments |
|
||||||
|
| raylib-Ada | 3.0 | [Ada](https://www.adacore.com/about-ada) | https://github.com/mimo/raylib-Ada |
|
||||||
|
| jaylib | 3.0 | [Janet](https://janet-lang.org/) | https://github.com/janet-lang/jaylib |
|
||||||
|
| raykit | ? | [Kit](https://www.kitlang.org/) | https://github.com/Gamerfiend/raykit |
|
||||||
|
| ray.mod | 3.0 | [BlitzMax](https://blitzmax.org/) | https://github.com/bmx-ng/ray.mod |
|
||||||
|
| raylib-mosaic | 3.0 | [Mosaic](https://github.com/sal55/langs/tree/master/Mosaic) | https://github.com/pluckyporcupine/raylib-mosaic |
|
||||||
|
| raylib-xdpw | 2.6 | [XD Pascal](https://github.com/vtereshkov/xdpw) | https://github.com/vtereshkov/raylib-xdpw |
|
||||||
|
| raylib-carp | 3.0 | [Carp](https://github.com/carp-lang/Carp) | https://github.com/pluckyporcupine/raylib-carp |
|
||||||
|
| raylib-fb | 3.0 | [FreeBasic](https://www.freebasic.net/) | https://github.com/IchMagBier/raylib-fb |
|
||||||
|
| raylib-purebasic | 3.0 | [PureBasic](https://www.purebasic.com/) | https://github.com/D-a-n-i-l-o/raylib-purebasic |
|
||||||
|
| raylib-ats2 | 3.0 | [ATS2](http://www.ats-lang.org/) | https://github.com/mephistopheles-8/raylib-ats2 |
|
||||||
|
| raylib-beef | 3.0 | [Beef](https://www.beeflang.org/) | https://github.com/M0n7y5/raylib-beef |
|
||||||
|
| raylib-never | 3.0 | [Never](https://github.com/never-lang/never) | https://github.com/never-lang/raylib-never |
|
||||||
|
| raylib.cbl | 2.0 | [COBOL](https://en.wikipedia.org/wiki/COBOL) | *[code examples](https://github.com/Martinfx/Cobol/tree/master/OpenCobol/Games/raylib)* |
|
||||||
|
|
||||||
|
|
||||||
|
Missing some language or wrapper? Feel free to create a new one! :)
|
||||||
|
|
||||||
Usually, raylib bindings follow the convention: `raylib-{language}`
|
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
|
Let me know if you're writing a new binding for raylib, I will list it here!
|
||||||
provide the icon/logo for that new language binding.
|
|
||||||
|
|||||||
840
CHANGELOG
@ -1,7 +1,805 @@
|
|||||||
changelog
|
changelog
|
||||||
---------
|
---------
|
||||||
|
|
||||||
Current Release: raylib 2.5.0 (31 May 2019)
|
Current Release: raylib 4.2.0 (11 August 2022)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
Release: raylib 4.2 (11 August 2022)
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
KEY CHANGES:
|
||||||
|
- REMOVED: extras libraries (raygui, physac, rrem, reasings, raudio.h) moved to independent separate repos
|
||||||
|
- UPDATED: examples: Added creation and update raylib versions and assigned **DIFFICULTY LEVELS**!
|
||||||
|
- rres 1.0: A custom resource-processing and packaging file format, including tooling and raylib integration examples
|
||||||
|
- raygui 3.2: New version of the immediate-mode gui system for tools development with raylib
|
||||||
|
- raylib_parser: Multiple improvements of the raylib parser to automatize bindings generation
|
||||||
|
- ADDED: New file system API: Reviewed to be more aligned with raylib conventions and one advance function added
|
||||||
|
- ADDED: New audio stream processors API (_experimental_): Allowing to add custom audio stream data processors using callbacks
|
||||||
|
|
||||||
|
Detailed changes:
|
||||||
|
[multi] ADDED: Frequently Asked Questions (FAQ.md)
|
||||||
|
[multi] REVIEWED: Multiple trace log messages
|
||||||
|
[multi] REVIEWED: Avoid some float to double promotions
|
||||||
|
[multi] REVIEWED: Some functions input parametes that should be const
|
||||||
|
[multi] REVIEWED: Variables initialization, all variables are initialized on declaration
|
||||||
|
[multi] REVIEWED: Static array buffers are always re-initialized with memset()
|
||||||
|
[multi] `WARNING`: RENAMED: Some function input parameters from "length" to "size"
|
||||||
|
[core] ADDED: GetApplicatonDirectory() (#2256, #2285, #2290) by @JeffM2501
|
||||||
|
[core] ADDED: raylibVersion symbol, it could be required by some bindings (#2190)
|
||||||
|
[core] ADDED: SetWindowOpacity() (#2254) by @tusharsingh09
|
||||||
|
[core] ADDED: GetRenderWidth() and GetRenderHeight() by @ArnaudValensi
|
||||||
|
[core] ADDED: EnableEventWaiting() and DisableEventWaiting()
|
||||||
|
[core] ADDED: GetFileLength()
|
||||||
|
[core] ADDED: Modules info at initialization
|
||||||
|
[core] ADDED: Support clipboard copy/paste on web
|
||||||
|
[core] ADDED: Support OpenURL() on Android platform (#2396) by @futureapricot
|
||||||
|
[core] ADDED: Support MOUSE_PASSTHROUGH (#2516)
|
||||||
|
[core] ADDED: GetMouseWheelMoveV() (#2517) by @schveiguy
|
||||||
|
[core] `WARNING`: REMOVED: LoadStorageValue() / SaveStorageValue(), moved to example
|
||||||
|
[core] `WARNING`: RENAMED: GetDirectoryFiles() to LoadDirectoryFiles()
|
||||||
|
[core] `WARNING`: RENAMED: `ClearDroppedFiles()` to `UnloadDroppedFiles()`
|
||||||
|
[core] `WARNING`: RENAMED: GetDroppedFiles() to LoadDroppedFiles()
|
||||||
|
[core] `WARNING`: RENAMED: `ClearDirectoryFiles()` to `UnloadDirectoryFiles()`
|
||||||
|
[core] `WARNING`: REDESIGNED: WaitTime() argument from milliseconds to seconds (#2506) by @flashback-fx
|
||||||
|
[core] REVIEWED: GetMonitorWidth()/GetMonitorHeight() by @gulrak
|
||||||
|
[core] REVIEWED: GetDirectoryFiles(), maximum files allocation (#2126) by @ampers0x26
|
||||||
|
[core] REVIEWED: Expose MAX_KEYBOARD_KEYS and MAX_MOUSE_BUTTONS (#2127)
|
||||||
|
[core] REVIEWED: ExportMesh() (#2138)
|
||||||
|
[core] REVIEWED: Fullscreen switch on PLATFORM_WEB
|
||||||
|
[core] REVIEWED: GetMouseWheelMove(), fixed bug
|
||||||
|
[core] REVIEWED: GetApplicationDirectory() on macOS (#2304)
|
||||||
|
[core] REVIEWED: ToggleFullscreen()
|
||||||
|
[core] REVIEWED: Initialize/reset CORE.inputs global state (#2360)
|
||||||
|
[core] REVIEWED: MouseScrollCallback() (#2371)
|
||||||
|
[core] REVIEWED: SwapScreenBuffers() for PLATFORM_DRM
|
||||||
|
[core] REVIEWED: WaitTime(), fix regression causing video stuttering (#2503) by @flashback-fx
|
||||||
|
[core] REVIEWED: Mouse device support on PLATFORM_DRM (#2381)
|
||||||
|
[core] REVIEWED: Support OpenBSD timming functions
|
||||||
|
[core] REVIEWED: Improved boolean definitions (#2485) by @noodlecollie
|
||||||
|
[core] REVIEWED: TakeScreenshot(), use GetWindowScaleDPI() to calculate size in screenshot/recording (#2446) by @gulrak
|
||||||
|
[core] REVIEWED: Remove fps requirement for drm connector selection (#2468) by @Crydsch
|
||||||
|
[core] REVIEWED: IsFileExtension() (#2530)
|
||||||
|
[camera] REVIEWED: Some camera improvements (#2563)
|
||||||
|
[rlgl] ADDED: Premultiplied alpha blend mode (#2342) by @megagrump
|
||||||
|
[rlgl] REVIEWED: VR rendering not taking render target size into account (#2424) by @FireFlyForLife
|
||||||
|
[rlgl] REVIEWED: Set rlgl internal framebuffer (#2420)
|
||||||
|
[rlgl] REVIEWED: rlGetCompressedFormatName()
|
||||||
|
[rlgl] REVIEWED: Display OpenGL 4.3 capabilities with a compile flag (#2124) by @GithubPrankster
|
||||||
|
[rlgl] REVIEWED: rlUpdateTexture()
|
||||||
|
[rlgl] REVIEWED: Minimize buffer overflow probability
|
||||||
|
[rlgl] REVIEWED: Fix scissor mode on macOS (#2170) by @ArnaudValensi
|
||||||
|
[rlgl] REVIEWED: Clear SSBO buffers on loading (#2185)
|
||||||
|
[rlgl] REVIEWED: rlLoadShaderCode(), improved shader loading code
|
||||||
|
[rlgl] REVIEWED: Comment notes about custom blend modes (#2260) by @glorantq
|
||||||
|
[rlgl] REVIEWED: rlGenTextureMipmaps()
|
||||||
|
[rlgl] REVIEWED: rlTextureParameters()
|
||||||
|
[raymath] ADDED: Wrap() (#2522) by @Tekkitslime
|
||||||
|
[raymath] ADDED: Vector2Transform()
|
||||||
|
[raymath] ADDED: Vector2DistanceSqr() (#2376) by @AnilBK
|
||||||
|
[raymath] ADDED: Vector3DistanceSqr() (#2376) by @AnilBK
|
||||||
|
[raymath] ADDED: Vector2ClampValue(), Vector3ClampValue() (#2428) by @saccharineboi
|
||||||
|
[raymath] ADDED: Vector3RotateByAxisAngle() (#2590) by @Crydsch
|
||||||
|
[raymath] `WARNING`: REDESIGNED: Vector2Angle() returns radians instead of degrees (#2193) by @schveiguy
|
||||||
|
[raymath] `WARNING`: REMOVED: MatrixNormalize() (#2412)
|
||||||
|
[raymath] REVIEWED: Fix inverse length in Vector2Normalize() (#2189) by @HarriP
|
||||||
|
[raymath] REVIEWED: Vector2Angle() not working as expected (#2196) by @jdeokkim
|
||||||
|
[raymath] REVIEWED: Vector2Angle() and Vector3Angle() (#2203) by @trikko
|
||||||
|
[raymath] REVIEWED: QuaternionInvert(), code simplified (#2324) by @megagrump
|
||||||
|
[raymath] REVIEWED: QuaternionScale() (#2419) by @tana
|
||||||
|
[raymath] REVIEWED: Vector2Rotate(), optimized (#2340) by @jdeokkim
|
||||||
|
[raymath] REVIEWED: QuaternionFromMatrix(), QuaternionEquals() (#2591) by @kirigirihitomi
|
||||||
|
[raymath] REVIEWED: MatrixRotate*() (#2595, #2599) by @GoodNike
|
||||||
|
[shapes] REVIEWED: CheckCollision*() consistency
|
||||||
|
[shapes] REVIEWED: DrawRectanglePro(), support TRIANGLES drawing
|
||||||
|
[textures] ADDED: Support for QOI image format
|
||||||
|
[textures] REVIEWED: ImageColorTint(), GetImageColor(), ImageDrawRectangleRec(), optimized functions (#2429) by @AnilBK
|
||||||
|
[textures] REVIEWED: LoadTextureFromImage(), allow texture loading with no data transfer
|
||||||
|
[textures] REVIEWED: ImageDraw(), comment to note that f32bit is not supported (#2222)
|
||||||
|
[textures] REVIEWED: DrawTextureNPatch(), avoid batch overflow (#2401) by @JeffM2501
|
||||||
|
[textures] REVIEWED: DrawTextureTiled() (#2173)
|
||||||
|
[textures] REVIEWED: GenImageCellular() (#2178)
|
||||||
|
[textures] REVIEWED: LoadTextureCubemap() (#2223, #2224)
|
||||||
|
[textures] REVIEWED: Export format for float 32bit
|
||||||
|
[textures] REVIEWED: ExportImage(), support export ".jpeg" files
|
||||||
|
[textures] REVIEWED: ColorAlphaBlend() (#2524) by @royqh1979
|
||||||
|
[textures] REVIEWED: ImageResize() (#2572)
|
||||||
|
[textures] REVIEWED: ImageFromImage() (#2594) by @wiertek
|
||||||
|
[text] ADDED: ExportFontAsCode()
|
||||||
|
[text] ADDED: DrawTextCodepoints() (#2308) by @siddharthroy12
|
||||||
|
[text] REVIEWED: TextIsEqual(), protect from NULLs (#2121) by @lukekras
|
||||||
|
[text] REVIEWED: LoadFontEx(), comment to specify how to get the default character set (#2221) by @JeffM2501
|
||||||
|
[text] REVIEWED: GenImageFontAtlas(), increase atlas size guesstimate by @megagrump
|
||||||
|
[text] REVIEWED: GetCodepoint() (#2201)
|
||||||
|
[text] REVIEWED: GenImageFontAtlas() (#2556)
|
||||||
|
[text] REVIEWED: ExportFontAsCode() to use given font padding (#2525) by @TheTophatDemon
|
||||||
|
[models] ADDED: Reference code to load bones id and weight data for animations
|
||||||
|
[models] `WARNING`: REMOVED: GetRayCollisionModel() (#2405)
|
||||||
|
[models] REMOVED: GenMeshBinormals()
|
||||||
|
[models] REVIEWED: External library: vox_loader.h, 64bit issue (#2186)
|
||||||
|
[models] REVIEWED: Material color loading when no texture material is available (#2298) by @royqh1979
|
||||||
|
[models] REVIEWED: Fix Undefined Symbol _ftelli64 in cgltf (#2319) by @audinue
|
||||||
|
[models] REVIEWED: LoadGLTF(), fix memory leak (#2441, #2442) by @leomonta
|
||||||
|
[models] REVIEWED: DrawTriangle3D() batch limits check (#2489)
|
||||||
|
[models] REVIEWED: DrawBillboardPro() (#2494)
|
||||||
|
[models] REVIEWED: DrawMesh*() issue (#2211)
|
||||||
|
[models] REVIEWED: ExportMesh() (#2220)
|
||||||
|
[models] REVIEWED: GenMeshCylinder() (#2225)
|
||||||
|
[audio] `WARNING`: ADDED: rAudioProcessor pointer to AudioStream struct (used by Sound and Music structs)
|
||||||
|
[audio] ADDED: SetSoundPan(), SetMusicPan(), SetAudioStreamPan(), panning support (#2205) by ptarabbia
|
||||||
|
[audio] ADDED: Audio stream input callback (#2212) by ptarabbia
|
||||||
|
[audio] ADDED: Audio stream processors support (#2212) by ptarabbia
|
||||||
|
[audio] REVIEWED: GetMusicTimePlayed(), incorrect value after the stream restarted for XM audio (#2092 #2215) by @ptarabbia
|
||||||
|
[audio] REVIEWED: Turn on interpolation for XM playback (#2216) by @ptarabbia
|
||||||
|
[audio] REVIEWED: Fix crash with delay example (#2472) by @ptarabbia
|
||||||
|
[audio] REVIEWED: PlaySoundMulti() (#2231)
|
||||||
|
[audio] REVIEWED: ExportWaveAsCode()
|
||||||
|
[audio] REVIEWED: UpdateMusicStream(), reduce dynamic allocations (#2532) by @dbechrd
|
||||||
|
[audio] REVIEWED: UpdateMusicStream() to support proper stream looping (#2579) by @veins1
|
||||||
|
[utils] ADDED: ExportDataAsCode()
|
||||||
|
[utils] REVIEWED: Force flush stdout after trace messages (#2465) by @nagy
|
||||||
|
[easings] ADDED: Function descriptions (#2471) by @RobLoach
|
||||||
|
[camera] REVIEWED: Fix free camera panning in the wrong direction (#2347) by @DavidLyhedDanielsson
|
||||||
|
[examples] ADDED: core_window_should_close
|
||||||
|
[examples] ADDED: core_2d_camera_mouse_zoom (#2583) by @JeffM2501
|
||||||
|
[examples] ADDED: shapes_top_down_lights (#2199) by @JeffM2501
|
||||||
|
[examples] ADDED: textures_fog_of_war
|
||||||
|
[examples] ADDED: textures_gif_player
|
||||||
|
[examples] ADDED: text_codepoints_loading
|
||||||
|
[examples] ADDED: audio_stream_effects
|
||||||
|
[examples] REMOVED: core_quat_conversion, not working properly
|
||||||
|
[examples] REMOVED: raudio_standalone, moved to raudio repo
|
||||||
|
[examples] RENAMED: textures_rectangle -> textures_sprite_anim
|
||||||
|
[examples] REVIEWED: core_input_gamepad, improve joystick visualisation (#2390) by @kristianlm
|
||||||
|
[examples] REVIEWED: textures_draw_tiled
|
||||||
|
[examples] REVIEWED: shaders_mesh_instancing, free allocated matrices (#2425) by @AnilBK
|
||||||
|
[examples] REVIEWED: shaders_raymarching
|
||||||
|
[examples] REVIEWED: audio_raw_stream (#2205) by ptarabbia
|
||||||
|
[examples] REVIEWED: audio_music_stream
|
||||||
|
[examples] REVIEWED: shaders_mesh_instancing, simplified
|
||||||
|
[examples] REVIEWED: shaders_basic_lighting, rlights.h simplified
|
||||||
|
[examples] REVIEWED: All examples descriptions, included creation/update raylib versions
|
||||||
|
[parser] ADDED: Defines to parser (#2269) by @iskolbin
|
||||||
|
[parser] ADDED: Aliases to parser (#2444) by @lazaray
|
||||||
|
[parser] ADDED: Parse struct descriptions (#2214) by @eutro
|
||||||
|
[parser] ADDED: Parse enum descriptions and value descriptions (#2208) by @eutro
|
||||||
|
[parser] ADDED: Lua output format for parser by @iskolbin
|
||||||
|
[parser] ADDED: Makefile for raylib_parser by @iskolbin
|
||||||
|
[parser] ADDED: Support for truncating parser input (#2464) by @lazaray
|
||||||
|
[parser] ADDED: Support for calculated defines to parser (#2463) by @lazaray
|
||||||
|
[parser] REVIEWED: Update parser files (#2125) by @catmanl
|
||||||
|
[parser] REVIEWED: Fix memory leak in parser (#2136) by @ronnieholm
|
||||||
|
[parser] REVIEWED: EscapeBackslashes()
|
||||||
|
[parser] REVIEWED: Parser improvements (#2461 #2462) by @lazaray
|
||||||
|
[bindings] ADDED: License details for BINDINGS
|
||||||
|
[bindings] ADDED: dart-raylib (#2149) by @wolfenrain
|
||||||
|
[bindings] ADDED: raylib-cslo (#2169) by @jasonswearingen
|
||||||
|
[bindings] ADDED: raylib-d (#2194) by @schveiguy
|
||||||
|
[bindings] ADDED: raylib-guile (#2202) by @petelliott
|
||||||
|
[bindings] ADDED: raylib-scopes (#2238) by @salotz
|
||||||
|
[bindings] ADDED: naylib (Nim) (#2386) by @planetis-m
|
||||||
|
[bindings] ADDED: raylib.jl (Julia) (#2403) by @irishgreencitrus
|
||||||
|
[bindings] ADDED: raylib.zig (#2449) by @ryupold
|
||||||
|
[bindings] ADDED: racket-raylib (#2454) by @eutro
|
||||||
|
[bindings] ADDED: raylibr (#2611) by @ramiromagno
|
||||||
|
[bindings] ADDED: Raylib.4.0.Pascal (#2617) by @sysrpl
|
||||||
|
[bindings] REVIEWED: Multiple bindings updated to raylib 4.0
|
||||||
|
[build] ADDED: VS2022 project
|
||||||
|
[build] ADDED: Support macOS by zig build system (#2175)
|
||||||
|
[build] ADDED: Support custom modules selection on compilation
|
||||||
|
[build] ADDED: Minimal web shell for WebAssembly compilation
|
||||||
|
[build] ADDED: BSD support for zig builds (#2332) by @zigster64
|
||||||
|
[build] ADDED: Repology badge (#2367) by @jubalh
|
||||||
|
[build] ADDED: Support DLL compilation with TCC compiler (#2569) by @audinue
|
||||||
|
[build] ADDED: Missing examples to VS2022 examples solution
|
||||||
|
[build] REMOVED: VS2019 project (unmaintained)
|
||||||
|
[build] REMOVED: SUPPORT_MOUSE_CURSOR_POINT config option
|
||||||
|
[build] REVIEWED: Fixed RPi make install (#2217) by @wereii
|
||||||
|
[build] REVIEWED: Fix build results path on Linux and RPi (#2218) by @wereii
|
||||||
|
[build] REVIEWED: Makefiles debug flag
|
||||||
|
[build] REVIEWED: Fixed cross-compilation from x86-64 to RPi (#2233) by @pitpit
|
||||||
|
[build] REVIEWED: All Makefiles, simplified
|
||||||
|
[build] REVIEWED: All Makefiles, improve organization
|
||||||
|
[build] REVIEWED: All Makefiles, support CUSTOM_CFLAGS
|
||||||
|
[build] REVIEWED: Fixed compiling for Android using CMake (#2270) by @hero2002
|
||||||
|
[build] REVIEWED: Make zig build functionality available to zig programs (#2271) by @Not-Nik
|
||||||
|
[build] REVIEWED: Update CMake project template with docs and web (#2274) by @RobLoach
|
||||||
|
[build] REVIEWED: Update VSCode project to work with latest makefile and web (#2296) by @phil-shenk
|
||||||
|
[build] REVIEWED: Support audio examples compilation with external glfw (#2329) by @locriacyber
|
||||||
|
[build] REVIEWED: Fix "make clean" target failing when shell is not cmd (#2338) by @Peter0x44
|
||||||
|
[build] REVIEWED: Makefile linkage -latomic, required by miniaudio on ARM 32bit #2452
|
||||||
|
[build] REVIEWED: Update raylib-config.cmake (#2374) by @marcogmaia
|
||||||
|
[build] REVIEWED: Simplify build.zig to not require user to specify raylib path (#2383) by @Hejsil
|
||||||
|
[build] REVIEWED: Fix OpenGL 4.3 graphics option in CMake (#2427) by @GoldenThumbs
|
||||||
|
[extras] `WARNING`: REMOVED: physac from raylib sources/examples, use github.com/raysan5/physac
|
||||||
|
[extras] `WARNING`: REMOVED: raygui from raylib/src/extras, use github.com/raysan5/raygui
|
||||||
|
[extras] `WARNING`: REMOVED: rmem from raylib/src/extras, moved to github.com/raylib-extras/rmem
|
||||||
|
[extras] `WARNING`: REMOVED: easings from raylib/src/extras, moved to github.com/raylib-extras/reasings
|
||||||
|
[extras] `WARNING`: REMOVED: raudio.h from raylib/src, moved to github.com/raysan5/raudio
|
||||||
|
[misc] REVIEWED: Update some external libraries to latest versions
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
Release: raylib 4.0 - 8th Anniversary Edition (05 November 2021)
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
KEY CHANGES:
|
||||||
|
- Naming consistency and coherency: Complete review of the library: syntax, naming, comments, decriptions, logs...
|
||||||
|
- Event Automation System: Support for input events recording and automatic re-playing, useful for automated testing and more!
|
||||||
|
- Custom game-loop control: Intended for advance users that want to control the events polling and the timming mechanisms
|
||||||
|
- rlgl 4.0: Completely decoupling from platform layer and raylib, intended for standalone usage as single-file header-only
|
||||||
|
- raymath 1.5: Complete review following new conventions, to make it more portable and self-contained
|
||||||
|
- raygui 3.0: Complete review and official new release, more portable and self-contained, intended for tools development
|
||||||
|
- raylib_parser: New tool to parse raylib.h and extract all required info into custom output formats (TXT, XML, JSON...)
|
||||||
|
- Zig and Odin official support
|
||||||
|
|
||||||
|
Detailed changes:
|
||||||
|
[core] ADDED: Support canvas resizing on web (#1840) by @skylersaleh
|
||||||
|
[core] ADDED: GetMouseDelta() (#1832) by @adricoin2010
|
||||||
|
[core] ADDED: Support additional mouse buttons (#1753) by @lambertwang
|
||||||
|
[core] ADDED: SetRandomSeed() (#1994) by @TommiSinivuo
|
||||||
|
[core] ADDED: GetTouchPointId() #1972
|
||||||
|
[core] ADDED: EncodeDataBase64() and DecodeDataBase64()
|
||||||
|
[core] REMOVED: PLATFORM_UWP, difficult to maintain
|
||||||
|
[core] REMOVED: IsGamepadName()
|
||||||
|
[core] RENAMED: SwapBuffers() to SwapScreenBuffer()
|
||||||
|
[core] RENAMED: Wait() to WaitTime()
|
||||||
|
[core] RENAMED: RayHitInfo to RayCollision (#1781)
|
||||||
|
[core] RENAMED: GetRayCollisionGround() to GetRayCollisionQuad() (#1781)
|
||||||
|
[core] REVIEWED: Support mouse wheel on x-axis (#1948)
|
||||||
|
[core] REVIEWED: DisableCursor() on web by registering an empty mouse click event function in emscripten (#1900) by @grenappels
|
||||||
|
[core] REVIEWED: LoadShader() and default locations and descriptions
|
||||||
|
[core] REVIEWED: LoadShaderFromMemory() (#1851) by @Ruminant
|
||||||
|
[core] REVIEWED: WaitTime(), avoid global variables dependency to make the function is self-contained (#1841)
|
||||||
|
[core] REVIEWED: SetWindowSize() to work on web (#1847) by @nikki93
|
||||||
|
[core] REVIEWED: Raspberry RPI/DRM keyboard blocking render loop (#1879) @luizpestana
|
||||||
|
[core] REVIEWED: Android multi-touch (#1869) by @humbe
|
||||||
|
[core] REVIEWED: Implemented GetGamepadName() for emscripten by @nbarkhina
|
||||||
|
[core] REVIEWED: HighDPI support (#1987) by @ArnaudValensi
|
||||||
|
[core] REVIEWED: KeyCallback(), register keys independently of the actions
|
||||||
|
[rlgl] ADDED: GRAPHIC_API_OPENGL_43
|
||||||
|
[rlgl] ADDED: rlUpdateVertexBufferElements() (#1915)
|
||||||
|
[rlgl] ADDED: rlActiveDrawBuffers() (#1911)
|
||||||
|
[rlgl] ADDED: rlEnableColorBlend()/rlDisableColorBlend()
|
||||||
|
[rlgl] ADDED: rlGetPixelFormatName()
|
||||||
|
[rlgl] REVIEWED: rlUpdateVertexBuffer (#1914) by @630Studios
|
||||||
|
[rlgl] REVIEWED: rlDrawVertexArrayElements() (#1891)
|
||||||
|
[rlgl] REVIEWED: Wrong normal matrix calculation (#1870)
|
||||||
|
[raymath] ADDED: Vector3Angle()
|
||||||
|
[raymath] REVIEWED: QuaternionFromAxisAngle() (#1892)
|
||||||
|
[raymath] REVIEWED: QuaternionToMatrix() returning transposed result. (#1793) by @object71
|
||||||
|
[shapes] ADDED: RenderPolyLinesEx() (#1758) by @lambertwang
|
||||||
|
[shapes] ADDED: DrawLineBezierCubic() (#2021) by @SAOMDVN
|
||||||
|
[textures] ADDED: GetImageColor() #2024
|
||||||
|
[textures] REMOVED: GenImagePerlinNoise()
|
||||||
|
[textures] RENAMED: GetTextureData() to LoadImageFromTexture()
|
||||||
|
[textures] RENAMED: GetScreenData() to LoadImageFromScreen()
|
||||||
|
[textures] REVIEWED: ExportImage() to use SaveFileData() (#1779)
|
||||||
|
[textures] REVIEWED: LoadImageAnim() #2005
|
||||||
|
[text] ADDED: Security check in case of not valid font
|
||||||
|
[text] ADDED: `GetGlyphInfo()` to get glyph info for a specific codepoint
|
||||||
|
[text] ADDED: `GetGlyphAtlasRec()` to get glyph rectangle within the generated font atlas
|
||||||
|
[text] ADDED: DrawTextPro() with text rotation support, WARNING: DrawTextPro() requires including `rlgl.h`, before it was only dependant on `textures` module.
|
||||||
|
[text] ADDED: UnloadCodepoints() to safely free loaded codepoints
|
||||||
|
[text] REMOVED: DrawTextRec() and DrawTextRecEx(), moved to example, those functions could be very specific depending on user needs so it's better to give the user the full source in case of special requirements instead of allowing a function with +10 input parameters.
|
||||||
|
[text] RENAMED: struct `CharInfo` to `GlyphInfo`, actually that's the correct naming for the data contained. It contains the character glyph metrics and the glyph image; in the past it also contained rectangle within the font atlas but that data has been moved to `Font` struct directly, so, `GlyphInfo` is a more correct name.
|
||||||
|
[text] RENAMED: `CodepointToUtf8()` to `CodepointToUTF8()`, capitalization of UTF-8 is the correct form, it would also require de hyphen but it can be omitted in this case.
|
||||||
|
[text] RENAMED: `TextToUtf8()` to `TextCodepointsToUTF8` for consistency and more detail on the functionality.
|
||||||
|
[text] RENAMED: GetCodepoints() to LoadCodepoints(), now codepoint array data is loaded dynamically instead of reusing a limited static buffer.
|
||||||
|
[text] RENAMED: GetNextCodepoint() to GetCodepoint()
|
||||||
|
[models] ADDED: MagikaVoxel VOX models loading
|
||||||
|
[models] ADDED: GenMeshCone() (#1903)
|
||||||
|
[models] ADDED: GetModelBoundingBox()
|
||||||
|
[models] ADDED: DrawBillboardPro() (#1759) by @nobytesgiven
|
||||||
|
[models] ADDED: DrawCubeTextureRec() (#2001) by @tdgroot
|
||||||
|
[models] ADDED: DrawCylinderEx() and DrawCylinderWiresEx() (#2049) by @Horrowind
|
||||||
|
[models] REMOVED: DrawBillboardEx()
|
||||||
|
[models] RENAMED: MeshBoundingBox() to GetMeshBoundingBox()
|
||||||
|
[models] RENAMED: MeshTangents() to GenMeshTangents()
|
||||||
|
[models] RENAMED: MeshBinormals() to GenMeshBinormals()
|
||||||
|
[models] REVIEWED: GenMeshTangents() (#1877) by @630Studios
|
||||||
|
[models] REVIEWED: CheckCollisionBoxSphere() by @Crydsch
|
||||||
|
[models] REVIEWED: GetRayCollisionQuad() by @Crydsch
|
||||||
|
[models] REVIEWED: LoadGLTF(), fixed missing transformations and nonroot skinning by @MrDiver
|
||||||
|
[models] REVIEWED: LoadGLTF(), rewriten from scratch, removed animations support (broken)
|
||||||
|
[models] REVIEWED: Decouple DrawMesh() and DrawMeshInstanced() (#1958)
|
||||||
|
[models] REVIEWED: Support vertex color attribute for GLTF and IQM (#1790) by @object71
|
||||||
|
[models] REVIEWED: DrawBillboardPro() (#1941) by @GithubPrankster
|
||||||
|
[models] REDESIGNED: Major review of glTF loading functionality (#1849) by @object71
|
||||||
|
[audio] ADDED: SeekMusicStream() (#2006) by @GithubPrankster
|
||||||
|
[audio] REMOVED: GetAudioStreamBufferSizeDefault()
|
||||||
|
[audio] RENAMED: InitAudioStream() to LoadAudioStream()
|
||||||
|
[audio] RENAMED: CloseAudioStream() to UnloadAudioStream()
|
||||||
|
[audio] RENAMED: IsMusicPlaying() to IsMusicStreamPlaying()
|
||||||
|
[audio] REVIEWED: ExportWaveAsCode()
|
||||||
|
[audio] REDESIGNED: Use frameCount on audio instead of sampleCount
|
||||||
|
[utils] REVIEWED: exit() on LOG_FATAL instead of LOG_ERROR (#1796)
|
||||||
|
[examples] ADDED: core_custom_frame_control
|
||||||
|
[examples] ADDED: core_basic_screen_manager
|
||||||
|
[examples] ADDED: core_split_screen (#1806) by @JeffM2501
|
||||||
|
[examples] ADDED: core_smooth_pixelperfect (#1771) by @NotManyIdeasDev
|
||||||
|
[examples] ADDED: shaders_texture_outline (#1883) by @GoldenThumbs
|
||||||
|
[examples] ADDED: models_loading_vox (#1940) by @procfxgen
|
||||||
|
[examples] ADDED: rlgl_compute_shader by @TSnake41 (#2088)
|
||||||
|
[examples] REMOVED: models_material_pbr
|
||||||
|
[examples] REMOVED: models_gltf_animation
|
||||||
|
[examples] REVIEWED: core_3d_picking
|
||||||
|
[examples] REVIEWED: core_input_mouse
|
||||||
|
[examples] REVIEWED: core_vr_simulator, RenderTexture usage
|
||||||
|
[examples] REVIEWED: core_window_letterbox, RenderTexture usage
|
||||||
|
[examples] REVIEWED: shapes_basic_shapes
|
||||||
|
[examples] REVIEWED: shapes_logo_raylib_anim
|
||||||
|
[examples] REVIEWED: textures_to_image
|
||||||
|
[examples] REVIEWED: text_rectangle_bounds
|
||||||
|
[examples] REVIEWED: text_unicode
|
||||||
|
[examples] REVIEWED: text_draw_3d
|
||||||
|
[examples] REVIEWED: models_loading
|
||||||
|
[examples] REVIEWED: models_skybox (#1792) (#1778)
|
||||||
|
[examples] REVIEWED: models_mesh_picking
|
||||||
|
[examples] REVIEWED: models_yaw_pitch_roll
|
||||||
|
[examples] REVIEWED: models_rlgl_solar_system
|
||||||
|
[examples] REVIEWED: shaders_custom_uniform, RenderTexture usage
|
||||||
|
[examples] REVIEWED: shaders_eratosthenes, RenderTexture usage
|
||||||
|
[examples] REVIEWED: shaders_julia_set, RenderTexture usage
|
||||||
|
[examples] REVIEWED: shaders_postprocessing, RenderTexture usage
|
||||||
|
[examples] REVIEWED: shaders_basic_lighting, simplified (#1865)
|
||||||
|
[examples] REVIEWED: audio_raw_stream.c
|
||||||
|
[examples] REVIEWED: raudio_standalone
|
||||||
|
[examples] REVIEWED: raylib_opengl_interop
|
||||||
|
[examples] REVIEWED: rlgl_standalone.c
|
||||||
|
[examples] REVIEWED: Resources licenses
|
||||||
|
[examples] REVIEWED: models resources reorganization
|
||||||
|
[templates] REMOVED: Moved to a separate repo: https://github.com/raysan5/raylib-game-template
|
||||||
|
[build] ADDED: Zig build file (#2014) by @TommiSinivuo
|
||||||
|
[build] ADDED: Android VS2019 solution (#2013) by @Kronka
|
||||||
|
[build] REMOVED: VS2017 project, outdated
|
||||||
|
[build] RENAMED: All raylib modules prefixed with 'r' (core -> rcore)
|
||||||
|
[build] RENAMED: SUPPORT_MOUSE_CURSOR_NATIVE to SUPPORT_MOUSE_CURSOR_POINT
|
||||||
|
[build] REVIEWED: examples/examples_template.c
|
||||||
|
[build] REVIEWED: Makefile to latest Emscripten SDK r23
|
||||||
|
[build] REVIEWED: Makefile for latest Android NDK r32 LTS
|
||||||
|
[build] REVIEWED: raylib resource files
|
||||||
|
[build] Moved some extra raylib libraries to /extras/ directory
|
||||||
|
[*] UPDATED: Multiple bindings to latest version
|
||||||
|
[*] UPDATED: Most external libraries to latest versions (except GLFW)
|
||||||
|
[*] Multiple code improvements and fixes by multiple contributors!
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
Release: raylib 3.7 (26 April 2021)
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
KEY CHANGES:
|
||||||
|
- [rlgl] REDESIGNED: Greater abstraction level, some functionality moved to core module
|
||||||
|
- [rlgl] REVIEWED: Instancing and stereo rendering
|
||||||
|
- [core] REDESIGNED: VR simulator, fbo/shader exposed to user
|
||||||
|
- [utils] ADDED: File access callbacks system
|
||||||
|
- [models] ADDED: glTF animations support (#1551) by @object71
|
||||||
|
- [audio] ADDED: Music streaming support from memory (#1606) by @nezvers
|
||||||
|
- [*] RENAMED: enum types and enum values for consistency
|
||||||
|
|
||||||
|
Detailed changes:
|
||||||
|
[core] ADDED: LoadVrStereoConfig()
|
||||||
|
[core] ADDED: UnloadVrStereoConfig()
|
||||||
|
[core] ADDED: BeginVrStereoMode()
|
||||||
|
[core] ADDED: EndVrStereoMode()
|
||||||
|
[core] ADDED: GetCurrentMonitor() (#1485) by @object71
|
||||||
|
[core] ADDED: SetGamepadMappings() (#1506)
|
||||||
|
[core] RENAMED: struct Camera: camera.type to camera.projection
|
||||||
|
[core] RENAMED: LoadShaderCode() to LoadShaderFromMemory() (#1690)
|
||||||
|
[core] RENAMED: SetMatrixProjection() to rlSetMatrixProjection()
|
||||||
|
[core] RENAMED: SetMatrixModelview() to rlSetMatrixModelview()
|
||||||
|
[core] RENAMED: GetMatrixModelview() to rlGetMatrixModelview()
|
||||||
|
[core] RENAMED: GetMatrixProjection() to rlGetMatrixProjection()
|
||||||
|
[core] RENAMED: GetShaderDefault() to rlGetShaderDefault()
|
||||||
|
[core] RENAMED: GetTextureDefault() to rlGetTextureDefault()
|
||||||
|
[core] REMOVED: GetShapesTexture()
|
||||||
|
[core] REMOVED: GetShapesTextureRec()
|
||||||
|
[core] REMOVED: GetMouseCursor()
|
||||||
|
[core] REMOVED: SetTraceLogExit()
|
||||||
|
[core] REVIEWED: GetFileName() and GetDirectoryPath() (#1534) by @gilzoide
|
||||||
|
[core] REVIEWED: Wait() to support FreeBSD (#1618)
|
||||||
|
[core] REVIEWED: HighDPI support on macOS retina (#1510)
|
||||||
|
[core] REDESIGNED: GetFileExtension(), includes the .dot
|
||||||
|
[core] REDESIGNED: IsFileExtension(), includes the .dot
|
||||||
|
[core] REDESIGNED: Compresion API to use sdefl/sinfl libs
|
||||||
|
[rlgl] ADDED: SUPPORT_GL_DETAILS_INFO config flag
|
||||||
|
[rlgl] REMOVED: GenTexture*() functions (#721)
|
||||||
|
[rlgl] REVIEWED: rlLoadShaderDefault()
|
||||||
|
[rlgl] REDESIGNED: rlLoadExtensions(), more details exposed
|
||||||
|
[raymath] REVIEWED: QuaternionFromEuler() (#1651)
|
||||||
|
[raymath] REVIEWED: MatrixRotateZYX() (#1642)
|
||||||
|
[shapes] ADDED: DrawLineBezierQuad() (#1468) by @epsilon-phase
|
||||||
|
[shapes] ADDED: CheckCollisionLines()
|
||||||
|
[shapes] ADDED: CheckCollisionPointLine() by @mkupiec1
|
||||||
|
[shapes] REVIEWED: CheckCollisionPointTriangle() by @mkupiec1
|
||||||
|
[shapes] REDESIGNED: SetShapesTexture()
|
||||||
|
[shapes] REDESIGNED: DrawCircleSector(), to use float params
|
||||||
|
[shapes] REDESIGNED: DrawCircleSectorLines(), to use float params
|
||||||
|
[shapes] REDESIGNED: DrawRing(), to use float params
|
||||||
|
[shapes] REDESIGNED: DrawRingLines(), to use float params
|
||||||
|
[textures] ADDED: DrawTexturePoly() and example (#1677) by @chriscamacho
|
||||||
|
[textures] ADDED: UnloadImageColors() for allocs consistency
|
||||||
|
[textures] RENAMED: GetImageData() to LoadImageColors()
|
||||||
|
[textures] REVIEWED: ImageClearBackground() and ImageDrawRectangleRec() (#1487) by @JeffM2501
|
||||||
|
[textures] REVIEWED: DrawTexturePro() and DrawRectanglePro() transformations (#1632) by @ChrisDill
|
||||||
|
[text] REDESIGNED: DrawFPS()
|
||||||
|
[models] ADDED: UploadMesh() (#1529)
|
||||||
|
[models] ADDED: UpdateMeshBuffer()
|
||||||
|
[models] ADDED: DrawMesh()
|
||||||
|
[models] ADDED: DrawMeshInstanced()
|
||||||
|
[models] ADDED: UnloadModelAnimations() (#1648) by @object71
|
||||||
|
[models] REMOVED: DrawGizmo()
|
||||||
|
[models] REMOVED: LoadMeshes()
|
||||||
|
[models] REMOVED: MeshNormalsSmooth()
|
||||||
|
[models] REVIEWED: DrawLine3D() (#1643)
|
||||||
|
[audio] REVIEWED: Multichannel sound system (#1548)
|
||||||
|
[audio] REVIEWED: jar_xm library (#1701) by @jmorel33
|
||||||
|
[utils] ADDED: SetLoadFileDataCallback()
|
||||||
|
[utils] ADDED: SetSaveFileDataCallback()
|
||||||
|
[utils] ADDED: SetLoadFileTextCallback()
|
||||||
|
[utils] ADDED: SetSaveFileTextCallback()
|
||||||
|
[examples] ADDED: text_draw_3d (#1689) by @Demizdor
|
||||||
|
[examples] ADDED: textures_poly (#1677) by @chriscamacho
|
||||||
|
[examples] ADDED: models_gltf_model (#1551) by @object71
|
||||||
|
[examples] RENAMED: shaders_rlgl_mesh_instanced to shaders_mesh_intancing
|
||||||
|
[examples] REDESIGNED: shaders_rlgl_mesh_instanced by @moliad
|
||||||
|
[examples] REDESIGNED: core_vr_simulator
|
||||||
|
[examples] REDESIGNED: models_yaw_pitch_roll
|
||||||
|
[build] ADDED: Config flag: SUPPORT_STANDARD_FILEIO
|
||||||
|
[build] ADDED: Config flag: SUPPORT_WINMM_HIGHRES_TIMER (#1641)
|
||||||
|
[build] ADDED: Config flag: SUPPORT_GL_DETAILS_INFO
|
||||||
|
[build] ADDED: Examples projects to VS2019 solution
|
||||||
|
[build] REVIEWED: Makefile to support PLATFORM_RPI (#1580)
|
||||||
|
[build] REVIEWED: Multiple typecast warnings by @JeffM2501
|
||||||
|
[build] REDESIGNED: VS2019 project build paths
|
||||||
|
[build] REDESIGNED: CMake build system by @object71
|
||||||
|
[*] RENAMED: Several functions parameters for consistency
|
||||||
|
[*] UPDATED: Multiple bindings to latest version
|
||||||
|
[*] UPDATED: All external libraries to latest versions
|
||||||
|
[*] Multiple code improvements and fixes by multiple contributors!
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
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)
|
Release: raylib 2.5 (May 2019)
|
||||||
@ -83,7 +881,7 @@ Detailed changes:
|
|||||||
[rlgl] ADDED: SetShaderValueTexture() - Set shader uniform value for texture
|
[rlgl] ADDED: SetShaderValueTexture() - Set shader uniform value for texture
|
||||||
[rlgl] ADDED: BeginScissorMode() - Begin scissor mode (define screen area for following drawing)
|
[rlgl] ADDED: BeginScissorMode() - Begin scissor mode (define screen area for following drawing)
|
||||||
[rlgl] ADDED: EndScissorMode() - End scissor mode
|
[rlgl] ADDED: EndScissorMode() - End scissor mode
|
||||||
[rlgl] ADDED: SetVrConfiguration() - Set stereo rendering configuration parameters
|
[rlgl] ADDED: SetVrConfiguration() - Set stereo rendering configuration parameters
|
||||||
[rlgl] REVIEWED: InitVrSimulator() - No input parameter required, use SetVrConfiguration()
|
[rlgl] REVIEWED: InitVrSimulator() - No input parameter required, use SetVrConfiguration()
|
||||||
[text] REVIEWED: LoadFontEx() - Reorder function parameters
|
[text] REVIEWED: LoadFontEx() - Reorder function parameters
|
||||||
[text] REVIEWED: LoadFontData() - Reorder function parameters
|
[text] REVIEWED: LoadFontData() - Reorder function parameters
|
||||||
@ -276,10 +1074,10 @@ Detailed changes:
|
|||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
Release: raylib 1.8.0 (Oct 2017)
|
Release: raylib 1.8.0 (Oct 2017)
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
NOTE:
|
NOTE:
|
||||||
In this release, multiple parts of the library have been reviewed (again) for consistency and simplification.
|
In this release, multiple parts of the library have been reviewed (again) for consistency and simplification.
|
||||||
It exposes more than 30 new functions in comparison with previous version and it improves overall programming experience.
|
It exposes more than 30 new functions in comparison with previous version and it improves overall programming experience.
|
||||||
|
|
||||||
BIG CHANGES:
|
BIG CHANGES:
|
||||||
- New Image generation functions: Gradient, Checked, Noise, Cellular...
|
- New Image generation functions: Gradient, Checked, Noise, Cellular...
|
||||||
- New Mesh generation functions: Cube, Sphere, Cylinder, Torus, Knot...
|
- New Mesh generation functions: Cube, Sphere, Cylinder, Torus, Knot...
|
||||||
@ -366,9 +1164,9 @@ detailed changes:
|
|||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
Release: raylib 1.7.0 (20 May 2017)
|
Release: raylib 1.7.0 (20 May 2017)
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
NOTE:
|
NOTE:
|
||||||
In this new raylib release, multiple parts of the library have been reviewed for consistency and simplification.
|
In this new raylib release, multiple parts of the library have been reviewed for consistency and simplification.
|
||||||
It exposes almost 300 functions, around 30 new functions in comparison with previous version and, again,
|
It exposes almost 300 functions, around 30 new functions in comparison with previous version and, again,
|
||||||
it sets a stepping stone towards raylib future.
|
it sets a stepping stone towards raylib future.
|
||||||
|
|
||||||
BIG changes:
|
BIG changes:
|
||||||
@ -462,8 +1260,8 @@ other changes:
|
|||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
Release: raylib 1.6.0 (20 November 2016)
|
Release: raylib 1.6.0 (20 November 2016)
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
NOTE:
|
NOTE:
|
||||||
This new raylib version commemorates raylib 3rd anniversary and represents another complete review of the library.
|
This new raylib version commemorates raylib 3rd anniversary and represents another complete review of the library.
|
||||||
It includes some interesting new features and is a stepping stone towards raylib future.
|
It includes some interesting new features and is a stepping stone towards raylib future.
|
||||||
|
|
||||||
HUGE changes:
|
HUGE changes:
|
||||||
@ -519,8 +1317,8 @@ other changes:
|
|||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
Release: raylib 1.5.0 (18 July 2016)
|
Release: raylib 1.5.0 (18 July 2016)
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
NOTE:
|
NOTE:
|
||||||
Probably this new version is the biggest boost of the library ever, lots of parts of the library have been redesigned,
|
Probably this new version is the biggest boost of the library ever, lots of parts of the library have been redesigned,
|
||||||
lots of bugs have been solved and some **AMAZING** new features have been added.
|
lots of bugs have been solved and some **AMAZING** new features have been added.
|
||||||
|
|
||||||
HUGE changes:
|
HUGE changes:
|
||||||
@ -564,7 +1362,7 @@ other changes:
|
|||||||
[rlgl] Replaced SetBlendMode() by: BeginBlendMode() - EndBlendMode()
|
[rlgl] Replaced SetBlendMode() by: BeginBlendMode() - EndBlendMode()
|
||||||
[rlgl] Added functions to customize internal matrices: SetMatrixProjection(), SetMatrixModelview()
|
[rlgl] Added functions to customize internal matrices: SetMatrixProjection(), SetMatrixModelview()
|
||||||
[rlgl] Unified internal shaders to only one default shader
|
[rlgl] Unified internal shaders to only one default shader
|
||||||
[rlgl] Added support for render to texture (RenderTexture2D):
|
[rlgl] Added support for render to texture (RenderTexture2D):
|
||||||
LoadRenderTexture() - UnloadRenderTexture()
|
LoadRenderTexture() - UnloadRenderTexture()
|
||||||
BeginTextureMode() - EndTextureMode()
|
BeginTextureMode() - EndTextureMode()
|
||||||
[rlgl] Removed SetShaderMap*() functions
|
[rlgl] Removed SetShaderMap*() functions
|
||||||
@ -610,7 +1408,7 @@ other changes:
|
|||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
Release: raylib 1.4.0 (22 February 2016)
|
Release: raylib 1.4.0 (22 February 2016)
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
NOTE:
|
NOTE:
|
||||||
This version supposed another big improvement for raylib, including new modules and new features.
|
This version supposed another big improvement for raylib, including new modules and new features.
|
||||||
More than 30 new functions have been added to previous raylib version.
|
More than 30 new functions have been added to previous raylib version.
|
||||||
Around 8 new examples and +10 new game samples have been added.
|
Around 8 new examples and +10 new game samples have been added.
|
||||||
@ -648,7 +1446,7 @@ other changes:
|
|||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
Release: raylib 1.3.0 (01 September 2015)
|
Release: raylib 1.3.0 (01 September 2015)
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
NOTE:
|
NOTE:
|
||||||
This version supposed a big boost for raylib, new modules have been added with lots of features.
|
This version supposed a big boost for raylib, new modules have been added with lots of features.
|
||||||
Most of the modules have been completely reviewed to accomodate to the new features.
|
Most of the modules have been completely reviewed to accomodate to the new features.
|
||||||
Over 50 new functions have been added to previous raylib version.
|
Over 50 new functions have been added to previous raylib version.
|
||||||
@ -664,13 +1462,13 @@ BIG changes:
|
|||||||
other changes:
|
other changes:
|
||||||
|
|
||||||
[rlgl] Added check for OpenGL supported extensions
|
[rlgl] Added check for OpenGL supported extensions
|
||||||
[rlgl] Added function SetBlenMode() to select some predefined blending modes
|
[rlgl] Added function SetBlenMode() to select some predefined blending modes
|
||||||
[core] Added support for drop&drag of external files into running program
|
[core] Added support for drop&drag of external files into running program
|
||||||
[core] Added functions ShowCursor(), HideCursor(), IsCursorHidden()
|
[core] Added functions ShowCursor(), HideCursor(), IsCursorHidden()
|
||||||
[core] Renamed function SetFlags() to SetConfigFlags()
|
[core] Renamed function SetFlags() to SetConfigFlags()
|
||||||
[shapes] Simplified some functions to improve performance
|
[shapes] Simplified some functions to improve performance
|
||||||
[textures] Review of Image struct to support multiple data formats
|
[textures] Review of Image struct to support multiple data formats
|
||||||
[textures] Added function LoadImageEx()
|
[textures] Added function LoadImageEx()
|
||||||
[textures] Added function LoadImageRaw()
|
[textures] Added function LoadImageRaw()
|
||||||
[textures] Added function LoadTextureEx()
|
[textures] Added function LoadTextureEx()
|
||||||
[textures] Simplified function parameters LoadTextureFromImage()
|
[textures] Simplified function parameters LoadTextureFromImage()
|
||||||
@ -728,7 +1526,7 @@ Update: raylib 1.2.1 (17 October 2014) (Small Fixes Update)
|
|||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
Release: raylib 1.2 (16 September 2014)
|
Release: raylib 1.2 (16 September 2014)
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
NOTE:
|
NOTE:
|
||||||
This version supposed a complete redesign of the [core] module to support Android and Raspberry Pi.
|
This version supposed a complete redesign of the [core] module to support Android and Raspberry Pi.
|
||||||
Multiples modules have also been tweaked to accomodate to the new platforms, specially [rlgl]
|
Multiples modules have also been tweaked to accomodate to the new platforms, specially [rlgl]
|
||||||
|
|
||||||
@ -778,7 +1576,7 @@ Release: raylib 1.1.1 (22 July 2014)
|
|||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
Release: raylib 1.1.0 (19 April 2014)
|
Release: raylib 1.1.0 (19 April 2014)
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
NOTE:
|
NOTE:
|
||||||
This version supposed a complete internal redesign of the library to support OpenGL 3.3+ and OpenGL ES 2.0.
|
This version supposed a complete internal redesign of the library to support OpenGL 3.3+ and OpenGL ES 2.0.
|
||||||
New module [rlgl] has been added to 'translate' immediate mode style functions (i.e. rlVertex3f()) to GL 1.1, 3.3+ or ES2.
|
New module [rlgl] has been added to 'translate' immediate mode style functions (i.e. rlVertex3f()) to GL 1.1, 3.3+ or ES2.
|
||||||
Another new module [raymath] has also been added with lot of useful 3D math vector-matrix-quaternion functions.
|
Another new module [raymath] has also been added with lot of useful 3D math vector-matrix-quaternion functions.
|
||||||
@ -814,7 +1612,7 @@ Release: raylib 1.0.6 (16 March 2014)
|
|||||||
[core] Removed unused lighting-system code
|
[core] Removed unused lighting-system code
|
||||||
[core] Removed SetPerspective() function, calculated directly
|
[core] Removed SetPerspective() function, calculated directly
|
||||||
[core] Unload and reload default font on fullscreen toggle
|
[core] Unload and reload default font on fullscreen toggle
|
||||||
[core] Corrected bug gamepad buttons checking if no gamepad available
|
[core] Corrected bug gamepad buttons checking if no gamepad available
|
||||||
[texture] DrawTextureV() - Added, to draw using Vector2 for position
|
[texture] DrawTextureV() - Added, to draw using Vector2 for position
|
||||||
[texture] LoadTexture() - Redesigned, now uses LoadImage() + CreateTexture()
|
[texture] LoadTexture() - Redesigned, now uses LoadImage() + CreateTexture()
|
||||||
[text] FormatText() - Corrected memory leak bug
|
[text] FormatText() - Corrected memory leak bug
|
||||||
@ -830,7 +1628,7 @@ Update: raylib 1.0.5 (28 January 2014)
|
|||||||
[core] GetMouseWheelMove() - Added, check mouse wheel Y movement
|
[core] GetMouseWheelMove() - Added, check mouse wheel Y movement
|
||||||
[texture] CreateTexture2D() renamed to CreateTexture()
|
[texture] CreateTexture2D() renamed to CreateTexture()
|
||||||
[models] LoadHeightmap() - Added, Heightmap can be loaded as a Model
|
[models] LoadHeightmap() - Added, Heightmap can be loaded as a Model
|
||||||
[tool] rREM updated, now supports (partially) drag and drop of files
|
[tool] rREM updated, now supports (partially) drag and drop of files
|
||||||
|
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
Release: raylib 1.0.4 (23 January 2014)
|
Release: raylib 1.0.4 (23 January 2014)
|
||||||
|
|||||||
69
CMakeLists.txt
Normal file → Executable file
@ -1,54 +1,45 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
|
project(raylib)
|
||||||
|
|
||||||
|
# Avoid excessive expansion of variables in conditionals. In particular, if
|
||||||
|
# "PLATFORM" is "DRM" than:
|
||||||
|
#
|
||||||
|
# if (${PLATFORM} MATCHES "DRM")
|
||||||
|
#
|
||||||
|
# may expand e.g to:
|
||||||
|
#
|
||||||
|
# if (/usr/lib/aarch64-linux-gnu/libdrm.so MATCHES "DRM")
|
||||||
|
#
|
||||||
|
# See https://cmake.org/cmake/help/latest/policy/CMP0054.html
|
||||||
|
cmake_policy(SET CMP0054 NEW)
|
||||||
|
|
||||||
|
# Directory for easier includes
|
||||||
|
# Anywhere you see include(...) you can check <root>/cmake for that file
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||||
|
|
||||||
# Config options
|
# RAYLIB_IS_MAIN determines whether the project is being used from root
|
||||||
option(BUILD_EXAMPLES "Build the examples." ON)
|
# or if it is added as a dependency (through add_subdirectory for example).
|
||||||
option(BUILD_GAMES "Build the example games." ON)
|
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
option(ENABLE_ASAN "Enable AddressSanitizer (ASAN) for debugging (degrades performance)" OFF)
|
set(RAYLIB_IS_MAIN TRUE)
|
||||||
option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan) for debugging" OFF)
|
|
||||||
option(ENABLE_MSAN "Enable MemorySanitizer (MSan) for debugging (not recommended to run with ASAN)" OFF)
|
|
||||||
|
|
||||||
if(CMAKE_VERSION VERSION_LESS "3.1")
|
|
||||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
|
||||||
set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
set (CMAKE_C_STANDARD 99)
|
set(RAYLIB_IS_MAIN FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(AddIfFlagCompiles)
|
# Sets compiler flags and language standard
|
||||||
add_if_flag_compiles(-Werror=pointer-arith CMAKE_C_FLAGS)
|
include(CompilerFlags)
|
||||||
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)
|
# Registers build options that are exposed to cmake
|
||||||
|
include(CMakeOptions.txt)
|
||||||
|
|
||||||
if (ENABLE_ASAN)
|
# Enforces a few environment and compiler configurations
|
||||||
add_if_flag_compiles(-fno-omit-frame-pointer CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
include(BuildOptions)
|
||||||
add_if_flag_compiles(-fsanitize=address CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
|
||||||
endif()
|
|
||||||
if (ENABLE_UBSAN)
|
|
||||||
add_if_flag_compiles(-fno-omit-frame-pointer CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
|
||||||
add_if_flag_compiles(-fsanitize=undefined CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
|
||||||
endif()
|
|
||||||
if (ENABLE_MSAN)
|
|
||||||
add_if_flag_compiles(-fno-omit-frame-pointer CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
|
||||||
add_if_flag_compiles(-fsanitize=memory CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (ENABLE_MSAN AND ENABLE_ASAN)
|
# Main sources directory (the second parameter sets the output directory name to raylib)
|
||||||
MESSAGE(WARNING "Compiling with both AddressSanitizer and MemorySanitizer is not recommended")
|
add_subdirectory(src raylib)
|
||||||
endif()
|
|
||||||
|
|
||||||
add_subdirectory(src)
|
|
||||||
|
|
||||||
if (${BUILD_EXAMPLES})
|
if (${BUILD_EXAMPLES})
|
||||||
|
MESSAGE(STATUS "Building examples is enabled")
|
||||||
add_subdirectory(examples)
|
add_subdirectory(examples)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (${BUILD_GAMES})
|
|
||||||
add_subdirectory(games)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|||||||
94
CMakeOptions.txt
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
### Config options ###
|
||||||
|
include(CMakeDependentOption)
|
||||||
|
include(EnumOption)
|
||||||
|
|
||||||
|
enum_option(PLATFORM "Desktop;Web;Android;Raspberry Pi;DRM" "Platform to build for.")
|
||||||
|
|
||||||
|
enum_option(OPENGL_VERSION "OFF;4.3;3.3;2.1;1.1;ES 2.0" "Force a specific OpenGL Version?")
|
||||||
|
|
||||||
|
# Configuration options
|
||||||
|
option(BUILD_EXAMPLES "Build the examples." ${RAYLIB_IS_MAIN})
|
||||||
|
option(CUSTOMIZE_BUILD "Show options for customizing your Raylib library build." OFF)
|
||||||
|
option(ENABLE_ASAN "Enable AddressSanitizer (ASAN) for debugging (degrades performance)" OFF)
|
||||||
|
option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan) for debugging" OFF)
|
||||||
|
option(ENABLE_MSAN "Enable MemorySanitizer (MSan) for debugging (not recommended to run with ASAN)" OFF)
|
||||||
|
|
||||||
|
# Shared library is always PIC. Static library should be PIC too if linked into a shared library
|
||||||
|
option(WITH_PIC "Compile static library as position-independent code" OFF)
|
||||||
|
option(BUILD_SHARED_LIBS "Build raylib as a shared library" OFF)
|
||||||
|
option(MACOS_FATLIB "Build fat library for both i386 and x86_64 on macOS" OFF)
|
||||||
|
cmake_dependent_option(USE_AUDIO "Build raylib with audio module" ON CUSTOMIZE_BUILD ON)
|
||||||
|
|
||||||
|
enum_option(USE_EXTERNAL_GLFW "OFF;IF_POSSIBLE;ON" "Link raylib against system GLFW instead of embedded one")
|
||||||
|
if(UNIX AND NOT APPLE)
|
||||||
|
option(USE_WAYLAND "Use Wayland for window creation" OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(INCLUDE_EVERYTHING "Include everything disabled by default (for CI usage" OFF)
|
||||||
|
set(OFF ${INCLUDE_EVERYTHING} CACHE INTERNAL "Replace any OFF by default with \${OFF} to have it covered by this option")
|
||||||
|
|
||||||
|
# raylib modules included
|
||||||
|
cmake_dependent_option(SUPPORT_MODULE_RSHAPES "Include module: rshapes" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_MODULE_RTEXTURES "Include module: rtextures" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_MODULE_RTEXT "Include module: rtext" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_MODULE_RMODELS "Include module: rmodels" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_MODULE_RAUDIO "Include module: raudio" ON CUSTOMIZE_BUILD ON)
|
||||||
|
|
||||||
|
# rcore.c
|
||||||
|
cmake_dependent_option(SUPPORT_CAMERA_SYSTEM "Provide camera module (rcamera.h) with multiple predefined cameras: free, 1st/3rd person, orbital" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_GESTURES_SYSTEM "Gestures module is included (rgestures.h) to support gestures detection: tap, hold, swipe, drag" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_MOUSE_GESTURES "Mouse gestures are directly mapped like touches and processed by gestures system" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_SSH_KEYBOARD_RPI "Reconfigure standard input to receive key inputs, works with SSH connection" OFF CUSTOMIZE_BUILD OFF)
|
||||||
|
cmake_dependent_option(SUPPORT_DEFAULT_FONT "Default font is loaded on window initialization to be available for the user to render simple text. If enabled, uses external module functions to load default raylib font (module: text)" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_SCREEN_CAPTURE "Allow automatic screen capture of current screen pressing F12, defined in KeyCallback()" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_GIF_RECORDING "Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback()" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_BUSY_WAIT_LOOP "Use busy wait loop for timing sync instead of a high-resolution timer" OFF CUSTOMIZE_BUILD OFF)
|
||||||
|
cmake_dependent_option(SUPPORT_EVENTS_WAITING "Wait for events passively (sleeping while no events) instead of polling them actively every frame" OFF CUSTOMIZE_BUILD OFF)
|
||||||
|
cmake_dependent_option(SUPPORT_WINMM_HIGHRES_TIMER "Setting a higher resolution can improve the accuracy of time-out intervals in wait functions" OFF CUSTOMIZE_BUILD OFF)
|
||||||
|
cmake_dependent_option(SUPPORT_COMPRESSION_API "Support for compression API" ON CUSTOMIZE_BUILD ON)
|
||||||
|
|
||||||
|
# rshapes.c
|
||||||
|
cmake_dependent_option(SUPPORT_QUADS_DRAW_MODE "Use QUADS instead of TRIANGLES for drawing when possible. Some lines-based shapes could still use lines" ON CUSTOMIZE_BUILD ON)
|
||||||
|
|
||||||
|
# rtextures.c
|
||||||
|
cmake_dependent_option(SUPPORT_IMAGE_EXPORT "Support image exporting to file" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_IMAGE_GENERATION "Support procedural image generation functionality (gradient, spot, perlin-noise, cellular)" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_IMAGE_MANIPULATION "Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop... If not defined only three image editing functions supported: ImageFormat(), ImageAlphaMask(), ImageToPOT()" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_PNG "Support loading PNG as textures" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_DDS "Support loading DDS as textures" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_HDR "Support loading HDR as textures" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_KTX "Support loading KTX as textures" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_ASTC "Support loading ASTC as textures" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_BMP "Support loading BMP as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_TGA "Support loading TGA as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_JPG "Support loading JPG as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_GIF "Support loading GIF as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_QOI "Support loading QOI as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_PSD "Support loading PSD as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_PKM "Support loading PKM as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_PVR "Support loading PVR as textures" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||||
|
|
||||||
|
# rtext.c
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_FNT "Support loading fonts in FNT format" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_TTF "Support loading font in TTF/OTF format" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_TEXT_MANIPULATION "Support text manipulation functions" ON CUSTOMIZE_BUILD ON)
|
||||||
|
|
||||||
|
# rmodels.c
|
||||||
|
cmake_dependent_option(SUPPORT_MESH_GENERATION "Support procedural mesh generation functions, uses external par_shapes.h library. NOTE: Some generated meshes DO NOT include generated texture coordinates" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_OBJ "Support loading OBJ file format" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_MTL "Support loading MTL file format" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_IQM "Support loading IQM file format" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_GLTF "Support loading GLTF file format" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_VOX "Support loading VOX file format" ON CUSTOMIZE_BUILD ON)
|
||||||
|
|
||||||
|
# raudio.c
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_WAV "Support loading WAV for sound" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_OGG "Support loading OGG for sound" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_XM "Support loading XM for sound" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_MOD "Support loading MOD for sound" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_MP3 "Support loading MP3 for sound" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_FILEFORMAT_FLAC "Support loading FLAC for sound" ${OFF} CUSTOMIZE_BUILD OFF)
|
||||||
|
|
||||||
|
# utils.c
|
||||||
|
cmake_dependent_option(SUPPORT_STANDARD_FILEIO "Support standard file io library (stdio.h)" ON CUSTOMIZE_BUILD ON)
|
||||||
|
cmake_dependent_option(SUPPORT_TRACELOG "Show TraceLog() output messages. NOTE: By default LOG_DEBUG traces not shown" ON CUSTOMIZE_BUILD ON)
|
||||||
@ -4,22 +4,22 @@ Hello contributors! Welcome to raylib!
|
|||||||
|
|
||||||
Do you enjoy raylib and want to contribute? Nice! You can help with the following points:
|
Do you enjoy raylib and want to contribute? Nice! You can help with the following points:
|
||||||
|
|
||||||
- C programming - Can you write/review/test/improve the code?
|
- `C programming` - Can you write/review/test/improve the code?
|
||||||
- Documentation/Tutorials/Example - Can you write some tutorial/example?
|
- `Documentation/Tutorials/Example` - Can you write some tutorial/example?
|
||||||
- Web Development - Can you help [with the website](https://github.com/raysan5/raylib.com)?
|
- `Porting to other platforms` - Can you port/adapt/compile raylib on other systems?
|
||||||
- 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?
|
- `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.
|
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 philosophy
|
||||||
|
|
||||||
- raylib is a tool to enjoy videogames programming, every single function in raylib should be a tutorial on itself.
|
- raylib is a tool to **ENJOY** videogames programming, every function in raylib is designed as a mini-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 **SIMPLE** and **EASY-TO-USE**, I tried to keep it compact with a small set of functions, if a function is too complex, better not including it.
|
||||||
- raylib is open source and free; educators and institutions can use this tool to TEACH videogames programming completely by free.
|
- 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 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 for commercial products.
|
- raylib's license (and its external libs respective licenses) allow using raylib on commercial projects.
|
||||||
|
|
||||||
### Some interesting reads to start with
|
### Some interesting reads to start with
|
||||||
|
|
||||||
@ -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,
|
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),
|
it [follows Pascal-case/camel-case notation](https://github.com/raysan5/raylib/wiki/raylib-coding-conventions),
|
||||||
more common on C# language. All code formatting decisions have been carefully taken
|
more common 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:
|
Source code is extensively commented for that purpose, raylib primary learning method is:
|
||||||
|
|
||||||
> learn by reading code and examples
|
> `Learn by reading code and examples`
|
||||||
|
|
||||||
For detailed information on building raylib and examples, please see [raylib Wiki](https://github.com/raysan5/raylib/wiki).
|
For detailed information on building raylib and examples, please check [raylib Wiki](https://github.com/raysan5/raylib/wiki).
|
||||||
|
|
||||||
### Opening new Issues
|
### Opening new Issues
|
||||||
|
|
||||||
@ -68,69 +68,9 @@ To open new issue for raylib (bug, enhancement, discussion...), just try to foll
|
|||||||
If you have any doubt, don't hesitate to [contact me](mailto:ray@raylib.com)!.
|
If you have any doubt, don't hesitate to [contact me](mailto:ray@raylib.com)!.
|
||||||
You can write me a direct mail but you can also contact me on the following networks:
|
You can write me a direct mail but you can also contact me on the following networks:
|
||||||
|
|
||||||
- [raylib reddit](https://www.reddit.com/r/raylib/) - A good place for discussions or to ask for help.
|
- [raylib Discord](https://discord.gg/raylib) - A direct communication channel for project discussions.
|
||||||
- [raylib Discord](https://discord.gg/VkzNHUE) - A direct communication channel for project discussions.
|
|
||||||
- [raylib twitter](https://twitter.com/raysan5) - My personal twitter account, I usually post about raylib, you can send me PMs.
|
- [raylib twitter](https://twitter.com/raysan5) - My personal twitter account, I usually post about raylib, you can send me PMs.
|
||||||
|
- [raylib reddit](https://www.reddit.com/r/raylib/) - A good place for discussions or to ask for help.
|
||||||
- [raylib web](http://www.raylib.com/) - On top-right corner there is a bunch of networks where you can find me.
|
- [raylib web](http://www.raylib.com/) - On top-right corner there is a bunch of networks where you can find me.
|
||||||
|
|
||||||
Thank you very much for your time! :)
|
Thank you very much for your time! :)
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Here is a list of raylib contributors, these people have invested part of their time
|
|
||||||
contributing (in some way or another) to make the raylib project better. Huge thanks to all of them!
|
|
||||||
|
|
||||||
- [Zopokx](https://github.com/Zopokx) for testing the web.
|
|
||||||
- [Elendow](http://www.elendow.com) for testing and helping on web development.
|
|
||||||
- Victor Dual for implementing and testing 3D shapes functions.
|
|
||||||
- Marc Palau for implementing and testing 3D shapes functions and contribute on camera and gestures modules.
|
|
||||||
- Kevin Gato for improving texture internal formats support and helping on raygui development.
|
|
||||||
- Daniel Nicolas for improving texture internal formats support and helping on raygui development.
|
|
||||||
- Marc Agüera for testing and using raylib on a real product ([Koala Seasons](http://www.koalaseasons.com))
|
|
||||||
- Daniel Moreno for testing and using raylib on a real product ([Koala Seasons](http://www.koalaseasons.com))
|
|
||||||
- Daniel Gomez for testing and using raylib on a real product ([Koala Seasons](http://www.koalaseasons.com))
|
|
||||||
- [Sergio Martinez](https://github.com/anidealgift) for helping on raygui development and tools development (raygui_styler).
|
|
||||||
- [Victor Fisac](https://github.com/victorfisac) for developing physics raylib module (physac) and implementing PBR materials and lighting systems... among multiple other improvements and multiple tools and games.
|
|
||||||
- Albert Martos for helping on raygui and porting examples and game-templates to Android and HTML5.
|
|
||||||
- Ian Eito for helping on raygui and porting examples and game-templates to Android and HTML5.
|
|
||||||
- [procedural](https://github.com/procedural) for testing raylib on Linux, correcting some bugs and adding several mouse functions.
|
|
||||||
- [Chris Hemingway](https://github.com/cHemingway) for improving raylib on OSX build system.
|
|
||||||
- [Emanuele Petriglia](https://github.com/LelixSuper) for working on multiple GNU/Linux improvements and developing [TicTacToe](https://github.com/LelixSuper/TicTacToe) raylib game.
|
|
||||||
- [Joshua Reisenauer](https://github.com/kd7tck) for adding audio modules support (XM, MOD) and reviewing audio system.
|
|
||||||
- [Marcelo Paez](https://github.com/paezao) for helping on OSX High DPI display issue.
|
|
||||||
- [Ghassan Al-Mashareqa](https://github.com/ghassanpl) for an amazing contribution to raylib Lua module.
|
|
||||||
- [Teodor Stoenescu](https://github.com/teodor-stoenescu) for improvements on OBJ object loading.
|
|
||||||
- [RDR8](https://github.com/RDR8) for helping with Linux build improvements.
|
|
||||||
- [Saggi Mizrahi](https://github.com/ficoos) for multiple fixes on Linux and audio system.
|
|
||||||
- [Daniel Lemos](https://github.com/xspager) for fixing issues on Linux games building.
|
|
||||||
- [Joel Davis](https://github.com/joeld42) for adding raycast picking utilities and a [great example](https://github.com/raysan5/raylib/blob/master/examples/models/models_mesh_picking.c)
|
|
||||||
- [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, 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.
|
|
||||||
- [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.
|
|
||||||
- [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.
|
|
||||||
- [Seth Archambault](https://github.com/SethArchambault) for the work on Android Gamepad support (SNES model).
|
|
||||||
- [D3nX](https://github.com/D3nX) for adding Code::Blocks project template.
|
|
||||||
- [Jak Barnes](https://github.com/Syphonx) for a great work on `rnet`, new raylib network module
|
|
||||||
- [Vlad Adrian](https://github.com/Demizdor) for an amazing work on Unicode support, new shapes functions and raygui.
|
|
||||||
- [Reece Mackie](https://github.com/Rover656) for a great work on improving UWP support
|
|
||||||
- [flashback-fx](flashback-fx) for improving easings library and example
|
|
||||||
- [Jorge A. Gomes](https://github.com/overdev) for adding nine-patch textures support and example
|
|
||||||
- [Berni8k](https://github.com/Berni8k) for improving Raspberry Pi input system, using evdev
|
|
||||||
- [Wilhem Barbier](https://github.com/wbrbr) for implementing glTF loading support and solving several issues
|
|
||||||
- [Marco Lizza](https://github.com/MarcoLizza) for improving logging system and multiple issues
|
|
||||||
- [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!
|
|
||||||
|
|||||||
94
CONVENTIONS.md
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
## C Coding Style Conventions
|
||||||
|
|
||||||
|
Here it is a list with some of the code conventions used by raylib:
|
||||||
|
|
||||||
|
Code element | Convention | Example
|
||||||
|
--- | :---: | ---
|
||||||
|
Defines | ALL_CAPS | `#define PLATFORM_DESKTOP`
|
||||||
|
Macros | ALL_CAPS | `#define MIN(a,b) (((a)<(b))?(a):(b))`
|
||||||
|
Variables | lowerCase | `int screenWidth = 0;`, `float targetFrameTime = 0.016f;`
|
||||||
|
Local variables | lowerCase | `Vector2 playerPosition = { 0 };`
|
||||||
|
Global variables | lowerCase | `bool windowReady = false;`
|
||||||
|
Constants | lowerCase | `const int maxValue = 8;`
|
||||||
|
Pointers | MyType *pointer | `Texture2D *array = NULL;`
|
||||||
|
float values | always x.xf | `float gravity = 10.0f`
|
||||||
|
Operators | value1*value2 | `int product = value*6;`
|
||||||
|
Operators | value1/value2 | `int division = value/4;`
|
||||||
|
Operators | value1 + value2 | `int sum = value + 10;`
|
||||||
|
Operators | value1 - value2 | `int res = value - 5;`
|
||||||
|
Enum | TitleCase | `enum TextureFormat`
|
||||||
|
Enum members | ALL_CAPS | `PIXELFORMAT_UNCOMPRESSED_R8G8B8`
|
||||||
|
Struct | TitleCase | `struct Texture2D`, `struct Material`
|
||||||
|
Struct members | lowerCase | `texture.width`, `color.r`
|
||||||
|
Functions | TitleCase | `InitWindow()`, `LoadImageFromMemory()`
|
||||||
|
Functions params | lowerCase | `width`, `height`
|
||||||
|
Ternary Operator | (condition)? result1 : result2 | `printf("Value is 0: %s", (value == 0)? "yes" : "no");`
|
||||||
|
|
||||||
|
Some other conventions to follow:
|
||||||
|
- **ALWAYS** initialize all defined variables.
|
||||||
|
- **Do not use TABS**, use 4 spaces instead.
|
||||||
|
- Avoid trailing spaces, please, avoid them
|
||||||
|
- Control flow statements always are followed **by a space**:
|
||||||
|
```c
|
||||||
|
if (condition) value = 0;
|
||||||
|
|
||||||
|
while (!WindowShouldClose())
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < NUM_VALUES; i++) printf("%i", i);
|
||||||
|
|
||||||
|
// Be careful with the switch formatting!
|
||||||
|
switch (value)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
|
||||||
|
} break;
|
||||||
|
case 2: break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
- All conditions checks are **always between parenthesis** but not boolean values:
|
||||||
|
```c
|
||||||
|
if ((value > 1) && (value < 50) && valueActive)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
```
|
||||||
|
- When dealing with braces or curly brackets, open-close them in aligned mode:
|
||||||
|
```c
|
||||||
|
void SomeFunction()
|
||||||
|
{
|
||||||
|
// TODO: Do something here!
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**If proposing new functions, please try to use a clear naming for function-name and functions-parameters, in case of doubt, open an issue for discussion.**
|
||||||
|
|
||||||
|
## Files and Directories Naming Conventions
|
||||||
|
|
||||||
|
- Directories will be named using `snake_case`: `resources/models`, `resources/fonts`
|
||||||
|
|
||||||
|
- Files will be named using `snake_case`: `main_title.png`, `cubicmap.png`, `sound.wav`
|
||||||
|
|
||||||
|
_NOTE: Avoid any space or special character in the files/dir naming!_
|
||||||
|
|
||||||
|
## Games/Examples Directories Organization Conventions
|
||||||
|
|
||||||
|
- Data files should be organized by context and usage in the game, think about the loading requirements for data and put all the resources that need to be loaded at the same time together.
|
||||||
|
- Use descriptive names for the files, it would be perfect if just reading the name of the file, it was possible to know what is that file and where fits in the game.
|
||||||
|
- Here it is an example, note that some resources require to be loaded all at once while other require to be loaded only at initialization (gui, font).
|
||||||
|
|
||||||
|
```
|
||||||
|
resources/audio/fx/long_jump.wav
|
||||||
|
resources/audio/music/main_theme.ogg
|
||||||
|
resources/screens/logo/logo.png
|
||||||
|
resources/screens/title/title.png
|
||||||
|
resources/screens/gameplay/background.png
|
||||||
|
resources/characters/player.png
|
||||||
|
resources/characters/enemy_slime.png
|
||||||
|
resources/common/font_arial.ttf
|
||||||
|
resources/common/gui.png
|
||||||
|
```
|
||||||
137
FAQ.md
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
# Frequently Asked Questions
|
||||||
|
|
||||||
|
- [What is raylib?](#what-is-raylib)
|
||||||
|
- [What can I do with raylib?](#what-can-i-do-with-raylib)
|
||||||
|
- [Which kinds of games can I make with raylib?](#which-kinds-of-games-can-i-make-with-raylib)
|
||||||
|
- [Can I create non-game applications with raylib?](#can-i-create-non-game-applications-with-raylib)
|
||||||
|
- [How can I learn to use raylib? Is there some official documentation or tutorials?](#how-can-i-learn-to-use-raylib-is-there-some-official-documentation-or-tutorials)
|
||||||
|
- [How much does it cost?](#how-much-does-it-cost)
|
||||||
|
- [What is the raylib license?](#what-is-the-raylib-license)
|
||||||
|
- [What platforms are supported by raylib?](#what-platforms-are-supported-by-raylib)
|
||||||
|
- [What programming languages can I use with raylib?](#what-programming-languages-can-i-use-with-raylib)
|
||||||
|
- [Why is it coded in C?](#why-is-it-coded-in-c)
|
||||||
|
- [Is raylib a videogames engine?](#is-raylib-a-videogames-engine)
|
||||||
|
- [What does raylib provide that other engines or libraries don't?](#what-does-raylib-provide-that-other-engines-or-libraries-dont)
|
||||||
|
- [How does raylib compare to Unity/Unreal/Godot?](#how-does-raylib-compare-to-unityunrealgodot)
|
||||||
|
- [What development tools are required for raylib?](#what-development-tools-are-required-for-raylib)
|
||||||
|
- [Which are raylib external dependencies?](#which-are-raylib-external-dependencies)
|
||||||
|
- [Can I use raylib with other technologies or libraries?](#can-i-use-raylib-with-other-technologies-or-libraries)
|
||||||
|
- [What file formats are supported by raylib?](#what-file-formats-are-supported-by-raylib)
|
||||||
|
- [Does raylib support the Vulkan API?](#does-raylib-support-the-vulkan-api)
|
||||||
|
- [What could I expect to see in raylib in the future?](#what-could-i-expect-to-see-in-raylib-in-the-future)
|
||||||
|
- [Who are the raylib developers?](#who-are-the-raylib-developers)
|
||||||
|
|
||||||
|
### What is raylib?
|
||||||
|
|
||||||
|
raylib is a C programming library, designed to be simple and easy-to-use. It provides a set of functions intended for graphics/multimedia applications programming.
|
||||||
|
|
||||||
|
### What can I do with raylib?
|
||||||
|
|
||||||
|
raylib can be used to create any kind of graphics/multimedia applications: videogames, tools, mobile apps, web applications... Actually it can be used to create any application that requires something to be shown in a display with graphic hardware acceleration (OpenGL); including [IoT](https://en.wikipedia.org/wiki/Internet_of_things) devices with a graphics display.
|
||||||
|
|
||||||
|
### Which kinds of games can I make with raylib?
|
||||||
|
|
||||||
|
With enough time and effort any kind of game/application can be created but small-mid sized 2d videogames are the best fit. The raylib [examples](https://www.raylib.com/examples.html)/[games](https://www.raylib.com/games.html) and [raylibtech](https://raylibtech.itch.io/) tools are an example of what can be accomplished with raylib.
|
||||||
|
|
||||||
|
### Can I create non-game applications with raylib?
|
||||||
|
|
||||||
|
Yes, raylib can be used to create any kind of application, not just videogames. For example, it can be used to create [desktop/web tools](https://raylibtech.itch.io/) or also applications for an IoT devices like [Raspberry Pi](https://www.raspberrypi.org/).
|
||||||
|
|
||||||
|
### How can I learn to use raylib? Is there some official documentation or tutorials?
|
||||||
|
|
||||||
|
raylib does not provide a "standard" API reference documentation like other libraries, all of the raylib functionality is exposed in a simple [cheatsheet](https://www.raylib.com/cheatsheet/cheatsheet.html). Most of the functions are self-explanatory and the required parameters are very intuitive. It's also highly recommended to take a look to [`raylib.h`](https://github.com/raysan5/raylib/blob/master/src/raylib.h) header file or even the source code, that is very clean and organized, intended for teaching.
|
||||||
|
|
||||||
|
raylib also provides a big [collection of examples](https://www.raylib.com/examples.html), to showcase the multiple functionality usage (+120 examples). Examples are categorized by the internal module functionality and also define an estimated level of difficulty to guide the users checking them.
|
||||||
|
|
||||||
|
There is also a [FAQ on the raylib Wiki](https://github.com/raysan5/raylib/wiki/Frequently-Asked-Questions) with common technical questions.
|
||||||
|
|
||||||
|
There are also many tutorials on the internet and YouTube created by the growing raylib community along the years.
|
||||||
|
|
||||||
|
[raylib Discord Community](https://discord.gg/raylib) is also a great place to join and ask questions, the community is very friendly and always ready to help.
|
||||||
|
|
||||||
|
### How much does it cost?
|
||||||
|
|
||||||
|
raylib is [free and open source](https://github.com/raysan5/raylib). Anyone can use raylib library for free to create games/tools/apps but also the source code of raylib is open for anyone to check it, modify it, adapt it as required or just learn how it works internally.
|
||||||
|
|
||||||
|
### What is the raylib license?
|
||||||
|
|
||||||
|
raylib source code is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check [LICENSE](https://github.com/raysan5/raylib/blob/master/LICENSE) for further details.
|
||||||
|
|
||||||
|
### What platforms are supported by raylib?
|
||||||
|
|
||||||
|
raylib source code can be compiled for the following platforms:
|
||||||
|
|
||||||
|
- Windows (7, 8.1, 10, 11)
|
||||||
|
- Linux - Desktop (multiple distributions, X11 and Wayland based)
|
||||||
|
- Linux - Native (no windowing system, [DRM](https://en.wikipedia.org/wiki/Direct_Rendering_Manager))
|
||||||
|
- macOS (multiple versions, including ARM64)
|
||||||
|
- FreeBSD, OpenBSD, NetBSD, DragonFly
|
||||||
|
- Raspberry Pi (desktop and native)
|
||||||
|
- Android (multiple API versions and architectures)
|
||||||
|
- HTML5 (WebAssembly)
|
||||||
|
- Haiku
|
||||||
|
|
||||||
|
raylib code has also been ported to several [homebrew](https://en.wikipedia.org/wiki/Homebrew_(video_games)) platforms: N3DS, Switch, PS4, PSVita.
|
||||||
|
|
||||||
|
Also note that raylib is a low-level library that can be easily ported to any platform with OpenGL support (or similar API).
|
||||||
|
|
||||||
|
### What programming languages can I use with raylib?
|
||||||
|
|
||||||
|
raylib original version is coded in C language (using some C99 features) but it has bindings to +60 programming languages. Check [BINDINGS.md](https://github.com/raysan5/raylib/blob/master/BINDINGS.md) for details.
|
||||||
|
|
||||||
|
### Why is it coded in C?
|
||||||
|
|
||||||
|
It's a simple language, no high-level code abstractions like [OOP](https://en.wikipedia.org/wiki/Object-oriented_programming), just data types and functions. It's a very enjoyable language to code.
|
||||||
|
|
||||||
|
### Is raylib a videogames engine?
|
||||||
|
|
||||||
|
I personally consider raylib a graphics library with some high-level features rather than an engine. The line that separates a library/framework from an engine could be very confusing; raylib provides all the required functionality to create simple games or small applications but it does not provide 3 elements that I personally consider any "engine" should provide: Screen manager, GameObject/Entity manager and Resource Manager. Still, most users do not need those elements or just code simple approaches on their own.
|
||||||
|
|
||||||
|
### What does raylib provide that other engines or libraries don't?
|
||||||
|
|
||||||
|
I would say "simplicity" and "enjoyment" at a really low-level of coding but actually is up to the user to discover it, to try it and to see if it fits their needs. raylib is not good for everyone but it's worth a try.
|
||||||
|
|
||||||
|
### How does raylib compare to Unity/Unreal/Godot?
|
||||||
|
|
||||||
|
Those engines are usually big and complex to use, providing lot of functionality. They require some time to learn and test, they usually abstract many parts of the game development process and they usually provide a set of tools to assist users on their creations (like a GUI editor).
|
||||||
|
|
||||||
|
raylib is a simple programming library, with no integrated tools or editors. It gives full control to users at a very low-level to create graphics applications in a more handmade way.
|
||||||
|
|
||||||
|
### What development tools are required for raylib?
|
||||||
|
|
||||||
|
To develop raylib programs you only need a text editor (with recommended code syntax highlighting) and a compiler.
|
||||||
|
|
||||||
|
A [raylib Windows Installer](https://raysan5.itch.io/raylib) package is distributed including the Notepad++ editor and MinGW (GCC) compiler pre-configured for Windows for new users as an starter-pack but for more advance configurations with other editors/compilers, [raylib Wiki](https://github.com/raysan5/raylib/wiki) provides plenty of configuration tutorials.
|
||||||
|
|
||||||
|
### What are raylib's external dependencies?
|
||||||
|
|
||||||
|
raylib is self-contained, it has no external dependencies to build it. But internally raylib uses several libraries from other developers, mostly used to load specific file-formats.
|
||||||
|
|
||||||
|
A detailed list of raylib dependencies could be found on the [raylib Wiki](https://github.com/raysan5/raylib/wiki/raylib-dependencies).
|
||||||
|
|
||||||
|
### Can I use raylib with other technologies or libraries?
|
||||||
|
|
||||||
|
Yes, raylib can be used with other libraries that provide specific functionality. There are multiple examples of raylib integrations with libraries like Spine, Tiled, Dear Imgui and several physics engines.
|
||||||
|
|
||||||
|
### What file formats are supported by raylib?
|
||||||
|
|
||||||
|
raylib can load data from multiple standard file formats:
|
||||||
|
|
||||||
|
- Image/Textures: PNG, BMP, TGA, JPG, GIF, QOI, PSD, DDS, HDR, KTX, ASTC, PKM, PVR
|
||||||
|
- Fonts: FNT (sprite font), TTF, OTF
|
||||||
|
- Models/Meshes: OBJ, IQM, GLTF, VOX
|
||||||
|
- Audio: WAV, OGG, MP3, FLAC, XM, MOD
|
||||||
|
|
||||||
|
### Does raylib support the Vulkan API?
|
||||||
|
|
||||||
|
No, raylib is built on top of OpenGL API, and there are currently no plans to support any other graphics APIs. In any case, raylib uses rlgl as an abstraction layer to support different OpenGL versions. If really required, a Vulkan backend equivalent could be added but creating that abstraction layer would imply a considerable amount of work.
|
||||||
|
|
||||||
|
### What could I expect to see in raylib in the future?
|
||||||
|
|
||||||
|
The main focus of the library is simplicity. Most of the efforts are invested in maintainability and bug-fixing. Despite new small features are regularly added, it's not the objective for raylib to become a full-featured engine. Personally I prefer to keep it small and enjoyable.
|
||||||
|
|
||||||
|
### Who are the raylib developers?
|
||||||
|
|
||||||
|
The main raylib developer and maintainer is [Ramon Santamaria](https://www.linkedin.com/in/raysan/) but there's 360+ contributors that have helped by adding new features, testing the library and solving issues in the 9+ years life of raylib.
|
||||||
|
|
||||||
|
The full list of raylib contributors can be seen [on GitHub](https://github.com/raysan5/raylib/graphs/contributors).
|
||||||
298
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.
|
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.
|
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.
|
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.
|
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.
|
||||||
|
|
||||||
@ -33,13 +33,13 @@ Lots of code changes and lot of testing have concluded in this amazing new rayli
|
|||||||
notes on raylib 1.2
|
notes on raylib 1.2
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
On September 2014, after 5 month of raylib 1.1 release, it comes raylib 1.2. Again, this version presents a complete internal redesign of [core](https://github.com/raysan5/raylib/blob/master/src/core.c) module to support two new platforms: [Android](http://www.android.com/) and [Raspberry Pi](http://www.raspberrypi.org/).
|
On September 2014, after 5 month of raylib 1.1 release, it comes raylib 1.2. Again, this version presents a complete internal redesign of [core](https://github.com/raysan5/raylib/blob/master/src/rcore.c) module to support two new platforms: [Android](http://www.android.com/) and [Raspberry Pi](http://www.raspberrypi.org/).
|
||||||
|
|
||||||
It's been some month of really hard work to accomodate raylib to those new platforms while keeping it easy for the users. On Android, raylib manages internally the activity cicle, as well as the inputs; on Raspberry Pi, a complete raw input system has been written from scratch.
|
It's been some 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.
|
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).
|
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/rcamera.c) module offers to the user multiple preconfigured ready-to-use camera systems (free camera, 1st person, 3rd person). Camera modes are very easy to use, just check examples: [core_3d_camera_free.c](https://github.com/raysan5/raylib/blob/master/examples/core_3d_camera_free.c) and [core_3d_camera_first_person.c](https://github.com/raysan5/raylib/blob/master/examples/core_3d_camera_first_person.c).
|
||||||
|
|
||||||
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/rgestures.h) module simplifies gestures detection on Android and HTML5 programs.
|
||||||
|
|
||||||
[raygui](https://github.com/raysan5/raylib/blob/master/src/raygui.h), the new immediate-mode GUI module offers a set of functions to create simple user interfaces, primary intended for tools development. It's still in experimental state but already fully functional.
|
- [raygui](https://github.com/raysan5/raylib/blob/master/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.
|
Most of the examples have been completely rewritten and +10 new examples have been added to show the new raylib features.
|
||||||
|
|
||||||
@ -69,22 +69,22 @@ 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.
|
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/rgestures.c) module has redesigned and simplified, now it can process touch events from any source, including mouse. This way, gestures system can be used on any platform providing an unified way to work with inputs and allowing the user to create multiplatform games with only one source code.
|
||||||
|
|
||||||
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,
|
Other important improvements are the functional raycast system for 3D picking, including some ray collision-detection functions,
|
||||||
and the addition of two simple functions for persistent data storage. Now raylib user can save and load game data in a file (only some platforms supported). A simple [easings](https://github.com/raysan5/raylib/blob/master/src/easings.h) module has also been added for values animation.
|
and the addition of two simple functions for persistent data storage. Now raylib 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.
|
||||||
|
|
||||||
Up to 8 new code examples have been added to show the new raylib features and +10 complete game samples have been provided to learn
|
Up to 8 new code examples have been added to show the new raylib features and +10 complete game samples have been provided to learn
|
||||||
how to create some classic games like Arkanoid, Asteroids, Missile Commander, Snake or Tetris.
|
how to create some classic games like Arkanoid, Asteroids, Missile Commander, Snake or Tetris.
|
||||||
|
|
||||||
Lots of code changes and lots of hours of hard work have concluded in this amazing new raylib 1.4.
|
Lots of code changes and lots of hours of hard work have concluded in this amazing new raylib 1.4.
|
||||||
@ -94,19 +94,19 @@ 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.
|
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.
|
Other additions include a [2D camera system](https://github.com/raysan5/raylib/blob/master/examples/core_2d_rcamera.c), render textures for offline render (and most comprehensive [postprocessing](https://github.com/raysan5/raylib/blob/master/examples/shaders_postprocessing.c)) or support for legacy OpenGL 2.1 on desktop platforms.
|
||||||
|
|
||||||
This new version is so massive that is difficult to list all the improvements, most of raylib modules have been reviewed and [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.c) module has been completely redesigned to accomodate to new material-lighting systems and stereo rendering. You can check [CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG) file for a more detailed list of changes.
|
This new version is so massive that is difficult to list all the improvements, most of raylib modules have been reviewed and [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.c) module has been completely redesigned to accomodate to new material-lighting systems and stereo rendering. You can check [CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG) file for a more detailed list of changes.
|
||||||
|
|
||||||
@ -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:
|
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.
|
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:
|
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...
|
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:
|
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).
|
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:
|
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).
|
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,195 @@ notes on raylib 2.5
|
|||||||
|
|
||||||
After almost one years since latest raylib installment, here it is **raylib 2.5**. A lot of work has been put on this new version and consequently I decided to bump versioning several digits. The complete list of changes and additions is humungous, details can be found in the [CHANGELOG](CHANGELOG), and here it is a short recap with the highlight improvements.
|
After almost one years since latest raylib installment, here 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.
|
**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.
|
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.
|
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/raylib), 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 - 7th Anniversary Edition
|
||||||
|
---------------------------------------------
|
||||||
|
|
||||||
|
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](https://github.com/psp2dev/raylib4Vita).
|
||||||
|
|
||||||
|
- 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! :)
|
||||||
|
|
||||||
|
notes on raylib 3.7
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
April 2021, it's been about 4 months since last raylib release and here it is already a new one, this time with a bunch of internal redesigns and improvements. Surprisingly, on April the 8th I was awarded for a second time with the [Google Open Source Peer Bonus Award](https://opensource.googleblog.com/2021/04/announcing-first-group-of-google-open-source-peer-bonus-winners.html) for my contribution to open source world with raylib and it seems the library is getting some traction, what a better moment for a new release? Let's see what can be found in this new version:
|
||||||
|
|
||||||
|
Let's start with some numbers:
|
||||||
|
|
||||||
|
- **+100** closed issues (for a TOTAL of **+900**!)
|
||||||
|
- **+400** commits since previous RELEASE
|
||||||
|
- **+50** functions ADDED (**+30** of them to rlgl API)
|
||||||
|
- **+30** functions REVIEWED/REDESIGNED
|
||||||
|
- **+40** new contributors (for a TOTAL of **+210**!)
|
||||||
|
|
||||||
|
Highlights for `raylib 3.7`:
|
||||||
|
|
||||||
|
- **REDESIGNED: `rlgl` module for greater abstraction level**. This suppose an **important change in raylib architecture**, now `rlgl` functionality is self-contained in the module and used by higher-level layers (specially by `core` module), those upper layers are the ones that expose functionality to the main API when required, for example the `Shaders`, `Mesh` and `Materials` functionality. Multiple `rlgl` functions have been renamed for consistency, in this case, following the `rl*()` prefix convention. Functions have also been reorganized internally by categories and `GenTexture*()` functions have been removed from the library and moved to [`models_material_pbr`](https://github.com/raysan5/raylib/blob/master/examples/models/models_material_pbr.c) example.
|
||||||
|
|
||||||
|
- **REDESIGNED: VR simulator and stereo rendering mechanism**. A **brand new API** has been added, more comprehensive and better integrated with raylib, the **new stereo rendering** can be combined with `RenderTexture` and `Shader` API allowing the user to **manage fbo and distortion shader directly**. Also, the new rendering mechanism supports **instancing on stereo rendering**! Check the updated [`core_vr_simulator`](https://github.com/raysan5/raylib/blob/master/examples/core/core_vr_simulator.c) example for reference!
|
||||||
|
|
||||||
|
- **ADDED: New file access callbacks system**. Several new callback functions have been added to the API to allow custom file loaders. A [nice example](https://github.com/RobLoach/raylib-physfs) it's the **raylib integration with a virtual file system** [PhysFS](https://icculus.org/physfs/).
|
||||||
|
|
||||||
|
- **ADDED: glTF animations support**. glTF is the preferred models file format to be used with raylib and along the addition of a models animation API on latest raylib versions, now animations support for glTF format has come to raylib, thanks for this great contribution to [Hristo Stamenov](@object71)
|
||||||
|
|
||||||
|
- **ADDED: Music streaming support from memory**. raylib has been adding the `Load*FromMemory()` option to all its supported file formats but **music streaming** was not supported yet... until now. Thanks to this great contribution by [Agnis "NeZvērs" Aldiņš](@nezvers), now raylib supports music streamming from memory data for all supported file formats: WAV, OGG, MP3, FLAC, XM and MOD.
|
||||||
|
|
||||||
|
- **RENAMED: enums values for consistency**. Most raylib enums names and values names have been renamed for consistency, now all value names start with the type of data they represent. It increases clarity and readability when using those values and also **improves overall library consistency**.
|
||||||
|
|
||||||
|
Beside those key changes, many functions have been reviewed with improvements and bug fixes, many of them contributed by the community! Thanks! And again, this release sets a **new milestone for raylib library**. Make sure to check [CHANGELOG](CHANGELOG) for detailed list of changes! Hope you enjoy this new raylib installment!
|
||||||
|
|
||||||
|
Happy **gamedev/tools/graphics** programming! :)
|
||||||
|
|
||||||
|
notes on raylib 4.0 - 8th Anniversary Edition
|
||||||
|
---------------------------------------------
|
||||||
|
|
||||||
|
It's been about 6 months since last raylib release and it's been **8 years since I started with this project**, what an adventure! It's time for a new release: `raylib 4.0`, **the biggest release ever** and an inflexion point for the library. Many hours have been put in this release to make it special, **many library details have been polished**: syntax, naming conventions, code comments, functions descriptions, log outputs... Almost all the issues have been closed (only 3 remain open at the moment of this writing) and some amazing new features have been added. I expect this **`raylib 4.0`** to be a long term version (LTS), stable and complete enough for any new graphic/game/tool application development.
|
||||||
|
|
||||||
|
Let's start with some numbers:
|
||||||
|
|
||||||
|
- **+130** closed issues (for a TOTAL of **+1030**!)
|
||||||
|
- **+550** commits since previous RELEASE
|
||||||
|
- **+20** functions ADDED to raylib API
|
||||||
|
- **+60** functions ADDED to rlgl API
|
||||||
|
- **+40** functions RENAMED/REVIEWED/REDESIGNED
|
||||||
|
- **+60** new contributors (for a TOTAL of **+275**!)
|
||||||
|
|
||||||
|
Highlights for `raylib 4.0`:
|
||||||
|
|
||||||
|
- **Naming consistency and coherency**: `raylib` API has been completely reviewed to be consistent on naming conventions for data structures and functions, comments and descriptions have been reviewed, also the syntax of many symbols for consistency; some functions and structs have been renamed (i.e. `struct CharInfo` to `struct GlyphInfo`). Output log messages have been also improved to show more info to the users. Several articles have been writen in this process: [raylib_syntax analysis](https://github.com/raysan5/raylib/wiki/raylib-syntax-analysis) and [raylib API usage analysis](https://gist.github.com/raysan5/7c0c9fff1b6c19af24bb4a51b7383f1e). In general, a big polishment of the library to make it more consistent and coherent.
|
||||||
|
|
||||||
|
- **Event Automation System**: This new _experimental_ feature has been added for future usage, it allows to **record input events and re-play them automatically**. This feature could be very useful to automatize examples testing but also for tutorials with assited game playing, in-game cinematics, speedruns, AI playing and more! Note this feature is still experimental.
|
||||||
|
|
||||||
|
- **Custom game-loop control**: As requested by some advance users, **the game-loop control can be exposed** compiling raylib with the config flag: `SUPPORT_CUSTOM_FRAME_CONTROL`. It's intended for advance users that want to control the events polling and also the timming mechanisms of their games.
|
||||||
|
|
||||||
|
- [**`rlgl 4.0`**](https://github.com/raysan5/raylib/blob/master/src/rlgl.h): This module has been completely **decoupled from platform layer** and raylib, now `rlgl` single-file header-only library only depends on the multiple OpenGL backends supported, even the dependency on `raymath` has been removed. Additionally, **support for OpenGL 4.3** has been added, supporting compute shaders and Shader Storage Buffer Objects (SSBO). Now `rlgl` can be used as a complete standalone portable library to wrap several OpenGL version and providing **a simple and easy-to-use pseudo-OpenGL immediate-mode API**.
|
||||||
|
|
||||||
|
- [**`raymath 1.5`**](https://github.com/raysan5/raylib/blob/master/src/raymath.h): This module has been reviewed and some new conventions have been adopted to make it **more portable and self-contained**:
|
||||||
|
- Functions are self-contained, no function use other raymath function inside, required code is directly re-implemented
|
||||||
|
- Functions input parameters are always received by value
|
||||||
|
- Functions use always a "result" variable for return
|
||||||
|
- Angles are always in radians (`DEG2RAD`/`RAD2DEG` macros provided for convenience)
|
||||||
|
|
||||||
|
- [**`raygui 3.0`**](https://github.com/raysan5/raygui): The **official raylib immediate-mode gui library** (included in `raylib/src/extras`) has been updated to a new version, embedding the icons collection and adding mulstiple improvements. It has been simplified and constrained for a better focus on its task: provide a simple and easy-to-use immediate-mode-gui library for small tools development.
|
||||||
|
|
||||||
|
- [**`raylib_parser`**](https://github.com/raysan5/raylib/tree/master/parser): Added **new tool to parse `raylib.h`** and tokenize its enums, structs and functions, extracting all required info (name, params, descriptions...) into custom output formats (TXT, XML, JSON...) for further processing. This tool is specially useful to **automatize bindings generation**. Hopefully, this tool will make life easier to binding creators to update their bindings for raylib 4.0 or adding new ones!
|
||||||
|
|
||||||
|
- **Zig and Odin official support for raylib**: Those two new amazing programming languages are officially supporting raylib, `Zig` lists raylib as an [official example for C interoperatibility](https://ziglang.org/learn/samples/#c-interoperability) and Odin [officially supports raylib as a vendor library](https://github.com/odin-lang/Odin/tree/master/vendor/raylib). Both languages also have several bingings to raylib. Additionally, Zig build system supported has been added to compile raylib library and examples.
|
||||||
|
|
||||||
|
Those are some of the key features for this new release but actually there is way more! **Support for `VOX` ([MagikaVoxel](https://ephtracy.github.io/)) 3d model format** has been added, **new [raylib_game_template](https://github.com/raysan5/raylib-game-template)** repo shared, **new `EncodeDataBase64()` and `DecodeDataBase64()` functions** added, **improved HiDPI support**, new `DrawTextPro()` with support for text rotations, completely **reviewed `glTF` models loading**, added **`SeekMusicStream()` for music seeking**, many new examples and +20 examples reviewed... **hundreds of improvements and bug fixes**! Make sure to check [CHANGELOG](CHANGELOG) for a detailed list of changes!
|
||||||
|
|
||||||
|
Undoubtely, **this is the best raylib ever**. Enjoy gamedev/tools/graphics programming! :)
|
||||||
|
|
||||||
|
notes on raylib 4.2
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
**New raylib release!** Nine months after latest raylib, here it is a new version. It was supposed to be just a small update but, actually, it's a huge update with lots of changes a improvements. It has been possible thanks to the many contributors that has helped with issues and improvements, it's the **update with more contributors to date** and that's amazing!
|
||||||
|
|
||||||
|
Some numbers to start with:
|
||||||
|
|
||||||
|
- **+200** closed issues (for a TOTAL of **1230**!)
|
||||||
|
- **+540** commits since previous RELEASE (for a TOTAL of **+6000**!)
|
||||||
|
- **+20** functions ADDED to raylib API (for a TOTAL of **502**!)
|
||||||
|
- **+60** functions REVIEWED/REDESIGNED
|
||||||
|
- **+70** new contributors (for a TOTAL of **+360**!)
|
||||||
|
|
||||||
|
Highlights for `raylib 4.2`:
|
||||||
|
|
||||||
|
- **raylib extra libraries cleanup**: raylib has been on diet and all the _extra_ libraries included on previous releases have been removed from raylib. Now raylib only includes the original **7** raylib modules: `rcore`, `rlgl`, `rshapes`, `rtextures`, `rtext`, `rmodels` and `raudio`. But no worries, _extra_ libraries have not been deleted, they have been moved to their own repos for better maintainability and more focus on its functionality. The libraries moved out from raylib repo are: [`raygui`](https://github.com/raysan5/raygui), [`physac`](https://github.com/raysan5/physac), [`rmem`](https://github.com/raylib-extras/rmem), [`reasings`](https://github.com/raylib-extras/reasings) and [`raudio`](https://github.com/raysan5/raudio) (standalone mode). On that same line, a new **amazing GitHub group:** [`raylib-extras`](https://github.com/raylib-extras) has been created by @JeffM2501 to contain raylib extra libraries as well as other raylib add-ons provided by the community. Jeff has done an amazing work on that line, providing multiple libraries and examples for raylib, like [custom first-person and third person camera systems](https://github.com/raylib-extras/extras-c/tree/main/cameras), [Dear ImGui raylib integration](https://github.com/raylib-extras/rlImGui), [multiple specific examples](https://github.com/raylib-extras/examples-c) and even a complete [RPG Game Example](https://github.com/raylib-extras/RPGExample)! Great work Jeff! :D
|
||||||
|
|
||||||
|
- **raylib examples review**: The +120 raylib examples have been reviewed to add clearer information about when the were first created (raylib version used) and when they were updated for the last time. But the greatest improvement for users has been the **addition of an estimated difficulty level** for every example, [web has been updated accordingly](https://www.raylib.com/examples.html) to reflect those difficulty levels. Now examples are classified with **1 to 4 stars** depending on difficulty to help users with their learning process. Personally, I think this "small" addition could be a game-changer to better guide new users on the library adoption! Additionally, this new raylib release includes 7 new examples; the most interesting one: [`text_codepoints_loading`](https://www.raylib.com/examples/text/loader.html?name=text_codepoints_loading) that illustrates how to load and draw custom codepoints from a font file, very useful for Asian languages.
|
||||||
|
|
||||||
|
- [**`rres 1.0`**](https://github.com/raysan5/rres): New `rres` **resources packaging file-format**, including a [`rres-raylib`](https://github.com/raysan5/rres/blob/master/src/rres-raylib.h) library implementation and [`rrespacker`](https://raylibtech.itch.io/rrespacker) tool. `rres` file format has been [under development for +8 years](https://github.com/raysan5/rres#design-history) and it was originally created to be part of raylib. It was highly inspired by _XNA XNB_ resources file format but design has changed a lot along the years. This first release of the format specs is engine-agnostic and has been designed to be portable to any engine, including lots of professional features like data processing, compression and encryption.
|
||||||
|
|
||||||
|
- [**`raygui 3.2`**](https://github.com/raysan5/raygui): The **official raylib immediate-mode gui library** designed for tools development has been updated to a new version aligned with raylib 4.2. Multiple controls have been reviewed for library consistency, now all controls follow a similar function signature. It has been battle-tested with the development of +8 published tools in the last months. The tools can be seen and used for free in the [raylib technologies tools page](https://raylibtech.itch.io/). Worth mentioning that several of those **tools have been open sourced** for anyone to use, compile, contribute or learn how the code works.
|
||||||
|
|
||||||
|
- [**`raylib_parser`**](https://github.com/raysan5/raylib/tree/master/parser): Multiple contributors **using the tool to automatize bindings creation** have contributed with improvements of this **tool to parse `raylib.h`** (and other raylib-style headers) to tokenize its enums, structs and functions. Processed data can be exported to custom file formats (i.e XML, JSON, LUA) for bindings generation or even docs generation if required.
|
||||||
|
|
||||||
|
- **New file system API**: Current API has been redesigned to be more comprehensive and better aligned with raylib naming conventions, two new functions are provided `LoadDirectoryFiles()`/`LoadDirectoryFilesEx()` to load a `FilePathList` for provided path, supporting extension filtering and recursive directory scan. `LoadDroppedFiles()` has been renamed to better reflect its internal functionality. Now, all raylib functions that start with `Load*()` allocate memory internally and a equivalent `Unload*()` function is defined to take care of that memory internally when not required any more!
|
||||||
|
|
||||||
|
- **New audio stream processors API** (_experimental_): Now real-time audio stream data processors can be added using callbacks to played Music. It allows users to create custom effects for audio like delays of low-pass-filtering (example provided). The new API uses a callback system and it's still _ highly experimental_, it differs from the usual level of complexity that provides raylib and it is intended for advance users. It could change in the future but, actually, `raudio` module is in the spotlight for future updates; [miniaudio](https://github.com/mackron/miniaudio) implements a new higher-level API that can be useful in the future for raylib.
|
||||||
|
|
||||||
|
As always, there are more improvements than the key features listed, make sure to check raylib [CHANGELOG](CHANGELOG) for the detailed list of changes; for this release a `WARNING` flag has been added to all the changes that could affect bindings or productivity code. **raylib keeps improving one more version** and a special focus on maintainability has been put on the library for the future. Specific/advance functionality will be provided through **raylib-extras** repos and raylib main repo devlelopment will be focused on what made raylib popular: being a simple and easy-to-use library to **enjoy videogames programming**.
|
||||||
|
|
||||||
|
**Enjoy gamedev/tools/graphics programming!** :)
|
||||||
|
|||||||
2
LICENSE
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2013-2020 Ramon Santamaria (@raysan5)
|
Copyright (c) 2013-2022 Ramon Santamaria (@raysan5)
|
||||||
|
|
||||||
This software is provided "as-is", without any express or implied warranty. In no event
|
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.
|
will the authors be held liable for any damages arising from the use of this software.
|
||||||
|
|||||||
149
README.md
@ -1,81 +1,146 @@
|
|||||||
<img align="left" src="https://github.com/raysan5/raylib/blob/master/logo/raylib_256x256.png" width=256>
|
<img align="left" src="https://github.com/raysan5/raylib/blob/master/logo/raylib_logo_animation.gif" width="288px">
|
||||||
|
|
||||||
**raylib is a simple and easy-to-use library to enjoy videogames programming.**
|
**raylib is a simple and easy-to-use library to enjoy videogames programming.**
|
||||||
|
|
||||||
raylib is highly inspired by Borland BGI graphics lib and by XNA framework and it's specially well suited for prototyping, tooling, graphical applications, embedded systems and education.
|
raylib is highly inspired by Borland BGI graphics lib and by XNA framework and it's specially well suited for prototyping, tooling, graphical applications, embedded systems and education.
|
||||||
|
|
||||||
*NOTE for ADVENTURERS: raylib is a programming library to enjoy videogames programming; no fancy interface, no visual helpers, no auto-debugging... just coding in the most pure spartan-programmers way.*
|
*NOTE for ADVENTURERS: raylib is a programming library to enjoy videogames programming; no fancy interface, no visual helpers, no debug button... just coding in the most pure spartan-programmers way.*
|
||||||
|
|
||||||
Ready to learn? Jump to [code examples!](http://www.raylib.com/examples.html)
|
Ready to learn? Jump to [code examples!](https://www.raylib.com/examples.html)
|
||||||
|
|
||||||
[](https://travis-ci.org/raysan5/raylib)
|
---
|
||||||
[](https://ci.appveyor.com/project/raysan5/raylib)
|
|
||||||
[](https://discord.gg/VkzNHUE)
|
<br>
|
||||||
|
|
||||||
|
[](https://github.com/raysan5/raylib/graphs/contributors)
|
||||||
|
[](https://github.com/raysan5/raylib/releases)
|
||||||
|
[](https://github.com/raysan5/raylib/stargazers)
|
||||||
|
[](https://github.com/raysan5/raylib/commits/master)
|
||||||
|
[](https://repology.org/project/raylib/versions)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
[](https://twitter.com/raysan5)
|
|
||||||
|
|
||||||
[](https://github.com/raysan5/raylib/actions)
|
[](https://discord.gg/raylib)
|
||||||
[](https://github.com/raysan5/raylib/actions)
|
[](https://www.reddit.com/r/raylib/)
|
||||||
[](https://github.com/raysan5/raylib/actions)
|
[](https://www.youtube.com/c/raylib)
|
||||||
|
[](https://www.twitch.tv/raysan5)
|
||||||
|
[](https://twitter.com/raysan5)
|
||||||
|
|
||||||
|
|
||||||
|
[](https://github.com/raysan5/raylib/actions?query=workflow%3AWindows)
|
||||||
|
[](https://github.com/raysan5/raylib/actions?query=workflow%3ALinux)
|
||||||
|
[](https://github.com/raysan5/raylib/actions?query=workflow%3AmacOS)
|
||||||
|
[](https://github.com/raysan5/raylib/actions?query=workflow%3AAndroid)
|
||||||
|
[](https://github.com/raysan5/raylib/actions?query=workflow%3AWebAssembly)
|
||||||
|
|
||||||
|
[](https://github.com/raysan5/raylib/actions?query=workflow%3ACMakeBuilds)
|
||||||
|
[](https://github.com/raysan5/raylib/actions/workflows/windows_examples.yml)
|
||||||
|
[](https://github.com/raysan5/raylib/actions/workflows/linux_examples.yml)
|
||||||
|
|
||||||
features
|
features
|
||||||
--------
|
--------
|
||||||
- **NO external dependencies**, all required libraries are bundled into raylib
|
- **NO external dependencies**, all required libraries are [bundled into raylib](https://github.com/raysan5/raylib/tree/master/src/external)
|
||||||
- Multiple platforms supported: **Windows, Linux, MacOS, 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
|
- Written in plain C code (C99) in PascalCase/camelCase notation
|
||||||
- Hardware accelerated with OpenGL (**1.1, 2.1, 3.3 or ES 2.0**)
|
- Hardware accelerated with OpenGL (**1.1, 2.1, 3.3, 4.3 or ES 2.0**)
|
||||||
- **Unique OpenGL abstraction layer** (usable as standalone module): [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h)
|
- **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)
|
- Multiple texture formats supported, including **compressed formats** (DXT, ETC, ASTC)
|
||||||
- **Full 3D support**, including 3D Shapes, Models, Billboards, Heightmaps and more!
|
- **Full 3D support**, including 3D Shapes, Models, Billboards, Heightmaps and more!
|
||||||
- Flexible Materials system, supporting classic maps and **PBR maps**
|
- Flexible Materials system, supporting classic maps and **PBR maps**
|
||||||
- **Animated 3D models** supported (skeletal bones animation)
|
- **Animated 3D models** supported (skeletal bones animation) (IQM)
|
||||||
- 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)
|
- **Powerful math module** for Vector, Matrix and Quaternion operations: [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h)
|
||||||
- Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
|
- Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
|
||||||
- **VR stereo rendering** support with configurable HMD device parameters
|
- **VR stereo rendering** support with configurable HMD device parameters
|
||||||
- Huge examples collection with [+95 code examples](https://www.raylib.com/examples.html)!
|
- Huge examples collection with [+120 code examples](https://github.com/raysan5/raylib/tree/master/examples)!
|
||||||
- Bindings to [+25 programming languages](https://github.com/raysan5/raylib/blob/master/BINDINGS.md)!
|
- Bindings to [+50 programming languages](https://github.com/raysan5/raylib/blob/master/BINDINGS.md)!
|
||||||
|
- **Free and open source**.
|
||||||
|
|
||||||
|
basic example
|
||||||
|
--------------
|
||||||
|
This is a basic raylib example, it creates a window and it draws the text `"Congrats! You created your first window!"` in the middle of the screen. Check this example [running live on web here](https://www.raylib.com/examples/core/loader.html?name=core_basic_window).
|
||||||
|
```c
|
||||||
|
#include "raylib.h"
|
||||||
|
|
||||||
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.
|
int main(void)
|
||||||
|
{
|
||||||
|
InitWindow(800, 450, "raylib [core] example - basic window");
|
||||||
|
|
||||||
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.
|
while (!WindowShouldClose())
|
||||||
|
{
|
||||||
|
BeginDrawing();
|
||||||
|
ClearBackground(RAYWHITE);
|
||||||
|
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
|
||||||
|
EndDrawing();
|
||||||
|
}
|
||||||
|
|
||||||
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.
|
CloseWindow();
|
||||||
|
|
||||||
*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.*
|
return 0;
|
||||||
|
}
|
||||||
*On Raspberry Pi platform (native mode), `Videocore API` and `EGL` libraries are used for window/context management. Inputs are processed using `evdev` Linux libraries*
|
```
|
||||||
|
|
||||||
build and installation
|
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, macOS, Android and HTML5 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 on multiple platforms
|
||||||
|
|
||||||
* Notepad++ (text editor) - [http://notepad-plus-plus.org](http://notepad-plus-plus.org/)
|
[raylib Wiki](https://github.com/raysan5/raylib/wiki#development-platforms) contains detailed instructions on building and usage on multiple platforms.
|
||||||
* MinGW (GCC compiler) - [http://www.mingw.org](http://www.mingw.org/)
|
|
||||||
|
|
||||||
Those are the tools recommended to enjoy raylib development.
|
- [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 Chrome OS](https://github.com/raysan5/raylib/wiki/Working-on-Chrome-OS)
|
||||||
|
- [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 anywhere with CMake](https://github.com/raysan5/raylib/wiki/Working-with-CMake)
|
||||||
|
|
||||||
contact
|
*Note that the Wiki is open for edit, if you find some issues while building raylib for your target platform, feel free to edit the Wiki or open an issue related to it.*
|
||||||
-------
|
|
||||||
|
|
||||||
* Webpage: [http://www.raylib.com](http://www.raylib.com)
|
#### Setup raylib with multiple IDEs
|
||||||
* Discord: [https://discord.gg/raylib](https://discord.gg/VkzNHUE)
|
|
||||||
* Twitter: [http://www.twitter.com/raysan5](http://www.twitter.com/raysan5)
|
|
||||||
* Twitch: [http://www.twitch.tv/raysan5](http://www.twitch.tv/raysan5)
|
|
||||||
* Reddit: [https://www.reddit.com/r/raylib](https://www.reddit.com/r/raylib)
|
|
||||||
* 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).
|
raylib has been developed on Windows platform using [Notepad++](https://notepad-plus-plus.org/) and [MinGW GCC](https://www.mingw-w64.org/) 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, so please, if you find some issue with a template or you think they could be improved, feel free to send a PR or open a related issue.*
|
||||||
|
|
||||||
|
learning and docs
|
||||||
|
------------------
|
||||||
|
|
||||||
|
raylib is designed to be learned using [the examples](https://github.com/raysan5/raylib/tree/master/examples) as the main reference. There is no standard API documentation but there is a [**cheatsheet**](https://www.raylib.com/cheatsheet/cheatsheet.html) containing all the functions available on the library a short description of each one of them, input parameters and result value names should be intuitive enough to understand how each function works.
|
||||||
|
|
||||||
|
Some additional documentation about raylib design can be found in raylib GitHub Wiki. Here are the relevant links:
|
||||||
|
|
||||||
|
- [raylib cheatsheet](https://www.raylib.com/cheatsheet/cheatsheet.html)
|
||||||
|
- [raylib architecture](https://github.com/raysan5/raylib/wiki/raylib-architecture)
|
||||||
|
- [raylib library design](https://github.com/raysan5/raylib/wiki)
|
||||||
|
- [raylib examples collection](https://github.com/raysan5/raylib/tree/master/examples)
|
||||||
|
- [raylib games collection](https://github.com/raysan5/raylib-games)
|
||||||
|
|
||||||
|
|
||||||
|
contact and networks
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
raylib is present in several networks and raylib community is growing everyday. If you are using raylib and enjoying it, feel free to join us in any of these networks. The most active network is our [Discord server](https://discord.gg/raylib)! :)
|
||||||
|
|
||||||
|
- Webpage: [https://www.raylib.com](https://www.raylib.com)
|
||||||
|
- Discord: [https://discord.gg/raylib](https://discord.gg/raylib)
|
||||||
|
- Twitter: [https://www.twitter.com/raysan5](https://www.twitter.com/raysan5)
|
||||||
|
- Twitch: [https://www.twitch.tv/raysan5](https://www.twitch.tv/raysan5)
|
||||||
|
- Reddit: [https://www.reddit.com/r/raylib](https://www.reddit.com/r/raylib)
|
||||||
|
- Patreon: [https://www.patreon.com/raylib](https://www.patreon.com/raylib)
|
||||||
|
- YouTube: [https://www.youtube.com/channel/raylib](https://www.youtube.com/c/raylib)
|
||||||
|
|
||||||
license
|
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.
|
||||||
|
|
||||||
|
raylib uses internally some libraries for window/graphics/inputs management and also to support different file formats loading, all those libraries are embedded with and are available in [src/external](https://github.com/raysan5/raylib/tree/master/src/external) directory. Check [raylib dependencies LICENSES](https://github.com/raysan5/raylib/wiki/raylib-dependencies) on raylib Wiki for details.
|
||||||
|
|||||||
39
ROADMAP.md
@ -1,16 +1,35 @@
|
|||||||
roadmap
|
# raylib 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.
|
Here it is a wishlist with features and ideas to improve the library. Note that features listed here are usually long term improvements or just describe a route to follow for the library. There are also some additional places to look for raylib improvements and ideas:
|
||||||
|
|
||||||
[raylib source code](https://github.com/raysan5/raylib/tree/master/src) has some *TODO* marks around code with pending things to review and improve.
|
- [GitHub Issues](https://github.com/raysan5/raylib/issues) has several open issues for possible improvements or bugs to fix.
|
||||||
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 multiple *TODO* comments around code with pending things to review or improve.
|
||||||
|
- raylib wishlists discussions (https://github.com/raysan5/raylib/discussions/1502, https://github.com/raysan5/raylib/discussions/2272) are open to everyone to ask for improvements, feel free to check and comment.
|
||||||
|
|
||||||
**raylib 2.x**
|
_Current version of raylib is complete and functional but there is always room for improvements._
|
||||||
- [ ] rnet: raylib network module
|
|
||||||
- [ ] rres: raylib resource packer
|
**raylib 4.x**
|
||||||
- [ ] rlvk: raylib Vulkan API support (GRAPHICS_API_VULKAN)
|
- [ ] Redesign camera module (more flexible) ([#1143](https://github.com/raysan5/raylib/issues/1143), https://github.com/raysan5/raylib/discussions/2507)
|
||||||
- [ ] Basic CPU/GPU stats sytem (memory, draws, time...)
|
- [ ] Redesign gestures system, improve touch inputs management
|
||||||
|
- [ ] Redesign raudio module, implement miniaudio high-level provided features
|
||||||
|
- [x] Better documentation and improved examples
|
||||||
|
- [x] Focus on HTML5 ([raylib 5k gamejam](https://itch.io/jam/raylib-5k-gamejam)) and embedded platforms (RPI and similar SOCs)
|
||||||
|
- [x] Additional support libraries: [raygui](https://github.com/raysan5/raygui), [rres](https://github.com/raysan5/rres)
|
||||||
|
|
||||||
|
**raylib 4.0**
|
||||||
|
- [x] Improved consistency and coherency in raylib API
|
||||||
|
- [x] Continuous Deployment using GitHub Actions
|
||||||
|
- [x] rlgl improvements for standalone usage (avoid raylib coupling)
|
||||||
|
- Basic CPU/GPU stats system (memory, draws, time...) ([#1295](https://github.com/raysan5/raylib/issues/1295)) - _DISCARDED_
|
||||||
|
- Software rendering backend (avoiding OpenGL) ([#1370](https://github.com/raysan5/raylib/issues/1370)) - _DISCARDED_
|
||||||
|
- Network module (UDP): `rnet` ([#753](https://github.com/raysan5/raylib/issues/753)) - _DISCARDED_ - Use [nbnet](https://github.com/nathhB/nbnet).
|
||||||
|
|
||||||
|
**raylib 3.0**
|
||||||
|
- [x] Custom memory allocators support
|
||||||
|
- [x] Global variables moved to global context
|
||||||
|
- [x] Optimize data structures for pass-by-value
|
||||||
|
- [x] Trace log messages redesign ([#1065](https://github.com/raysan5/raylib/issues/1065))
|
||||||
|
- [x] Continuous Integration using GitHub Actions
|
||||||
|
|
||||||
**raylib 2.5**
|
**raylib 2.5**
|
||||||
- [x] Support Animated models
|
- [x] Support Animated models
|
||||||
|
|||||||
13
SPONSORS.md
@ -1,13 +0,0 @@
|
|||||||
The following people has contributed with a generous donation to the raylib project.
|
|
||||||
|
|
||||||
## 🥇 Gold Contributors
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
## 🥈 Silver Contributors
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
## 🥉 Bronze Contributors
|
|
||||||
|
|
||||||
...
|
|
||||||
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
|
|
||||||
18
cmake/BuildOptions.cmake
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
if(${PLATFORM} MATCHES "Desktop" AND APPLE)
|
||||||
|
if(MACOS_FATLIB)
|
||||||
|
if (CMAKE_OSX_ARCHITECTURES)
|
||||||
|
message(FATAL_ERROR "User supplied -DCMAKE_OSX_ARCHITECTURES overrides -DMACOS_FATLIB=ON")
|
||||||
|
else()
|
||||||
|
set(CMAKE_OSX_ARCHITECTURES "x86_64;i386")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# This helps support the case where emsdk toolchain file is used
|
||||||
|
# either by setting it with -DCMAKE_TOOLCHAIN_FILE=<path_to_emsdk>/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
|
||||||
|
# or by using "emcmake cmake -B build -S ." as described in https://emscripten.org/docs/compiling/Building-Projects.html
|
||||||
|
if(EMSCRIPTEN)
|
||||||
|
SET(PLATFORM Web CACHE STRING "Forcing PLATFORM_WEB because EMSCRIPTEN was detected")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# vim: ft=cmake
|
||||||
@ -1,43 +0,0 @@
|
|||||||
# Set a default build type if none was specified
|
|
||||||
set(default_build_type "Release")
|
|
||||||
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
|
||||||
set(default_build_type "Debug")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
|
||||||
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
|
|
||||||
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
|
|
||||||
STRING "Choose the type of build." FORCE)
|
|
||||||
# Set the possible values of build type for cmake-gui
|
|
||||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
|
|
||||||
"MinSizeRel" "RelWithDebInfo")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Taken from the https://github.com/OpenChemistry/tomviz project
|
|
||||||
# Copyright (c) 2014-2017, Kitware, Inc.
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without
|
|
||||||
# modification, are permitted provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# 1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
# list of conditions and the following disclaimer.
|
|
||||||
#
|
|
||||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
# this list of conditions and the following disclaimer in the documentation
|
|
||||||
# and/or other materials provided with the distribution.
|
|
||||||
#
|
|
||||||
# 3. Neither the name of the copyright holder nor the names of its contributors
|
|
||||||
# may be used to endorse or promote products derived from this software
|
|
||||||
# without specific prior written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
|
||||||
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
||||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
@ -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()
|
|
||||||
|
|
||||||
114
cmake/CompileDefinitions.cmake
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
# Adding compile definitions
|
||||||
|
target_compile_definitions("raylib" PUBLIC "${PLATFORM_CPP}")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "${GRAPHICS}")
|
||||||
|
|
||||||
|
function(define_if target variable)
|
||||||
|
if (${${variable}})
|
||||||
|
message(STATUS "${variable}=${${variable}}")
|
||||||
|
target_compile_definitions(${target} PUBLIC "${variable}")
|
||||||
|
endif ()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
if (${CUSTOMIZE_BUILD})
|
||||||
|
target_compile_definitions("raylib" PUBLIC EXTERNAL_CONFIG_FLAGS)
|
||||||
|
define_if("raylib" USE_AUDIO)
|
||||||
|
define_if("raylib" SUPPORT_MODULE_RSHAPES)
|
||||||
|
define_if("raylib" SUPPORT_MODULE_RTEXTURES)
|
||||||
|
define_if("raylib" SUPPORT_MODULE_RTEXT)
|
||||||
|
define_if("raylib" SUPPORT_MODULE_RMODELS)
|
||||||
|
define_if("raylib" SUPPORT_MODULE_RAUDIO)
|
||||||
|
define_if("raylib" SUPPORT_CAMERA_SYSTEM)
|
||||||
|
define_if("raylib" SUPPORT_GESTURES_SYSTEM)
|
||||||
|
define_if("raylib" SUPPORT_MOUSE_GESTURES)
|
||||||
|
define_if("raylib" SUPPORT_SSH_KEYBOARD_RPI)
|
||||||
|
define_if("raylib" SUPPORT_DEFAULT_FONT)
|
||||||
|
define_if("raylib" SUPPORT_SCREEN_CAPTURE)
|
||||||
|
define_if("raylib" SUPPORT_GIF_RECORDING)
|
||||||
|
define_if("raylib" SUPPORT_BUSY_WAIT_LOOP)
|
||||||
|
define_if("raylib" SUPPORT_EVENTS_WAITING)
|
||||||
|
define_if("raylib" SUPPORT_WINMM_HIGHRES_TIMER)
|
||||||
|
define_if("raylib" SUPPORT_COMPRESSION_API)
|
||||||
|
define_if("raylib" SUPPORT_QUADS_DRAW_MODE)
|
||||||
|
define_if("raylib" SUPPORT_IMAGE_EXPORT)
|
||||||
|
define_if("raylib" SUPPORT_IMAGE_GENERATION)
|
||||||
|
define_if("raylib" SUPPORT_IMAGE_MANIPULATION)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_PNG)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_DDS)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_HDR)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_KTX)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_ASTC)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_BMP)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_TGA)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_JPG)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_GIF)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_QOI)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_PSD)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_PKM)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_PVR)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_FNT)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_TTF)
|
||||||
|
define_if("raylib" SUPPORT_TEXT_MANIPULATION)
|
||||||
|
define_if("raylib" SUPPORT_MESH_GENERATION)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_OBJ)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_MTL)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_IQM)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_GLTF)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_VOX)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_WAV)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_OGG)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_XM)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_MOD)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_MP3)
|
||||||
|
define_if("raylib" SUPPORT_FILEFORMAT_FLAC)
|
||||||
|
define_if("raylib" SUPPORT_STANDARD_FILEIO)
|
||||||
|
define_if("raylib" SUPPORT_TRACELOG)
|
||||||
|
|
||||||
|
if (UNIX AND NOT APPLE)
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_FILEPATH_LENGTH=4096")
|
||||||
|
else ()
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_FILEPATH_LENGTH=512")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_GAMEPADS=4")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_GAMEPAD_AXIS=8")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_GAMEPAD_BUTTONS=32")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_TOUCH_POINTS=10")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_KEY_PRESSED_QUEUE=16")
|
||||||
|
|
||||||
|
target_compile_definitions("raylib" PUBLIC "STORAGE_DATA_FILE=\"storage.data\"")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_KEY_PRESSED_QUEUE=16")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_DECOMPRESSION_SIZE=64")
|
||||||
|
|
||||||
|
if (${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_33" OR ${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_11")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_BUFFER_ELEMENTS=8192")
|
||||||
|
elseif (${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_ES2")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_BUFFER_ELEMENTS=2048")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_DRAWCALLS=256")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_MATRIX_STACK_SIZE=32")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_SHADER_LOCATIONS=32")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_MATERIAL_MAPS=12")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "RL_CULL_DISTANCE_NEAR=0.01")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "RL_CULL_DISTANCE_FAR=1000.0")
|
||||||
|
|
||||||
|
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_POSITION=\"vertexPosition\"")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD=\"vertexTexCoord\"")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_NORMAL=\"vertexNormal\"")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_COLOR=\"vertexColor\"")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_TANGENT=\"vertexTangent\"")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2=\"vertexTexCoord2\"")
|
||||||
|
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_TEXT_BUFFER_LENGTH=1024")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_TEXT_UNICODE_CHARS=512")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_TEXTSPLIT_COUNT=128")
|
||||||
|
|
||||||
|
target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_FORMAT=ma_format_f32")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_CHANNELS=2")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_SAMPLE_RATE=44100")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "DEFAULT_AUDIO_BUFFER_SIZE=4096")
|
||||||
|
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_TRACELOG_MSG_LENGTH=128")
|
||||||
|
target_compile_definitions("raylib" PUBLIC "MAX_UWP_MESSAGES=512")
|
||||||
|
endif ()
|
||||||
|
|
||||||
79
cmake/CompilerFlags.cmake
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
include(AddIfFlagCompiles)
|
||||||
|
|
||||||
|
# Makes +/- operations on void pointers be considered an error
|
||||||
|
# https://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html
|
||||||
|
add_if_flag_compiles(-Werror=pointer-arith CMAKE_C_FLAGS)
|
||||||
|
|
||||||
|
# Generates error whenever a function is used before being declared
|
||||||
|
# https://gcc.gnu.org/onlinedocs/gcc-4.0.1/gcc/Warning-Options.html
|
||||||
|
add_if_flag_compiles(-Werror=implicit-function-declaration CMAKE_C_FLAGS)
|
||||||
|
|
||||||
|
# Allows some casting of pointers without generating a warning
|
||||||
|
add_if_flag_compiles(-fno-strict-aliasing CMAKE_C_FLAGS)
|
||||||
|
|
||||||
|
if (ENABLE_MSAN AND ENABLE_ASAN)
|
||||||
|
# MSAN and ASAN both work on memory - ASAN does more things
|
||||||
|
MESSAGE(WARNING "Compiling with both AddressSanitizer and MemorySanitizer is not recommended")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (ENABLE_ASAN)
|
||||||
|
|
||||||
|
# If enabled it would generate errors/warnings for all kinds of memory errors
|
||||||
|
# (like returning a stack variable by reference)
|
||||||
|
# https://clang.llvm.org/docs/AddressSanitizer.html
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (ENABLE_UBSAN)
|
||||||
|
|
||||||
|
# If enabled this will generate errors for undefined behavior points
|
||||||
|
# (like adding +1 to the maximum int value)
|
||||||
|
# https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
|
||||||
|
|
||||||
|
add_if_flag_compiles(-fno-omit-frame-pointer CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
||||||
|
add_if_flag_compiles(-fsanitize=undefined CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (ENABLE_MSAN)
|
||||||
|
|
||||||
|
# If enabled this will generate warnings for places where uninitialized memory is used
|
||||||
|
# https://clang.llvm.org/docs/MemorySanitizer.html
|
||||||
|
|
||||||
|
add_if_flag_compiles(-fno-omit-frame-pointer CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
||||||
|
add_if_flag_compiles(-fsanitize=memory CMAKE_C_FLAGS CMAKE_LINKER_FLAGS)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_VERSION VERSION_LESS "3.1")
|
||||||
|
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||||
|
add_if_flag_compiles(-std=gnu99 CMAKE_C_FLAGS)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set (CMAKE_C_STANDARD 99)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${PLATFORM} MATCHES "Android")
|
||||||
|
|
||||||
|
# If enabled will remove dead code during the linking process
|
||||||
|
# https://gcc.gnu.org/onlinedocs/gnat_ugn/Compilation-options.html
|
||||||
|
add_if_flag_compiles(-ffunction-sections CMAKE_C_FLAGS)
|
||||||
|
|
||||||
|
# If enabled will generate some exception data (usually disabled for C programs)
|
||||||
|
# https://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc/Code-Gen-Options.html
|
||||||
|
add_if_flag_compiles(-funwind-tables CMAKE_C_FLAGS)
|
||||||
|
|
||||||
|
# If enabled adds stack protection guards around functions that allocate memory
|
||||||
|
# https://www.keil.com/support/man/docs/armclang_ref/armclang_ref_cjh1548250046139.htm
|
||||||
|
add_if_flag_compiles(-fstack-protector-strong CMAKE_C_FLAGS)
|
||||||
|
|
||||||
|
# Marks that the library will not be compiled with an executable stack
|
||||||
|
add_if_flag_compiles(-Wa,--noexecstack CMAKE_C_FLAGS)
|
||||||
|
|
||||||
|
# Do not expand symbolic links or resolve paths like "/./" or "/../", etc.
|
||||||
|
# https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html
|
||||||
|
add_if_flag_compiles(-no-canonical-prefixes CMAKE_C_FLAGS)
|
||||||
|
endif()
|
||||||
36
cmake/GlfwImport.cmake
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
|
||||||
|
if(USE_EXTERNAL_GLFW STREQUAL "ON")
|
||||||
|
find_package(glfw3 3.3.3 REQUIRED)
|
||||||
|
elseif(USE_EXTERNAL_GLFW STREQUAL "IF_POSSIBLE")
|
||||||
|
find_package(glfw3 3.3.3 QUIET)
|
||||||
|
endif()
|
||||||
|
if (glfw3_FOUND)
|
||||||
|
set(LIBS_PRIVATE ${LIBS_PRIVATE} glfw)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Explicitly check against "ON", because USE_EXTERNAL_GLFW is a tristate option
|
||||||
|
# Also adding only on desktop (web also uses glfw but it is more limited and is added using an emcc linker flag)
|
||||||
|
if(NOT glfw3_FOUND AND NOT USE_EXTERNAL_GLFW STREQUAL "ON" AND "${PLATFORM}" MATCHES "Desktop")
|
||||||
|
MESSAGE(STATUS "Using raylib's GLFW")
|
||||||
|
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
|
||||||
|
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||||
|
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||||
|
set(GLFW_INSTALL OFF CACHE BOOL "" FORCE)
|
||||||
|
set(GLFW_USE_WAYLAND ${USE_WAYLAND} CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
|
set(WAS_SHARED ${BUILD_SHARED_LIBS})
|
||||||
|
set(BUILD_SHARED_LIBS OFF CACHE BOOL " " FORCE)
|
||||||
|
|
||||||
|
add_subdirectory(external/glfw)
|
||||||
|
|
||||||
|
set(BUILD_SHARED_LIBS ${WAS_SHARED} CACHE BOOL " " FORCE)
|
||||||
|
unset(WAS_SHARED)
|
||||||
|
|
||||||
|
list(APPEND raylib_sources $<TARGET_OBJECTS:glfw>)
|
||||||
|
include_directories(BEFORE SYSTEM external/glfw/include)
|
||||||
|
elseif("${PLATFORM}" STREQUAL "DRM")
|
||||||
|
MESSAGE(STATUS "No GLFW required on PLATFORM_DRM")
|
||||||
|
else()
|
||||||
|
MESSAGE(STATUS "Using external GLFW")
|
||||||
|
set(GLFW_PKG_DEPS glfw3)
|
||||||
|
endif()
|
||||||
29
cmake/InstallConfigurations.cmake
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
install(
|
||||||
|
TARGETS raylib EXPORT raylib-targets
|
||||||
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
|
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
||||||
|
)
|
||||||
|
|
||||||
|
# PKG_CONFIG_LIBS_PRIVATE is used in raylib.pc.in
|
||||||
|
if (NOT BUILD_SHARED_LIBS)
|
||||||
|
include(LibraryPathToLinkerFlags)
|
||||||
|
library_path_to_linker_flags(__PKG_CONFIG_LIBS_PRIVATE "${LIBS_PRIVATE}")
|
||||||
|
set(PKG_CONFIG_LIBS_PRIVATE ${__PKG_CONFIG_LIBS_PRIVATE} ${GLFW_PKG_LIBS})
|
||||||
|
string(REPLACE ";" " " PKG_CONFIG_LIBS_PRIVATE "${PKG_CONFIG_LIBS_PRIVATE}")
|
||||||
|
elseif (BUILD_SHARED_LIBS)
|
||||||
|
set(PKG_CONFIG_LIBS_EXTRA "")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
join_paths(libdir_for_pc_file "\${exec_prefix}" "${CMAKE_INSTALL_LIBDIR}")
|
||||||
|
join_paths(includedir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||||
|
configure_file(../raylib.pc.in raylib.pc @ONLY)
|
||||||
|
configure_file(../cmake/raylib-config-version.cmake raylib-config-version.cmake @ONLY)
|
||||||
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/raylib.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||||
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/raylib-config-version.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/raylib")
|
||||||
|
install(FILES ${PROJECT_SOURCE_DIR}/../cmake/raylib-config.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/raylib")
|
||||||
|
|
||||||
|
# populates raylib_{FOUND, INCLUDE_DIRS, LIBRARIES, LDFLAGS, DEFINITIONS}
|
||||||
|
include(PopulateConfigVariablesLocally)
|
||||||
|
populate_config_variables_locally(raylib)
|
||||||
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()
|
||||||
114
cmake/LibraryConfigurations.cmake
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
if (${PLATFORM} MATCHES "Desktop")
|
||||||
|
set(PLATFORM_CPP "PLATFORM_DESKTOP")
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
# Need to force OpenGL 3.3 on OS X
|
||||||
|
# See: https://github.com/raysan5/raylib/issues/341
|
||||||
|
set(GRAPHICS "GRAPHICS_API_OPENGL_33")
|
||||||
|
find_library(OPENGL_LIBRARY OpenGL)
|
||||||
|
set(LIBS_PRIVATE ${OPENGL_LIBRARY})
|
||||||
|
link_libraries("${LIBS_PRIVATE}")
|
||||||
|
if (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 ()
|
||||||
|
elseif (WIN32)
|
||||||
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
|
find_package(OpenGL QUIET)
|
||||||
|
set(LIBS_PRIVATE ${OPENGL_LIBRARIES} winmm)
|
||||||
|
else ()
|
||||||
|
find_library(pthread NAMES pthread)
|
||||||
|
find_package(OpenGL QUIET)
|
||||||
|
if ("${OPENGL_LIBRARIES}" STREQUAL "")
|
||||||
|
set(OPENGL_LIBRARIES "GL")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if ("${CMAKE_SYSTEM_NAME}" MATCHES "(Net|Open)BSD")
|
||||||
|
find_library(OSS_LIBRARY ossaudio)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
set(LIBS_PRIVATE m atomic pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
|
||||||
|
|
||||||
|
if (USE_AUDIO)
|
||||||
|
set(LIBS_PRIVATE ${LIBS_PRIVATE} dl)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
elseif (${PLATFORM} MATCHES "Web")
|
||||||
|
set(PLATFORM_CPP "PLATFORM_WEB")
|
||||||
|
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s USE_GLFW=3 -s ASSERTIONS=1 --profiling")
|
||||||
|
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
|
||||||
|
|
||||||
|
elseif (${PLATFORM} MATCHES "Android")
|
||||||
|
set(PLATFORM_CPP "PLATFORM_ANDROID")
|
||||||
|
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
||||||
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
|
list(APPEND raylib_sources ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c)
|
||||||
|
add_definitions(-DANDROID -D__ANDROID_API__=21)
|
||||||
|
include_directories(${ANDROID_NDK}/sources/android/native_app_glue)
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--exclude-libs,libatomic.a -Wl,--build-id -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings -u ANativeActivity_onCreate -Wl,-undefined,dynamic_lookup")
|
||||||
|
|
||||||
|
find_library(OPENGL_LIBRARY OpenGL)
|
||||||
|
set(LIBS_PRIVATE m log android EGL GLESv2 OpenSLES atomic c)
|
||||||
|
|
||||||
|
elseif (${PLATFORM} MATCHES "Raspberry Pi")
|
||||||
|
set(PLATFORM_CPP "PLATFORM_RPI")
|
||||||
|
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
||||||
|
|
||||||
|
add_definitions(-D_DEFAULT_SOURCE)
|
||||||
|
|
||||||
|
find_library(GLESV2 brcmGLESv2 HINTS /opt/vc/lib)
|
||||||
|
find_library(EGL brcmEGL HINTS /opt/vc/lib)
|
||||||
|
find_library(BCMHOST bcm_host HINTS /opt/vc/lib)
|
||||||
|
include_directories(/opt/vc/include /opt/vc/include/interface/vmcs_host/linux /opt/vc/include/interface/vcos/pthreads)
|
||||||
|
link_directories(/opt/vc/lib)
|
||||||
|
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${BCMHOST} pthread rt m dl)
|
||||||
|
|
||||||
|
elseif ("${PLATFORM}" MATCHES "DRM")
|
||||||
|
set(PLATFORM_CPP "PLATFORM_DRM")
|
||||||
|
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
||||||
|
|
||||||
|
add_definitions(-D_DEFAULT_SOURCE)
|
||||||
|
add_definitions(-DEGL_NO_X11)
|
||||||
|
add_definitions(-DPLATFORM_DRM)
|
||||||
|
|
||||||
|
find_library(GLESV2 GLESv2)
|
||||||
|
find_library(EGL EGL)
|
||||||
|
find_library(DRM drm)
|
||||||
|
find_library(GBM gbm)
|
||||||
|
|
||||||
|
if (NOT CMAKE_CROSSCOMPILING)
|
||||||
|
include_directories(/usr/include/libdrm)
|
||||||
|
endif ()
|
||||||
|
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${DRM} ${GBM} atomic pthread m dl)
|
||||||
|
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (${OPENGL_VERSION})
|
||||||
|
set(${SUGGESTED_GRAPHICS} "${GRAPHICS}")
|
||||||
|
if (${OPENGL_VERSION} MATCHES "4.3")
|
||||||
|
set(GRAPHICS "GRAPHICS_API_OPENGL_43")
|
||||||
|
elseif (${OPENGL_VERSION} MATCHES "3.3")
|
||||||
|
set(GRAPHICS "GRAPHICS_API_OPENGL_33")
|
||||||
|
elseif (${OPENGL_VERSION} MATCHES "2.1")
|
||||||
|
set(GRAPHICS "GRAPHICS_API_OPENGL_21")
|
||||||
|
elseif (${OPENGL_VERSION} MATCHES "1.1")
|
||||||
|
set(GRAPHICS "GRAPHICS_API_OPENGL_11")
|
||||||
|
elseif (${OPENGL_VERSION} MATCHES "ES 2.0")
|
||||||
|
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
||||||
|
endif ()
|
||||||
|
if ("${SUGGESTED_GRAPHICS}" AND NOT "${SUGGESTED_GRAPHICS}" STREQUAL "${GRAPHICS}")
|
||||||
|
message(WARNING "You are overriding the suggested GRAPHICS=${SUGGESTED_GRAPHICS} with ${GRAPHICS}! This may fail")
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (NOT GRAPHICS)
|
||||||
|
set(GRAPHICS "GRAPHICS_API_OPENGL_33")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
set(LIBS_PRIVATE ${LIBS_PRIVATE} ${OPENAL_LIBRARY})
|
||||||
|
|
||||||
|
if (${PLATFORM} MATCHES "Desktop")
|
||||||
|
set(LIBS_PRIVATE ${LIBS_PRIVATE} glfw)
|
||||||
|
endif ()
|
||||||
13
cmake/PackConfigurations.cmake
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Packaging
|
||||||
|
SET(CPACK_PACKAGE_NAME "raylib")
|
||||||
|
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Simple and easy-to-use library to enjoy videogames programming")
|
||||||
|
SET(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
|
||||||
|
SET(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
|
||||||
|
SET(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
|
||||||
|
SET(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
|
||||||
|
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/../README.md")
|
||||||
|
SET(CPACK_RESOURCE_FILE_WELCOME "${PROJECT_SOURCE_DIR}/../README.md")
|
||||||
|
SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/../LICENSE")
|
||||||
|
SET(CPACK_PACKAGE_FILE_NAME "raylib-${PROJECT_VERSION}$ENV{RAYLIB_PACKAGE_SUFFIX}")
|
||||||
|
SET(CPACK_GENERATOR "ZIP;TGZ") # Remove this, if you want the NSIS installer on Windows
|
||||||
|
include(CPack)
|
||||||
@ -1,15 +0,0 @@
|
|||||||
SET(CMAKE_SYSTEM_NAME Linux)
|
|
||||||
|
|
||||||
SET(CMAKE_C_COMPILER emcc)
|
|
||||||
SET(CMAKE_CXX_COMPILER em++)
|
|
||||||
if(NOT DEFINED CMAKE_AR)
|
|
||||||
find_program(CMAKE_AR NAMES emar)
|
|
||||||
endif()
|
|
||||||
if(NOT DEFINED CMAKE_RANLIB)
|
|
||||||
find_program(CMAKE_RANLIB NAMES emranlib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
|
||||||
@ -11,66 +11,69 @@
|
|||||||
# raylib_LDFLAGS - The linker flags needed with raylib
|
# raylib_LDFLAGS - The linker flags needed with raylib
|
||||||
# raylib_DEFINITIONS - Compiler switches required for using raylib
|
# raylib_DEFINITIONS - Compiler switches required for using raylib
|
||||||
|
|
||||||
set(XPREFIX PC_RAYLIB)
|
if (NOT TARGET raylib)
|
||||||
|
set(XPREFIX PC_RAYLIB)
|
||||||
|
|
||||||
find_package(PkgConfig QUIET)
|
find_package(PkgConfig QUIET)
|
||||||
pkg_check_modules(${XPREFIX} QUIET raylib)
|
pkg_check_modules(${XPREFIX} QUIET raylib)
|
||||||
|
|
||||||
if (raylib_USE_STATIC_LIBS)
|
if (raylib_USE_STATIC_LIBS)
|
||||||
set(XPREFIX ${XPREFIX}_STATIC)
|
set(XPREFIX ${XPREFIX}_STATIC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(raylib_DEFINITIONS ${${XPREFIX}_CFLAGS})
|
set(raylib_DEFINITIONS ${${XPREFIX}_CFLAGS})
|
||||||
|
|
||||||
find_path(raylib_INCLUDE_DIR
|
find_path(raylib_INCLUDE_DIR
|
||||||
NAMES raylib.h
|
NAMES raylib.h
|
||||||
HINTS ${${XPREFIX}_INCLUDE_DIRS}
|
HINTS ${${XPREFIX}_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(RAYLIB_NAMES raylib)
|
set(RAYLIB_NAMES raylib)
|
||||||
|
|
||||||
if (raylib_USE_STATIC_LIBS)
|
if (raylib_USE_STATIC_LIBS)
|
||||||
set(RAYLIB_NAMES libraylib.a raylib.lib ${RAYLIB_NAMES})
|
set(RAYLIB_NAMES libraylib.a raylib.lib ${RAYLIB_NAMES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_library(raylib_LIBRARY
|
find_library(raylib_LIBRARY
|
||||||
NAMES ${RAYLIB_NAMES}
|
NAMES ${RAYLIB_NAMES}
|
||||||
HINTS ${${XPREFIX}_LIBRARY_DIRS}
|
HINTS ${${XPREFIX}_LIBRARY_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(raylib_LIBRARIES ${raylib_LIBRARY})
|
set(raylib_LIBRARIES ${raylib_LIBRARY})
|
||||||
set(raylib_LIBRARY_DIRS ${${XPREFIX}_LIBRARY_DIRS})
|
set(raylib_LIBRARY_DIRS ${${XPREFIX}_LIBRARY_DIRS})
|
||||||
set(raylib_LIBRARY_DIR ${raylib_LIBRARY_DIRS})
|
set(raylib_LIBRARY_DIR ${raylib_LIBRARY_DIRS})
|
||||||
set(raylib_INCLUDE_DIRS ${raylib_INCLUDE_DIR})
|
set(raylib_INCLUDE_DIRS ${raylib_INCLUDE_DIR})
|
||||||
set(raylib_LDFLAGS ${${XPREFIX}_LDFLAGS})
|
set(raylib_LDFLAGS ${${XPREFIX}_LDFLAGS})
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(raylib DEFAULT_MSG
|
find_package_handle_standard_args(raylib DEFAULT_MSG
|
||||||
raylib_LIBRARY
|
raylib_LIBRARY
|
||||||
raylib_INCLUDE_DIR
|
raylib_INCLUDE_DIR
|
||||||
)
|
)
|
||||||
|
|
||||||
mark_as_advanced(raylib_LIBRARY raylib_INCLUDE_DIR)
|
mark_as_advanced(raylib_LIBRARY raylib_INCLUDE_DIR)
|
||||||
|
|
||||||
if (raylib_USE_STATIC_LIBS)
|
if (raylib_USE_STATIC_LIBS)
|
||||||
add_library(raylib STATIC IMPORTED GLOBAL)
|
add_library(raylib STATIC IMPORTED GLOBAL)
|
||||||
else()
|
else()
|
||||||
add_library(raylib SHARED IMPORTED GLOBAL)
|
add_library(raylib SHARED IMPORTED GLOBAL)
|
||||||
endif()
|
endif()
|
||||||
string (REPLACE ";" " " raylib_LDFLAGS "${raylib_LDFLAGS}")
|
string (REPLACE ";" " " raylib_LDFLAGS "${raylib_LDFLAGS}")
|
||||||
|
|
||||||
set_target_properties(raylib
|
set_target_properties(raylib
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
IMPORTED_LOCATION "${raylib_LIBRARIES}"
|
IMPORTED_LOCATION "${raylib_LIBRARIES}"
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${raylib_INCLUDE_DIRS}"
|
IMPORTED_IMPLIB "${raylib_LIBRARIES}"
|
||||||
INTERFACE_LINK_LIBRARIES "${raylib_LDFLAGS}"
|
INTERFACE_INCLUDE_DIRECTORIES "${raylib_INCLUDE_DIRS}"
|
||||||
INTERFACE_COMPILE_OPTIONS "${raylib_DEFINITIONS}"
|
INTERFACE_LINK_LIBRARIES "${raylib_LDFLAGS}"
|
||||||
)
|
INTERFACE_COMPILE_OPTIONS "${raylib_DEFINITIONS}"
|
||||||
|
)
|
||||||
if (raylib_VERBOSE)
|
|
||||||
message(STATUS "raylib_FOUND: ${raylib_FOUND}")
|
if (raylib_VERBOSE)
|
||||||
message(STATUS "raylib_INCLUDE_DIRS: ${raylib_INCLUDE_DIRS}")
|
message(STATUS "raylib_FOUND: ${raylib_FOUND}")
|
||||||
message(STATUS "raylib_LIBRARIES: ${raylib_LIBRARIES}")
|
message(STATUS "raylib_INCLUDE_DIRS: ${raylib_INCLUDE_DIRS}")
|
||||||
message(STATUS "raylib_LDFLAGS: ${raylib_LDFLAGS}")
|
message(STATUS "raylib_LIBRARIES: ${raylib_LIBRARIES}")
|
||||||
message(STATUS "raylib_DEFINITIONS: ${raylib_DEFINITIONS}")
|
message(STATUS "raylib_LDFLAGS: ${raylib_LDFLAGS}")
|
||||||
|
message(STATUS "raylib_DEFINITIONS: ${raylib_DEFINITIONS}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@ -1,21 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Test if including/linking/running an installed raylib works
|
|
||||||
|
|
||||||
set -x
|
|
||||||
export LD_RUN_PATH=/usr/local/lib
|
|
||||||
|
|
||||||
CFLAGS="-Wall -Wextra -Werror $CFLAGS"
|
|
||||||
if [ "$ARCH" = "i386" ]; then
|
|
||||||
CFLAGS="-m32 $CLFAGS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat << EOF | ${CC:-cc} -otest -xc - $(pkg-config --libs --cflags $@ raylib.pc) $CFLAGS && exec ./test
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <raylib.h>
|
|
||||||
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
int num = GetRandomValue(42, 1337);
|
|
||||||
return 42 <= num && num <= 1337 ? EXIT_SUCCESS : EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
@ -1,138 +1,144 @@
|
|||||||
# Setup the project and settings
|
# Setup the project and settings
|
||||||
project(examples)
|
project(examples)
|
||||||
|
|
||||||
# Get the sources together
|
# Directories that contain examples
|
||||||
set(example_dirs audio core models others shaders shapes text textures)
|
set(example_dirs
|
||||||
|
audio
|
||||||
|
core
|
||||||
|
models
|
||||||
|
others
|
||||||
|
shaders
|
||||||
|
shapes
|
||||||
|
text
|
||||||
|
textures
|
||||||
|
)
|
||||||
|
|
||||||
|
# Next few lines will check for existence of symbols or header files
|
||||||
|
# They are needed for the physac example and threads examples
|
||||||
set(CMAKE_REQUIRED_DEFINITIONS -D_POSIX_C_SOURCE=199309L)
|
set(CMAKE_REQUIRED_DEFINITIONS -D_POSIX_C_SOURCE=199309L)
|
||||||
include(CheckSymbolExists)
|
include(CheckSymbolExists)
|
||||||
check_symbol_exists(CLOCK_MONOTONIC time.h HAVE_CLOCK_MONOTONIC)
|
check_symbol_exists(CLOCK_MONOTONIC time.h HAVE_CLOCK_MONOTONIC)
|
||||||
check_symbol_exists(QueryPerformanceCounter windows.h HAVE_QPC)
|
check_symbol_exists(QueryPerformanceCounter windows.h HAVE_QPC)
|
||||||
set(CMAKE_REQUIRED_DEFINITIONS)
|
set(CMAKE_REQUIRED_DEFINITIONS)
|
||||||
if(HAVE_QPC OR HAVE_CLOCK_MONOTONIC)
|
|
||||||
set(example_dirs ${example_dirs} physac)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(example_sources)
|
if (HAVE_QPC OR HAVE_CLOCK_MONOTONIC)
|
||||||
set(example_resources)
|
set(example_dirs ${example_dirs} physac)
|
||||||
foreach(example_dir ${example_dirs})
|
endif ()
|
||||||
# Get the .c files
|
|
||||||
file(GLOB sources ${example_dir}/*.c)
|
|
||||||
list(APPEND example_sources ${sources})
|
|
||||||
|
|
||||||
# Any any resources
|
|
||||||
file(GLOB resources ${example_dir}/resources/*)
|
|
||||||
list(APPEND example_resources ${resources})
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
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)
|
include(CheckIncludeFile)
|
||||||
CHECK_INCLUDE_FILE("stdatomic.h" HAVE_STDATOMIC_H)
|
CHECK_INCLUDE_FILE("stdatomic.h" HAVE_STDATOMIC_H)
|
||||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||||
find_package(Threads)
|
find_package(Threads)
|
||||||
if (CMAKE_USE_PTHREADS_INIT AND HAVE_STDATOMIC_H)
|
if (CMAKE_USE_PTHREADS_INIT AND HAVE_STDATOMIC_H)
|
||||||
add_if_flag_compiles("-std=c11" CMAKE_C_FLAGS)
|
add_if_flag_compiles("-std=c11" CMAKE_C_FLAGS)
|
||||||
if(THREADS_HAVE_PTHREAD_ARG)
|
if (THREADS_HAVE_PTHREAD_ARG)
|
||||||
add_if_flag_compiles("-pthread" CMAKE_C_FLAGS)
|
add_if_flag_compiles("-pthread" CMAKE_C_FLAGS)
|
||||||
endif()
|
endif ()
|
||||||
if(CMAKE_THREAD_LIBS_INIT)
|
if (CMAKE_THREAD_LIBS_INIT)
|
||||||
link_libraries("${CMAKE_THREAD_LIBS_INIT}")
|
link_libraries("${CMAKE_THREAD_LIBS_INIT}")
|
||||||
endif()
|
endif ()
|
||||||
else()
|
endif ()
|
||||||
# Items requiring pthreads
|
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_loading_thread.c)
|
if (APPLE AND NOT CMAKE_SYSTEM STRLESS "Darwin-18.0.0")
|
||||||
endif()
|
add_definitions(-DGL_SILENCE_DEPRECATION)
|
||||||
|
MESSAGE(AUTHOR_WARNING "OpenGL is deprecated starting with macOS 10.14 (Mojave)!")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Collect all source files and resource files
|
||||||
|
# into a CMake variable
|
||||||
|
set(example_sources)
|
||||||
|
set(example_resources)
|
||||||
|
foreach (example_dir ${example_dirs})
|
||||||
|
# Get the .c files
|
||||||
|
file(GLOB sources ${example_dir}/*.c)
|
||||||
|
list(APPEND example_sources ${sources})
|
||||||
|
|
||||||
|
# Any any resources
|
||||||
|
file(GLOB resources ${example_dir}/resources/*)
|
||||||
|
list(APPEND example_resources ${resources})
|
||||||
|
endforeach ()
|
||||||
|
|
||||||
|
if(NOT CMAKE_USE_PTHREADS_INIT OR NOT HAVE_STDATOMIC_H)
|
||||||
|
# Items requiring pthreads
|
||||||
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_loading_thread.c)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (${PLATFORM} MATCHES "Android")
|
||||||
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c)
|
||||||
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/standard_lighting.c)
|
||||||
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_3d_picking.c)
|
||||||
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_vr_simulator.c)
|
||||||
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_3d_camera_free.c)
|
||||||
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_3d_camera_first_person.c)
|
||||||
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_world_screen.c)
|
||||||
|
|
||||||
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_mesh_picking.c)
|
||||||
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_cubicmap.c)
|
||||||
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_skybox.c)
|
||||||
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_mesh_picking.c)
|
||||||
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_mesh_generation.c)
|
||||||
|
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)
|
||||||
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_magicavoxel_loading.c)
|
||||||
|
|
||||||
|
|
||||||
if(${PLATFORM} MATCHES "Android")
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_custom_uniform.c)
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c)
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_model_shader.c)
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/standard_lighting.c)
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_postprocessing.c)
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_3d_picking.c)
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_raymarching.c)
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_vr_simulator.c)
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_palette_switch.c)
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_3d_camera_free.c)
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_basic_lighting.c)
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_3d_camera_first_person.c)
|
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_world_screen.c)
|
|
||||||
|
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_mesh_picking.c)
|
elseif (${PLATFORM} MATCHES "Web")
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_material_pbr.c)
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY")
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_cubicmap.c)
|
# Since WASM is used, ALLOW_MEMORY_GROWTH has no extra overheads
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_skybox.c)
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s ALLOW_MEMORY_GROWTH=1 --no-heap-copy")
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_mesh_picking.c)
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --shell-file ${CMAKE_SOURCE_DIR}/src/shell.html")
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/models/models_mesh_generation.c)
|
set(CMAKE_EXECUTABLE_SUFFIX ".html")
|
||||||
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)
|
|
||||||
|
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_custom_uniform.c)
|
# Remove the -rdynamic flag because otherwise emscripten
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_model_shader.c)
|
# does not generate HTML+JS+WASM files, only a non-working
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_postprocessing.c)
|
# and fat HTML
|
||||||
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_raymarching.c)
|
string(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}")
|
||||||
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")
|
elseif ("${PLATFORM}" STREQUAL "DRM")
|
||||||
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")
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c)
|
||||||
# Since WASM is used, ALLOW_MEMORY_GROWTH has no extra overheads
|
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c)
|
||||||
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(OUTPUT_EXT ".html")
|
|
||||||
|
|
||||||
# Remove the -rdynamic flag because otherwise emscripten
|
endif ()
|
||||||
# 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)
|
include_directories(BEFORE SYSTEM others/external/include)
|
||||||
|
|
||||||
if (NOT TARGET raylib)
|
if (NOT TARGET raylib)
|
||||||
find_package(raylib 2.0 REQUIRED)
|
find_package(raylib 2.0 REQUIRED)
|
||||||
endif()
|
endif ()
|
||||||
|
|
||||||
# Do each example
|
# Do each example
|
||||||
foreach(example_source ${example_sources})
|
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})
|
|
||||||
|
|
||||||
# Setup the example
|
|
||||||
add_executable(${example_name} ${example_source})
|
|
||||||
|
|
||||||
target_link_libraries(${example_name} raylib)
|
|
||||||
|
|
||||||
string(REGEX MATCH ".*/.*/" resources_dir ${example_source})
|
|
||||||
string(APPEND resources_dir "resources")
|
|
||||||
|
|
||||||
if(${PLATFORM} MATCHES "Web" AND EXISTS ${resources_dir})
|
|
||||||
# The local resources path needs to be mapped to /resources virtual path
|
|
||||||
string(APPEND resources_dir "@resources")
|
|
||||||
set_target_properties(${example_name} PROPERTIES LINK_FLAGS "--preload-file ${resources_dir}")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
if (${PLATFORM} MATCHES "Desktop")
|
|
||||||
# rlgl_standalone can't be linked with raylib because of duplicate rlgl symbols
|
|
||||||
foreach (example_source "others/rlgl_standalone.c")
|
|
||||||
# Create the basename for the example
|
# Create the basename for the example
|
||||||
get_filename_component(example_name ${example_source} NAME)
|
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})
|
|
||||||
target_include_directories(${example_name} PRIVATE ${raylib_INCLUDE_DIRS})
|
|
||||||
|
|
||||||
endforeach()
|
# Setup the example
|
||||||
endif()
|
add_executable(${example_name} ${example_source})
|
||||||
|
|
||||||
|
target_link_libraries(${example_name} raylib)
|
||||||
|
|
||||||
|
string(REGEX MATCH ".*/.*/" resources_dir ${example_source})
|
||||||
|
string(APPEND resources_dir "resources")
|
||||||
|
|
||||||
|
if (${PLATFORM} MATCHES "Web" AND EXISTS ${resources_dir})
|
||||||
|
# The local resources path needs to be mapped to /resources virtual path
|
||||||
|
string(APPEND resources_dir "@resources")
|
||||||
|
set_target_properties(${example_name} PROPERTIES LINK_FLAGS "--preload-file ${resources_dir}")
|
||||||
|
endif ()
|
||||||
|
endforeach ()
|
||||||
|
|
||||||
# Copy all of the resource files to the destination
|
# Copy all of the resource files to the destination
|
||||||
file(COPY ${example_resources} DESTINATION "resources/")
|
file(COPY ${example_resources} DESTINATION "resources/")
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# raylib makefile for Desktop platforms, Raspberry Pi, Android and HTML5
|
# raylib makefile for Desktop platforms, Raspberry Pi, Android and HTML5
|
||||||
#
|
#
|
||||||
# Copyright (c) 2013-2020 Ramon Santamaria (@raysan5)
|
# Copyright (c) 2013-2022 Ramon Santamaria (@raysan5)
|
||||||
#
|
#
|
||||||
# This software is provided "as-is", without any express or implied warranty. In no event
|
# 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.
|
# will the authors be held liable for any damages arising from the use of this software.
|
||||||
@ -23,126 +23,116 @@
|
|||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
||||||
|
# Define required environment variables
|
||||||
|
#------------------------------------------------------------------------------------------------
|
||||||
|
# Define target platform: PLATFORM_DESKTOP, PLATFORM_RPI, PLATFORM_DRM, PLATFORM_ANDROID, PLATFORM_WEB
|
||||||
|
PLATFORM ?= PLATFORM_DESKTOP
|
||||||
|
|
||||||
# Define required raylib variables
|
# Define required raylib variables
|
||||||
PROJECT_NAME ?= raylib_examples
|
PROJECT_NAME ?= raylib_examples
|
||||||
RAYLIB_VERSION ?= 2.5.0
|
RAYLIB_VERSION ?= 4.2.0
|
||||||
RAYLIB_API_VERSION ?= 2
|
RAYLIB_PATH ?= ..
|
||||||
RAYLIB_PATH ?= ..
|
|
||||||
|
|
||||||
# Define default options
|
# Locations of raylib.h and libraylib.a/libraylib.so
|
||||||
|
# NOTE: Those variables are only used for PLATFORM_OS: LINUX, BSD
|
||||||
|
RAYLIB_INCLUDE_PATH ?= /usr/local/include
|
||||||
|
RAYLIB_LIB_PATH ?= /usr/local/lib
|
||||||
|
|
||||||
# One of PLATFORM_DESKTOP, PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
# Library type compilation: STATIC (.a) or SHARED (.so/.dll)
|
||||||
PLATFORM ?= PLATFORM_DESKTOP
|
|
||||||
|
|
||||||
# Locations of your newly installed library and associated headers. See ../src/Makefile
|
|
||||||
# On Linux, if you have installed raylib but cannot compile the examples, check that
|
|
||||||
# the *_INSTALL_PATH values here are the same as those in src/Makefile or point to known locations.
|
|
||||||
# To enable system-wide compile-time and runtime linking to libraylib.so, run ../src/$ sudo make install RAYLIB_LIBTYPE_SHARED.
|
|
||||||
# To enable compile-time linking to a special version of libraylib.so, change these variables here.
|
|
||||||
# To enable runtime linking to a special version of libraylib.so, see EXAMPLE_RUNTIME_PATH below.
|
|
||||||
# If there is a libraylib in both EXAMPLE_RUNTIME_PATH and RAYLIB_INSTALL_PATH, at runtime,
|
|
||||||
# the library at EXAMPLE_RUNTIME_PATH, if present, will take precedence over the one at RAYLIB_INSTALL_PATH.
|
|
||||||
# RAYLIB_INSTALL_PATH should be the desired full path to libraylib. No relative paths.
|
|
||||||
DESTDIR ?= /usr/local
|
|
||||||
RAYLIB_INSTALL_PATH ?= $(DESTDIR)/lib
|
|
||||||
# RAYLIB_H_INSTALL_PATH locates the installed raylib header and associated source files.
|
|
||||||
RAYLIB_H_INSTALL_PATH ?= $(DESTDIR)/include
|
|
||||||
|
|
||||||
# Library type used for raylib: STATIC (.a) or SHARED (.so/.dll)
|
|
||||||
RAYLIB_LIBTYPE ?= STATIC
|
RAYLIB_LIBTYPE ?= STATIC
|
||||||
|
|
||||||
# Build mode for project: DEBUG or RELEASE
|
# Build mode for project: DEBUG or RELEASE
|
||||||
BUILD_MODE ?= RELEASE
|
BUILD_MODE ?= RELEASE
|
||||||
|
|
||||||
# Use external GLFW library instead of rglfw module
|
# Use external GLFW library instead of rglfw module
|
||||||
# TODO: Review usage on Linux. Target version of choice. Switch on -lglfw or -lglfw3
|
|
||||||
USE_EXTERNAL_GLFW ?= FALSE
|
USE_EXTERNAL_GLFW ?= FALSE
|
||||||
|
|
||||||
# Use Wayland display server protocol on Linux desktop
|
# Use Wayland display server protocol on Linux desktop (by default it uses X11 windowing system)
|
||||||
# by default it uses X11 windowing system
|
# NOTE: This variable is only used for PLATFORM_OS: LINUX
|
||||||
USE_WAYLAND_DISPLAY ?= FALSE
|
USE_WAYLAND_DISPLAY ?= FALSE
|
||||||
|
|
||||||
|
# Use cross-compiler for PLATFORM_RPI
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
|
USE_RPI_CROSS_COMPILER ?= FALSE
|
||||||
|
ifeq ($(USE_RPI_CROSS_COMPILER),TRUE)
|
||||||
|
RPI_TOOLCHAIN ?= C:/SysGCC/Raspberry
|
||||||
|
RPI_TOOLCHAIN_SYSROOT ?= $(RPI_TOOLCHAIN)/arm-linux-gnueabihf/sysroot
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Determine PLATFORM_OS in case PLATFORM_DESKTOP selected
|
# Determine PLATFORM_OS in case PLATFORM_DESKTOP selected
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
# No uname.exe on MinGW!, but OS=Windows_NT on Windows!
|
# No uname.exe on MinGW!, but OS=Windows_NT on Windows!
|
||||||
# ifeq ($(UNAME),Msys) -> Windows
|
# ifeq ($(UNAME),Msys) -> Windows
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
PLATFORM_OS=WINDOWS
|
PLATFORM_OS = WINDOWS
|
||||||
else
|
else
|
||||||
UNAMEOS=$(shell uname)
|
UNAMEOS = $(shell uname)
|
||||||
ifeq ($(UNAMEOS),Linux)
|
ifeq ($(UNAMEOS),Linux)
|
||||||
PLATFORM_OS=LINUX
|
PLATFORM_OS = LINUX
|
||||||
endif
|
endif
|
||||||
ifeq ($(UNAMEOS),FreeBSD)
|
ifeq ($(UNAMEOS),FreeBSD)
|
||||||
PLATFORM_OS=BSD
|
PLATFORM_OS = BSD
|
||||||
endif
|
endif
|
||||||
ifeq ($(UNAMEOS),OpenBSD)
|
ifeq ($(UNAMEOS),OpenBSD)
|
||||||
PLATFORM_OS=BSD
|
PLATFORM_OS = BSD
|
||||||
endif
|
endif
|
||||||
ifeq ($(UNAMEOS),NetBSD)
|
ifeq ($(UNAMEOS),NetBSD)
|
||||||
PLATFORM_OS=BSD
|
PLATFORM_OS = BSD
|
||||||
endif
|
endif
|
||||||
ifeq ($(UNAMEOS),DragonFly)
|
ifeq ($(UNAMEOS),DragonFly)
|
||||||
PLATFORM_OS=BSD
|
PLATFORM_OS = BSD
|
||||||
endif
|
endif
|
||||||
ifeq ($(UNAMEOS),Darwin)
|
ifeq ($(UNAMEOS),Darwin)
|
||||||
PLATFORM_OS=OSX
|
PLATFORM_OS = OSX
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
UNAMEOS=$(shell uname)
|
UNAMEOS = $(shell uname)
|
||||||
ifeq ($(UNAMEOS),Linux)
|
ifeq ($(UNAMEOS),Linux)
|
||||||
PLATFORM_OS=LINUX
|
PLATFORM_OS = LINUX
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||||
|
UNAMEOS = $(shell uname)
|
||||||
|
ifeq ($(UNAMEOS),Linux)
|
||||||
|
PLATFORM_OS = LINUX
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# RAYLIB_PATH adjustment for different platforms.
|
# RAYLIB_PATH adjustment for LINUX platform
|
||||||
# If using GNU make, we can get the full path to the top of the tree. Windows? BSD?
|
# TODO: Do we really need this?
|
||||||
# Required for ldconfig or other tools that do not perform path expansion.
|
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
RAYLIB_PREFIX ?= ..
|
RAYLIB_PREFIX ?= ..
|
||||||
RAYLIB_PATH = $(realpath $(RAYLIB_PREFIX))
|
RAYLIB_PATH = $(realpath $(RAYLIB_PREFIX))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
# Default path for raylib on Raspberry Pi, if installed in different path, update it!
|
|
||||||
# This is not currently used by src/Makefile. Not sure of its origin or usage. Refer to wiki.
|
# Default path for raylib on Raspberry Pi
|
||||||
# TODO: update install: target in src/Makefile for RPI, consider relation to LINUX.
|
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
RAYLIB_PATH ?= /home/pi/raylib
|
RAYLIB_PATH ?= /home/pi/raylib
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||||
|
RAYLIB_PATH ?= /home/pi/raylib
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Define raylib release directory for compiled library
|
||||||
|
RAYLIB_RELEASE_PATH ?= $(RAYLIB_PATH)/src
|
||||||
|
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
# Emscripten required variables
|
# Emscripten required variables
|
||||||
EMSDK_PATH ?= C:/emsdk
|
EMSDK_PATH ?= C:/emsdk
|
||||||
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/fastcomp/emscripten
|
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
||||||
CLANG_PATH = $(EMSDK_PATH)/fastcomp/bin
|
CLANG_PATH = $(EMSDK_PATH)/upstream/bin
|
||||||
PYTHON_PATH = $(EMSDK_PATH)/python/2.7.13.1_64bit/python-2.7.13.amd64
|
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-1_64bit
|
||||||
NODE_PATH = $(EMSDK_PATH)/node/12.9.1_64bit/bin
|
NODE_PATH = $(EMSDK_PATH)/node/14.15.5_64bit/bin
|
||||||
export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH);C:\raylib\MinGW\bin:$$(PATH)
|
export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH):$$(PATH)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Define raylib release directory for compiled library.
|
# Define default C compiler: CC
|
||||||
# RAYLIB_RELEASE_PATH points to provided binaries or your freshly built version
|
#------------------------------------------------------------------------------------------------
|
||||||
RAYLIB_RELEASE_PATH ?= $(RAYLIB_PATH)/src
|
|
||||||
|
|
||||||
# EXAMPLE_RUNTIME_PATH embeds a custom runtime location of libraylib.so or other desired libraries
|
|
||||||
# into each example binary compiled with RAYLIB_LIBTYPE=SHARED. It defaults to RAYLIB_RELEASE_PATH
|
|
||||||
# so that these examples link at runtime with your version of libraylib.so in ../release/libs/linux
|
|
||||||
# without formal installation from ../src/Makefile. It aids portability and is useful if you have
|
|
||||||
# multiple versions of raylib, have raylib installed to a non-standard location, or want to
|
|
||||||
# bundle libraylib.so with your game. Change it to your liking.
|
|
||||||
# NOTE: If, at runtime, there is a libraylib.so at both EXAMPLE_RUNTIME_PATH and RAYLIB_INSTALL_PATH,
|
|
||||||
# The library at EXAMPLE_RUNTIME_PATH, if present, will take precedence over RAYLIB_INSTALL_PATH,
|
|
||||||
# Implemented for LINUX below with CFLAGS += -Wl,-rpath,$(EXAMPLE_RUNTIME_PATH)
|
|
||||||
# To see the result, run readelf -d core/core_basic_window; looking at the RPATH or RUNPATH attribute.
|
|
||||||
# To see which libraries a built example is linking to, ldd core/core_basic_window;
|
|
||||||
# Look for libraylib.so.1 => $(RAYLIB_INSTALL_PATH)/libraylib.so.1 or similar listing.
|
|
||||||
EXAMPLE_RUNTIME_PATH ?= $(RAYLIB_RELEASE_PATH)
|
|
||||||
|
|
||||||
# Define default C compiler: gcc
|
|
||||||
# NOTE: define g++ compiler if using C++
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
@ -169,16 +159,24 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
|
|||||||
CC = emcc
|
CC = emcc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Define default make program: Mingw32-make
|
# Define default make program: MAKE
|
||||||
MAKE = mingw32-make
|
#------------------------------------------------------------------------------------------------
|
||||||
|
MAKE ?= make
|
||||||
|
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||||
MAKE = make
|
MAKE = mingw32-make
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_ANDROID)
|
||||||
|
MAKE = mingw32-make
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
|
MAKE = mingw32-make
|
||||||
|
endif
|
||||||
|
|
||||||
# Define compiler flags:
|
# Define compiler flags: CFLAGS
|
||||||
|
#------------------------------------------------------------------------------------------------
|
||||||
# -O1 defines optimization level
|
# -O1 defines optimization level
|
||||||
# -g include debug information on compilation
|
# -g include debug information on compilation
|
||||||
# -s strip unnecessary data from build
|
# -s strip unnecessary data from build
|
||||||
@ -186,11 +184,12 @@ endif
|
|||||||
# -std=c99 defines C language mode (standard C from 1999 revision)
|
# -std=c99 defines C language mode (standard C from 1999 revision)
|
||||||
# -std=gnu99 defines C language mode (GNU C from 1999 revision)
|
# -std=gnu99 defines C language mode (GNU C from 1999 revision)
|
||||||
# -Wno-missing-braces ignore invalid warning (GCC bug 53119)
|
# -Wno-missing-braces ignore invalid warning (GCC bug 53119)
|
||||||
|
# -Wno-unused-value ignore unused return values of some functions (i.e. fread())
|
||||||
# -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec
|
# -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec
|
||||||
CFLAGS += -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces
|
CFLAGS = -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces -Wunused-result
|
||||||
|
|
||||||
ifeq ($(BUILD_MODE),DEBUG)
|
ifeq ($(BUILD_MODE),DEBUG)
|
||||||
CFLAGS += -g
|
CFLAGS += -g -D_DEBUG
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
CFLAGS += -s ASSERTIONS=1 --profiling
|
CFLAGS += -s ASSERTIONS=1 --profiling
|
||||||
endif
|
endif
|
||||||
@ -203,104 +202,110 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Additional flags for compiler (if desired)
|
# Additional flags for compiler (if desired)
|
||||||
|
# -Wextra enables some extra warning flags that are not enabled by -Wall
|
||||||
|
# -Wmissing-prototypes warn if a global function is defined without a previous prototype declaration
|
||||||
|
# -Wstrict-prototypes warn if a function is declared or defined without specifying the argument types
|
||||||
|
# -Werror=implicit-function-declaration catch function calls without prior declaration
|
||||||
#CFLAGS += -Wextra -Wmissing-prototypes -Wstrict-prototypes
|
#CFLAGS += -Wextra -Wmissing-prototypes -Wstrict-prototypes
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
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)/src/raylib.rc.data -Wl,--subsystem,windows
|
|
||||||
endif
|
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
ifeq ($(RAYLIB_LIBTYPE),STATIC)
|
ifeq ($(RAYLIB_LIBTYPE),STATIC)
|
||||||
CFLAGS += -D_DEFAULT_SOURCE
|
CFLAGS += -D_DEFAULT_SOURCE
|
||||||
endif
|
endif
|
||||||
ifeq ($(RAYLIB_LIBTYPE),SHARED)
|
ifeq ($(RAYLIB_LIBTYPE),SHARED)
|
||||||
# Explicitly enable runtime link to libraylib.so
|
# Explicitly enable runtime link to libraylib.so
|
||||||
CFLAGS += -Wl,-rpath,$(EXAMPLE_RUNTIME_PATH)
|
CFLAGS += -Wl,-rpath,$(RAYLIB_RELEASE_PATH)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
CFLAGS += -std=gnu99
|
CFLAGS += -std=gnu99
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||||
|
CFLAGS += -std=gnu99 -DEGL_NO_X11
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Define include paths for required headers: INCLUDE_PATHS
|
||||||
|
# NOTE: Some external/extras libraries could be required (stb, easings...)
|
||||||
|
#------------------------------------------------------------------------------------------------
|
||||||
|
INCLUDE_PATHS = -I. -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external
|
||||||
|
|
||||||
|
# Define additional directories containing required header files
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
|
ifeq ($(PLATFORM_OS),BSD)
|
||||||
|
INCLUDE_PATHS += -I$(RAYLIB_INCLUDE_PATH)
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
|
INCLUDE_PATHS += -I$(RAYLIB_INCLUDE_PATH)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
|
INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include
|
||||||
|
INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include/interface/vmcs_host/linux
|
||||||
|
INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include/interface/vcos/pthreads
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||||
|
INCLUDE_PATHS += -I/usr/include/libdrm
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Define library paths containing required libs: LDFLAGS
|
||||||
|
#------------------------------------------------------------------------------------------------
|
||||||
|
LDFLAGS = -L. -L$(RAYLIB_RELEASE_PATH) -L$(RAYLIB_PATH)/src
|
||||||
|
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
|
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||||
|
# NOTE: The resource .rc file contains windows executable icon and properties
|
||||||
|
LDFLAGS += $(RAYLIB_PATH)/src/raylib.rc.data
|
||||||
|
# -Wl,--subsystem,windows hides the console window
|
||||||
|
ifeq ($(BUILD_MODE), RELEASE)
|
||||||
|
LDFLAGS += -Wl,--subsystem,windows
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
|
LDFLAGS += -L$(RAYLIB_LIB_PATH)
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM_OS),BSD)
|
||||||
|
LDFLAGS += -Lsrc -L$(RAYLIB_LIB_PATH)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
# -Os # size optimization
|
# -Os # size optimization
|
||||||
# -O2 # optimization level 2, if used, also set --memory-init-file 0
|
# -O2 # optimization level 2, if used, also set --memory-init-file 0
|
||||||
# -s USE_GLFW=3 # Use glfw3 library (context/input management)
|
# -s USE_GLFW=3 # Use glfw3 library (context/input management)
|
||||||
# -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing -> WARNING: Audio buffers could FAIL!
|
# -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing -> WARNING: Audio buffers could FAIL!
|
||||||
# -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB)
|
# -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) (67108864 = 64MB)
|
||||||
# -s USE_PTHREADS=1 # multithreading support
|
# -s USE_PTHREADS=1 # multithreading support
|
||||||
# -s WASM=0 # disable Web Assembly, emitted by default
|
# -s WASM=0 # disable Web Assembly, emitted by default
|
||||||
# -s EMTERPRETIFY=1 # enable emscripten code interpreter (very slow)
|
# -s ASYNCIFY # lets synchronous C/C++ code interact with asynchronous JS
|
||||||
# -s EMTERPRETIFY_ASYNC=1 # support synchronous loops by emterpreter
|
|
||||||
# -s FORCE_FILESYSTEM=1 # force filesystem to load/save files data
|
# -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)
|
# -s ASSERTIONS=1 # enable runtime checks for common memory allocation errors (-O1 and above turn it off)
|
||||||
# --profiling # include information for code profiling
|
# --profiling # include information for code profiling
|
||||||
# --memory-init-file 0 # to avoid an external memory initialization code file (.mem)
|
# --memory-init-file 0 # to avoid an external memory initialization code file (.mem)
|
||||||
# --preload-file resources # specify a resources folder for data compilation
|
# --preload-file resources # specify a resources folder for data compilation
|
||||||
CFLAGS += -s USE_GLFW=3 -s FORCE_FILESYSTEM=1 -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1 --preload-file $(dir $<)resources@resources
|
# --source-map-base # allow debugging in browser with source map
|
||||||
|
LDFLAGS += -s USE_GLFW=3 -s ASYNCIFY -s TOTAL_MEMORY=67108864 -s FORCE_FILESYSTEM=1 --preload-file $(dir $<)resources@resources
|
||||||
|
|
||||||
# NOTE: Simple raylib examples are compiled to be interpreter by emterpreter, that way,
|
# 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
|
# 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
|
# 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.
|
# logic to a self contained function: UpdateDrawFrame(), check core_basic_window_web.c for reference.
|
||||||
|
|
||||||
# Define a custom shell .html and output extension
|
# Define a custom shell .html and output extension
|
||||||
CFLAGS += --shell-file $(RAYLIB_PATH)/src/shell.html
|
LDFLAGS += --shell-file $(RAYLIB_PATH)/src/shell.html
|
||||||
EXT = .html
|
EXT = .html
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Define include paths for required headers
|
|
||||||
# NOTE: Several external required libraries (stb and others)
|
|
||||||
INCLUDE_PATHS = -I. -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external
|
|
||||||
|
|
||||||
# Define additional directories containing required header files
|
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
# RPI required libraries
|
LDFLAGS += -L$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/lib
|
||||||
INCLUDE_PATHS += -I/opt/vc/include
|
|
||||||
INCLUDE_PATHS += -I/opt/vc/include/interface/vmcs_host/linux
|
|
||||||
INCLUDE_PATHS += -I/opt/vc/include/interface/vcos/pthreads
|
|
||||||
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
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Define library paths containing required libs.
|
# Define libraries required on linking: LDLIBS
|
||||||
LDFLAGS = -L. -L$(RAYLIB_RELEASE_PATH) -L$(RAYLIB_PATH)/src
|
# NOTE: To link libraries (lib<name>.so or lib<name>.a), use -l<name>
|
||||||
|
#------------------------------------------------------------------------------------------------
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|
||||||
ifeq ($(PLATFORM_OS),BSD)
|
|
||||||
# Consider -L$(RAYLIB_INSTALL_PATH)
|
|
||||||
LDFLAGS += -L. -Lsrc -L/usr/local/lib
|
|
||||||
endif
|
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
|
||||||
# Reset everything.
|
|
||||||
# Precedence: immediately local, installed version, raysan5 provided libs
|
|
||||||
LDFLAGS = -L. -L$(RAYLIB_INSTALL_PATH) -L$(RAYLIB_RELEASE_PATH)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
|
||||||
LDFLAGS += -L/opt/vc/lib
|
|
||||||
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)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||||
# Libraries for Windows desktop compilation
|
# Libraries for Windows desktop compilation
|
||||||
# NOTE: WinMM library required to set high-res timer resolution
|
# NOTE: WinMM library required to set high-res timer resolution
|
||||||
LDLIBS = -lraylib -lopengl32 -lgdi32 -lwinmm
|
LDLIBS = -lraylib -lopengl32 -lgdi32 -lwinmm
|
||||||
# Required for physac examples
|
|
||||||
LDLIBS += -static -lpthread
|
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
# Libraries for Debian GNU/Linux desktop compiling
|
# Libraries for Debian GNU/Linux desktop compiling
|
||||||
@ -324,7 +329,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
# Libraries for OSX 10.9 desktop compiling
|
# Libraries for OSX 10.9 desktop compiling
|
||||||
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
||||||
LDLIBS = -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo
|
LDLIBS = -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),BSD)
|
ifeq ($(PLATFORM_OS),BSD)
|
||||||
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
||||||
@ -342,16 +347,26 @@ endif
|
|||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
# Libraries for Raspberry Pi compiling
|
# Libraries for Raspberry Pi compiling
|
||||||
# NOTE: Required packages: libasound2-dev (ALSA)
|
# NOTE: Required packages: libasound2-dev (ALSA)
|
||||||
LDLIBS = -lraylib -lbrcmGLESv2 -lbrcmEGL -lpthread -lrt -lm -lbcm_host -ldl
|
LDLIBS = -lraylib -lbrcmGLESv2 -lbrcmEGL -lpthread -lrt -lm -lbcm_host -ldl -latomic
|
||||||
|
ifeq ($(USE_RPI_CROSS_COMPILER),TRUE)
|
||||||
|
LDLIBS += -lvchiq_arm -lvcos
|
||||||
|
endif
|
||||||
|
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 -latomic
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
# Libraries for web (HTML5) compiling
|
# Libraries for web (HTML5) compiling
|
||||||
LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.bc
|
LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Define all object files required
|
# Define source code object files required
|
||||||
|
#------------------------------------------------------------------------------------------------
|
||||||
CORE = \
|
CORE = \
|
||||||
core/core_basic_window \
|
core/core_basic_window \
|
||||||
|
core/core_basic_screen_manager \
|
||||||
core/core_input_keys \
|
core/core_input_keys \
|
||||||
core/core_input_mouse \
|
core/core_input_mouse \
|
||||||
core/core_input_mouse_wheel \
|
core/core_input_mouse_wheel \
|
||||||
@ -360,19 +375,25 @@ CORE = \
|
|||||||
core/core_input_gestures \
|
core/core_input_gestures \
|
||||||
core/core_2d_camera \
|
core/core_2d_camera \
|
||||||
core/core_2d_camera_platformer \
|
core/core_2d_camera_platformer \
|
||||||
|
core/core_2d_camera_mouse_zoom \
|
||||||
core/core_3d_camera_mode \
|
core/core_3d_camera_mode \
|
||||||
core/core_3d_camera_free \
|
core/core_3d_camera_free \
|
||||||
core/core_3d_camera_first_person \
|
core/core_3d_camera_first_person \
|
||||||
core/core_3d_picking \
|
core/core_3d_picking \
|
||||||
core/core_world_screen \
|
core/core_world_screen \
|
||||||
core/core_custom_logging \
|
core/core_custom_logging \
|
||||||
core/core_window_letterbox \
|
|
||||||
core/core_drop_files \
|
core/core_drop_files \
|
||||||
core/core_random_values \
|
core/core_random_values \
|
||||||
core/core_scissor_test \
|
core/core_scissor_test \
|
||||||
core/core_storage_values \
|
core/core_storage_values \
|
||||||
core/core_vr_simulator \
|
core/core_vr_simulator \
|
||||||
core/core_loading_thread
|
core/core_loading_thread \
|
||||||
|
core/core_window_flags \
|
||||||
|
core/core_window_letterbox \
|
||||||
|
core/core_window_should_close \
|
||||||
|
core/core_split_screen \
|
||||||
|
core/core_smooth_pixelperfect \
|
||||||
|
core/core_custom_frame_control
|
||||||
|
|
||||||
SHAPES = \
|
SHAPES = \
|
||||||
shapes/shapes_basic_shapes \
|
shapes/shapes_basic_shapes \
|
||||||
@ -389,12 +410,12 @@ SHAPES = \
|
|||||||
shapes/shapes_easings_rectangle_array \
|
shapes/shapes_easings_rectangle_array \
|
||||||
shapes/shapes_draw_ring \
|
shapes/shapes_draw_ring \
|
||||||
shapes/shapes_draw_circle_sector \
|
shapes/shapes_draw_circle_sector \
|
||||||
shapes/shapes_draw_rectangle_rounded
|
shapes/shapes_draw_rectangle_rounded \
|
||||||
|
shapes/shapes_top_down_lights
|
||||||
|
|
||||||
TEXTURES = \
|
TEXTURES = \
|
||||||
textures/textures_logo_raylib \
|
textures/textures_logo_raylib \
|
||||||
textures/textures_mouse_painting \
|
textures/textures_mouse_painting \
|
||||||
textures/textures_rectangle \
|
|
||||||
textures/textures_srcrec_dstrec \
|
textures/textures_srcrec_dstrec \
|
||||||
textures/textures_image_drawing \
|
textures/textures_image_drawing \
|
||||||
textures/textures_image_generation \
|
textures/textures_image_generation \
|
||||||
@ -406,10 +427,16 @@ TEXTURES = \
|
|||||||
textures/textures_particles_blending \
|
textures/textures_particles_blending \
|
||||||
textures/textures_npatch_drawing \
|
textures/textures_npatch_drawing \
|
||||||
textures/textures_background_scrolling \
|
textures/textures_background_scrolling \
|
||||||
|
textures/textures_sprite_anim \
|
||||||
textures/textures_sprite_button \
|
textures/textures_sprite_button \
|
||||||
textures/textures_sprite_explosion \
|
textures/textures_sprite_explosion \
|
||||||
textures/textures_bunnymark
|
textures/textures_bunnymark \
|
||||||
|
textures/textures_blend_modes \
|
||||||
|
textures/textures_draw_tiled \
|
||||||
|
textures/textures_polygon \
|
||||||
|
textures/textures_gif_player \
|
||||||
|
textures/textures_fog_of_war
|
||||||
|
|
||||||
TEXT = \
|
TEXT = \
|
||||||
text/text_raylib_fonts \
|
text/text_raylib_fonts \
|
||||||
text/text_font_spritefont \
|
text/text_font_spritefont \
|
||||||
@ -420,8 +447,10 @@ TEXT = \
|
|||||||
text/text_input_box \
|
text/text_input_box \
|
||||||
text/text_writing_anim \
|
text/text_writing_anim \
|
||||||
text/text_rectangle_bounds \
|
text/text_rectangle_bounds \
|
||||||
text/text_unicode
|
text/text_unicode \
|
||||||
|
text/text_draw_3d \
|
||||||
|
text/text_codepoints_loading
|
||||||
|
|
||||||
MODELS = \
|
MODELS = \
|
||||||
models/models_animation \
|
models/models_animation \
|
||||||
models/models_billboard \
|
models/models_billboard \
|
||||||
@ -429,17 +458,18 @@ MODELS = \
|
|||||||
models/models_cubicmap \
|
models/models_cubicmap \
|
||||||
models/models_first_person_maze \
|
models/models_first_person_maze \
|
||||||
models/models_geometric_shapes \
|
models/models_geometric_shapes \
|
||||||
models/models_material_pbr \
|
|
||||||
models/models_mesh_generation \
|
models/models_mesh_generation \
|
||||||
models/models_mesh_picking \
|
models/models_mesh_picking \
|
||||||
models/models_loading \
|
models/models_loading \
|
||||||
|
models/models_loading_vox \
|
||||||
|
models/models_loading_gltf \
|
||||||
models/models_orthographic_projection \
|
models/models_orthographic_projection \
|
||||||
models/models_rlgl_solar_system \
|
models/models_rlgl_solar_system \
|
||||||
models/models_skybox \
|
models/models_skybox \
|
||||||
models/models_yaw_pitch_roll \
|
models/models_yaw_pitch_roll \
|
||||||
models/models_heightmap \
|
models/models_heightmap \
|
||||||
models/models_waving_cubes
|
models/models_waving_cubes
|
||||||
|
|
||||||
SHADERS = \
|
SHADERS = \
|
||||||
shaders/shaders_model_shader \
|
shaders/shaders_model_shader \
|
||||||
shaders/shaders_shapes_textures \
|
shaders/shaders_shapes_textures \
|
||||||
@ -449,40 +479,39 @@ SHADERS = \
|
|||||||
shaders/shaders_raymarching \
|
shaders/shaders_raymarching \
|
||||||
shaders/shaders_texture_drawing \
|
shaders/shaders_texture_drawing \
|
||||||
shaders/shaders_texture_waves \
|
shaders/shaders_texture_waves \
|
||||||
|
shaders/shaders_texture_outline \
|
||||||
shaders/shaders_julia_set \
|
shaders/shaders_julia_set \
|
||||||
shaders/shaders_eratosthenes \
|
shaders/shaders_eratosthenes \
|
||||||
shaders/shaders_basic_lighting \
|
shaders/shaders_basic_lighting \
|
||||||
shaders/shaders_fog \
|
shaders/shaders_fog \
|
||||||
shaders/shaders_simple_mask
|
shaders/shaders_simple_mask \
|
||||||
|
shaders/shaders_spotlight \
|
||||||
|
shaders/shaders_hot_reloading \
|
||||||
|
shaders/shaders_mesh_instancing \
|
||||||
|
shaders/shaders_multi_sample2d
|
||||||
|
|
||||||
AUDIO = \
|
AUDIO = \
|
||||||
audio/audio_module_playing \
|
audio/audio_module_playing \
|
||||||
audio/audio_music_stream \
|
audio/audio_music_stream \
|
||||||
audio/audio_raw_stream \
|
audio/audio_raw_stream \
|
||||||
audio/audio_sound_loading \
|
audio/audio_sound_loading \
|
||||||
audio/audio_multichannel_sound
|
audio/audio_multichannel_sound \
|
||||||
|
audio/audio_stream_effects
|
||||||
PHYSICS = \
|
|
||||||
physics/physics_demo \
|
|
||||||
physics/physics_friction \
|
|
||||||
physics/physics_movement \
|
|
||||||
physics/physics_restitution \
|
|
||||||
physics/physics_shatter
|
|
||||||
|
|
||||||
|
|
||||||
CURRENT_MAKEFILE = $(lastword $(MAKEFILE_LIST))
|
CURRENT_MAKEFILE = $(lastword $(MAKEFILE_LIST))
|
||||||
|
|
||||||
|
# Define processes to execute
|
||||||
|
#------------------------------------------------------------------------------------------------
|
||||||
# Default target entry
|
# Default target entry
|
||||||
all: $(CORE) $(SHAPES) $(TEXT) $(TEXTURES) $(MODELS) $(SHADERS) $(AUDIO) $(PHYSICS)
|
all: $(CORE) $(SHAPES) $(TEXT) $(TEXTURES) $(MODELS) $(SHADERS) $(AUDIO)
|
||||||
|
|
||||||
core: $(CORE)
|
core: $(CORE)
|
||||||
shapes: $(SHAPES)
|
shapes: $(SHAPES)
|
||||||
text: $(TEXT)
|
|
||||||
textures: $(TEXTURES)
|
textures: $(TEXTURES)
|
||||||
|
text: $(TEXT)
|
||||||
models: $(MODELS)
|
models: $(MODELS)
|
||||||
shaders: $(SHADERS)
|
shaders: $(SHADERS)
|
||||||
audio: $(AUDIO)
|
audio: $(AUDIO)
|
||||||
physics: $(PHYSICS)
|
|
||||||
|
|
||||||
# Generic compilation pattern
|
# Generic compilation pattern
|
||||||
# NOTE: Examples must be ready for Android compilation!
|
# NOTE: Examples must be ready for Android compilation!
|
||||||
@ -500,7 +529,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||||||
del *.o *.exe /s
|
del *.o *.exe /s
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable|x-pie-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -fv
|
find . -type f -executable -delete
|
||||||
|
rm -fv *.o
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
find . -type f -perm +ugo+x -delete
|
find . -type f -perm +ugo+x -delete
|
||||||
@ -511,6 +541,10 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
|
|||||||
find . -type f -executable -delete
|
find . -type f -executable -delete
|
||||||
rm -fv *.o
|
rm -fv *.o
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||||
|
find . -type f -executable -delete
|
||||||
|
rm -fv *.o
|
||||||
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
del *.o *.html *.js
|
del *.o *.html *.js
|
||||||
endif
|
endif
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# raylib makefile for Android project (APK building)
|
# raylib makefile for Android project (APK building)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 Ramon Santamaria (@raysan5)
|
# Copyright (c) 2017-2022 Ramon Santamaria (@raysan5)
|
||||||
#
|
#
|
||||||
# This software is provided "as-is", without any express or implied warranty. In no event
|
# 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.
|
# will the authors be held liable for any damages arising from the use of this software.
|
||||||
@ -26,53 +26,80 @@ PLATFORM ?= PLATFORM_ANDROID
|
|||||||
RAYLIB_PATH ?= ..\..
|
RAYLIB_PATH ?= ..\..
|
||||||
|
|
||||||
# Define Android architecture (armeabi-v7a, arm64-v8a, x86, x86-64) and API version
|
# Define Android architecture (armeabi-v7a, arm64-v8a, x86, x86-64) and API version
|
||||||
ANDROID_ARCH ?= ARM
|
# Starting in 2019 using ARM64 is mandatory for published apps,
|
||||||
ANDROID_API_VERSION = 21
|
# 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)
|
ifeq ($(ANDROID_ARCH),ARM)
|
||||||
ANDROID_ARCH_NAME = armeabi-v7a
|
ANDROID_ARCH_NAME = armeabi-v7a
|
||||||
endif
|
endif
|
||||||
ifeq ($(ANDROID_ARCH),ARM64)
|
ifeq ($(ANDROID_ARCH),ARM64)
|
||||||
ANDROID_ARCH_NAME = arm64-v8a
|
ANDROID_ARCH_NAME = arm64-v8a
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(ANDROID_ARCH),x86)
|
||||||
|
ANDROID_ARCH_NAME = i686
|
||||||
|
endif
|
||||||
|
ifeq ($(ANDROID_ARCH),x86_64)
|
||||||
|
ANDROID_ARCH_NAME = x86_64
|
||||||
|
endif
|
||||||
|
|
||||||
# Required path variables
|
# Required path variables
|
||||||
# NOTE: JAVA_HOME must be set to JDK
|
# NOTE: JAVA_HOME must be set to JDK (using OpenJDK 13)
|
||||||
JAVA_HOME ?= C:/JavaJDK
|
JAVA_HOME ?= C:/open-jdk
|
||||||
ANDROID_HOME = C:/android-sdk
|
ANDROID_HOME ?= C:/android-sdk
|
||||||
ANDROID_TOOLCHAIN = C:/android_toolchain_$(ANDROID_ARCH)_API$(ANDROID_API_VERSION)
|
ANDROID_BUILD_TOOLS ?= $(ANDROID_HOME)/build-tools/29.0.3
|
||||||
ANDROID_BUILD_TOOLS = $(ANDROID_HOME)/build-tools/28.0.1
|
|
||||||
ANDROID_PLATFORM_TOOLS = $(ANDROID_HOME)/platform-tools
|
ANDROID_PLATFORM_TOOLS = $(ANDROID_HOME)/platform-tools
|
||||||
|
|
||||||
# Android project configuration variables
|
# Android project configuration variables
|
||||||
PROJECT_NAME ?= raylib_game
|
PROJECT_NAME ?= raylib_game
|
||||||
PROJECT_LIBRARY_NAME ?= main
|
PROJECT_LIBRARY_NAME ?= main
|
||||||
PROJECT_BUILD_PATH ?= android.$(PROJECT_NAME)
|
PROJECT_BUILD_ID ?= android
|
||||||
|
PROJECT_BUILD_PATH ?= $(PROJECT_BUILD_ID).$(PROJECT_NAME)
|
||||||
PROJECT_RESOURCES_PATH ?= resources
|
PROJECT_RESOURCES_PATH ?= resources
|
||||||
PROJECT_SOURCE_FILES ?= raylib_game.c
|
PROJECT_SOURCE_FILES ?= raylib_game.c
|
||||||
|
NATIVE_APP_GLUE_PATH = $(ANDROID_NDK)/sources/android/native_app_glue
|
||||||
|
|
||||||
# Some source files are placed in directories, when compiling to some
|
# Some source files are placed in directories, when compiling to some
|
||||||
# output directory other than source, that directory must pre-exist.
|
# output directory other than source, that directory must pre-exist.
|
||||||
# Here we get a list of required folders that need to be created on
|
# Here we get a list of required folders that need to be created on
|
||||||
# code output folder $(PROJECT_BUILD_PATH)\obj to avoid GCC errors.
|
# code output folder $(PROJECT_BUILD_PATH)\obj to avoid GCC errors.
|
||||||
PROJECT_SOURCE_DIRS = $(sort $(dir $(PROJECT_SOURCE_FILES)))
|
PROJECT_SOURCE_DIRS = $(sort $(dir $(PROJECT_SOURCE_FILES)))
|
||||||
|
|
||||||
# Android app configuration variables
|
# Android app configuration variables
|
||||||
APP_LABEL_NAME ?= rGame
|
APP_LABEL_NAME ?= rGame
|
||||||
APP_COMPANY_NAME ?= raylib
|
APP_COMPANY_NAME ?= raylib
|
||||||
APP_PRODUCT_NAME ?= rgame
|
APP_PRODUCT_NAME ?= rgame
|
||||||
APP_VERSION_CODE ?= 1
|
APP_VERSION_CODE ?= 1
|
||||||
APP_VERSION_NAME ?= 1.0
|
APP_VERSION_NAME ?= 1.0
|
||||||
APP_ICON_LDPI ?= $(RAYLIB_PATH)\logo\raylib_36x36.png
|
APP_ICON_LDPI ?= $(RAYLIB_PATH)/logo/raylib_36x36.png
|
||||||
APP_ICON_MDPI ?= $(RAYLIB_PATH)\logo\raylib_48x48.png
|
APP_ICON_MDPI ?= $(RAYLIB_PATH)/logo/raylib_48x48.png
|
||||||
APP_ICON_HDPI ?= $(RAYLIB_PATH)\logo\raylib_72x72.png
|
APP_ICON_HDPI ?= $(RAYLIB_PATH)/logo/raylib_72x72.png
|
||||||
APP_SCREEN_ORIENTATION ?= landscape
|
APP_SCREEN_ORIENTATION ?= landscape
|
||||||
APP_KEYSTORE_PASS ?= raylib
|
APP_KEYSTORE_PASS ?= raylib
|
||||||
|
|
||||||
# Library type used for raylib: STATIC (.a) or SHARED (.so/.dll)
|
# Library type used for raylib: STATIC (.a) or SHARED (.so/.dll)
|
||||||
RAYLIB_LIBTYPE ?= STATIC
|
RAYLIB_LIBTYPE ?= STATIC
|
||||||
|
|
||||||
# Library path for libraylib.a/libraylib.so
|
# Library path for libraylib.a/libraylib.so
|
||||||
RAYLIB_LIB_PATH = $(RAYLIB_PATH)\src
|
RAYLIB_LIB_PATH = $(RAYLIB_PATH)/src
|
||||||
|
|
||||||
|
# Define copy command depending on OS
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
COPY_COMMAND ?= copy /Y
|
||||||
|
else
|
||||||
|
COPY_COMMAND ?= cp -f
|
||||||
|
endif
|
||||||
|
|
||||||
# Shared libs must be added to APK if required
|
# Shared libs must be added to APK if required
|
||||||
# NOTE: Generated NativeLoader.java automatically load those libraries
|
# NOTE: Generated NativeLoader.java automatically load those libraries
|
||||||
@ -81,15 +108,22 @@ ifeq ($(RAYLIB_LIBTYPE),SHARED)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Compiler and archiver
|
# Compiler and archiver
|
||||||
# NOTE: GCC is being deprecated in Android NDK r16
|
|
||||||
ifeq ($(ANDROID_ARCH),ARM)
|
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
|
AR = $(ANDROID_TOOLCHAIN)/bin/arm-linux-androideabi-ar
|
||||||
endif
|
endif
|
||||||
ifeq ($(ANDROID_ARCH),ARM64)
|
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
|
AR = $(ANDROID_TOOLCHAIN)/bin/aarch64-linux-android-ar
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(ANDROID_ARCH),x86)
|
||||||
|
CC = $(ANDROID_TOOLCHAIN)/bin/i686-linux-android$(ANDROID_API_VERSION)-clang
|
||||||
|
AR = $(ANDROID_TOOLCHAIN)/bin/i686-linux-android-ar
|
||||||
|
endif
|
||||||
|
ifeq ($(ANDROID_ARCH),x86_64)
|
||||||
|
CC = $(ANDROID_TOOLCHAIN)/bin/x86_64-linux-android$(ANDROID_API_VERSION)-clang
|
||||||
|
AR = $(ANDROID_TOOLCHAIN)/bin/x86_64-linux-android-ar
|
||||||
|
endif
|
||||||
|
|
||||||
# Compiler flags for arquitecture
|
# Compiler flags for arquitecture
|
||||||
ifeq ($(ANDROID_ARCH),ARM)
|
ifeq ($(ANDROID_ARCH),ARM)
|
||||||
@ -106,7 +140,7 @@ CFLAGS += -Wall -Wa,--noexecstack -Wformat -Werror=format-security -no-canonical
|
|||||||
CFLAGS += -DANDROID -DPLATFORM_ANDROID -D__ANDROID_API__=$(ANDROID_API_VERSION)
|
CFLAGS += -DANDROID -DPLATFORM_ANDROID -D__ANDROID_API__=$(ANDROID_API_VERSION)
|
||||||
|
|
||||||
# Paths containing required header files
|
# Paths containing required header files
|
||||||
INCLUDE_PATHS = -I. -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external/android/native_app_glue
|
INCLUDE_PATHS = -I. -I$(RAYLIB_PATH)/src -I$(NATIVE_APP_GLUE_PATH)
|
||||||
|
|
||||||
# Linker options
|
# Linker options
|
||||||
LDFLAGS = -Wl,-soname,lib$(PROJECT_LIBRARY_NAME).so -Wl,--exclude-libs,libatomic.a
|
LDFLAGS = -Wl,-soname,lib$(PROJECT_LIBRARY_NAME).so -Wl,--exclude-libs,libatomic.a
|
||||||
@ -136,13 +170,15 @@ all: create_temp_project_dirs \
|
|||||||
compile_project_class \
|
compile_project_class \
|
||||||
compile_project_class_dex \
|
compile_project_class_dex \
|
||||||
create_project_apk_package \
|
create_project_apk_package \
|
||||||
sign_project_apk_package \
|
zipalign_project_apk_package \
|
||||||
zipalign_project_apk_package
|
sign_project_apk_package
|
||||||
|
|
||||||
# Create required temp directories for APK building
|
# Create required temp directories for APK building
|
||||||
create_temp_project_dirs:
|
create_temp_project_dirs:
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
if not exist $(PROJECT_BUILD_PATH) mkdir $(PROJECT_BUILD_PATH)
|
if not exist $(PROJECT_BUILD_PATH) mkdir $(PROJECT_BUILD_PATH)
|
||||||
if not exist $(PROJECT_BUILD_PATH)\obj mkdir $(PROJECT_BUILD_PATH)\obj
|
if not exist $(PROJECT_BUILD_PATH)\obj mkdir $(PROJECT_BUILD_PATH)\obj
|
||||||
|
if not exist $(PROJECT_BUILD_PATH)\obj mkdir $(PROJECT_BUILD_PATH)\obj\src
|
||||||
if not exist $(PROJECT_BUILD_PATH)\src mkdir $(PROJECT_BUILD_PATH)\src
|
if not exist $(PROJECT_BUILD_PATH)\src mkdir $(PROJECT_BUILD_PATH)\src
|
||||||
if not exist $(PROJECT_BUILD_PATH)\src\com mkdir $(PROJECT_BUILD_PATH)\src\com
|
if not exist $(PROJECT_BUILD_PATH)\src\com mkdir $(PROJECT_BUILD_PATH)\src\com
|
||||||
if not exist $(PROJECT_BUILD_PATH)\src\com\$(APP_COMPANY_NAME) mkdir $(PROJECT_BUILD_PATH)\src\com\$(APP_COMPANY_NAME)
|
if not exist $(PROJECT_BUILD_PATH)\src\com\$(APP_COMPANY_NAME) mkdir $(PROJECT_BUILD_PATH)\src\com\$(APP_COMPANY_NAME)
|
||||||
@ -158,36 +194,62 @@ create_temp_project_dirs:
|
|||||||
if not exist $(PROJECT_BUILD_PATH)\assets mkdir $(PROJECT_BUILD_PATH)\assets
|
if not exist $(PROJECT_BUILD_PATH)\assets mkdir $(PROJECT_BUILD_PATH)\assets
|
||||||
if not exist $(PROJECT_BUILD_PATH)\assets\$(PROJECT_RESOURCES_PATH) mkdir $(PROJECT_BUILD_PATH)\assets\$(PROJECT_RESOURCES_PATH)
|
if not exist $(PROJECT_BUILD_PATH)\assets\$(PROJECT_RESOURCES_PATH) mkdir $(PROJECT_BUILD_PATH)\assets\$(PROJECT_RESOURCES_PATH)
|
||||||
if not exist $(PROJECT_BUILD_PATH)\obj\screens mkdir $(PROJECT_BUILD_PATH)\obj\screens
|
if not exist $(PROJECT_BUILD_PATH)\obj\screens mkdir $(PROJECT_BUILD_PATH)\obj\screens
|
||||||
|
else
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/obj
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/obj/src
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/src
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/src/com
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/lib
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/lib/$(ANDROID_ARCH_NAME)
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/bin
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/res
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/res/drawable-ldpi
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/res/drawable-mdpi
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/res/drawable-hdpi
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/res/values
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/assets
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/assets/$(PROJECT_RESOURCES_PATH)
|
||||||
|
mkdir -p $(PROJECT_BUILD_PATH)/obj/screens
|
||||||
|
endif
|
||||||
$(foreach dir, $(PROJECT_SOURCE_DIRS), $(call create_dir, $(dir)))
|
$(foreach dir, $(PROJECT_SOURCE_DIRS), $(call create_dir, $(dir)))
|
||||||
|
|
||||||
define create_dir
|
define create_dir
|
||||||
if not exist $(PROJECT_BUILD_PATH)\obj\$(1) mkdir $(PROJECT_BUILD_PATH)\obj\$(1)
|
mkdir -p $(PROJECT_BUILD_PATH)/obj/$(1)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Copy required shared libs for integration into APK
|
# Copy required shared libs for integration into APK
|
||||||
# NOTE: If using shared libs they are loaded by generated NativeLoader.java
|
# NOTE: If using shared libs they are loaded by generated NativeLoader.java
|
||||||
copy_project_required_libs:
|
copy_project_required_libs:
|
||||||
ifeq ($(RAYLIB_LIBTYPE),SHARED)
|
ifeq ($(RAYLIB_LIBTYPE),SHARED)
|
||||||
copy /Y $(RAYLIB_LIB_PATH)\libraylib.so $(PROJECT_BUILD_PATH)\lib\$(ANDROID_ARCH_NAME)\libraylib.so
|
$(COPY_COMMAND) $(RAYLIB_LIB_PATH)/libraylib.so $(PROJECT_BUILD_PATH)/lib/$(ANDROID_ARCH_NAME)/libraylib.so
|
||||||
endif
|
endif
|
||||||
ifeq ($(RAYLIB_LIBTYPE),STATIC)
|
ifeq ($(RAYLIB_LIBTYPE),STATIC)
|
||||||
copy /Y $(RAYLIB_LIB_PATH)\libraylib.a $(PROJECT_BUILD_PATH)\lib\$(ANDROID_ARCH_NAME)\libraylib.a
|
$(COPY_COMMAND) $(RAYLIB_LIB_PATH)/libraylib.a $(PROJECT_BUILD_PATH)/lib/$(ANDROID_ARCH_NAME)/libraylib.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Copy project required resources: strings.xml, icon.png, assets
|
# Copy project required resources: strings.xml, icon.png, assets
|
||||||
# NOTE: Required strings.xml is generated and game resources are copied to assets folder
|
# NOTE: Required strings.xml is generated and game resources are copied to assets folder
|
||||||
# TODO: Review xcopy usage, it can not be found in some systems!
|
|
||||||
copy_project_resources:
|
copy_project_resources:
|
||||||
copy $(APP_ICON_LDPI) $(PROJECT_BUILD_PATH)\res\drawable-ldpi\icon.png /Y
|
$(COPY_COMMAND) $(APP_ICON_LDPI) $(PROJECT_BUILD_PATH)/res/drawable-ldpi/icon.png
|
||||||
copy $(APP_ICON_MDPI) $(PROJECT_BUILD_PATH)\res\drawable-mdpi\icon.png /Y
|
$(COPY_COMMAND) $(APP_ICON_MDPI) $(PROJECT_BUILD_PATH)/res/drawable-mdpi/icon.png
|
||||||
copy $(APP_ICON_HDPI) $(PROJECT_BUILD_PATH)\res\drawable-hdpi\icon.png /Y
|
$(COPY_COMMAND) $(APP_ICON_HDPI) $(PROJECT_BUILD_PATH)/res/drawable-hdpi/icon.png
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
@echo ^<?xml version="1.0" encoding="utf-8"^?^> > $(PROJECT_BUILD_PATH)/res/values/strings.xml
|
@echo ^<?xml version="1.0" encoding="utf-8"^?^> > $(PROJECT_BUILD_PATH)/res/values/strings.xml
|
||||||
@echo ^<resources^>^<string name="app_name"^>$(APP_LABEL_NAME)^</string^>^</resources^> >> $(PROJECT_BUILD_PATH)/res/values/strings.xml
|
@echo ^<resources^>^<string name="app_name"^>$(APP_LABEL_NAME)^</string^>^</resources^> >> $(PROJECT_BUILD_PATH)/res/values/strings.xml
|
||||||
if exist $(PROJECT_RESOURCES_PATH) C:\Windows\System32\xcopy $(PROJECT_RESOURCES_PATH) $(PROJECT_BUILD_PATH)\assets\$(PROJECT_RESOURCES_PATH) /Y /E /F
|
if exist $(PROJECT_RESOURCES_PATH) C:\Windows\System32\xcopy $(PROJECT_RESOURCES_PATH) $(PROJECT_BUILD_PATH)\assets\$(PROJECT_RESOURCES_PATH) /Y /E /F
|
||||||
|
else
|
||||||
|
@echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > $(PROJECT_BUILD_PATH)/res/values/strings.xml
|
||||||
|
@echo "<resources><string name=\"app_name\">$(APP_LABEL_NAME)</string></resources>" >> $(PROJECT_BUILD_PATH)/res/values/strings.xml
|
||||||
|
@[ -d "$(PROJECT_RESOURCES_PATH)" ] || cp -rf $(PROJECT_RESOURCES_PATH) $(PROJECT_BUILD_PATH)/assets/$(PROJECT_RESOURCES_PATH)
|
||||||
|
endif
|
||||||
|
|
||||||
# Generate NativeLoader.java to load required shared libraries
|
# Generate NativeLoader.java to load required shared libraries
|
||||||
# NOTE: Probably not the bet way to generate this file... but it works.
|
# NOTE: Probably not the bet way to generate this file... but it works.
|
||||||
generate_loader_script:
|
generate_loader_script:
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
@echo package com.$(APP_COMPANY_NAME).$(APP_PRODUCT_NAME); > $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
@echo package com.$(APP_COMPANY_NAME).$(APP_PRODUCT_NAME); > $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
||||||
@echo. >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
@echo. >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
||||||
@echo public class NativeLoader extends android.app.NativeActivity { >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
@echo public class NativeLoader extends android.app.NativeActivity { >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
||||||
@ -198,10 +260,23 @@ endif
|
|||||||
@echo System.loadLibrary("$(PROJECT_LIBRARY_NAME)"); >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
@echo System.loadLibrary("$(PROJECT_LIBRARY_NAME)"); >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
||||||
@echo } >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
@echo } >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
||||||
@echo } >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
@echo } >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
||||||
|
else
|
||||||
|
@echo "package com.$(APP_COMPANY_NAME).$(APP_PRODUCT_NAME);" > $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
||||||
|
@echo "" >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
||||||
|
@echo "public class NativeLoader extends android.app.NativeActivity {" >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
||||||
|
@echo " static {" >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
||||||
|
ifeq ($(RAYLIB_LIBTYPE),SHARED)
|
||||||
|
@echo " System.loadLibrary(\"raylib\");" >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
||||||
|
endif
|
||||||
|
@echo " System.loadLibrary(\"$(PROJECT_LIBRARY_NAME)\");" >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
||||||
|
@echo " }" >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
||||||
|
@echo "}" >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
||||||
|
endif
|
||||||
|
|
||||||
# Generate AndroidManifest.xml with all the required options
|
# Generate AndroidManifest.xml with all the required options
|
||||||
# NOTE: Probably not the bet way to generate this file... but it works.
|
# NOTE: Probably not the bet way to generate this file... but it works.
|
||||||
generate_android_manifest:
|
generate_android_manifest:
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
@echo ^<?xml version="1.0" encoding="utf-8"^?^> > $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
@echo ^<?xml version="1.0" encoding="utf-8"^?^> > $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
@echo ^<manifest xmlns:android="http://schemas.android.com/apk/res/android" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
@echo ^<manifest xmlns:android="http://schemas.android.com/apk/res/android" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
@echo package="com.$(APP_COMPANY_NAME).$(APP_PRODUCT_NAME)" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
@echo package="com.$(APP_COMPANY_NAME).$(APP_PRODUCT_NAME)" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
@ -222,11 +297,37 @@ generate_android_manifest:
|
|||||||
@echo ^</activity^> >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
@echo ^</activity^> >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
@echo ^</application^> >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
@echo ^</application^> >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
@echo ^</manifest^> >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
@echo ^</manifest^> >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
else
|
||||||
|
@echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " package=\"com.$(APP_COMPANY_NAME).$(APP_PRODUCT_NAME)\" " >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " android:versionCode=\"$(APP_VERSION_CODE)\" android:versionName=\"$(APP_VERSION_NAME)\" >" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " <uses-sdk android:minSdkVersion=\"$(ANDROID_API_VERSION)\" />" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " <uses-feature android:glEsVersion=\"0x00020000\" android:required=\"true\" />" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " <application android:allowBackup=\"false\" android:label=\"@string/app_name\" android:icon=\"@drawable/icon\" >" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " <activity android:name=\"com.$(APP_COMPANY_NAME).$(APP_PRODUCT_NAME).NativeLoader\"" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " android:theme=\"@android:style/Theme.NoTitleBar.Fullscreen\"" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " android:configChanges=\"orientation|keyboardHidden|screenSize\"" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " android:screenOrientation=\"$(APP_SCREEN_ORIENTATION)\" android:launchMode=\"singleTask\"" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " android:clearTaskOnLaunch=\"true\">" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " <meta-data android:name=\"android.app.lib_name\" android:value=\"$(PROJECT_LIBRARY_NAME)\" />" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " <intent-filter>" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " <action android:name=\"android.intent.action.MAIN\" />" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " <category android:name=\"android.intent.category.LAUNCHER\" />" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " </intent-filter>" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " </activity>" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo " </application>" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
@echo "</manifest>" >> $(PROJECT_BUILD_PATH)/AndroidManifest.xml
|
||||||
|
endif
|
||||||
|
|
||||||
# Generate storekey for APK signing: $(PROJECT_NAME).keystore
|
# Generate storekey for APK signing: $(PROJECT_NAME).keystore
|
||||||
# NOTE: Configure here your Distinguished Names (-dname) if required!
|
# NOTE: Configure here your Distinguished Names (-dname) if required!
|
||||||
generate_apk_keystore:
|
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
|
ifeq ($(OS),Windows_NT)
|
||||||
|
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
|
||||||
|
else
|
||||||
|
@[ -f "$(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
|
||||||
|
endif
|
||||||
|
|
||||||
# Config project package and resource using AndroidManifest.xml and res/values/strings.xml
|
# 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
|
# NOTE: Generates resources file: src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/R.java
|
||||||
@ -235,7 +336,7 @@ config_project_package:
|
|||||||
|
|
||||||
# Compile native_app_glue code as static library: obj/libnative_app_glue.a
|
# Compile native_app_glue code as static library: obj/libnative_app_glue.a
|
||||||
compile_native_app_glue:
|
compile_native_app_glue:
|
||||||
$(CC) -c $(RAYLIB_PATH)/src/external/android/native_app_glue/android_native_app_glue.c -o $(PROJECT_BUILD_PATH)/obj/native_app_glue.o $(CFLAGS)
|
$(CC) -c $(NATIVE_APP_GLUE_PATH)/android_native_app_glue.c -o $(PROJECT_BUILD_PATH)/obj/native_app_glue.o $(CFLAGS)
|
||||||
$(AR) rcs $(PROJECT_BUILD_PATH)/obj/libnative_app_glue.a $(PROJECT_BUILD_PATH)/obj/native_app_glue.o
|
$(AR) rcs $(PROJECT_BUILD_PATH)/obj/libnative_app_glue.a $(PROJECT_BUILD_PATH)/obj/native_app_glue.o
|
||||||
|
|
||||||
# Compile project code into a shared library: lib/lib$(PROJECT_LIBRARY_NAME).so
|
# Compile project code into a shared library: lib/lib$(PROJECT_LIBRARY_NAME).so
|
||||||
@ -249,7 +350,7 @@ $(PROJECT_BUILD_PATH)/obj/%.o:%.c
|
|||||||
|
|
||||||
# Compile project .java code into .class (Java bytecode)
|
# Compile project .java code into .class (Java bytecode)
|
||||||
compile_project_class:
|
compile_project_class:
|
||||||
$(JAVA_HOME)/bin/javac -verbose -source 1.7 -target 1.7 -d $(PROJECT_BUILD_PATH)/obj -bootclasspath $(JAVA_HOME)/jre/lib/rt.jar -classpath $(ANDROID_HOME)/platforms/android-$(ANDROID_API_VERSION)/android.jar;$(PROJECT_BUILD_PATH)/obj -sourcepath $(PROJECT_BUILD_PATH)/src $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/R.java $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
$(JAVA_HOME)/bin/javac -verbose -source 1.7 -target 1.7 -d $(PROJECT_BUILD_PATH)/obj -bootclasspath $(JAVA_HOME)/jre/lib/rt.jar -classpath $(ANDROID_HOME)/platforms/android-$(ANDROID_API_VERSION)/android.jar -d $(PROJECT_BUILD_PATH)/obj $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/R.java $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java
|
||||||
|
|
||||||
# Compile .class files into Dalvik executable bytecode (.dex)
|
# Compile .class files into Dalvik executable bytecode (.dex)
|
||||||
# NOTE: Since Android 5.0, Dalvik interpreter (JIT) has been replaced by ART (AOT)
|
# NOTE: Since Android 5.0, Dalvik interpreter (JIT) has been replaced by ART (AOT)
|
||||||
@ -274,7 +375,7 @@ zipalign_project_apk_package:
|
|||||||
# Install $(PROJECT_NAME).apk to default emulator/device
|
# Install $(PROJECT_NAME).apk to default emulator/device
|
||||||
# NOTE: Use -e (emulator) or -d (device) parameters if required
|
# NOTE: Use -e (emulator) or -d (device) parameters if required
|
||||||
install:
|
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 supported ABI for the device (armeabi-v7a, arm64-v8a, x86, x86_64)
|
||||||
check_device_abi:
|
check_device_abi:
|
||||||
@ -287,7 +388,7 @@ logcat:
|
|||||||
|
|
||||||
# Install and monitorize $(PROJECT_NAME).apk to default emulator/device
|
# Install and monitorize $(PROJECT_NAME).apk to default emulator/device
|
||||||
deploy:
|
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 -c
|
||||||
$(ANDROID_PLATFORM_TOOLS)/adb logcat raylib:V *:S
|
$(ANDROID_PLATFORM_TOOLS)/adb logcat raylib:V *:S
|
||||||
|
|
||||||
@ -295,6 +396,10 @@ deploy:
|
|||||||
|
|
||||||
# Clean everything
|
# Clean everything
|
||||||
clean:
|
clean:
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
del $(PROJECT_BUILD_PATH)\* /f /s /q
|
del $(PROJECT_BUILD_PATH)\* /f /s /q
|
||||||
rmdir $(PROJECT_BUILD_PATH) /s /q
|
rmdir $(PROJECT_BUILD_PATH) /s /q
|
||||||
|
else
|
||||||
|
rm -r $(PROJECT_BUILD_PATH)
|
||||||
|
endif
|
||||||
@echo Cleaning done
|
@echo Cleaning done
|
||||||
|
|||||||
1040
examples/Makefile.Web
Normal file
@ -1,191 +1,203 @@
|
|||||||
|
## Building the Examples
|
||||||
|
|
||||||
|
The examples assume you have already built the `raylib` library in `../src`.
|
||||||
|
|
||||||
|
### With GNU make
|
||||||
|
|
||||||
|
- `make` builds all examples
|
||||||
|
- `make [module]` builds all examples for a particular module (e.g `make core`)
|
||||||
|
|
||||||
|
### With Zig
|
||||||
|
|
||||||
|
The [Zig](https://ziglang.org/) toolchain can compile `C` and `C++` in addition to `Zig`.
|
||||||
|
You may find it easier to use than other toolchains, especially when it comes to cross-compiling.
|
||||||
|
|
||||||
|
- `zig build` to compile all examples
|
||||||
|
- `zig build [module]` to compile all examples for a module (e.g. `zig build core`)
|
||||||
|
- `zig build [example]` to compile _and run_ a particular example (e.g. `zig build core_basic_window`)
|
||||||
|
|
||||||
## EXAMPLES LIST
|
## EXAMPLES LIST
|
||||||
|
|
||||||
### category: core
|
### category: core
|
||||||
|
|
||||||
Examples using raylib core platform functionality like window creation, inputs, drawing modes and system functionality.
|
Examples using raylib core platform functionality like window creation, inputs, drawing modes and system functionality.
|
||||||
|
|
||||||
| ## | example | image | developer | new |
|
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||||
|----|----------|--------|:----------:|:---:|
|
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||||
| 01 | [core_basic_window](core/core_basic_window.c) | <img src="core/core_basic_window.png" alt="core_basic_window" width="200"> | ray | |
|
| 01 | [core_basic_window](core/core_basic_window.c) | <img src="core/core_basic_window.png" alt="core_basic_window" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||||
| 02 | [core_input_keys](core/core_input_keys.c) | <img src="core/core_input_keys.png" alt="core_input_keys" width="200"> | ray | |
|
| 02 | [core_input_keys](core/core_input_keys.c) | <img src="core/core_input_keys.png" alt="core_input_keys" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||||
| 03 | [core_input_mouse](core/core_input_mouse.c) | <img src="core/core_input_mouse.png" alt="core_input_mouse" width="200"> | ray | |
|
| 03 | [core_input_mouse](core/core_input_mouse.c) | <img src="core/core_input_mouse.png" alt="core_input_mouse" width="80"> | ⭐️☆☆☆ | 1.0 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
| 04 | [core_input_mouse_wheel](core/core_input_mouse_wheel.c) | <img src="core/core_input_mouse_wheel.png" alt="core_input_mouse_wheel" width="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="80"> | ⭐️☆☆☆ | 1.1 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||||
| 05 | [core_input_gamepad](core/core_input_gamepad.c) | <img src="core/core_input_gamepad.png" alt="core_input_gamepad" width="200"> | ray | |
|
| 05 | [core_input_gamepad](core/core_input_gamepad.c) | <img src="core/core_input_gamepad.png" alt="core_input_gamepad" width="80"> | ⭐️☆☆☆ | 1.1 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
| 06 | [core_input_multitouch](core/core_input_multitouch.c) | <img src="core/core_input_multitouch.png" alt="core_input_multitouch" width="200"> | [Berni](https://github.com/Berni8k) | |
|
| 06 | [core_input_multitouch](core/core_input_multitouch.c) | <img src="core/core_input_multitouch.png" alt="core_input_multitouch" width="80"> | ⭐️☆☆☆ | 2.1 | 2.5 | [Berni](https://github.com/Berni8k) |
|
||||||
| 07 | [core_input_gestures](core/core_input_gestures.c) | <img src="core/core_input_gestures.png" alt="core_input_gestures" width="200"> | ray | |
|
| 07 | [core_input_gestures](core/core_input_gestures.c) | <img src="core/core_input_gestures.png" alt="core_input_gestures" width="80"> | ⭐️⭐️☆☆ | 1.4 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
| 08 | [core_2d_camera](core/core_2d_camera.c) | <img src="core/core_2d_camera.png" alt="core_2d_camera" width="200"> | ray | |
|
| 08 | [core_2d_camera](core/core_2d_camera.c) | <img src="core/core_2d_camera.png" alt="core_2d_camera" width="80"> | ⭐️⭐️☆☆ | 1.5 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||||
| 09 | [core_2d_camera_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) | ⭐️ |
|
| 09 | [core_2d_camera_mouse_zoom](core/core_2d_camera_mouse_zoom.c) | <img src="core/core_2d_camera_mouse_zoom.png" alt="core_2d_camera_mouse_zoom" width="80"> | ⭐️⭐️☆☆ | **4.2** | **4.2** | [Jeffery Myers](https://github.com/JeffM2501) |
|
||||||
| 10 | [core_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 | |
|
| 10 | [core_2d_camera_platformer](core/core_2d_camera_platformer.c) | <img src="core/core_2d_camera_platformer.png" alt="core_2d_camera_platformer" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.0 | [avyy](https://github.com/avyy) |
|
||||||
| 11 | [core_3d_camera_free](core/core_3d_camera_free.c) | <img src="core/core_3d_camera_free.png" alt="core_3d_camera_free" width="200"> | ray | |
|
| 11 | [core_3d_camera_mode](core/core_3d_camera_mode.c) | <img src="core/core_3d_camera_mode.png" alt="core_3d_camera_mode" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||||
| 12 | [core_3d_camera_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 | |
|
| 12 | [core_3d_camera_free](core/core_3d_camera_free.c) | <img src="core/core_3d_camera_free.png" alt="core_3d_camera_free" width="80"> | ⭐️☆☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||||
| 13 | [core_3d_picking](core/core_3d_picking.c) | <img src="core/core_3d_picking.png" alt="core_3d_picking" width="200"> | ray | |
|
| 13 | [core_3d_camera_first_person](core/core_3d_camera_first_person.c) | <img src="core/core_3d_camera_first_person.png" alt="core_3d_camera_first_person" width="80"> | ⭐️⭐️☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||||
| 14 | [core_world_screen](core/core_world_screen.c) | <img src="core/core_world_screen.png" alt="core_world_screen" width="200"> | ray | |
|
| 14 | [core_3d_picking](core/core_3d_picking.c) | <img src="core/core_3d_picking.png" alt="core_3d_picking" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
| 15 | [core_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) | |
|
| 15 | [core_world_screen](core/core_world_screen.c) | <img src="core/core_world_screen.png" alt="core_world_screen" width="80"> | ⭐️⭐️☆☆ | 1.3 | 1.4 | [Ray](https://github.com/raysan5) |
|
||||||
| 16 | [core_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) | |
|
| 16 | [core_custom_logging](core/core_custom_logging.c) | <img src="core/core_custom_logging.png" alt="core_custom_logging" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Pablo Marcos Oltra](https://github.com/pamarcos) |
|
||||||
| 17 | [core_drop_files](core/core_drop_files.c) | <img src="core/core_drop_files.png" alt="core_drop_files" width="200"> | ray | |
|
| 17 | [core_window_flags](core/core_window_flags.c) | <img src="core/core_window_flags.png" alt="core_window_flags" width="80"> | ⭐️⭐️⭐️☆ | 3.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 18 | [core_random_values](core/core_random_values.c) | <img src="core/core_random_values.png" alt="core_random_values" width="200"> | ray | |
|
| 18 | [core_window_letterbox](core/core_window_letterbox.c) | <img src="core/core_window_letterbox.png" alt="core_window_letterbox" width="80"> | ⭐️⭐️☆☆ | 2.5 | **4.0** | [Anata](https://github.com/anatagawa) |
|
||||||
| 19 | [core_storage_values](core/core_storage_values.c) | <img src="core/core_storage_values.png" alt="core_storage_values" width="200"> | ray | |
|
| 19 | [core_window_should_close](core/core_window_should_close.c) | <img src="core/core_window_should_close.png" alt="core_window_should_close" width="80"> | ⭐️☆☆☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
| 20 | [core_vr_simulator](core/core_vr_simulator.c) | <img src="core/core_vr_simulator.png" alt="core_vr_simulator" width="200"> | ray | |
|
| 20 | [core_drop_files](core/core_drop_files.c) | <img src="core/core_drop_files.png" alt="core_drop_files" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
| 21 | [core_loading_thread](core/core_loading_thread.c) | <img src="core/core_loading_thread.png" alt="core_loading_thread" width="200"> | ray | ⭐️ |
|
| 21 | [core_random_values](core/core_random_values.c) | <img src="core/core_random_values.png" alt="core_random_values" width="80"> | ⭐️☆☆☆ | 1.1 | 1.1 | [Ray](https://github.com/raysan5) |
|
||||||
| 22 | [core_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) | ⭐️ |
|
| 22 | [core_storage_values](core/core_storage_values.c) | <img src="core/core_storage_values.png" alt="core_storage_values" width="80"> | ⭐️⭐️☆☆ | 1.4 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
|
| 23 | [core_vr_simulator](core/core_vr_simulator.c) | <img src="core/core_vr_simulator.png" alt="core_vr_simulator" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
|
| 24 | [core_loading_thread](core/core_loading_thread.c) | <img src="core/core_loading_thread.png" alt="core_loading_thread" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||||
|
| 25 | [core_scissor_test](core/core_scissor_test.c) | <img src="core/core_scissor_test.png" alt="core_scissor_test" width="80"> | ⭐️☆☆☆ | 2.5 | 3.0 | [Chris Dill](https://github.com/MysteriousSpace) |
|
||||||
|
| 26 | [core_basic_screen_manager](core/core_basic_screen_manager.c) | <img src="core/core_basic_screen_manager.png" alt="core_basic_screen_manager" width="80"> | ⭐️☆☆☆ | **4.0** | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
|
| 27 | [core_custom_frame_control](core/core_custom_frame_control.c) | <img src="core/core_custom_frame_control.png" alt="core_custom_frame_control" width="80"> | ⭐️⭐️⭐️⭐️ | **4.0** | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
|
| 28 | [core_smooth_pixelperfect](core/core_smooth_pixelperfect.c) | <img src="core/core_smooth_pixelperfect.png" alt="core_smooth_pixelperfect" width="80"> | ⭐️⭐️⭐️☆ | 3.7 | **4.0** | [Giancamillo Alessandroni](https://github.com/NotManyIdeasDev) |
|
||||||
|
| 29 | [core_split_screen](core/core_split_screen.c) | <img src="core/core_split_screen.png" alt="core_split_screen" width="80"> | ⭐️⭐️⭐️⭐️ | 3.7 | **4.0** | [Jeffery Myers](https://github.com/JeffM2501) |
|
||||||
|
| 30 | [core_window_should_close](core/core_window_should_close.c) | <img src="core/core_window_should_close.png" alt="core_window_should_close" width="80"> | ⭐️⭐️☆☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
|
|
||||||
### category: shapes
|
### category: shapes
|
||||||
|
|
||||||
Examples using raylib shapes drawing functionality, provided by raylib [shapes](../src/shapes.c) module.
|
Examples using raylib shapes drawing functionality, provided by raylib [shapes](../src/shapes.c) module.
|
||||||
|
|
||||||
| ## | example | image | developer | new |
|
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||||
|----|----------|--------|:----------:|:---:|
|
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||||
| 23 | [shapes_basic_shapes](shapes/shapes_basic_shapes.c) | <img src="shapes/shapes_basic_shapes.png" alt="shapes_basic_shapes" width="200"> | ray | |
|
| 31 | [shapes_basic_shapes](shapes/shapes_basic_shapes.c) | <img src="shapes/shapes_basic_shapes.png" alt="shapes_basic_shapes" width="80"> | ⭐️☆☆☆ | 1.0 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
| 24 | [shapes_bouncing_ball](shapes/shapes_bouncing_ball.c) | <img src="shapes/shapes_bouncing_ball.png" alt="shapes_bouncing_ball" width="200"> | ray | ⭐️ |
|
| 32 | [shapes_bouncing_ball](shapes/shapes_bouncing_ball.c) | <img src="shapes/shapes_bouncing_ball.png" alt="shapes_bouncing_ball" width="80"> | ⭐️☆☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 25 | [shapes_colors_palette](shapes/shapes_colors_palette.c) | <img src="shapes/shapes_colors_palette.png" alt="shapes_colors_palette" width="200"> | ray | |
|
| 33 | [shapes_colors_palette](shapes/shapes_colors_palette.c) | <img src="shapes/shapes_colors_palette.png" alt="shapes_colors_palette" width="80"> | ⭐️⭐️☆☆ | 1.0 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 26 | [shapes_logo_raylib](shapes/shapes_logo_raylib.c) | <img src="shapes/shapes_logo_raylib.png" alt="shapes_logo_raylib" width="200"> | ray | |
|
| 34 | [shapes_logo_raylib](shapes/shapes_logo_raylib.c) | <img src="shapes/shapes_logo_raylib.png" alt="shapes_logo_raylib" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||||
| 27 | [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 | |
|
| 35 | [shapes_logo_raylib_anim](shapes/shapes_logo_raylib_anim.c) | <img src="shapes/shapes_logo_raylib_anim.png" alt="shapes_logo_raylib_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
| 28 | [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) | |
|
| 36 | [shapes_rectangle_scaling](shapes/shapes_rectangle_scaling.c) | <img src="shapes/shapes_rectangle_scaling.png" alt="shapes_rectangle_scaling" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||||
| 29 | [shapes_lines_bezier](shapes/shapes_lines_bezier.c) | <img src="shapes/shapes_lines_bezier.png" alt="shapes_lines_bezier" width="200"> | ray | |
|
| 37 | [shapes_lines_bezier](shapes/shapes_lines_bezier.c) | <img src="shapes/shapes_lines_bezier.png" alt="shapes_lines_bezier" width="80"> | ⭐️☆☆☆ | 1.7 | 1.7 | [Ray](https://github.com/raysan5) |
|
||||||
| 30 | [shapes_collision_area](shapes/shapes_collision_area.c) | <img src="shapes/shapes_collision_area.png" alt="shapes_collision_area" width="200"> | ray | ⭐️ |
|
| 38 | [shapes_collision_area](shapes/shapes_collision_area.c) | <img src="shapes/shapes_collision_area.png" alt="shapes_collision_area" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 31 | [shapes_following_eyes](shapes/shapes_following_eyes.c) | <img src="shapes/shapes_following_eyes.png" alt="shapes_following_eyes" width="200"> | ray | ⭐️ |
|
| 39 | [shapes_following_eyes](shapes/shapes_following_eyes.c) | <img src="shapes/shapes_following_eyes.png" alt="shapes_following_eyes" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 32 | [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 | ⭐️ |
|
| 40 | [shapes_easings_ball_anim](shapes/shapes_easings_ball_anim.c) | <img src="shapes/shapes_easings_ball_anim.png" alt="shapes_easings_ball_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 33 | [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 | ⭐️ |
|
| 41 | [shapes_easings_box_anim](shapes/shapes_easings_box_anim.c) | <img src="shapes/shapes_easings_box_anim.png" alt="shapes_easings_box_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 34 | [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 | ⭐️ |
|
| 42 | [shapes_easings_rectangle_array](shapes/shapes_easings_rectangle_array.c) | <img src="shapes/shapes_easings_rectangle_array.png" alt="shapes_easings_rectangle_array" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 35 | [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) | ⭐️ |
|
| 43 | [shapes_draw_ring](shapes/shapes_draw_ring.c) | <img src="shapes/shapes_draw_ring.png" alt="shapes_draw_ring" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||||
| 36 | [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) | |
|
| 44 | [shapes_draw_circle_sector](shapes/shapes_draw_circle_sector.c) | <img src="shapes/shapes_draw_circle_sector.png" alt="shapes_draw_circle_sector" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||||
| 37 | [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) | |
|
| 45 | [shapes_draw_rectangle_rounded](shapes/shapes_draw_rectangle_rounded.c) | <img src="shapes/shapes_draw_rectangle_rounded.png" alt="shapes_draw_rectangle_rounded" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||||
|
| 46 | [shapes_top_down_lights](shapes/shapes_top_down_lights.c) | <img src="shapes/shapes_top_down_lights.png" alt="shapes_top_down_lights" width="80"> | ⭐️⭐️⭐️⭐️ | **4.2** | **4.2** | [Jeffery Myers](https://github.com/JeffM2501) |
|
||||||
### 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 |
|
|
||||||
|----|----------|--------|:----------:|:---:|
|
|
||||||
| 38 | [text_raylib_fonts](text/text_raylib_fonts.c) | <img src="text/text_raylib_fonts.png" alt="text_raylib_fonts" width="200"> | ray | |
|
|
||||||
| 39 | [text_font_spritefont](text/text_font_spritefont.c) | <img src="text/text_font_spritefont.png" alt="text_font_spritefont" width="200"> | ray | |
|
|
||||||
| 40 | [text_font_filters](text/text_font_filters.c) | <img src="text/text_font_filters.png" alt="text_font_filters" width="200"> | ray | |
|
|
||||||
| 41 | [text_font_loading](text/text_font_loading.c) | <img src="text/text_font_loading.png" alt="text_font_loading" width="200"> | ray | |
|
|
||||||
| 42 | [text_font_sdf](text/text_font_sdf.c) | <img src="text/text_font_sdf.png" alt="text_font_sdf" width="200"> | ray | ⭐️ |
|
|
||||||
| 43 | [text_format_text](text/text_format_text.c) | <img src="text/text_format_text.png" alt="text_format_text" width="200"> | ray | |
|
|
||||||
| 44 | [text_input_box](text/text_input_box.c) | <img src="text/text_input_box.png" alt="text_input_box" width="200"> | ray | |
|
|
||||||
| 45 | [text_writing_anim](text/text_writing_anim.c) | <img src="text/text_writing_anim.png" alt="text_writing_anim" width="200"> | ray | |
|
|
||||||
| 46 | [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) | |
|
|
||||||
| 47 | [text_unicode](text/text_unicode.c) | <img src="text/text_unicode.png" alt="text_unicode" width="200"> | [Vlad Adrian](https://github.com/demizdor) | |
|
|
||||||
|
|
||||||
### category: textures
|
### category: textures
|
||||||
|
|
||||||
Examples using raylib textures functionality, including image/textures loading/generation and drawing, provided by raylib [textures](../src/textures.c) module.
|
Examples using raylib textures functionality, including image/textures loading/generation and drawing, provided by raylib [textures](../src/textures.c) module.
|
||||||
|
|
||||||
| ## | example | image | developer | new |
|
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||||
|----|----------|--------|:----------:|:---:|
|
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||||
| 48 | [textures_logo_raylib](textures/textures_logo_raylib.c) | <img src="textures/textures_logo_raylib.png" alt="textures_logo_raylib" width="200"> | ray | |
|
| 47 | [textures_logo_raylib](textures/textures_logo_raylib.c) | <img src="textures/textures_logo_raylib.png" alt="textures_logo_raylib" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||||
| 49 | [textures_rectangle](textures/textures_rectangle.c) | <img src="textures/textures_rectangle.png" alt="textures_rectangle" width="200"> | ray | |
|
| 48 | [textures_srcrec_dstrec](textures/textures_srcrec_dstrec.c) | <img src="textures/textures_srcrec_dstrec.png" alt="textures_srcrec_dstrec" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||||
| 50 | [textures_srcrec_dstrec](textures/textures_srcrec_dstrec.c) | <img src="textures/textures_srcrec_dstrec.png" alt="textures_srcrec_dstrec" width="200"> | ray | |
|
| 49 | [textures_image_drawing](textures/textures_image_drawing.c) | <img src="textures/textures_image_drawing.png" alt="textures_image_drawing" width="80"> | ⭐️⭐️☆☆ | 1.4 | 1.4 | [Ray](https://github.com/raysan5) |
|
||||||
| 51 | [textures_image_drawing](textures/textures_image_drawing.c) | <img src="textures/textures_image_drawing.png" alt="textures_image_drawing" width="200"> | ray | |
|
| 50 | [textures_image_generation](textures/textures_image_generation.c) | <img src="textures/textures_image_generation.png" alt="textures_image_generation" width="80"> | ⭐️⭐️☆☆ | 1.8 | 1.8 | [Ray](https://github.com/raysan5) |
|
||||||
| 52 | [textures_image_generation](textures/textures_image_generation.c) | <img src="textures/textures_image_generation.png" alt="textures_image_generation" width="200"> | ray | |
|
| 51 | [textures_image_loading](textures/textures_image_loading.c) | <img src="textures/textures_image_loading.png" alt="textures_image_loading" width="80"> | ⭐️☆☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||||
| 53 | [textures_image_loading](textures/textures_image_loading.c) | <img src="textures/textures_image_loading.png" alt="textures_image_loading" width="200"> | ray | |
|
| 52 | [textures_image_processing](textures/textures_image_processing.c) | <img src="textures/textures_image_processing.png" alt="textures_image_processing" width="80"> | ⭐️⭐️⭐️☆ | 1.4 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 54 | [textures_image_processing](textures/textures_image_processing.c) | <img src="textures/textures_image_processing.png" alt="textures_image_processing" width="200"> | ray | |
|
| 53 | [textures_image_text](textures/textures_image_text.c) | <img src="textures/textures_image_text.png" alt="textures_image_text" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
| 55 | [textures_image_text](textures/textures_image_text.c) | <img src="textures/textures_image_text.png" alt="textures_image_text" width="200"> | ray | ⭐️ |
|
| 54 | [textures_to_image](textures/textures_to_image.c) | <img src="textures/textures_to_image.png" alt="textures_to_image" width="80"> | ⭐️☆☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
| 56 | [textures_to_image](textures/textures_to_image.c) | <img src="textures/textures_to_image.png" alt="textures_to_image" width="200"> | ray | |
|
| 55 | [textures_raw_data](textures/textures_raw_data.c) | <img src="textures/textures_raw_data.png" alt="textures_raw_data" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 57 | [textures_raw_data](textures/textures_raw_data.c) | <img src="textures/textures_raw_data.png" alt="textures_raw_data" width="200"> | ray | |
|
| 56 | [textures_particles_blending](textures/textures_particles_blending.c) | <img src="textures/textures_particles_blending.png" alt="textures_particles_blending" width="80"> | ⭐️☆☆☆ | 1.7 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 58 | [textures_particles_blending](textures/textures_particles_blending.c) | <img src="textures/textures_particles_blending.png" alt="textures_particles_blending" width="200"> | ray | |
|
| 57 | [textures_npatch_drawing](textures/textures_npatch_drawing.c) | <img src="textures/textures_npatch_drawing.png" alt="textures_npatch_drawing" width="80"> | ⭐️⭐️⭐️☆ | 2.0 | 2.5 | [Jorge A. Gomes](https://github.com/overdev) |
|
||||||
| 59 | [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) | |
|
| 58 | [textures_background_scrolling](textures/textures_background_scrolling.c) | <img src="textures/textures_background_scrolling.png" alt="textures_background_scrolling" width="80"> | ⭐️☆☆☆ | 2.0 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 60 | [textures_background_scrolling](textures/textures_background_scrolling.c) | <img src="textures/textures_background_scrolling.png" alt="textures_background_scrolling" width="200"> | ray | ⭐️ |
|
| 59 | [textures_sprite_anim](textures/textures_sprite_anim.c) | <img src="textures/textures_sprite_anim.png" alt="textures_sprite_anim" width="80"> | ⭐️⭐️☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||||
| 61 | [textures_sprite_button](textures/textures_sprite_button.c) | <img src="textures/textures_sprite_button.png" alt="textures_sprite_button" width="200"> | ray | ⭐️ |
|
| 60 | [textures_sprite_button](textures/textures_sprite_button.c) | <img src="textures/textures_sprite_button.png" alt="textures_sprite_button" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 62 | [textures_sprite_explosion](textures/textures_sprite_explosion.c) | <img src="textures/textures_sprite_explosion.png" alt="textures_sprite_explosion" width="200"> | ray | ⭐️ |
|
| 61 | [textures_sprite_explosion](textures/textures_sprite_explosion.c) | <img src="textures/textures_sprite_explosion.png" alt="textures_sprite_explosion" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 63 | [textures_bunnymark](textures/textures_bunnymark.c) | <img src="textures/textures_bunnymark.png" alt="textures_bunnymark" width="200"> | ray | ⭐️ |
|
| 62 | [textures_bunnymark](textures/textures_bunnymark.c) | <img src="textures/textures_bunnymark.png" alt="textures_bunnymark" width="80"> | ⭐️⭐️⭐️☆ | 1.6 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 64 | [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) | ⭐️ |
|
| 63 | [textures_mouse_painting](textures/textures_mouse_painting.c) | <img src="textures/textures_mouse_painting.png" alt="textures_mouse_painting" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.0 | [Chris Dill](https://github.com/MysteriousSpace) |
|
||||||
|
| 64 | [textures_blend_modes](textures/textures_blend_modes.c) | <img src="textures/textures_blend_modes.png" alt="textures_blend_modes" width="80"> | ⭐️☆☆☆ | 3.5 | 3.5 | [Karlo Licudine](https://github.com/accidentalrebel) |
|
||||||
|
| 65 | [textures_draw_tiled](textures/textures_draw_tiled.c) | <img src="textures/textures_draw_tiled.png" alt="textures_draw_tiled" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | **4.2** | [Vlad Adrian](https://github.com/demizdor) |
|
||||||
|
| 66 | [textures_polygon](textures/textures_polygon.c) | <img src="textures/textures_polygon.png" alt="textures_polygon" width="80"> | ⭐️☆☆☆ | 3.7 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||||
|
| 67 | [textures_fog_of_war](textures/textures_fog_of_war.c) | <img src="textures/textures_fog_of_war.png" alt="textures_fog_of_war" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
|
| 68 | [textures_gif_player](textures/textures_gif_player.c) | <img src="textures/textures_gif_player.png" alt="textures_gif_player" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
|
|
||||||
|
### 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 | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||||
|
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||||
|
| 69 | [text_raylib_fonts](text/text_raylib_fonts.c) | <img src="text/text_raylib_fonts.png" alt="text_raylib_fonts" width="80"> | ⭐️☆☆☆ | 1.7 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||||
|
| 70 | [text_font_spritefont](text/text_font_spritefont.c) | <img src="text/text_font_spritefont.png" alt="text_font_spritefont" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||||
|
| 71 | [text_font_filters](text/text_font_filters.c) | <img src="text/text_font_filters.png" alt="text_font_filters" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
|
| 72 | [text_font_loading](text/text_font_loading.c) | <img src="text/text_font_loading.png" alt="text_font_loading" width="80"> | ⭐️☆☆☆ | 1.4 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||||
|
| 73 | [text_font_sdf](text/text_font_sdf.c) | <img src="text/text_font_sdf.png" alt="text_font_sdf" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
|
| 74 | [text_format_text](text/text_format_text.c) | <img src="text/text_format_text.png" alt="text_format_text" width="80"> | ⭐️☆☆☆ | 1.1 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||||
|
| 75 | [text_input_box](text/text_input_box.c) | <img src="text/text_input_box.png" alt="text_input_box" width="80"> | ⭐️⭐️☆☆ | 1.7 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
|
| 76 | [text_writing_anim](text/text_writing_anim.c) | <img src="text/text_writing_anim.png" alt="text_writing_anim" width="80"> | ⭐️⭐️☆☆ | 1.4 | 1.4 | [Ray](https://github.com/raysan5) |
|
||||||
|
| 77 | [text_rectangle_bounds](text/text_rectangle_bounds.c) | <img src="text/text_rectangle_bounds.png" alt="text_rectangle_bounds" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||||
|
| 78 | [text_unicode](text/text_unicode.c) | <img src="text/text_unicode.png" alt="text_unicode" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||||
|
| 79 | [text_draw_3d](text/text_draw_3d.c) | <img src="text/text_draw_3d.png" alt="text_draw_3d" width="80"> | ⭐️⭐️⭐️⭐️ | 3.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||||
|
| 80 | [text_codepoints_loading](text/text_codepoints_loading.c) | <img src="text/text_codepoints_loading.png" alt="text_codepoints_loading" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
|
|
||||||
### category: models
|
### category: models
|
||||||
|
|
||||||
Examples using raylib models functionality, including models loading/generation and drawing, provided by raylib [models](../src/models.c) module.
|
Examples using raylib models functionality, including models loading/generation and drawing, provided by raylib [models](../src/models.c) module.
|
||||||
|
|
||||||
| ## | example | image | developer | new |
|
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||||
|----|----------|--------|:----------:|:---:|
|
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||||
| 65 | [models_animation](models/models_animation.c) | <img src="models/models_animation.png" alt="models_animation" width="200"> | [culacant](https://github.com/culacant) | ⭐️ |
|
| 81 | [models_animation](models/models_animation.c) | <img src="models/models_animation.png" alt="models_animation" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.5 | [culacant](https://github.com/culacant) |
|
||||||
| 66 | [models_billboard](models/models_billboard.c) | <img src="models/models_billboard.png" alt="models_billboard" width="200"> | ray | |
|
| 82 | [models_billboard](models/models_billboard.c) | <img src="models/models_billboard.png" alt="models_billboard" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 67 | [models_box_collisions](models/models_box_collisions.c) | <img src="models/models_box_collisions.png" alt="models_box_collisions" width="200"> | ray | |
|
| 83 | [models_box_collisions](models/models_box_collisions.c) | <img src="models/models_box_collisions.png" alt="models_box_collisions" width="80"> | ⭐️☆☆☆ | 1.3 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 68 | [models_cubicmap](models/models_cubicmap.c) | <img src="models/models_cubicmap.png" alt="models_cubicmap" width="200"> | ray | |
|
| 84 | [models_cubicmap](models/models_cubicmap.c) | <img src="models/models_cubicmap.png" alt="models_cubicmap" width="80"> | ⭐️⭐️☆☆ | 1.8 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 69 | [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 | ⭐️ |
|
| 85 | [models_first_person_maze](models/models_first_person_maze.c) | <img src="models/models_first_person_maze.png" alt="models_first_person_maze" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 70 | [models_geometric_shapes](models/models_geometric_shapes.c) | <img src="models/models_geometric_shapes.png" alt="models_geometric_shapes" width="200"> | ray | |
|
| 86 | [models_geometric_shapes](models/models_geometric_shapes.c) | <img src="models/models_geometric_shapes.png" alt="models_geometric_shapes" width="80"> | ⭐️☆☆☆ | 1.0 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 71 | [models_material_pbr](models/models_material_pbr.c) | <img src="models/models_material_pbr.png" alt="models_material_pbr" width="200"> | ray | |
|
| 87 | [models_mesh_generation](models/models_mesh_generation.c) | <img src="models/models_mesh_generation.png" alt="models_mesh_generation" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
| 72 | [models_mesh_generation](models/models_mesh_generation.c) | <img src="models/models_mesh_generation.png" alt="models_mesh_generation" width="200"> | ray | |
|
| 88 | [models_mesh_picking](models/models_mesh_picking.c) | <img src="models/models_mesh_picking.png" alt="models_mesh_picking" width="80"> | ⭐️⭐️⭐️☆ | 1.7 | **4.0** | [Joel Davis](https://github.com/joeld42) |
|
||||||
| 73 | [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) | |
|
| 89 | [models_loading](models/models_loading.c) | <img src="models/models_loading.png" alt="models_loading" width="80"> | ⭐️☆☆☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
| 74 | [models_loading](models/models_loading.c) | <img src="models/models_loading.png" alt="models_loading" width="200"> | ray | |
|
| 90 | [models_loading_gltf](models/models_loading_gltf.c) | <img src="models/models_loading_gltf.png" alt="models_loading_gltf" width="80"> | ⭐️☆☆☆ | 3.7 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
| 75 | [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) | |
|
| 91 | [models_loading_vox](models/models_loading_vox.c) | <img src="models/models_loading_vox.png" alt="models_loading_vox" width="80"> | ⭐️☆☆☆ | **4.0** | **4.0** | [Johann Nadalutti](https://github.com/procfxgen) |
|
||||||
| 76 | *TODO* | *TODO* | *TODO* | |
|
| 92 | [models_orthographic_projection](models/models_orthographic_projection.c) | <img src="models/models_orthographic_projection.png" alt="models_orthographic_projection" width="80"> | ⭐️☆☆☆ | 2.0 | 3.7 | [Max Danielsson](https://github.com/autious) |
|
||||||
| 77 | *TODO* | *TODO* | *TODO* | |
|
| 93 | [models_rlgl_solar_system](models/models_rlgl_solar_system.c) | <img src="models/models_rlgl_solar_system.png" alt="models_rlgl_solar_system" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
| 78 | [models_solar_system_rlgl](models/models_rlgl_solar_system.c) | <img src="models/models_rlgl_solar_system.png" alt="models_rlgl_solar_system" width="200"> | ray | ⭐️ |
|
| 94 | [models_yaw_pitch_roll](models/models_yaw_pitch_roll.c) | <img src="models/models_yaw_pitch_roll.png" alt="models_yaw_pitch_roll" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Berni](https://github.com/Berni8k) |
|
||||||
| 79 | [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) | |
|
| 95 | [models_waving_cubes](models/models_waving_cubes.c) | <img src="models/models_waving_cubes.png" alt="models_waving_cubes" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [codecat](https://github.com/codecat) |
|
||||||
| 80 | [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) | ⭐️ |
|
| 96 | [models_heightmap](models/models_heightmap.c) | <img src="models/models_heightmap.png" alt="models_heightmap" width="80"> | ⭐️☆☆☆ | 1.8 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 81 | [models_heightmap](models/models_heightmap.c) | <img src="models/models_heightmap.png" alt="models_heightmap" width="200"> | ray | |
|
| 97 | [models_skybox](models/models_skybox.c) | <img src="models/models_skybox.png" alt="models_skybox" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
| 82 | [models_skybox](models/models_skybox.c) | <img src="models/models_skybox.png" alt="models_skybox" width="200"> | ray | |
|
|
||||||
|
|
||||||
### category: shaders
|
### 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.
|
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 |
|
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||||
|----|----------|--------|:----------:|:---:|
|
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||||
| 83 | [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) | ⭐️ |
|
| 98 | [shaders_basic_lighting](shaders/shaders_basic_lighting.c) | <img src="shaders/shaders_basic_lighting.png" alt="shaders_basic_lighting" width="80"> | ⭐️⭐️⭐️⭐️ | 3.0 | **4.2** | [Chris Camacho](https://github.com/codifies) |
|
||||||
| 84 | [shaders_model_shader](shaders/shaders_model_shader.c) | <img src="shaders/shaders_model_shader.png" alt="shaders_model_shader" width="200"> | ray | |
|
| 99 | [shaders_model_shader](shaders/shaders_model_shader.c) | <img src="shaders/shaders_model_shader.png" alt="shaders_model_shader" width="80"> | ⭐️⭐️☆☆ | 1.3 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||||
| 85 | [shaders_shapes_textures](shaders/shaders_shapes_textures.c) | <img src="shaders/shaders_shapes_textures.png" alt="shaders_shapes_textures" width="200"> | ray | |
|
| 100 | [shaders_shapes_textures](shaders/shaders_shapes_textures.c) | <img src="shaders/shaders_shapes_textures.png" alt="shaders_shapes_textures" width="80"> | ⭐️⭐️☆☆ | 1.7 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||||
| 86 | [shaders_custom_uniform](shaders/shaders_custom_uniform.c) | <img src="shaders/shaders_custom_uniform.png" alt="shaders_custom_uniform" width="200"> | ray | |
|
| 101 | [shaders_custom_uniform](shaders/shaders_custom_uniform.c) | <img src="shaders/shaders_custom_uniform.png" alt="shaders_custom_uniform" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
| 87 | [shaders_postprocessing](shaders/shaders_postprocessing.c) | <img src="shaders/shaders_postprocessing.png" alt="shaders_postprocessing" width="200"> | ray | |
|
| 102 | [shaders_postprocessing](shaders/shaders_postprocessing.c) | <img src="shaders/shaders_postprocessing.png" alt="shaders_postprocessing" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
| 88 | [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) | |
|
| 103 | [shaders_palette_switch](shaders/shaders_palette_switch.c) | <img src="shaders/shaders_palette_switch.png" alt="shaders_palette_switch" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [Marco Lizza](https://github.com/MarcoLizza) |
|
||||||
| 89 | [shaders_raymarching](shaders/shaders_raymarching.c) | <img src="shaders/shaders_raymarching.png" alt="shaders_raymarching" width="200"> | Shader by Iñigo Quilez | ⭐️ |
|
| 104 | [shaders_raymarching](shaders/shaders_raymarching.c) | <img src="shaders/shaders_raymarching.png" alt="shaders_raymarching" width="80"> | ⭐️⭐️⭐️⭐️ | 2.0 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
| 90 | [shaders_texture_drawing](shaders/shaders_texture_drawing.c) | <img src="shaders/shaders_texture_drawing.png" alt="shaders_texture_drawing" width="200"> | Michał Ciesielski | ⭐️ |
|
| 105 | [shaders_texture_drawing](shaders/shaders_texture_drawing.c) | <img src="shaders/shaders_texture_drawing.png" alt="shaders_texture_drawing" width="80"> | ⭐️⭐️☆☆ | 2.0 | 3.7 | [Michał Ciesielski](https://github.com/) |
|
||||||
| 91 | [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) | ⭐️ |
|
| 106 | [shaders_texture_outline](shaders/shaders_texture_outline.c) | <img src="shaders/shaders_texture_outline.png" alt="shaders_texture_outline" width="80"> | ⭐️⭐️⭐️☆ | **4.0** | **4.0** | [Samuel Skiff](https://github.com/GoldenThumbs) |
|
||||||
| 92 | [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) | ⭐️ |
|
| 107 | [shaders_texture_waves](shaders/shaders_texture_waves.c) | <img src="shaders/shaders_texture_waves.png" alt="shaders_texture_waves" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Anata](https://github.com/anatagawa) |
|
||||||
| 93 | [shaders_eratosthenes](shaders/shaders_eratosthenes.c) | <img src="shaders/shaders_eratosthenes.png" alt="shaders_eratosthenes" width="200"> | [ProfJski](https://github.com/ProfJski) | ⭐️ |
|
| 108 | [shaders_julia_set](shaders/shaders_julia_set.c) | <img src="shaders/shaders_julia_set.png" alt="shaders_julia_set" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [eggmund](https://github.com/eggmund) |
|
||||||
| 94 | [shaders_fog](shaders/shaders_fog.c) | <img src="shaders/shaders_fog.png" alt="shaders_fog" width="200"> | [Chris Camacho](https://github.com/codifies) | ⭐️ |
|
| 109 | [shaders_eratosthenes](shaders/shaders_eratosthenes.c) | <img src="shaders/shaders_eratosthenes.png" alt="shaders_eratosthenes" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [ProfJski](https://github.com/ProfJski) |
|
||||||
| 95 | [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) | ⭐️ |
|
| 110 | [shaders_fog](shaders/shaders_fog.c) | <img src="shaders/shaders_fog.png" alt="shaders_fog" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||||
|
| 111 | [shaders_simple_mask](shaders/shaders_simple_mask.c) | <img src="shaders/shaders_simple_mask.png" alt="shaders_simple_mask" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||||
|
| 112 | [shaders_hot_reloading](shaders/shaders_hot_reloading.c) | <img src="shaders/shaders_hot_reloading.png" alt="shaders_hot_reloading" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
|
| 113 | [shaders_mesh_instancing](shaders/shaders_mesh_instancing.c) | <img src="shaders/shaders_mesh_instancing.png" alt="shaders_mesh_instancing" width="80"> | ⭐️⭐️⭐️⭐️ | 3.7 | **4.2** | [seanpringle](https://github.com/seanpringle) |
|
||||||
|
| 114 | [shaders_multi_sample2d](shaders/shaders_multi_sample2d.c) | <img src="shaders/shaders_multi_sample2d.png" alt="shaders_multi_sample2d" width="80"> | ⭐️⭐️☆☆ | 3.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
|
| 115 | [shaders_spotlight](shaders/shaders_spotlight.c) | <img src="shaders/shaders_spotlight.png" alt="shaders_spotlight" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||||
|
|
||||||
### category: audio
|
### 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.
|
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 |
|
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||||
|----|----------|--------|:----------:|:---:|
|
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||||
| 96 | [audio_module_playing](audio/audio_module_playing.c) | <img src="audio/audio_module_playing.png" alt="audio_module_playing" width="200"> | ray | |
|
| 116 | [audio_module_playing](audio/audio_module_playing.c) | <img src="audio/audio_module_playing.png" alt="audio_module_playing" width="80"> | ⭐️☆☆☆ | 1.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 97 | [audio_music_stream](audio/audio_music_stream.c) | <img src="audio/audio_music_stream.png" alt="audio_music_stream" width="200"> | ray | |
|
| 117 | [audio_music_stream](audio/audio_music_stream.c) | <img src="audio/audio_music_stream.png" alt="audio_music_stream" width="80"> | ⭐️☆☆☆ | 1.3 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
| 98 | [audio_raw_stream](audio/audio_raw_stream.c) | <img src="audio/audio_raw_stream.png" alt="audio_raw_stream" width="200"> | ray | |
|
| 118 | [audio_raw_stream](audio/audio_raw_stream.c) | <img src="audio/audio_raw_stream.png" alt="audio_raw_stream" width="80"> | ⭐️⭐️⭐️☆ | 1.6 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
| 99 | [audio_sound_loading](audio/audio_sound_loading.c) | <img src="audio/audio_sound_loading.png" alt="audio_sound_loading" width="200"> | ray | |
|
| 119 | [audio_sound_loading](audio/audio_sound_loading.c) | <img src="audio/audio_sound_loading.png" alt="audio_sound_loading" width="80"> | ⭐️☆☆☆ | 1.1 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 100 | [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) | ⭐️ |
|
| 120 | [audio_multichannel_sound](audio/audio_multichannel_sound.c) | <img src="audio/audio_multichannel_sound.png" alt="audio_multichannel_sound" width="80"> | ⭐️☆☆☆ | 3.0 | 3.5 | [Chris Camacho](https://github.com/codifies) |
|
||||||
|
|
||||||
### 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 |
|
|
||||||
|----|----------|--------|:----------:|:---:|
|
|
||||||
| 101 | [physics_demo](physics/physics_demo.c) | <img src="physics/physics_demo.png" alt="physics_demo" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
|
|
||||||
| 102 | [physics_friction](physics/physics_friction.c) | <img src="physics/physics_friction.png" alt="physics_friction" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
|
|
||||||
| 103 | [physics_movement](physics/physics_movement.c) | <img src="physics/physics_movement.png" alt="physics_movement" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
|
|
||||||
| 104 | [physics_restitution](physics/physics_restitution.c) | <img src="physics/physics_restitution.png" alt="physics_restitution" width="200"> | [Victor Fisac](https://github.com/victorfisac) | |
|
|
||||||
| 105 | [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 |
|
|
||||||
|----|----------|--------|:----------:|:---:|
|
|
||||||
| 106 | [network_ping_pong](network/network_ping_pong.c) | | [Jak Barnes](https://github.com/syphonx) | |
|
|
||||||
| 107 | [network_resolve_host](network/network_resolve_host.c) | | [Jak Barnes](https://github.com/syphonx) | |
|
|
||||||
| 108 | [network_tcp_client](network/network_tcp_client.c) | | [Jak Barnes](https://github.com/syphonx) | |
|
|
||||||
| 109 | [network_tcp_server](network/network_tcp_server.c) | | [Jak Barnes](https://github.com/syphonx) | |
|
|
||||||
| 110 | [network_test](network/network_test.c) | | [Jak Barnes](https://github.com/syphonx) | |
|
|
||||||
| 111 | [network_udp_client](network/network_udp_client.c) | | [Jak Barnes](https://github.com/syphonx) | |
|
|
||||||
| 112 | [network_udp_server](network/network_udp_server.c) | | [Jak Barnes](https://github.com/syphonx) | |
|
|
||||||
|
|
||||||
### category: others
|
### category: others
|
||||||
|
|
||||||
Examples showing raylib misc functionality that does not fit in other categories, like standalone modules usage or examples integrating external libraries.
|
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 |
|
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||||
|----|----------|--------|:----------:|:---:|
|
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||||
| 113 | [raudio_standalone](others/raudio_standalone.c) | | ray | |
|
| 121 | [rlgl_standalone](others/rlgl_standalone.c) | <img src="others/rlgl_standalone.png" alt="rlgl_standalone" width="80"> | ⭐️⭐️⭐️⭐️ | 1.6 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
| 114 | [rlgl_standalone](others/rlgl_standalone.c) | | ray | |
|
| 122 | [rlgl_compute_shader](others/rlgl_compute_shader.c) | <img src="others/rlgl_compute_shader.png" alt="rlgl_compute_shader" width="80"> | ⭐️⭐️⭐️⭐️ | **4.0** | **4.0** | [Teddy Astie](https://github.com/tsnake41) |
|
||||||
| 115 | [easings_testbed](others/easings_testbed.c) | | ray | |
|
| 123 | [easings_testbed](others/easings_testbed.c) | <img src="others/easings_testbed.png" alt="easings_testbed" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.0 | [Juan Miguel López](https://github.com/flashback-fx) |
|
||||||
|
| 124 | [raylib_opengl_interop](others/raylib_opengl_interop.c) | <img src="others/raylib_opengl_interop.png" alt="raylib_opengl_interop" width="80"> | ⭐️⭐️⭐️⭐️ | **4.0** | **4.0** | [Stephan Soller](https://github.com/arkanis) |
|
||||||
|
| 125 | [embedded_files_loading](others/embedded_files_loading.c) | <img src="others/embedded_files_loading.png" alt="embedded_files_loading" width="80"> | ⭐️⭐️☆☆ | 3.5 | 3.5 | [Kristian Holmgren](https://github.com/defutura) |
|
||||||
|
|
||||||
As always contributions are welcome, feel free to send new examples! Here it is an [examples template](examples_template.c) to start with!
|
As always contributions are welcome, feel free to send new examples! Here it is an [examples template](examples_template.c) to start with!
|
||||||
|
|
||||||
|
|||||||
@ -2,10 +2,12 @@
|
|||||||
*
|
*
|
||||||
* raylib [audio] example - Module playing (streaming)
|
* raylib [audio] example - Module playing (streaming)
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.5 (www.raylib.com)
|
* Example originally created with raylib 1.5, last time updated with raylib 3.5
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2016 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2016-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
@ -21,6 +23,9 @@ typedef struct {
|
|||||||
Color color;
|
Color color;
|
||||||
} CircleWave;
|
} CircleWave;
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -37,20 +42,22 @@ int main(void)
|
|||||||
Color colors[14] = { ORANGE, RED, GOLD, LIME, BLUE, VIOLET, BROWN, LIGHTGRAY, PINK,
|
Color colors[14] = { ORANGE, RED, GOLD, LIME, BLUE, VIOLET, BROWN, LIGHTGRAY, PINK,
|
||||||
YELLOW, GREEN, SKYBLUE, PURPLE, BEIGE };
|
YELLOW, GREEN, SKYBLUE, PURPLE, BEIGE };
|
||||||
|
|
||||||
// Creates ome circles for visual effect
|
// Creates some circles for visual effect
|
||||||
CircleWave circles[MAX_CIRCLES] = { 0 };
|
CircleWave circles[MAX_CIRCLES] = { 0 };
|
||||||
|
|
||||||
for (int i = MAX_CIRCLES - 1; i >= 0; i--)
|
for (int i = MAX_CIRCLES - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
circles[i].alpha = 0.0f;
|
circles[i].alpha = 0.0f;
|
||||||
circles[i].radius = GetRandomValue(10, 40);
|
circles[i].radius = (float)GetRandomValue(10, 40);
|
||||||
circles[i].position.x = GetRandomValue(circles[i].radius, screenWidth - circles[i].radius);
|
circles[i].position.x = (float)GetRandomValue((int)circles[i].radius, (int)(screenWidth - circles[i].radius));
|
||||||
circles[i].position.y = GetRandomValue(circles[i].radius, screenHeight - circles[i].radius);
|
circles[i].position.y = (float)GetRandomValue((int)circles[i].radius, (int)(screenHeight - circles[i].radius));
|
||||||
circles[i].speed = (float)GetRandomValue(1, 100)/2000.0f;
|
circles[i].speed = (float)GetRandomValue(1, 100)/2000.0f;
|
||||||
circles[i].color = colors[GetRandomValue(0, 13)];
|
circles[i].color = colors[GetRandomValue(0, 13)];
|
||||||
}
|
}
|
||||||
|
|
||||||
Music music = LoadMusicStream("resources/mini1111.xm");
|
Music music = LoadMusicStream("resources/mini1111.xm");
|
||||||
|
music.looping = false;
|
||||||
|
float pitch = 1.0f;
|
||||||
|
|
||||||
PlayMusicStream(music);
|
PlayMusicStream(music);
|
||||||
|
|
||||||
@ -83,6 +90,11 @@ int main(void)
|
|||||||
else ResumeMusicStream(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
|
// Get timePlayed scaled to bar dimensions
|
||||||
timePlayed = GetMusicTimePlayed(music)/GetMusicTimeLength(music)*(screenWidth - 40);
|
timePlayed = GetMusicTimePlayed(music)/GetMusicTimeLength(music)*(screenWidth - 40);
|
||||||
|
|
||||||
@ -97,9 +109,9 @@ int main(void)
|
|||||||
if (circles[i].alpha <= 0.0f)
|
if (circles[i].alpha <= 0.0f)
|
||||||
{
|
{
|
||||||
circles[i].alpha = 0.0f;
|
circles[i].alpha = 0.0f;
|
||||||
circles[i].radius = GetRandomValue(10, 40);
|
circles[i].radius = (float)GetRandomValue(10, 40);
|
||||||
circles[i].position.x = GetRandomValue(circles[i].radius, screenWidth - circles[i].radius);
|
circles[i].position.x = (float)GetRandomValue((int)circles[i].radius, (int)(screenWidth - circles[i].radius));
|
||||||
circles[i].position.y = GetRandomValue(circles[i].radius, screenHeight - circles[i].radius);
|
circles[i].position.y = (float)GetRandomValue((int)circles[i].radius, (int)(screenHeight - circles[i].radius));
|
||||||
circles[i].color = colors[GetRandomValue(0, 13)];
|
circles[i].color = colors[GetRandomValue(0, 13)];
|
||||||
circles[i].speed = (float)GetRandomValue(1, 100)/2000.0f;
|
circles[i].speed = (float)GetRandomValue(1, 100)/2000.0f;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,17 +2,22 @@
|
|||||||
*
|
*
|
||||||
* raylib [audio] example - Multichannel sound playing
|
* raylib [audio] example - Multichannel sound playing
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 2.6 (www.raylib.com)
|
* Example originally created with raylib 3.0, last time updated with raylib 3.5
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Example contributed by Chris Camacho (@codifies) and reviewed by Ramon Santamaria (@raysan5)
|
* Example contributed by Chris Camacho (@chriscamacho) and reviewed by Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2019 Chris Camacho (@codifies) and Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2019-2022 Chris Camacho (@chriscamacho) and Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -25,9 +30,9 @@ int main(void)
|
|||||||
InitAudioDevice(); // Initialize audio device
|
InitAudioDevice(); // Initialize audio device
|
||||||
|
|
||||||
Sound fxWav = LoadSound("resources/sound.wav"); // Load WAV audio file
|
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
|
||||||
|
|
||||||
SetSoundVolume(fxWav, 0.2);
|
SetSoundVolume(fxWav, 0.2f);
|
||||||
|
|
||||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
@ -46,12 +51,12 @@ int main(void)
|
|||||||
BeginDrawing();
|
BeginDrawing();
|
||||||
|
|
||||||
ClearBackground(RAYWHITE);
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
DrawText("MULTICHANNEL SOUND PLAYING", 20, 20, 20, GRAY);
|
DrawText("MULTICHANNEL SOUND PLAYING", 20, 20, 20, GRAY);
|
||||||
DrawText("Press SPACE to play new ogg instance!", 200, 120, 20, LIGHTGRAY);
|
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("Press ENTER to play new wav instance!", 200, 180, 20, LIGHTGRAY);
|
||||||
|
|
||||||
DrawText(FormatText("CONCURRENT SOUNDS PLAYING: %02i", GetSoundsPlaying()), 220, 280, 20, RED);
|
DrawText(TextFormat("CONCURRENT SOUNDS PLAYING: %02i", GetSoundsPlaying()), 220, 280, 20, RED);
|
||||||
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -2,15 +2,20 @@
|
|||||||
*
|
*
|
||||||
* raylib [audio] example - Music playing (streaming)
|
* raylib [audio] example - Music playing (streaming)
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.3 (www.raylib.com)
|
* Example originally created with raylib 1.3, last time updated with raylib 4.0
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -22,14 +27,14 @@ int main(void)
|
|||||||
|
|
||||||
InitAudioDevice(); // Initialize audio device
|
InitAudioDevice(); // Initialize audio device
|
||||||
|
|
||||||
Music music = LoadMusicStream("resources/guitar_noodling.ogg");
|
Music music = LoadMusicStream("resources/country.mp3");
|
||||||
|
|
||||||
PlayMusicStream(music);
|
PlayMusicStream(music);
|
||||||
|
|
||||||
float timePlayed = 0.0f;
|
float timePlayed = 0.0f; // Time played normalized [0.0f..1.0f]
|
||||||
bool pause = false;
|
bool pause = false; // Music playing paused
|
||||||
|
|
||||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
SetTargetFPS(30); // Set our game to run at 60 frames-per-second
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Main game loop
|
// Main game loop
|
||||||
@ -38,7 +43,7 @@ int main(void)
|
|||||||
// Update
|
// Update
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
UpdateMusicStream(music); // Update music buffer with new stream data
|
UpdateMusicStream(music); // Update music buffer with new stream data
|
||||||
|
|
||||||
// Restart music playing (stop and play)
|
// Restart music playing (stop and play)
|
||||||
if (IsKeyPressed(KEY_SPACE))
|
if (IsKeyPressed(KEY_SPACE))
|
||||||
{
|
{
|
||||||
@ -55,10 +60,10 @@ int main(void)
|
|||||||
else ResumeMusicStream(music);
|
else ResumeMusicStream(music);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get timePlayed scaled to bar dimensions (400 pixels)
|
// Get normalized time played for current music stream
|
||||||
timePlayed = GetMusicTimePlayed(music)/GetMusicTimeLength(music)*400;
|
timePlayed = GetMusicTimePlayed(music)/GetMusicTimeLength(music);
|
||||||
|
|
||||||
if (timePlayed > 400) StopMusicStream(music);
|
if (timePlayed > 1.0f) timePlayed = 1.0f; // Make sure time played is no longer than music
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
@ -70,7 +75,7 @@ int main(void)
|
|||||||
DrawText("MUSIC SHOULD BE PLAYING!", 255, 150, 20, LIGHTGRAY);
|
DrawText("MUSIC SHOULD BE PLAYING!", 255, 150, 20, LIGHTGRAY);
|
||||||
|
|
||||||
DrawRectangle(200, 200, 400, 12, LIGHTGRAY);
|
DrawRectangle(200, 200, 400, 12, LIGHTGRAY);
|
||||||
DrawRectangle(200, 200, (int)timePlayed, 12, MAROON);
|
DrawRectangle(200, 200, (int)(timePlayed*400.0f), 12, MAROON);
|
||||||
DrawRectangleLines(200, 200, 400, 12, GRAY);
|
DrawRectangleLines(200, 200, 400, 12, GRAY);
|
||||||
|
|
||||||
DrawText("PRESS SPACE TO RESTART MUSIC", 215, 250, 20, LIGHTGRAY);
|
DrawText("PRESS SPACE TO RESTART MUSIC", 215, 250, 20, LIGHTGRAY);
|
||||||
|
|||||||
@ -2,12 +2,14 @@
|
|||||||
*
|
*
|
||||||
* raylib [audio] example - Raw audio streaming
|
* raylib [audio] example - Raw audio streaming
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.6 (www.raylib.com)
|
* Example originally created with raylib 1.6, last time updated with raylib 4.2
|
||||||
* 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)
|
* Example created by Ramon Santamaria (@raysan5) and reviewed by James Hofmann (@triplefox)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015-2019 Ramon Santamaria (@raysan5) and James Hofmann (@triplefox)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5) and James Hofmann (@triplefox)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
@ -20,6 +22,38 @@
|
|||||||
#define MAX_SAMPLES 512
|
#define MAX_SAMPLES 512
|
||||||
#define MAX_SAMPLES_PER_UPDATE 4096
|
#define MAX_SAMPLES_PER_UPDATE 4096
|
||||||
|
|
||||||
|
// Cycles per second (hz)
|
||||||
|
float frequency = 440.0f;
|
||||||
|
|
||||||
|
// Audio frequency, for smoothing
|
||||||
|
float audioFrequency = 440.0f;
|
||||||
|
|
||||||
|
// Previous value, used to test if sine needs to be rewritten, and to smoothly modulate frequency
|
||||||
|
float oldFrequency = 1.0f;
|
||||||
|
|
||||||
|
// Index for audio rendering
|
||||||
|
float sineIdx = 0.0f;
|
||||||
|
|
||||||
|
// Audio input processing callback
|
||||||
|
void AudioInputCallback(void *buffer, unsigned int frames)
|
||||||
|
{
|
||||||
|
audioFrequency = frequency + (audioFrequency - frequency)*0.95f;
|
||||||
|
audioFrequency += 1.0f;
|
||||||
|
audioFrequency -= 1.0f;
|
||||||
|
float incr = audioFrequency/44100.0f;
|
||||||
|
short *d = (short *)buffer;
|
||||||
|
|
||||||
|
for (int i = 0; i < frames; i++)
|
||||||
|
{
|
||||||
|
d[i] = (short)(32000.0f*sinf(2*PI*sineIdx));
|
||||||
|
sineIdx += incr;
|
||||||
|
if (sineIdx > 1.0f) sineIdx -= 1.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -31,8 +65,12 @@ int main(void)
|
|||||||
|
|
||||||
InitAudioDevice(); // Initialize audio device
|
InitAudioDevice(); // Initialize audio device
|
||||||
|
|
||||||
// Init raw audio stream (sample rate: 22050, sample size: 16bit-short, channels: 1-mono)
|
SetAudioStreamBufferSizeDefault(MAX_SAMPLES_PER_UPDATE);
|
||||||
AudioStream stream = InitAudioStream(22050, 16, 1);
|
|
||||||
|
// Init raw audio stream (sample rate: 44100, sample size: 16bit-short, channels: 1-mono)
|
||||||
|
AudioStream stream = LoadAudioStream(44100, 16, 1);
|
||||||
|
|
||||||
|
SetAudioStreamCallback(stream, AudioInputCallback);
|
||||||
|
|
||||||
// Buffer for the single cycle waveform we are synthesizing
|
// Buffer for the single cycle waveform we are synthesizing
|
||||||
short *data = (short *)malloc(sizeof(short)*MAX_SAMPLES);
|
short *data = (short *)malloc(sizeof(short)*MAX_SAMPLES);
|
||||||
@ -45,6 +83,7 @@ int main(void)
|
|||||||
// Position read in to determine next frequency
|
// Position read in to determine next frequency
|
||||||
Vector2 mousePosition = { -100.0f, -100.0f };
|
Vector2 mousePosition = { -100.0f, -100.0f };
|
||||||
|
|
||||||
|
/*
|
||||||
// Cycles per second (hz)
|
// Cycles per second (hz)
|
||||||
float frequency = 440.0f;
|
float frequency = 440.0f;
|
||||||
|
|
||||||
@ -53,6 +92,7 @@ int main(void)
|
|||||||
|
|
||||||
// Cursor to read and copy the samples of the sine wave buffer
|
// Cursor to read and copy the samples of the sine wave buffer
|
||||||
int readCursor = 0;
|
int readCursor = 0;
|
||||||
|
*/
|
||||||
|
|
||||||
// Computed size in samples of the sine wave
|
// Computed size in samples of the sine wave
|
||||||
int waveLength = 1;
|
int waveLength = 1;
|
||||||
@ -71,33 +111,42 @@ int main(void)
|
|||||||
// Sample mouse input.
|
// Sample mouse input.
|
||||||
mousePosition = GetMousePosition();
|
mousePosition = GetMousePosition();
|
||||||
|
|
||||||
if (IsMouseButtonDown(MOUSE_LEFT_BUTTON))
|
if (IsMouseButtonDown(MOUSE_BUTTON_LEFT))
|
||||||
{
|
{
|
||||||
float fp = (float)(mousePosition.y);
|
float fp = (float)(mousePosition.y);
|
||||||
frequency = 40.0f + (float)(fp);
|
frequency = 40.0f + (float)(fp);
|
||||||
|
|
||||||
|
float pan = (float)(mousePosition.x) / (float)screenWidth;
|
||||||
|
SetAudioStreamPan(stream, pan);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rewrite the sine wave.
|
// Rewrite the sine wave
|
||||||
// Compute two cycles to allow the buffer padding, simplifying any modulation, resampling, etc.
|
// Compute two cycles to allow the buffer padding, simplifying any modulation, resampling, etc.
|
||||||
if (frequency != oldFrequency)
|
if (frequency != oldFrequency)
|
||||||
{
|
{
|
||||||
// Compute wavelength. Limit size in both directions.
|
// Compute wavelength. Limit size in both directions.
|
||||||
int oldWavelength = waveLength;
|
//int oldWavelength = waveLength;
|
||||||
waveLength = (int)(22050/frequency);
|
waveLength = (int)(22050/frequency);
|
||||||
if (waveLength > MAX_SAMPLES/2) waveLength = MAX_SAMPLES/2;
|
if (waveLength > MAX_SAMPLES/2) waveLength = MAX_SAMPLES/2;
|
||||||
if (waveLength < 1) waveLength = 1;
|
if (waveLength < 1) waveLength = 1;
|
||||||
|
|
||||||
// Write sine wave.
|
// Write sine wave
|
||||||
for (int i = 0; i < waveLength*2; i++)
|
for (int i = 0; i < waveLength*2; i++)
|
||||||
{
|
{
|
||||||
data[i] = (short)(sinf(((2*PI*(float)i/waveLength)))*32000);
|
data[i] = (short)(sinf(((2*PI*(float)i/waveLength)))*32000);
|
||||||
}
|
}
|
||||||
|
// Make sure the rest of the line is flat
|
||||||
|
for (int j = waveLength*2; j < MAX_SAMPLES; j++)
|
||||||
|
{
|
||||||
|
data[j] = (short)0;
|
||||||
|
}
|
||||||
|
|
||||||
// Scale read cursor's position to minimize transition artifacts
|
// Scale read cursor's position to minimize transition artifacts
|
||||||
readCursor = (int)(readCursor * ((float)waveLength / (float)oldWavelength));
|
//readCursor = (int)(readCursor * ((float)waveLength / (float)oldWavelength));
|
||||||
oldFrequency = frequency;
|
oldFrequency = frequency;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
// Refill audio stream if required
|
// Refill audio stream if required
|
||||||
if (IsAudioStreamProcessed(stream))
|
if (IsAudioStreamProcessed(stream))
|
||||||
{
|
{
|
||||||
@ -126,6 +175,7 @@ int main(void)
|
|||||||
// Copy finished frame to audio stream
|
// Copy finished frame to audio stream
|
||||||
UpdateAudioStream(stream, writeBuf, MAX_SAMPLES_PER_UPDATE);
|
UpdateAudioStream(stream, writeBuf, MAX_SAMPLES_PER_UPDATE);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
@ -134,14 +184,14 @@ int main(void)
|
|||||||
|
|
||||||
ClearBackground(RAYWHITE);
|
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);
|
DrawText("click mouse button to change frequency or pan", 10, 10, 20, DARKGRAY);
|
||||||
|
|
||||||
// Draw the current buffer state proportionate to the screen
|
// Draw the current buffer state proportionate to the screen
|
||||||
for (int i = 0; i < screenWidth; i++)
|
for (int i = 0; i < screenWidth; i++)
|
||||||
{
|
{
|
||||||
position.x = i;
|
position.x = (float)i;
|
||||||
position.y = 250 + 50*data[i*MAX_SAMPLES/screenWidth]/32000;
|
position.y = 250 + 50*data[i*MAX_SAMPLES/screenWidth]/32000.0f;
|
||||||
|
|
||||||
DrawPixelV(position, RED);
|
DrawPixelV(position, RED);
|
||||||
}
|
}
|
||||||
@ -155,7 +205,7 @@ int main(void)
|
|||||||
free(data); // Unload sine wave data
|
free(data); // Unload sine wave data
|
||||||
free(writeBuf); // Unload write buffer
|
free(writeBuf); // Unload write buffer
|
||||||
|
|
||||||
CloseAudioStream(stream); // Close raw audio stream and delete buffers from RAM
|
UnloadAudioStream(stream); // Close raw audio stream and delete buffers from RAM
|
||||||
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
|
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
|
||||||
|
|
||||||
CloseWindow(); // Close window and OpenGL context
|
CloseWindow(); // Close window and OpenGL context
|
||||||
|
|||||||
@ -2,15 +2,20 @@
|
|||||||
*
|
*
|
||||||
* raylib [audio] example - Sound loading and playing
|
* raylib [audio] example - Sound loading and playing
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.0 (www.raylib.com)
|
* Example originally created with raylib 1.1, last time updated with raylib 3.5
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -23,7 +28,7 @@ int main(void)
|
|||||||
InitAudioDevice(); // Initialize audio device
|
InitAudioDevice(); // Initialize audio device
|
||||||
|
|
||||||
Sound fxWav = LoadSound("resources/sound.wav"); // Load WAV audio file
|
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
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|||||||
179
examples/audio/audio_stream_effects.c
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
/*******************************************************************************************
|
||||||
|
*
|
||||||
|
* raylib [audio] example - Music stream processing effects
|
||||||
|
*
|
||||||
|
* Example originally created with raylib 4.2, last time updated with raylib 4.2
|
||||||
|
*
|
||||||
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2022 Ramon Santamaria (@raysan5)
|
||||||
|
*
|
||||||
|
********************************************************************************************/
|
||||||
|
|
||||||
|
#include "raylib.h"
|
||||||
|
|
||||||
|
#include <stdlib.h> // Required for: NULL
|
||||||
|
|
||||||
|
// Required delay effect variables
|
||||||
|
static float *delayBuffer = NULL;
|
||||||
|
static unsigned int delayBufferSize = 0;
|
||||||
|
static unsigned int delayReadIndex = 2;
|
||||||
|
static unsigned int delayWriteIndex = 0;
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Module Functions Declaration
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
static void AudioProcessEffectLPF(void *buffer, unsigned int frames); // Audio effect: lowpass filter
|
||||||
|
static void AudioProcessEffectDelay(void *buffer, unsigned int frames); // Audio effect: delay
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
// Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
const int screenWidth = 800;
|
||||||
|
const int screenHeight = 450;
|
||||||
|
|
||||||
|
InitWindow(screenWidth, screenHeight, "raylib [audio] example - stream effects");
|
||||||
|
|
||||||
|
InitAudioDevice(); // Initialize audio device
|
||||||
|
|
||||||
|
Music music = LoadMusicStream("resources/country.mp3");
|
||||||
|
|
||||||
|
// Allocate buffer for the delay effect
|
||||||
|
delayBufferSize = 48000*2; // 1 second delay (device sampleRate*channels)
|
||||||
|
delayBuffer = (float *)RL_CALLOC(delayBufferSize, sizeof(float));
|
||||||
|
|
||||||
|
PlayMusicStream(music);
|
||||||
|
|
||||||
|
float timePlayed = 0.0f; // Time played normalized [0.0f..1.0f]
|
||||||
|
bool pause = false; // Music playing paused
|
||||||
|
|
||||||
|
bool enableEffectLPF = false; // Enable effect low-pass-filter
|
||||||
|
bool enableEffectDelay = false; // Enable effect delay (1 second)
|
||||||
|
|
||||||
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Main game loop
|
||||||
|
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||||
|
{
|
||||||
|
// Update
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
UpdateMusicStream(music); // Update music buffer with new stream data
|
||||||
|
|
||||||
|
// Restart music playing (stop and play)
|
||||||
|
if (IsKeyPressed(KEY_SPACE))
|
||||||
|
{
|
||||||
|
StopMusicStream(music);
|
||||||
|
PlayMusicStream(music);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pause/Resume music playing
|
||||||
|
if (IsKeyPressed(KEY_P))
|
||||||
|
{
|
||||||
|
pause = !pause;
|
||||||
|
|
||||||
|
if (pause) PauseMusicStream(music);
|
||||||
|
else ResumeMusicStream(music);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add/Remove effect: lowpass filter
|
||||||
|
if (IsKeyPressed(KEY_F))
|
||||||
|
{
|
||||||
|
enableEffectLPF = !enableEffectLPF;
|
||||||
|
if (enableEffectLPF) AttachAudioStreamProcessor(music.stream, AudioProcessEffectLPF);
|
||||||
|
else DetachAudioStreamProcessor(music.stream, AudioProcessEffectLPF);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add/Remove effect: delay
|
||||||
|
if (IsKeyPressed(KEY_D))
|
||||||
|
{
|
||||||
|
enableEffectDelay = !enableEffectDelay;
|
||||||
|
if (enableEffectDelay) AttachAudioStreamProcessor(music.stream, AudioProcessEffectDelay);
|
||||||
|
else DetachAudioStreamProcessor(music.stream, AudioProcessEffectDelay);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get normalized time played for current music stream
|
||||||
|
timePlayed = GetMusicTimePlayed(music)/GetMusicTimeLength(music);
|
||||||
|
|
||||||
|
if (timePlayed > 1.0f) timePlayed = 1.0f; // Make sure time played is no longer than music
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Draw
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
BeginDrawing();
|
||||||
|
|
||||||
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
|
DrawText("MUSIC SHOULD BE PLAYING!", 245, 150, 20, LIGHTGRAY);
|
||||||
|
|
||||||
|
DrawRectangle(200, 180, 400, 12, LIGHTGRAY);
|
||||||
|
DrawRectangle(200, 180, (int)(timePlayed*400.0f), 12, MAROON);
|
||||||
|
DrawRectangleLines(200, 180, 400, 12, GRAY);
|
||||||
|
|
||||||
|
DrawText("PRESS SPACE TO RESTART MUSIC", 215, 230, 20, LIGHTGRAY);
|
||||||
|
DrawText("PRESS P TO PAUSE/RESUME MUSIC", 208, 260, 20, LIGHTGRAY);
|
||||||
|
|
||||||
|
DrawText(TextFormat("PRESS F TO TOGGLE LPF EFFECT: %s", enableEffectLPF? "ON" : "OFF"), 200, 320, 20, GRAY);
|
||||||
|
DrawText(TextFormat("PRESS D TO TOGGLE DELAY EFFECT: %s", enableEffectDelay? "ON" : "OFF"), 180, 350, 20, GRAY);
|
||||||
|
|
||||||
|
EndDrawing();
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
}
|
||||||
|
|
||||||
|
// De-Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
UnloadMusicStream(music); // Unload music stream buffers from RAM
|
||||||
|
|
||||||
|
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
|
||||||
|
|
||||||
|
RL_FREE(delayBuffer); // Free delay buffer
|
||||||
|
|
||||||
|
CloseWindow(); // Close window and OpenGL context
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Module Functions Definition
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Audio effect: lowpass filter
|
||||||
|
static void AudioProcessEffectLPF(void *buffer, unsigned int frames)
|
||||||
|
{
|
||||||
|
static float low[2] = { 0.0f, 0.0f };
|
||||||
|
static const float cutoff = 70.0f / 44100.0f; // 70 Hz lowpass filter
|
||||||
|
const float k = cutoff / (cutoff + 0.1591549431f); // RC filter formula
|
||||||
|
|
||||||
|
for (unsigned int i = 0; i < frames*2; i += 2)
|
||||||
|
{
|
||||||
|
float l = ((float *)buffer)[i], r = ((float *)buffer)[i + 1];
|
||||||
|
low[0] += k * (l - low[0]);
|
||||||
|
low[1] += k * (r - low[1]);
|
||||||
|
((float *)buffer)[i] = low[0];
|
||||||
|
((float *)buffer)[i + 1] = low[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Audio effect: delay
|
||||||
|
static void AudioProcessEffectDelay(void *buffer, unsigned int frames)
|
||||||
|
{
|
||||||
|
for (unsigned int i = 0; i < frames*2; i += 2)
|
||||||
|
{
|
||||||
|
float leftDelay = delayBuffer[delayReadIndex++]; // ERROR: Reading buffer -> WHY??? Maybe thread related???
|
||||||
|
float rightDelay = delayBuffer[delayReadIndex++];
|
||||||
|
|
||||||
|
if (delayReadIndex == delayBufferSize) delayReadIndex = 0;
|
||||||
|
|
||||||
|
((float *)buffer)[i] = 0.5f*((float *)buffer)[i] + 0.5f*leftDelay;
|
||||||
|
((float *)buffer)[i + 1] = 0.5f*((float *)buffer)[i + 1] + 0.5f*rightDelay;
|
||||||
|
|
||||||
|
delayBuffer[delayWriteIndex++] = ((float *)buffer)[i];
|
||||||
|
delayBuffer[delayWriteIndex++] = ((float *)buffer)[i + 1];
|
||||||
|
if (delayWriteIndex == delayBufferSize) delayWriteIndex = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
examples/audio/audio_stream_effects.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
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/) | Made with [rFXGen](https://raylibtech.itch.io/rfxgen) |
|
||||||
|
| sound.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Made with [rFXGen](https://raylibtech.itch.io/rfxgen) |
|
||||||
|
| spring.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Made with [rFXGen](https://raylibtech.itch.io/rfxgen) |
|
||||||
|
| weird.wav | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | Made with [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
97
examples/build.zig
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
const std = @import("std");
|
||||||
|
const builtin = @import("builtin");
|
||||||
|
|
||||||
|
fn add_module(comptime module: []const u8, b: *std.build.Builder, target: std.zig.CrossTarget) !*std.build.Step {
|
||||||
|
// Standard release options allow the person running `zig build` to select
|
||||||
|
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
|
||||||
|
const mode = b.standardReleaseOptions();
|
||||||
|
|
||||||
|
const all = b.step(module, "All " ++ module ++ " examples");
|
||||||
|
const dir = try std.fs.cwd().openIterableDir(module, .{});
|
||||||
|
var iter = dir.iterate();
|
||||||
|
while (try iter.next()) |entry| {
|
||||||
|
if (entry.kind != .File) continue;
|
||||||
|
const extension_idx = std.mem.lastIndexOf(u8, entry.name, ".c") orelse continue;
|
||||||
|
const name = entry.name[0..extension_idx];
|
||||||
|
const path = try std.fs.path.join(b.allocator, &.{ module, entry.name });
|
||||||
|
|
||||||
|
// zig's mingw headers do not include pthread.h
|
||||||
|
if (std.mem.eql(u8, "core_loading_thread", name) and target.getOsTag() == .windows) continue;
|
||||||
|
|
||||||
|
const exe = b.addExecutable(name, null);
|
||||||
|
exe.addCSourceFile(path, switch (target.getOsTag()) {
|
||||||
|
.windows => &[_][]const u8{},
|
||||||
|
.linux => &[_][]const u8{},
|
||||||
|
.macos => &[_][]const u8{"-DPLATFORM_DESKTOP"},
|
||||||
|
else => @panic("Unsupported OS"),
|
||||||
|
});
|
||||||
|
exe.setTarget(target);
|
||||||
|
exe.setBuildMode(mode);
|
||||||
|
exe.linkLibC();
|
||||||
|
exe.addObjectFile(switch (target.getOsTag()) {
|
||||||
|
.windows => "../src/raylib.lib",
|
||||||
|
.linux => "../src/libraylib.a",
|
||||||
|
.macos => "../src/libraylib.a",
|
||||||
|
else => @panic("Unsupported OS"),
|
||||||
|
});
|
||||||
|
|
||||||
|
exe.addIncludeDir("../src");
|
||||||
|
exe.addIncludeDir("../src/external");
|
||||||
|
exe.addIncludeDir("../src/external/glfw/include");
|
||||||
|
|
||||||
|
switch (exe.target.toTarget().os.tag) {
|
||||||
|
.windows => {
|
||||||
|
exe.linkSystemLibrary("winmm");
|
||||||
|
exe.linkSystemLibrary("gdi32");
|
||||||
|
exe.linkSystemLibrary("opengl32");
|
||||||
|
exe.addIncludeDir("external/glfw/deps/mingw");
|
||||||
|
},
|
||||||
|
.linux => {
|
||||||
|
exe.linkSystemLibrary("GL");
|
||||||
|
exe.linkSystemLibrary("rt");
|
||||||
|
exe.linkSystemLibrary("dl");
|
||||||
|
exe.linkSystemLibrary("m");
|
||||||
|
exe.linkSystemLibrary("X11");
|
||||||
|
},
|
||||||
|
.macos => {
|
||||||
|
exe.linkFramework("Foundation");
|
||||||
|
exe.linkFramework("Cocoa");
|
||||||
|
exe.linkFramework("OpenGL");
|
||||||
|
exe.linkFramework("CoreAudio");
|
||||||
|
exe.linkFramework("CoreVideo");
|
||||||
|
exe.linkFramework("IOKit");
|
||||||
|
},
|
||||||
|
else => {
|
||||||
|
@panic("Unsupported OS");
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
exe.setOutputDir(module);
|
||||||
|
|
||||||
|
var run = exe.run();
|
||||||
|
run.step.dependOn(&b.addInstallArtifact(exe).step);
|
||||||
|
run.cwd = module;
|
||||||
|
b.step(name, name).dependOn(&run.step);
|
||||||
|
all.dependOn(&exe.step);
|
||||||
|
}
|
||||||
|
return all;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn build(b: *std.build.Builder) !void {
|
||||||
|
// Standard target options allows the person running `zig build` to choose
|
||||||
|
// what target to build for. Here we do not override the defaults, which
|
||||||
|
// means any target is allowed, and the default is native. Other options
|
||||||
|
// for restricting supported target set are available.
|
||||||
|
const target = b.standardTargetOptions(.{});
|
||||||
|
|
||||||
|
const all = b.getInstallStep();
|
||||||
|
|
||||||
|
all.dependOn(try add_module("audio", b, target));
|
||||||
|
all.dependOn(try add_module("core", b, target));
|
||||||
|
all.dependOn(try add_module("models", b, target));
|
||||||
|
all.dependOn(try add_module("others", b, target));
|
||||||
|
all.dependOn(try add_module("shaders", b, target));
|
||||||
|
all.dependOn(try add_module("shapes", b, target));
|
||||||
|
all.dependOn(try add_module("text", b, target));
|
||||||
|
all.dependOn(try add_module("textures", b, target));
|
||||||
|
}
|
||||||
@ -2,10 +2,12 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - 2d camera
|
* raylib [core] example - 2d camera
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.5 (www.raylib.com)
|
* Example originally created with raylib 1.5, last time updated with raylib 3.0
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2016 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2016-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
@ -13,6 +15,9 @@
|
|||||||
|
|
||||||
#define MAX_BUILDINGS 100
|
#define MAX_BUILDINGS 100
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -30,19 +35,19 @@ int main(void)
|
|||||||
|
|
||||||
for (int i = 0; i < MAX_BUILDINGS; i++)
|
for (int i = 0; i < MAX_BUILDINGS; i++)
|
||||||
{
|
{
|
||||||
buildings[i].width = GetRandomValue(50, 200);
|
buildings[i].width = (float)GetRandomValue(50, 200);
|
||||||
buildings[i].height = GetRandomValue(100, 800);
|
buildings[i].height = (float)GetRandomValue(100, 800);
|
||||||
buildings[i].y = screenHeight - 130 - buildings[i].height;
|
buildings[i].y = screenHeight - 130.0f - buildings[i].height;
|
||||||
buildings[i].x = -6000 + spacing;
|
buildings[i].x = -6000.0f + spacing;
|
||||||
|
|
||||||
spacing += buildings[i].width;
|
spacing += (int)buildings[i].width;
|
||||||
|
|
||||||
buildColors[i] = (Color){ GetRandomValue(200, 240), GetRandomValue(200, 240), GetRandomValue(200, 250), 255 };
|
buildColors[i] = (Color){ GetRandomValue(200, 240), GetRandomValue(200, 240), GetRandomValue(200, 250), 255 };
|
||||||
}
|
}
|
||||||
|
|
||||||
Camera2D camera = { 0 };
|
Camera2D camera = { 0 };
|
||||||
camera.target = (Vector2){ player.x + 20, player.y + 20 };
|
camera.target = (Vector2){ player.x + 20.0f, player.y + 20.0f };
|
||||||
camera.offset = (Vector2){ screenWidth/2, screenHeight/2 };
|
camera.offset = (Vector2){ screenWidth/2.0f, screenHeight/2.0f };
|
||||||
camera.rotation = 0.0f;
|
camera.rotation = 0.0f;
|
||||||
camera.zoom = 1.0f;
|
camera.zoom = 1.0f;
|
||||||
|
|
||||||
@ -54,7 +59,6 @@ int main(void)
|
|||||||
{
|
{
|
||||||
// Update
|
// Update
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Player movement
|
// Player movement
|
||||||
if (IsKeyDown(KEY_RIGHT)) player.x += 2;
|
if (IsKeyDown(KEY_RIGHT)) player.x += 2;
|
||||||
else if (IsKeyDown(KEY_LEFT)) player.x -= 2;
|
else if (IsKeyDown(KEY_LEFT)) player.x -= 2;
|
||||||
@ -98,8 +102,8 @@ int main(void)
|
|||||||
|
|
||||||
DrawRectangleRec(player, RED);
|
DrawRectangleRec(player, RED);
|
||||||
|
|
||||||
DrawLine(camera.target.x, -screenHeight*10, camera.target.x, screenHeight*10, GREEN);
|
DrawLine((int)camera.target.x, -screenHeight*10, (int)camera.target.x, screenHeight*10, GREEN);
|
||||||
DrawLine(-screenWidth*10, camera.target.y, screenWidth*10, camera.target.y, GREEN);
|
DrawLine(-screenWidth*10, (int)camera.target.y, screenWidth*10, (int)camera.target.y, GREEN);
|
||||||
|
|
||||||
EndMode2D();
|
EndMode2D();
|
||||||
|
|
||||||
|
|||||||
105
examples/core/core_2d_camera_mouse_zoom.c
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
/*******************************************************************************************
|
||||||
|
*
|
||||||
|
* raylib [core] example - 2d camera mouse zoom
|
||||||
|
*
|
||||||
|
* Example originally created with raylib 4.2, last time updated with raylib 4.2
|
||||||
|
*
|
||||||
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2022 Jeffery Myers (@JeffM2501)
|
||||||
|
*
|
||||||
|
********************************************************************************************/
|
||||||
|
|
||||||
|
#include "raylib.h"
|
||||||
|
|
||||||
|
#include "rlgl.h"
|
||||||
|
#include "raymath.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
// Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
const int screenWidth = 800;
|
||||||
|
const int screenHeight = 450;
|
||||||
|
|
||||||
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - 2d camera mouse zoom");
|
||||||
|
|
||||||
|
Camera2D camera = { 0 };
|
||||||
|
camera.zoom = 1.0f;
|
||||||
|
|
||||||
|
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
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
// Translate based on mouse right click
|
||||||
|
if (IsMouseButtonDown(MOUSE_BUTTON_RIGHT))
|
||||||
|
{
|
||||||
|
Vector2 delta = GetMouseDelta();
|
||||||
|
delta = Vector2Scale(delta, -1.0f/camera.zoom);
|
||||||
|
|
||||||
|
camera.target = Vector2Add(camera.target, delta);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Zoom based on mouse wheel
|
||||||
|
float wheel = GetMouseWheelMove();
|
||||||
|
if (wheel != 0)
|
||||||
|
{
|
||||||
|
// Get the world point that is under the mouse
|
||||||
|
Vector2 mouseWorldPos = GetScreenToWorld2D(GetMousePosition(), camera);
|
||||||
|
|
||||||
|
// Set the offset to where the mouse is
|
||||||
|
camera.offset = GetMousePosition();
|
||||||
|
|
||||||
|
// Set the target to match, so that the camera maps the world space point
|
||||||
|
// under the cursor to the screen space point under the cursor at any zoom
|
||||||
|
camera.target = mouseWorldPos;
|
||||||
|
|
||||||
|
// Zoom increment
|
||||||
|
const float zoomIncrement = 0.125f;
|
||||||
|
|
||||||
|
camera.zoom += (wheel*zoomIncrement);
|
||||||
|
if (camera.zoom < zoomIncrement) camera.zoom = zoomIncrement;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Draw
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
BeginDrawing();
|
||||||
|
ClearBackground(BLACK);
|
||||||
|
|
||||||
|
BeginMode2D(camera);
|
||||||
|
|
||||||
|
// Draw the 3d grid, rotated 90 degrees and centered around 0,0
|
||||||
|
// just so we have something in the XY plane
|
||||||
|
rlPushMatrix();
|
||||||
|
rlTranslatef(0, 25*50, 0);
|
||||||
|
rlRotatef(90, 1, 0, 0);
|
||||||
|
DrawGrid(100, 50);
|
||||||
|
rlPopMatrix();
|
||||||
|
|
||||||
|
// Draw a reference circle
|
||||||
|
DrawCircle(100, 100, 50, YELLOW);
|
||||||
|
|
||||||
|
EndMode2D();
|
||||||
|
|
||||||
|
DrawText("Mouse right button drag to move, mouse wheel to zoom", 10, 10, 20, WHITE);
|
||||||
|
|
||||||
|
EndDrawing();
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
}
|
||||||
|
|
||||||
|
// De-Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
CloseWindow(); // Close window and OpenGL context
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BIN
examples/core/core_2d_camera_mouse_zoom.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
@ -2,12 +2,14 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - 2d camera platformer
|
* raylib [core] example - 2d camera platformer
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 2.5 (www.raylib.com)
|
* Example originally created with raylib 2.5, last time updated with raylib 3.0
|
||||||
* 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)
|
* Example contributed by arvyy (@arvyy) and reviewed by Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2019 arvyy (@arvyy)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2019-2022 arvyy (@arvyy)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
@ -15,8 +17,8 @@
|
|||||||
#include "raymath.h"
|
#include "raymath.h"
|
||||||
|
|
||||||
#define G 400
|
#define G 400
|
||||||
#define PLAYER_JUMP_SPD 350.f
|
#define PLAYER_JUMP_SPD 350.0f
|
||||||
#define PLAYER_HOR_SPD 200.f
|
#define PLAYER_HOR_SPD 200.0f
|
||||||
|
|
||||||
typedef struct Player {
|
typedef struct Player {
|
||||||
Vector2 position;
|
Vector2 position;
|
||||||
@ -30,23 +32,26 @@ typedef struct EnvItem {
|
|||||||
Color color;
|
Color color;
|
||||||
} EnvItem;
|
} EnvItem;
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
// Module functions declaration
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
void UpdatePlayer(Player *player, EnvItem *envItems, int envItemsLength, float delta);
|
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 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 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 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 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);
|
void UpdateCameraPlayerBoundsPush(Camera2D *camera, Player *player, EnvItem *envItems, int envItemsLength, float delta, int width, int height);
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
const int screenWidth = 800;
|
const int screenWidth = 800;
|
||||||
const int screenHeight = 450;
|
const int screenHeight = 450;
|
||||||
|
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - 2d camera");
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - 2d camera");
|
||||||
|
|
||||||
Player player = { 0 };
|
Player player = { 0 };
|
||||||
@ -60,12 +65,12 @@ int main(void)
|
|||||||
{{ 250, 300, 100, 10 }, 1, GRAY },
|
{{ 250, 300, 100, 10 }, 1, GRAY },
|
||||||
{{ 650, 300, 100, 10 }, 1, GRAY }
|
{{ 650, 300, 100, 10 }, 1, GRAY }
|
||||||
};
|
};
|
||||||
|
|
||||||
int envItemsLength = sizeof(envItems)/sizeof(envItems[0]);
|
int envItemsLength = sizeof(envItems)/sizeof(envItems[0]);
|
||||||
|
|
||||||
Camera2D camera = { 0 };
|
Camera2D camera = { 0 };
|
||||||
camera.target = player.position;
|
camera.target = player.position;
|
||||||
camera.offset = (Vector2){ screenWidth/2, screenHeight/2 };
|
camera.offset = (Vector2){ screenWidth/2.0f, screenHeight/2.0f };
|
||||||
camera.rotation = 0.0f;
|
camera.rotation = 0.0f;
|
||||||
camera.zoom = 1.0f;
|
camera.zoom = 1.0f;
|
||||||
|
|
||||||
@ -77,10 +82,10 @@ int main(void)
|
|||||||
UpdateCameraEvenOutOnLanding,
|
UpdateCameraEvenOutOnLanding,
|
||||||
UpdateCameraPlayerBoundsPush
|
UpdateCameraPlayerBoundsPush
|
||||||
};
|
};
|
||||||
|
|
||||||
int cameraOption = 0;
|
int cameraOption = 0;
|
||||||
int cameraUpdatersLength = sizeof(cameraUpdaters)/sizeof(cameraUpdaters[0]);
|
int cameraUpdatersLength = sizeof(cameraUpdaters)/sizeof(cameraUpdaters[0]);
|
||||||
|
|
||||||
char *cameraDescriptions[] = {
|
char *cameraDescriptions[] = {
|
||||||
"Follow player center",
|
"Follow player center",
|
||||||
"Follow player center, but clamp to map edges",
|
"Follow player center, but clamp to map edges",
|
||||||
@ -88,25 +93,25 @@ int main(void)
|
|||||||
"Follow player center horizontally; updateplayer center vertically after landing",
|
"Follow player center horizontally; updateplayer center vertically after landing",
|
||||||
"Player push camera on getting too close to screen edge"
|
"Player push camera on getting too close to screen edge"
|
||||||
};
|
};
|
||||||
|
|
||||||
SetTargetFPS(60);
|
SetTargetFPS(60);
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Main game loop
|
// Main game loop
|
||||||
while (!WindowShouldClose())
|
while (!WindowShouldClose())
|
||||||
{
|
{
|
||||||
// Update
|
// Update
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
float deltaTime = GetFrameTime();
|
float deltaTime = GetFrameTime();
|
||||||
|
|
||||||
UpdatePlayer(&player, envItems, envItemsLength, deltaTime);
|
UpdatePlayer(&player, envItems, envItemsLength, deltaTime);
|
||||||
|
|
||||||
camera.zoom += ((float)GetMouseWheelMove()*0.05f);
|
camera.zoom += ((float)GetMouseWheelMove()*0.05f);
|
||||||
|
|
||||||
if (camera.zoom > 3.0f) camera.zoom = 3.0f;
|
if (camera.zoom > 3.0f) camera.zoom = 3.0f;
|
||||||
else if (camera.zoom < 0.25f) camera.zoom = 0.25f;
|
else if (camera.zoom < 0.25f) camera.zoom = 0.25f;
|
||||||
|
|
||||||
if (IsKeyPressed(KEY_R))
|
if (IsKeyPressed(KEY_R))
|
||||||
{
|
{
|
||||||
camera.zoom = 1.0f;
|
camera.zoom = 1.0f;
|
||||||
player.position = (Vector2){ 400, 280 };
|
player.position = (Vector2){ 400, 280 };
|
||||||
@ -125,12 +130,12 @@ int main(void)
|
|||||||
ClearBackground(LIGHTGRAY);
|
ClearBackground(LIGHTGRAY);
|
||||||
|
|
||||||
BeginMode2D(camera);
|
BeginMode2D(camera);
|
||||||
|
|
||||||
for (int i = 0; i < envItemsLength; i++) DrawRectangleRec(envItems[i].rect, envItems[i].color);
|
for (int i = 0; i < envItemsLength; i++) DrawRectangleRec(envItems[i].rect, envItems[i].color);
|
||||||
|
|
||||||
Rectangle playerRect = { player.position.x - 20, player.position.y - 40, 40, 40 };
|
Rectangle playerRect = { player.position.x - 20, player.position.y - 40, 40, 40 };
|
||||||
DrawRectangleRec(playerRect, RED);
|
DrawRectangleRec(playerRect, RED);
|
||||||
|
|
||||||
EndMode2D();
|
EndMode2D();
|
||||||
|
|
||||||
DrawText("Controls:", 20, 20, 10, BLACK);
|
DrawText("Controls:", 20, 20, 10, BLACK);
|
||||||
@ -140,7 +145,7 @@ int main(void)
|
|||||||
DrawText("- C to change camera mode", 40, 100, 10, DARKGRAY);
|
DrawText("- C to change camera mode", 40, 100, 10, DARKGRAY);
|
||||||
DrawText("Current camera mode:", 20, 120, 10, BLACK);
|
DrawText("Current camera mode:", 20, 120, 10, BLACK);
|
||||||
DrawText(cameraDescriptions[cameraOption], 40, 140, 10, DARKGRAY);
|
DrawText(cameraDescriptions[cameraOption], 40, 140, 10, DARKGRAY);
|
||||||
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
@ -157,50 +162,50 @@ void UpdatePlayer(Player *player, EnvItem *envItems, int envItemsLength, float d
|
|||||||
{
|
{
|
||||||
if (IsKeyDown(KEY_LEFT)) player->position.x -= PLAYER_HOR_SPD*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_RIGHT)) player->position.x += PLAYER_HOR_SPD*delta;
|
||||||
if (IsKeyDown(KEY_SPACE) && player->canJump)
|
if (IsKeyDown(KEY_SPACE) && player->canJump)
|
||||||
{
|
{
|
||||||
player->speed = -PLAYER_JUMP_SPD;
|
player->speed = -PLAYER_JUMP_SPD;
|
||||||
player->canJump = false;
|
player->canJump = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int hitObstacle = 0;
|
int hitObstacle = 0;
|
||||||
for (int i = 0; i < envItemsLength; i++)
|
for (int i = 0; i < envItemsLength; i++)
|
||||||
{
|
{
|
||||||
EnvItem *ei = envItems + i;
|
EnvItem *ei = envItems + i;
|
||||||
Vector2 *p = &(player->position);
|
Vector2 *p = &(player->position);
|
||||||
if (ei->blocking &&
|
if (ei->blocking &&
|
||||||
ei->rect.x <= p->x &&
|
ei->rect.x <= p->x &&
|
||||||
ei->rect.x + ei->rect.width >= p->x &&
|
ei->rect.x + ei->rect.width >= p->x &&
|
||||||
ei->rect.y >= p->y &&
|
ei->rect.y >= p->y &&
|
||||||
ei->rect.y < p->y + player->speed*delta)
|
ei->rect.y < p->y + player->speed*delta)
|
||||||
{
|
{
|
||||||
hitObstacle = 1;
|
hitObstacle = 1;
|
||||||
player->speed = 0.0f;
|
player->speed = 0.0f;
|
||||||
p->y = ei->rect.y;
|
p->y = ei->rect.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hitObstacle)
|
if (!hitObstacle)
|
||||||
{
|
{
|
||||||
player->position.y += player->speed*delta;
|
player->position.y += player->speed*delta;
|
||||||
player->speed += G*delta;
|
player->speed += G*delta;
|
||||||
player->canJump = false;
|
player->canJump = false;
|
||||||
}
|
}
|
||||||
else player->canJump = true;
|
else player->canJump = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateCameraCenter(Camera2D *camera, Player *player, EnvItem *envItems, int envItemsLength, float delta, int width, int height)
|
void UpdateCameraCenter(Camera2D *camera, Player *player, EnvItem *envItems, int envItemsLength, float delta, int width, int height)
|
||||||
{
|
{
|
||||||
camera->offset = (Vector2){ width/2, height/2 };
|
camera->offset = (Vector2){ width/2.0f, height/2.0f };
|
||||||
camera->target = player->position;
|
camera->target = player->position;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateCameraCenterInsideMap(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)
|
||||||
{
|
{
|
||||||
camera->target = player->position;
|
camera->target = player->position;
|
||||||
camera->offset = (Vector2){ width/2, height/2 };
|
camera->offset = (Vector2){ width/2.0f, height/2.0f };
|
||||||
float minX = 1000, minY = 1000, maxX = -1000, maxY = -1000;
|
float minX = 1000, minY = 1000, maxX = -1000, maxY = -1000;
|
||||||
|
|
||||||
for (int i = 0; i < envItemsLength; i++)
|
for (int i = 0; i < envItemsLength; i++)
|
||||||
{
|
{
|
||||||
EnvItem *ei = envItems + i;
|
EnvItem *ei = envItems + i;
|
||||||
@ -209,10 +214,10 @@ void UpdateCameraCenterInsideMap(Camera2D *camera, Player *player, EnvItem *envI
|
|||||||
minY = fminf(ei->rect.y, minY);
|
minY = fminf(ei->rect.y, minY);
|
||||||
maxY = fmaxf(ei->rect.y + ei->rect.height, maxY);
|
maxY = fmaxf(ei->rect.y + ei->rect.height, maxY);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector2 max = GetWorldToScreen2D((Vector2){ maxX, maxY }, *camera);
|
Vector2 max = GetWorldToScreen2D((Vector2){ maxX, maxY }, *camera);
|
||||||
Vector2 min = GetWorldToScreen2D((Vector2){ minX, minY }, *camera);
|
Vector2 min = GetWorldToScreen2D((Vector2){ minX, minY }, *camera);
|
||||||
|
|
||||||
if (max.x < width) camera->offset.x = width - (max.x - width/2);
|
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 (max.y < height) camera->offset.y = height - (max.y - height/2);
|
||||||
if (min.x > 0) camera->offset.x = width/2 - min.x;
|
if (min.x > 0) camera->offset.x = width/2 - min.x;
|
||||||
@ -224,11 +229,11 @@ void UpdateCameraCenterSmoothFollow(Camera2D *camera, Player *player, EnvItem *e
|
|||||||
static float minSpeed = 30;
|
static float minSpeed = 30;
|
||||||
static float minEffectLength = 10;
|
static float minEffectLength = 10;
|
||||||
static float fractionSpeed = 0.8f;
|
static float fractionSpeed = 0.8f;
|
||||||
|
|
||||||
camera->offset = (Vector2){ width/2, height/2 };
|
camera->offset = (Vector2){ width/2.0f, height/2.0f };
|
||||||
Vector2 diff = Vector2Subtract(player->position, camera->target);
|
Vector2 diff = Vector2Subtract(player->position, camera->target);
|
||||||
float length = Vector2Length(diff);
|
float length = Vector2Length(diff);
|
||||||
|
|
||||||
if (length > minEffectLength)
|
if (length > minEffectLength)
|
||||||
{
|
{
|
||||||
float speed = fmaxf(fractionSpeed*length, minSpeed);
|
float speed = fmaxf(fractionSpeed*length, minSpeed);
|
||||||
@ -241,34 +246,34 @@ void UpdateCameraEvenOutOnLanding(Camera2D *camera, Player *player, EnvItem *env
|
|||||||
static float evenOutSpeed = 700;
|
static float evenOutSpeed = 700;
|
||||||
static int eveningOut = false;
|
static int eveningOut = false;
|
||||||
static float evenOutTarget;
|
static float evenOutTarget;
|
||||||
|
|
||||||
camera->offset = (Vector2){ width/2, height/2 };
|
camera->offset = (Vector2){ width/2.0f, height/2.0f };
|
||||||
camera->target.x = player->position.x;
|
camera->target.x = player->position.x;
|
||||||
|
|
||||||
if (eveningOut)
|
if (eveningOut)
|
||||||
{
|
{
|
||||||
if (evenOutTarget > camera->target.y)
|
if (evenOutTarget > camera->target.y)
|
||||||
{
|
{
|
||||||
camera->target.y += evenOutSpeed*delta;
|
camera->target.y += evenOutSpeed*delta;
|
||||||
|
|
||||||
if (camera->target.y > evenOutTarget)
|
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;
|
camera->target.y = evenOutTarget;
|
||||||
eveningOut = 0;
|
eveningOut = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
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))
|
if (player->canJump && (player->speed == 0) && (player->position.y != camera->target.y))
|
||||||
{
|
{
|
||||||
@ -278,7 +283,7 @@ void UpdateCameraEvenOutOnLanding(Camera2D *camera, Player *player, EnvItem *env
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateCameraPlayerBoundsPush(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)
|
||||||
{
|
{
|
||||||
static Vector2 bbox = { 0.2f, 0.2f };
|
static Vector2 bbox = { 0.2f, 0.2f };
|
||||||
|
|
||||||
|
|||||||
BIN
examples/core/core_2d_camera_smooth_pixelperfect.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
@ -2,10 +2,12 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - 3d camera first person
|
* raylib [core] example - 3d camera first person
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.3 (www.raylib.com)
|
* Example originally created with raylib 1.3, last time updated with raylib 1.3
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
@ -13,6 +15,9 @@
|
|||||||
|
|
||||||
#define MAX_COLUMNS 20
|
#define MAX_COLUMNS 20
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -28,17 +33,17 @@ int main(void)
|
|||||||
camera.target = (Vector3){ 0.0f, 1.8f, 0.0f };
|
camera.target = (Vector3){ 0.0f, 1.8f, 0.0f };
|
||||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };
|
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };
|
||||||
camera.fovy = 60.0f;
|
camera.fovy = 60.0f;
|
||||||
camera.type = CAMERA_PERSPECTIVE;
|
camera.projection = CAMERA_PERSPECTIVE;
|
||||||
|
|
||||||
// Generates some random columns
|
// Generates some random columns
|
||||||
float heights[MAX_COLUMNS] = { 0.0f };
|
float heights[MAX_COLUMNS] = { 0 };
|
||||||
Vector3 positions[MAX_COLUMNS] = { 0 };
|
Vector3 positions[MAX_COLUMNS] = { 0 };
|
||||||
Color colors[MAX_COLUMNS] = { 0 };
|
Color colors[MAX_COLUMNS] = { 0 };
|
||||||
|
|
||||||
for (int i = 0; i < MAX_COLUMNS; i++)
|
for (int i = 0; i < MAX_COLUMNS; i++)
|
||||||
{
|
{
|
||||||
heights[i] = (float)GetRandomValue(1, 12);
|
heights[i] = (float)GetRandomValue(1, 12);
|
||||||
positions[i] = (Vector3){ GetRandomValue(-15, 15), heights[i]/2, GetRandomValue(-15, 15) };
|
positions[i] = (Vector3){ (float)GetRandomValue(-15, 15), heights[i]/2.0f, (float)GetRandomValue(-15, 15) };
|
||||||
colors[i] = (Color){ GetRandomValue(20, 255), GetRandomValue(10, 55), 30, 255 };
|
colors[i] = (Color){ GetRandomValue(20, 255), GetRandomValue(10, 55), 30, 255 };
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +57,7 @@ int main(void)
|
|||||||
{
|
{
|
||||||
// Update
|
// Update
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
UpdateCamera(&camera); // Update camera
|
UpdateCamera(&camera);
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
|
|||||||
@ -2,15 +2,20 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - Initialize 3d camera free
|
* raylib [core] example - Initialize 3d camera free
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.3 (www.raylib.com)
|
* Example originally created with raylib 1.3, last time updated with raylib 1.3
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -26,7 +31,7 @@ int main(void)
|
|||||||
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f }; // Camera looking at point
|
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.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
|
||||||
camera.fovy = 45.0f; // Camera field-of-view Y
|
camera.fovy = 45.0f; // Camera field-of-view Y
|
||||||
camera.type = CAMERA_PERSPECTIVE; // Camera mode type
|
camera.projection = CAMERA_PERSPECTIVE; // Camera mode type
|
||||||
|
|
||||||
Vector3 cubePosition = { 0.0f, 0.0f, 0.0f };
|
Vector3 cubePosition = { 0.0f, 0.0f, 0.0f };
|
||||||
|
|
||||||
@ -40,7 +45,7 @@ int main(void)
|
|||||||
{
|
{
|
||||||
// Update
|
// Update
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
UpdateCamera(&camera); // Update camera
|
UpdateCamera(&camera);
|
||||||
|
|
||||||
if (IsKeyDown('Z')) camera.target = (Vector3){ 0.0f, 0.0f, 0.0f };
|
if (IsKeyDown('Z')) camera.target = (Vector3){ 0.0f, 0.0f, 0.0f };
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -2,15 +2,20 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - Initialize 3d camera mode
|
* raylib [core] example - Initialize 3d camera mode
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.0 (www.raylib.com)
|
* Example originally created with raylib 1.0, last time updated with raylib 1.0
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -26,7 +31,7 @@ int main(void)
|
|||||||
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f }; // Camera looking at point
|
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.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
|
||||||
camera.fovy = 45.0f; // Camera field-of-view Y
|
camera.fovy = 45.0f; // Camera field-of-view Y
|
||||||
camera.type = CAMERA_PERSPECTIVE; // Camera mode type
|
camera.projection = CAMERA_PERSPECTIVE; // Camera mode type
|
||||||
|
|
||||||
Vector3 cubePosition = { 0.0f, 0.0f, 0.0f };
|
Vector3 cubePosition = { 0.0f, 0.0f, 0.0f };
|
||||||
|
|
||||||
|
|||||||
@ -2,15 +2,20 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - Picking in 3d mode
|
* raylib [core] example - Picking in 3d mode
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.3 (www.raylib.com)
|
* Example originally created with raylib 1.3, last time updated with raylib 4.0
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -26,14 +31,14 @@ int main(void)
|
|||||||
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f }; // Camera looking at point
|
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.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
|
||||||
camera.fovy = 45.0f; // Camera field-of-view Y
|
camera.fovy = 45.0f; // Camera field-of-view Y
|
||||||
camera.type = CAMERA_PERSPECTIVE; // Camera mode type
|
camera.projection = CAMERA_PERSPECTIVE; // Camera mode type
|
||||||
|
|
||||||
Vector3 cubePosition = { 0.0f, 1.0f, 0.0f };
|
Vector3 cubePosition = { 0.0f, 1.0f, 0.0f };
|
||||||
Vector3 cubeSize = { 2.0f, 2.0f, 2.0f };
|
Vector3 cubeSize = { 2.0f, 2.0f, 2.0f };
|
||||||
|
|
||||||
Ray ray = { 0 }; // Picking line ray
|
Ray ray = { 0 }; // Picking line ray
|
||||||
|
|
||||||
bool collision = false;
|
RayCollision collision = { 0 };
|
||||||
|
|
||||||
SetCameraMode(camera, CAMERA_FREE); // Set a free camera mode
|
SetCameraMode(camera, CAMERA_FREE); // Set a free camera mode
|
||||||
|
|
||||||
@ -45,20 +50,20 @@ int main(void)
|
|||||||
{
|
{
|
||||||
// Update
|
// Update
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
UpdateCamera(&camera); // Update camera
|
UpdateCamera(&camera);
|
||||||
|
|
||||||
if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON))
|
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT))
|
||||||
{
|
{
|
||||||
if (!collision)
|
if (!collision.hit)
|
||||||
{
|
{
|
||||||
ray = GetMouseRay(GetMousePosition(), camera);
|
ray = GetMouseRay(GetMousePosition(), camera);
|
||||||
|
|
||||||
// Check collision between ray and box
|
// Check collision between ray and box
|
||||||
collision = CheckCollisionRayBox(ray,
|
collision = GetRayCollisionBox(ray,
|
||||||
(BoundingBox){(Vector3){ cubePosition.x - cubeSize.x/2, cubePosition.y - cubeSize.y/2, cubePosition.z - cubeSize.z/2 },
|
(BoundingBox){(Vector3){ cubePosition.x - cubeSize.x/2, cubePosition.y - cubeSize.y/2, cubePosition.z - cubeSize.z/2 },
|
||||||
(Vector3){ cubePosition.x + cubeSize.x/2, cubePosition.y + cubeSize.y/2, cubePosition.z + cubeSize.z/2 }});
|
(Vector3){ cubePosition.x + cubeSize.x/2, cubePosition.y + cubeSize.y/2, cubePosition.z + cubeSize.z/2 }});
|
||||||
}
|
}
|
||||||
else collision = false;
|
else collision.hit = false;
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -70,7 +75,7 @@ int main(void)
|
|||||||
|
|
||||||
BeginMode3D(camera);
|
BeginMode3D(camera);
|
||||||
|
|
||||||
if (collision)
|
if (collision.hit)
|
||||||
{
|
{
|
||||||
DrawCube(cubePosition, cubeSize.x, cubeSize.y, cubeSize.z, RED);
|
DrawCube(cubePosition, cubeSize.x, cubeSize.y, cubeSize.z, RED);
|
||||||
DrawCubeWires(cubePosition, cubeSize.x, cubeSize.y, cubeSize.z, MAROON);
|
DrawCubeWires(cubePosition, cubeSize.x, cubeSize.y, cubeSize.z, MAROON);
|
||||||
@ -90,7 +95,7 @@ int main(void)
|
|||||||
|
|
||||||
DrawText("Try selecting the box with mouse!", 240, 10, 20, DARKGRAY);
|
DrawText("Try selecting the box with mouse!", 240, 10, 20, DARKGRAY);
|
||||||
|
|
||||||
if(collision) DrawText("BOX SELECTED", (screenWidth - MeasureText("BOX SELECTED", 30)) / 2, screenHeight * 0.1f, 30, GREEN);
|
if (collision.hit) DrawText("BOX SELECTED", (screenWidth - MeasureText("BOX SELECTED", 30)) / 2, (int)(screenHeight * 0.1f), 30, GREEN);
|
||||||
|
|
||||||
DrawFPS(10, 10);
|
DrawFPS(10, 10);
|
||||||
|
|
||||||
|
|||||||
@ -1,35 +1,36 @@
|
|||||||
/*******************************************************************************************
|
/*******************************************************************************************
|
||||||
*
|
*
|
||||||
* raylib - Simple Game template
|
* raylib [core] examples - basic screen manager
|
||||||
*
|
*
|
||||||
* <Game title>
|
* NOTE: This example illustrates a very simple screen manager based on a states machines
|
||||||
* <Game description>
|
|
||||||
*
|
*
|
||||||
* This game has been created using raylib (www.raylib.com)
|
* Example originally created with raylib 4.0, last time updated with raylib 4.0
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014-2020 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2021-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------
|
||||||
// Types and Structures Definition
|
// Types and Structures Definition
|
||||||
//----------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------
|
||||||
typedef enum GameScreen { LOGO = 0, TITLE, GAMEPLAY, ENDING } GameScreen;
|
typedef enum GameScreen { LOGO = 0, TITLE, GAMEPLAY, ENDING } GameScreen;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Main entry point
|
// Program main entry point
|
||||||
//----------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization (Note windowTitle is unused on Android)
|
// Initialization
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
const int screenWidth = 800;
|
const int screenWidth = 800;
|
||||||
const int screenHeight = 450;
|
const int screenHeight = 450;
|
||||||
|
|
||||||
InitWindow(screenWidth, screenHeight, "raylib template - simple game");
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic screen manager");
|
||||||
|
|
||||||
GameScreen currentScreen = LOGO;
|
GameScreen currentScreen = LOGO;
|
||||||
|
|
||||||
@ -39,15 +40,15 @@ int main(void)
|
|||||||
|
|
||||||
SetTargetFPS(60); // Set desired framerate (frames-per-second)
|
SetTargetFPS(60); // Set desired framerate (frames-per-second)
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Main game loop
|
// Main game loop
|
||||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||||
{
|
{
|
||||||
// Update
|
// Update
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
switch(currentScreen)
|
switch(currentScreen)
|
||||||
{
|
{
|
||||||
case LOGO:
|
case LOGO:
|
||||||
{
|
{
|
||||||
// TODO: Update LOGO screen variables here!
|
// TODO: Update LOGO screen variables here!
|
||||||
|
|
||||||
@ -59,7 +60,7 @@ int main(void)
|
|||||||
currentScreen = TITLE;
|
currentScreen = TITLE;
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case TITLE:
|
case TITLE:
|
||||||
{
|
{
|
||||||
// TODO: Update TITLE screen variables here!
|
// TODO: Update TITLE screen variables here!
|
||||||
|
|
||||||
@ -70,16 +71,16 @@ int main(void)
|
|||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case GAMEPLAY:
|
case GAMEPLAY:
|
||||||
{
|
{
|
||||||
// TODO: Update GAMEPLAY screen variables here!
|
// TODO: Update GAMEPLAY screen variables here!
|
||||||
|
|
||||||
// Press enter to change to ENDING screen
|
// Press enter to change to ENDING screen
|
||||||
if (IsKeyPressed(KEY_ENTER) || IsGestureDetected(GESTURE_TAP))
|
if (IsKeyPressed(KEY_ENTER) || IsGestureDetected(GESTURE_TAP))
|
||||||
{
|
{
|
||||||
currentScreen = ENDING;
|
currentScreen = ENDING;
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case ENDING:
|
case ENDING:
|
||||||
{
|
{
|
||||||
// TODO: Update ENDING screen variables here!
|
// TODO: Update ENDING screen variables here!
|
||||||
|
|
||||||
@ -87,63 +88,63 @@ int main(void)
|
|||||||
if (IsKeyPressed(KEY_ENTER) || IsGestureDetected(GESTURE_TAP))
|
if (IsKeyPressed(KEY_ENTER) || IsGestureDetected(GESTURE_TAP))
|
||||||
{
|
{
|
||||||
currentScreen = TITLE;
|
currentScreen = TITLE;
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
BeginDrawing();
|
BeginDrawing();
|
||||||
|
|
||||||
ClearBackground(RAYWHITE);
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
switch(currentScreen)
|
switch(currentScreen)
|
||||||
{
|
{
|
||||||
case LOGO:
|
case LOGO:
|
||||||
{
|
{
|
||||||
// TODO: Draw LOGO screen here!
|
// TODO: Draw LOGO screen here!
|
||||||
DrawText("LOGO SCREEN", 20, 20, 40, LIGHTGRAY);
|
DrawText("LOGO SCREEN", 20, 20, 40, LIGHTGRAY);
|
||||||
DrawText("WAIT for 2 SECONDS...", 290, 220, 20, GRAY);
|
DrawText("WAIT for 2 SECONDS...", 290, 220, 20, GRAY);
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
case TITLE:
|
case TITLE:
|
||||||
{
|
{
|
||||||
// TODO: Draw TITLE screen here!
|
// TODO: Draw TITLE screen here!
|
||||||
DrawRectangle(0, 0, screenWidth, screenHeight, GREEN);
|
DrawRectangle(0, 0, screenWidth, screenHeight, GREEN);
|
||||||
DrawText("TITLE SCREEN", 20, 20, 40, DARKGREEN);
|
DrawText("TITLE SCREEN", 20, 20, 40, DARKGREEN);
|
||||||
DrawText("PRESS ENTER or TAP to JUMP to GAMEPLAY SCREEN", 120, 220, 20, DARKGREEN);
|
DrawText("PRESS ENTER or TAP to JUMP to GAMEPLAY SCREEN", 120, 220, 20, DARKGREEN);
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
case GAMEPLAY:
|
case GAMEPLAY:
|
||||||
{
|
{
|
||||||
// TODO: Draw GAMEPLAY screen here!
|
// TODO: Draw GAMEPLAY screen here!
|
||||||
DrawRectangle(0, 0, screenWidth, screenHeight, PURPLE);
|
DrawRectangle(0, 0, screenWidth, screenHeight, PURPLE);
|
||||||
DrawText("GAMEPLAY SCREEN", 20, 20, 40, MAROON);
|
DrawText("GAMEPLAY SCREEN", 20, 20, 40, MAROON);
|
||||||
DrawText("PRESS ENTER or TAP to JUMP to ENDING SCREEN", 130, 220, 20, MAROON);
|
DrawText("PRESS ENTER or TAP to JUMP to ENDING SCREEN", 130, 220, 20, MAROON);
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
case ENDING:
|
case ENDING:
|
||||||
{
|
{
|
||||||
// TODO: Draw ENDING screen here!
|
// TODO: Draw ENDING screen here!
|
||||||
DrawRectangle(0, 0, screenWidth, screenHeight, BLUE);
|
DrawRectangle(0, 0, screenWidth, screenHeight, BLUE);
|
||||||
DrawText("ENDING SCREEN", 20, 20, 40, DARKBLUE);
|
DrawText("ENDING SCREEN", 20, 20, 40, DARKBLUE);
|
||||||
DrawText("PRESS ENTER or TAP to RETURN to TITLE SCREEN", 120, 220, 20, DARKBLUE);
|
DrawText("PRESS ENTER or TAP to RETURN to TITLE SCREEN", 120, 220, 20, DARKBLUE);
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
|
|
||||||
// De-Initialization
|
// De-Initialization
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
// TODO: Unload all loaded data (textures, fonts, audio) here!
|
// TODO: Unload all loaded data (textures, fonts, audio) here!
|
||||||
|
|
||||||
CloseWindow(); // Close window and OpenGL context
|
CloseWindow(); // Close window and OpenGL context
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
BIN
examples/core/core_basic_screen_manager.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
@ -12,15 +12,20 @@
|
|||||||
*
|
*
|
||||||
* Enjoy using raylib. :)
|
* Enjoy using raylib. :)
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.0 (www.raylib.com)
|
* Example originally created with raylib 1.0, last time updated with raylib 1.0
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5)
|
* Copyright (c) 2013-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
|
|||||||
@ -2,14 +2,16 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - Basic window (adapted for HTML5 platform)
|
* raylib [core] example - Basic window (adapted for HTML5 platform)
|
||||||
*
|
*
|
||||||
* This example is prepared to compile for PLATFORM_WEB, PLATFORM_DESKTOP and PLATFORM_RPI
|
* NOTE: This example is prepared to compile for PLATFORM_WEB, PLATFORM_DESKTOP and PLATFORM_RPI
|
||||||
* As you will notice, code structure is slightly diferent to the other examples...
|
* As you will notice, code structure is slightly diferent to the other examples...
|
||||||
* To compile it for PLATFORM_WEB just uncomment #define PLATFORM_WEB at beginning
|
* To compile it for PLATFORM_WEB just uncomment #define PLATFORM_WEB at beginning
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.3 (www.raylib.com)
|
* Example originally created with raylib 1.3, last time updated with raylib 1.3
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
@ -24,18 +26,18 @@
|
|||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Global Variables Definition
|
// Global Variables Definition
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
int screenWidth = 800;
|
const int screenWidth = 800;
|
||||||
int screenHeight = 450;
|
const int screenHeight = 450;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Module Functions Declaration
|
// Module functions declaration
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
void UpdateDrawFrame(void); // Update and Draw one frame
|
void UpdateDrawFrame(void); // Update and Draw one frame
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Main Enry Point
|
// Program main entry point
|
||||||
//----------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
int main()
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
@ -46,7 +48,7 @@ int main()
|
|||||||
#else
|
#else
|
||||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Main game loop
|
// Main game loop
|
||||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||||
{
|
{
|
||||||
|
|||||||
130
examples/core/core_custom_frame_control.c
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
/*******************************************************************************************
|
||||||
|
*
|
||||||
|
* raylib [core] example - custom frame control
|
||||||
|
*
|
||||||
|
* NOTE: WARNING: This is an example for advance users willing to have full control over
|
||||||
|
* the frame processes. By default, EndDrawing() calls the following processes:
|
||||||
|
* 1. Draw remaining batch data: rlDrawRenderBatchActive()
|
||||||
|
* 2. SwapScreenBuffer()
|
||||||
|
* 3. Frame time control: WaitTime()
|
||||||
|
* 4. PollInputEvents()
|
||||||
|
*
|
||||||
|
* To avoid steps 2, 3 and 4, flag SUPPORT_CUSTOM_FRAME_CONTROL can be enabled in
|
||||||
|
* config.h (it requires recompiling raylib). This way those steps are up to the user.
|
||||||
|
*
|
||||||
|
* Note that enabling this flag invalidates some functions:
|
||||||
|
* - GetFrameTime()
|
||||||
|
* - SetTargetFPS()
|
||||||
|
* - GetFPS()
|
||||||
|
*
|
||||||
|
* Example originally created with raylib 4.0, last time updated with raylib 4.0
|
||||||
|
*
|
||||||
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2021-2022 Ramon Santamaria (@raysan5)
|
||||||
|
*
|
||||||
|
********************************************************************************************/
|
||||||
|
|
||||||
|
#include "raylib.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
// Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
const int screenWidth = 800;
|
||||||
|
const int screenHeight = 450;
|
||||||
|
|
||||||
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - custom frame control");
|
||||||
|
|
||||||
|
// Custom timming variables
|
||||||
|
double previousTime = GetTime(); // Previous time measure
|
||||||
|
double currentTime = 0.0; // Current time measure
|
||||||
|
double updateDrawTime = 0.0; // Update + Draw time
|
||||||
|
double waitTime = 0.0; // Wait time (if target fps required)
|
||||||
|
float deltaTime = 0.0f; // Frame time (Update + Draw + Wait time)
|
||||||
|
|
||||||
|
float timeCounter = 0.0f; // Accumulative time counter (seconds)
|
||||||
|
float position = 0.0f; // Circle position
|
||||||
|
bool pause = false; // Pause control flag
|
||||||
|
|
||||||
|
int targetFPS = 60; // Our initial target fps
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Main game loop
|
||||||
|
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||||
|
{
|
||||||
|
// Update
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
PollInputEvents(); // Poll input events (SUPPORT_CUSTOM_FRAME_CONTROL)
|
||||||
|
|
||||||
|
if (IsKeyPressed(KEY_SPACE)) pause = !pause;
|
||||||
|
|
||||||
|
if (IsKeyPressed(KEY_UP)) targetFPS += 20;
|
||||||
|
else if (IsKeyPressed(KEY_DOWN)) targetFPS -= 20;
|
||||||
|
|
||||||
|
if (targetFPS < 0) targetFPS = 0;
|
||||||
|
|
||||||
|
if (!pause)
|
||||||
|
{
|
||||||
|
position += 200*deltaTime; // We move at 200 pixels per second
|
||||||
|
if (position >= GetScreenWidth()) position = 0;
|
||||||
|
timeCounter += deltaTime; // We count time (seconds)
|
||||||
|
}
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Draw
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
BeginDrawing();
|
||||||
|
|
||||||
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
|
for (int i = 0; i < GetScreenWidth()/200; i++) DrawRectangle(200*i, 0, 1, GetScreenHeight(), SKYBLUE);
|
||||||
|
|
||||||
|
DrawCircle((int)position, GetScreenHeight()/2 - 25, 50, RED);
|
||||||
|
|
||||||
|
DrawText(TextFormat("%03.0f ms", timeCounter*1000.0f), position - 40, GetScreenHeight()/2 - 100, 20, MAROON);
|
||||||
|
DrawText(TextFormat("PosX: %03.0f", position), position - 50, GetScreenHeight()/2 + 40, 20, BLACK);
|
||||||
|
|
||||||
|
DrawText("Circle is moving at a constant 200 pixels/sec,\nindependently of the frame rate.", 10, 10, 20, DARKGRAY);
|
||||||
|
DrawText("PRESS SPACE to PAUSE MOVEMENT", 10, GetScreenHeight() - 60, 20, GRAY);
|
||||||
|
DrawText("PRESS UP | DOWN to CHANGE TARGET FPS", 10, GetScreenHeight() - 30, 20, GRAY);
|
||||||
|
DrawText(TextFormat("TARGET FPS: %i", targetFPS), GetScreenWidth() - 220, 10, 20, LIME);
|
||||||
|
DrawText(TextFormat("CURRENT FPS: %i", (int)(1.0f/deltaTime)), GetScreenWidth() - 220, 40, 20, GREEN);
|
||||||
|
|
||||||
|
EndDrawing();
|
||||||
|
|
||||||
|
// NOTE: In case raylib is configured to SUPPORT_CUSTOM_FRAME_CONTROL,
|
||||||
|
// Events polling, screen buffer swap and frame time control must be managed by the user
|
||||||
|
|
||||||
|
SwapScreenBuffer(); // Flip the back buffer to screen (front buffer)
|
||||||
|
|
||||||
|
currentTime = GetTime();
|
||||||
|
updateDrawTime = currentTime - previousTime;
|
||||||
|
|
||||||
|
if (targetFPS > 0) // We want a fixed frame rate
|
||||||
|
{
|
||||||
|
waitTime = (1.0f/(float)targetFPS) - updateDrawTime;
|
||||||
|
if (waitTime > 0.0)
|
||||||
|
{
|
||||||
|
WaitTime((float)waitTime*1000.0f);
|
||||||
|
currentTime = GetTime();
|
||||||
|
deltaTime = (float)(currentTime - previousTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else deltaTime = updateDrawTime; // Framerate could be variable
|
||||||
|
|
||||||
|
previousTime = currentTime;
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
}
|
||||||
|
|
||||||
|
// De-Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
CloseWindow(); // Close window and OpenGL context
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BIN
examples/core/core_custom_frame_control.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
@ -2,12 +2,14 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - Custom logging
|
* raylib [core] example - Custom logging
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 2.1 (www.raylib.com)
|
* Example originally created with raylib 2.5, last time updated with raylib 2.5
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Example contributed by Pablo Marcos Oltra (@pamarcos) and reviewed by Ramon Santamaria (@raysan5)
|
* Example contributed by Pablo Marcos Oltra (@pamarcos) and reviewed by Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Pablo Marcos Oltra (@pamarcos) and Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2018-2022 Pablo Marcos Oltra (@pamarcos) and Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
@ -17,7 +19,7 @@
|
|||||||
#include <time.h> // Required for: time_t, tm, time(), localtime(), strftime()
|
#include <time.h> // Required for: time_t, tm, time(), localtime(), strftime()
|
||||||
|
|
||||||
// Custom logging funtion
|
// Custom logging funtion
|
||||||
void LogCustom(int msgType, const char *text, va_list args)
|
void CustomLog(int msgType, const char *text, va_list args)
|
||||||
{
|
{
|
||||||
char timeStr[64] = { 0 };
|
char timeStr[64] = { 0 };
|
||||||
time_t now = time(NULL);
|
time_t now = time(NULL);
|
||||||
@ -39,16 +41,18 @@ void LogCustom(int msgType, const char *text, va_list args)
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
const int screenWidth = 800;
|
const int screenWidth = 800;
|
||||||
const int screenHeight = 450;
|
const int screenHeight = 450;
|
||||||
|
|
||||||
// First thing we do is setting our custom logger to ensure everything raylib logs
|
// Set custom logger
|
||||||
// will use our own logger instead of its internal one
|
SetTraceLogCallback(CustomLog);
|
||||||
SetTraceLogCallback(LogCustom);
|
|
||||||
|
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - custom logging");
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - custom logging");
|
||||||
|
|
||||||
|
|||||||
@ -2,17 +2,22 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - Windows drop files
|
* raylib [core] example - Windows drop files
|
||||||
*
|
*
|
||||||
* This example only works on platforms that support drag & drop (Windows, Linux, OSX, Html5?)
|
* NOTE: This example only works on platforms that support drag & drop (Windows, Linux, OSX, Html5?)
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.3 (www.raylib.com)
|
* Example originally created with raylib 1.3, last time updated with raylib 4.2
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -22,8 +27,7 @@ int main(void)
|
|||||||
|
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - drop files");
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - drop files");
|
||||||
|
|
||||||
int count = 0;
|
FilePathList droppedFiles = { 0 };
|
||||||
char **droppedFiles = { 0 };
|
|
||||||
|
|
||||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
@ -35,7 +39,11 @@ int main(void)
|
|||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
if (IsFileDropped())
|
if (IsFileDropped())
|
||||||
{
|
{
|
||||||
droppedFiles = GetDroppedFiles(&count);
|
// Is some files have been previously loaded, unload them
|
||||||
|
if (droppedFiles.count > 0) UnloadDroppedFiles(droppedFiles);
|
||||||
|
|
||||||
|
// Load new dropped files
|
||||||
|
droppedFiles = LoadDroppedFiles();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -45,20 +53,20 @@ int main(void)
|
|||||||
|
|
||||||
ClearBackground(RAYWHITE);
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
if (count == 0) DrawText("Drop your files to this window!", 100, 40, 20, DARKGRAY);
|
if (droppedFiles.count == 0) DrawText("Drop your files to this window!", 100, 40, 20, DARKGRAY);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DrawText("Dropped files:", 100, 40, 20, DARKGRAY);
|
DrawText("Dropped files:", 100, 40, 20, DARKGRAY);
|
||||||
|
|
||||||
for (int i = 0; i < count; i++)
|
for (int i = 0; i < droppedFiles.count; i++)
|
||||||
{
|
{
|
||||||
if (i%2 == 0) DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.5f));
|
if (i%2 == 0) DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.5f));
|
||||||
else DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.3f));
|
else DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.3f));
|
||||||
|
|
||||||
DrawText(droppedFiles[i], 120, 100 + 40*i, 10, GRAY);
|
DrawText(droppedFiles.paths[i], 120, 100 + 40*i, 10, GRAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawText("Drop new files...", 100, 110 + 40*count, 20, DARKGRAY);
|
DrawText("Drop new files...", 100, 110 + 40*droppedFiles.count, 20, DARKGRAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
@ -67,7 +75,7 @@ int main(void)
|
|||||||
|
|
||||||
// De-Initialization
|
// De-Initialization
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
ClearDroppedFiles(); // Clear internal buffers
|
UnloadDroppedFiles(droppedFiles); // Unload files memory
|
||||||
|
|
||||||
CloseWindow(); // Close window and OpenGL context
|
CloseWindow(); // Close window and OpenGL context
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -8,16 +8,19 @@
|
|||||||
* - PLAYSTATION(R)3 Controller
|
* - PLAYSTATION(R)3 Controller
|
||||||
* Check raylib.h for buttons configuration
|
* Check raylib.h for buttons configuration
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 2.5 (www.raylib.com)
|
* Example originally created with raylib 1.1, last time updated with raylib 4.2
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013-2019 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2013-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
// NOTE: Gamepad name ID depends on drivers and OS
|
// NOTE: Gamepad name ID depends on drivers and OS
|
||||||
|
#define XBOX360_LEGACY_NAME_ID "Xbox Controller"
|
||||||
#if defined(PLATFORM_RPI)
|
#if defined(PLATFORM_RPI)
|
||||||
#define XBOX360_NAME_ID "Microsoft X-Box 360 pad"
|
#define XBOX360_NAME_ID "Microsoft X-Box 360 pad"
|
||||||
#define PS3_NAME_ID "PLAYSTATION(R)3 Controller"
|
#define PS3_NAME_ID "PLAYSTATION(R)3 Controller"
|
||||||
@ -26,6 +29,9 @@
|
|||||||
#define PS3_NAME_ID "PLAYSTATION(R)3 Controller"
|
#define PS3_NAME_ID "PLAYSTATION(R)3 Controller"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -57,102 +63,102 @@ int main(void)
|
|||||||
|
|
||||||
ClearBackground(RAYWHITE);
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
if (IsGamepadAvailable(GAMEPAD_PLAYER1))
|
if (IsGamepadAvailable(0))
|
||||||
{
|
{
|
||||||
DrawText(FormatText("GP1: %s", GetGamepadName(GAMEPAD_PLAYER1)), 10, 10, 10, BLACK);
|
DrawText(TextFormat("GP1: %s", GetGamepadName(0)), 10, 10, 10, BLACK);
|
||||||
|
|
||||||
if (IsGamepadName(GAMEPAD_PLAYER1, XBOX360_NAME_ID))
|
if (TextIsEqual(GetGamepadName(0), XBOX360_NAME_ID) || TextIsEqual(GetGamepadName(0), XBOX360_LEGACY_NAME_ID))
|
||||||
{
|
{
|
||||||
DrawTexture(texXboxPad, 0, 0, DARKGRAY);
|
DrawTexture(texXboxPad, 0, 0, DARKGRAY);
|
||||||
|
|
||||||
// Draw buttons: xbox home
|
// Draw buttons: xbox home
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_MIDDLE)) DrawCircle(394, 89, 19, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE)) DrawCircle(394, 89, 19, RED);
|
||||||
|
|
||||||
// Draw buttons: basic
|
// Draw buttons: basic
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_MIDDLE_RIGHT)) DrawCircle(436, 150, 9, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE_RIGHT)) DrawCircle(436, 150, 9, RED);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawCircle(352, 150, 9, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawCircle(352, 150, 9, RED);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_RIGHT_FACE_LEFT)) DrawCircle(501, 151, 15, BLUE);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_LEFT)) DrawCircle(501, 151, 15, BLUE);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_RIGHT_FACE_DOWN)) DrawCircle(536, 187, 15, LIME);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_DOWN)) DrawCircle(536, 187, 15, LIME);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT)) DrawCircle(572, 151, 15, MAROON);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT)) DrawCircle(572, 151, 15, MAROON);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(536, 115, 15, GOLD);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(536, 115, 15, GOLD);
|
||||||
|
|
||||||
// Draw buttons: d-pad
|
// Draw buttons: d-pad
|
||||||
DrawRectangle(317, 202, 19, 71, BLACK);
|
DrawRectangle(317, 202, 19, 71, BLACK);
|
||||||
DrawRectangle(293, 228, 69, 19, BLACK);
|
DrawRectangle(293, 228, 69, 19, BLACK);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(317, 202, 19, 26, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(317, 202, 19, 26, RED);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(317, 202 + 45, 19, 26, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(317, 202 + 45, 19, 26, RED);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(292, 228, 25, 19, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(292, 228, 25, 19, RED);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(292 + 44, 228, 26, 19, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(292 + 44, 228, 26, 19, RED);
|
||||||
|
|
||||||
// Draw buttons: left-right back
|
// Draw buttons: left-right back
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawCircle(259, 61, 20, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawCircle(259, 61, 20, RED);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_RIGHT_TRIGGER_1)) DrawCircle(536, 61, 20, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_TRIGGER_1)) DrawCircle(536, 61, 20, RED);
|
||||||
|
|
||||||
// Draw axis: left joystick
|
// Draw axis: left joystick
|
||||||
DrawCircle(259, 152, 39, BLACK);
|
DrawCircle(259, 152, 39, BLACK);
|
||||||
DrawCircle(259, 152, 34, LIGHTGRAY);
|
DrawCircle(259, 152, 34, LIGHTGRAY);
|
||||||
DrawCircle(259 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_X)*20),
|
DrawCircle(259 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_X)*20),
|
||||||
152 - (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_Y)*20), 25, BLACK);
|
152 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_Y)*20), 25, BLACK);
|
||||||
|
|
||||||
// Draw axis: right joystick
|
// Draw axis: right joystick
|
||||||
DrawCircle(461, 237, 38, BLACK);
|
DrawCircle(461, 237, 38, BLACK);
|
||||||
DrawCircle(461, 237, 33, LIGHTGRAY);
|
DrawCircle(461, 237, 33, LIGHTGRAY);
|
||||||
DrawCircle(461 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_X)*20),
|
DrawCircle(461 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_X)*20),
|
||||||
237 - (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_Y)*20), 25, BLACK);
|
237 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_Y)*20), 25, BLACK);
|
||||||
|
|
||||||
// Draw axis: left-right triggers
|
// Draw axis: left-right triggers
|
||||||
DrawRectangle(170, 30, 15, 70, GRAY);
|
DrawRectangle(170, 30, 15, 70, GRAY);
|
||||||
DrawRectangle(604, 30, 15, 70, GRAY);
|
DrawRectangle(604, 30, 15, 70, GRAY);
|
||||||
DrawRectangle(170, 30, 15, (((1.0f + GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_TRIGGER))/2.0f)*70), RED);
|
DrawRectangle(170, 30, 15, (int)(((1 + GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_TRIGGER))/2)*70), RED);
|
||||||
DrawRectangle(604, 30, 15, (((1.0f + GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_TRIGGER))/2.0f)*70), RED);
|
DrawRectangle(604, 30, 15, (int)(((1 + GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_TRIGGER))/2)*70), RED);
|
||||||
|
|
||||||
//DrawText(FormatText("Xbox axis LT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_TRIGGER)), 10, 40, 10, BLACK);
|
//DrawText(TextFormat("Xbox axis LT: %02.02f", GetGamepadAxisMovement(0, 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 RT: %02.02f", GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_TRIGGER)), 10, 60, 10, BLACK);
|
||||||
}
|
}
|
||||||
else if (IsGamepadName(GAMEPAD_PLAYER1, PS3_NAME_ID))
|
else if (TextIsEqual(GetGamepadName(0), PS3_NAME_ID))
|
||||||
{
|
{
|
||||||
DrawTexture(texPs3Pad, 0, 0, DARKGRAY);
|
DrawTexture(texPs3Pad, 0, 0, DARKGRAY);
|
||||||
|
|
||||||
// Draw buttons: ps
|
// Draw buttons: ps
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_MIDDLE)) DrawCircle(396, 222, 13, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE)) DrawCircle(396, 222, 13, RED);
|
||||||
|
|
||||||
// Draw buttons: basic
|
// Draw buttons: basic
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawRectangle(328, 170, 32, 13, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawRectangle(328, 170, 32, 13, RED);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_MIDDLE_RIGHT)) DrawTriangle((Vector2){ 436, 168 }, (Vector2){ 436, 185 }, (Vector2){ 464, 177 }, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE_RIGHT)) DrawTriangle((Vector2){ 436, 168 }, (Vector2){ 436, 185 }, (Vector2){ 464, 177 }, RED);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(557, 144, 13, LIME);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(557, 144, 13, LIME);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT)) DrawCircle(586, 173, 13, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT)) DrawCircle(586, 173, 13, RED);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_RIGHT_FACE_DOWN)) DrawCircle(557, 203, 13, VIOLET);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_DOWN)) DrawCircle(557, 203, 13, VIOLET);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_RIGHT_FACE_LEFT)) DrawCircle(527, 173, 13, PINK);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_LEFT)) DrawCircle(527, 173, 13, PINK);
|
||||||
|
|
||||||
// Draw buttons: d-pad
|
// Draw buttons: d-pad
|
||||||
DrawRectangle(225, 132, 24, 84, BLACK);
|
DrawRectangle(225, 132, 24, 84, BLACK);
|
||||||
DrawRectangle(195, 161, 84, 25, BLACK);
|
DrawRectangle(195, 161, 84, 25, BLACK);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(225, 132, 24, 29, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(225, 132, 24, 29, RED);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(225, 132 + 54, 24, 30, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(225, 132 + 54, 24, 30, RED);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(195, 161, 30, 25, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(195, 161, 30, 25, RED);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(195 + 54, 161, 30, 25, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(195 + 54, 161, 30, 25, RED);
|
||||||
|
|
||||||
// Draw buttons: left-right back buttons
|
// Draw buttons: left-right back buttons
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawCircle(239, 82, 20, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawCircle(239, 82, 20, RED);
|
||||||
if (IsGamepadButtonDown(GAMEPAD_PLAYER1, GAMEPAD_BUTTON_RIGHT_TRIGGER_1)) DrawCircle(557, 82, 20, RED);
|
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_TRIGGER_1)) DrawCircle(557, 82, 20, RED);
|
||||||
|
|
||||||
// Draw axis: left joystick
|
// Draw axis: left joystick
|
||||||
DrawCircle(319, 255, 35, BLACK);
|
DrawCircle(319, 255, 35, BLACK);
|
||||||
DrawCircle(319, 255, 31, LIGHTGRAY);
|
DrawCircle(319, 255, 31, LIGHTGRAY);
|
||||||
DrawCircle(319 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_X)*20),
|
DrawCircle(319 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_X) * 20),
|
||||||
255 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_Y)*20), 25, BLACK);
|
255 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_Y) * 20), 25, BLACK);
|
||||||
|
|
||||||
// Draw axis: right joystick
|
// Draw axis: right joystick
|
||||||
DrawCircle(475, 255, 35, BLACK);
|
DrawCircle(475, 255, 35, BLACK);
|
||||||
DrawCircle(475, 255, 31, LIGHTGRAY);
|
DrawCircle(475, 255, 31, LIGHTGRAY);
|
||||||
DrawCircle(475 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_X)*20),
|
DrawCircle(475 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_X) * 20),
|
||||||
255 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_Y)*20), 25, BLACK);
|
255 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_Y) * 20), 25, BLACK);
|
||||||
|
|
||||||
// Draw axis: left-right triggers
|
// Draw axis: left-right triggers
|
||||||
DrawRectangle(169, 48, 15, 70, GRAY);
|
DrawRectangle(169, 48, 15, 70, GRAY);
|
||||||
DrawRectangle(611, 48, 15, 70, GRAY);
|
DrawRectangle(611, 48, 15, 70, GRAY);
|
||||||
DrawRectangle(169, 48, 15, (((1.0f - GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_TRIGGER))/2.0f)*70), RED);
|
DrawRectangle(169, 48, 15, (int)(((1 - GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_TRIGGER)) / 2) * 70), RED);
|
||||||
DrawRectangle(611, 48, 15, (((1.0f - GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_TRIGGER))/2.0f)*70), RED);
|
DrawRectangle(611, 48, 15, (int)(((1 - GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_TRIGGER)) / 2) * 70), RED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -161,14 +167,14 @@ int main(void)
|
|||||||
// TODO: Draw generic gamepad
|
// TODO: Draw generic gamepad
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawText(FormatText("DETECTED AXIS [%i]:", GetGamepadAxisCount(GAMEPAD_PLAYER1)), 10, 50, 10, MAROON);
|
DrawText(TextFormat("DETECTED AXIS [%i]:", GetGamepadAxisCount(0)), 10, 50, 10, MAROON);
|
||||||
|
|
||||||
for (int i = 0; i < GetGamepadAxisCount(GAMEPAD_PLAYER1); i++)
|
for (int i = 0; i < GetGamepadAxisCount(0); i++)
|
||||||
{
|
{
|
||||||
DrawText(FormatText("AXIS %i: %.02f", i, GetGamepadAxisMovement(GAMEPAD_PLAYER1, i)), 20, 70 + 20*i, 10, DARKGRAY);
|
DrawText(TextFormat("AXIS %i: %.02f", i, GetGamepadAxisMovement(0, 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 DrawText("DETECTED BUTTON: NONE", 10, 430, 10, GRAY);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -191,4 +197,4 @@ int main(void)
|
|||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,18 +2,22 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - Input Gestures Detection
|
* raylib [core] example - Input Gestures Detection
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.4 (www.raylib.com)
|
* Example originally created with raylib 1.4, last time updated with raylib 4.2
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2016 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2016-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#define MAX_GESTURE_STRINGS 20
|
#define MAX_GESTURE_STRINGS 20
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -24,7 +28,7 @@ int main(void)
|
|||||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - input gestures");
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - input gestures");
|
||||||
|
|
||||||
Vector2 touchPosition = { 0, 0 };
|
Vector2 touchPosition = { 0, 0 };
|
||||||
Rectangle touchArea = { 220, 10, screenWidth - 230, screenHeight - 20 };
|
Rectangle touchArea = { 220, 10, screenWidth - 230.0f, screenHeight - 20.0f };
|
||||||
|
|
||||||
int gesturesCount = 0;
|
int gesturesCount = 0;
|
||||||
char gestureStrings[MAX_GESTURE_STRINGS][32];
|
char gestureStrings[MAX_GESTURE_STRINGS][32];
|
||||||
@ -53,16 +57,16 @@ int main(void)
|
|||||||
// Store gesture string
|
// Store gesture string
|
||||||
switch (currentGesture)
|
switch (currentGesture)
|
||||||
{
|
{
|
||||||
case GESTURE_TAP: strcpy(gestureStrings[gesturesCount], "GESTURE TAP"); break;
|
case GESTURE_TAP: TextCopy(gestureStrings[gesturesCount], "GESTURE TAP"); break;
|
||||||
case GESTURE_DOUBLETAP: strcpy(gestureStrings[gesturesCount], "GESTURE DOUBLETAP"); break;
|
case GESTURE_DOUBLETAP: TextCopy(gestureStrings[gesturesCount], "GESTURE DOUBLETAP"); break;
|
||||||
case GESTURE_HOLD: strcpy(gestureStrings[gesturesCount], "GESTURE HOLD"); break;
|
case GESTURE_HOLD: TextCopy(gestureStrings[gesturesCount], "GESTURE HOLD"); break;
|
||||||
case GESTURE_DRAG: strcpy(gestureStrings[gesturesCount], "GESTURE DRAG"); break;
|
case GESTURE_DRAG: TextCopy(gestureStrings[gesturesCount], "GESTURE DRAG"); break;
|
||||||
case GESTURE_SWIPE_RIGHT: strcpy(gestureStrings[gesturesCount], "GESTURE SWIPE RIGHT"); break;
|
case GESTURE_SWIPE_RIGHT: TextCopy(gestureStrings[gesturesCount], "GESTURE SWIPE RIGHT"); break;
|
||||||
case GESTURE_SWIPE_LEFT: strcpy(gestureStrings[gesturesCount], "GESTURE SWIPE LEFT"); break;
|
case GESTURE_SWIPE_LEFT: TextCopy(gestureStrings[gesturesCount], "GESTURE SWIPE LEFT"); break;
|
||||||
case GESTURE_SWIPE_UP: strcpy(gestureStrings[gesturesCount], "GESTURE SWIPE UP"); break;
|
case GESTURE_SWIPE_UP: TextCopy(gestureStrings[gesturesCount], "GESTURE SWIPE UP"); break;
|
||||||
case GESTURE_SWIPE_DOWN: strcpy(gestureStrings[gesturesCount], "GESTURE SWIPE DOWN"); break;
|
case GESTURE_SWIPE_DOWN: TextCopy(gestureStrings[gesturesCount], "GESTURE SWIPE DOWN"); break;
|
||||||
case GESTURE_PINCH_IN: strcpy(gestureStrings[gesturesCount], "GESTURE PINCH IN"); break;
|
case GESTURE_PINCH_IN: TextCopy(gestureStrings[gesturesCount], "GESTURE PINCH IN"); break;
|
||||||
case GESTURE_PINCH_OUT: strcpy(gestureStrings[gesturesCount], "GESTURE PINCH OUT"); break;
|
case GESTURE_PINCH_OUT: TextCopy(gestureStrings[gesturesCount], "GESTURE PINCH OUT"); break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,7 +75,7 @@ int main(void)
|
|||||||
// Reset gestures strings
|
// Reset gestures strings
|
||||||
if (gesturesCount >= MAX_GESTURE_STRINGS)
|
if (gesturesCount >= MAX_GESTURE_STRINGS)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MAX_GESTURE_STRINGS; i++) strcpy(gestureStrings[i], "\0");
|
for (int i = 0; i < MAX_GESTURE_STRINGS; i++) TextCopy(gestureStrings[i], "\0");
|
||||||
|
|
||||||
gesturesCount = 0;
|
gesturesCount = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,15 +2,20 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - Keyboard input
|
* raylib [core] example - Keyboard input
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.0 (www.raylib.com)
|
* Example originally created with raylib 1.0, last time updated with raylib 1.0
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
|
|||||||
@ -2,15 +2,20 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - Mouse input
|
* raylib [core] example - Mouse input
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.0 (www.raylib.com)
|
* Example originally created with raylib 1.0, last time updated with raylib 4.0
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -33,9 +38,13 @@ int main(void)
|
|||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
ballPosition = GetMousePosition();
|
ballPosition = GetMousePosition();
|
||||||
|
|
||||||
if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) ballColor = MAROON;
|
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) ballColor = MAROON;
|
||||||
else if (IsMouseButtonPressed(MOUSE_MIDDLE_BUTTON)) ballColor = LIME;
|
else if (IsMouseButtonPressed(MOUSE_BUTTON_MIDDLE)) ballColor = LIME;
|
||||||
else if (IsMouseButtonPressed(MOUSE_RIGHT_BUTTON)) ballColor = DARKBLUE;
|
else if (IsMouseButtonPressed(MOUSE_BUTTON_RIGHT)) ballColor = DARKBLUE;
|
||||||
|
else if (IsMouseButtonPressed(MOUSE_BUTTON_SIDE)) ballColor = PURPLE;
|
||||||
|
else if (IsMouseButtonPressed(MOUSE_BUTTON_EXTRA)) ballColor = YELLOW;
|
||||||
|
else if (IsMouseButtonPressed(MOUSE_BUTTON_FORWARD)) ballColor = ORANGE;
|
||||||
|
else if (IsMouseButtonPressed(MOUSE_BUTTON_BACK)) ballColor = BEIGE;
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
|
|||||||
@ -2,15 +2,20 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] examples - Mouse wheel input
|
* raylib [core] examples - Mouse wheel input
|
||||||
*
|
*
|
||||||
* This test has been created using raylib 1.1 (www.raylib.com)
|
* Example originally created with raylib 1.1, last time updated with raylib 1.3
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -43,7 +48,7 @@ int main(void)
|
|||||||
DrawRectangle(screenWidth/2 - 40, boxPositionY, 80, 80, MAROON);
|
DrawRectangle(screenWidth/2 - 40, boxPositionY, 80, 80, MAROON);
|
||||||
|
|
||||||
DrawText("Use mouse wheel to move the cube up and down!", 10, 10, 20, GRAY);
|
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();
|
EndDrawing();
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -2,17 +2,24 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - Input multitouch
|
* raylib [core] example - Input multitouch
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 2.1 (www.raylib.com)
|
* Example originally created with raylib 2.1, last time updated with raylib 2.5
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Example contributed by Berni (@Berni8k) and reviewed by Ramon Santamaria (@raysan5)
|
* Example contributed by Berni (@Berni8k) and reviewed by Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2019 Berni (@Berni8k) and Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2019-2022 Berni (@Berni8k) and Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
|
#define MAX_TOUCH_POINTS 10
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -22,11 +29,7 @@ int main(void)
|
|||||||
|
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - input multitouch");
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - input multitouch");
|
||||||
|
|
||||||
Vector2 ballPosition = { -100.0f, -100.0f };
|
Vector2 touchPositions[MAX_TOUCH_POINTS] = { 0 };
|
||||||
Color ballColor = BEIGE;
|
|
||||||
|
|
||||||
int touchCounter = 0;
|
|
||||||
Vector2 touchPosition = { 0.0f };
|
|
||||||
|
|
||||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
@ -36,19 +39,8 @@ int main(void)
|
|||||||
{
|
{
|
||||||
// Update
|
// Update
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
ballPosition = GetMousePosition();
|
// Get multiple touchpoints
|
||||||
|
for (int i = 0; i < MAX_TOUCH_POINTS; ++i) touchPositions[i] = GetTouchPosition(i);
|
||||||
ballColor = BEIGE;
|
|
||||||
|
|
||||||
if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) ballColor = MAROON;
|
|
||||||
if (IsMouseButtonDown(MOUSE_MIDDLE_BUTTON)) ballColor = LIME;
|
|
||||||
if (IsMouseButtonDown(MOUSE_RIGHT_BUTTON)) ballColor = DARKBLUE;
|
|
||||||
|
|
||||||
if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) touchCounter = 10;
|
|
||||||
if (IsMouseButtonPressed(MOUSE_MIDDLE_BUTTON)) touchCounter = 10;
|
|
||||||
if (IsMouseButtonPressed(MOUSE_RIGHT_BUTTON)) touchCounter = 10;
|
|
||||||
|
|
||||||
if (touchCounter > 0) touchCounter--;
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
@ -56,25 +48,19 @@ int main(void)
|
|||||||
BeginDrawing();
|
BeginDrawing();
|
||||||
|
|
||||||
ClearBackground(RAYWHITE);
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
// Multitouch
|
|
||||||
for (int i = 0; i < MAX_TOUCH_POINTS; ++i)
|
for (int i = 0; i < MAX_TOUCH_POINTS; ++i)
|
||||||
{
|
{
|
||||||
touchPosition = GetTouchPosition(i); // Get the touch point
|
// Make sure point is not (0, 0) as this means there is no touch for it
|
||||||
|
if ((touchPositions[i].x > 0) && (touchPositions[i].y > 0))
|
||||||
if ((touchPosition.x >= 0) && (touchPosition.y >= 0)) // Make sure point is not (-1,-1) as this means there is no touch for it
|
|
||||||
{
|
{
|
||||||
// Draw circle and touch index number
|
// Draw circle and touch index number
|
||||||
DrawCircleV(touchPosition, 34, ORANGE);
|
DrawCircleV(touchPositions[i], 34, ORANGE);
|
||||||
DrawText(FormatText("%d", i), touchPosition.x - 10, touchPosition.y - 70, 40, BLACK);
|
DrawText(TextFormat("%d", i), (int)touchPositions[i].x - 10, (int)touchPositions[i].y - 70, 40, BLACK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw the normal mouse location
|
DrawText("touch the screen at multiple locations to get multiple balls", 10, 10, 20, DARKGRAY);
|
||||||
DrawCircleV(ballPosition, 30 + (touchCounter*3), ballColor);
|
|
||||||
|
|
||||||
DrawText("move ball with mouse and click mouse button to change color", 10, 10, 20, DARKGRAY);
|
|
||||||
DrawText("touch the screen at multiple locations to get multiple balls", 10, 30, 20, DARKGRAY);
|
|
||||||
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1,14 +1,15 @@
|
|||||||
/*******************************************************************************************
|
/*******************************************************************************************
|
||||||
*
|
*
|
||||||
* raylib example - loading thread
|
* raylib [cpre] example - loading thread
|
||||||
*
|
*
|
||||||
* NOTE: This example requires linking with pthreads library,
|
* NOTE: This example requires linking with pthreads library on MinGW,
|
||||||
* on MinGW, it can be accomplished passing -static parameter to compiler
|
* it can be accomplished passing -static parameter to compiler
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 2.5 (www.raylib.com)
|
* Example originally created with raylib 2.5, last time updated with raylib 3.0
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014-2019 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
@ -27,6 +28,9 @@ static void *LoadDataThread(void *arg); // Loading data thread function decl
|
|||||||
|
|
||||||
static int dataProgress = 0; // Data progress accumulator
|
static int dataProgress = 0; // Data progress accumulator
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
|
|||||||
@ -2,15 +2,20 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - Generate random values
|
* raylib [core] example - Generate random values
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.1 (www.raylib.com)
|
* Example originally created with raylib 1.1, last time updated with raylib 1.1
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -20,10 +25,12 @@ int main(void)
|
|||||||
|
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - generate random values");
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - generate random values");
|
||||||
|
|
||||||
int framesCounter = 0; // Variable used to count frames
|
// SetRandomSeed(0xaabbccff); // Set a custom random seed if desired, by default: "time(NULL)"
|
||||||
|
|
||||||
int randValue = GetRandomValue(-8, 5); // Get a random integer number between -8 and 5 (both included)
|
int randValue = GetRandomValue(-8, 5); // Get a random integer number between -8 and 5 (both included)
|
||||||
|
|
||||||
|
int framesCounter = 0; // Variable used to count frames
|
||||||
|
|
||||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -50,7 +57,7 @@ int main(void)
|
|||||||
|
|
||||||
DrawText("Every 2 seconds a new random value is generated:", 130, 100, 20, MAROON);
|
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();
|
EndDrawing();
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -2,17 +2,22 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - Scissor test
|
* raylib [core] example - Scissor test
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 2.5 (www.raylib.com)
|
* Example originally created with raylib 2.5, last time updated with raylib 3.0
|
||||||
* 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)
|
* Example contributed by Chris Dill (@MysteriousSpace) and reviewed by Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2019 Chris Dill (@MysteriousSpace)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2019-2022 Chris Dill (@MysteriousSpace)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -46,7 +51,7 @@ int main(void)
|
|||||||
|
|
||||||
ClearBackground(RAYWHITE);
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
if (scissorMode) BeginScissorMode(scissorArea.x, scissorArea.y, scissorArea.width, scissorArea.height);
|
if (scissorMode) BeginScissorMode((int)scissorArea.x, (int)scissorArea.y, (int)scissorArea.width, (int)scissorArea.height);
|
||||||
|
|
||||||
// Draw full screen rectangle and some text
|
// Draw full screen rectangle and some text
|
||||||
// NOTE: Only part defined by scissor area will be rendered
|
// NOTE: Only part defined by scissor area will be rendered
|
||||||
|
|||||||
122
examples/core/core_smooth_pixelperfect.c
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
/*******************************************************************************************
|
||||||
|
*
|
||||||
|
* raylib [core] example - smooth pixel-perfect camera
|
||||||
|
*
|
||||||
|
* Example originally created with raylib 3.7, last time updated with raylib 4.0
|
||||||
|
*
|
||||||
|
* Example contributed by Giancamillo Alessandroni (@NotManyIdeasDev) and
|
||||||
|
* reviewed by Ramon Santamaria (@raysan5)
|
||||||
|
*
|
||||||
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2021-2022 Giancamillo Alessandroni (@NotManyIdeasDev) and Ramon Santamaria (@raysan5)
|
||||||
|
*
|
||||||
|
********************************************************************************************/
|
||||||
|
|
||||||
|
#include "raylib.h"
|
||||||
|
|
||||||
|
#include <math.h> // Required for: sinf(), cosf()
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
// Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
const int screenWidth = 800;
|
||||||
|
const int screenHeight = 450;
|
||||||
|
|
||||||
|
const int virtualScreenWidth = 160;
|
||||||
|
const int virtualScreenHeight = 90;
|
||||||
|
|
||||||
|
const float virtualRatio = (float)screenWidth/(float)virtualScreenWidth;
|
||||||
|
|
||||||
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - smooth pixel-perfect camera");
|
||||||
|
|
||||||
|
Camera2D worldSpaceCamera = { 0 }; // Game world camera
|
||||||
|
worldSpaceCamera.zoom = 1.0f;
|
||||||
|
|
||||||
|
Camera2D screenSpaceCamera = { 0 }; // Smoothing camera
|
||||||
|
screenSpaceCamera.zoom = 1.0f;
|
||||||
|
|
||||||
|
RenderTexture2D target = LoadRenderTexture(virtualScreenWidth, virtualScreenHeight); // This is where we'll draw all our objects.
|
||||||
|
|
||||||
|
Rectangle rec01 = { 70.0f, 35.0f, 20.0f, 20.0f };
|
||||||
|
Rectangle rec02 = { 90.0f, 55.0f, 30.0f, 10.0f };
|
||||||
|
Rectangle rec03 = { 80.0f, 65.0f, 15.0f, 25.0f };
|
||||||
|
|
||||||
|
// The target's height is flipped (in the source Rectangle), due to OpenGL reasons
|
||||||
|
Rectangle sourceRec = { 0.0f, 0.0f, (float)target.texture.width, -(float)target.texture.height };
|
||||||
|
Rectangle destRec = { -virtualRatio, -virtualRatio, screenWidth + (virtualRatio*2), screenHeight + (virtualRatio*2) };
|
||||||
|
|
||||||
|
Vector2 origin = { 0.0f, 0.0f };
|
||||||
|
|
||||||
|
float rotation = 0.0f;
|
||||||
|
|
||||||
|
float cameraX = 0.0f;
|
||||||
|
float cameraY = 0.0f;
|
||||||
|
|
||||||
|
SetTargetFPS(60);
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Main game loop
|
||||||
|
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||||
|
{
|
||||||
|
// Update
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
rotation += 60.0f*GetFrameTime(); // Rotate the rectangles, 60 degrees per second
|
||||||
|
|
||||||
|
// Make the camera move to demonstrate the effect
|
||||||
|
cameraX = (sinf(GetTime())*50.0f) - 10.0f;
|
||||||
|
cameraY = cosf(GetTime())*30.0f;
|
||||||
|
|
||||||
|
// Set the camera's target to the values computed above
|
||||||
|
screenSpaceCamera.target = (Vector2){ cameraX, cameraY };
|
||||||
|
|
||||||
|
// Round worldSpace coordinates, keep decimals into screenSpace coordinates
|
||||||
|
worldSpaceCamera.target.x = (int)screenSpaceCamera.target.x;
|
||||||
|
screenSpaceCamera.target.x -= worldSpaceCamera.target.x;
|
||||||
|
screenSpaceCamera.target.x *= virtualRatio;
|
||||||
|
|
||||||
|
worldSpaceCamera.target.y = (int)screenSpaceCamera.target.y;
|
||||||
|
screenSpaceCamera.target.y -= worldSpaceCamera.target.y;
|
||||||
|
screenSpaceCamera.target.y *= virtualRatio;
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Draw
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
BeginTextureMode(target);
|
||||||
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
|
BeginMode2D(worldSpaceCamera);
|
||||||
|
DrawRectanglePro(rec01, origin, rotation, BLACK);
|
||||||
|
DrawRectanglePro(rec02, origin, -rotation, RED);
|
||||||
|
DrawRectanglePro(rec03, origin, rotation + 45.0f, BLUE);
|
||||||
|
EndMode2D();
|
||||||
|
EndTextureMode();
|
||||||
|
|
||||||
|
BeginDrawing();
|
||||||
|
ClearBackground(RED);
|
||||||
|
|
||||||
|
BeginMode2D(screenSpaceCamera);
|
||||||
|
DrawTexturePro(target.texture, sourceRec, destRec, origin, 0.0f, WHITE);
|
||||||
|
EndMode2D();
|
||||||
|
|
||||||
|
DrawText(TextFormat("Screen resolution: %ix%i", screenWidth, screenHeight), 10, 10, 20, DARKBLUE);
|
||||||
|
DrawText(TextFormat("World resolution: %ix%i", virtualScreenWidth, virtualScreenHeight), 10, 40, 20, DARKGREEN);
|
||||||
|
DrawFPS(GetScreenWidth() - 95, 10);
|
||||||
|
EndDrawing();
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
}
|
||||||
|
|
||||||
|
// De-Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
UnloadRenderTexture(target); // Unload render texture
|
||||||
|
|
||||||
|
CloseWindow(); // Close window and OpenGL context
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BIN
examples/core/core_smooth_pixelperfect.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
160
examples/core/core_split_screen.c
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
/*******************************************************************************************
|
||||||
|
*
|
||||||
|
* raylib [core] example - split screen
|
||||||
|
*
|
||||||
|
* Example originally created with raylib 3.7, last time updated with raylib 4.0
|
||||||
|
*
|
||||||
|
* Example contributed by Jeffery Myers (@JeffM2501) and reviewed by Ramon Santamaria (@raysan5)
|
||||||
|
*
|
||||||
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2021-2022 Jeffery Myers (@JeffM2501)
|
||||||
|
*
|
||||||
|
********************************************************************************************/
|
||||||
|
|
||||||
|
#include "raylib.h"
|
||||||
|
|
||||||
|
Texture2D textureGrid = { 0 };
|
||||||
|
Camera cameraPlayer1 = { 0 };
|
||||||
|
Camera cameraPlayer2 = { 0 };
|
||||||
|
|
||||||
|
// Scene drawing
|
||||||
|
void DrawScene(void)
|
||||||
|
{
|
||||||
|
int count = 5;
|
||||||
|
float spacing = 4;
|
||||||
|
|
||||||
|
// Grid of cube trees on a plane to make a "world"
|
||||||
|
DrawPlane((Vector3){ 0, 0, 0 }, (Vector2){ 50, 50 }, BEIGE); // Simple world plane
|
||||||
|
|
||||||
|
for (float x = -count*spacing; x <= count*spacing; x += spacing)
|
||||||
|
{
|
||||||
|
for (float z = -count*spacing; z <= count*spacing; z += spacing)
|
||||||
|
{
|
||||||
|
DrawCubeTexture(textureGrid, (Vector3) { x, 1.5f, z }, 1, 1, 1, GREEN);
|
||||||
|
DrawCubeTexture(textureGrid, (Vector3) { x, 0.5f, z }, 0.25f, 1, 0.25f, BROWN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw a cube at each player's position
|
||||||
|
DrawCube(cameraPlayer1.position, 1, 1, 1, RED);
|
||||||
|
DrawCube(cameraPlayer2.position, 1, 1, 1, BLUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
// Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
const int screenWidth = 800;
|
||||||
|
const int screenHeight = 450;
|
||||||
|
|
||||||
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - split screen");
|
||||||
|
|
||||||
|
// Generate a simple texture to use for trees
|
||||||
|
Image img = GenImageChecked(256, 256, 32, 32, DARKGRAY, WHITE);
|
||||||
|
textureGrid = LoadTextureFromImage(img);
|
||||||
|
UnloadImage(img);
|
||||||
|
SetTextureFilter(textureGrid, TEXTURE_FILTER_ANISOTROPIC_16X);
|
||||||
|
SetTextureWrap(textureGrid, TEXTURE_WRAP_CLAMP);
|
||||||
|
|
||||||
|
// Setup player 1 camera and screen
|
||||||
|
cameraPlayer1.fovy = 45.0f;
|
||||||
|
cameraPlayer1.up.y = 1.0f;
|
||||||
|
cameraPlayer1.target.y = 1.0f;
|
||||||
|
cameraPlayer1.position.z = -3.0f;
|
||||||
|
cameraPlayer1.position.y = 1.0f;
|
||||||
|
|
||||||
|
RenderTexture screenPlayer1 = LoadRenderTexture(screenWidth/2, screenHeight);
|
||||||
|
|
||||||
|
// Setup player two camera and screen
|
||||||
|
cameraPlayer2.fovy = 45.0f;
|
||||||
|
cameraPlayer2.up.y = 1.0f;
|
||||||
|
cameraPlayer2.target.y = 3.0f;
|
||||||
|
cameraPlayer2.position.x = -3.0f;
|
||||||
|
cameraPlayer2.position.y = 3.0f;
|
||||||
|
|
||||||
|
RenderTexture screenPlayer2 = LoadRenderTexture(screenWidth / 2, screenHeight);
|
||||||
|
|
||||||
|
// Build a flipped rectangle the size of the split view to use for drawing later
|
||||||
|
Rectangle splitScreenRect = { 0.0f, 0.0f, (float)screenPlayer1.texture.width, (float)-screenPlayer1.texture.height };
|
||||||
|
|
||||||
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Main game loop
|
||||||
|
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||||
|
{
|
||||||
|
// Update
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
// If anyone moves this frame, how far will they move based on the time since the last frame
|
||||||
|
// this moves thigns at 10 world units per second, regardless of the actual FPS
|
||||||
|
float offsetThisFrame = 10.0f*GetFrameTime();
|
||||||
|
|
||||||
|
// Move Player1 forward and backwards (no turning)
|
||||||
|
if (IsKeyDown(KEY_W))
|
||||||
|
{
|
||||||
|
cameraPlayer1.position.z += offsetThisFrame;
|
||||||
|
cameraPlayer1.target.z += offsetThisFrame;
|
||||||
|
}
|
||||||
|
else if (IsKeyDown(KEY_S))
|
||||||
|
{
|
||||||
|
cameraPlayer1.position.z -= offsetThisFrame;
|
||||||
|
cameraPlayer1.target.z -= offsetThisFrame;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Move Player2 forward and backwards (no turning)
|
||||||
|
if (IsKeyDown(KEY_UP))
|
||||||
|
{
|
||||||
|
cameraPlayer2.position.x += offsetThisFrame;
|
||||||
|
cameraPlayer2.target.x += offsetThisFrame;
|
||||||
|
}
|
||||||
|
else if (IsKeyDown(KEY_DOWN))
|
||||||
|
{
|
||||||
|
cameraPlayer2.position.x -= offsetThisFrame;
|
||||||
|
cameraPlayer2.target.x -= offsetThisFrame;
|
||||||
|
}
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Draw
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
// Draw Player1 view to the render texture
|
||||||
|
BeginTextureMode(screenPlayer1);
|
||||||
|
ClearBackground(SKYBLUE);
|
||||||
|
BeginMode3D(cameraPlayer1);
|
||||||
|
DrawScene();
|
||||||
|
EndMode3D();
|
||||||
|
DrawText("PLAYER1 W/S to move", 10, 10, 20, RED);
|
||||||
|
EndTextureMode();
|
||||||
|
|
||||||
|
// Draw Player2 view to the render texture
|
||||||
|
BeginTextureMode(screenPlayer2);
|
||||||
|
ClearBackground(SKYBLUE);
|
||||||
|
BeginMode3D(cameraPlayer2);
|
||||||
|
DrawScene();
|
||||||
|
EndMode3D();
|
||||||
|
DrawText("PLAYER2 UP/DOWN to move", 10, 10, 20, BLUE);
|
||||||
|
EndTextureMode();
|
||||||
|
|
||||||
|
// Draw both views render textures to the screen side by side
|
||||||
|
BeginDrawing();
|
||||||
|
ClearBackground(BLACK);
|
||||||
|
DrawTextureRec(screenPlayer1.texture, splitScreenRect, (Vector2){ 0, 0 }, WHITE);
|
||||||
|
DrawTextureRec(screenPlayer2.texture, splitScreenRect, (Vector2){ screenWidth/2.0f, 0 }, WHITE);
|
||||||
|
EndDrawing();
|
||||||
|
}
|
||||||
|
|
||||||
|
// De-Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
UnloadRenderTexture(screenPlayer1); // Unload render texture
|
||||||
|
UnloadRenderTexture(screenPlayer2); // Unload render texture
|
||||||
|
UnloadTexture(textureGrid); // Unload texture
|
||||||
|
|
||||||
|
CloseWindow(); // Close window and OpenGL context
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BIN
examples/core/core_split_screen.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
@ -2,18 +2,34 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - Storage save/load values
|
* raylib [core] example - Storage save/load values
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.4 (www.raylib.com)
|
* Example originally created with raylib 1.4, last time updated with raylib 4.2
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
// NOTE: Storage positions must start with 0, directly related to file memory layout
|
#include <stdlib.h> // Required for: calloc(), free()
|
||||||
typedef enum { STORAGE_SCORE = 0, STORAGE_HISCORE } StorageData;
|
|
||||||
|
|
||||||
|
#define STORAGE_DATA_FILE "storage.data" // Storage file
|
||||||
|
|
||||||
|
// NOTE: Storage positions must start with 0, directly related to file memory layout
|
||||||
|
typedef enum {
|
||||||
|
STORAGE_POSITION_SCORE = 0,
|
||||||
|
STORAGE_POSITION_HISCORE = 1
|
||||||
|
} StorageData;
|
||||||
|
|
||||||
|
// Persistent storage functions
|
||||||
|
static bool SaveStorageValue(unsigned int position, int value);
|
||||||
|
static int LoadStorageValue(unsigned int position);
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -43,14 +59,14 @@ int main(void)
|
|||||||
|
|
||||||
if (IsKeyPressed(KEY_ENTER))
|
if (IsKeyPressed(KEY_ENTER))
|
||||||
{
|
{
|
||||||
StorageSaveValue(STORAGE_SCORE, score);
|
SaveStorageValue(STORAGE_POSITION_SCORE, score);
|
||||||
StorageSaveValue(STORAGE_HISCORE, hiscore);
|
SaveStorageValue(STORAGE_POSITION_HISCORE, hiscore);
|
||||||
}
|
}
|
||||||
else if (IsKeyPressed(KEY_SPACE))
|
else if (IsKeyPressed(KEY_SPACE))
|
||||||
{
|
{
|
||||||
// NOTE: If requested position could not be found, value 0 is returned
|
// NOTE: If requested position could not be found, value 0 is returned
|
||||||
score = StorageLoadValue(STORAGE_SCORE);
|
score = LoadStorageValue(STORAGE_POSITION_SCORE);
|
||||||
hiscore = StorageLoadValue(STORAGE_HISCORE);
|
hiscore = LoadStorageValue(STORAGE_POSITION_HISCORE);
|
||||||
}
|
}
|
||||||
|
|
||||||
framesCounter++;
|
framesCounter++;
|
||||||
@ -62,10 +78,10 @@ int main(void)
|
|||||||
|
|
||||||
ClearBackground(RAYWHITE);
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
DrawText(FormatText("SCORE: %i", score), 280, 130, 40, MAROON);
|
DrawText(TextFormat("SCORE: %i", score), 280, 130, 40, MAROON);
|
||||||
DrawText(FormatText("HI-SCORE: %i", hiscore), 210, 200, 50, BLACK);
|
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 R to generate random numbers", 220, 40, 20, LIGHTGRAY);
|
||||||
DrawText("Press ENTER to SAVE values", 250, 310, 20, LIGHTGRAY);
|
DrawText("Press ENTER to SAVE values", 250, 310, 20, LIGHTGRAY);
|
||||||
@ -81,4 +97,97 @@ int main(void)
|
|||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Save integer value to storage file (to defined position)
|
||||||
|
// NOTE: Storage positions is directly related to file memory layout (4 bytes each integer)
|
||||||
|
bool SaveStorageValue(unsigned int position, int value)
|
||||||
|
{
|
||||||
|
bool success = false;
|
||||||
|
unsigned int dataSize = 0;
|
||||||
|
unsigned int newDataSize = 0;
|
||||||
|
unsigned char *fileData = LoadFileData(STORAGE_DATA_FILE, &dataSize);
|
||||||
|
unsigned char *newFileData = NULL;
|
||||||
|
|
||||||
|
if (fileData != NULL)
|
||||||
|
{
|
||||||
|
if (dataSize <= (position*sizeof(int)))
|
||||||
|
{
|
||||||
|
// Increase data size up to position and store value
|
||||||
|
newDataSize = (position + 1)*sizeof(int);
|
||||||
|
newFileData = (unsigned char *)RL_REALLOC(fileData, newDataSize);
|
||||||
|
|
||||||
|
if (newFileData != NULL)
|
||||||
|
{
|
||||||
|
// RL_REALLOC succeded
|
||||||
|
int *dataPtr = (int *)newFileData;
|
||||||
|
dataPtr[position] = value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// RL_REALLOC failed
|
||||||
|
TraceLog(LOG_WARNING, "FILEIO: [%s] Failed to realloc data (%u), position in bytes (%u) bigger than actual file size", STORAGE_DATA_FILE, dataSize, position*sizeof(int));
|
||||||
|
|
||||||
|
// We store the old size of the file
|
||||||
|
newFileData = fileData;
|
||||||
|
newDataSize = dataSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Store the old size of the file
|
||||||
|
newFileData = fileData;
|
||||||
|
newDataSize = dataSize;
|
||||||
|
|
||||||
|
// Replace value on selected position
|
||||||
|
int *dataPtr = (int *)newFileData;
|
||||||
|
dataPtr[position] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
success = SaveFileData(STORAGE_DATA_FILE, newFileData, newDataSize);
|
||||||
|
RL_FREE(newFileData);
|
||||||
|
|
||||||
|
TraceLog(LOG_INFO, "FILEIO: [%s] Saved storage value: %i", STORAGE_DATA_FILE, value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TraceLog(LOG_INFO, "FILEIO: [%s] File created successfully", STORAGE_DATA_FILE);
|
||||||
|
|
||||||
|
dataSize = (position + 1)*sizeof(int);
|
||||||
|
fileData = (unsigned char *)RL_MALLOC(dataSize);
|
||||||
|
int *dataPtr = (int *)fileData;
|
||||||
|
dataPtr[position] = value;
|
||||||
|
|
||||||
|
success = SaveFileData(STORAGE_DATA_FILE, fileData, dataSize);
|
||||||
|
UnloadFileData(fileData);
|
||||||
|
|
||||||
|
TraceLog(LOG_INFO, "FILEIO: [%s] Saved storage value: %i", STORAGE_DATA_FILE, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load integer value from storage file (from defined position)
|
||||||
|
// NOTE: If requested position could not be found, value 0 is returned
|
||||||
|
int LoadStorageValue(unsigned int position)
|
||||||
|
{
|
||||||
|
int value = 0;
|
||||||
|
unsigned int dataSize = 0;
|
||||||
|
unsigned char *fileData = LoadFileData(STORAGE_DATA_FILE, &dataSize);
|
||||||
|
|
||||||
|
if (fileData != NULL)
|
||||||
|
{
|
||||||
|
if (dataSize < (position*4)) TraceLog(LOG_WARNING, "FILEIO: [%s] Failed to find storage position: %i", STORAGE_DATA_FILE, position);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int *dataPtr = (int *)fileData;
|
||||||
|
value = dataPtr[position];
|
||||||
|
}
|
||||||
|
|
||||||
|
UnloadFileData(fileData);
|
||||||
|
|
||||||
|
TraceLog(LOG_INFO, "FILEIO: [%s] Loaded storage value: %i", STORAGE_DATA_FILE, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
@ -2,21 +2,26 @@
|
|||||||
*
|
*
|
||||||
* raylib [core] example - VR Simulator (Oculus Rift CV1 parameters)
|
* raylib [core] example - VR Simulator (Oculus Rift CV1 parameters)
|
||||||
*
|
*
|
||||||
* This example has been created using raylib 1.7 (www.raylib.com)
|
* Example originally created with raylib 2.5, last time updated with raylib 4.0
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017-2022 Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
#if defined(PLATFORM_DESKTOP)
|
#if defined(PLATFORM_DESKTOP)
|
||||||
#define GLSL_VERSION 330
|
#define GLSL_VERSION 330
|
||||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||||
#define GLSL_VERSION 100
|
#define GLSL_VERSION 100
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
// Initialization
|
// Initialization
|
||||||
@ -25,48 +30,72 @@ int main(void)
|
|||||||
const int screenHeight = 450;
|
const int screenHeight = 450;
|
||||||
|
|
||||||
// NOTE: screenWidth/screenHeight should match VR device aspect ratio
|
// NOTE: screenWidth/screenHeight should match VR device aspect ratio
|
||||||
|
|
||||||
SetConfigFlags(FLAG_MSAA_4X_HINT);
|
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - vr simulator");
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - vr simulator");
|
||||||
|
|
||||||
// Init VR simulator (Oculus Rift CV1 parameters)
|
// VR device parameters definition
|
||||||
InitVrSimulator();
|
VrDeviceInfo device = {
|
||||||
|
// Oculus Rift CV1 parameters for simulator
|
||||||
|
.hResolution = 2160, // Horizontal resolution in pixels
|
||||||
|
.vResolution = 1200, // Vertical resolution in pixels
|
||||||
|
.hScreenSize = 0.133793f, // Horizontal size in meters
|
||||||
|
.vScreenSize = 0.0669f, // Vertical size in meters
|
||||||
|
.vScreenCenter = 0.04678f, // Screen center in meters
|
||||||
|
.eyeToScreenDistance = 0.041f, // Distance between eye and display in meters
|
||||||
|
.lensSeparationDistance = 0.07f, // Lens separation distance in meters
|
||||||
|
.interpupillaryDistance = 0.07f, // IPD (distance between pupils) in meters
|
||||||
|
|
||||||
VrDeviceInfo hmd = { 0 }; // VR device parameters (head-mounted-device)
|
// NOTE: CV1 uses fresnel-hybrid-asymmetric lenses with specific compute shaders
|
||||||
|
// Following parameters are just an approximation to CV1 distortion stereo rendering
|
||||||
|
.lensDistortionValues[0] = 1.0f, // Lens distortion constant parameter 0
|
||||||
|
.lensDistortionValues[1] = 0.22f, // Lens distortion constant parameter 1
|
||||||
|
.lensDistortionValues[2] = 0.24f, // Lens distortion constant parameter 2
|
||||||
|
.lensDistortionValues[3] = 0.0f, // Lens distortion constant parameter 3
|
||||||
|
.chromaAbCorrection[0] = 0.996f, // Chromatic aberration correction parameter 0
|
||||||
|
.chromaAbCorrection[1] = -0.004f, // Chromatic aberration correction parameter 1
|
||||||
|
.chromaAbCorrection[2] = 1.014f, // Chromatic aberration correction parameter 2
|
||||||
|
.chromaAbCorrection[3] = 0.0f, // Chromatic aberration correction parameter 3
|
||||||
|
};
|
||||||
|
|
||||||
// Oculus Rift CV1 parameters for simulator
|
// Load VR stereo config for VR device parameteres (Oculus Rift CV1 parameters)
|
||||||
hmd.hResolution = 2160; // HMD horizontal resolution in pixels
|
VrStereoConfig config = LoadVrStereoConfig(device);
|
||||||
hmd.vResolution = 1200; // HMD vertical resolution in pixels
|
|
||||||
hmd.hScreenSize = 0.133793f; // HMD horizontal size in meters
|
|
||||||
hmd.vScreenSize = 0.0669f; // HMD vertical size in meters
|
|
||||||
hmd.vScreenCenter = 0.04678f; // HMD screen center in meters
|
|
||||||
hmd.eyeToScreenDistance = 0.041f; // HMD distance between eye and display in meters
|
|
||||||
hmd.lensSeparationDistance = 0.07f; // HMD lens separation distance in meters
|
|
||||||
hmd.interpupillaryDistance = 0.07f; // HMD IPD (distance between pupils) in meters
|
|
||||||
|
|
||||||
// NOTE: CV1 uses a Fresnel-hybrid-asymmetric lenses with specific distortion compute shaders.
|
|
||||||
// Following parameters are an approximation to distortion stereo rendering but results differ from actual device.
|
|
||||||
hmd.lensDistortionValues[0] = 1.0f; // HMD lens distortion constant parameter 0
|
|
||||||
hmd.lensDistortionValues[1] = 0.22f; // HMD lens distortion constant parameter 1
|
|
||||||
hmd.lensDistortionValues[2] = 0.24f; // HMD lens distortion constant parameter 2
|
|
||||||
hmd.lensDistortionValues[3] = 0.0f; // HMD lens distortion constant parameter 3
|
|
||||||
hmd.chromaAbCorrection[0] = 0.996f; // HMD chromatic aberration correction parameter 0
|
|
||||||
hmd.chromaAbCorrection[1] = -0.004f; // HMD chromatic aberration correction parameter 1
|
|
||||||
hmd.chromaAbCorrection[2] = 1.014f; // HMD chromatic aberration correction parameter 2
|
|
||||||
hmd.chromaAbCorrection[3] = 0.0f; // HMD chromatic aberration correction parameter 3
|
|
||||||
|
|
||||||
// Distortion shader (uses device lens distortion and chroma)
|
// 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
|
// Update distortion shader with lens and distortion-scale parameters
|
||||||
|
SetShaderValue(distortion, GetShaderLocation(distortion, "leftLensCenter"),
|
||||||
|
config.leftLensCenter, SHADER_UNIFORM_VEC2);
|
||||||
|
SetShaderValue(distortion, GetShaderLocation(distortion, "rightLensCenter"),
|
||||||
|
config.rightLensCenter, SHADER_UNIFORM_VEC2);
|
||||||
|
SetShaderValue(distortion, GetShaderLocation(distortion, "leftScreenCenter"),
|
||||||
|
config.leftScreenCenter, SHADER_UNIFORM_VEC2);
|
||||||
|
SetShaderValue(distortion, GetShaderLocation(distortion, "rightScreenCenter"),
|
||||||
|
config.rightScreenCenter, SHADER_UNIFORM_VEC2);
|
||||||
|
|
||||||
|
SetShaderValue(distortion, GetShaderLocation(distortion, "scale"),
|
||||||
|
config.scale, SHADER_UNIFORM_VEC2);
|
||||||
|
SetShaderValue(distortion, GetShaderLocation(distortion, "scaleIn"),
|
||||||
|
config.scaleIn, SHADER_UNIFORM_VEC2);
|
||||||
|
SetShaderValue(distortion, GetShaderLocation(distortion, "deviceWarpParam"),
|
||||||
|
device.lensDistortionValues, SHADER_UNIFORM_VEC4);
|
||||||
|
SetShaderValue(distortion, GetShaderLocation(distortion, "chromaAbParam"),
|
||||||
|
device.chromaAbCorrection, SHADER_UNIFORM_VEC4);
|
||||||
|
|
||||||
|
// Initialize framebuffer for stereo rendering
|
||||||
|
// NOTE: Screen size should match HMD aspect ratio
|
||||||
|
RenderTexture2D target = LoadRenderTexture(device.hResolution, device.vResolution);
|
||||||
|
|
||||||
|
// The target's height is flipped (in the source Rectangle), due to OpenGL reasons
|
||||||
|
Rectangle sourceRec = { 0.0f, 0.0f, (float)target.texture.width, -(float)target.texture.height };
|
||||||
|
Rectangle destRec = { 0.0f, 0.0f, (float)GetScreenWidth(), (float)GetScreenHeight() };
|
||||||
|
|
||||||
// Define the camera to look into our 3d world
|
// Define the camera to look into our 3d world
|
||||||
Camera camera = { 0 };
|
Camera camera = { 0 };
|
||||||
camera.position = (Vector3){ 5.0f, 2.0f, 5.0f }; // Camera position
|
camera.position = (Vector3){ 5.0f, 2.0f, 5.0f }; // Camera position
|
||||||
camera.target = (Vector3){ 0.0f, 2.0f, 0.0f }; // Camera looking at point
|
camera.target = (Vector3){ 0.0f, 2.0f, 0.0f }; // Camera looking at point
|
||||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
|
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector
|
||||||
camera.fovy = 60.0f; // Camera field-of-view Y
|
camera.fovy = 60.0f; // Camera field-of-view Y
|
||||||
camera.type = CAMERA_PERSPECTIVE; // Camera type
|
camera.projection = CAMERA_PERSPECTIVE; // Camera type
|
||||||
|
|
||||||
Vector3 cubePosition = { 0.0f, 0.0f, 0.0f };
|
Vector3 cubePosition = { 0.0f, 0.0f, 0.0f };
|
||||||
|
|
||||||
@ -80,43 +109,42 @@ int main(void)
|
|||||||
{
|
{
|
||||||
// Update
|
// Update
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
UpdateCamera(&camera); // Update camera (simulator mode)
|
UpdateCamera(&camera);
|
||||||
|
|
||||||
if (IsKeyPressed(KEY_SPACE)) ToggleVrMode(); // Toggle VR mode
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
BeginDrawing();
|
BeginTextureMode(target);
|
||||||
|
|
||||||
ClearBackground(RAYWHITE);
|
ClearBackground(RAYWHITE);
|
||||||
|
BeginVrStereoMode(config);
|
||||||
BeginVrDrawing();
|
|
||||||
|
|
||||||
BeginMode3D(camera);
|
BeginMode3D(camera);
|
||||||
|
|
||||||
DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, RED);
|
DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, RED);
|
||||||
DrawCubeWires(cubePosition, 2.0f, 2.0f, 2.0f, MAROON);
|
DrawCubeWires(cubePosition, 2.0f, 2.0f, 2.0f, MAROON);
|
||||||
|
|
||||||
DrawGrid(40, 1.0f);
|
DrawGrid(40, 1.0f);
|
||||||
|
|
||||||
EndMode3D();
|
EndMode3D();
|
||||||
|
EndVrStereoMode();
|
||||||
EndVrDrawing();
|
EndTextureMode();
|
||||||
|
|
||||||
|
BeginDrawing();
|
||||||
|
ClearBackground(RAYWHITE);
|
||||||
|
BeginShaderMode(distortion);
|
||||||
|
DrawTexturePro(target.texture, sourceRec, destRec, (Vector2){ 0.0f, 0.0f }, 0.0f, WHITE);
|
||||||
|
EndShaderMode();
|
||||||
DrawFPS(10, 10);
|
DrawFPS(10, 10);
|
||||||
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
|
|
||||||
// De-Initialization
|
// De-Initialization
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
UnloadShader(distortion); // Unload distortion shader
|
UnloadVrStereoConfig(config); // Unload stereo config
|
||||||
|
|
||||||
CloseVrSimulator(); // Close VR simulator
|
UnloadRenderTexture(target); // Unload stereo render fbo
|
||||||
|
UnloadShader(distortion); // Unload distortion shader
|
||||||
|
|
||||||
CloseWindow(); // Close window and OpenGL context
|
CloseWindow(); // Close window and OpenGL context
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
196
examples/core/core_window_flags.c
Normal file
@ -0,0 +1,196 @@
|
|||||||
|
/*******************************************************************************************
|
||||||
|
*
|
||||||
|
* raylib [core] example - window flags
|
||||||
|
*
|
||||||
|
* Example originally created with raylib 3.5, last time updated with raylib 3.5
|
||||||
|
*
|
||||||
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020-2022 Ramon Santamaria (@raysan5)
|
||||||
|
*
|
||||||
|
********************************************************************************************/
|
||||||
|
|
||||||
|
#include "raylib.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
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.0f, GetScreenHeight() / 2.0f };
|
||||||
|
Vector2 ballSpeed = { 5.0f, 4.0f };
|
||||||
|
float 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, (float)GetScreenWidth(), (float)GetScreenHeight() }, 4, RAYWHITE);
|
||||||
|
|
||||||
|
DrawCircleV(GetMousePosition(), 10, DARKBLUE);
|
||||||
|
|
||||||
|
DrawFPS(10, 10);
|
||||||
|
|
||||||
|
DrawText(TextFormat("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,21 +1,28 @@
|
|||||||
/*******************************************************************************************
|
/*******************************************************************************************
|
||||||
*
|
*
|
||||||
* 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)
|
* Example originally created with raylib 2.5, last time updated with raylib 4.0
|
||||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
|
||||||
*
|
*
|
||||||
* Example contributed by Anata (@anatagawa) and reviewed by Ramon Santamaria (@raysan5)
|
* Example contributed by Anata (@anatagawa) and reviewed by Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2019 Anata (@anatagawa) and Ramon Santamaria (@raysan5)
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2019-2022 Anata (@anatagawa) and Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
#define max(a, b) ((a)>(b)? (a) : (b))
|
#include "raymath.h" // Required for: Vector2Clamp()
|
||||||
#define min(a, b) ((a)<(b)? (a) : (b))
|
|
||||||
|
|
||||||
|
#define MAX(a, b) ((a)>(b)? (a) : (b))
|
||||||
|
#define MIN(a, b) ((a)<(b)? (a) : (b))
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
const int windowWidth = 800;
|
const int windowWidth = 800;
|
||||||
@ -31,59 +38,69 @@ int main(void)
|
|||||||
|
|
||||||
// Render texture initialization, used to hold the rendering result so we can easily resize it
|
// Render texture initialization, used to hold the rendering result so we can easily resize it
|
||||||
RenderTexture2D target = LoadRenderTexture(gameScreenWidth, gameScreenHeight);
|
RenderTexture2D target = LoadRenderTexture(gameScreenWidth, gameScreenHeight);
|
||||||
SetTextureFilter(target.texture, FILTER_BILINEAR); // Texture scale filter to use
|
SetTextureFilter(target.texture, TEXTURE_FILTER_BILINEAR); // Texture scale filter to use
|
||||||
|
|
||||||
Color colors[10] = { 0 };
|
Color colors[10] = { 0 };
|
||||||
for (int i = 0; i < 10; i++) colors[i] = (Color){ GetRandomValue(100, 250), GetRandomValue(50, 150), GetRandomValue(10, 100), 255 };
|
for (int i = 0; i < 10; i++) colors[i] = (Color){ GetRandomValue(100, 250), GetRandomValue(50, 150), GetRandomValue(10, 100), 255 };
|
||||||
|
|
||||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Main game loop
|
// Main game loop
|
||||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||||
{
|
{
|
||||||
// Update
|
// Update
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Compute required framebuffer scaling
|
// Compute required framebuffer scaling
|
||||||
float scale = min((float)GetScreenWidth()/gameScreenWidth, (float)GetScreenHeight()/gameScreenHeight);
|
float scale = MIN((float)GetScreenWidth()/gameScreenWidth, (float)GetScreenHeight()/gameScreenHeight);
|
||||||
|
|
||||||
if (IsKeyPressed(KEY_SPACE))
|
if (IsKeyPressed(KEY_SPACE))
|
||||||
{
|
{
|
||||||
// Recalculate random colors for the bars
|
// 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 };
|
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 = Vector2Clamp(virtualMouse, (Vector2){ 0, 0 }, (Vector2){ (float)gameScreenWidth, (float)gameScreenHeight });
|
||||||
|
|
||||||
|
// Apply the same transformation as the virtual mouse to the real mouse (i.e. to work with raygui)
|
||||||
|
//SetMouseOffset(-(GetScreenWidth() - (gameScreenWidth*scale))*0.5f, -(GetScreenHeight() - (gameScreenHeight*scale))*0.5f);
|
||||||
|
//SetMouseScale(1/scale, 1/scale);
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
// 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("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();
|
||||||
|
|
||||||
BeginDrawing();
|
BeginDrawing();
|
||||||
ClearBackground(BLACK);
|
ClearBackground(BLACK); // Clear screen background
|
||||||
|
|
||||||
// Draw everything in the render texture, note this will not be rendered on screen, yet
|
// Draw render texture to screen, properly scaled
|
||||||
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("If executed inside a window,\nyou can resize the window,\nand see the screen scaling!", 10, 25, 20, WHITE);
|
|
||||||
|
|
||||||
EndTextureMode();
|
|
||||||
|
|
||||||
// Draw RenderTexture2D to window, properly scaled
|
|
||||||
DrawTexturePro(target.texture, (Rectangle){ 0.0f, 0.0f, (float)target.texture.width, (float)-target.texture.height },
|
DrawTexturePro(target.texture, (Rectangle){ 0.0f, 0.0f, (float)target.texture.width, (float)-target.texture.height },
|
||||||
(Rectangle){ (GetScreenWidth() - ((float)gameScreenWidth*scale))*0.5, (GetScreenHeight() - ((float)gameScreenHeight*scale))*0.5,
|
(Rectangle){ (GetScreenWidth() - ((float)gameScreenWidth*scale))*0.5f, (GetScreenHeight() - ((float)gameScreenHeight*scale))*0.5f,
|
||||||
(float)gameScreenWidth*scale, (float)gameScreenHeight*scale }, (Vector2){ 0, 0 }, 0.0f, WHITE);
|
(float)gameScreenWidth*scale, (float)gameScreenHeight*scale }, (Vector2){ 0, 0 }, 0.0f, WHITE);
|
||||||
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
|
|
||||||
// De-Initialization
|
// De-Initialization
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
UnloadRenderTexture(target); // Unload render texture
|
UnloadRenderTexture(target); // Unload render texture
|
||||||
|
|
||||||
CloseWindow(); // Close window and OpenGL context
|
CloseWindow(); // Close window and OpenGL context
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 23 KiB |
77
examples/core/core_window_should_close.c
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
/*******************************************************************************************
|
||||||
|
*
|
||||||
|
* raylib [core] example - Window should close
|
||||||
|
*
|
||||||
|
* Example originally created with raylib 4.2, last time updated with raylib 4.2
|
||||||
|
*
|
||||||
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2013-2022 Ramon Santamaria (@raysan5)
|
||||||
|
*
|
||||||
|
********************************************************************************************/
|
||||||
|
|
||||||
|
#include "raylib.h"
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
// Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
const int screenWidth = 800;
|
||||||
|
const int screenHeight = 450;
|
||||||
|
|
||||||
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - window should close");
|
||||||
|
|
||||||
|
SetExitKey(KEY_NULL); // Disable KEY_ESCAPE to close window, X-button still works
|
||||||
|
|
||||||
|
bool exitWindowRequested = false; // Flag to request window to exit
|
||||||
|
bool exitWindow = false; // Flag to set window to exit
|
||||||
|
|
||||||
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Main game loop
|
||||||
|
while (!exitWindow)
|
||||||
|
{
|
||||||
|
// Update
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
// Detect if X-button or KEY_ESCAPE have been pressed to close window
|
||||||
|
if (WindowShouldClose() || IsKeyPressed(KEY_ESCAPE)) exitWindowRequested = true;
|
||||||
|
|
||||||
|
if (exitWindowRequested)
|
||||||
|
{
|
||||||
|
// A request for close window has been issued, we can save data before closing
|
||||||
|
// or just show a message asking for confirmation
|
||||||
|
|
||||||
|
if (IsKeyPressed(KEY_Y)) exitWindow = true;
|
||||||
|
else if (IsKeyPressed(KEY_N)) exitWindowRequested = false;
|
||||||
|
}
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Draw
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
BeginDrawing();
|
||||||
|
|
||||||
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
|
if (exitWindowRequested)
|
||||||
|
{
|
||||||
|
DrawRectangle(0, 100, screenWidth, 200, BLACK);
|
||||||
|
DrawText("Are you sure you want to exit program? [Y/N]", 40, 180, 30, WHITE);
|
||||||
|
}
|
||||||
|
else DrawText("Try to close the window to get confirmation message!", 120, 200, 20, LIGHTGRAY);
|
||||||
|
|
||||||
|
EndDrawing();
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
}
|
||||||
|
|
||||||
|
// De-Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
CloseWindow(); // Close window and OpenGL context
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||