koffi 0.9.4 → 0.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (823) hide show
  1. package/LICENSE.txt +661 -0
  2. package/README.md +50 -8
  3. package/package.json +24 -6
  4. package/src/call.hh +2 -1
  5. package/src/call_arm32.cc +498 -0
  6. package/src/call_arm32_fwd.S +108 -0
  7. package/src/call_arm64.cc +57 -57
  8. package/src/call_arm64_fwd.S +24 -29
  9. package/src/call_x64_sysv.cc +29 -43
  10. package/src/call_x64_win.cc +37 -40
  11. package/src/call_x86.cc +46 -59
  12. package/src/ffi.cc +29 -27
  13. package/src/ffi.hh +19 -12
  14. package/src/util.cc +58 -24
  15. package/src/util.hh +103 -19
  16. package/test/qemu/.gitkeep +0 -0
  17. package/test/registry/machines.json +112 -0
  18. package/test/registry/sha256sum.txt +21 -0
  19. package/test/test.js +493 -0
  20. package/vendor/dragonbox/CMakeLists.txt +122 -122
  21. package/vendor/dragonbox/LICENSE-Apache2-LLVM +218 -218
  22. package/vendor/dragonbox/LICENSE-Boost +23 -23
  23. package/vendor/dragonbox/README.md +277 -277
  24. package/vendor/dragonbox/cmake/dragonboxConfig.cmake +1 -1
  25. package/vendor/dragonbox/include/dragonbox/dragonbox.h +6 -2
  26. package/vendor/dragonbox/include/dragonbox/dragonbox_to_chars.h +108 -108
  27. package/vendor/dragonbox/other_files/Dragonbox.pdf +0 -0
  28. package/vendor/dragonbox/other_files/unknown_win64_vc2019.html +539 -539
  29. package/vendor/dragonbox/source/dragonbox_to_chars.cpp +303 -303
  30. package/vendor/dragonbox/subproject/3rdparty/grisu_exact/CMakeLists.txt +23 -23
  31. package/vendor/dragonbox/subproject/3rdparty/grisu_exact/fp_to_chars.cpp +238 -238
  32. package/vendor/dragonbox/subproject/3rdparty/grisu_exact/fp_to_chars.h +95 -95
  33. package/vendor/dragonbox/subproject/3rdparty/grisu_exact/grisu_exact.h +2666 -2666
  34. package/vendor/dragonbox/subproject/3rdparty/ryu/CMakeLists.txt +16 -16
  35. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/common.h +114 -114
  36. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/d2s.c +509 -509
  37. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/d2s_full_table.h +367 -367
  38. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/d2s_intrinsics.h +357 -357
  39. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/digit_table.h +35 -35
  40. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/f2s.c +345 -345
  41. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/f2s_full_table.h +55 -55
  42. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/f2s_intrinsics.h +128 -128
  43. package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/ryu.h +46 -46
  44. package/vendor/dragonbox/subproject/3rdparty/schubfach/CMakeLists.txt +21 -21
  45. package/vendor/dragonbox/subproject/3rdparty/schubfach/schubfach_32.cc +699 -699
  46. package/vendor/dragonbox/subproject/3rdparty/schubfach/schubfach_32.h +31 -31
  47. package/vendor/dragonbox/subproject/3rdparty/schubfach/schubfach_64.cc +1354 -1354
  48. package/vendor/dragonbox/subproject/3rdparty/schubfach/schubfach_64.h +31 -31
  49. package/vendor/dragonbox/subproject/3rdparty/shaded_plots/example_shaded_plots.m +68 -68
  50. package/vendor/dragonbox/subproject/3rdparty/shaded_plots/license.txt +25 -25
  51. package/vendor/dragonbox/subproject/3rdparty/shaded_plots/plot_distribution.m +92 -92
  52. package/vendor/dragonbox/subproject/3rdparty/shaded_plots/plot_distribution_prctile.m +121 -121
  53. package/vendor/dragonbox/subproject/3rdparty/shaded_plots/plot_histogram_shaded.m +99 -99
  54. package/vendor/dragonbox/subproject/3rdparty/shaded_plots/plot_shaded.m +93 -93
  55. package/vendor/dragonbox/subproject/benchmark/CMakeLists.txt +64 -64
  56. package/vendor/dragonbox/subproject/benchmark/include/benchmark.h +40 -40
  57. package/vendor/dragonbox/subproject/benchmark/matlab/plot_benchmarks.m +21 -21
  58. package/vendor/dragonbox/subproject/benchmark/matlab/plot_digit_benchmark.m +78 -78
  59. package/vendor/dragonbox/subproject/benchmark/matlab/plot_uniform_benchmark.m +95 -95
  60. package/vendor/dragonbox/subproject/benchmark/source/benchmark.cpp +237 -237
  61. package/vendor/dragonbox/subproject/benchmark/source/dragonbox.cpp +30 -30
  62. package/vendor/dragonbox/subproject/benchmark/source/grisu_exact.cpp +36 -36
  63. package/vendor/dragonbox/subproject/benchmark/source/ryu.cpp +27 -27
  64. package/vendor/dragonbox/subproject/benchmark/source/schubfach.cpp +31 -31
  65. package/vendor/dragonbox/subproject/common/CMakeLists.txt +41 -41
  66. package/vendor/dragonbox/subproject/common/include/best_rational_approx.h +96 -96
  67. package/vendor/dragonbox/subproject/common/include/big_uint.h +217 -217
  68. package/vendor/dragonbox/subproject/common/include/continued_fractions.h +173 -173
  69. package/vendor/dragonbox/subproject/common/include/good_rational_approx.h +266 -266
  70. package/vendor/dragonbox/subproject/common/include/random_float.h +182 -182
  71. package/vendor/dragonbox/subproject/common/include/rational_continued_fractions.h +56 -56
  72. package/vendor/dragonbox/subproject/common/source/big_uint.cpp +601 -601
  73. package/vendor/dragonbox/subproject/meta/CMakeLists.txt +40 -40
  74. package/vendor/dragonbox/subproject/meta/results/binary32_generated_cache.txt +81 -81
  75. package/vendor/dragonbox/subproject/meta/results/binary64_compressed_cache_error_table.txt +9 -9
  76. package/vendor/dragonbox/subproject/meta/results/binary64_generated_cache.txt +622 -622
  77. package/vendor/dragonbox/subproject/meta/source/generate_cache.cpp +126 -126
  78. package/vendor/dragonbox/subproject/meta/source/live_test.cpp +81 -81
  79. package/vendor/dragonbox/subproject/meta/source/perf_test.cpp +104 -104
  80. package/vendor/dragonbox/subproject/meta/source/sandbox.cpp +20 -20
  81. package/vendor/dragonbox/subproject/test/CMakeLists.txt +69 -69
  82. package/vendor/dragonbox/subproject/test/results/plot_required_bits.m +17 -17
  83. package/vendor/dragonbox/subproject/test/source/test_all_shorter_interval_cases.cpp +88 -88
  84. package/vendor/dragonbox/subproject/test/source/uniform_random_test.cpp +95 -95
  85. package/vendor/dragonbox/subproject/test/source/verify_cache_precision.cpp +337 -337
  86. package/vendor/dragonbox/subproject/test/source/verify_compressed_cache.cpp +154 -154
  87. package/vendor/dragonbox/subproject/test/source/verify_fast_multiplication.cpp +168 -168
  88. package/vendor/dragonbox/subproject/test/source/verify_log_computation.cpp +251 -251
  89. package/vendor/dragonbox/subproject/test/source/verify_magic_division.cpp +113 -113
  90. package/vendor/libcc/libcc.cc +36 -18
  91. package/vendor/libcc/libcc.hh +23 -1
  92. package/vendor/raylib/BINDINGS.md +123 -0
  93. package/vendor/raylib/CHANGELOG +1495 -0
  94. package/vendor/raylib/CMakeLists.txt +33 -0
  95. package/vendor/raylib/CMakeOptions.txt +87 -0
  96. package/vendor/raylib/CONTRIBUTING.md +76 -0
  97. package/vendor/raylib/CONTRIBUTORS.md +63 -0
  98. package/vendor/raylib/CONVENTIONS.md +95 -0
  99. package/vendor/raylib/HISTORY.md +364 -0
  100. package/vendor/raylib/LICENSE +16 -0
  101. package/vendor/raylib/README.md +141 -0
  102. package/vendor/raylib/ROADMAP.md +76 -0
  103. package/vendor/raylib/SPONSORS.md +68 -0
  104. package/vendor/raylib/cmake/AddIfFlagCompiles.cmake +12 -0
  105. package/vendor/raylib/cmake/BuildOptions.cmake +18 -0
  106. package/vendor/raylib/cmake/CompileDefinitions.cmake +110 -0
  107. package/vendor/raylib/cmake/CompilerFlags.cmake +79 -0
  108. package/vendor/raylib/cmake/EnumOption.cmake +9 -0
  109. package/vendor/raylib/cmake/GlfwImport.cmake +34 -0
  110. package/vendor/raylib/cmake/InstallConfigurations.cmake +29 -0
  111. package/vendor/raylib/cmake/JoinPaths.cmake +26 -0
  112. package/vendor/raylib/cmake/LibraryConfigurations.cmake +108 -0
  113. package/vendor/raylib/cmake/LibraryPathToLinkerFlags.cmake +24 -0
  114. package/vendor/raylib/cmake/PackConfigurations.cmake +13 -0
  115. package/vendor/raylib/cmake/PopulateConfigVariablesLocally.cmake +11 -0
  116. package/vendor/raylib/cmake/raylib-config-version.cmake +21 -0
  117. package/vendor/raylib/cmake/raylib-config.cmake +76 -0
  118. package/vendor/raylib/examples/CMakeLists.txt +139 -0
  119. package/vendor/raylib/examples/Makefile +565 -0
  120. package/vendor/raylib/examples/Makefile.Android +405 -0
  121. package/vendor/raylib/examples/Makefile.Web +1053 -0
  122. package/vendor/raylib/examples/README.md +203 -0
  123. package/vendor/raylib/examples/audio/audio_module_playing.c +146 -0
  124. package/vendor/raylib/examples/audio/audio_module_playing.png +0 -0
  125. package/vendor/raylib/examples/audio/audio_multichannel_sound.c +73 -0
  126. package/vendor/raylib/examples/audio/audio_multichannel_sound.png +0 -0
  127. package/vendor/raylib/examples/audio/audio_music_stream.c +93 -0
  128. package/vendor/raylib/examples/audio/audio_music_stream.png +0 -0
  129. package/vendor/raylib/examples/audio/audio_raw_stream.c +167 -0
  130. package/vendor/raylib/examples/audio/audio_raw_stream.png +0 -0
  131. package/vendor/raylib/examples/audio/audio_sound_loading.c +64 -0
  132. package/vendor/raylib/examples/audio/audio_sound_loading.png +0 -0
  133. package/vendor/raylib/examples/audio/resources/LICENSE.md +10 -0
  134. package/vendor/raylib/examples/audio/resources/coin.wav +0 -0
  135. package/vendor/raylib/examples/audio/resources/country.mp3 +0 -0
  136. package/vendor/raylib/examples/audio/resources/mini1111.xm +0 -0
  137. package/vendor/raylib/examples/audio/resources/sound.wav +0 -0
  138. package/vendor/raylib/examples/audio/resources/spring.wav +0 -0
  139. package/vendor/raylib/examples/audio/resources/target.flac +0 -0
  140. package/vendor/raylib/examples/audio/resources/target.ogg +0 -0
  141. package/vendor/raylib/examples/audio/resources/weird.wav +0 -0
  142. package/vendor/raylib/examples/build.zig +86 -0
  143. package/vendor/raylib/examples/core/core_2d_camera.c +132 -0
  144. package/vendor/raylib/examples/core/core_2d_camera.png +0 -0
  145. package/vendor/raylib/examples/core/core_2d_camera_platformer.c +293 -0
  146. package/vendor/raylib/examples/core/core_2d_camera_platformer.png +0 -0
  147. package/vendor/raylib/examples/core/core_2d_camera_smooth_pixelperfect.png +0 -0
  148. package/vendor/raylib/examples/core/core_3d_camera_first_person.c +97 -0
  149. package/vendor/raylib/examples/core/core_3d_camera_first_person.png +0 -0
  150. package/vendor/raylib/examples/core/core_3d_camera_free.c +83 -0
  151. package/vendor/raylib/examples/core/core_3d_camera_free.png +0 -0
  152. package/vendor/raylib/examples/core/core_3d_camera_mode.c +73 -0
  153. package/vendor/raylib/examples/core/core_3d_camera_mode.png +0 -0
  154. package/vendor/raylib/examples/core/core_3d_picking.c +107 -0
  155. package/vendor/raylib/examples/core/core_3d_picking.png +0 -0
  156. package/vendor/raylib/examples/core/core_basic_screen_manager.c +150 -0
  157. package/vendor/raylib/examples/core/core_basic_screen_manager.png +0 -0
  158. package/vendor/raylib/examples/core/core_basic_window.c +62 -0
  159. package/vendor/raylib/examples/core/core_basic_window.png +0 -0
  160. package/vendor/raylib/examples/core/core_basic_window_web.c +85 -0
  161. package/vendor/raylib/examples/core/core_custom_frame_control.c +125 -0
  162. package/vendor/raylib/examples/core/core_custom_frame_control.png +0 -0
  163. package/vendor/raylib/examples/core/core_custom_logging.c +84 -0
  164. package/vendor/raylib/examples/core/core_custom_logging.png +0 -0
  165. package/vendor/raylib/examples/core/core_drop_files.c +76 -0
  166. package/vendor/raylib/examples/core/core_drop_files.png +0 -0
  167. package/vendor/raylib/examples/core/core_input_gamepad.c +195 -0
  168. package/vendor/raylib/examples/core/core_input_gamepad.png +0 -0
  169. package/vendor/raylib/examples/core/core_input_gestures.c +115 -0
  170. package/vendor/raylib/examples/core/core_input_gestures.png +0 -0
  171. package/vendor/raylib/examples/core/core_input_keys.c +59 -0
  172. package/vendor/raylib/examples/core/core_input_keys.png +0 -0
  173. package/vendor/raylib/examples/core/core_input_mouse.c +65 -0
  174. package/vendor/raylib/examples/core/core_input_mouse.png +0 -0
  175. package/vendor/raylib/examples/core/core_input_mouse_wheel.c +58 -0
  176. package/vendor/raylib/examples/core/core_input_mouse_wheel.png +0 -0
  177. package/vendor/raylib/examples/core/core_input_multitouch.c +70 -0
  178. package/vendor/raylib/examples/core/core_input_multitouch.png +0 -0
  179. package/vendor/raylib/examples/core/core_loading_thread.c +147 -0
  180. package/vendor/raylib/examples/core/core_loading_thread.png +0 -0
  181. package/vendor/raylib/examples/core/core_quat_conversion.c +132 -0
  182. package/vendor/raylib/examples/core/core_quat_conversion.png +0 -0
  183. package/vendor/raylib/examples/core/core_random_values.c +67 -0
  184. package/vendor/raylib/examples/core/core_random_values.png +0 -0
  185. package/vendor/raylib/examples/core/core_scissor_test.c +71 -0
  186. package/vendor/raylib/examples/core/core_scissor_test.png +0 -0
  187. package/vendor/raylib/examples/core/core_smooth_pixelperfect.c +117 -0
  188. package/vendor/raylib/examples/core/core_smooth_pixelperfect.png +0 -0
  189. package/vendor/raylib/examples/core/core_split_screen.c +155 -0
  190. package/vendor/raylib/examples/core/core_split_screen.png +0 -0
  191. package/vendor/raylib/examples/core/core_storage_values.c +87 -0
  192. package/vendor/raylib/examples/core/core_storage_values.png +0 -0
  193. package/vendor/raylib/examples/core/core_vr_simulator.c +143 -0
  194. package/vendor/raylib/examples/core/core_vr_simulator.png +0 -0
  195. package/vendor/raylib/examples/core/core_window_flags.c +191 -0
  196. package/vendor/raylib/examples/core/core_window_flags.png +0 -0
  197. package/vendor/raylib/examples/core/core_window_letterbox.c +112 -0
  198. package/vendor/raylib/examples/core/core_window_letterbox.png +0 -0
  199. package/vendor/raylib/examples/core/core_world_screen.c +78 -0
  200. package/vendor/raylib/examples/core/core_world_screen.png +0 -0
  201. package/vendor/raylib/examples/core/resources/LICENSE.md +4 -0
  202. package/vendor/raylib/examples/core/resources/distortion100.fs +52 -0
  203. package/vendor/raylib/examples/core/resources/distortion330.fs +53 -0
  204. package/vendor/raylib/examples/core/resources/ps3.png +0 -0
  205. package/vendor/raylib/examples/core/resources/xbox.png +0 -0
  206. package/vendor/raylib/examples/examples_template.c +100 -0
  207. package/vendor/raylib/examples/models/models_animation.c +114 -0
  208. package/vendor/raylib/examples/models/models_animation.png +0 -0
  209. package/vendor/raylib/examples/models/models_billboard.c +75 -0
  210. package/vendor/raylib/examples/models/models_billboard.png +0 -0
  211. package/vendor/raylib/examples/models/models_box_collisions.c +121 -0
  212. package/vendor/raylib/examples/models/models_box_collisions.png +0 -0
  213. package/vendor/raylib/examples/models/models_cubicmap.c +87 -0
  214. package/vendor/raylib/examples/models/models_cubicmap.png +0 -0
  215. package/vendor/raylib/examples/models/models_first_person_maze.c +122 -0
  216. package/vendor/raylib/examples/models/models_first_person_maze.png +0 -0
  217. package/vendor/raylib/examples/models/models_geometric_shapes.c +80 -0
  218. package/vendor/raylib/examples/models/models_geometric_shapes.png +0 -0
  219. package/vendor/raylib/examples/models/models_heightmap.c +82 -0
  220. package/vendor/raylib/examples/models/models_heightmap.png +0 -0
  221. package/vendor/raylib/examples/models/models_loading.c +146 -0
  222. package/vendor/raylib/examples/models/models_loading.png +0 -0
  223. package/vendor/raylib/examples/models/models_loading_gltf.c +105 -0
  224. package/vendor/raylib/examples/models/models_loading_gltf.png +0 -0
  225. package/vendor/raylib/examples/models/models_loading_vox.c +130 -0
  226. package/vendor/raylib/examples/models/models_loading_vox.png +0 -0
  227. package/vendor/raylib/examples/models/models_mesh_generation.c +179 -0
  228. package/vendor/raylib/examples/models/models_mesh_generation.png +0 -0
  229. package/vendor/raylib/examples/models/models_mesh_picking.c +223 -0
  230. package/vendor/raylib/examples/models/models_mesh_picking.png +0 -0
  231. package/vendor/raylib/examples/models/models_orthographic_projection.c +99 -0
  232. package/vendor/raylib/examples/models/models_orthographic_projection.png +0 -0
  233. package/vendor/raylib/examples/models/models_rlgl_solar_system.c +172 -0
  234. package/vendor/raylib/examples/models/models_rlgl_solar_system.png +0 -0
  235. package/vendor/raylib/examples/models/models_skybox.c +262 -0
  236. package/vendor/raylib/examples/models/models_skybox.png +0 -0
  237. package/vendor/raylib/examples/models/models_waving_cubes.c +112 -0
  238. package/vendor/raylib/examples/models/models_waving_cubes.png +0 -0
  239. package/vendor/raylib/examples/models/models_yaw_pitch_roll.c +117 -0
  240. package/vendor/raylib/examples/models/models_yaw_pitch_roll.png +0 -0
  241. package/vendor/raylib/examples/models/resources/LICENSE.md +23 -0
  242. package/vendor/raylib/examples/models/resources/billboard.png +0 -0
  243. package/vendor/raylib/examples/models/resources/cubicmap.png +0 -0
  244. package/vendor/raylib/examples/models/resources/cubicmap_atlas.png +0 -0
  245. package/vendor/raylib/examples/models/resources/dresden_square_1k.hdr +0 -0
  246. package/vendor/raylib/examples/models/resources/dresden_square_2k.hdr +0 -0
  247. package/vendor/raylib/examples/models/resources/heightmap.png +0 -0
  248. package/vendor/raylib/examples/models/resources/models/gltf/AnimatedMorphCube.glb +0 -0
  249. package/vendor/raylib/examples/models/resources/models/gltf/AnimatedTriangle.gltf +118 -0
  250. package/vendor/raylib/examples/models/resources/models/gltf/BoxAnimated.glb +0 -0
  251. package/vendor/raylib/examples/models/resources/models/gltf/LICENSE +23 -0
  252. package/vendor/raylib/examples/models/resources/models/gltf/girl.glb +0 -0
  253. package/vendor/raylib/examples/models/resources/models/gltf/raylib_32x32.glb +0 -0
  254. package/vendor/raylib/examples/models/resources/models/gltf/rigged_figure.glb +0 -0
  255. package/vendor/raylib/examples/models/resources/models/gltf/vertex_colored_object.glb +0 -0
  256. package/vendor/raylib/examples/models/resources/models/iqm/guy.blend +0 -0
  257. package/vendor/raylib/examples/models/resources/models/iqm/guy.iqm +0 -0
  258. package/vendor/raylib/examples/models/resources/models/iqm/guyanim.iqm +0 -0
  259. package/vendor/raylib/examples/models/resources/models/iqm/guytex.png +0 -0
  260. package/vendor/raylib/examples/models/resources/models/iqm/vertex_colored_object.iqm +0 -0
  261. package/vendor/raylib/examples/models/resources/models/obj/bridge.obj +1725 -0
  262. package/vendor/raylib/examples/models/resources/models/obj/bridge_diffuse.png +0 -0
  263. package/vendor/raylib/examples/models/resources/models/obj/castle.obj +12919 -0
  264. package/vendor/raylib/examples/models/resources/models/obj/castle_diffuse.png +0 -0
  265. package/vendor/raylib/examples/models/resources/models/obj/cube.obj +68 -0
  266. package/vendor/raylib/examples/models/resources/models/obj/cube_diffuse.png +0 -0
  267. package/vendor/raylib/examples/models/resources/models/obj/house.obj +4564 -0
  268. package/vendor/raylib/examples/models/resources/models/obj/house_diffuse.png +0 -0
  269. package/vendor/raylib/examples/models/resources/models/obj/market.obj +7301 -0
  270. package/vendor/raylib/examples/models/resources/models/obj/market_diffuse.png +0 -0
  271. package/vendor/raylib/examples/models/resources/models/obj/plane.obj +10858 -0
  272. package/vendor/raylib/examples/models/resources/models/obj/plane_diffuse.png +0 -0
  273. package/vendor/raylib/examples/models/resources/models/obj/turret.obj +1888 -0
  274. package/vendor/raylib/examples/models/resources/models/obj/turret_diffuse.png +0 -0
  275. package/vendor/raylib/examples/models/resources/models/obj/well.obj +1030 -0
  276. package/vendor/raylib/examples/models/resources/models/obj/well_diffuse.png +0 -0
  277. package/vendor/raylib/examples/models/resources/models/vox/LICENSE +9 -0
  278. package/vendor/raylib/examples/models/resources/models/vox/chr_knight.vox +0 -0
  279. package/vendor/raylib/examples/models/resources/models/vox/chr_sword.vox +0 -0
  280. package/vendor/raylib/examples/models/resources/models/vox/monu9.vox +0 -0
  281. package/vendor/raylib/examples/models/resources/shaders/glsl100/cubemap.fs +29 -0
  282. package/vendor/raylib/examples/models/resources/shaders/glsl100/cubemap.vs +20 -0
  283. package/vendor/raylib/examples/models/resources/shaders/glsl100/skybox.fs +31 -0
  284. package/vendor/raylib/examples/models/resources/shaders/glsl100/skybox.vs +24 -0
  285. package/vendor/raylib/examples/models/resources/shaders/glsl330/cubemap.fs +30 -0
  286. package/vendor/raylib/examples/models/resources/shaders/glsl330/cubemap.vs +20 -0
  287. package/vendor/raylib/examples/models/resources/shaders/glsl330/skybox.fs +30 -0
  288. package/vendor/raylib/examples/models/resources/shaders/glsl330/skybox.vs +24 -0
  289. package/vendor/raylib/examples/models/resources/skybox.png +0 -0
  290. package/vendor/raylib/examples/models/rlights.h +183 -0
  291. package/vendor/raylib/examples/others/easings.h +263 -0
  292. package/vendor/raylib/examples/others/easings_testbed.c +227 -0
  293. package/vendor/raylib/examples/others/embedded_files_loading.c +103 -0
  294. package/vendor/raylib/examples/others/external/include/GLFW/glfw3.h +5538 -0
  295. package/vendor/raylib/examples/others/external/include/GLFW/glfw3native.h +572 -0
  296. package/vendor/raylib/examples/others/external/include/glad.h +5466 -0
  297. package/vendor/raylib/examples/others/external/lib/libglfw3.a +0 -0
  298. package/vendor/raylib/examples/others/raudio_standalone.c +152 -0
  299. package/vendor/raylib/examples/others/raylib_opengl_interop.c +152 -0
  300. package/vendor/raylib/examples/others/raylib_opengl_interop.png +0 -0
  301. package/vendor/raylib/examples/others/resources/audio/country.mp3 +0 -0
  302. package/vendor/raylib/examples/others/resources/audio/target.ogg +0 -0
  303. package/vendor/raylib/examples/others/resources/audio/weird.wav +0 -0
  304. package/vendor/raylib/examples/others/resources/audio_data.h +4893 -0
  305. package/vendor/raylib/examples/others/resources/image_data.h +9848 -0
  306. package/vendor/raylib/examples/others/resources/shaders/glsl100/point_particle.fs +16 -0
  307. package/vendor/raylib/examples/others/resources/shaders/glsl100/point_particle.vs +24 -0
  308. package/vendor/raylib/examples/others/resources/shaders/glsl330/point_particle.fs +17 -0
  309. package/vendor/raylib/examples/others/resources/shaders/glsl330/point_particle.vs +24 -0
  310. package/vendor/raylib/examples/others/resources/shaders/glsl430/gol.glsl +41 -0
  311. package/vendor/raylib/examples/others/resources/shaders/glsl430/gol_render.glsl +29 -0
  312. package/vendor/raylib/examples/others/resources/shaders/glsl430/gol_transfert.glsl +51 -0
  313. package/vendor/raylib/examples/others/rlgl_compute_shader.c +173 -0
  314. package/vendor/raylib/examples/others/rlgl_standalone.c +469 -0
  315. package/vendor/raylib/examples/physics/physics_demo.c +128 -0
  316. package/vendor/raylib/examples/physics/physics_demo.png +0 -0
  317. package/vendor/raylib/examples/physics/physics_friction.c +142 -0
  318. package/vendor/raylib/examples/physics/physics_friction.png +0 -0
  319. package/vendor/raylib/examples/physics/physics_movement.c +128 -0
  320. package/vendor/raylib/examples/physics/physics_movement.png +0 -0
  321. package/vendor/raylib/examples/physics/physics_restitution.c +129 -0
  322. package/vendor/raylib/examples/physics/physics_restitution.png +0 -0
  323. package/vendor/raylib/examples/physics/physics_shatter.c +111 -0
  324. package/vendor/raylib/examples/physics/physics_shatter.png +0 -0
  325. package/vendor/raylib/examples/raylib_compile_execute.bat +32 -0
  326. package/vendor/raylib/examples/raylib_makefile_example.bat +27 -0
  327. package/vendor/raylib/examples/shaders/resources/LICENSE.md +11 -0
  328. package/vendor/raylib/examples/shaders/resources/fudesumi.png +0 -0
  329. package/vendor/raylib/examples/shaders/resources/mask.png +0 -0
  330. package/vendor/raylib/examples/shaders/resources/models/barracks.obj +22251 -0
  331. package/vendor/raylib/examples/shaders/resources/models/barracks_diffuse.png +0 -0
  332. package/vendor/raylib/examples/shaders/resources/models/church.obj +5116 -0
  333. package/vendor/raylib/examples/shaders/resources/models/church_diffuse.png +0 -0
  334. package/vendor/raylib/examples/shaders/resources/models/watermill.obj +5316 -0
  335. package/vendor/raylib/examples/shaders/resources/models/watermill_diffuse.png +0 -0
  336. package/vendor/raylib/examples/shaders/resources/plasma.png +0 -0
  337. package/vendor/raylib/examples/shaders/resources/raysan.png +0 -0
  338. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/base.fs +23 -0
  339. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/base.vs +26 -0
  340. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/base_lighting.vs +59 -0
  341. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/base_lighting_instanced.vs +36 -0
  342. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/bloom.fs +39 -0
  343. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/blur.fs +34 -0
  344. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/color_mix.fs +26 -0
  345. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/cross_hatching.fs +47 -0
  346. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/cross_stitching.fs +57 -0
  347. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/cubes_panning.fs +60 -0
  348. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/depth.fs +26 -0
  349. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/distortion.fs +54 -0
  350. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/dream_vision.fs +37 -0
  351. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/eratosthenes.fs +60 -0
  352. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/fisheye.fs +43 -0
  353. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/fog.fs +94 -0
  354. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/grayscale.fs +25 -0
  355. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/julia_set.fs +83 -0
  356. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/lighting.fs +81 -0
  357. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/mask.fs +24 -0
  358. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/outline.fs +34 -0
  359. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/palette_switch.fs +41 -0
  360. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/pixelizer.fs +32 -0
  361. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/posterization.fs +29 -0
  362. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/predator.fs +31 -0
  363. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/raymarching.fs +431 -0
  364. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/reload.fs +39 -0
  365. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/scanlines.fs +44 -0
  366. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/sobel.fs +40 -0
  367. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/spotlight.fs +77 -0
  368. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/swirl.fs +46 -0
  369. package/vendor/raylib/examples/shaders/resources/shaders/glsl100/wave.fs +36 -0
  370. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/base.fs +22 -0
  371. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/base.vs +26 -0
  372. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/base_lighting.vs +59 -0
  373. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/bloom.fs +37 -0
  374. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/blur.fs +32 -0
  375. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/cross_hatching.fs +45 -0
  376. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/cross_stitching.fs +55 -0
  377. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/distortion.fs +52 -0
  378. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/dream_vision.fs +35 -0
  379. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/fisheye.fs +41 -0
  380. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/fog.fs +92 -0
  381. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/grayscale.fs +23 -0
  382. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/palette_switch.fs +27 -0
  383. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/pixelizer.fs +30 -0
  384. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/posterization.fs +27 -0
  385. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/predator.fs +29 -0
  386. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/scanlines.fs +42 -0
  387. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/sobel.fs +38 -0
  388. package/vendor/raylib/examples/shaders/resources/shaders/glsl120/swirl.fs +44 -0
  389. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/base.fs +25 -0
  390. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/base.vs +26 -0
  391. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/base_lighting.vs +32 -0
  392. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/base_lighting_instanced.vs +36 -0
  393. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/bloom.fs +40 -0
  394. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/blur.fs +35 -0
  395. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/color_mix.fs +27 -0
  396. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/cross_hatching.fs +48 -0
  397. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/cross_stitching.fs +59 -0
  398. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/cubes_panning.fs +61 -0
  399. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/depth.fs +27 -0
  400. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/distortion.fs +56 -0
  401. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/dream_vision.fs +34 -0
  402. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/eratosthenes.fs +59 -0
  403. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/fisheye.fs +40 -0
  404. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/fog.fs +95 -0
  405. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/grayscale.fs +26 -0
  406. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/julia_set.fs +81 -0
  407. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/lighting.fs +82 -0
  408. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/mask.fs +22 -0
  409. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/outline.fs +35 -0
  410. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/overdraw.fs +26 -0
  411. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/palette_switch.fs +30 -0
  412. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/pixelizer.fs +33 -0
  413. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/posterization.fs +31 -0
  414. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/predator.fs +32 -0
  415. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/raymarching.fs +430 -0
  416. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/reload.fs +40 -0
  417. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/scanlines.fs +49 -0
  418. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/sobel.fs +41 -0
  419. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/spotlight.fs +65 -0
  420. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/swirl.fs +47 -0
  421. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/wave.fs +37 -0
  422. package/vendor/raylib/examples/shaders/resources/space.png +0 -0
  423. package/vendor/raylib/examples/shaders/resources/texel_checker.png +0 -0
  424. package/vendor/raylib/examples/shaders/rlights.h +183 -0
  425. package/vendor/raylib/examples/shaders/shaders_basic_lighting.c +152 -0
  426. package/vendor/raylib/examples/shaders/shaders_basic_lighting.png +0 -0
  427. package/vendor/raylib/examples/shaders/shaders_custom_uniform.c +127 -0
  428. package/vendor/raylib/examples/shaders/shaders_custom_uniform.png +0 -0
  429. package/vendor/raylib/examples/shaders/shaders_eratosthenes.c +92 -0
  430. package/vendor/raylib/examples/shaders/shaders_eratosthenes.png +0 -0
  431. package/vendor/raylib/examples/shaders/shaders_fog.c +160 -0
  432. package/vendor/raylib/examples/shaders/shaders_fog.png +0 -0
  433. package/vendor/raylib/examples/shaders/shaders_hot_reloading.c +130 -0
  434. package/vendor/raylib/examples/shaders/shaders_hot_reloading.png +0 -0
  435. package/vendor/raylib/examples/shaders/shaders_julia_set.c +191 -0
  436. package/vendor/raylib/examples/shaders/shaders_julia_set.png +0 -0
  437. package/vendor/raylib/examples/shaders/shaders_mesh_instancing.c +224 -0
  438. package/vendor/raylib/examples/shaders/shaders_mesh_instancing.png +0 -0
  439. package/vendor/raylib/examples/shaders/shaders_model_shader.c +103 -0
  440. package/vendor/raylib/examples/shaders/shaders_model_shader.png +0 -0
  441. package/vendor/raylib/examples/shaders/shaders_multi_sample2d.c +105 -0
  442. package/vendor/raylib/examples/shaders/shaders_multi_sample2d.png +0 -0
  443. package/vendor/raylib/examples/shaders/shaders_palette_switch.c +147 -0
  444. package/vendor/raylib/examples/shaders/shaders_palette_switch.png +0 -0
  445. package/vendor/raylib/examples/shaders/shaders_postprocessing.c +170 -0
  446. package/vendor/raylib/examples/shaders/shaders_postprocessing.png +0 -0
  447. package/vendor/raylib/examples/shaders/shaders_raymarching.c +113 -0
  448. package/vendor/raylib/examples/shaders/shaders_raymarching.png +0 -0
  449. package/vendor/raylib/examples/shaders/shaders_shapes_textures.c +116 -0
  450. package/vendor/raylib/examples/shaders/shaders_shapes_textures.png +0 -0
  451. package/vendor/raylib/examples/shaders/shaders_simple_mask.c +144 -0
  452. package/vendor/raylib/examples/shaders/shaders_simple_mask.png +0 -0
  453. package/vendor/raylib/examples/shaders/shaders_spotlight.c +254 -0
  454. package/vendor/raylib/examples/shaders/shaders_spotlight.png +0 -0
  455. package/vendor/raylib/examples/shaders/shaders_texture_drawing.c +80 -0
  456. package/vendor/raylib/examples/shaders/shaders_texture_drawing.png +0 -0
  457. package/vendor/raylib/examples/shaders/shaders_texture_outline.c +97 -0
  458. package/vendor/raylib/examples/shaders/shaders_texture_outline.png +0 -0
  459. package/vendor/raylib/examples/shaders/shaders_texture_waves.c +110 -0
  460. package/vendor/raylib/examples/shaders/shaders_texture_waves.png +0 -0
  461. package/vendor/raylib/examples/shapes/shapes_basic_shapes.c +78 -0
  462. package/vendor/raylib/examples/shapes/shapes_basic_shapes.png +0 -0
  463. package/vendor/raylib/examples/shapes/shapes_bouncing_ball.c +76 -0
  464. package/vendor/raylib/examples/shapes/shapes_bouncing_ball.png +0 -0
  465. package/vendor/raylib/examples/shapes/shapes_collision_area.c +108 -0
  466. package/vendor/raylib/examples/shapes/shapes_collision_area.png +0 -0
  467. package/vendor/raylib/examples/shapes/shapes_colors_palette.c +99 -0
  468. package/vendor/raylib/examples/shapes/shapes_colors_palette.png +0 -0
  469. package/vendor/raylib/examples/shapes/shapes_draw_circle_sector.c +83 -0
  470. package/vendor/raylib/examples/shapes/shapes_draw_circle_sector.png +0 -0
  471. package/vendor/raylib/examples/shapes/shapes_draw_rectangle_rounded.c +89 -0
  472. package/vendor/raylib/examples/shapes/shapes_draw_rectangle_rounded.png +0 -0
  473. package/vendor/raylib/examples/shapes/shapes_draw_ring.c +96 -0
  474. package/vendor/raylib/examples/shapes/shapes_draw_ring.png +0 -0
  475. package/vendor/raylib/examples/shapes/shapes_easings_ball_anim.c +110 -0
  476. package/vendor/raylib/examples/shapes/shapes_easings_ball_anim.png +0 -0
  477. package/vendor/raylib/examples/shapes/shapes_easings_box_anim.c +136 -0
  478. package/vendor/raylib/examples/shapes/shapes_easings_box_anim.png +0 -0
  479. package/vendor/raylib/examples/shapes/shapes_easings_rectangle_array.c +118 -0
  480. package/vendor/raylib/examples/shapes/shapes_easings_rectangle_array.png +0 -0
  481. package/vendor/raylib/examples/shapes/shapes_following_eyes.c +104 -0
  482. package/vendor/raylib/examples/shapes/shapes_following_eyes.png +0 -0
  483. package/vendor/raylib/examples/shapes/shapes_lines_bezier.c +59 -0
  484. package/vendor/raylib/examples/shapes/shapes_lines_bezier.png +0 -0
  485. package/vendor/raylib/examples/shapes/shapes_logo_raylib.c +56 -0
  486. package/vendor/raylib/examples/shapes/shapes_logo_raylib.png +0 -0
  487. package/vendor/raylib/examples/shapes/shapes_logo_raylib_anim.c +160 -0
  488. package/vendor/raylib/examples/shapes/shapes_logo_raylib_anim.png +0 -0
  489. package/vendor/raylib/examples/shapes/shapes_rectangle_scaling.c +94 -0
  490. package/vendor/raylib/examples/shapes/shapes_rectangle_scaling.png +0 -0
  491. package/vendor/raylib/examples/text/resources/KAISG.ttf +0 -0
  492. package/vendor/raylib/examples/text/resources/LICENSE.md +20 -0
  493. package/vendor/raylib/examples/text/resources/anonymous_pro_bold.ttf +0 -0
  494. package/vendor/raylib/examples/text/resources/custom_alagard.png +0 -0
  495. package/vendor/raylib/examples/text/resources/custom_jupiter_crash.png +0 -0
  496. package/vendor/raylib/examples/text/resources/custom_mecha.png +0 -0
  497. package/vendor/raylib/examples/text/resources/dejavu.fnt +1115 -0
  498. package/vendor/raylib/examples/text/resources/dejavu.png +0 -0
  499. package/vendor/raylib/examples/text/resources/fonts/alagard.png +0 -0
  500. package/vendor/raylib/examples/text/resources/fonts/alpha_beta.png +0 -0
  501. package/vendor/raylib/examples/text/resources/fonts/jupiter_crash.png +0 -0
  502. package/vendor/raylib/examples/text/resources/fonts/mecha.png +0 -0
  503. package/vendor/raylib/examples/text/resources/fonts/pixantiqua.png +0 -0
  504. package/vendor/raylib/examples/text/resources/fonts/pixelplay.png +0 -0
  505. package/vendor/raylib/examples/text/resources/fonts/romulus.png +0 -0
  506. package/vendor/raylib/examples/text/resources/fonts/setback.png +0 -0
  507. package/vendor/raylib/examples/text/resources/noto_cjk.fnt +580 -0
  508. package/vendor/raylib/examples/text/resources/noto_cjk.png +0 -0
  509. package/vendor/raylib/examples/text/resources/pixantiqua.fnt +188 -0
  510. package/vendor/raylib/examples/text/resources/pixantiqua.png +0 -0
  511. package/vendor/raylib/examples/text/resources/pixantiqua.ttf +0 -0
  512. package/vendor/raylib/examples/text/resources/shaders/glsl100/alpha_discard.fs +20 -0
  513. package/vendor/raylib/examples/text/resources/shaders/glsl100/sdf.fs +25 -0
  514. package/vendor/raylib/examples/text/resources/shaders/glsl330/alpha_discard.fs +19 -0
  515. package/vendor/raylib/examples/text/resources/shaders/glsl330/sdf.fs +26 -0
  516. package/vendor/raylib/examples/text/resources/symbola.fnt +191 -0
  517. package/vendor/raylib/examples/text/resources/symbola.png +0 -0
  518. package/vendor/raylib/examples/text/text_draw_3d.c +739 -0
  519. package/vendor/raylib/examples/text/text_draw_3d.png +0 -0
  520. package/vendor/raylib/examples/text/text_font_filters.c +134 -0
  521. package/vendor/raylib/examples/text/text_font_filters.png +0 -0
  522. package/vendor/raylib/examples/text/text_font_loading.c +91 -0
  523. package/vendor/raylib/examples/text/text_font_loading.png +0 -0
  524. package/vendor/raylib/examples/text/text_font_sdf.c +141 -0
  525. package/vendor/raylib/examples/text/text_font_sdf.png +0 -0
  526. package/vendor/raylib/examples/text/text_font_spritefont.c +85 -0
  527. package/vendor/raylib/examples/text/text_font_spritefont.png +0 -0
  528. package/vendor/raylib/examples/text/text_format_text.c +62 -0
  529. package/vendor/raylib/examples/text/text_format_text.png +0 -0
  530. package/vendor/raylib/examples/text/text_input_box.c +127 -0
  531. package/vendor/raylib/examples/text/text_input_box.png +0 -0
  532. package/vendor/raylib/examples/text/text_raylib_fonts.c +105 -0
  533. package/vendor/raylib/examples/text/text_raylib_fonts.png +0 -0
  534. package/vendor/raylib/examples/text/text_rectangle_bounds.c +264 -0
  535. package/vendor/raylib/examples/text/text_rectangle_bounds.png +0 -0
  536. package/vendor/raylib/examples/text/text_unicode.c +465 -0
  537. package/vendor/raylib/examples/text/text_unicode.png +0 -0
  538. package/vendor/raylib/examples/text/text_writing_anim.c +62 -0
  539. package/vendor/raylib/examples/text/text_writing_anim.png +0 -0
  540. package/vendor/raylib/examples/textures/resources/KAISG.ttf +0 -0
  541. package/vendor/raylib/examples/textures/resources/LICENSE.md +18 -0
  542. package/vendor/raylib/examples/textures/resources/boom.wav +0 -0
  543. package/vendor/raylib/examples/textures/resources/button.png +0 -0
  544. package/vendor/raylib/examples/textures/resources/buttonfx.wav +0 -0
  545. package/vendor/raylib/examples/textures/resources/cat.png +0 -0
  546. package/vendor/raylib/examples/textures/resources/custom_jupiter_crash.png +0 -0
  547. package/vendor/raylib/examples/textures/resources/cyberpunk_street_background.png +0 -0
  548. package/vendor/raylib/examples/textures/resources/cyberpunk_street_foreground.png +0 -0
  549. package/vendor/raylib/examples/textures/resources/cyberpunk_street_midground.png +0 -0
  550. package/vendor/raylib/examples/textures/resources/explosion.png +0 -0
  551. package/vendor/raylib/examples/textures/resources/fudesumi.png +0 -0
  552. package/vendor/raylib/examples/textures/resources/fudesumi.raw +0 -0
  553. package/vendor/raylib/examples/textures/resources/ninepatch_button.png +0 -0
  554. package/vendor/raylib/examples/textures/resources/parrots.png +0 -0
  555. package/vendor/raylib/examples/textures/resources/patterns.png +0 -0
  556. package/vendor/raylib/examples/textures/resources/raylib_logo.png +0 -0
  557. package/vendor/raylib/examples/textures/resources/scarfy.png +0 -0
  558. package/vendor/raylib/examples/textures/resources/spark_flame.png +0 -0
  559. package/vendor/raylib/examples/textures/resources/wabbit_alpha.png +0 -0
  560. package/vendor/raylib/examples/textures/textures_background_scrolling.c +87 -0
  561. package/vendor/raylib/examples/textures/textures_background_scrolling.png +0 -0
  562. package/vendor/raylib/examples/textures/textures_blend_modes.c +93 -0
  563. package/vendor/raylib/examples/textures/textures_blend_modes.png +0 -0
  564. package/vendor/raylib/examples/textures/textures_bunnymark.c +120 -0
  565. package/vendor/raylib/examples/textures/textures_bunnymark.png +0 -0
  566. package/vendor/raylib/examples/textures/textures_draw_tiled.c +165 -0
  567. package/vendor/raylib/examples/textures/textures_draw_tiled.png +0 -0
  568. package/vendor/raylib/examples/textures/textures_image_drawing.c +91 -0
  569. package/vendor/raylib/examples/textures/textures_image_drawing.png +0 -0
  570. package/vendor/raylib/examples/textures/textures_image_generation.c +102 -0
  571. package/vendor/raylib/examples/textures/textures_image_generation.png +0 -0
  572. package/vendor/raylib/examples/textures/textures_image_loading.c +64 -0
  573. package/vendor/raylib/examples/textures/textures_image_loading.png +0 -0
  574. package/vendor/raylib/examples/textures/textures_image_processing.c +169 -0
  575. package/vendor/raylib/examples/textures/textures_image_processing.png +0 -0
  576. package/vendor/raylib/examples/textures/textures_image_text.c +83 -0
  577. package/vendor/raylib/examples/textures/textures_image_text.png +0 -0
  578. package/vendor/raylib/examples/textures/textures_logo_raylib.c +57 -0
  579. package/vendor/raylib/examples/textures/textures_logo_raylib.png +0 -0
  580. package/vendor/raylib/examples/textures/textures_mouse_painting.c +221 -0
  581. package/vendor/raylib/examples/textures/textures_mouse_painting.png +0 -0
  582. package/vendor/raylib/examples/textures/textures_npatch_drawing.c +109 -0
  583. package/vendor/raylib/examples/textures/textures_npatch_drawing.png +0 -0
  584. package/vendor/raylib/examples/textures/textures_particles_blending.c +135 -0
  585. package/vendor/raylib/examples/textures/textures_particles_blending.png +0 -0
  586. package/vendor/raylib/examples/textures/textures_polygon.c +100 -0
  587. package/vendor/raylib/examples/textures/textures_polygon.png +0 -0
  588. package/vendor/raylib/examples/textures/textures_raw_data.c +99 -0
  589. package/vendor/raylib/examples/textures/textures_raw_data.png +0 -0
  590. package/vendor/raylib/examples/textures/textures_rectangle.c +99 -0
  591. package/vendor/raylib/examples/textures/textures_rectangle.png +0 -0
  592. package/vendor/raylib/examples/textures/textures_sprite_button.c +97 -0
  593. package/vendor/raylib/examples/textures/textures_sprite_button.png +0 -0
  594. package/vendor/raylib/examples/textures/textures_sprite_explosion.c +120 -0
  595. package/vendor/raylib/examples/textures/textures_sprite_explosion.png +0 -0
  596. package/vendor/raylib/examples/textures/textures_srcrec_dstrec.c +82 -0
  597. package/vendor/raylib/examples/textures/textures_srcrec_dstrec.png +0 -0
  598. package/vendor/raylib/examples/textures/textures_to_image.c +68 -0
  599. package/vendor/raylib/examples/textures/textures_to_image.png +0 -0
  600. package/vendor/raylib/logo/raylib.ico +0 -0
  601. package/vendor/raylib/logo/raylib_128x128.png +0 -0
  602. package/vendor/raylib/logo/raylib_144x144.png +0 -0
  603. package/vendor/raylib/logo/raylib_16x16.png +0 -0
  604. package/vendor/raylib/logo/raylib_180x180.png +0 -0
  605. package/vendor/raylib/logo/raylib_24x24.png +0 -0
  606. package/vendor/raylib/logo/raylib_256x256.png +0 -0
  607. package/vendor/raylib/logo/raylib_32x32.png +0 -0
  608. package/vendor/raylib/logo/raylib_36x36.png +0 -0
  609. package/vendor/raylib/logo/raylib_48x48.png +0 -0
  610. package/vendor/raylib/logo/raylib_512x512.png +0 -0
  611. package/vendor/raylib/logo/raylib_64x64.png +0 -0
  612. package/vendor/raylib/logo/raylib_72x72.png +0 -0
  613. package/vendor/raylib/logo/raylib_96x96.png +0 -0
  614. package/vendor/raylib/logo/raylib_logo_animation.gif +0 -0
  615. package/vendor/raylib/parser/LICENSE +16 -0
  616. package/vendor/raylib/parser/README.md +63 -0
  617. package/vendor/raylib/parser/raylib_api.json +6668 -0
  618. package/vendor/raylib/parser/raylib_api.txt +3568 -0
  619. package/vendor/raylib/parser/raylib_api.xml +2509 -0
  620. package/vendor/raylib/parser/raylib_parser.c +1003 -0
  621. package/vendor/raylib/projects/4coder/Makefile +401 -0
  622. package/vendor/raylib/projects/4coder/Makefile.Android +300 -0
  623. package/vendor/raylib/projects/4coder/main.c +39 -0
  624. package/vendor/raylib/projects/4coder/project.4coder +54 -0
  625. package/vendor/raylib/projects/Builder/README.md +24 -0
  626. package/vendor/raylib/projects/Builder/examples/README.md +1 -0
  627. package/vendor/raylib/projects/Builder/examples/meson.build +25 -0
  628. package/vendor/raylib/projects/Builder/meson.build +25 -0
  629. package/vendor/raylib/projects/CMake/CMakeLists.txt +44 -0
  630. package/vendor/raylib/projects/CMake/core_basic_window.c +62 -0
  631. package/vendor/raylib/projects/CodeBlocks/README.md +22 -0
  632. package/vendor/raylib/projects/CodeBlocks/compiler_settings.png +0 -0
  633. package/vendor/raylib/projects/CodeBlocks/core_basic_window.c +58 -0
  634. package/vendor/raylib/projects/CodeBlocks/core_basic_window.cbp +137 -0
  635. package/vendor/raylib/projects/Geany/core_basic_window.c +52 -0
  636. package/vendor/raylib/projects/Geany/raylib.c.tags +452 -0
  637. package/vendor/raylib/projects/Geany/raylib_compile_execute.bat +21 -0
  638. package/vendor/raylib/projects/Geany/raylib_compile_sources.bat +42 -0
  639. package/vendor/raylib/projects/Geany/raylib_project.geany +41 -0
  640. package/vendor/raylib/projects/Notepad++/README.md +19 -0
  641. package/vendor/raylib/projects/Notepad++/c_raylib.xml +3104 -0
  642. package/vendor/raylib/projects/Notepad++/npes_saved_mingw.txt +0 -0
  643. package/vendor/raylib/projects/Notepad++/npes_saved_tcc.txt +0 -0
  644. package/vendor/raylib/projects/Notepad++/npes_saved_w64devkit.txt +0 -0
  645. package/vendor/raylib/projects/Notepad++/npes_saved_zig.txt +0 -0
  646. package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_npp.xml +3060 -0
  647. package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_npp_parser.c +150 -0
  648. package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h +631 -0
  649. package/vendor/raylib/projects/README.md +18 -0
  650. package/vendor/raylib/projects/SublimeText/README.md +13 -0
  651. package/vendor/raylib/projects/SublimeText/raylib.sublime-build +13 -0
  652. package/vendor/raylib/projects/SublimeText/raylib.sublime-project +8 -0
  653. package/vendor/raylib/projects/VS2019/raylib/raylib.rc +0 -0
  654. package/vendor/raylib/projects/VS2019/raylib/resource.h +14 -0
  655. package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/android_native_app_glue.c +437 -0
  656. package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/android_native_app_glue.h +344 -0
  657. package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c +64 -0
  658. package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.Packaging/AndroidManifest.xml +22 -0
  659. package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.Packaging/build.xml +90 -0
  660. package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.Packaging/project.properties +3 -0
  661. package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.Packaging/raylib_android.Packaging.androidproj +134 -0
  662. package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.Packaging/res/values/strings.xml +4 -0
  663. package/vendor/raylib/projects/VSCode/.vscode/c_cpp_properties.json +63 -0
  664. package/vendor/raylib/projects/VSCode/.vscode/launch.json +60 -0
  665. package/vendor/raylib/projects/VSCode/.vscode/settings.json +11 -0
  666. package/vendor/raylib/projects/VSCode/.vscode/tasks.json +71 -0
  667. package/vendor/raylib/projects/VSCode/Makefile +408 -0
  668. package/vendor/raylib/projects/VSCode/Makefile.Android +300 -0
  669. package/vendor/raylib/projects/VSCode/main.c +83 -0
  670. package/vendor/raylib/projects/VSCode/main.code-workspace +16 -0
  671. package/vendor/raylib/projects/scripts/README.md +68 -0
  672. package/vendor/raylib/projects/scripts/build-linux.sh +169 -0
  673. package/vendor/raylib/projects/scripts/build-osx.sh +171 -0
  674. package/vendor/raylib/projects/scripts/build-rpi.sh +169 -0
  675. package/vendor/raylib/projects/scripts/build-windows.bat +219 -0
  676. package/vendor/raylib/projects/scripts/core_basic_window.c +61 -0
  677. package/vendor/raylib/raylib.pc.in +13 -0
  678. package/vendor/raylib/src/CMakeLists.txt +121 -0
  679. package/vendor/raylib/src/Makefile +696 -0
  680. package/vendor/raylib/src/build.zig +60 -0
  681. package/vendor/raylib/src/config.h +230 -0
  682. package/vendor/raylib/src/external/cgltf.h +6501 -0
  683. package/vendor/raylib/src/external/dirent.h +183 -0
  684. package/vendor/raylib/src/external/dr_flac.h +12269 -0
  685. package/vendor/raylib/src/external/dr_mp3.h +4787 -0
  686. package/vendor/raylib/src/external/dr_wav.h +8019 -0
  687. package/vendor/raylib/src/external/glad.h +8640 -0
  688. package/vendor/raylib/src/external/glfw/.mailmap +10 -0
  689. package/vendor/raylib/src/external/glfw/CMake/GenerateMappings.cmake +33 -0
  690. package/vendor/raylib/src/external/glfw/CMake/Info.plist.in +38 -0
  691. package/vendor/raylib/src/external/glfw/CMake/MacOSXBundleInfo.plist.in +38 -0
  692. package/vendor/raylib/src/external/glfw/CMake/cmake_uninstall.cmake.in +29 -0
  693. package/vendor/raylib/src/external/glfw/CMake/glfw3.pc.in +13 -0
  694. package/vendor/raylib/src/external/glfw/CMake/glfw3Config.cmake.in +3 -0
  695. package/vendor/raylib/src/external/glfw/CMake/i686-w64-mingw32-clang.cmake +13 -0
  696. package/vendor/raylib/src/external/glfw/CMake/i686-w64-mingw32.cmake +13 -0
  697. package/vendor/raylib/src/external/glfw/CMake/modules/FindEpollShim.cmake +17 -0
  698. package/vendor/raylib/src/external/glfw/CMake/modules/FindOSMesa.cmake +18 -0
  699. package/vendor/raylib/src/external/glfw/CMake/modules/FindWaylandProtocols.cmake +26 -0
  700. package/vendor/raylib/src/external/glfw/CMake/modules/FindXKBCommon.cmake +34 -0
  701. package/vendor/raylib/src/external/glfw/CMake/x86_64-w64-mingw32-clang.cmake +13 -0
  702. package/vendor/raylib/src/external/glfw/CMake/x86_64-w64-mingw32.cmake +13 -0
  703. package/vendor/raylib/src/external/glfw/CMakeLists.txt +323 -0
  704. package/vendor/raylib/src/external/glfw/LICENSE.md +23 -0
  705. package/vendor/raylib/src/external/glfw/README.md +477 -0
  706. package/vendor/raylib/src/external/glfw/deps/getopt.c +230 -0
  707. package/vendor/raylib/src/external/glfw/deps/getopt.h +57 -0
  708. package/vendor/raylib/src/external/glfw/deps/glad/gl.h +3840 -0
  709. package/vendor/raylib/src/external/glfw/deps/glad/khrplatform.h +282 -0
  710. package/vendor/raylib/src/external/glfw/deps/glad/vk_platform.h +92 -0
  711. package/vendor/raylib/src/external/glfw/deps/glad/vulkan.h +3480 -0
  712. package/vendor/raylib/src/external/glfw/deps/glad_gl.c +1791 -0
  713. package/vendor/raylib/src/external/glfw/deps/glad_vulkan.c +593 -0
  714. package/vendor/raylib/src/external/glfw/deps/mingw/_mingw_dxhelper.h +117 -0
  715. package/vendor/raylib/src/external/glfw/deps/mingw/dinput.h +2467 -0
  716. package/vendor/raylib/src/external/glfw/deps/mingw/xinput.h +239 -0
  717. package/vendor/raylib/src/external/glfw/deps/vs2008/stdint.h +247 -0
  718. package/vendor/raylib/src/external/glfw/include/GLFW/glfw3.h +6075 -0
  719. package/vendor/raylib/src/external/glfw/include/GLFW/glfw3native.h +530 -0
  720. package/vendor/raylib/src/external/glfw/src/CMakeLists.txt +246 -0
  721. package/vendor/raylib/src/external/glfw/src/cocoa_init.m +620 -0
  722. package/vendor/raylib/src/external/glfw/src/cocoa_joystick.h +46 -0
  723. package/vendor/raylib/src/external/glfw/src/cocoa_joystick.m +483 -0
  724. package/vendor/raylib/src/external/glfw/src/cocoa_monitor.m +631 -0
  725. package/vendor/raylib/src/external/glfw/src/cocoa_platform.h +206 -0
  726. package/vendor/raylib/src/external/glfw/src/cocoa_time.c +62 -0
  727. package/vendor/raylib/src/external/glfw/src/cocoa_window.m +1923 -0
  728. package/vendor/raylib/src/external/glfw/src/context.c +756 -0
  729. package/vendor/raylib/src/external/glfw/src/egl_context.c +846 -0
  730. package/vendor/raylib/src/external/glfw/src/egl_context.h +229 -0
  731. package/vendor/raylib/src/external/glfw/src/glfw.rc.in +30 -0
  732. package/vendor/raylib/src/external/glfw/src/glfw_config.h.in +58 -0
  733. package/vendor/raylib/src/external/glfw/src/glx_context.c +699 -0
  734. package/vendor/raylib/src/external/glfw/src/glx_context.h +181 -0
  735. package/vendor/raylib/src/external/glfw/src/init.c +357 -0
  736. package/vendor/raylib/src/external/glfw/src/input.c +1406 -0
  737. package/vendor/raylib/src/external/glfw/src/internal.h +799 -0
  738. package/vendor/raylib/src/external/glfw/src/linux_joystick.c +428 -0
  739. package/vendor/raylib/src/external/glfw/src/linux_joystick.h +59 -0
  740. package/vendor/raylib/src/external/glfw/src/mappings.h +1550 -0
  741. package/vendor/raylib/src/external/glfw/src/mappings.h.in +73 -0
  742. package/vendor/raylib/src/external/glfw/src/monitor.c +542 -0
  743. package/vendor/raylib/src/external/glfw/src/nsgl_context.h +66 -0
  744. package/vendor/raylib/src/external/glfw/src/nsgl_context.m +369 -0
  745. package/vendor/raylib/src/external/glfw/src/null_init.c +57 -0
  746. package/vendor/raylib/src/external/glfw/src/null_joystick.c +53 -0
  747. package/vendor/raylib/src/external/glfw/src/null_joystick.h +31 -0
  748. package/vendor/raylib/src/external/glfw/src/null_monitor.c +159 -0
  749. package/vendor/raylib/src/external/glfw/src/null_platform.h +89 -0
  750. package/vendor/raylib/src/external/glfw/src/null_window.c +670 -0
  751. package/vendor/raylib/src/external/glfw/src/osmesa_context.c +372 -0
  752. package/vendor/raylib/src/external/glfw/src/osmesa_context.h +90 -0
  753. package/vendor/raylib/src/external/glfw/src/posix_thread.c +105 -0
  754. package/vendor/raylib/src/external/glfw/src/posix_thread.h +51 -0
  755. package/vendor/raylib/src/external/glfw/src/posix_time.c +90 -0
  756. package/vendor/raylib/src/external/glfw/src/posix_time.h +44 -0
  757. package/vendor/raylib/src/external/glfw/src/vulkan.c +332 -0
  758. package/vendor/raylib/src/external/glfw/src/wgl_context.c +798 -0
  759. package/vendor/raylib/src/external/glfw/src/wgl_context.h +160 -0
  760. package/vendor/raylib/src/external/glfw/src/win32_init.c +636 -0
  761. package/vendor/raylib/src/external/glfw/src/win32_joystick.c +753 -0
  762. package/vendor/raylib/src/external/glfw/src/win32_joystick.h +53 -0
  763. package/vendor/raylib/src/external/glfw/src/win32_monitor.c +537 -0
  764. package/vendor/raylib/src/external/glfw/src/win32_platform.h +462 -0
  765. package/vendor/raylib/src/external/glfw/src/win32_thread.c +99 -0
  766. package/vendor/raylib/src/external/glfw/src/win32_time.c +76 -0
  767. package/vendor/raylib/src/external/glfw/src/win32_window.c +2405 -0
  768. package/vendor/raylib/src/external/glfw/src/window.c +1114 -0
  769. package/vendor/raylib/src/external/glfw/src/wl_init.c +1310 -0
  770. package/vendor/raylib/src/external/glfw/src/wl_monitor.c +231 -0
  771. package/vendor/raylib/src/external/glfw/src/wl_platform.h +352 -0
  772. package/vendor/raylib/src/external/glfw/src/wl_window.c +1814 -0
  773. package/vendor/raylib/src/external/glfw/src/x11_init.c +1500 -0
  774. package/vendor/raylib/src/external/glfw/src/x11_monitor.c +614 -0
  775. package/vendor/raylib/src/external/glfw/src/x11_platform.h +798 -0
  776. package/vendor/raylib/src/external/glfw/src/x11_window.c +3310 -0
  777. package/vendor/raylib/src/external/glfw/src/xkb_unicode.c +942 -0
  778. package/vendor/raylib/src/external/glfw/src/xkb_unicode.h +28 -0
  779. package/vendor/raylib/src/external/jar_mod.h +1596 -0
  780. package/vendor/raylib/src/external/jar_xm.h +2470 -0
  781. package/vendor/raylib/src/external/miniaudio.h +70273 -0
  782. package/vendor/raylib/src/external/msf_gif.h +717 -0
  783. package/vendor/raylib/src/external/par_shapes.h +2155 -0
  784. package/vendor/raylib/src/external/sdefl.h +696 -0
  785. package/vendor/raylib/src/external/sinfl.h +584 -0
  786. package/vendor/raylib/src/external/stb_image.h +7897 -0
  787. package/vendor/raylib/src/external/stb_image_resize.h +2634 -0
  788. package/vendor/raylib/src/external/stb_image_write.h +1724 -0
  789. package/vendor/raylib/src/external/stb_rect_pack.h +623 -0
  790. package/vendor/raylib/src/external/stb_truetype.h +5077 -0
  791. package/vendor/raylib/src/external/stb_vorbis.h +5475 -0
  792. package/vendor/raylib/src/external/tinyobj_loader_c.h +1589 -0
  793. package/vendor/raylib/src/external/vox_loader.h +710 -0
  794. package/vendor/raylib/src/extras/easings.h +263 -0
  795. package/vendor/raylib/src/extras/physac.h +1977 -0
  796. package/vendor/raylib/src/extras/raygui.h +4342 -0
  797. package/vendor/raylib/src/extras/rmem.h +751 -0
  798. package/vendor/raylib/src/raudio.c +2380 -0
  799. package/vendor/raylib/src/raudio.h +198 -0
  800. package/vendor/raylib/src/raylib.dll.rc +27 -0
  801. package/vendor/raylib/src/raylib.dll.rc.data +0 -0
  802. package/vendor/raylib/src/raylib.h +1536 -0
  803. package/vendor/raylib/src/raylib.ico +0 -0
  804. package/vendor/raylib/src/raylib.rc +27 -0
  805. package/vendor/raylib/src/raylib.rc.data +0 -0
  806. package/vendor/raylib/src/raymath.h +1853 -0
  807. package/vendor/raylib/src/rcamera.h +567 -0
  808. package/vendor/raylib/src/rcore.c +6772 -0
  809. package/vendor/raylib/src/rgestures.h +566 -0
  810. package/vendor/raylib/src/rglfw.c +126 -0
  811. package/vendor/raylib/src/rlgl.h +4677 -0
  812. package/vendor/raylib/src/rmodels.c +5041 -0
  813. package/vendor/raylib/src/rshapes.c +1759 -0
  814. package/vendor/raylib/src/rtext.c +1790 -0
  815. package/vendor/raylib/src/rtextures.c +4761 -0
  816. package/vendor/raylib/src/shell.html +328 -0
  817. package/vendor/raylib/src/utils.c +433 -0
  818. package/vendor/raylib/src/utils.h +81 -0
  819. package/vendor/sqlite3/shell.c +23487 -0
  820. package/vendor/sqlite3/sqlite3.c +239246 -0
  821. package/vendor/sqlite3/sqlite3.h +12802 -0
  822. package/vendor/sqlite3/sqlite3ext.h +689 -0
  823. package/CMakeLists.txt +0 -60
