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.
- package/LICENSE.txt +661 -0
- package/README.md +50 -8
- package/package.json +24 -6
- package/src/call.hh +2 -1
- package/src/call_arm32.cc +498 -0
- package/src/call_arm32_fwd.S +108 -0
- package/src/call_arm64.cc +57 -57
- package/src/call_arm64_fwd.S +24 -29
- package/src/call_x64_sysv.cc +29 -43
- package/src/call_x64_win.cc +37 -40
- package/src/call_x86.cc +46 -59
- package/src/ffi.cc +29 -27
- package/src/ffi.hh +19 -12
- package/src/util.cc +58 -24
- package/src/util.hh +103 -19
- package/test/qemu/.gitkeep +0 -0
- package/test/registry/machines.json +112 -0
- package/test/registry/sha256sum.txt +21 -0
- package/test/test.js +493 -0
- package/vendor/dragonbox/CMakeLists.txt +122 -122
- package/vendor/dragonbox/LICENSE-Apache2-LLVM +218 -218
- package/vendor/dragonbox/LICENSE-Boost +23 -23
- package/vendor/dragonbox/README.md +277 -277
- package/vendor/dragonbox/cmake/dragonboxConfig.cmake +1 -1
- package/vendor/dragonbox/include/dragonbox/dragonbox.h +6 -2
- package/vendor/dragonbox/include/dragonbox/dragonbox_to_chars.h +108 -108
- package/vendor/dragonbox/other_files/Dragonbox.pdf +0 -0
- package/vendor/dragonbox/other_files/unknown_win64_vc2019.html +539 -539
- package/vendor/dragonbox/source/dragonbox_to_chars.cpp +303 -303
- package/vendor/dragonbox/subproject/3rdparty/grisu_exact/CMakeLists.txt +23 -23
- package/vendor/dragonbox/subproject/3rdparty/grisu_exact/fp_to_chars.cpp +238 -238
- package/vendor/dragonbox/subproject/3rdparty/grisu_exact/fp_to_chars.h +95 -95
- package/vendor/dragonbox/subproject/3rdparty/grisu_exact/grisu_exact.h +2666 -2666
- package/vendor/dragonbox/subproject/3rdparty/ryu/CMakeLists.txt +16 -16
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/common.h +114 -114
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/d2s.c +509 -509
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/d2s_full_table.h +367 -367
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/d2s_intrinsics.h +357 -357
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/digit_table.h +35 -35
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/f2s.c +345 -345
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/f2s_full_table.h +55 -55
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/f2s_intrinsics.h +128 -128
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/ryu.h +46 -46
- package/vendor/dragonbox/subproject/3rdparty/schubfach/CMakeLists.txt +21 -21
- package/vendor/dragonbox/subproject/3rdparty/schubfach/schubfach_32.cc +699 -699
- package/vendor/dragonbox/subproject/3rdparty/schubfach/schubfach_32.h +31 -31
- package/vendor/dragonbox/subproject/3rdparty/schubfach/schubfach_64.cc +1354 -1354
- package/vendor/dragonbox/subproject/3rdparty/schubfach/schubfach_64.h +31 -31
- package/vendor/dragonbox/subproject/3rdparty/shaded_plots/example_shaded_plots.m +68 -68
- package/vendor/dragonbox/subproject/3rdparty/shaded_plots/license.txt +25 -25
- package/vendor/dragonbox/subproject/3rdparty/shaded_plots/plot_distribution.m +92 -92
- package/vendor/dragonbox/subproject/3rdparty/shaded_plots/plot_distribution_prctile.m +121 -121
- package/vendor/dragonbox/subproject/3rdparty/shaded_plots/plot_histogram_shaded.m +99 -99
- package/vendor/dragonbox/subproject/3rdparty/shaded_plots/plot_shaded.m +93 -93
- package/vendor/dragonbox/subproject/benchmark/CMakeLists.txt +64 -64
- package/vendor/dragonbox/subproject/benchmark/include/benchmark.h +40 -40
- package/vendor/dragonbox/subproject/benchmark/matlab/plot_benchmarks.m +21 -21
- package/vendor/dragonbox/subproject/benchmark/matlab/plot_digit_benchmark.m +78 -78
- package/vendor/dragonbox/subproject/benchmark/matlab/plot_uniform_benchmark.m +95 -95
- package/vendor/dragonbox/subproject/benchmark/source/benchmark.cpp +237 -237
- package/vendor/dragonbox/subproject/benchmark/source/dragonbox.cpp +30 -30
- package/vendor/dragonbox/subproject/benchmark/source/grisu_exact.cpp +36 -36
- package/vendor/dragonbox/subproject/benchmark/source/ryu.cpp +27 -27
- package/vendor/dragonbox/subproject/benchmark/source/schubfach.cpp +31 -31
- package/vendor/dragonbox/subproject/common/CMakeLists.txt +41 -41
- package/vendor/dragonbox/subproject/common/include/best_rational_approx.h +96 -96
- package/vendor/dragonbox/subproject/common/include/big_uint.h +217 -217
- package/vendor/dragonbox/subproject/common/include/continued_fractions.h +173 -173
- package/vendor/dragonbox/subproject/common/include/good_rational_approx.h +266 -266
- package/vendor/dragonbox/subproject/common/include/random_float.h +182 -182
- package/vendor/dragonbox/subproject/common/include/rational_continued_fractions.h +56 -56
- package/vendor/dragonbox/subproject/common/source/big_uint.cpp +601 -601
- package/vendor/dragonbox/subproject/meta/CMakeLists.txt +40 -40
- package/vendor/dragonbox/subproject/meta/results/binary32_generated_cache.txt +81 -81
- package/vendor/dragonbox/subproject/meta/results/binary64_compressed_cache_error_table.txt +9 -9
- package/vendor/dragonbox/subproject/meta/results/binary64_generated_cache.txt +622 -622
- package/vendor/dragonbox/subproject/meta/source/generate_cache.cpp +126 -126
- package/vendor/dragonbox/subproject/meta/source/live_test.cpp +81 -81
- package/vendor/dragonbox/subproject/meta/source/perf_test.cpp +104 -104
- package/vendor/dragonbox/subproject/meta/source/sandbox.cpp +20 -20
- package/vendor/dragonbox/subproject/test/CMakeLists.txt +69 -69
- package/vendor/dragonbox/subproject/test/results/plot_required_bits.m +17 -17
- package/vendor/dragonbox/subproject/test/source/test_all_shorter_interval_cases.cpp +88 -88
- package/vendor/dragonbox/subproject/test/source/uniform_random_test.cpp +95 -95
- package/vendor/dragonbox/subproject/test/source/verify_cache_precision.cpp +337 -337
- package/vendor/dragonbox/subproject/test/source/verify_compressed_cache.cpp +154 -154
- package/vendor/dragonbox/subproject/test/source/verify_fast_multiplication.cpp +168 -168
- package/vendor/dragonbox/subproject/test/source/verify_log_computation.cpp +251 -251
- package/vendor/dragonbox/subproject/test/source/verify_magic_division.cpp +113 -113
- package/vendor/libcc/libcc.cc +36 -18
- package/vendor/libcc/libcc.hh +23 -1
- package/vendor/raylib/BINDINGS.md +123 -0
- package/vendor/raylib/CHANGELOG +1495 -0
- package/vendor/raylib/CMakeLists.txt +33 -0
- package/vendor/raylib/CMakeOptions.txt +87 -0
- package/vendor/raylib/CONTRIBUTING.md +76 -0
- package/vendor/raylib/CONTRIBUTORS.md +63 -0
- package/vendor/raylib/CONVENTIONS.md +95 -0
- package/vendor/raylib/HISTORY.md +364 -0
- package/vendor/raylib/LICENSE +16 -0
- package/vendor/raylib/README.md +141 -0
- package/vendor/raylib/ROADMAP.md +76 -0
- package/vendor/raylib/SPONSORS.md +68 -0
- package/vendor/raylib/cmake/AddIfFlagCompiles.cmake +12 -0
- package/vendor/raylib/cmake/BuildOptions.cmake +18 -0
- package/vendor/raylib/cmake/CompileDefinitions.cmake +110 -0
- package/vendor/raylib/cmake/CompilerFlags.cmake +79 -0
- package/vendor/raylib/cmake/EnumOption.cmake +9 -0
- package/vendor/raylib/cmake/GlfwImport.cmake +34 -0
- package/vendor/raylib/cmake/InstallConfigurations.cmake +29 -0
- package/vendor/raylib/cmake/JoinPaths.cmake +26 -0
- package/vendor/raylib/cmake/LibraryConfigurations.cmake +108 -0
- package/vendor/raylib/cmake/LibraryPathToLinkerFlags.cmake +24 -0
- package/vendor/raylib/cmake/PackConfigurations.cmake +13 -0
- package/vendor/raylib/cmake/PopulateConfigVariablesLocally.cmake +11 -0
- package/vendor/raylib/cmake/raylib-config-version.cmake +21 -0
- package/vendor/raylib/cmake/raylib-config.cmake +76 -0
- package/vendor/raylib/examples/CMakeLists.txt +139 -0
- package/vendor/raylib/examples/Makefile +565 -0
- package/vendor/raylib/examples/Makefile.Android +405 -0
- package/vendor/raylib/examples/Makefile.Web +1053 -0
- package/vendor/raylib/examples/README.md +203 -0
- package/vendor/raylib/examples/audio/audio_module_playing.c +146 -0
- package/vendor/raylib/examples/audio/audio_module_playing.png +0 -0
- package/vendor/raylib/examples/audio/audio_multichannel_sound.c +73 -0
- package/vendor/raylib/examples/audio/audio_multichannel_sound.png +0 -0
- package/vendor/raylib/examples/audio/audio_music_stream.c +93 -0
- package/vendor/raylib/examples/audio/audio_music_stream.png +0 -0
- package/vendor/raylib/examples/audio/audio_raw_stream.c +167 -0
- package/vendor/raylib/examples/audio/audio_raw_stream.png +0 -0
- package/vendor/raylib/examples/audio/audio_sound_loading.c +64 -0
- package/vendor/raylib/examples/audio/audio_sound_loading.png +0 -0
- package/vendor/raylib/examples/audio/resources/LICENSE.md +10 -0
- package/vendor/raylib/examples/audio/resources/coin.wav +0 -0
- package/vendor/raylib/examples/audio/resources/country.mp3 +0 -0
- package/vendor/raylib/examples/audio/resources/mini1111.xm +0 -0
- package/vendor/raylib/examples/audio/resources/sound.wav +0 -0
- package/vendor/raylib/examples/audio/resources/spring.wav +0 -0
- package/vendor/raylib/examples/audio/resources/target.flac +0 -0
- package/vendor/raylib/examples/audio/resources/target.ogg +0 -0
- package/vendor/raylib/examples/audio/resources/weird.wav +0 -0
- package/vendor/raylib/examples/build.zig +86 -0
- package/vendor/raylib/examples/core/core_2d_camera.c +132 -0
- package/vendor/raylib/examples/core/core_2d_camera.png +0 -0
- package/vendor/raylib/examples/core/core_2d_camera_platformer.c +293 -0
- package/vendor/raylib/examples/core/core_2d_camera_platformer.png +0 -0
- package/vendor/raylib/examples/core/core_2d_camera_smooth_pixelperfect.png +0 -0
- package/vendor/raylib/examples/core/core_3d_camera_first_person.c +97 -0
- package/vendor/raylib/examples/core/core_3d_camera_first_person.png +0 -0
- package/vendor/raylib/examples/core/core_3d_camera_free.c +83 -0
- package/vendor/raylib/examples/core/core_3d_camera_free.png +0 -0
- package/vendor/raylib/examples/core/core_3d_camera_mode.c +73 -0
- package/vendor/raylib/examples/core/core_3d_camera_mode.png +0 -0
- package/vendor/raylib/examples/core/core_3d_picking.c +107 -0
- package/vendor/raylib/examples/core/core_3d_picking.png +0 -0
- package/vendor/raylib/examples/core/core_basic_screen_manager.c +150 -0
- package/vendor/raylib/examples/core/core_basic_screen_manager.png +0 -0
- package/vendor/raylib/examples/core/core_basic_window.c +62 -0
- package/vendor/raylib/examples/core/core_basic_window.png +0 -0
- package/vendor/raylib/examples/core/core_basic_window_web.c +85 -0
- package/vendor/raylib/examples/core/core_custom_frame_control.c +125 -0
- package/vendor/raylib/examples/core/core_custom_frame_control.png +0 -0
- package/vendor/raylib/examples/core/core_custom_logging.c +84 -0
- package/vendor/raylib/examples/core/core_custom_logging.png +0 -0
- package/vendor/raylib/examples/core/core_drop_files.c +76 -0
- package/vendor/raylib/examples/core/core_drop_files.png +0 -0
- package/vendor/raylib/examples/core/core_input_gamepad.c +195 -0
- package/vendor/raylib/examples/core/core_input_gamepad.png +0 -0
- package/vendor/raylib/examples/core/core_input_gestures.c +115 -0
- package/vendor/raylib/examples/core/core_input_gestures.png +0 -0
- package/vendor/raylib/examples/core/core_input_keys.c +59 -0
- package/vendor/raylib/examples/core/core_input_keys.png +0 -0
- package/vendor/raylib/examples/core/core_input_mouse.c +65 -0
- package/vendor/raylib/examples/core/core_input_mouse.png +0 -0
- package/vendor/raylib/examples/core/core_input_mouse_wheel.c +58 -0
- package/vendor/raylib/examples/core/core_input_mouse_wheel.png +0 -0
- package/vendor/raylib/examples/core/core_input_multitouch.c +70 -0
- package/vendor/raylib/examples/core/core_input_multitouch.png +0 -0
- package/vendor/raylib/examples/core/core_loading_thread.c +147 -0
- package/vendor/raylib/examples/core/core_loading_thread.png +0 -0
- package/vendor/raylib/examples/core/core_quat_conversion.c +132 -0
- package/vendor/raylib/examples/core/core_quat_conversion.png +0 -0
- package/vendor/raylib/examples/core/core_random_values.c +67 -0
- package/vendor/raylib/examples/core/core_random_values.png +0 -0
- package/vendor/raylib/examples/core/core_scissor_test.c +71 -0
- package/vendor/raylib/examples/core/core_scissor_test.png +0 -0
- package/vendor/raylib/examples/core/core_smooth_pixelperfect.c +117 -0
- package/vendor/raylib/examples/core/core_smooth_pixelperfect.png +0 -0
- package/vendor/raylib/examples/core/core_split_screen.c +155 -0
- package/vendor/raylib/examples/core/core_split_screen.png +0 -0
- package/vendor/raylib/examples/core/core_storage_values.c +87 -0
- package/vendor/raylib/examples/core/core_storage_values.png +0 -0
- package/vendor/raylib/examples/core/core_vr_simulator.c +143 -0
- package/vendor/raylib/examples/core/core_vr_simulator.png +0 -0
- package/vendor/raylib/examples/core/core_window_flags.c +191 -0
- package/vendor/raylib/examples/core/core_window_flags.png +0 -0
- package/vendor/raylib/examples/core/core_window_letterbox.c +112 -0
- package/vendor/raylib/examples/core/core_window_letterbox.png +0 -0
- package/vendor/raylib/examples/core/core_world_screen.c +78 -0
- package/vendor/raylib/examples/core/core_world_screen.png +0 -0
- package/vendor/raylib/examples/core/resources/LICENSE.md +4 -0
- package/vendor/raylib/examples/core/resources/distortion100.fs +52 -0
- package/vendor/raylib/examples/core/resources/distortion330.fs +53 -0
- package/vendor/raylib/examples/core/resources/ps3.png +0 -0
- package/vendor/raylib/examples/core/resources/xbox.png +0 -0
- package/vendor/raylib/examples/examples_template.c +100 -0
- package/vendor/raylib/examples/models/models_animation.c +114 -0
- package/vendor/raylib/examples/models/models_animation.png +0 -0
- package/vendor/raylib/examples/models/models_billboard.c +75 -0
- package/vendor/raylib/examples/models/models_billboard.png +0 -0
- package/vendor/raylib/examples/models/models_box_collisions.c +121 -0
- package/vendor/raylib/examples/models/models_box_collisions.png +0 -0
- package/vendor/raylib/examples/models/models_cubicmap.c +87 -0
- package/vendor/raylib/examples/models/models_cubicmap.png +0 -0
- package/vendor/raylib/examples/models/models_first_person_maze.c +122 -0
- package/vendor/raylib/examples/models/models_first_person_maze.png +0 -0
- package/vendor/raylib/examples/models/models_geometric_shapes.c +80 -0
- package/vendor/raylib/examples/models/models_geometric_shapes.png +0 -0
- package/vendor/raylib/examples/models/models_heightmap.c +82 -0
- package/vendor/raylib/examples/models/models_heightmap.png +0 -0
- package/vendor/raylib/examples/models/models_loading.c +146 -0
- package/vendor/raylib/examples/models/models_loading.png +0 -0
- package/vendor/raylib/examples/models/models_loading_gltf.c +105 -0
- package/vendor/raylib/examples/models/models_loading_gltf.png +0 -0
- package/vendor/raylib/examples/models/models_loading_vox.c +130 -0
- package/vendor/raylib/examples/models/models_loading_vox.png +0 -0
- package/vendor/raylib/examples/models/models_mesh_generation.c +179 -0
- package/vendor/raylib/examples/models/models_mesh_generation.png +0 -0
- package/vendor/raylib/examples/models/models_mesh_picking.c +223 -0
- package/vendor/raylib/examples/models/models_mesh_picking.png +0 -0
- package/vendor/raylib/examples/models/models_orthographic_projection.c +99 -0
- package/vendor/raylib/examples/models/models_orthographic_projection.png +0 -0
- package/vendor/raylib/examples/models/models_rlgl_solar_system.c +172 -0
- package/vendor/raylib/examples/models/models_rlgl_solar_system.png +0 -0
- package/vendor/raylib/examples/models/models_skybox.c +262 -0
- package/vendor/raylib/examples/models/models_skybox.png +0 -0
- package/vendor/raylib/examples/models/models_waving_cubes.c +112 -0
- package/vendor/raylib/examples/models/models_waving_cubes.png +0 -0
- package/vendor/raylib/examples/models/models_yaw_pitch_roll.c +117 -0
- package/vendor/raylib/examples/models/models_yaw_pitch_roll.png +0 -0
- package/vendor/raylib/examples/models/resources/LICENSE.md +23 -0
- package/vendor/raylib/examples/models/resources/billboard.png +0 -0
- package/vendor/raylib/examples/models/resources/cubicmap.png +0 -0
- package/vendor/raylib/examples/models/resources/cubicmap_atlas.png +0 -0
- package/vendor/raylib/examples/models/resources/dresden_square_1k.hdr +0 -0
- package/vendor/raylib/examples/models/resources/dresden_square_2k.hdr +0 -0
- package/vendor/raylib/examples/models/resources/heightmap.png +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/AnimatedMorphCube.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/AnimatedTriangle.gltf +118 -0
- package/vendor/raylib/examples/models/resources/models/gltf/BoxAnimated.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/LICENSE +23 -0
- package/vendor/raylib/examples/models/resources/models/gltf/girl.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/raylib_32x32.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/rigged_figure.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/gltf/vertex_colored_object.glb +0 -0
- package/vendor/raylib/examples/models/resources/models/iqm/guy.blend +0 -0
- package/vendor/raylib/examples/models/resources/models/iqm/guy.iqm +0 -0
- package/vendor/raylib/examples/models/resources/models/iqm/guyanim.iqm +0 -0
- package/vendor/raylib/examples/models/resources/models/iqm/guytex.png +0 -0
- package/vendor/raylib/examples/models/resources/models/iqm/vertex_colored_object.iqm +0 -0
- package/vendor/raylib/examples/models/resources/models/obj/bridge.obj +1725 -0
- package/vendor/raylib/examples/models/resources/models/obj/bridge_diffuse.png +0 -0
- package/vendor/raylib/examples/models/resources/models/obj/castle.obj +12919 -0
- package/vendor/raylib/examples/models/resources/models/obj/castle_diffuse.png +0 -0
- package/vendor/raylib/examples/models/resources/models/obj/cube.obj +68 -0
- package/vendor/raylib/examples/models/resources/models/obj/cube_diffuse.png +0 -0
- package/vendor/raylib/examples/models/resources/models/obj/house.obj +4564 -0
- package/vendor/raylib/examples/models/resources/models/obj/house_diffuse.png +0 -0
- package/vendor/raylib/examples/models/resources/models/obj/market.obj +7301 -0
- package/vendor/raylib/examples/models/resources/models/obj/market_diffuse.png +0 -0
- package/vendor/raylib/examples/models/resources/models/obj/plane.obj +10858 -0
- package/vendor/raylib/examples/models/resources/models/obj/plane_diffuse.png +0 -0
- package/vendor/raylib/examples/models/resources/models/obj/turret.obj +1888 -0
- package/vendor/raylib/examples/models/resources/models/obj/turret_diffuse.png +0 -0
- package/vendor/raylib/examples/models/resources/models/obj/well.obj +1030 -0
- package/vendor/raylib/examples/models/resources/models/obj/well_diffuse.png +0 -0
- package/vendor/raylib/examples/models/resources/models/vox/LICENSE +9 -0
- package/vendor/raylib/examples/models/resources/models/vox/chr_knight.vox +0 -0
- package/vendor/raylib/examples/models/resources/models/vox/chr_sword.vox +0 -0
- package/vendor/raylib/examples/models/resources/models/vox/monu9.vox +0 -0
- package/vendor/raylib/examples/models/resources/shaders/glsl100/cubemap.fs +29 -0
- package/vendor/raylib/examples/models/resources/shaders/glsl100/cubemap.vs +20 -0
- package/vendor/raylib/examples/models/resources/shaders/glsl100/skybox.fs +31 -0
- package/vendor/raylib/examples/models/resources/shaders/glsl100/skybox.vs +24 -0
- package/vendor/raylib/examples/models/resources/shaders/glsl330/cubemap.fs +30 -0
- package/vendor/raylib/examples/models/resources/shaders/glsl330/cubemap.vs +20 -0
- package/vendor/raylib/examples/models/resources/shaders/glsl330/skybox.fs +30 -0
- package/vendor/raylib/examples/models/resources/shaders/glsl330/skybox.vs +24 -0
- package/vendor/raylib/examples/models/resources/skybox.png +0 -0
- package/vendor/raylib/examples/models/rlights.h +183 -0
- package/vendor/raylib/examples/others/easings.h +263 -0
- package/vendor/raylib/examples/others/easings_testbed.c +227 -0
- package/vendor/raylib/examples/others/embedded_files_loading.c +103 -0
- package/vendor/raylib/examples/others/external/include/GLFW/glfw3.h +5538 -0
- package/vendor/raylib/examples/others/external/include/GLFW/glfw3native.h +572 -0
- package/vendor/raylib/examples/others/external/include/glad.h +5466 -0
- package/vendor/raylib/examples/others/external/lib/libglfw3.a +0 -0
- package/vendor/raylib/examples/others/raudio_standalone.c +152 -0
- package/vendor/raylib/examples/others/raylib_opengl_interop.c +152 -0
- package/vendor/raylib/examples/others/raylib_opengl_interop.png +0 -0
- package/vendor/raylib/examples/others/resources/audio/country.mp3 +0 -0
- package/vendor/raylib/examples/others/resources/audio/target.ogg +0 -0
- package/vendor/raylib/examples/others/resources/audio/weird.wav +0 -0
- package/vendor/raylib/examples/others/resources/audio_data.h +4893 -0
- package/vendor/raylib/examples/others/resources/image_data.h +9848 -0
- package/vendor/raylib/examples/others/resources/shaders/glsl100/point_particle.fs +16 -0
- package/vendor/raylib/examples/others/resources/shaders/glsl100/point_particle.vs +24 -0
- package/vendor/raylib/examples/others/resources/shaders/glsl330/point_particle.fs +17 -0
- package/vendor/raylib/examples/others/resources/shaders/glsl330/point_particle.vs +24 -0
- package/vendor/raylib/examples/others/resources/shaders/glsl430/gol.glsl +41 -0
- package/vendor/raylib/examples/others/resources/shaders/glsl430/gol_render.glsl +29 -0
- package/vendor/raylib/examples/others/resources/shaders/glsl430/gol_transfert.glsl +51 -0
- package/vendor/raylib/examples/others/rlgl_compute_shader.c +173 -0
- package/vendor/raylib/examples/others/rlgl_standalone.c +469 -0
- package/vendor/raylib/examples/physics/physics_demo.c +128 -0
- package/vendor/raylib/examples/physics/physics_demo.png +0 -0
- package/vendor/raylib/examples/physics/physics_friction.c +142 -0
- package/vendor/raylib/examples/physics/physics_friction.png +0 -0
- package/vendor/raylib/examples/physics/physics_movement.c +128 -0
- package/vendor/raylib/examples/physics/physics_movement.png +0 -0
- package/vendor/raylib/examples/physics/physics_restitution.c +129 -0
- package/vendor/raylib/examples/physics/physics_restitution.png +0 -0
- package/vendor/raylib/examples/physics/physics_shatter.c +111 -0
- package/vendor/raylib/examples/physics/physics_shatter.png +0 -0
- package/vendor/raylib/examples/raylib_compile_execute.bat +32 -0
- package/vendor/raylib/examples/raylib_makefile_example.bat +27 -0
- package/vendor/raylib/examples/shaders/resources/LICENSE.md +11 -0
- package/vendor/raylib/examples/shaders/resources/fudesumi.png +0 -0
- package/vendor/raylib/examples/shaders/resources/mask.png +0 -0
- package/vendor/raylib/examples/shaders/resources/models/barracks.obj +22251 -0
- package/vendor/raylib/examples/shaders/resources/models/barracks_diffuse.png +0 -0
- package/vendor/raylib/examples/shaders/resources/models/church.obj +5116 -0
- package/vendor/raylib/examples/shaders/resources/models/church_diffuse.png +0 -0
- package/vendor/raylib/examples/shaders/resources/models/watermill.obj +5316 -0
- package/vendor/raylib/examples/shaders/resources/models/watermill_diffuse.png +0 -0
- package/vendor/raylib/examples/shaders/resources/plasma.png +0 -0
- package/vendor/raylib/examples/shaders/resources/raysan.png +0 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/base.fs +23 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/base.vs +26 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/base_lighting.vs +59 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/base_lighting_instanced.vs +36 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/bloom.fs +39 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/blur.fs +34 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/color_mix.fs +26 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/cross_hatching.fs +47 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/cross_stitching.fs +57 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/cubes_panning.fs +60 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/depth.fs +26 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/distortion.fs +54 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/dream_vision.fs +37 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/eratosthenes.fs +60 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/fisheye.fs +43 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/fog.fs +94 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/grayscale.fs +25 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/julia_set.fs +83 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/lighting.fs +81 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/mask.fs +24 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/outline.fs +34 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/palette_switch.fs +41 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/pixelizer.fs +32 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/posterization.fs +29 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/predator.fs +31 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/raymarching.fs +431 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/reload.fs +39 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/scanlines.fs +44 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/sobel.fs +40 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/spotlight.fs +77 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/swirl.fs +46 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl100/wave.fs +36 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/base.fs +22 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/base.vs +26 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/base_lighting.vs +59 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/bloom.fs +37 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/blur.fs +32 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/cross_hatching.fs +45 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/cross_stitching.fs +55 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/distortion.fs +52 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/dream_vision.fs +35 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/fisheye.fs +41 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/fog.fs +92 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/grayscale.fs +23 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/palette_switch.fs +27 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/pixelizer.fs +30 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/posterization.fs +27 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/predator.fs +29 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/scanlines.fs +42 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/sobel.fs +38 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl120/swirl.fs +44 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/base.fs +25 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/base.vs +26 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/base_lighting.vs +32 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/base_lighting_instanced.vs +36 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/bloom.fs +40 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/blur.fs +35 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/color_mix.fs +27 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/cross_hatching.fs +48 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/cross_stitching.fs +59 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/cubes_panning.fs +61 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/depth.fs +27 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/distortion.fs +56 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/dream_vision.fs +34 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/eratosthenes.fs +59 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/fisheye.fs +40 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/fog.fs +95 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/grayscale.fs +26 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/julia_set.fs +81 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/lighting.fs +82 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/mask.fs +22 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/outline.fs +35 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/overdraw.fs +26 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/palette_switch.fs +30 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/pixelizer.fs +33 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/posterization.fs +31 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/predator.fs +32 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/raymarching.fs +430 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/reload.fs +40 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/scanlines.fs +49 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/sobel.fs +41 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/spotlight.fs +65 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/swirl.fs +47 -0
- package/vendor/raylib/examples/shaders/resources/shaders/glsl330/wave.fs +37 -0
- package/vendor/raylib/examples/shaders/resources/space.png +0 -0
- package/vendor/raylib/examples/shaders/resources/texel_checker.png +0 -0
- package/vendor/raylib/examples/shaders/rlights.h +183 -0
- package/vendor/raylib/examples/shaders/shaders_basic_lighting.c +152 -0
- package/vendor/raylib/examples/shaders/shaders_basic_lighting.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_custom_uniform.c +127 -0
- package/vendor/raylib/examples/shaders/shaders_custom_uniform.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_eratosthenes.c +92 -0
- package/vendor/raylib/examples/shaders/shaders_eratosthenes.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_fog.c +160 -0
- package/vendor/raylib/examples/shaders/shaders_fog.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_hot_reloading.c +130 -0
- package/vendor/raylib/examples/shaders/shaders_hot_reloading.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_julia_set.c +191 -0
- package/vendor/raylib/examples/shaders/shaders_julia_set.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_mesh_instancing.c +224 -0
- package/vendor/raylib/examples/shaders/shaders_mesh_instancing.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_model_shader.c +103 -0
- package/vendor/raylib/examples/shaders/shaders_model_shader.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_multi_sample2d.c +105 -0
- package/vendor/raylib/examples/shaders/shaders_multi_sample2d.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_palette_switch.c +147 -0
- package/vendor/raylib/examples/shaders/shaders_palette_switch.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_postprocessing.c +170 -0
- package/vendor/raylib/examples/shaders/shaders_postprocessing.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_raymarching.c +113 -0
- package/vendor/raylib/examples/shaders/shaders_raymarching.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_shapes_textures.c +116 -0
- package/vendor/raylib/examples/shaders/shaders_shapes_textures.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_simple_mask.c +144 -0
- package/vendor/raylib/examples/shaders/shaders_simple_mask.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_spotlight.c +254 -0
- package/vendor/raylib/examples/shaders/shaders_spotlight.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_texture_drawing.c +80 -0
- package/vendor/raylib/examples/shaders/shaders_texture_drawing.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_texture_outline.c +97 -0
- package/vendor/raylib/examples/shaders/shaders_texture_outline.png +0 -0
- package/vendor/raylib/examples/shaders/shaders_texture_waves.c +110 -0
- package/vendor/raylib/examples/shaders/shaders_texture_waves.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_basic_shapes.c +78 -0
- package/vendor/raylib/examples/shapes/shapes_basic_shapes.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_bouncing_ball.c +76 -0
- package/vendor/raylib/examples/shapes/shapes_bouncing_ball.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_collision_area.c +108 -0
- package/vendor/raylib/examples/shapes/shapes_collision_area.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_colors_palette.c +99 -0
- package/vendor/raylib/examples/shapes/shapes_colors_palette.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_draw_circle_sector.c +83 -0
- package/vendor/raylib/examples/shapes/shapes_draw_circle_sector.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_draw_rectangle_rounded.c +89 -0
- package/vendor/raylib/examples/shapes/shapes_draw_rectangle_rounded.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_draw_ring.c +96 -0
- package/vendor/raylib/examples/shapes/shapes_draw_ring.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_easings_ball_anim.c +110 -0
- package/vendor/raylib/examples/shapes/shapes_easings_ball_anim.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_easings_box_anim.c +136 -0
- package/vendor/raylib/examples/shapes/shapes_easings_box_anim.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_easings_rectangle_array.c +118 -0
- package/vendor/raylib/examples/shapes/shapes_easings_rectangle_array.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_following_eyes.c +104 -0
- package/vendor/raylib/examples/shapes/shapes_following_eyes.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_lines_bezier.c +59 -0
- package/vendor/raylib/examples/shapes/shapes_lines_bezier.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_logo_raylib.c +56 -0
- package/vendor/raylib/examples/shapes/shapes_logo_raylib.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_logo_raylib_anim.c +160 -0
- package/vendor/raylib/examples/shapes/shapes_logo_raylib_anim.png +0 -0
- package/vendor/raylib/examples/shapes/shapes_rectangle_scaling.c +94 -0
- package/vendor/raylib/examples/shapes/shapes_rectangle_scaling.png +0 -0
- package/vendor/raylib/examples/text/resources/KAISG.ttf +0 -0
- package/vendor/raylib/examples/text/resources/LICENSE.md +20 -0
- package/vendor/raylib/examples/text/resources/anonymous_pro_bold.ttf +0 -0
- package/vendor/raylib/examples/text/resources/custom_alagard.png +0 -0
- package/vendor/raylib/examples/text/resources/custom_jupiter_crash.png +0 -0
- package/vendor/raylib/examples/text/resources/custom_mecha.png +0 -0
- package/vendor/raylib/examples/text/resources/dejavu.fnt +1115 -0
- package/vendor/raylib/examples/text/resources/dejavu.png +0 -0
- package/vendor/raylib/examples/text/resources/fonts/alagard.png +0 -0
- package/vendor/raylib/examples/text/resources/fonts/alpha_beta.png +0 -0
- package/vendor/raylib/examples/text/resources/fonts/jupiter_crash.png +0 -0
- package/vendor/raylib/examples/text/resources/fonts/mecha.png +0 -0
- package/vendor/raylib/examples/text/resources/fonts/pixantiqua.png +0 -0
- package/vendor/raylib/examples/text/resources/fonts/pixelplay.png +0 -0
- package/vendor/raylib/examples/text/resources/fonts/romulus.png +0 -0
- package/vendor/raylib/examples/text/resources/fonts/setback.png +0 -0
- package/vendor/raylib/examples/text/resources/noto_cjk.fnt +580 -0
- package/vendor/raylib/examples/text/resources/noto_cjk.png +0 -0
- package/vendor/raylib/examples/text/resources/pixantiqua.fnt +188 -0
- package/vendor/raylib/examples/text/resources/pixantiqua.png +0 -0
- package/vendor/raylib/examples/text/resources/pixantiqua.ttf +0 -0
- package/vendor/raylib/examples/text/resources/shaders/glsl100/alpha_discard.fs +20 -0
- package/vendor/raylib/examples/text/resources/shaders/glsl100/sdf.fs +25 -0
- package/vendor/raylib/examples/text/resources/shaders/glsl330/alpha_discard.fs +19 -0
- package/vendor/raylib/examples/text/resources/shaders/glsl330/sdf.fs +26 -0
- package/vendor/raylib/examples/text/resources/symbola.fnt +191 -0
- package/vendor/raylib/examples/text/resources/symbola.png +0 -0
- package/vendor/raylib/examples/text/text_draw_3d.c +739 -0
- package/vendor/raylib/examples/text/text_draw_3d.png +0 -0
- package/vendor/raylib/examples/text/text_font_filters.c +134 -0
- package/vendor/raylib/examples/text/text_font_filters.png +0 -0
- package/vendor/raylib/examples/text/text_font_loading.c +91 -0
- package/vendor/raylib/examples/text/text_font_loading.png +0 -0
- package/vendor/raylib/examples/text/text_font_sdf.c +141 -0
- package/vendor/raylib/examples/text/text_font_sdf.png +0 -0
- package/vendor/raylib/examples/text/text_font_spritefont.c +85 -0
- package/vendor/raylib/examples/text/text_font_spritefont.png +0 -0
- package/vendor/raylib/examples/text/text_format_text.c +62 -0
- package/vendor/raylib/examples/text/text_format_text.png +0 -0
- package/vendor/raylib/examples/text/text_input_box.c +127 -0
- package/vendor/raylib/examples/text/text_input_box.png +0 -0
- package/vendor/raylib/examples/text/text_raylib_fonts.c +105 -0
- package/vendor/raylib/examples/text/text_raylib_fonts.png +0 -0
- package/vendor/raylib/examples/text/text_rectangle_bounds.c +264 -0
- package/vendor/raylib/examples/text/text_rectangle_bounds.png +0 -0
- package/vendor/raylib/examples/text/text_unicode.c +465 -0
- package/vendor/raylib/examples/text/text_unicode.png +0 -0
- package/vendor/raylib/examples/text/text_writing_anim.c +62 -0
- package/vendor/raylib/examples/text/text_writing_anim.png +0 -0
- package/vendor/raylib/examples/textures/resources/KAISG.ttf +0 -0
- package/vendor/raylib/examples/textures/resources/LICENSE.md +18 -0
- package/vendor/raylib/examples/textures/resources/boom.wav +0 -0
- package/vendor/raylib/examples/textures/resources/button.png +0 -0
- package/vendor/raylib/examples/textures/resources/buttonfx.wav +0 -0
- package/vendor/raylib/examples/textures/resources/cat.png +0 -0
- package/vendor/raylib/examples/textures/resources/custom_jupiter_crash.png +0 -0
- package/vendor/raylib/examples/textures/resources/cyberpunk_street_background.png +0 -0
- package/vendor/raylib/examples/textures/resources/cyberpunk_street_foreground.png +0 -0
- package/vendor/raylib/examples/textures/resources/cyberpunk_street_midground.png +0 -0
- package/vendor/raylib/examples/textures/resources/explosion.png +0 -0
- package/vendor/raylib/examples/textures/resources/fudesumi.png +0 -0
- package/vendor/raylib/examples/textures/resources/fudesumi.raw +0 -0
- package/vendor/raylib/examples/textures/resources/ninepatch_button.png +0 -0
- package/vendor/raylib/examples/textures/resources/parrots.png +0 -0
- package/vendor/raylib/examples/textures/resources/patterns.png +0 -0
- package/vendor/raylib/examples/textures/resources/raylib_logo.png +0 -0
- package/vendor/raylib/examples/textures/resources/scarfy.png +0 -0
- package/vendor/raylib/examples/textures/resources/spark_flame.png +0 -0
- package/vendor/raylib/examples/textures/resources/wabbit_alpha.png +0 -0
- package/vendor/raylib/examples/textures/textures_background_scrolling.c +87 -0
- package/vendor/raylib/examples/textures/textures_background_scrolling.png +0 -0
- package/vendor/raylib/examples/textures/textures_blend_modes.c +93 -0
- package/vendor/raylib/examples/textures/textures_blend_modes.png +0 -0
- package/vendor/raylib/examples/textures/textures_bunnymark.c +120 -0
- package/vendor/raylib/examples/textures/textures_bunnymark.png +0 -0
- package/vendor/raylib/examples/textures/textures_draw_tiled.c +165 -0
- package/vendor/raylib/examples/textures/textures_draw_tiled.png +0 -0
- package/vendor/raylib/examples/textures/textures_image_drawing.c +91 -0
- package/vendor/raylib/examples/textures/textures_image_drawing.png +0 -0
- package/vendor/raylib/examples/textures/textures_image_generation.c +102 -0
- package/vendor/raylib/examples/textures/textures_image_generation.png +0 -0
- package/vendor/raylib/examples/textures/textures_image_loading.c +64 -0
- package/vendor/raylib/examples/textures/textures_image_loading.png +0 -0
- package/vendor/raylib/examples/textures/textures_image_processing.c +169 -0
- package/vendor/raylib/examples/textures/textures_image_processing.png +0 -0
- package/vendor/raylib/examples/textures/textures_image_text.c +83 -0
- package/vendor/raylib/examples/textures/textures_image_text.png +0 -0
- package/vendor/raylib/examples/textures/textures_logo_raylib.c +57 -0
- package/vendor/raylib/examples/textures/textures_logo_raylib.png +0 -0
- package/vendor/raylib/examples/textures/textures_mouse_painting.c +221 -0
- package/vendor/raylib/examples/textures/textures_mouse_painting.png +0 -0
- package/vendor/raylib/examples/textures/textures_npatch_drawing.c +109 -0
- package/vendor/raylib/examples/textures/textures_npatch_drawing.png +0 -0
- package/vendor/raylib/examples/textures/textures_particles_blending.c +135 -0
- package/vendor/raylib/examples/textures/textures_particles_blending.png +0 -0
- package/vendor/raylib/examples/textures/textures_polygon.c +100 -0
- package/vendor/raylib/examples/textures/textures_polygon.png +0 -0
- package/vendor/raylib/examples/textures/textures_raw_data.c +99 -0
- package/vendor/raylib/examples/textures/textures_raw_data.png +0 -0
- package/vendor/raylib/examples/textures/textures_rectangle.c +99 -0
- package/vendor/raylib/examples/textures/textures_rectangle.png +0 -0
- package/vendor/raylib/examples/textures/textures_sprite_button.c +97 -0
- package/vendor/raylib/examples/textures/textures_sprite_button.png +0 -0
- package/vendor/raylib/examples/textures/textures_sprite_explosion.c +120 -0
- package/vendor/raylib/examples/textures/textures_sprite_explosion.png +0 -0
- package/vendor/raylib/examples/textures/textures_srcrec_dstrec.c +82 -0
- package/vendor/raylib/examples/textures/textures_srcrec_dstrec.png +0 -0
- package/vendor/raylib/examples/textures/textures_to_image.c +68 -0
- package/vendor/raylib/examples/textures/textures_to_image.png +0 -0
- package/vendor/raylib/logo/raylib.ico +0 -0
- package/vendor/raylib/logo/raylib_128x128.png +0 -0
- package/vendor/raylib/logo/raylib_144x144.png +0 -0
- package/vendor/raylib/logo/raylib_16x16.png +0 -0
- package/vendor/raylib/logo/raylib_180x180.png +0 -0
- package/vendor/raylib/logo/raylib_24x24.png +0 -0
- package/vendor/raylib/logo/raylib_256x256.png +0 -0
- package/vendor/raylib/logo/raylib_32x32.png +0 -0
- package/vendor/raylib/logo/raylib_36x36.png +0 -0
- package/vendor/raylib/logo/raylib_48x48.png +0 -0
- package/vendor/raylib/logo/raylib_512x512.png +0 -0
- package/vendor/raylib/logo/raylib_64x64.png +0 -0
- package/vendor/raylib/logo/raylib_72x72.png +0 -0
- package/vendor/raylib/logo/raylib_96x96.png +0 -0
- package/vendor/raylib/logo/raylib_logo_animation.gif +0 -0
- package/vendor/raylib/parser/LICENSE +16 -0
- package/vendor/raylib/parser/README.md +63 -0
- package/vendor/raylib/parser/raylib_api.json +6668 -0
- package/vendor/raylib/parser/raylib_api.txt +3568 -0
- package/vendor/raylib/parser/raylib_api.xml +2509 -0
- package/vendor/raylib/parser/raylib_parser.c +1003 -0
- package/vendor/raylib/projects/4coder/Makefile +401 -0
- package/vendor/raylib/projects/4coder/Makefile.Android +300 -0
- package/vendor/raylib/projects/4coder/main.c +39 -0
- package/vendor/raylib/projects/4coder/project.4coder +54 -0
- package/vendor/raylib/projects/Builder/README.md +24 -0
- package/vendor/raylib/projects/Builder/examples/README.md +1 -0
- package/vendor/raylib/projects/Builder/examples/meson.build +25 -0
- package/vendor/raylib/projects/Builder/meson.build +25 -0
- package/vendor/raylib/projects/CMake/CMakeLists.txt +44 -0
- package/vendor/raylib/projects/CMake/core_basic_window.c +62 -0
- package/vendor/raylib/projects/CodeBlocks/README.md +22 -0
- package/vendor/raylib/projects/CodeBlocks/compiler_settings.png +0 -0
- package/vendor/raylib/projects/CodeBlocks/core_basic_window.c +58 -0
- package/vendor/raylib/projects/CodeBlocks/core_basic_window.cbp +137 -0
- package/vendor/raylib/projects/Geany/core_basic_window.c +52 -0
- package/vendor/raylib/projects/Geany/raylib.c.tags +452 -0
- package/vendor/raylib/projects/Geany/raylib_compile_execute.bat +21 -0
- package/vendor/raylib/projects/Geany/raylib_compile_sources.bat +42 -0
- package/vendor/raylib/projects/Geany/raylib_project.geany +41 -0
- package/vendor/raylib/projects/Notepad++/README.md +19 -0
- package/vendor/raylib/projects/Notepad++/c_raylib.xml +3104 -0
- package/vendor/raylib/projects/Notepad++/npes_saved_mingw.txt +0 -0
- package/vendor/raylib/projects/Notepad++/npes_saved_tcc.txt +0 -0
- package/vendor/raylib/projects/Notepad++/npes_saved_w64devkit.txt +0 -0
- package/vendor/raylib/projects/Notepad++/npes_saved_zig.txt +0 -0
- package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_npp.xml +3060 -0
- package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_npp_parser.c +150 -0
- package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h +631 -0
- package/vendor/raylib/projects/README.md +18 -0
- package/vendor/raylib/projects/SublimeText/README.md +13 -0
- package/vendor/raylib/projects/SublimeText/raylib.sublime-build +13 -0
- package/vendor/raylib/projects/SublimeText/raylib.sublime-project +8 -0
- package/vendor/raylib/projects/VS2019/raylib/raylib.rc +0 -0
- package/vendor/raylib/projects/VS2019/raylib/resource.h +14 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/android_native_app_glue.c +437 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/android_native_app_glue.h +344 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c +64 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.Packaging/AndroidManifest.xml +22 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.Packaging/build.xml +90 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.Packaging/project.properties +3 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.Packaging/raylib_android.Packaging.androidproj +134 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.Packaging/res/values/strings.xml +4 -0
- package/vendor/raylib/projects/VSCode/.vscode/c_cpp_properties.json +63 -0
- package/vendor/raylib/projects/VSCode/.vscode/launch.json +60 -0
- package/vendor/raylib/projects/VSCode/.vscode/settings.json +11 -0
- package/vendor/raylib/projects/VSCode/.vscode/tasks.json +71 -0
- package/vendor/raylib/projects/VSCode/Makefile +408 -0
- package/vendor/raylib/projects/VSCode/Makefile.Android +300 -0
- package/vendor/raylib/projects/VSCode/main.c +83 -0
- package/vendor/raylib/projects/VSCode/main.code-workspace +16 -0
- package/vendor/raylib/projects/scripts/README.md +68 -0
- package/vendor/raylib/projects/scripts/build-linux.sh +169 -0
- package/vendor/raylib/projects/scripts/build-osx.sh +171 -0
- package/vendor/raylib/projects/scripts/build-rpi.sh +169 -0
- package/vendor/raylib/projects/scripts/build-windows.bat +219 -0
- package/vendor/raylib/projects/scripts/core_basic_window.c +61 -0
- package/vendor/raylib/raylib.pc.in +13 -0
- package/vendor/raylib/src/CMakeLists.txt +121 -0
- package/vendor/raylib/src/Makefile +696 -0
- package/vendor/raylib/src/build.zig +60 -0
- package/vendor/raylib/src/config.h +230 -0
- package/vendor/raylib/src/external/cgltf.h +6501 -0
- package/vendor/raylib/src/external/dirent.h +183 -0
- package/vendor/raylib/src/external/dr_flac.h +12269 -0
- package/vendor/raylib/src/external/dr_mp3.h +4787 -0
- package/vendor/raylib/src/external/dr_wav.h +8019 -0
- package/vendor/raylib/src/external/glad.h +8640 -0
- package/vendor/raylib/src/external/glfw/.mailmap +10 -0
- package/vendor/raylib/src/external/glfw/CMake/GenerateMappings.cmake +33 -0
- package/vendor/raylib/src/external/glfw/CMake/Info.plist.in +38 -0
- package/vendor/raylib/src/external/glfw/CMake/MacOSXBundleInfo.plist.in +38 -0
- package/vendor/raylib/src/external/glfw/CMake/cmake_uninstall.cmake.in +29 -0
- package/vendor/raylib/src/external/glfw/CMake/glfw3.pc.in +13 -0
- package/vendor/raylib/src/external/glfw/CMake/glfw3Config.cmake.in +3 -0
- package/vendor/raylib/src/external/glfw/CMake/i686-w64-mingw32-clang.cmake +13 -0
- package/vendor/raylib/src/external/glfw/CMake/i686-w64-mingw32.cmake +13 -0
- package/vendor/raylib/src/external/glfw/CMake/modules/FindEpollShim.cmake +17 -0
- package/vendor/raylib/src/external/glfw/CMake/modules/FindOSMesa.cmake +18 -0
- package/vendor/raylib/src/external/glfw/CMake/modules/FindWaylandProtocols.cmake +26 -0
- package/vendor/raylib/src/external/glfw/CMake/modules/FindXKBCommon.cmake +34 -0
- package/vendor/raylib/src/external/glfw/CMake/x86_64-w64-mingw32-clang.cmake +13 -0
- package/vendor/raylib/src/external/glfw/CMake/x86_64-w64-mingw32.cmake +13 -0
- package/vendor/raylib/src/external/glfw/CMakeLists.txt +323 -0
- package/vendor/raylib/src/external/glfw/LICENSE.md +23 -0
- package/vendor/raylib/src/external/glfw/README.md +477 -0
- package/vendor/raylib/src/external/glfw/deps/getopt.c +230 -0
- package/vendor/raylib/src/external/glfw/deps/getopt.h +57 -0
- package/vendor/raylib/src/external/glfw/deps/glad/gl.h +3840 -0
- package/vendor/raylib/src/external/glfw/deps/glad/khrplatform.h +282 -0
- package/vendor/raylib/src/external/glfw/deps/glad/vk_platform.h +92 -0
- package/vendor/raylib/src/external/glfw/deps/glad/vulkan.h +3480 -0
- package/vendor/raylib/src/external/glfw/deps/glad_gl.c +1791 -0
- package/vendor/raylib/src/external/glfw/deps/glad_vulkan.c +593 -0
- package/vendor/raylib/src/external/glfw/deps/mingw/_mingw_dxhelper.h +117 -0
- package/vendor/raylib/src/external/glfw/deps/mingw/dinput.h +2467 -0
- package/vendor/raylib/src/external/glfw/deps/mingw/xinput.h +239 -0
- package/vendor/raylib/src/external/glfw/deps/vs2008/stdint.h +247 -0
- package/vendor/raylib/src/external/glfw/include/GLFW/glfw3.h +6075 -0
- package/vendor/raylib/src/external/glfw/include/GLFW/glfw3native.h +530 -0
- package/vendor/raylib/src/external/glfw/src/CMakeLists.txt +246 -0
- package/vendor/raylib/src/external/glfw/src/cocoa_init.m +620 -0
- package/vendor/raylib/src/external/glfw/src/cocoa_joystick.h +46 -0
- package/vendor/raylib/src/external/glfw/src/cocoa_joystick.m +483 -0
- package/vendor/raylib/src/external/glfw/src/cocoa_monitor.m +631 -0
- package/vendor/raylib/src/external/glfw/src/cocoa_platform.h +206 -0
- package/vendor/raylib/src/external/glfw/src/cocoa_time.c +62 -0
- package/vendor/raylib/src/external/glfw/src/cocoa_window.m +1923 -0
- package/vendor/raylib/src/external/glfw/src/context.c +756 -0
- package/vendor/raylib/src/external/glfw/src/egl_context.c +846 -0
- package/vendor/raylib/src/external/glfw/src/egl_context.h +229 -0
- package/vendor/raylib/src/external/glfw/src/glfw.rc.in +30 -0
- package/vendor/raylib/src/external/glfw/src/glfw_config.h.in +58 -0
- package/vendor/raylib/src/external/glfw/src/glx_context.c +699 -0
- package/vendor/raylib/src/external/glfw/src/glx_context.h +181 -0
- package/vendor/raylib/src/external/glfw/src/init.c +357 -0
- package/vendor/raylib/src/external/glfw/src/input.c +1406 -0
- package/vendor/raylib/src/external/glfw/src/internal.h +799 -0
- package/vendor/raylib/src/external/glfw/src/linux_joystick.c +428 -0
- package/vendor/raylib/src/external/glfw/src/linux_joystick.h +59 -0
- package/vendor/raylib/src/external/glfw/src/mappings.h +1550 -0
- package/vendor/raylib/src/external/glfw/src/mappings.h.in +73 -0
- package/vendor/raylib/src/external/glfw/src/monitor.c +542 -0
- package/vendor/raylib/src/external/glfw/src/nsgl_context.h +66 -0
- package/vendor/raylib/src/external/glfw/src/nsgl_context.m +369 -0
- package/vendor/raylib/src/external/glfw/src/null_init.c +57 -0
- package/vendor/raylib/src/external/glfw/src/null_joystick.c +53 -0
- package/vendor/raylib/src/external/glfw/src/null_joystick.h +31 -0
- package/vendor/raylib/src/external/glfw/src/null_monitor.c +159 -0
- package/vendor/raylib/src/external/glfw/src/null_platform.h +89 -0
- package/vendor/raylib/src/external/glfw/src/null_window.c +670 -0
- package/vendor/raylib/src/external/glfw/src/osmesa_context.c +372 -0
- package/vendor/raylib/src/external/glfw/src/osmesa_context.h +90 -0
- package/vendor/raylib/src/external/glfw/src/posix_thread.c +105 -0
- package/vendor/raylib/src/external/glfw/src/posix_thread.h +51 -0
- package/vendor/raylib/src/external/glfw/src/posix_time.c +90 -0
- package/vendor/raylib/src/external/glfw/src/posix_time.h +44 -0
- package/vendor/raylib/src/external/glfw/src/vulkan.c +332 -0
- package/vendor/raylib/src/external/glfw/src/wgl_context.c +798 -0
- package/vendor/raylib/src/external/glfw/src/wgl_context.h +160 -0
- package/vendor/raylib/src/external/glfw/src/win32_init.c +636 -0
- package/vendor/raylib/src/external/glfw/src/win32_joystick.c +753 -0
- package/vendor/raylib/src/external/glfw/src/win32_joystick.h +53 -0
- package/vendor/raylib/src/external/glfw/src/win32_monitor.c +537 -0
- package/vendor/raylib/src/external/glfw/src/win32_platform.h +462 -0
- package/vendor/raylib/src/external/glfw/src/win32_thread.c +99 -0
- package/vendor/raylib/src/external/glfw/src/win32_time.c +76 -0
- package/vendor/raylib/src/external/glfw/src/win32_window.c +2405 -0
- package/vendor/raylib/src/external/glfw/src/window.c +1114 -0
- package/vendor/raylib/src/external/glfw/src/wl_init.c +1310 -0
- package/vendor/raylib/src/external/glfw/src/wl_monitor.c +231 -0
- package/vendor/raylib/src/external/glfw/src/wl_platform.h +352 -0
- package/vendor/raylib/src/external/glfw/src/wl_window.c +1814 -0
- package/vendor/raylib/src/external/glfw/src/x11_init.c +1500 -0
- package/vendor/raylib/src/external/glfw/src/x11_monitor.c +614 -0
- package/vendor/raylib/src/external/glfw/src/x11_platform.h +798 -0
- package/vendor/raylib/src/external/glfw/src/x11_window.c +3310 -0
- package/vendor/raylib/src/external/glfw/src/xkb_unicode.c +942 -0
- package/vendor/raylib/src/external/glfw/src/xkb_unicode.h +28 -0
- package/vendor/raylib/src/external/jar_mod.h +1596 -0
- package/vendor/raylib/src/external/jar_xm.h +2470 -0
- package/vendor/raylib/src/external/miniaudio.h +70273 -0
- package/vendor/raylib/src/external/msf_gif.h +717 -0
- package/vendor/raylib/src/external/par_shapes.h +2155 -0
- package/vendor/raylib/src/external/sdefl.h +696 -0
- package/vendor/raylib/src/external/sinfl.h +584 -0
- package/vendor/raylib/src/external/stb_image.h +7897 -0
- package/vendor/raylib/src/external/stb_image_resize.h +2634 -0
- package/vendor/raylib/src/external/stb_image_write.h +1724 -0
- package/vendor/raylib/src/external/stb_rect_pack.h +623 -0
- package/vendor/raylib/src/external/stb_truetype.h +5077 -0
- package/vendor/raylib/src/external/stb_vorbis.h +5475 -0
- package/vendor/raylib/src/external/tinyobj_loader_c.h +1589 -0
- package/vendor/raylib/src/external/vox_loader.h +710 -0
- package/vendor/raylib/src/extras/easings.h +263 -0
- package/vendor/raylib/src/extras/physac.h +1977 -0
- package/vendor/raylib/src/extras/raygui.h +4342 -0
- package/vendor/raylib/src/extras/rmem.h +751 -0
- package/vendor/raylib/src/raudio.c +2380 -0
- package/vendor/raylib/src/raudio.h +198 -0
- package/vendor/raylib/src/raylib.dll.rc +27 -0
- package/vendor/raylib/src/raylib.dll.rc.data +0 -0
- package/vendor/raylib/src/raylib.h +1536 -0
- package/vendor/raylib/src/raylib.ico +0 -0
- package/vendor/raylib/src/raylib.rc +27 -0
- package/vendor/raylib/src/raylib.rc.data +0 -0
- package/vendor/raylib/src/raymath.h +1853 -0
- package/vendor/raylib/src/rcamera.h +567 -0
- package/vendor/raylib/src/rcore.c +6772 -0
- package/vendor/raylib/src/rgestures.h +566 -0
- package/vendor/raylib/src/rglfw.c +126 -0
- package/vendor/raylib/src/rlgl.h +4677 -0
- package/vendor/raylib/src/rmodels.c +5041 -0
- package/vendor/raylib/src/rshapes.c +1759 -0
- package/vendor/raylib/src/rtext.c +1790 -0
- package/vendor/raylib/src/rtextures.c +4761 -0
- package/vendor/raylib/src/shell.html +328 -0
- package/vendor/raylib/src/utils.c +433 -0
- package/vendor/raylib/src/utils.h +81 -0
- package/vendor/sqlite3/shell.c +23487 -0
- package/vendor/sqlite3/sqlite3.c +239246 -0
- package/vendor/sqlite3/sqlite3.h +12802 -0
- package/vendor/sqlite3/sqlite3ext.h +689 -0
- package/CMakeLists.txt +0 -60
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
# GLFW
|
|
2
|
+
|
|
3
|
+
[](https://travis-ci.org/glfw/glfw)
|
|
4
|
+
[](https://ci.appveyor.com/project/elmindreda/glfw)
|
|
5
|
+
[](https://scan.coverity.com/projects/glfw-glfw)
|
|
6
|
+
|
|
7
|
+
## Introduction
|
|
8
|
+
|
|
9
|
+
GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan
|
|
10
|
+
application development. It provides a simple, platform-independent API for
|
|
11
|
+
creating windows, contexts and surfaces, reading input, handling events, etc.
|
|
12
|
+
|
|
13
|
+
GLFW natively supports Windows, macOS and Linux and other Unix-like systems. On
|
|
14
|
+
Linux both X11 and Wayland are supported.
|
|
15
|
+
|
|
16
|
+
GLFW is licensed under the [zlib/libpng
|
|
17
|
+
license](http://www.glfw.org/license.html).
|
|
18
|
+
|
|
19
|
+
You can [download](http://www.glfw.org/download.html) the latest stable release
|
|
20
|
+
as source or Windows binaries, or fetch the `latest` branch from GitHub. Each
|
|
21
|
+
release starting with 3.0 also has a corresponding [annotated
|
|
22
|
+
tag](https://github.com/glfw/glfw/releases) with source and binary archives.
|
|
23
|
+
|
|
24
|
+
The [documentation](http://www.glfw.org/docs/latest/) is available online and is
|
|
25
|
+
included in all source and binary archives. See the [release
|
|
26
|
+
notes](https://www.glfw.org/docs/latest/news.html) for new features, caveats and
|
|
27
|
+
deprecations in the latest release. For more details see the [version
|
|
28
|
+
history](http://www.glfw.org/changelog.html).
|
|
29
|
+
|
|
30
|
+
The `master` branch is the stable integration branch and _should_ always compile
|
|
31
|
+
and run on all supported platforms, although details of newly added features may
|
|
32
|
+
change until they have been included in a release. New features and many bug
|
|
33
|
+
fixes live in [other branches](https://github.com/glfw/glfw/branches/all) until
|
|
34
|
+
they are stable enough to merge.
|
|
35
|
+
|
|
36
|
+
If you are new to GLFW, you may find the
|
|
37
|
+
[tutorial](http://www.glfw.org/docs/latest/quick.html) for GLFW 3 useful. If
|
|
38
|
+
you have used GLFW 2 in the past, there is a [transition
|
|
39
|
+
guide](http://www.glfw.org/docs/latest/moving.html) for moving to the GLFW
|
|
40
|
+
3 API.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## Compiling GLFW
|
|
44
|
+
|
|
45
|
+
GLFW itself requires only the headers and libraries for your OS and window
|
|
46
|
+
system. It does not need the headers for any context creation API (WGL, GLX,
|
|
47
|
+
EGL, NSGL, OSMesa) or rendering API (OpenGL, OpenGL ES, Vulkan) to enable
|
|
48
|
+
support for them.
|
|
49
|
+
|
|
50
|
+
GLFW supports compilation on Windows with Visual C++ 2010 and later, MinGW and
|
|
51
|
+
MinGW-w64, on macOS with Clang and on Linux and other Unix-like systems with GCC
|
|
52
|
+
and Clang. It will likely compile in other environments as well, but this is
|
|
53
|
+
not regularly tested.
|
|
54
|
+
|
|
55
|
+
There are [pre-compiled Windows binaries](http://www.glfw.org/download.html)
|
|
56
|
+
available for all supported compilers.
|
|
57
|
+
|
|
58
|
+
See the [compilation guide](http://www.glfw.org/docs/latest/compile.html) for
|
|
59
|
+
more information about how to compile GLFW yourself.
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## Using GLFW
|
|
63
|
+
|
|
64
|
+
See the [documentation](http://www.glfw.org/docs/latest/) for tutorials, guides
|
|
65
|
+
and the API reference.
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
## Contributing to GLFW
|
|
69
|
+
|
|
70
|
+
See the [contribution
|
|
71
|
+
guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for
|
|
72
|
+
more information.
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
## System requirements
|
|
76
|
+
|
|
77
|
+
GLFW supports Windows XP and later and macOS 10.8 and later. Linux and other
|
|
78
|
+
Unix-like systems running the X Window System are supported even without
|
|
79
|
+
a desktop environment or modern extensions, although some features require
|
|
80
|
+
a running window or clipboard manager. The OSMesa backend requires Mesa 6.3.
|
|
81
|
+
|
|
82
|
+
See the [compatibility guide](http://www.glfw.org/docs/latest/compat.html)
|
|
83
|
+
in the documentation for more information.
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## Dependencies
|
|
87
|
+
|
|
88
|
+
GLFW itself needs only CMake 3.1 or later and the headers and libraries for your
|
|
89
|
+
OS and window system.
|
|
90
|
+
|
|
91
|
+
The examples and test programs depend on a number of tiny libraries. These are
|
|
92
|
+
located in the `deps/` directory.
|
|
93
|
+
|
|
94
|
+
- [getopt\_port](https://github.com/kimgr/getopt_port/) for examples
|
|
95
|
+
with command-line options
|
|
96
|
+
- [TinyCThread](https://github.com/tinycthread/tinycthread) for threaded
|
|
97
|
+
examples
|
|
98
|
+
- [glad2](https://github.com/Dav1dde/glad) for loading OpenGL and Vulkan
|
|
99
|
+
functions
|
|
100
|
+
- [linmath.h](https://github.com/datenwolf/linmath.h) for linear algebra in
|
|
101
|
+
examples
|
|
102
|
+
- [Nuklear](https://github.com/Immediate-Mode-UI/Nuklear) for test and example UI
|
|
103
|
+
- [stb\_image\_write](https://github.com/nothings/stb) for writing images to disk
|
|
104
|
+
|
|
105
|
+
The documentation is generated with [Doxygen](http://doxygen.org/) if CMake can
|
|
106
|
+
find that tool.
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
## Reporting bugs
|
|
110
|
+
|
|
111
|
+
Bugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues).
|
|
112
|
+
Please check the [contribution
|
|
113
|
+
guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for
|
|
114
|
+
information on what to include when reporting a bug.
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
## Changelog
|
|
118
|
+
|
|
119
|
+
- Added `GLFW_RESIZE_NWSE_CURSOR`, `GLFW_RESIZE_NESW_CURSOR`,
|
|
120
|
+
`GLFW_RESIZE_ALL_CURSOR` and `GLFW_NOT_ALLOWED_CURSOR` cursor shapes (#427)
|
|
121
|
+
- Added `GLFW_RESIZE_EW_CURSOR` alias for `GLFW_HRESIZE_CURSOR` (#427)
|
|
122
|
+
- Added `GLFW_RESIZE_NS_CURSOR` alias for `GLFW_VRESIZE_CURSOR` (#427)
|
|
123
|
+
- Added `GLFW_POINTING_HAND_CURSOR` alias for `GLFW_HAND_CURSOR` (#427)
|
|
124
|
+
- Added `GLFW_MOUSE_PASSTHROUGH` window hint for letting mouse input pass
|
|
125
|
+
through the window (#1236,#1568)
|
|
126
|
+
- Added `GLFW_FEATURE_UNAVAILABLE` error for platform limitations (#1692)
|
|
127
|
+
- Added `GLFW_FEATURE_UNIMPLEMENTED` error for incomplete backends (#1692)
|
|
128
|
+
- Added `GLFW_ANGLE_PLATFORM_TYPE` init hint and `GLFW_ANGLE_PLATFORM_TYPE_*`
|
|
129
|
+
values to select ANGLE backend (#1380)
|
|
130
|
+
- Added `GLFW_X11_XCB_VULKAN_SURFACE` init hint for selecting X11 Vulkan
|
|
131
|
+
surface extension (#1793)
|
|
132
|
+
- Made joystick subsystem initialize at first use (#1284,#1646)
|
|
133
|
+
- Made `GLFW_DOUBLEBUFFER` a read-only window attribute
|
|
134
|
+
- Updated the minimum required CMake version to 3.1
|
|
135
|
+
- Disabled tests and examples by default when built as a CMake subdirectory
|
|
136
|
+
- Bugfix: The CMake config-file package used an absolute path and was not
|
|
137
|
+
relocatable (#1470)
|
|
138
|
+
- Bugfix: Video modes with a duplicate screen area were discarded (#1555,#1556)
|
|
139
|
+
- Bugfix: Compiling with -Wextra-semi caused warnings (#1440)
|
|
140
|
+
- Bugfix: Built-in mappings failed because some OEMs re-used VID/PID (#1583)
|
|
141
|
+
- Bugfix: Some extension loader headers did not prevent default OpenGL header
|
|
142
|
+
inclusion (#1695)
|
|
143
|
+
- Bugfix: Buffers were swapped at creation on single-buffered windows (#1873)
|
|
144
|
+
- [Win32] Added the `GLFW_WIN32_KEYBOARD_MENU` window hint for enabling access
|
|
145
|
+
to the window menu
|
|
146
|
+
- [Win32] Added a version info resource to the GLFW DLL
|
|
147
|
+
- [Win32] Disabled framebuffer transparency on Windows 7 when DWM windows are
|
|
148
|
+
opaque (#1512)
|
|
149
|
+
- [Win32] Bugfix: `GLFW_INCLUDE_VULKAN` plus `VK_USE_PLATFORM_WIN32_KHR` caused
|
|
150
|
+
symbol redefinition (#1524)
|
|
151
|
+
- [Win32] Bugfix: The cursor position event was emitted before its cursor enter
|
|
152
|
+
event (#1490)
|
|
153
|
+
- [Win32] Bugfix: The window hint `GLFW_MAXIMIZED` did not move or resize the
|
|
154
|
+
window (#1499)
|
|
155
|
+
- [Win32] Bugfix: Disabled cursor mode interfered with some non-client actions
|
|
156
|
+
- [Win32] Bugfix: Super key was not released after Win+V hotkey (#1622)
|
|
157
|
+
- [Win32] Bugfix: `glfwGetKeyName` could access out of bounds and return an
|
|
158
|
+
invalid pointer
|
|
159
|
+
- [Win32] Bugfix: Some synthetic key events were reported as `GLFW_KEY_UNKNOWN`
|
|
160
|
+
(#1623)
|
|
161
|
+
- [Win32] Bugfix: Non-BMP Unicode codepoint input was reported as UTF-16
|
|
162
|
+
- [Win32] Bugfix: Monitor functions could return invalid values after
|
|
163
|
+
configuration change (#1761)
|
|
164
|
+
- [Win32] Bugfix: Initialization would segfault on Windows 8 (not 8.1) (#1775)
|
|
165
|
+
- [Win32] Bugfix: Duplicate size events were not filtered (#1610)
|
|
166
|
+
- [Win32] Bugfix: Full screen windows were incorrectly resized by DPI changes
|
|
167
|
+
(#1582)
|
|
168
|
+
- [Win32] Bugfix: `GLFW_SCALE_TO_MONITOR` had no effect on systems older than
|
|
169
|
+
Windows 10 version 1703 (#1511)
|
|
170
|
+
- [Win32] Bugfix: `USE_MSVC_RUNTIME_LIBRARY_DLL` had no effect on CMake 3.15 or
|
|
171
|
+
later (#1783,#1796)
|
|
172
|
+
- [Win32] Bugfix: Compilation with LLVM for Windows failed (#1807,#1824,#1874)
|
|
173
|
+
- [Cocoa] Added support for `VK_EXT_metal_surface` (#1619)
|
|
174
|
+
- [Cocoa] Added locating the Vulkan loader at runtime in an application bundle
|
|
175
|
+
- [Cocoa] Moved main menu creation to GLFW initialization time (#1649)
|
|
176
|
+
- [Cocoa] Changed `EGLNativeWindowType` from `NSView` to `CALayer` (#1169)
|
|
177
|
+
- [Cocoa] Changed F13 key to report Print Screen for cross-platform consistency
|
|
178
|
+
(#1786)
|
|
179
|
+
- [Cocoa] Removed dependency on the CoreVideo framework
|
|
180
|
+
- [Cocoa] Bugfix: `glfwSetWindowSize` used a bottom-left anchor point (#1553)
|
|
181
|
+
- [Cocoa] Bugfix: Window remained on screen after destruction until event poll
|
|
182
|
+
(#1412)
|
|
183
|
+
- [Cocoa] Bugfix: Event processing before window creation would assert (#1543)
|
|
184
|
+
- [Cocoa] Bugfix: Undecorated windows could not be iconified on recent macOS
|
|
185
|
+
- [Cocoa] Bugfix: Touching event queue from secondary thread before main thread
|
|
186
|
+
would abort (#1649)
|
|
187
|
+
- [Cocoa] Bugfix: Non-BMP Unicode codepoint input was reported as UTF-16
|
|
188
|
+
(#1635)
|
|
189
|
+
- [Cocoa] Bugfix: Failing to retrieve the refresh rate of built-in displays
|
|
190
|
+
could leak memory
|
|
191
|
+
- [Cocoa] Bugfix: Objective-C files were compiled as C with CMake 3.19 (#1787)
|
|
192
|
+
- [Cocoa] Bugfix: Duplicate video modes were not filtered out (#1830)
|
|
193
|
+
- [Cocoa] Bugfix: Menubar was not clickable on macOS 10.15+ until it lost and
|
|
194
|
+
regained focus (#1648,#1802)
|
|
195
|
+
- [Cocoa] Bugfix: Monitor name query could segfault on macOS 11 (#1809,#1833)
|
|
196
|
+
- [Cocoa] Bugfix: The install name of the installed dylib was relative (#1504)
|
|
197
|
+
- [X11] Bugfix: The CMake files did not check for the XInput headers (#1480)
|
|
198
|
+
- [X11] Bugfix: Key names were not updated when the keyboard layout changed
|
|
199
|
+
(#1462,#1528)
|
|
200
|
+
- [X11] Bugfix: Decorations could not be enabled after window creation (#1566)
|
|
201
|
+
- [X11] Bugfix: Content scale fallback value could be inconsistent (#1578)
|
|
202
|
+
- [X11] Bugfix: `glfwMaximizeWindow` had no effect on hidden windows
|
|
203
|
+
- [X11] Bugfix: Clearing `GLFW_FLOATING` on a hidden window caused invalid read
|
|
204
|
+
- [X11] Bugfix: Changing `GLFW_FLOATING` on a hidden window could silently fail
|
|
205
|
+
- [X11] Bugfix: Disabled cursor mode was interrupted by indicator windows
|
|
206
|
+
- [X11] Bugfix: Monitor physical dimensions could be reported as zero mm
|
|
207
|
+
- [X11] Bugfix: Window position events were not emitted during resizing (#1613)
|
|
208
|
+
- [X11] Bugfix: `glfwFocusWindow` could terminate on older WMs or without a WM
|
|
209
|
+
- [X11] Bugfix: Querying a disconnected monitor could segfault (#1602)
|
|
210
|
+
- [X11] Bugfix: IME input of CJK was broken for "C" locale (#1587,#1636)
|
|
211
|
+
- [X11] Bugfix: Termination would segfault if the IM had been destroyed
|
|
212
|
+
- [X11] Bugfix: Any IM started after initialization would not be detected
|
|
213
|
+
- [X11] Bugfix: Xlib errors caused by other parts of the application could be
|
|
214
|
+
reported as GLFW errors
|
|
215
|
+
- [X11] Bugfix: A handle race condition could cause a `BadWindow` error (#1633)
|
|
216
|
+
- [X11] Bugfix: XKB path used keysyms instead of physical locations for
|
|
217
|
+
non-printable keys (#1598)
|
|
218
|
+
- [X11] Bugfix: Function keys were mapped to `GLFW_KEY_UNKNOWN` for some layout
|
|
219
|
+
combinaitons (#1598)
|
|
220
|
+
- [X11] Bugfix: Keys pressed simultaneously with others were not always
|
|
221
|
+
reported (#1112,#1415,#1472,#1616)
|
|
222
|
+
- [X11] Bugfix: Some window attributes were not applied on leaving fullscreen
|
|
223
|
+
(#1863)
|
|
224
|
+
- [Wayland] Removed support for `wl_shell` (#1443)
|
|
225
|
+
- [Wayland] Bugfix: The `GLFW_HAND_CURSOR` shape used the wrong image (#1432)
|
|
226
|
+
- [Wayland] Bugfix: `CLOCK_MONOTONIC` was not correctly enabled
|
|
227
|
+
- [Wayland] Bugfix: Repeated keys could be reported with `NULL` window (#1704)
|
|
228
|
+
- [Wayland] Bugfix: Retrieving partial framebuffer size would segfault
|
|
229
|
+
- [Wayland] Bugfix: Scrolling offsets were inverted compared to other platforms
|
|
230
|
+
(#1463)
|
|
231
|
+
- [Wayland] Bugfix: Client-Side Decorations were destroyed in the wrong worder
|
|
232
|
+
(#1798)
|
|
233
|
+
- [Wayland] Bugfix: Monitors physical size could report zero (#1784,#1792)
|
|
234
|
+
- [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
|
|
235
|
+
- [NSGL] Removed enforcement of forward-compatible flag for core contexts
|
|
236
|
+
- [NSGL] Bugfix: `GLFW_COCOA_RETINA_FRAMEBUFFER` had no effect on newer
|
|
237
|
+
macOS versions (#1442)
|
|
238
|
+
- [NSGL] Bugfix: Workaround for swap interval on 10.14 broke on 10.12 (#1483)
|
|
239
|
+
- [EGL] Added platform selection via the `EGL_EXT_platform_base` extension
|
|
240
|
+
(#442)
|
|
241
|
+
- [EGL] Added ANGLE backend selection via `EGL_ANGLE_platform_angle` extension
|
|
242
|
+
(#1380)
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
## Contact
|
|
246
|
+
|
|
247
|
+
On [glfw.org](http://www.glfw.org/) you can find the latest version of GLFW, as
|
|
248
|
+
well as news, documentation and other information about the project.
|
|
249
|
+
|
|
250
|
+
If you have questions related to the use of GLFW, we have a
|
|
251
|
+
[forum](https://discourse.glfw.org/), and the `#glfw` IRC channel on
|
|
252
|
+
[Freenode](http://freenode.net/).
|
|
253
|
+
|
|
254
|
+
If you have a bug to report, a patch to submit or a feature you'd like to
|
|
255
|
+
request, please file it in the
|
|
256
|
+
[issue tracker](https://github.com/glfw/glfw/issues) on GitHub.
|
|
257
|
+
|
|
258
|
+
Finally, if you're interested in helping out with the development of GLFW or
|
|
259
|
+
porting it to your favorite platform, join us on the forum, GitHub or IRC.
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
## Acknowledgements
|
|
263
|
+
|
|
264
|
+
GLFW exists because people around the world donated their time and lent their
|
|
265
|
+
skills.
|
|
266
|
+
|
|
267
|
+
- Bobyshev Alexander
|
|
268
|
+
- Laurent Aphecetche
|
|
269
|
+
- Matt Arsenault
|
|
270
|
+
- ashishgamedev
|
|
271
|
+
- David Avedissian
|
|
272
|
+
- Keith Bauer
|
|
273
|
+
- John Bartholomew
|
|
274
|
+
- Coşku Baş
|
|
275
|
+
- Niklas Behrens
|
|
276
|
+
- Andrew Belt
|
|
277
|
+
- Nevyn Bengtsson
|
|
278
|
+
- Niklas Bergström
|
|
279
|
+
- Denis Bernard
|
|
280
|
+
- Doug Binks
|
|
281
|
+
- blanco
|
|
282
|
+
- Kyle Brenneman
|
|
283
|
+
- Rok Breulj
|
|
284
|
+
- Kai Burjack
|
|
285
|
+
- Martin Capitanio
|
|
286
|
+
- Nicolas Caramelli
|
|
287
|
+
- David Carlier
|
|
288
|
+
- Arturo Castro
|
|
289
|
+
- Chi-kwan Chan
|
|
290
|
+
- Ian Clarkson
|
|
291
|
+
- Michał Cichoń
|
|
292
|
+
- Lambert Clara
|
|
293
|
+
- Anna Clarke
|
|
294
|
+
- Yaron Cohen-Tal
|
|
295
|
+
- Omar Cornut
|
|
296
|
+
- Andrew Corrigan
|
|
297
|
+
- Bailey Cosier
|
|
298
|
+
- Noel Cower
|
|
299
|
+
- CuriouserThing
|
|
300
|
+
- Jason Daly
|
|
301
|
+
- Jarrod Davis
|
|
302
|
+
- Olivier Delannoy
|
|
303
|
+
- Paul R. Deppe
|
|
304
|
+
- Michael Dickens
|
|
305
|
+
- Роман Донченко
|
|
306
|
+
- Mario Dorn
|
|
307
|
+
- Wolfgang Draxinger
|
|
308
|
+
- Jonathan Dummer
|
|
309
|
+
- Ralph Eastwood
|
|
310
|
+
- Fredrik Ehnbom
|
|
311
|
+
- Robin Eklind
|
|
312
|
+
- Siavash Eliasi
|
|
313
|
+
- Felipe Ferreira
|
|
314
|
+
- Michael Fogleman
|
|
315
|
+
- Gerald Franz
|
|
316
|
+
- Mário Freitas
|
|
317
|
+
- GeO4d
|
|
318
|
+
- Marcus Geelnard
|
|
319
|
+
- Charles Giessen
|
|
320
|
+
- Ryan C. Gordon
|
|
321
|
+
- Stephen Gowen
|
|
322
|
+
- Kovid Goyal
|
|
323
|
+
- Eloi Marín Gratacós
|
|
324
|
+
- Stefan Gustavson
|
|
325
|
+
- Jonathan Hale
|
|
326
|
+
- hdf89shfdfs
|
|
327
|
+
- Sylvain Hellegouarch
|
|
328
|
+
- Matthew Henry
|
|
329
|
+
- heromyth
|
|
330
|
+
- Lucas Hinderberger
|
|
331
|
+
- Paul Holden
|
|
332
|
+
- Warren Hu
|
|
333
|
+
- Charles Huber
|
|
334
|
+
- IntellectualKitty
|
|
335
|
+
- Aaron Jacobs
|
|
336
|
+
- Erik S. V. Jansson
|
|
337
|
+
- Toni Jovanoski
|
|
338
|
+
- Arseny Kapoulkine
|
|
339
|
+
- Cem Karan
|
|
340
|
+
- Osman Keskin
|
|
341
|
+
- Josh Kilmer
|
|
342
|
+
- Byunghoon Kim
|
|
343
|
+
- Cameron King
|
|
344
|
+
- Peter Knut
|
|
345
|
+
- Christoph Kubisch
|
|
346
|
+
- Yuri Kunde Schlesner
|
|
347
|
+
- Rokas Kupstys
|
|
348
|
+
- Konstantin Käfer
|
|
349
|
+
- Eric Larson
|
|
350
|
+
- Francis Lecavalier
|
|
351
|
+
- Jong Won Lee
|
|
352
|
+
- Robin Leffmann
|
|
353
|
+
- Glenn Lewis
|
|
354
|
+
- Shane Liesegang
|
|
355
|
+
- Anders Lindqvist
|
|
356
|
+
- Leon Linhart
|
|
357
|
+
- Marco Lizza
|
|
358
|
+
- Eyal Lotem
|
|
359
|
+
- Aaron Loucks
|
|
360
|
+
- Luflosi
|
|
361
|
+
- lukect
|
|
362
|
+
- Tristam MacDonald
|
|
363
|
+
- Hans Mackowiak
|
|
364
|
+
- Дмитри Малышев
|
|
365
|
+
- Zbigniew Mandziejewicz
|
|
366
|
+
- Adam Marcus
|
|
367
|
+
- Célestin Marot
|
|
368
|
+
- Kyle McDonald
|
|
369
|
+
- David Medlock
|
|
370
|
+
- Bryce Mehring
|
|
371
|
+
- Jonathan Mercier
|
|
372
|
+
- Marcel Metz
|
|
373
|
+
- Liam Middlebrook
|
|
374
|
+
- Ave Milia
|
|
375
|
+
- Jonathan Miller
|
|
376
|
+
- Kenneth Miller
|
|
377
|
+
- Bruce Mitchener
|
|
378
|
+
- Jack Moffitt
|
|
379
|
+
- Jeff Molofee
|
|
380
|
+
- Alexander Monakov
|
|
381
|
+
- Pierre Morel
|
|
382
|
+
- Jon Morton
|
|
383
|
+
- Pierre Moulon
|
|
384
|
+
- Martins Mozeiko
|
|
385
|
+
- Julian Møller
|
|
386
|
+
- ndogxj
|
|
387
|
+
- Kristian Nielsen
|
|
388
|
+
- Kamil Nowakowski
|
|
389
|
+
- onox
|
|
390
|
+
- Denis Ovod
|
|
391
|
+
- Ozzy
|
|
392
|
+
- Andri Pálsson
|
|
393
|
+
- Peoro
|
|
394
|
+
- Braden Pellett
|
|
395
|
+
- Christopher Pelloux
|
|
396
|
+
- Arturo J. Pérez
|
|
397
|
+
- Vladimir Perminov
|
|
398
|
+
- Anthony Pesch
|
|
399
|
+
- Orson Peters
|
|
400
|
+
- Emmanuel Gil Peyrot
|
|
401
|
+
- Cyril Pichard
|
|
402
|
+
- Keith Pitt
|
|
403
|
+
- Stanislav Podgorskiy
|
|
404
|
+
- Konstantin Podsvirov
|
|
405
|
+
- Nathan Poirier
|
|
406
|
+
- Alexandre Pretyman
|
|
407
|
+
- Pablo Prietz
|
|
408
|
+
- przemekmirek
|
|
409
|
+
- pthom
|
|
410
|
+
- Guillaume Racicot
|
|
411
|
+
- Philip Rideout
|
|
412
|
+
- Eddie Ringle
|
|
413
|
+
- Max Risuhin
|
|
414
|
+
- Jorge Rodriguez
|
|
415
|
+
- Luca Rood
|
|
416
|
+
- Ed Ropple
|
|
417
|
+
- Aleksey Rybalkin
|
|
418
|
+
- Mikko Rytkönen
|
|
419
|
+
- Riku Salminen
|
|
420
|
+
- Brandon Schaefer
|
|
421
|
+
- Sebastian Schuberth
|
|
422
|
+
- Christian Sdunek
|
|
423
|
+
- Matt Sealey
|
|
424
|
+
- Steve Sexton
|
|
425
|
+
- Arkady Shapkin
|
|
426
|
+
- Ali Sherief
|
|
427
|
+
- Yoshiki Shibukawa
|
|
428
|
+
- Dmitri Shuralyov
|
|
429
|
+
- Daniel Skorupski
|
|
430
|
+
- Bradley Smith
|
|
431
|
+
- Cliff Smolinsky
|
|
432
|
+
- Patrick Snape
|
|
433
|
+
- Erlend Sogge Heggen
|
|
434
|
+
- Julian Squires
|
|
435
|
+
- Johannes Stein
|
|
436
|
+
- Pontus Stenetorp
|
|
437
|
+
- Michael Stocker
|
|
438
|
+
- Justin Stoecker
|
|
439
|
+
- Elviss Strazdins
|
|
440
|
+
- Paul Sultana
|
|
441
|
+
- Nathan Sweet
|
|
442
|
+
- TTK-Bandit
|
|
443
|
+
- Jared Tiala
|
|
444
|
+
- Sergey Tikhomirov
|
|
445
|
+
- Arthur Tombs
|
|
446
|
+
- Ioannis Tsakpinis
|
|
447
|
+
- Samuli Tuomola
|
|
448
|
+
- Matthew Turner
|
|
449
|
+
- urraka
|
|
450
|
+
- Elias Vanderstuyft
|
|
451
|
+
- Stef Velzel
|
|
452
|
+
- Jari Vetoniemi
|
|
453
|
+
- Ricardo Vieira
|
|
454
|
+
- Nicholas Vitovitch
|
|
455
|
+
- Simon Voordouw
|
|
456
|
+
- Corentin Wallez
|
|
457
|
+
- Torsten Walluhn
|
|
458
|
+
- Patrick Walton
|
|
459
|
+
- Xo Wang
|
|
460
|
+
- Waris
|
|
461
|
+
- Jay Weisskopf
|
|
462
|
+
- Frank Wille
|
|
463
|
+
- Andy Williams
|
|
464
|
+
- Joel Winarske
|
|
465
|
+
- Richard A. Wilkes
|
|
466
|
+
- Tatsuya Yatagawa
|
|
467
|
+
- Ryogo Yoshimura
|
|
468
|
+
- Lukas Zanner
|
|
469
|
+
- Andrey Zholos
|
|
470
|
+
- Aihui Zhu
|
|
471
|
+
- Santi Zupancic
|
|
472
|
+
- Jonas Ådahl
|
|
473
|
+
- Lasse Öörni
|
|
474
|
+
- Leonard König
|
|
475
|
+
- All the unmentioned and anonymous contributors in the GLFW community, for bug
|
|
476
|
+
reports, patches, feedback, testing and encouragement
|
|
477
|
+
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/* Copyright (c) 2012, Kim Gräsman
|
|
2
|
+
* All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Redistribution and use in source and binary forms, with or without
|
|
5
|
+
* modification, are permitted provided that the following conditions are met:
|
|
6
|
+
* * Redistributions of source code must retain the above copyright notice,
|
|
7
|
+
* this list of conditions and the following disclaimer.
|
|
8
|
+
* * Redistributions in binary form must reproduce the above copyright notice,
|
|
9
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
10
|
+
* and/or other materials provided with the distribution.
|
|
11
|
+
* * Neither the name of Kim Gräsman nor the names of contributors may be used
|
|
12
|
+
* to endorse or promote products derived from this software without specific
|
|
13
|
+
* prior written permission.
|
|
14
|
+
*
|
|
15
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
16
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
17
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
18
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL KIM GRÄSMAN BE LIABLE FOR ANY DIRECT,
|
|
19
|
+
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
20
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
21
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
22
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
23
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
24
|
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
#include "getopt.h"
|
|
28
|
+
|
|
29
|
+
#include <stddef.h>
|
|
30
|
+
#include <string.h>
|
|
31
|
+
|
|
32
|
+
const int no_argument = 0;
|
|
33
|
+
const int required_argument = 1;
|
|
34
|
+
const int optional_argument = 2;
|
|
35
|
+
|
|
36
|
+
char* optarg;
|
|
37
|
+
int optopt;
|
|
38
|
+
/* The variable optind [...] shall be initialized to 1 by the system. */
|
|
39
|
+
int optind = 1;
|
|
40
|
+
int opterr;
|
|
41
|
+
|
|
42
|
+
static char* optcursor = NULL;
|
|
43
|
+
|
|
44
|
+
/* Implemented based on [1] and [2] for optional arguments.
|
|
45
|
+
optopt is handled FreeBSD-style, per [3].
|
|
46
|
+
Other GNU and FreeBSD extensions are purely accidental.
|
|
47
|
+
|
|
48
|
+
[1] http://pubs.opengroup.org/onlinepubs/000095399/functions/getopt.html
|
|
49
|
+
[2] http://www.kernel.org/doc/man-pages/online/pages/man3/getopt.3.html
|
|
50
|
+
[3] http://www.freebsd.org/cgi/man.cgi?query=getopt&sektion=3&manpath=FreeBSD+9.0-RELEASE
|
|
51
|
+
*/
|
|
52
|
+
int getopt(int argc, char* const argv[], const char* optstring) {
|
|
53
|
+
int optchar = -1;
|
|
54
|
+
const char* optdecl = NULL;
|
|
55
|
+
|
|
56
|
+
optarg = NULL;
|
|
57
|
+
opterr = 0;
|
|
58
|
+
optopt = 0;
|
|
59
|
+
|
|
60
|
+
/* Unspecified, but we need it to avoid overrunning the argv bounds. */
|
|
61
|
+
if (optind >= argc)
|
|
62
|
+
goto no_more_optchars;
|
|
63
|
+
|
|
64
|
+
/* If, when getopt() is called argv[optind] is a null pointer, getopt()
|
|
65
|
+
shall return -1 without changing optind. */
|
|
66
|
+
if (argv[optind] == NULL)
|
|
67
|
+
goto no_more_optchars;
|
|
68
|
+
|
|
69
|
+
/* If, when getopt() is called *argv[optind] is not the character '-',
|
|
70
|
+
getopt() shall return -1 without changing optind. */
|
|
71
|
+
if (*argv[optind] != '-')
|
|
72
|
+
goto no_more_optchars;
|
|
73
|
+
|
|
74
|
+
/* If, when getopt() is called argv[optind] points to the string "-",
|
|
75
|
+
getopt() shall return -1 without changing optind. */
|
|
76
|
+
if (strcmp(argv[optind], "-") == 0)
|
|
77
|
+
goto no_more_optchars;
|
|
78
|
+
|
|
79
|
+
/* If, when getopt() is called argv[optind] points to the string "--",
|
|
80
|
+
getopt() shall return -1 after incrementing optind. */
|
|
81
|
+
if (strcmp(argv[optind], "--") == 0) {
|
|
82
|
+
++optind;
|
|
83
|
+
goto no_more_optchars;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (optcursor == NULL || *optcursor == '\0')
|
|
87
|
+
optcursor = argv[optind] + 1;
|
|
88
|
+
|
|
89
|
+
optchar = *optcursor;
|
|
90
|
+
|
|
91
|
+
/* FreeBSD: The variable optopt saves the last known option character
|
|
92
|
+
returned by getopt(). */
|
|
93
|
+
optopt = optchar;
|
|
94
|
+
|
|
95
|
+
/* The getopt() function shall return the next option character (if one is
|
|
96
|
+
found) from argv that matches a character in optstring, if there is
|
|
97
|
+
one that matches. */
|
|
98
|
+
optdecl = strchr(optstring, optchar);
|
|
99
|
+
if (optdecl) {
|
|
100
|
+
/* [I]f a character is followed by a colon, the option takes an
|
|
101
|
+
argument. */
|
|
102
|
+
if (optdecl[1] == ':') {
|
|
103
|
+
optarg = ++optcursor;
|
|
104
|
+
if (*optarg == '\0') {
|
|
105
|
+
/* GNU extension: Two colons mean an option takes an
|
|
106
|
+
optional arg; if there is text in the current argv-element
|
|
107
|
+
(i.e., in the same word as the option name itself, for example,
|
|
108
|
+
"-oarg"), then it is returned in optarg, otherwise optarg is set
|
|
109
|
+
to zero. */
|
|
110
|
+
if (optdecl[2] != ':') {
|
|
111
|
+
/* If the option was the last character in the string pointed to by
|
|
112
|
+
an element of argv, then optarg shall contain the next element
|
|
113
|
+
of argv, and optind shall be incremented by 2. If the resulting
|
|
114
|
+
value of optind is greater than argc, this indicates a missing
|
|
115
|
+
option-argument, and getopt() shall return an error indication.
|
|
116
|
+
|
|
117
|
+
Otherwise, optarg shall point to the string following the
|
|
118
|
+
option character in that element of argv, and optind shall be
|
|
119
|
+
incremented by 1.
|
|
120
|
+
*/
|
|
121
|
+
if (++optind < argc) {
|
|
122
|
+
optarg = argv[optind];
|
|
123
|
+
} else {
|
|
124
|
+
/* If it detects a missing option-argument, it shall return the
|
|
125
|
+
colon character ( ':' ) if the first character of optstring
|
|
126
|
+
was a colon, or a question-mark character ( '?' ) otherwise.
|
|
127
|
+
*/
|
|
128
|
+
optarg = NULL;
|
|
129
|
+
optchar = (optstring[0] == ':') ? ':' : '?';
|
|
130
|
+
}
|
|
131
|
+
} else {
|
|
132
|
+
optarg = NULL;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
optcursor = NULL;
|
|
137
|
+
}
|
|
138
|
+
} else {
|
|
139
|
+
/* If getopt() encounters an option character that is not contained in
|
|
140
|
+
optstring, it shall return the question-mark ( '?' ) character. */
|
|
141
|
+
optchar = '?';
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (optcursor == NULL || *++optcursor == '\0')
|
|
145
|
+
++optind;
|
|
146
|
+
|
|
147
|
+
return optchar;
|
|
148
|
+
|
|
149
|
+
no_more_optchars:
|
|
150
|
+
optcursor = NULL;
|
|
151
|
+
return -1;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Implementation based on [1].
|
|
155
|
+
|
|
156
|
+
[1] http://www.kernel.org/doc/man-pages/online/pages/man3/getopt.3.html
|
|
157
|
+
*/
|
|
158
|
+
int getopt_long(int argc, char* const argv[], const char* optstring,
|
|
159
|
+
const struct option* longopts, int* longindex) {
|
|
160
|
+
const struct option* o = longopts;
|
|
161
|
+
const struct option* match = NULL;
|
|
162
|
+
int num_matches = 0;
|
|
163
|
+
size_t argument_name_length = 0;
|
|
164
|
+
const char* current_argument = NULL;
|
|
165
|
+
int retval = -1;
|
|
166
|
+
|
|
167
|
+
optarg = NULL;
|
|
168
|
+
optopt = 0;
|
|
169
|
+
|
|
170
|
+
if (optind >= argc)
|
|
171
|
+
return -1;
|
|
172
|
+
|
|
173
|
+
if (strlen(argv[optind]) < 3 || strncmp(argv[optind], "--", 2) != 0)
|
|
174
|
+
return getopt(argc, argv, optstring);
|
|
175
|
+
|
|
176
|
+
/* It's an option; starts with -- and is longer than two chars. */
|
|
177
|
+
current_argument = argv[optind] + 2;
|
|
178
|
+
argument_name_length = strcspn(current_argument, "=");
|
|
179
|
+
for (; o->name; ++o) {
|
|
180
|
+
if (strncmp(o->name, current_argument, argument_name_length) == 0) {
|
|
181
|
+
match = o;
|
|
182
|
+
++num_matches;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if (num_matches == 1) {
|
|
187
|
+
/* If longindex is not NULL, it points to a variable which is set to the
|
|
188
|
+
index of the long option relative to longopts. */
|
|
189
|
+
if (longindex)
|
|
190
|
+
*longindex = (int) (match - longopts);
|
|
191
|
+
|
|
192
|
+
/* If flag is NULL, then getopt_long() shall return val.
|
|
193
|
+
Otherwise, getopt_long() returns 0, and flag shall point to a variable
|
|
194
|
+
which shall be set to val if the option is found, but left unchanged if
|
|
195
|
+
the option is not found. */
|
|
196
|
+
if (match->flag)
|
|
197
|
+
*(match->flag) = match->val;
|
|
198
|
+
|
|
199
|
+
retval = match->flag ? 0 : match->val;
|
|
200
|
+
|
|
201
|
+
if (match->has_arg != no_argument) {
|
|
202
|
+
optarg = strchr(argv[optind], '=');
|
|
203
|
+
if (optarg != NULL)
|
|
204
|
+
++optarg;
|
|
205
|
+
|
|
206
|
+
if (match->has_arg == required_argument) {
|
|
207
|
+
/* Only scan the next argv for required arguments. Behavior is not
|
|
208
|
+
specified, but has been observed with Ubuntu and Mac OSX. */
|
|
209
|
+
if (optarg == NULL && ++optind < argc) {
|
|
210
|
+
optarg = argv[optind];
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if (optarg == NULL)
|
|
214
|
+
retval = ':';
|
|
215
|
+
}
|
|
216
|
+
} else if (strchr(argv[optind], '=')) {
|
|
217
|
+
/* An argument was provided to a non-argument option.
|
|
218
|
+
I haven't seen this specified explicitly, but both GNU and BSD-based
|
|
219
|
+
implementations show this behavior.
|
|
220
|
+
*/
|
|
221
|
+
retval = '?';
|
|
222
|
+
}
|
|
223
|
+
} else {
|
|
224
|
+
/* Unknown option or ambiguous match. */
|
|
225
|
+
retval = '?';
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
++optind;
|
|
229
|
+
return retval;
|
|
230
|
+
}
|