@@ -0,0 +1,1536 @@
1
+ /**********************************************************************************************
2
+ *
3
+ * raylib v4.0 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
4
+ *
5
+ * FEATURES:
6
+ * - NO external dependencies, all required libraries included with raylib
7
+ * - Multiplatform: Windows, Linux, FreeBSD, OpenBSD, NetBSD, DragonFly,
8
+ * MacOS, Haiku, Android, Raspberry Pi, DRM native, HTML5.
9
+ * - Written in plain C code (C99) in PascalCase/camelCase notation
10
+ * - Hardware accelerated with OpenGL (1.1, 2.1, 3.3, 4.3 or ES2 - choose at compile)
11
+ * - Unique OpenGL abstraction layer (usable as standalone module): [rlgl]
12
+ * - Multiple Fonts formats supported (TTF, XNA fonts, AngelCode fonts)
13
+ * - Outstanding texture formats support, including compressed formats (DXT, ETC, ASTC)
14
+ * - Full 3d support for 3d Shapes, Models, Billboards, Heightmaps and more!
15
+ * - Flexible Materials system, supporting classic maps and PBR maps
16
+ * - Animated 3D models supported (skeletal bones animation) (IQM)
17
+ * - Shaders support, including Model shaders and Postprocessing shaders
18
+ * - Powerful math module for Vector, Matrix and Quaternion operations: [raymath]
19
+ * - Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
20
+ * - VR stereo rendering with configurable HMD device parameters
21
+ * - Bindings to multiple programming languages available!
22
+ *
23
+ * NOTES:
24
+ * - One default Font is loaded on InitWindow()->LoadFontDefault() [core, text]
25
+ * - One default Texture2D is loaded on rlglInit(), 1x1 white pixel R8G8B8A8 [rlgl] (OpenGL 3.3 or ES2)
26
+ * - One default Shader is loaded on rlglInit()->rlLoadShaderDefault() [rlgl] (OpenGL 3.3 or ES2)
27
+ * - One default RenderBatch is loaded on rlglInit()->rlLoadRenderBatch() [rlgl] (OpenGL 3.3 or ES2)
28
+ *
29
+ * DEPENDENCIES (included):
30
+ * [rcore] rglfw (Camilla Löwy - github.com/glfw/glfw) for window/context management and input (PLATFORM_DESKTOP)
31
+ * [rlgl] glad (David Herberth - github.com/Dav1dde/glad) for OpenGL 3.3 extensions loading (PLATFORM_DESKTOP)
32
+ * [raudio] miniaudio (David Reid - github.com/mackron/miniaudio) for audio device/context management
33
+ *
34
+ * OPTIONAL DEPENDENCIES (included):
35
+ * [rcore] msf_gif (Miles Fogle) for GIF recording
36
+ * [rcore] sinfl (Micha Mettke) for DEFLATE decompression algorythm
37
+ * [rcore] sdefl (Micha Mettke) for DEFLATE compression algorythm
38
+ * [rtextures] stb_image (Sean Barret) for images loading (BMP, TGA, PNG, JPEG, HDR...)
39
+ * [rtextures] stb_image_write (Sean Barret) for image writing (BMP, TGA, PNG, JPG)
40
+ * [rtextures] stb_image_resize (Sean Barret) for image resizing algorithms
41
+ * [rtext] stb_truetype (Sean Barret) for ttf fonts loading
42
+ * [rtext] stb_rect_pack (Sean Barret) for rectangles packing
43
+ * [rmodels] par_shapes (Philip Rideout) for parametric 3d shapes generation
44
+ * [rmodels] tinyobj_loader_c (Syoyo Fujita) for models loading (OBJ, MTL)
45
+ * [rmodels] cgltf (Johannes Kuhlmann) for models loading (glTF)
46
+ * [raudio] dr_wav (David Reid) for WAV audio file loading
47
+ * [raudio] dr_flac (David Reid) for FLAC audio file loading
48
+ * [raudio] dr_mp3 (David Reid) for MP3 audio file loading
49
+ * [raudio] stb_vorbis (Sean Barret) for OGG audio loading
50
+ * [raudio] jar_xm (Joshua Reisenauer) for XM audio module loading
51
+ * [raudio] jar_mod (Joshua Reisenauer) for MOD audio module loading
52
+ *
53
+ *
54
+ * LICENSE: zlib/libpng
55
+ *
56
+ * raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
57
+ * BSD-like license that allows static linking with closed source software:
58
+ *
59
+ * Copyright (c) 2013-2021 Ramon Santamaria (@raysan5)
60
+ *
61
+ * This software is provided "as-is", without any express or implied warranty. In no event
62
+ * will the authors be held liable for any damages arising from the use of this software.
63
+ *
64
+ * Permission is granted to anyone to use this software for any purpose, including commercial
65
+ * applications, and to alter it and redistribute it freely, subject to the following restrictions:
66
+ *
67
+ * 1. The origin of this software must not be misrepresented; you must not claim that you
68
+ * wrote the original software. If you use this software in a product, an acknowledgment
69
+ * in the product documentation would be appreciated but is not required.
70
+ *
71
+ * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
72
+ * as being the original software.
73
+ *
74
+ * 3. This notice may not be removed or altered from any source distribution.
75
+ *
76
+ **********************************************************************************************/
77
+
78
+ #ifndef RAYLIB_H
79
+ #define RAYLIB_H
80
+
81
+ #include <stdarg.h> // Required for: va_list - Only used by TraceLogCallback
82
+
83
+ #define RAYLIB_VERSION "4.0"
84
+
85
+ // Function specifiers in case library is build/used as a shared library (Windows)
86
+ // NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
87
+ #if defined(_WIN32)
88
+ #if defined(BUILD_LIBTYPE_SHARED)
89
+ #define RLAPI __declspec(dllexport) // We are building the library as a Win32 shared library (.dll)
90
+ #elif defined(USE_LIBTYPE_SHARED)
91
+ #define RLAPI __declspec(dllimport) // We are using the library as a Win32 shared library (.dll)
92
+ #endif
93
+ #endif
94
+
95
+ #ifndef RLAPI
96
+ #define RLAPI // Functions defined as 'extern' by default (implicit specifiers)
97
+ #endif
98
+
99
+ //----------------------------------------------------------------------------------
100
+ // Some basic Defines
101
+ //----------------------------------------------------------------------------------
102
+ #ifndef PI
103
+ #define PI 3.14159265358979323846f
104
+ #endif
105
+ #ifndef DEG2RAD
106
+ #define DEG2RAD (PI/180.0f)
107
+ #endif
108
+ #ifndef RAD2DEG
109
+ #define RAD2DEG (180.0f/PI)
110
+ #endif
111
+
112
+ // Allow custom memory allocators
113
+ #ifndef RL_MALLOC
114
+ #define RL_MALLOC(sz) malloc(sz)
115
+ #endif
116
+ #ifndef RL_CALLOC
117
+ #define RL_CALLOC(n,sz) calloc(n,sz)
118
+ #endif
119
+ #ifndef RL_REALLOC
120
+ #define RL_REALLOC(ptr,sz) realloc(ptr,sz)
121
+ #endif
122
+ #ifndef RL_FREE
123
+ #define RL_FREE(ptr) free(ptr)
124
+ #endif
125
+
126
+ // NOTE: MSVC C++ compiler does not support compound literals (C99 feature)
127
+ // Plain structures in C++ (without constructors) can be initialized with { }
128
+ #if defined(__cplusplus)
129
+ #define CLITERAL(type) type
130
+ #else
131
+ #define CLITERAL(type) (type)
132
+ #endif
133
+
134
+ // NOTE: We set some defines with some data types declared by raylib
135
+ // Other modules (raymath, rlgl) also require some of those types, so,
136
+ // to be able to use those other modules as standalone (not depending on raylib)
137
+ // this defines are very useful for internal check and avoid type (re)definitions
138
+ #define RL_COLOR_TYPE
139
+ #define RL_RECTANGLE_TYPE
140
+ #define RL_VECTOR2_TYPE
141
+ #define RL_VECTOR3_TYPE
142
+ #define RL_VECTOR4_TYPE
143
+ #define RL_QUATERNION_TYPE
144
+ #define RL_MATRIX_TYPE
145
+
146
+ // Some Basic Colors
147
+ // NOTE: Custom raylib color palette for amazing visuals on WHITE background
148
+ #define LIGHTGRAY CLITERAL(Color){ 200, 200, 200, 255 } // Light Gray
149
+ #define GRAY CLITERAL(Color){ 130, 130, 130, 255 } // Gray
150
+ #define DARKGRAY CLITERAL(Color){ 80, 80, 80, 255 } // Dark Gray
151
+ #define YELLOW CLITERAL(Color){ 253, 249, 0, 255 } // Yellow
152
+ #define GOLD CLITERAL(Color){ 255, 203, 0, 255 } // Gold
153
+ #define ORANGE CLITERAL(Color){ 255, 161, 0, 255 } // Orange
154
+ #define PINK CLITERAL(Color){ 255, 109, 194, 255 } // Pink
155
+ #define RED CLITERAL(Color){ 230, 41, 55, 255 } // Red
156
+ #define MAROON CLITERAL(Color){ 190, 33, 55, 255 } // Maroon
157
+ #define GREEN CLITERAL(Color){ 0, 228, 48, 255 } // Green
158
+ #define LIME CLITERAL(Color){ 0, 158, 47, 255 } // Lime
159
+ #define DARKGREEN CLITERAL(Color){ 0, 117, 44, 255 } // Dark Green
160
+ #define SKYBLUE CLITERAL(Color){ 102, 191, 255, 255 } // Sky Blue
161
+ #define BLUE CLITERAL(Color){ 0, 121, 241, 255 } // Blue
162
+ #define DARKBLUE CLITERAL(Color){ 0, 82, 172, 255 } // Dark Blue
163
+ #define PURPLE CLITERAL(Color){ 200, 122, 255, 255 } // Purple
164
+ #define VIOLET CLITERAL(Color){ 135, 60, 190, 255 } // Violet
165
+ #define DARKPURPLE CLITERAL(Color){ 112, 31, 126, 255 } // Dark Purple
166
+ #define BEIGE CLITERAL(Color){ 211, 176, 131, 255 } // Beige
167
+ #define BROWN CLITERAL(Color){ 127, 106, 79, 255 } // Brown
168
+ #define DARKBROWN CLITERAL(Color){ 76, 63, 47, 255 } // Dark Brown
169
+
170
+ #define WHITE CLITERAL(Color){ 255, 255, 255, 255 } // White
171
+ #define BLACK CLITERAL(Color){ 0, 0, 0, 255 } // Black
172
+ #define BLANK CLITERAL(Color){ 0, 0, 0, 0 } // Blank (Transparent)
173
+ #define MAGENTA CLITERAL(Color){ 255, 0, 255, 255 } // Magenta
174
+ #define RAYWHITE CLITERAL(Color){ 245, 245, 245, 255 } // My own White (raylib logo)
175
+
176
+ //----------------------------------------------------------------------------------
177
+ // Structures Definition
178
+ //----------------------------------------------------------------------------------
179
+ // Boolean type
180
+ #if defined(__STDC__) && __STDC_VERSION__ >= 199901L
181
+ #include <stdbool.h>
182
+ #elif !defined(__cplusplus) && !defined(bool)
183
+ typedef enum bool { false, true } bool;
184
+ #define RL_BOOL_TYPE
185
+ #endif
186
+
187
+ // Vector2, 2 components
188
+ typedef struct Vector2 {
189
+ float x; // Vector x component
190
+ float y; // Vector y component
191
+ } Vector2;
192
+
193
+ // Vector3, 3 components
194
+ typedef struct Vector3 {
195
+ float x; // Vector x component
196
+ float y; // Vector y component
197
+ float z; // Vector z component
198
+ } Vector3;
199
+
200
+ // Vector4, 4 components
201
+ typedef struct Vector4 {
202
+ float x; // Vector x component
203
+ float y; // Vector y component
204
+ float z; // Vector z component
205
+ float w; // Vector w component
206
+ } Vector4;
207
+
208
+ // Quaternion, 4 components (Vector4 alias)
209
+ typedef Vector4 Quaternion;
210
+
211
+ // Matrix, 4x4 components, column major, OpenGL style, right handed
212
+ typedef struct Matrix {
213
+ float m0, m4, m8, m12; // Matrix first row (4 components)
214
+ float m1, m5, m9, m13; // Matrix second row (4 components)
215
+ float m2, m6, m10, m14; // Matrix third row (4 components)
216
+ float m3, m7, m11, m15; // Matrix fourth row (4 components)
217
+ } Matrix;
218
+
219
+ // Color, 4 components, R8G8B8A8 (32bit)
220
+ typedef struct Color {
221
+ unsigned char r; // Color red value
222
+ unsigned char g; // Color green value
223
+ unsigned char b; // Color blue value
224
+ unsigned char a; // Color alpha value
225
+ } Color;
226
+
227
+ // Rectangle, 4 components
228
+ typedef struct Rectangle {
229
+ float x; // Rectangle top-left corner position x
230
+ float y; // Rectangle top-left corner position y
231
+ float width; // Rectangle width
232
+ float height; // Rectangle height
233
+ } Rectangle;
234
+
235
+ // Image, pixel data stored in CPU memory (RAM)
236
+ typedef struct Image {
237
+ void *data; // Image raw data
238
+ int width; // Image base width
239
+ int height; // Image base height
240
+ int mipmaps; // Mipmap levels, 1 by default
241
+ int format; // Data format (PixelFormat type)
242
+ } Image;
243
+
244
+ // Texture, tex data stored in GPU memory (VRAM)
245
+ typedef struct Texture {
246
+ unsigned int id; // OpenGL texture id
247
+ int width; // Texture base width
248
+ int height; // Texture base height
249
+ int mipmaps; // Mipmap levels, 1 by default
250
+ int format; // Data format (PixelFormat type)
251
+ } Texture;
252
+
253
+ // Texture2D, same as Texture
254
+ typedef Texture Texture2D;
255
+
256
+ // TextureCubemap, same as Texture
257
+ typedef Texture TextureCubemap;
258
+
259
+ // RenderTexture, fbo for texture rendering
260
+ typedef struct RenderTexture {
261
+ unsigned int id; // OpenGL framebuffer object id
262
+ Texture texture; // Color buffer attachment texture
263
+ Texture depth; // Depth buffer attachment texture
264
+ } RenderTexture;
265
+
266
+ // RenderTexture2D, same as RenderTexture
267
+ typedef RenderTexture RenderTexture2D;
268
+
269
+ // NPatchInfo, n-patch layout info
270
+ typedef struct NPatchInfo {
271
+ Rectangle source; // Texture source rectangle
272
+ int left; // Left border offset
273
+ int top; // Top border offset
274
+ int right; // Right border offset
275
+ int bottom; // Bottom border offset
276
+ int layout; // Layout of the n-patch: 3x3, 1x3 or 3x1
277
+ } NPatchInfo;
278
+
279
+ // GlyphInfo, font characters glyphs info
280
+ typedef struct GlyphInfo {
281
+ int value; // Character value (Unicode)
282
+ int offsetX; // Character offset X when drawing
283
+ int offsetY; // Character offset Y when drawing
284
+ int advanceX; // Character advance position X
285
+ Image image; // Character image data
286
+ } GlyphInfo;
287
+
288
+ // Font, font texture and GlyphInfo array data
289
+ typedef struct Font {
290
+ int baseSize; // Base size (default chars height)
291
+ int glyphCount; // Number of glyph characters
292
+ int glyphPadding; // Padding around the glyph characters
293
+ Texture2D texture; // Texture atlas containing the glyphs
294
+ Rectangle *recs; // Rectangles in texture for the glyphs
295
+ GlyphInfo *glyphs; // Glyphs info data
296
+ } Font;
297
+
298
+ // Camera, defines position/orientation in 3d space
299
+ typedef struct Camera3D {
300
+ Vector3 position; // Camera position
301
+ Vector3 target; // Camera target it looks-at
302
+ Vector3 up; // Camera up vector (rotation over its axis)
303
+ float fovy; // Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
304
+ int projection; // Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
305
+ } Camera3D;
306
+
307
+ typedef Camera3D Camera; // Camera type fallback, defaults to Camera3D
308
+
309
+ // Camera2D, defines position/orientation in 2d space
310
+ typedef struct Camera2D {
311
+ Vector2 offset; // Camera offset (displacement from target)
312
+ Vector2 target; // Camera target (rotation and zoom origin)
313
+ float rotation; // Camera rotation in degrees
314
+ float zoom; // Camera zoom (scaling), should be 1.0f by default
315
+ } Camera2D;
316
+
317
+ // Mesh, vertex data and vao/vbo
318
+ typedef struct Mesh {
319
+ int vertexCount; // Number of vertices stored in arrays
320
+ int triangleCount; // Number of triangles stored (indexed or not)
321
+
322
+ // Vertex attributes data
323
+ float *vertices; // Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
324
+ float *texcoords; // Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
325
+ float *texcoords2; // Vertex second texture coordinates (useful for lightmaps) (shader-location = 5)
326
+ float *normals; // Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)
327
+ float *tangents; // Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)
328
+ unsigned char *colors; // Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
329
+ unsigned short *indices; // Vertex indices (in case vertex data comes indexed)
330
+
331
+ // Animation vertex data
332
+ float *animVertices; // Animated vertex positions (after bones transformations)
333
+ float *animNormals; // Animated normals (after bones transformations)
334
+ unsigned char *boneIds; // Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning)
335
+ float *boneWeights; // Vertex bone weight, up to 4 bones influence by vertex (skinning)
336
+
337
+ // OpenGL identifiers
338
+ unsigned int vaoId; // OpenGL Vertex Array Object id
339
+ unsigned int *vboId; // OpenGL Vertex Buffer Objects id (default vertex data)
340
+ } Mesh;
341
+
342
+ // Shader
343
+ typedef struct Shader {
344
+ unsigned int id; // Shader program id
345
+ int *locs; // Shader locations array (RL_MAX_SHADER_LOCATIONS)
346
+ } Shader;
347
+
348
+ // MaterialMap
349
+ typedef struct MaterialMap {
350
+ Texture2D texture; // Material map texture
351
+ Color color; // Material map color
352
+ float value; // Material map value
353
+ } MaterialMap;
354
+
355
+ // Material, includes shader and maps
356
+ typedef struct Material {
357
+ Shader shader; // Material shader
358
+ MaterialMap *maps; // Material maps array (MAX_MATERIAL_MAPS)
359
+ float params[4]; // Material generic parameters (if required)
360
+ } Material;
361
+
362
+ // Transform, vectex transformation data
363
+ typedef struct Transform {
364
+ Vector3 translation; // Translation
365
+ Quaternion rotation; // Rotation
366
+ Vector3 scale; // Scale
367
+ } Transform;
368
+
369
+ // Bone, skeletal animation bone
370
+ typedef struct BoneInfo {
371
+ char name[32]; // Bone name
372
+ int parent; // Bone parent
373
+ } BoneInfo;
374
+
375
+ // Model, meshes, materials and animation data
376
+ typedef struct Model {
377
+ Matrix transform; // Local transform matrix
378
+
379
+ int meshCount; // Number of meshes
380
+ int materialCount; // Number of materials
381
+ Mesh *meshes; // Meshes array
382
+ Material *materials; // Materials array
383
+ int *meshMaterial; // Mesh material number
384
+
385
+ // Animation data
386
+ int boneCount; // Number of bones
387
+ BoneInfo *bones; // Bones information (skeleton)
388
+ Transform *bindPose; // Bones base transformation (pose)
389
+ } Model;
390
+
391
+ // ModelAnimation
392
+ typedef struct ModelAnimation {
393
+ int boneCount; // Number of bones
394
+ int frameCount; // Number of animation frames
395
+ BoneInfo *bones; // Bones information (skeleton)
396
+ Transform **framePoses; // Poses array by frame
397
+ } ModelAnimation;
398
+
399
+ // Ray, ray for raycasting
400
+ typedef struct Ray {
401
+ Vector3 position; // Ray position (origin)
402
+ Vector3 direction; // Ray direction
403
+ } Ray;
404
+
405
+ // RayCollision, ray hit information
406
+ typedef struct RayCollision {
407
+ bool hit; // Did the ray hit something?
408
+ float distance; // Distance to nearest hit
409
+ Vector3 point; // Point of nearest hit
410
+ Vector3 normal; // Surface normal of hit
411
+ } RayCollision;
412
+
413
+ // BoundingBox
414
+ typedef struct BoundingBox {
415
+ Vector3 min; // Minimum vertex box-corner
416
+ Vector3 max; // Maximum vertex box-corner
417
+ } BoundingBox;
418
+
419
+ // Wave, audio wave data
420
+ typedef struct Wave {
421
+ unsigned int frameCount; // Total number of frames (considering channels)
422
+ unsigned int sampleRate; // Frequency (samples per second)
423
+ unsigned int sampleSize; // Bit depth (bits per sample): 8, 16, 32 (24 not supported)
424
+ unsigned int channels; // Number of channels (1-mono, 2-stereo, ...)
425
+ void *data; // Buffer data pointer
426
+ } Wave;
427
+
428
+ typedef struct rAudioBuffer rAudioBuffer;
429
+
430
+ // AudioStream, custom audio stream
431
+ typedef struct AudioStream {
432
+ rAudioBuffer *buffer; // Pointer to internal data used by the audio system
433
+
434
+ unsigned int sampleRate; // Frequency (samples per second)
435
+ unsigned int sampleSize; // Bit depth (bits per sample): 8, 16, 32 (24 not supported)
436
+ unsigned int channels; // Number of channels (1-mono, 2-stereo, ...)
437
+ } AudioStream;
438
+
439
+ // Sound
440
+ typedef struct Sound {
441
+ AudioStream stream; // Audio stream
442
+ unsigned int frameCount; // Total number of frames (considering channels)
443
+ } Sound;
444
+
445
+ // Music, audio stream, anything longer than ~10 seconds should be streamed
446
+ typedef struct Music {
447
+ AudioStream stream; // Audio stream
448
+ unsigned int frameCount; // Total number of frames (considering channels)
449
+ bool looping; // Music looping enable
450
+
451
+ int ctxType; // Type of music context (audio filetype)
452
+ void *ctxData; // Audio context data, depends on type
453
+ } Music;
454
+
455
+ // VrDeviceInfo, Head-Mounted-Display device parameters
456
+ typedef struct VrDeviceInfo {
457
+ int hResolution; // Horizontal resolution in pixels
458
+ int vResolution; // Vertical resolution in pixels
459
+ float hScreenSize; // Horizontal size in meters
460
+ float vScreenSize; // Vertical size in meters
461
+ float vScreenCenter; // Screen center in meters
462
+ float eyeToScreenDistance; // Distance between eye and display in meters
463
+ float lensSeparationDistance; // Lens separation distance in meters
464
+ float interpupillaryDistance; // IPD (distance between pupils) in meters
465
+ float lensDistortionValues[4]; // Lens distortion constant parameters
466
+ float chromaAbCorrection[4]; // Chromatic aberration correction parameters
467
+ } VrDeviceInfo;
468
+
469
+ // VrStereoConfig, VR stereo rendering configuration for simulator
470
+ typedef struct VrStereoConfig {
471
+ Matrix projection[2]; // VR projection matrices (per eye)
472
+ Matrix viewOffset[2]; // VR view offset matrices (per eye)
473
+ float leftLensCenter[2]; // VR left lens center
474
+ float rightLensCenter[2]; // VR right lens center
475
+ float leftScreenCenter[2]; // VR left screen center
476
+ float rightScreenCenter[2]; // VR right screen center
477
+ float scale[2]; // VR distortion scale
478
+ float scaleIn[2]; // VR distortion scale in
479
+ } VrStereoConfig;
480
+
481
+ //----------------------------------------------------------------------------------
482
+ // Enumerators Definition
483
+ //----------------------------------------------------------------------------------
484
+ // System/Window config flags
485
+ // NOTE: Every bit registers one state (use it with bit masks)
486
+ // By default all flags are set to 0
487
+ typedef enum {
488
+ FLAG_VSYNC_HINT = 0x00000040, // Set to try enabling V-Sync on GPU
489
+ FLAG_FULLSCREEN_MODE = 0x00000002, // Set to run program in fullscreen
490
+ FLAG_WINDOW_RESIZABLE = 0x00000004, // Set to allow resizable window
491
+ FLAG_WINDOW_UNDECORATED = 0x00000008, // Set to disable window decoration (frame and buttons)
492
+ FLAG_WINDOW_HIDDEN = 0x00000080, // Set to hide window
493
+ FLAG_WINDOW_MINIMIZED = 0x00000200, // Set to minimize window (iconify)
494
+ FLAG_WINDOW_MAXIMIZED = 0x00000400, // Set to maximize window (expanded to monitor)
495
+ FLAG_WINDOW_UNFOCUSED = 0x00000800, // Set to window non focused
496
+ FLAG_WINDOW_TOPMOST = 0x00001000, // Set to window always on top
497
+ FLAG_WINDOW_ALWAYS_RUN = 0x00000100, // Set to allow windows running while minimized
498
+ FLAG_WINDOW_TRANSPARENT = 0x00000010, // Set to allow transparent framebuffer
499
+ FLAG_WINDOW_HIGHDPI = 0x00002000, // Set to support HighDPI
500
+ FLAG_MSAA_4X_HINT = 0x00000020, // Set to try enabling MSAA 4X
501
+ FLAG_INTERLACED_HINT = 0x00010000 // Set to try enabling interlaced video format (for V3D)
502
+ } ConfigFlags;
503
+
504
+ // Trace log level
505
+ // NOTE: Organized by priority level
506
+ typedef enum {
507
+ LOG_ALL = 0, // Display all logs
508
+ LOG_TRACE, // Trace logging, intended for internal use only
509
+ LOG_DEBUG, // Debug logging, used for internal debugging, it should be disabled on release builds
510
+ LOG_INFO, // Info logging, used for program execution info
511
+ LOG_WARNING, // Warning logging, used on recoverable failures
512
+ LOG_ERROR, // Error logging, used on unrecoverable failures
513
+ LOG_FATAL, // Fatal logging, used to abort program: exit(EXIT_FAILURE)
514
+ LOG_NONE // Disable logging
515
+ } TraceLogLevel;
516
+
517
+ // Keyboard keys (US keyboard layout)
518
+ // NOTE: Use GetKeyPressed() to allow redefining
519
+ // required keys for alternative layouts
520
+ typedef enum {
521
+ KEY_NULL = 0, // Key: NULL, used for no key pressed
522
+ // Alphanumeric keys
523
+ KEY_APOSTROPHE = 39, // Key: '
524
+ KEY_COMMA = 44, // Key: ,
525
+ KEY_MINUS = 45, // Key: -
526
+ KEY_PERIOD = 46, // Key: .
527
+ KEY_SLASH = 47, // Key: /
528
+ KEY_ZERO = 48, // Key: 0
529
+ KEY_ONE = 49, // Key: 1
530
+ KEY_TWO = 50, // Key: 2
531
+ KEY_THREE = 51, // Key: 3
532
+ KEY_FOUR = 52, // Key: 4
533
+ KEY_FIVE = 53, // Key: 5
534
+ KEY_SIX = 54, // Key: 6
535
+ KEY_SEVEN = 55, // Key: 7
536
+ KEY_EIGHT = 56, // Key: 8
537
+ KEY_NINE = 57, // Key: 9
538
+ KEY_SEMICOLON = 59, // Key: ;
539
+ KEY_EQUAL = 61, // Key: =
540
+ KEY_A = 65, // Key: A | a
541
+ KEY_B = 66, // Key: B | b
542
+ KEY_C = 67, // Key: C | c
543
+ KEY_D = 68, // Key: D | d
544
+ KEY_E = 69, // Key: E | e
545
+ KEY_F = 70, // Key: F | f
546
+ KEY_G = 71, // Key: G | g
547
+ KEY_H = 72, // Key: H | h
548
+ KEY_I = 73, // Key: I | i
549
+ KEY_J = 74, // Key: J | j
550
+ KEY_K = 75, // Key: K | k
551
+ KEY_L = 76, // Key: L | l
552
+ KEY_M = 77, // Key: M | m
553
+ KEY_N = 78, // Key: N | n
554
+ KEY_O = 79, // Key: O | o
555
+ KEY_P = 80, // Key: P | p
556
+ KEY_Q = 81, // Key: Q | q
557
+ KEY_R = 82, // Key: R | r
558
+ KEY_S = 83, // Key: S | s
559
+ KEY_T = 84, // Key: T | t
560
+ KEY_U = 85, // Key: U | u
561
+ KEY_V = 86, // Key: V | v
562
+ KEY_W = 87, // Key: W | w
563
+ KEY_X = 88, // Key: X | x
564
+ KEY_Y = 89, // Key: Y | y
565
+ KEY_Z = 90, // Key: Z | z
566
+ KEY_LEFT_BRACKET = 91, // Key: [
567
+ KEY_BACKSLASH = 92, // Key: '\'
568
+ KEY_RIGHT_BRACKET = 93, // Key: ]
569
+ KEY_GRAVE = 96, // Key: `
570
+ // Function keys
571
+ KEY_SPACE = 32, // Key: Space
572
+ KEY_ESCAPE = 256, // Key: Esc
573
+ KEY_ENTER = 257, // Key: Enter
574
+ KEY_TAB = 258, // Key: Tab
575
+ KEY_BACKSPACE = 259, // Key: Backspace
576
+ KEY_INSERT = 260, // Key: Ins
577
+ KEY_DELETE = 261, // Key: Del
578
+ KEY_RIGHT = 262, // Key: Cursor right
579
+ KEY_LEFT = 263, // Key: Cursor left
580
+ KEY_DOWN = 264, // Key: Cursor down
581
+ KEY_UP = 265, // Key: Cursor up
582
+ KEY_PAGE_UP = 266, // Key: Page up
583
+ KEY_PAGE_DOWN = 267, // Key: Page down
584
+ KEY_HOME = 268, // Key: Home
585
+ KEY_END = 269, // Key: End
586
+ KEY_CAPS_LOCK = 280, // Key: Caps lock
587
+ KEY_SCROLL_LOCK = 281, // Key: Scroll down
588
+ KEY_NUM_LOCK = 282, // Key: Num lock
589
+ KEY_PRINT_SCREEN = 283, // Key: Print screen
590
+ KEY_PAUSE = 284, // Key: Pause
591
+ KEY_F1 = 290, // Key: F1
592
+ KEY_F2 = 291, // Key: F2
593
+ KEY_F3 = 292, // Key: F3
594
+ KEY_F4 = 293, // Key: F4
595
+ KEY_F5 = 294, // Key: F5
596
+ KEY_F6 = 295, // Key: F6
597
+ KEY_F7 = 296, // Key: F7
598
+ KEY_F8 = 297, // Key: F8
599
+ KEY_F9 = 298, // Key: F9
600
+ KEY_F10 = 299, // Key: F10
601
+ KEY_F11 = 300, // Key: F11
602
+ KEY_F12 = 301, // Key: F12
603
+ KEY_LEFT_SHIFT = 340, // Key: Shift left
604
+ KEY_LEFT_CONTROL = 341, // Key: Control left
605
+ KEY_LEFT_ALT = 342, // Key: Alt left
606
+ KEY_LEFT_SUPER = 343, // Key: Super left
607
+ KEY_RIGHT_SHIFT = 344, // Key: Shift right
608
+ KEY_RIGHT_CONTROL = 345, // Key: Control right
609
+ KEY_RIGHT_ALT = 346, // Key: Alt right
610
+ KEY_RIGHT_SUPER = 347, // Key: Super right
611
+ KEY_KB_MENU = 348, // Key: KB menu
612
+ // Keypad keys
613
+ KEY_KP_0 = 320, // Key: Keypad 0
614
+ KEY_KP_1 = 321, // Key: Keypad 1
615
+ KEY_KP_2 = 322, // Key: Keypad 2
616
+ KEY_KP_3 = 323, // Key: Keypad 3
617
+ KEY_KP_4 = 324, // Key: Keypad 4
618
+ KEY_KP_5 = 325, // Key: Keypad 5
619
+ KEY_KP_6 = 326, // Key: Keypad 6
620
+ KEY_KP_7 = 327, // Key: Keypad 7
621
+ KEY_KP_8 = 328, // Key: Keypad 8
622
+ KEY_KP_9 = 329, // Key: Keypad 9
623
+ KEY_KP_DECIMAL = 330, // Key: Keypad .
624
+ KEY_KP_DIVIDE = 331, // Key: Keypad /
625
+ KEY_KP_MULTIPLY = 332, // Key: Keypad *
626
+ KEY_KP_SUBTRACT = 333, // Key: Keypad -
627
+ KEY_KP_ADD = 334, // Key: Keypad +
628
+ KEY_KP_ENTER = 335, // Key: Keypad Enter
629
+ KEY_KP_EQUAL = 336, // Key: Keypad =
630
+ // Android key buttons
631
+ KEY_BACK = 4, // Key: Android back button
632
+ KEY_MENU = 82, // Key: Android menu button
633
+ KEY_VOLUME_UP = 24, // Key: Android volume up button
634
+ KEY_VOLUME_DOWN = 25 // Key: Android volume down button
635
+ } KeyboardKey;
636
+
637
+ // Add backwards compatibility support for deprecated names
638
+ #define MOUSE_LEFT_BUTTON MOUSE_BUTTON_LEFT
639
+ #define MOUSE_RIGHT_BUTTON MOUSE_BUTTON_RIGHT
640
+ #define MOUSE_MIDDLE_BUTTON MOUSE_BUTTON_MIDDLE
641
+
642
+ // Mouse buttons
643
+ typedef enum {
644
+ MOUSE_BUTTON_LEFT = 0, // Mouse button left
645
+ MOUSE_BUTTON_RIGHT = 1, // Mouse button right
646
+ MOUSE_BUTTON_MIDDLE = 2, // Mouse button middle (pressed wheel)
647
+ MOUSE_BUTTON_SIDE = 3, // Mouse button side (advanced mouse device)
648
+ MOUSE_BUTTON_EXTRA = 4, // Mouse button extra (advanced mouse device)
649
+ MOUSE_BUTTON_FORWARD = 5, // Mouse button fordward (advanced mouse device)
650
+ MOUSE_BUTTON_BACK = 6, // Mouse button back (advanced mouse device)
651
+ } MouseButton;
652
+
653
+ // Mouse cursor
654
+ typedef enum {
655
+ MOUSE_CURSOR_DEFAULT = 0, // Default pointer shape
656
+ MOUSE_CURSOR_ARROW = 1, // Arrow shape
657
+ MOUSE_CURSOR_IBEAM = 2, // Text writing cursor shape
658
+ MOUSE_CURSOR_CROSSHAIR = 3, // Cross shape
659
+ MOUSE_CURSOR_POINTING_HAND = 4, // Pointing hand cursor
660
+ MOUSE_CURSOR_RESIZE_EW = 5, // Horizontal resize/move arrow shape
661
+ MOUSE_CURSOR_RESIZE_NS = 6, // Vertical resize/move arrow shape
662
+ MOUSE_CURSOR_RESIZE_NWSE = 7, // Top-left to bottom-right diagonal resize/move arrow shape
663
+ MOUSE_CURSOR_RESIZE_NESW = 8, // The top-right to bottom-left diagonal resize/move arrow shape
664
+ MOUSE_CURSOR_RESIZE_ALL = 9, // The omni-directional resize/move cursor shape
665
+ MOUSE_CURSOR_NOT_ALLOWED = 10 // The operation-not-allowed shape
666
+ } MouseCursor;
667
+
668
+ // Gamepad buttons
669
+ typedef enum {
670
+ GAMEPAD_BUTTON_UNKNOWN = 0, // Unknown button, just for error checking
671
+ GAMEPAD_BUTTON_LEFT_FACE_UP, // Gamepad left DPAD up button
672
+ GAMEPAD_BUTTON_LEFT_FACE_RIGHT, // Gamepad left DPAD right button
673
+ GAMEPAD_BUTTON_LEFT_FACE_DOWN, // Gamepad left DPAD down button
674
+ GAMEPAD_BUTTON_LEFT_FACE_LEFT, // Gamepad left DPAD left button
675
+ GAMEPAD_BUTTON_RIGHT_FACE_UP, // Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
676
+ GAMEPAD_BUTTON_RIGHT_FACE_RIGHT, // Gamepad right button right (i.e. PS3: Square, Xbox: X)
677
+ GAMEPAD_BUTTON_RIGHT_FACE_DOWN, // Gamepad right button down (i.e. PS3: Cross, Xbox: A)
678
+ GAMEPAD_BUTTON_RIGHT_FACE_LEFT, // Gamepad right button left (i.e. PS3: Circle, Xbox: B)
679
+ GAMEPAD_BUTTON_LEFT_TRIGGER_1, // Gamepad top/back trigger left (first), it could be a trailing button
680
+ GAMEPAD_BUTTON_LEFT_TRIGGER_2, // Gamepad top/back trigger left (second), it could be a trailing button
681
+ GAMEPAD_BUTTON_RIGHT_TRIGGER_1, // Gamepad top/back trigger right (one), it could be a trailing button
682
+ GAMEPAD_BUTTON_RIGHT_TRIGGER_2, // Gamepad top/back trigger right (second), it could be a trailing button
683
+ GAMEPAD_BUTTON_MIDDLE_LEFT, // Gamepad center buttons, left one (i.e. PS3: Select)
684
+ GAMEPAD_BUTTON_MIDDLE, // Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
685
+ GAMEPAD_BUTTON_MIDDLE_RIGHT, // Gamepad center buttons, right one (i.e. PS3: Start)
686
+ GAMEPAD_BUTTON_LEFT_THUMB, // Gamepad joystick pressed button left
687
+ GAMEPAD_BUTTON_RIGHT_THUMB // Gamepad joystick pressed button right
688
+ } GamepadButton;
689
+
690
+ // Gamepad axis
691
+ typedef enum {
692
+ GAMEPAD_AXIS_LEFT_X = 0, // Gamepad left stick X axis
693
+ GAMEPAD_AXIS_LEFT_Y = 1, // Gamepad left stick Y axis
694
+ GAMEPAD_AXIS_RIGHT_X = 2, // Gamepad right stick X axis
695
+ GAMEPAD_AXIS_RIGHT_Y = 3, // Gamepad right stick Y axis
696
+ GAMEPAD_AXIS_LEFT_TRIGGER = 4, // Gamepad back trigger left, pressure level: [1..-1]
697
+ GAMEPAD_AXIS_RIGHT_TRIGGER = 5 // Gamepad back trigger right, pressure level: [1..-1]
698
+ } GamepadAxis;
699
+
700
+ // Material map index
701
+ typedef enum {
702
+ MATERIAL_MAP_ALBEDO = 0, // Albedo material (same as: MATERIAL_MAP_DIFFUSE)
703
+ MATERIAL_MAP_METALNESS, // Metalness material (same as: MATERIAL_MAP_SPECULAR)
704
+ MATERIAL_MAP_NORMAL, // Normal material
705
+ MATERIAL_MAP_ROUGHNESS, // Roughness material
706
+ MATERIAL_MAP_OCCLUSION, // Ambient occlusion material
707
+ MATERIAL_MAP_EMISSION, // Emission material
708
+ MATERIAL_MAP_HEIGHT, // Heightmap material
709
+ MATERIAL_MAP_CUBEMAP, // Cubemap material (NOTE: Uses GL_TEXTURE_CUBE_MAP)
710
+ MATERIAL_MAP_IRRADIANCE, // Irradiance material (NOTE: Uses GL_TEXTURE_CUBE_MAP)
711
+ MATERIAL_MAP_PREFILTER, // Prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP)
712
+ MATERIAL_MAP_BRDF // Brdf material
713
+ } MaterialMapIndex;
714
+
715
+ #define MATERIAL_MAP_DIFFUSE MATERIAL_MAP_ALBEDO
716
+ #define MATERIAL_MAP_SPECULAR MATERIAL_MAP_METALNESS
717
+
718
+ // Shader location index
719
+ typedef enum {
720
+ SHADER_LOC_VERTEX_POSITION = 0, // Shader location: vertex attribute: position
721
+ SHADER_LOC_VERTEX_TEXCOORD01, // Shader location: vertex attribute: texcoord01
722
+ SHADER_LOC_VERTEX_TEXCOORD02, // Shader location: vertex attribute: texcoord02
723
+ SHADER_LOC_VERTEX_NORMAL, // Shader location: vertex attribute: normal
724
+ SHADER_LOC_VERTEX_TANGENT, // Shader location: vertex attribute: tangent
725
+ SHADER_LOC_VERTEX_COLOR, // Shader location: vertex attribute: color
726
+ SHADER_LOC_MATRIX_MVP, // Shader location: matrix uniform: model-view-projection
727
+ SHADER_LOC_MATRIX_VIEW, // Shader location: matrix uniform: view (camera transform)
728
+ SHADER_LOC_MATRIX_PROJECTION, // Shader location: matrix uniform: projection
729
+ SHADER_LOC_MATRIX_MODEL, // Shader location: matrix uniform: model (transform)
730
+ SHADER_LOC_MATRIX_NORMAL, // Shader location: matrix uniform: normal
731
+ SHADER_LOC_VECTOR_VIEW, // Shader location: vector uniform: view
732
+ SHADER_LOC_COLOR_DIFFUSE, // Shader location: vector uniform: diffuse color
733
+ SHADER_LOC_COLOR_SPECULAR, // Shader location: vector uniform: specular color
734
+ SHADER_LOC_COLOR_AMBIENT, // Shader location: vector uniform: ambient color
735
+ SHADER_LOC_MAP_ALBEDO, // Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE)
736
+ SHADER_LOC_MAP_METALNESS, // Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR)
737
+ SHADER_LOC_MAP_NORMAL, // Shader location: sampler2d texture: normal
738
+ SHADER_LOC_MAP_ROUGHNESS, // Shader location: sampler2d texture: roughness
739
+ SHADER_LOC_MAP_OCCLUSION, // Shader location: sampler2d texture: occlusion
740
+ SHADER_LOC_MAP_EMISSION, // Shader location: sampler2d texture: emission
741
+ SHADER_LOC_MAP_HEIGHT, // Shader location: sampler2d texture: height
742
+ SHADER_LOC_MAP_CUBEMAP, // Shader location: samplerCube texture: cubemap
743
+ SHADER_LOC_MAP_IRRADIANCE, // Shader location: samplerCube texture: irradiance
744
+ SHADER_LOC_MAP_PREFILTER, // Shader location: samplerCube texture: prefilter
745
+ SHADER_LOC_MAP_BRDF // Shader location: sampler2d texture: brdf
746
+ } ShaderLocationIndex;
747
+
748
+ #define SHADER_LOC_MAP_DIFFUSE SHADER_LOC_MAP_ALBEDO
749
+ #define SHADER_LOC_MAP_SPECULAR SHADER_LOC_MAP_METALNESS
750
+
751
+ // Shader uniform data type
752
+ typedef enum {
753
+ SHADER_UNIFORM_FLOAT = 0, // Shader uniform type: float
754
+ SHADER_UNIFORM_VEC2, // Shader uniform type: vec2 (2 float)
755
+ SHADER_UNIFORM_VEC3, // Shader uniform type: vec3 (3 float)
756
+ SHADER_UNIFORM_VEC4, // Shader uniform type: vec4 (4 float)
757
+ SHADER_UNIFORM_INT, // Shader uniform type: int
758
+ SHADER_UNIFORM_IVEC2, // Shader uniform type: ivec2 (2 int)
759
+ SHADER_UNIFORM_IVEC3, // Shader uniform type: ivec3 (3 int)
760
+ SHADER_UNIFORM_IVEC4, // Shader uniform type: ivec4 (4 int)
761
+ SHADER_UNIFORM_SAMPLER2D // Shader uniform type: sampler2d
762
+ } ShaderUniformDataType;
763
+
764
+ // Shader attribute data types
765
+ typedef enum {
766
+ SHADER_ATTRIB_FLOAT = 0, // Shader attribute type: float
767
+ SHADER_ATTRIB_VEC2, // Shader attribute type: vec2 (2 float)
768
+ SHADER_ATTRIB_VEC3, // Shader attribute type: vec3 (3 float)
769
+ SHADER_ATTRIB_VEC4 // Shader attribute type: vec4 (4 float)
770
+ } ShaderAttributeDataType;
771
+
772
+ // Pixel formats
773
+ // NOTE: Support depends on OpenGL version and platform
774
+ typedef enum {
775
+ PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, // 8 bit per pixel (no alpha)
776
+ PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA, // 8*2 bpp (2 channels)
777
+ PIXELFORMAT_UNCOMPRESSED_R5G6B5, // 16 bpp
778
+ PIXELFORMAT_UNCOMPRESSED_R8G8B8, // 24 bpp
779
+ PIXELFORMAT_UNCOMPRESSED_R5G5B5A1, // 16 bpp (1 bit alpha)
780
+ PIXELFORMAT_UNCOMPRESSED_R4G4B4A4, // 16 bpp (4 bit alpha)
781
+ PIXELFORMAT_UNCOMPRESSED_R8G8B8A8, // 32 bpp
782
+ PIXELFORMAT_UNCOMPRESSED_R32, // 32 bpp (1 channel - float)
783
+ PIXELFORMAT_UNCOMPRESSED_R32G32B32, // 32*3 bpp (3 channels - float)
784
+ PIXELFORMAT_UNCOMPRESSED_R32G32B32A32, // 32*4 bpp (4 channels - float)
785
+ PIXELFORMAT_COMPRESSED_DXT1_RGB, // 4 bpp (no alpha)
786
+ PIXELFORMAT_COMPRESSED_DXT1_RGBA, // 4 bpp (1 bit alpha)
787
+ PIXELFORMAT_COMPRESSED_DXT3_RGBA, // 8 bpp
788
+ PIXELFORMAT_COMPRESSED_DXT5_RGBA, // 8 bpp
789
+ PIXELFORMAT_COMPRESSED_ETC1_RGB, // 4 bpp
790
+ PIXELFORMAT_COMPRESSED_ETC2_RGB, // 4 bpp
791
+ PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA, // 8 bpp
792
+ PIXELFORMAT_COMPRESSED_PVRT_RGB, // 4 bpp
793
+ PIXELFORMAT_COMPRESSED_PVRT_RGBA, // 4 bpp
794
+ PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA, // 8 bpp
795
+ PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA // 2 bpp
796
+ } PixelFormat;
797
+
798
+ // Texture parameters: filter mode
799
+ // NOTE 1: Filtering considers mipmaps if available in the texture
800
+ // NOTE 2: Filter is accordingly set for minification and magnification
801
+ typedef enum {
802
+ TEXTURE_FILTER_POINT = 0, // No filter, just pixel aproximation
803
+ TEXTURE_FILTER_BILINEAR, // Linear filtering
804
+ TEXTURE_FILTER_TRILINEAR, // Trilinear filtering (linear with mipmaps)
805
+ TEXTURE_FILTER_ANISOTROPIC_4X, // Anisotropic filtering 4x
806
+ TEXTURE_FILTER_ANISOTROPIC_8X, // Anisotropic filtering 8x
807
+ TEXTURE_FILTER_ANISOTROPIC_16X, // Anisotropic filtering 16x
808
+ } TextureFilter;
809
+
810
+ // Texture parameters: wrap mode
811
+ typedef enum {
812
+ TEXTURE_WRAP_REPEAT = 0, // Repeats texture in tiled mode
813
+ TEXTURE_WRAP_CLAMP, // Clamps texture to edge pixel in tiled mode
814
+ TEXTURE_WRAP_MIRROR_REPEAT, // Mirrors and repeats the texture in tiled mode
815
+ TEXTURE_WRAP_MIRROR_CLAMP // Mirrors and clamps to border the texture in tiled mode
816
+ } TextureWrap;
817
+
818
+ // Cubemap layouts
819
+ typedef enum {
820
+ CUBEMAP_LAYOUT_AUTO_DETECT = 0, // Automatically detect layout type
821
+ CUBEMAP_LAYOUT_LINE_VERTICAL, // Layout is defined by a vertical line with faces
822
+ CUBEMAP_LAYOUT_LINE_HORIZONTAL, // Layout is defined by an horizontal line with faces
823
+ CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR, // Layout is defined by a 3x4 cross with cubemap faces
824
+ CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE, // Layout is defined by a 4x3 cross with cubemap faces
825
+ CUBEMAP_LAYOUT_PANORAMA // Layout is defined by a panorama image (equirectangular map)
826
+ } CubemapLayout;
827
+
828
+ // Font type, defines generation method
829
+ typedef enum {
830
+ FONT_DEFAULT = 0, // Default font generation, anti-aliased
831
+ FONT_BITMAP, // Bitmap font generation, no anti-aliasing
832
+ FONT_SDF // SDF font generation, requires external shader
833
+ } FontType;
834
+
835
+ // Color blending modes (pre-defined)
836
+ typedef enum {
837
+ BLEND_ALPHA = 0, // Blend textures considering alpha (default)
838
+ BLEND_ADDITIVE, // Blend textures adding colors
839
+ BLEND_MULTIPLIED, // Blend textures multiplying colors
840
+ BLEND_ADD_COLORS, // Blend textures adding colors (alternative)
841
+ BLEND_SUBTRACT_COLORS, // Blend textures subtracting colors (alternative)
842
+ BLEND_CUSTOM // Belnd textures using custom src/dst factors (use rlSetBlendMode())
843
+ } BlendMode;
844
+
845
+ // Gesture
846
+ // NOTE: It could be used as flags to enable only some gestures
847
+ typedef enum {
848
+ GESTURE_NONE = 0, // No gesture
849
+ GESTURE_TAP = 1, // Tap gesture
850
+ GESTURE_DOUBLETAP = 2, // Double tap gesture
851
+ GESTURE_HOLD = 4, // Hold gesture
852
+ GESTURE_DRAG = 8, // Drag gesture
853
+ GESTURE_SWIPE_RIGHT = 16, // Swipe right gesture
854
+ GESTURE_SWIPE_LEFT = 32, // Swipe left gesture
855
+ GESTURE_SWIPE_UP = 64, // Swipe up gesture
856
+ GESTURE_SWIPE_DOWN = 128, // Swipe down gesture
857
+ GESTURE_PINCH_IN = 256, // Pinch in gesture
858
+ GESTURE_PINCH_OUT = 512 // Pinch out gesture
859
+ } Gesture;
860
+
861
+ // Camera system modes
862
+ typedef enum {
863
+ CAMERA_CUSTOM = 0, // Custom camera
864
+ CAMERA_FREE, // Free camera
865
+ CAMERA_ORBITAL, // Orbital camera
866
+ CAMERA_FIRST_PERSON, // First person camera
867
+ CAMERA_THIRD_PERSON // Third person camera
868
+ } CameraMode;
869
+
870
+ // Camera projection
871
+ typedef enum {
872
+ CAMERA_PERSPECTIVE = 0, // Perspective projection
873
+ CAMERA_ORTHOGRAPHIC // Orthographic projection
874
+ } CameraProjection;
875
+
876
+ // N-patch layout
877
+ typedef enum {
878
+ NPATCH_NINE_PATCH = 0, // Npatch layout: 3x3 tiles
879
+ NPATCH_THREE_PATCH_VERTICAL, // Npatch layout: 1x3 tiles
880
+ NPATCH_THREE_PATCH_HORIZONTAL // Npatch layout: 3x1 tiles
881
+ } NPatchLayout;
882
+
883
+ // Callbacks to hook some internal functions
884
+ // WARNING: This callbacks are intended for advance users
885
+ typedef void (*TraceLogCallback)(int logLevel, const char *text, va_list args); // Logging: Redirect trace log messages
886
+ typedef unsigned char *(*LoadFileDataCallback)(const char *fileName, unsigned int *bytesRead); // FileIO: Load binary data
887
+ typedef bool (*SaveFileDataCallback)(const char *fileName, void *data, unsigned int bytesToWrite); // FileIO: Save binary data
888
+ typedef char *(*LoadFileTextCallback)(const char *fileName); // FileIO: Load text data
889
+ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileIO: Save text data
890
+
891
+ //------------------------------------------------------------------------------------
892
+ // Global Variables Definition
893
+ //------------------------------------------------------------------------------------
894
+ // It's lonely here...
895
+
896
+ //------------------------------------------------------------------------------------
897
+ // Window and Graphics Device Functions (Module: core)
898
+ //------------------------------------------------------------------------------------
899
+
900
+ #if defined(__cplusplus)
901
+ extern "C" { // Prevents name mangling of functions
902
+ #endif
903
+
904
+ // Window-related functions
905
+ RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context
906
+ RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed
907
+ RLAPI void CloseWindow(void); // Close window and unload OpenGL context
908
+ RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
909
+ RLAPI bool IsWindowFullscreen(void); // Check if window is currently fullscreen
910
+ RLAPI bool IsWindowHidden(void); // Check if window is currently hidden (only PLATFORM_DESKTOP)
911
+ RLAPI bool IsWindowMinimized(void); // Check if window is currently minimized (only PLATFORM_DESKTOP)
912
+ RLAPI bool IsWindowMaximized(void); // Check if window is currently maximized (only PLATFORM_DESKTOP)
913
+ RLAPI bool IsWindowFocused(void); // Check if window is currently focused (only PLATFORM_DESKTOP)
914
+ RLAPI bool IsWindowResized(void); // Check if window has been resized last frame
915
+ RLAPI bool IsWindowState(unsigned int flag); // Check if one specific window flag is enabled
916
+ RLAPI void SetWindowState(unsigned int flags); // Set window configuration state using flags
917
+ RLAPI void ClearWindowState(unsigned int flags); // Clear window configuration state flags
918
+ RLAPI void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
919
+ RLAPI void MaximizeWindow(void); // Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
920
+ RLAPI void MinimizeWindow(void); // Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
921
+ RLAPI void RestoreWindow(void); // Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
922
+ RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP)
923
+ RLAPI void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP)
924
+ RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
925
+ RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode)
926
+ RLAPI void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
927
+ RLAPI void SetWindowSize(int width, int height); // Set window dimensions
928
+ RLAPI void *GetWindowHandle(void); // Get native window handle
929
+ RLAPI int GetScreenWidth(void); // Get current screen width
930
+ RLAPI int GetScreenHeight(void); // Get current screen height
931
+ RLAPI int GetMonitorCount(void); // Get number of connected monitors
932
+ RLAPI int GetCurrentMonitor(void); // Get current connected monitor
933
+ RLAPI Vector2 GetMonitorPosition(int monitor); // Get specified monitor position
934
+ RLAPI int GetMonitorWidth(int monitor); // Get specified monitor width (max available by monitor)
935
+ RLAPI int GetMonitorHeight(int monitor); // Get specified monitor height (max available by monitor)
936
+ RLAPI int GetMonitorPhysicalWidth(int monitor); // Get specified monitor physical width in millimetres
937
+ RLAPI int GetMonitorPhysicalHeight(int monitor); // Get specified monitor physical height in millimetres
938
+ RLAPI int GetMonitorRefreshRate(int monitor); // Get specified monitor refresh rate
939
+ RLAPI Vector2 GetWindowPosition(void); // Get window position XY on monitor
940
+ RLAPI Vector2 GetWindowScaleDPI(void); // Get window scale DPI factor
941
+ RLAPI const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the primary monitor
942
+ RLAPI void SetClipboardText(const char *text); // Set clipboard text content
943
+ RLAPI const char *GetClipboardText(void); // Get clipboard text content
944
+
945
+ // Custom frame control functions
946
+ // NOTE: Those functions are intended for advance users that want full control over the frame processing
947
+ // By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timming + PollInputEvents()
948
+ // To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
949
+ RLAPI void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing)
950
+ RLAPI void PollInputEvents(void); // Register all input events
951
+ RLAPI void WaitTime(float ms); // Wait for some milliseconds (halt program execution)
952
+
953
+ // Cursor-related functions
954
+ RLAPI void ShowCursor(void); // Shows cursor
955
+ RLAPI void HideCursor(void); // Hides cursor
956
+ RLAPI bool IsCursorHidden(void); // Check if cursor is not visible
957
+ RLAPI void EnableCursor(void); // Enables cursor (unlock cursor)
958
+ RLAPI void DisableCursor(void); // Disables cursor (lock cursor)
959
+ RLAPI bool IsCursorOnScreen(void); // Check if cursor is on the screen
960
+
961
+ // Drawing-related functions
962
+ RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color)
963
+ RLAPI void BeginDrawing(void); // Setup canvas (framebuffer) to start drawing
964
+ RLAPI void EndDrawing(void); // End canvas drawing and swap buffers (double buffering)
965
+ RLAPI void BeginMode2D(Camera2D camera); // Begin 2D mode with custom camera (2D)
966
+ RLAPI void EndMode2D(void); // Ends 2D mode with custom camera
967
+ RLAPI void BeginMode3D(Camera3D camera); // Begin 3D mode with custom camera (3D)
968
+ RLAPI void EndMode3D(void); // Ends 3D mode and returns to default 2D orthographic mode
969
+ RLAPI void BeginTextureMode(RenderTexture2D target); // Begin drawing to render texture
970
+ RLAPI void EndTextureMode(void); // Ends drawing to render texture
971
+ RLAPI void BeginShaderMode(Shader shader); // Begin custom shader drawing
972
+ RLAPI void EndShaderMode(void); // End custom shader drawing (use default shader)
973
+ RLAPI void BeginBlendMode(int mode); // Begin blending mode (alpha, additive, multiplied, subtract, custom)
974
+ RLAPI void EndBlendMode(void); // End blending mode (reset to default: alpha blending)
975
+ RLAPI void BeginScissorMode(int x, int y, int width, int height); // Begin scissor mode (define screen area for following drawing)
976
+ RLAPI void EndScissorMode(void); // End scissor mode
977
+ RLAPI void BeginVrStereoMode(VrStereoConfig config); // Begin stereo rendering (requires VR simulator)
978
+ RLAPI void EndVrStereoMode(void); // End stereo rendering (requires VR simulator)
979
+
980
+ // VR stereo config functions for VR simulator
981
+ RLAPI VrStereoConfig LoadVrStereoConfig(VrDeviceInfo device); // Load VR stereo config for VR simulator device parameters
982
+ RLAPI void UnloadVrStereoConfig(VrStereoConfig config); // Unload VR stereo config
983
+
984
+ // Shader management functions
985
+ // NOTE: Shader functionality is not available on OpenGL 1.1
986
+ RLAPI Shader LoadShader(const char *vsFileName, const char *fsFileName); // Load shader from files and bind default locations
987
+ RLAPI Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); // Load shader from code strings and bind default locations
988
+ RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
989
+ RLAPI int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location
990
+ RLAPI void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value
991
+ RLAPI void SetShaderValueV(Shader shader, int locIndex, const void *value, int uniformType, int count); // Set shader uniform value vector
992
+ RLAPI void SetShaderValueMatrix(Shader shader, int locIndex, Matrix mat); // Set shader uniform value (matrix 4x4)
993
+ RLAPI void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); // Set shader uniform value for texture (sampler2d)
994
+ RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM)
995
+
996
+ // Screen-space-related functions
997
+ RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Get a ray trace from mouse position
998
+ RLAPI Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix)
999
+ RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
1000
+ RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Get the screen space position for a 3d world space position
1001
+ RLAPI Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Get size position for a 3d world space position
1002
+ RLAPI Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Get the screen space position for a 2d camera world space position
1003
+ RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position
1004
+
1005
+ // Timing-related functions
1006
+ RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum)
1007
+ RLAPI int GetFPS(void); // Get current FPS
1008
+ RLAPI float GetFrameTime(void); // Get time in seconds for last frame drawn (delta time)
1009
+ RLAPI double GetTime(void); // Get elapsed time in seconds since InitWindow()
1010
+
1011
+ // Misc. functions
1012
+ RLAPI int GetRandomValue(int min, int max); // Get a random value between min and max (both included)
1013
+ RLAPI void SetRandomSeed(unsigned int seed); // Set the seed for the random number generator
1014
+ RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (filename extension defines format)
1015
+ RLAPI void SetConfigFlags(unsigned int flags); // Setup init configuration flags (view FLAGS)
1016
+
1017
+ RLAPI void TraceLog(int logLevel, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
1018
+ RLAPI void SetTraceLogLevel(int logLevel); // Set the current threshold (minimum) log level
1019
+ RLAPI void *MemAlloc(int size); // Internal memory allocator
1020
+ RLAPI void *MemRealloc(void *ptr, int size); // Internal memory reallocator
1021
+ RLAPI void MemFree(void *ptr); // Internal memory free
1022
+
1023
+ // Set custom callbacks
1024
+ // WARNING: Callbacks setup is intended for advance users
1025
+ RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log
1026
+ RLAPI void SetLoadFileDataCallback(LoadFileDataCallback callback); // Set custom file binary data loader
1027
+ RLAPI void SetSaveFileDataCallback(SaveFileDataCallback callback); // Set custom file binary data saver
1028
+ RLAPI void SetLoadFileTextCallback(LoadFileTextCallback callback); // Set custom file text data loader
1029
+ RLAPI void SetSaveFileTextCallback(SaveFileTextCallback callback); // Set custom file text data saver
1030
+
1031
+ // Files management functions
1032
+ RLAPI unsigned char *LoadFileData(const char *fileName, unsigned int *bytesRead); // Load file data as byte array (read)
1033
+ RLAPI void UnloadFileData(unsigned char *data); // Unload file data allocated by LoadFileData()
1034
+ RLAPI bool SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite); // Save data to file from byte array (write), returns true on success
1035
+ RLAPI char *LoadFileText(const char *fileName); // Load text data from file (read), returns a '\0' terminated string
1036
+ RLAPI void UnloadFileText(char *text); // Unload file text data allocated by LoadFileText()
1037
+ RLAPI bool SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success
1038
+ RLAPI bool FileExists(const char *fileName); // Check if file exists
1039
+ RLAPI bool DirectoryExists(const char *dirPath); // Check if a directory path exists
1040
+ RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension (including point: .png, .wav)
1041
+ RLAPI const char *GetFileExtension(const char *fileName); // Get pointer to extension for a filename string (includes dot: '.png')
1042
+ RLAPI const char *GetFileName(const char *filePath); // Get pointer to filename for a path string
1043
+ RLAPI const char *GetFileNameWithoutExt(const char *filePath); // Get filename string without extension (uses static string)
1044
+ RLAPI const char *GetDirectoryPath(const char *filePath); // Get full path for a given fileName with path (uses static string)
1045
+ RLAPI const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string)
1046
+ RLAPI const char *GetWorkingDirectory(void); // Get current working directory (uses static string)
1047
+ RLAPI char **GetDirectoryFiles(const char *dirPath, int *count); // Get filenames in a directory path (memory should be freed)
1048
+ RLAPI void ClearDirectoryFiles(void); // Clear directory files paths buffers (free memory)
1049
+ RLAPI bool ChangeDirectory(const char *dir); // Change working directory, return true on success
1050
+ RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window
1051
+ RLAPI char **GetDroppedFiles(int *count); // Get dropped files names (memory should be freed)
1052
+ RLAPI void ClearDroppedFiles(void); // Clear dropped files paths buffer (free memory)
1053
+ RLAPI long GetFileModTime(const char *fileName); // Get file modification time (last write time)
1054
+
1055
+ // Compression/Encoding functionality
1056
+ RLAPI unsigned char *CompressData(unsigned char *data, int dataLength, int *compDataLength); // Compress data (DEFLATE algorithm)
1057
+ RLAPI unsigned char *DecompressData(unsigned char *compData, int compDataLength, int *dataLength); // Decompress data (DEFLATE algorithm)
1058
+ RLAPI char *EncodeDataBase64(const unsigned char *data, int dataLength, int *outputLength); // Encode data to Base64 string
1059
+ RLAPI unsigned char *DecodeDataBase64(unsigned char *data, int *outputLength); // Decode Base64 string data
1060
+
1061
+ // Persistent storage management
1062
+ RLAPI bool SaveStorageValue(unsigned int position, int value); // Save integer value to storage file (to defined position), returns true on success
1063
+ RLAPI int LoadStorageValue(unsigned int position); // Load integer value from storage file (from defined position)
1064
+
1065
+ RLAPI void OpenURL(const char *url); // Open URL with default system browser (if available)
1066
+
1067
+ //------------------------------------------------------------------------------------
1068
+ // Input Handling Functions (Module: core)
1069
+ //------------------------------------------------------------------------------------
1070
+
1071
+ // Input-related functions: keyboard
1072
+ RLAPI bool IsKeyPressed(int key); // Check if a key has been pressed once
1073
+ RLAPI bool IsKeyDown(int key); // Check if a key is being pressed
1074
+ RLAPI bool IsKeyReleased(int key); // Check if a key has been released once
1075
+ RLAPI bool IsKeyUp(int key); // Check if a key is NOT being pressed
1076
+ RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
1077
+ RLAPI int GetKeyPressed(void); // Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
1078
+ RLAPI int GetCharPressed(void); // Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
1079
+
1080
+ // Input-related functions: gamepads
1081
+ RLAPI bool IsGamepadAvailable(int gamepad); // Check if a gamepad is available
1082
+ RLAPI const char *GetGamepadName(int gamepad); // Get gamepad internal name id
1083
+ RLAPI bool IsGamepadButtonPressed(int gamepad, int button); // Check if a gamepad button has been pressed once
1084
+ RLAPI bool IsGamepadButtonDown(int gamepad, int button); // Check if a gamepad button is being pressed
1085
+ RLAPI bool IsGamepadButtonReleased(int gamepad, int button); // Check if a gamepad button has been released once
1086
+ RLAPI bool IsGamepadButtonUp(int gamepad, int button); // Check if a gamepad button is NOT being pressed
1087
+ RLAPI int GetGamepadButtonPressed(void); // Get the last gamepad button pressed
1088
+ RLAPI int GetGamepadAxisCount(int gamepad); // Get gamepad axis count for a gamepad
1089
+ RLAPI float GetGamepadAxisMovement(int gamepad, int axis); // Get axis movement value for a gamepad axis
1090
+ RLAPI int SetGamepadMappings(const char *mappings); // Set internal gamepad mappings (SDL_GameControllerDB)
1091
+
1092
+ // Input-related functions: mouse
1093
+ RLAPI bool IsMouseButtonPressed(int button); // Check if a mouse button has been pressed once
1094
+ RLAPI bool IsMouseButtonDown(int button); // Check if a mouse button is being pressed
1095
+ RLAPI bool IsMouseButtonReleased(int button); // Check if a mouse button has been released once
1096
+ RLAPI bool IsMouseButtonUp(int button); // Check if a mouse button is NOT being pressed
1097
+ RLAPI int GetMouseX(void); // Get mouse position X
1098
+ RLAPI int GetMouseY(void); // Get mouse position Y
1099
+ RLAPI Vector2 GetMousePosition(void); // Get mouse position XY
1100
+ RLAPI Vector2 GetMouseDelta(void); // Get mouse delta between frames
1101
+ RLAPI void SetMousePosition(int x, int y); // Set mouse position XY
1102
+ RLAPI void SetMouseOffset(int offsetX, int offsetY); // Set mouse offset
1103
+ RLAPI void SetMouseScale(float scaleX, float scaleY); // Set mouse scaling
1104
+ RLAPI float GetMouseWheelMove(void); // Get mouse wheel movement Y
1105
+ RLAPI void SetMouseCursor(int cursor); // Set mouse cursor
1106
+
1107
+ // Input-related functions: touch
1108
+ RLAPI int GetTouchX(void); // Get touch position X for touch point 0 (relative to screen size)
1109
+ RLAPI int GetTouchY(void); // Get touch position Y for touch point 0 (relative to screen size)
1110
+ RLAPI Vector2 GetTouchPosition(int index); // Get touch position XY for a touch point index (relative to screen size)
1111
+ RLAPI int GetTouchPointId(int index); // Get touch point identifier for given index
1112
+ RLAPI int GetTouchPointCount(void); // Get number of touch points
1113
+
1114
+ //------------------------------------------------------------------------------------
1115
+ // Gestures and Touch Handling Functions (Module: rgestures)
1116
+ //------------------------------------------------------------------------------------
1117
+ RLAPI void SetGesturesEnabled(unsigned int flags); // Enable a set of gestures using flags
1118
+ RLAPI bool IsGestureDetected(int gesture); // Check if a gesture have been detected
1119
+ RLAPI int GetGestureDetected(void); // Get latest detected gesture
1120
+ RLAPI float GetGestureHoldDuration(void); // Get gesture hold time in milliseconds
1121
+ RLAPI Vector2 GetGestureDragVector(void); // Get gesture drag vector
1122
+ RLAPI float GetGestureDragAngle(void); // Get gesture drag angle
1123
+ RLAPI Vector2 GetGesturePinchVector(void); // Get gesture pinch delta
1124
+ RLAPI float GetGesturePinchAngle(void); // Get gesture pinch angle
1125
+
1126
+ //------------------------------------------------------------------------------------
1127
+ // Camera System Functions (Module: rcamera)
1128
+ //------------------------------------------------------------------------------------
1129
+ RLAPI void SetCameraMode(Camera camera, int mode); // Set camera mode (multiple camera modes available)
1130
+ RLAPI void UpdateCamera(Camera *camera); // Update camera position for selected mode
1131
+
1132
+ RLAPI void SetCameraPanControl(int keyPan); // Set camera pan key to combine with mouse movement (free camera)
1133
+ RLAPI void SetCameraAltControl(int keyAlt); // Set camera alt key to combine with mouse movement (free camera)
1134
+ RLAPI void SetCameraSmoothZoomControl(int keySmoothZoom); // Set camera smooth zoom key to combine with mouse (free camera)
1135
+ RLAPI void SetCameraMoveControls(int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown); // Set camera move controls (1st person and 3rd person cameras)
1136
+
1137
+ //------------------------------------------------------------------------------------
1138
+ // Basic Shapes Drawing Functions (Module: shapes)
1139
+ //------------------------------------------------------------------------------------
1140
+ // Set texture and rectangle to be used on shapes drawing
1141
+ // NOTE: It can be useful when using basic shapes and one single font,
1142
+ // defining a font char white rectangle would allow drawing everything in a single draw call
1143
+ RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Set texture and rectangle to be used on shapes drawing
1144
+
1145
+ // Basic shapes drawing functions
1146
+ RLAPI void DrawPixel(int posX, int posY, Color color); // Draw a pixel
1147
+ RLAPI void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version)
1148
+ RLAPI void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line
1149
+ RLAPI void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (Vector version)
1150
+ RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line defining thickness
1151
+ RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line using cubic-bezier curves in-out
1152
+ RLAPI void DrawLineBezierQuad(Vector2 startPos, Vector2 endPos, Vector2 controlPos, float thick, Color color); // Draw line using quadratic bezier curves with a control point
1153
+ RLAPI void DrawLineBezierCubic(Vector2 startPos, Vector2 endPos, Vector2 startControlPos, Vector2 endControlPos, float thick, Color color); // Draw line using cubic bezier curves with 2 control points
1154
+ RLAPI void DrawLineStrip(Vector2 *points, int pointCount, Color color); // Draw lines sequence
1155
+ RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle
1156
+ RLAPI void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle
1157
+ RLAPI void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline
1158
+ RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle
1159
+ RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
1160
+ RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
1161
+ RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse
1162
+ RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline
1163
+ RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring
1164
+ RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring outline
1165
+ RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
1166
+ RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
1167
+ RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
1168
+ RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters
1169
+ RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a vertical-gradient-filled rectangle
1170
+ RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a horizontal-gradient-filled rectangle
1171
+ RLAPI void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rectangle with custom vertex colors
1172
+ RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline
1173
+ RLAPI void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters
1174
+ RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
1175
+ RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline
1176
+ RLAPI void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
1177
+ RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline (vertex in counter-clockwise order!)
1178
+ RLAPI void DrawTriangleFan(Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
1179
+ RLAPI void DrawTriangleStrip(Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
1180
+ RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
1181
+ RLAPI void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
1182
+ RLAPI void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters
1183
+
1184
+ // Basic shapes collision detection functions
1185
+ RLAPI bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); // Check collision between two rectangles
1186
+ RLAPI bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); // Check collision between two circles
1187
+ RLAPI bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec); // Check collision between circle and rectangle
1188
+ RLAPI bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle
1189
+ RLAPI bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle
1190
+ RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle
1191
+ RLAPI bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference
1192
+ RLAPI bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
1193
+ RLAPI Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision
1194
+
1195
+ //------------------------------------------------------------------------------------
1196
+ // Texture Loading and Drawing Functions (Module: textures)
1197
+ //------------------------------------------------------------------------------------
1198
+
1199
+ // Image loading functions
1200
+ // NOTE: This functions do not require GPU access
1201
+ RLAPI Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM)
1202
+ RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data
1203
+ RLAPI Image LoadImageAnim(const char *fileName, int *frames); // Load image sequence from file (frames appended to image.data)
1204
+ RLAPI Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load image from memory buffer, fileType refers to extension: i.e. '.png'
1205
+ RLAPI Image LoadImageFromTexture(Texture2D texture); // Load image from GPU texture data
1206
+ RLAPI Image LoadImageFromScreen(void); // Load image from screen buffer and (screenshot)
1207
+ RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM)
1208
+ RLAPI bool ExportImage(Image image, const char *fileName); // Export image data to file, returns true on success
1209
+ RLAPI bool ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes, returns true on success
1210
+
1211
+ // Image generation functions
1212
+ RLAPI Image GenImageColor(int width, int height, Color color); // Generate image: plain color
1213
+ RLAPI Image GenImageGradientV(int width, int height, Color top, Color bottom); // Generate image: vertical gradient
1214
+ RLAPI Image GenImageGradientH(int width, int height, Color left, Color right); // Generate image: horizontal gradient
1215
+ RLAPI Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient
1216
+ RLAPI Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2); // Generate image: checked
1217
+ RLAPI Image GenImageWhiteNoise(int width, int height, float factor); // Generate image: white noise
1218
+ RLAPI Image GenImageCellular(int width, int height, int tileSize); // Generate image: cellular algorithm, bigger tileSize means bigger cells
1219
+
1220
+ // Image manipulation functions
1221
+ RLAPI Image ImageCopy(Image image); // Create an image duplicate (useful for transformations)
1222
+ RLAPI Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
1223
+ RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
1224
+ RLAPI Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
1225
+ RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
1226
+ RLAPI void ImageToPOT(Image *image, Color fill); // Convert image to POT (power-of-two)
1227
+ RLAPI void ImageCrop(Image *image, Rectangle crop); // Crop an image to a defined rectangle
1228
+ RLAPI void ImageAlphaCrop(Image *image, float threshold); // Crop image depending on alpha value
1229
+ RLAPI void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color
1230
+ RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
1231
+ RLAPI void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
1232
+ RLAPI void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
1233
+ RLAPI void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
1234
+ RLAPI void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color
1235
+ RLAPI void ImageMipmaps(Image *image); // Compute all mipmap levels for a provided image
1236
+ RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
1237
+ RLAPI void ImageFlipVertical(Image *image); // Flip image vertically
1238
+ RLAPI void ImageFlipHorizontal(Image *image); // Flip image horizontally
1239
+ RLAPI void ImageRotateCW(Image *image); // Rotate image clockwise 90deg
1240
+ RLAPI void ImageRotateCCW(Image *image); // Rotate image counter-clockwise 90deg
1241
+ RLAPI void ImageColorTint(Image *image, Color color); // Modify image color: tint
1242
+ RLAPI void ImageColorInvert(Image *image); // Modify image color: invert
1243
+ RLAPI void ImageColorGrayscale(Image *image); // Modify image color: grayscale
1244
+ RLAPI void ImageColorContrast(Image *image, float contrast); // Modify image color: contrast (-100 to 100)
1245
+ RLAPI void ImageColorBrightness(Image *image, int brightness); // Modify image color: brightness (-255 to 255)
1246
+ RLAPI void ImageColorReplace(Image *image, Color color, Color replace); // Modify image color: replace color
1247
+ RLAPI Color *LoadImageColors(Image image); // Load color data from image as a Color array (RGBA - 32bit)
1248
+ RLAPI Color *LoadImagePalette(Image image, int maxPaletteSize, int *colorCount); // Load colors palette from image as a Color array (RGBA - 32bit)
1249
+ RLAPI void UnloadImageColors(Color *colors); // Unload color data loaded with LoadImageColors()
1250
+ RLAPI void UnloadImagePalette(Color *colors); // Unload colors palette loaded with LoadImagePalette()
1251
+ RLAPI Rectangle GetImageAlphaBorder(Image image, float threshold); // Get image alpha border rectangle
1252
+ RLAPI Color GetImageColor(Image image, int x, int y); // Get image pixel color at (x, y) position
1253
+
1254
+ // Image drawing functions
1255
+ // NOTE: Image software-rendering functions (CPU)
1256
+ RLAPI void ImageClearBackground(Image *dst, Color color); // Clear image background with given color
1257
+ RLAPI void ImageDrawPixel(Image *dst, int posX, int posY, Color color); // Draw pixel within an image
1258
+ RLAPI void ImageDrawPixelV(Image *dst, Vector2 position, Color color); // Draw pixel within an image (Vector version)
1259
+ RLAPI void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw line within an image
1260
+ RLAPI void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color); // Draw line within an image (Vector version)
1261
+ RLAPI void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle within an image
1262
+ RLAPI void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw circle within an image (Vector version)
1263
+ RLAPI void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle within an image
1264
+ RLAPI void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version)
1265
+ RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
1266
+ RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image
1267
+ RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source)
1268
+ RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination)
1269
+ RLAPI void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination)
1270
+
1271
+ // Texture loading functions
1272
+ // NOTE: These functions require GPU access
1273
+ RLAPI Texture2D LoadTexture(const char *fileName); // Load texture from file into GPU memory (VRAM)
1274
+ RLAPI Texture2D LoadTextureFromImage(Image image); // Load texture from image data
1275
+ RLAPI TextureCubemap LoadTextureCubemap(Image image, int layout); // Load cubemap from image, multiple image cubemap layouts supported
1276
+ RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer)
1277
+ RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
1278
+ RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
1279
+ RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data
1280
+ RLAPI void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data
1281
+
1282
+ // Texture configuration functions
1283
+ RLAPI void GenTextureMipmaps(Texture2D *texture); // Generate GPU mipmaps for a texture
1284
+ RLAPI void SetTextureFilter(Texture2D texture, int filter); // Set texture scaling filter mode
1285
+ RLAPI void SetTextureWrap(Texture2D texture, int wrap); // Set texture wrapping mode
1286
+
1287
+ // Texture drawing functions
1288
+ RLAPI void DrawTexture(Texture2D texture, int posX, int posY, Color tint); // Draw a Texture2D
1289
+ RLAPI void DrawTextureV(Texture2D texture, Vector2 position, Color tint); // Draw a Texture2D with position defined as Vector2
1290
+ RLAPI void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters
1291
+ RLAPI void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
1292
+ RLAPI void DrawTextureQuad(Texture2D texture, Vector2 tiling, Vector2 offset, Rectangle quad, Color tint); // Draw texture quad with tiling and offset parameters
1293
+ RLAPI void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint); // Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.
1294
+ RLAPI void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters
1295
+ RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
1296
+ RLAPI void DrawTexturePoly(Texture2D texture, Vector2 center, Vector2 *points, Vector2 *texcoords, int pointCount, Color tint); // Draw a textured polygon
1297
+
1298
+ // Color/pixel related functions
1299
+ RLAPI Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
1300
+ RLAPI int ColorToInt(Color color); // Get hexadecimal value for a Color
1301
+ RLAPI Vector4 ColorNormalize(Color color); // Get Color normalized as float [0..1]
1302
+ RLAPI Color ColorFromNormalized(Vector4 normalized); // Get Color from normalized values [0..1]
1303
+ RLAPI Vector3 ColorToHSV(Color color); // Get HSV values for a Color, hue [0..360], saturation/value [0..1]
1304
+ RLAPI Color ColorFromHSV(float hue, float saturation, float value); // Get a Color from HSV values, hue [0..360], saturation/value [0..1]
1305
+ RLAPI Color ColorAlpha(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
1306
+ RLAPI Color ColorAlphaBlend(Color dst, Color src, Color tint); // Get src alpha-blended into dst color with tint
1307
+ RLAPI Color GetColor(unsigned int hexValue); // Get Color structure from hexadecimal value
1308
+ RLAPI Color GetPixelColor(void *srcPtr, int format); // Get Color from a source pixel pointer of certain format
1309
+ RLAPI void SetPixelColor(void *dstPtr, Color color, int format); // Set color formatted into destination pixel pointer
1310
+ RLAPI int GetPixelDataSize(int width, int height, int format); // Get pixel data size in bytes for certain format
1311
+
1312
+ //------------------------------------------------------------------------------------
1313
+ // Font Loading and Text Drawing Functions (Module: text)
1314
+ //------------------------------------------------------------------------------------
1315
+
1316
+ // Font loading/unloading functions
1317
+ RLAPI Font GetFontDefault(void); // Get the default Font
1318
+ RLAPI Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM)
1319
+ RLAPI Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int glyphCount); // Load font from file with extended parameters
1320
+ RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
1321
+ RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
1322
+ RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount, int type); // Load font data for further use
1323
+ RLAPI Image GenImageFontAtlas(const GlyphInfo *chars, Rectangle **recs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
1324
+ RLAPI void UnloadFontData(GlyphInfo *chars, int glyphCount); // Unload font chars info data (RAM)
1325
+ RLAPI void UnloadFont(Font font); // Unload Font from GPU memory (VRAM)
1326
+
1327
+ // Text drawing functions
1328
+ RLAPI void DrawFPS(int posX, int posY); // Draw current FPS
1329
+ RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font)
1330
+ RLAPI void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
1331
+ RLAPI void DrawTextPro(Font font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint); // Draw text using Font and pro parameters (rotation)
1332
+ RLAPI void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint); // Draw one character (codepoint)
1333
+
1334
+ // Text font info functions
1335
+ RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font
1336
+ RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font
1337
+ RLAPI int GetGlyphIndex(Font font, int codepoint); // Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found
1338
+ RLAPI GlyphInfo GetGlyphInfo(Font font, int codepoint); // Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found
1339
+ RLAPI Rectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
1340
+
1341
+ // Text codepoints management functions (unicode characters)
1342
+ RLAPI int *LoadCodepoints(const char *text, int *count); // Load all codepoints from a UTF-8 text string, codepoints count returned by parameter
1343
+ RLAPI void UnloadCodepoints(int *codepoints); // Unload codepoints data from memory
1344
+ RLAPI int GetCodepointCount(const char *text); // Get total number of codepoints in a UTF-8 encoded string
1345
+ RLAPI int GetCodepoint(const char *text, int *bytesProcessed); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
1346
+ RLAPI const char *CodepointToUTF8(int codepoint, int *byteSize); // Encode one codepoint into UTF-8 byte array (array length returned as parameter)
1347
+ RLAPI char *TextCodepointsToUTF8(int *codepoints, int length); // Encode text as codepoints array into UTF-8 text string (WARNING: memory must be freed!)
1348
+
1349
+ // Text strings management functions (no UTF-8 strings, only byte chars)
1350
+ // NOTE: Some strings allocate memory internally for returned strings, just be careful!
1351
+ RLAPI int TextCopy(char *dst, const char *src); // Copy one string to another, returns bytes copied
1352
+ RLAPI bool TextIsEqual(const char *text1, const char *text2); // Check if two text string are equal
1353
+ RLAPI unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending
1354
+ RLAPI const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf() style)
1355
+ RLAPI const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string
1356
+ RLAPI char *TextReplace(char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!)
1357
+ RLAPI char *TextInsert(const char *text, const char *insert, int position); // Insert text in a position (WARNING: memory must be freed!)
1358
+ RLAPI const char *TextJoin(const char **textList, int count, const char *delimiter); // Join text strings with delimiter
1359
+ RLAPI const char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings
1360
+ RLAPI void TextAppend(char *text, const char *append, int *position); // Append text at specific position and move cursor!
1361
+ RLAPI int TextFindIndex(const char *text, const char *find); // Find first text occurrence within a string
1362
+ RLAPI const char *TextToUpper(const char *text); // Get upper case version of provided string
1363
+ RLAPI const char *TextToLower(const char *text); // Get lower case version of provided string
1364
+ RLAPI const char *TextToPascal(const char *text); // Get Pascal case notation version of provided string
1365
+ RLAPI int TextToInteger(const char *text); // Get integer value from text (negative values not supported)
1366
+
1367
+ //------------------------------------------------------------------------------------
1368
+ // Basic 3d Shapes Drawing Functions (Module: models)
1369
+ //------------------------------------------------------------------------------------
1370
+
1371
+ // Basic geometric 3D shapes drawing functions
1372
+ RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space
1373
+ RLAPI void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line
1374
+ RLAPI void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
1375
+ RLAPI void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
1376
+ RLAPI void DrawTriangleStrip3D(Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points
1377
+ RLAPI void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
1378
+ RLAPI void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
1379
+ RLAPI void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires
1380
+ RLAPI void DrawCubeWiresV(Vector3 position, Vector3 size, Color color); // Draw cube wires (Vector version)
1381
+ RLAPI void DrawCubeTexture(Texture2D texture, Vector3 position, float width, float height, float length, Color color); // Draw cube textured
1382
+ RLAPI void DrawCubeTextureRec(Texture2D texture, Rectangle source, Vector3 position, float width, float height, float length, Color color); // Draw cube with a region of a texture
1383
+ RLAPI void DrawSphere(Vector3 centerPos, float radius, Color color); // Draw sphere
1384
+ RLAPI void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere with extended parameters
1385
+ RLAPI void DrawSphereWires(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere wires
1386
+ RLAPI void DrawCylinder(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color); // Draw a cylinder/cone
1387
+ RLAPI void DrawCylinderEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); // Draw a cylinder with base at startPos and top at endPos
1388
+ RLAPI void DrawCylinderWires(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color); // Draw a cylinder/cone wires
1389
+ RLAPI void DrawCylinderWiresEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); // Draw a cylinder wires with base at startPos and top at endPos
1390
+ RLAPI void DrawPlane(Vector3 centerPos, Vector2 size, Color color); // Draw a plane XZ
1391
+ RLAPI void DrawRay(Ray ray, Color color); // Draw a ray line
1392
+ RLAPI void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0))
1393
+
1394
+ //------------------------------------------------------------------------------------
1395
+ // Model 3d Loading and Drawing Functions (Module: models)
1396
+ //------------------------------------------------------------------------------------
1397
+
1398
+ // Model management functions
1399
+ RLAPI Model LoadModel(const char *fileName); // Load model from files (meshes and materials)
1400
+ RLAPI Model LoadModelFromMesh(Mesh mesh); // Load model from generated mesh (default material)
1401
+ RLAPI void UnloadModel(Model model); // Unload model (including meshes) from memory (RAM and/or VRAM)
1402
+ RLAPI void UnloadModelKeepMeshes(Model model); // Unload model (but not meshes) from memory (RAM and/or VRAM)
1403
+ RLAPI BoundingBox GetModelBoundingBox(Model model); // Compute model bounding box limits (considers all meshes)
1404
+
1405
+ // Model drawing functions
1406
+ RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
1407
+ RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters
1408
+ RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set)
1409
+ RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters
1410
+ RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires)
1411
+ RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint); // Draw a billboard texture
1412
+ RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
1413
+ RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation
1414
+
1415
+ // Mesh management functions
1416
+ RLAPI void UploadMesh(Mesh *mesh, bool dynamic); // Upload mesh vertex data in GPU and provide VAO/VBO ids
1417
+ RLAPI void UpdateMeshBuffer(Mesh mesh, int index, void *data, int dataSize, int offset); // Update mesh vertex data in GPU for a specific buffer index
1418
+ RLAPI void UnloadMesh(Mesh mesh); // Unload mesh data from CPU and GPU
1419
+ RLAPI void DrawMesh(Mesh mesh, Material material, Matrix transform); // Draw a 3d mesh with material and transform
1420
+ RLAPI void DrawMeshInstanced(Mesh mesh, Material material, Matrix *transforms, int instances); // Draw multiple mesh instances with material and different transforms
1421
+ RLAPI bool ExportMesh(Mesh mesh, const char *fileName); // Export mesh data to file, returns true on success
1422
+ RLAPI BoundingBox GetMeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits
1423
+ RLAPI void GenMeshTangents(Mesh *mesh); // Compute mesh tangents
1424
+ RLAPI void GenMeshBinormals(Mesh *mesh); // Compute mesh binormals
1425
+
1426
+ // Mesh generation functions
1427
+ RLAPI Mesh GenMeshPoly(int sides, float radius); // Generate polygonal mesh
1428
+ RLAPI Mesh GenMeshPlane(float width, float length, int resX, int resZ); // Generate plane mesh (with subdivisions)
1429
+ RLAPI Mesh GenMeshCube(float width, float height, float length); // Generate cuboid mesh
1430
+ RLAPI Mesh GenMeshSphere(float radius, int rings, int slices); // Generate sphere mesh (standard sphere)
1431
+ RLAPI Mesh GenMeshHemiSphere(float radius, int rings, int slices); // Generate half-sphere mesh (no bottom cap)
1432
+ RLAPI Mesh GenMeshCylinder(float radius, float height, int slices); // Generate cylinder mesh
1433
+ RLAPI Mesh GenMeshCone(float radius, float height, int slices); // Generate cone/pyramid mesh
1434
+ RLAPI Mesh GenMeshTorus(float radius, float size, int radSeg, int sides); // Generate torus mesh
1435
+ RLAPI Mesh GenMeshKnot(float radius, float size, int radSeg, int sides); // Generate trefoil knot mesh
1436
+ RLAPI Mesh GenMeshHeightmap(Image heightmap, Vector3 size); // Generate heightmap mesh from image data
1437
+ RLAPI Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize); // Generate cubes-based map mesh from image data
1438
+
1439
+ // Material loading/unloading functions
1440
+ RLAPI Material *LoadMaterials(const char *fileName, int *materialCount); // Load materials from model file
1441
+ RLAPI Material LoadMaterialDefault(void); // Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
1442
+ RLAPI void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM)
1443
+ RLAPI void SetMaterialTexture(Material *material, int mapType, Texture2D texture); // Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)
1444
+ RLAPI void SetModelMeshMaterial(Model *model, int meshId, int materialId); // Set material for a mesh
1445
+
1446
+ // Model animations loading/unloading functions
1447
+ RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, unsigned int *animCount); // Load model animations from file
1448
+ RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose
1449
+ RLAPI void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
1450
+ RLAPI void UnloadModelAnimations(ModelAnimation* animations, unsigned int count); // Unload animation array data
1451
+ RLAPI bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
1452
+
1453
+ // Collision detection functions
1454
+ RLAPI bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); // Check collision between two spheres
1455
+ RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Check collision between two bounding boxes
1456
+ RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius); // Check collision between box and sphere
1457
+ RLAPI RayCollision GetRayCollisionSphere(Ray ray, Vector3 center, float radius); // Get collision info between ray and sphere
1458
+ RLAPI RayCollision GetRayCollisionBox(Ray ray, BoundingBox box); // Get collision info between ray and box
1459
+ RLAPI RayCollision GetRayCollisionModel(Ray ray, Model model); // Get collision info between ray and model
1460
+ RLAPI RayCollision GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform); // Get collision info between ray and mesh
1461
+ RLAPI RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle
1462
+ RLAPI RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4); // Get collision info between ray and quad
1463
+
1464
+ //------------------------------------------------------------------------------------
1465
+ // Audio Loading and Playing Functions (Module: audio)
1466
+ //------------------------------------------------------------------------------------
1467
+
1468
+ // Audio device management functions
1469
+ RLAPI void InitAudioDevice(void); // Initialize audio device and context
1470
+ RLAPI void CloseAudioDevice(void); // Close the audio device and context
1471
+ RLAPI bool IsAudioDeviceReady(void); // Check if audio device has been initialized successfully
1472
+ RLAPI void SetMasterVolume(float volume); // Set master volume (listener)
1473
+
1474
+ // Wave/Sound loading/unloading functions
1475
+ RLAPI Wave LoadWave(const char *fileName); // Load wave data from file
1476
+ RLAPI Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
1477
+ RLAPI Sound LoadSound(const char *fileName); // Load sound from file
1478
+ RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
1479
+ RLAPI void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data
1480
+ RLAPI void UnloadWave(Wave wave); // Unload wave data
1481
+ RLAPI void UnloadSound(Sound sound); // Unload sound
1482
+ RLAPI bool ExportWave(Wave wave, const char *fileName); // Export wave data to file, returns true on success
1483
+ RLAPI bool ExportWaveAsCode(Wave wave, const char *fileName); // Export wave sample data to code (.h), returns true on success
1484
+
1485
+ // Wave/Sound management functions
1486
+ RLAPI void PlaySound(Sound sound); // Play a sound
1487
+ RLAPI void StopSound(Sound sound); // Stop playing a sound
1488
+ RLAPI void PauseSound(Sound sound); // Pause a sound
1489
+ RLAPI void ResumeSound(Sound sound); // Resume a paused sound
1490
+ RLAPI void PlaySoundMulti(Sound sound); // Play a sound (using multichannel buffer pool)
1491
+ RLAPI void StopSoundMulti(void); // Stop any sound playing (using multichannel buffer pool)
1492
+ RLAPI int GetSoundsPlaying(void); // Get number of sounds playing in the multichannel
1493
+ RLAPI bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing
1494
+ RLAPI void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level)
1495
+ RLAPI void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
1496
+ RLAPI void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format
1497
+ RLAPI Wave WaveCopy(Wave wave); // Copy a wave to a new wave
1498
+ RLAPI void WaveCrop(Wave *wave, int initSample, int finalSample); // Crop a wave to defined samples range
1499
+ RLAPI float *LoadWaveSamples(Wave wave); // Load samples data from wave as a floats array
1500
+ RLAPI void UnloadWaveSamples(float *samples); // Unload samples data loaded with LoadWaveSamples()
1501
+
1502
+ // Music management functions
1503
+ RLAPI Music LoadMusicStream(const char *fileName); // Load music stream from file
1504
+ RLAPI Music LoadMusicStreamFromMemory(const char *fileType, unsigned char *data, int dataSize); // Load music stream from data
1505
+ RLAPI void UnloadMusicStream(Music music); // Unload music stream
1506
+ RLAPI void PlayMusicStream(Music music); // Start music playing
1507
+ RLAPI bool IsMusicStreamPlaying(Music music); // Check if music is playing
1508
+ RLAPI void UpdateMusicStream(Music music); // Updates buffers for music streaming
1509
+ RLAPI void StopMusicStream(Music music); // Stop music playing
1510
+ RLAPI void PauseMusicStream(Music music); // Pause music playing
1511
+ RLAPI void ResumeMusicStream(Music music); // Resume playing paused music
1512
+ RLAPI void SeekMusicStream(Music music, float position); // Seek music to a position (in seconds)
1513
+ RLAPI void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level)
1514
+ RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level)
1515
+ RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds)
1516
+ RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds)
1517
+
1518
+ // AudioStream management functions
1519
+ RLAPI AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Load audio stream (to stream raw audio pcm data)
1520
+ RLAPI void UnloadAudioStream(AudioStream stream); // Unload audio stream and free memory
1521
+ RLAPI void UpdateAudioStream(AudioStream stream, const void *data, int frameCount); // Update audio stream buffers with data
1522
+ RLAPI bool IsAudioStreamProcessed(AudioStream stream); // Check if any audio stream buffers requires refill
1523
+ RLAPI void PlayAudioStream(AudioStream stream); // Play audio stream
1524
+ RLAPI void PauseAudioStream(AudioStream stream); // Pause audio stream
1525
+ RLAPI void ResumeAudioStream(AudioStream stream); // Resume audio stream
1526
+ RLAPI bool IsAudioStreamPlaying(AudioStream stream); // Check if audio stream is playing
1527
+ RLAPI void StopAudioStream(AudioStream stream); // Stop audio stream
1528
+ RLAPI void SetAudioStreamVolume(AudioStream stream, float volume); // Set volume for audio stream (1.0 is max level)
1529
+ RLAPI void SetAudioStreamPitch(AudioStream stream, float pitch); // Set pitch for audio stream (1.0 is base level)
1530
+ RLAPI void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
1531
+
1532
+ #if defined(__cplusplus)
1533
+ }
1534
+ #endif
1535
+
1536
+ #endif // RAYLIB_H