├── .gitattributes ├── .gitignore ├── CMakeLists.txt ├── README.md ├── assets └── test.png ├── libs └── raylib │ ├── .gitignore │ ├── .travis.yml │ ├── BINDINGS.md │ ├── CHANGELOG │ ├── CMakeLists.txt │ ├── CONTRIBUTING.md │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── ROADMAP.md │ ├── SPONSORS.md │ ├── appveyor.yml │ ├── cmake │ ├── AddIfFlagCompiles.cmake │ ├── BuildType.cmake │ ├── CheckFileSystemSymlinkSupport.cmake │ ├── EnumOption.cmake │ ├── LibraryPathToLinkerFlags.cmake │ ├── PopulateConfigVariablesLocally.cmake │ ├── emscripten.cmake │ ├── raylib-config-version.cmake │ ├── raylib-config.cmake │ └── test-pkgconfig.sh │ ├── raylib.pc.in │ └── src │ ├── CMakeLists.txt │ ├── CMakeOptions.txt │ ├── Makefile │ ├── camera.h │ ├── config.h │ ├── config.h.in │ ├── core.c │ ├── easings.h │ ├── external │ ├── .gitignore │ ├── ANGLE │ │ ├── EGL │ │ │ ├── egl.h │ │ │ ├── eglext.h │ │ │ └── eglplatform.h │ │ ├── GLES2 │ │ │ ├── gl2.h │ │ │ ├── gl2ext.h │ │ │ └── gl2platform.h │ │ ├── GLES3 │ │ │ ├── gl3.h │ │ │ ├── gl3ext.h │ │ │ └── gl3platform.h │ │ ├── KHR │ │ │ └── khrplatform.h │ │ └── angle_windowsstore.h │ ├── android │ │ └── native_app_glue │ │ │ ├── NOTICE │ │ │ ├── android_native_app_glue.c │ │ │ └── android_native_app_glue.h │ ├── cgltf.h │ ├── dirent.h │ ├── dr_flac.h │ ├── dr_mp3.h │ ├── dr_wav.h │ ├── glad.h │ ├── glfw │ │ ├── .appveyor.yml │ │ ├── .mailmap │ │ ├── .travis.yml │ │ ├── CMake │ │ │ ├── GenerateMappings.cmake │ │ │ ├── Info.plist.in │ │ │ ├── MacOSXBundleInfo.plist.in │ │ │ ├── cmake_uninstall.cmake.in │ │ │ ├── i686-w64-mingw32-clang.cmake │ │ │ ├── i686-w64-mingw32.cmake │ │ │ ├── modules │ │ │ │ ├── FindEpollShim.cmake │ │ │ │ ├── FindOSMesa.cmake │ │ │ │ ├── FindWaylandProtocols.cmake │ │ │ │ └── FindXKBCommon.cmake │ │ │ ├── x86_64-w64-mingw32-clang.cmake │ │ │ └── x86_64-w64-mingw32.cmake │ │ ├── CMakeLists.txt │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── deps │ │ │ ├── getopt.c │ │ │ ├── getopt.h │ │ │ ├── glad │ │ │ │ ├── gl.h │ │ │ │ ├── khrplatform.h │ │ │ │ ├── vk_platform.h │ │ │ │ └── vulkan.h │ │ │ ├── glad_gl.c │ │ │ ├── glad_vulkan.c │ │ │ ├── mingw │ │ │ │ ├── _mingw_dxhelper.h │ │ │ │ ├── dinput.h │ │ │ │ └── xinput.h │ │ │ └── vs2008 │ │ │ │ └── stdint.h │ │ ├── include │ │ │ └── GLFW │ │ │ │ ├── glfw3.h │ │ │ │ └── glfw3native.h │ │ └── src │ │ │ ├── CMakeLists.txt │ │ │ ├── cocoa_init.m │ │ │ ├── cocoa_joystick.h │ │ │ ├── cocoa_joystick.m │ │ │ ├── cocoa_monitor.m │ │ │ ├── cocoa_platform.h │ │ │ ├── cocoa_time.c │ │ │ ├── cocoa_window.m │ │ │ ├── context.c │ │ │ ├── egl_context.c │ │ │ ├── egl_context.h │ │ │ ├── glfw.rc.in │ │ │ ├── glfw3.pc.in │ │ │ ├── glfw3Config.cmake.in │ │ │ ├── glfw_config.h.in │ │ │ ├── glx_context.c │ │ │ ├── glx_context.h │ │ │ ├── init.c │ │ │ ├── input.c │ │ │ ├── internal.h │ │ │ ├── linux_joystick.c │ │ │ ├── linux_joystick.h │ │ │ ├── mappings.h │ │ │ ├── mappings.h.in │ │ │ ├── monitor.c │ │ │ ├── nsgl_context.h │ │ │ ├── nsgl_context.m │ │ │ ├── null_init.c │ │ │ ├── null_joystick.c │ │ │ ├── null_joystick.h │ │ │ ├── null_monitor.c │ │ │ ├── null_platform.h │ │ │ ├── null_window.c │ │ │ ├── osmesa_context.c │ │ │ ├── osmesa_context.h │ │ │ ├── posix_thread.c │ │ │ ├── posix_thread.h │ │ │ ├── posix_time.c │ │ │ ├── posix_time.h │ │ │ ├── vulkan.c │ │ │ ├── wgl_context.c │ │ │ ├── wgl_context.h │ │ │ ├── win32_init.c │ │ │ ├── win32_joystick.c │ │ │ ├── win32_joystick.h │ │ │ ├── win32_monitor.c │ │ │ ├── win32_platform.h │ │ │ ├── win32_thread.c │ │ │ ├── win32_time.c │ │ │ ├── win32_window.c │ │ │ ├── window.c │ │ │ ├── wl_init.c │ │ │ ├── wl_monitor.c │ │ │ ├── wl_platform.h │ │ │ ├── wl_window.c │ │ │ ├── x11_init.c │ │ │ ├── x11_monitor.c │ │ │ ├── x11_platform.h │ │ │ ├── x11_window.c │ │ │ ├── xkb_unicode.c │ │ │ └── xkb_unicode.h │ ├── jar_mod.h │ ├── jar_xm.h │ ├── miniaudio.h │ ├── par_shapes.h │ ├── rgif.h │ ├── stb_image.h │ ├── stb_image_resize.h │ ├── stb_image_write.h │ ├── stb_perlin.h │ ├── stb_rect_pack.h │ ├── stb_truetype.h │ ├── stb_vorbis.h │ └── tinyobj_loader_c.h │ ├── gestures.h │ ├── models.c │ ├── physac.h │ ├── raudio.c │ ├── raudio.h │ ├── raylib.dll.rc │ ├── raylib.dll.rc.data │ ├── raylib.h │ ├── raylib.ico │ ├── raylib.rc │ ├── raylib.rc.data │ ├── raymath.h │ ├── rglfw.c │ ├── rlgl.h │ ├── rmem.h │ ├── rnet.h │ ├── shapes.c │ ├── shell.html │ ├── text.c │ ├── textures.c │ ├── utils.c │ └── utils.h └── src └── main.cpp /.gitattributes: -------------------------------------------------------------------------------- 1 | # Asset files should be treated by git as binary 2 | *.png binary 3 | *.jpg binary 4 | *.ttf binary 5 | *.mp3 binary 6 | *.wav binary 7 | *.raw binary 8 | *.obj binary 9 | *.gltf binary -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ 3 | .vs/ 4 | cmake-build-debug/ 5 | bin/ 6 | build/ 7 | out/ 8 | CMakeSettings.json -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(raylib_template C CXX) 3 | 4 | set(CMAKE_CXX_STANDARD 17) 5 | 6 | # Setting parameters for raylib 7 | set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) # don't build the supplied examples 8 | set(BUILD_GAMES OFF CACHE BOOL "" FORCE) # or games 9 | 10 | add_subdirectory(libs/raylib) 11 | 12 | add_executable(${PROJECT_NAME} src/main.cpp) 13 | target_link_libraries(${PROJECT_NAME} PRIVATE raylib) 14 | target_compile_definitions(${PROJECT_NAME} PUBLIC ASSETS_PATH="${CMAKE_CURRENT_SOURCE_DIR}/assets/") # Set the asset path macro to the absolute path on the dev machine 15 | #target_compile_definitions(${PROJECT_NAME} PUBLIC ASSETS_PATH="relative-path-to-assets-in-the-game-package") # Set the asset path macro in release mode 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Simple and portable CMake template for raylib 2 | 3 | This is a very basic project template for raylib using CMake and has been tested with Visual Studio, Visual Studio Code and CLion. 4 | 5 | The raylib source code is included in the libs folder as it is much easier than including prebuilt binaries for every platform and configuration. 6 | 7 | Building from the cmake file will build both raylib and `src/main.c` which includes a basic example of a raylib program. 8 | 9 | The example in `src/main.c` uses an example image located in the `assets` folder. 10 | 11 | The absolute path to the assets folder is defined by a macro `ASSETS_PATH` in the CMake file automatically which is useful during development. If you plan on releasing or sharing your game consider manually setting the value of the `ASSETS_PATH` macro. 12 | 13 | ## How to use with C++ 14 | To use with C++ simply rename `main.c` to `main.cpp` and then change the following lines in CMakelists.txt: 15 | 16 | From: 17 | ``` 18 | project(raylib_template C) 19 | 20 | set(CMAKE_C_STANDARD 99) 21 | 22 | add_executable(raylib_template src/main.c) 23 | ``` 24 | 25 | To: 26 | ``` 27 | project(raylib_template CXX) 28 | 29 | set(CMAKE_CXX_STANDARD 11) 30 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 31 | 32 | add_executable(raylib_template src/main.cpp) 33 | ``` 34 | -------------------------------------------------------------------------------- /assets/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SasLuca/raylib-cpp-cmake-template/6deeb29b675ca0acdda1354df5345fc1102a7d41/assets/test.png -------------------------------------------------------------------------------- /libs/raylib/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore generated files 2 | # ... 3 | 4 | # Ignore VIM's backup generated files 5 | *.swp 6 | *.swo 7 | *~ 8 | 9 | # Ignore thumbnails created by windows 10 | Thumbs.db 11 | 12 | # Ignore files build by Visual Studio 13 | # *.obj --> Can be confused with 3d model! 14 | *.pdb 15 | *.aps 16 | *.user 17 | # *.vcproj 18 | # *.vcxproj* 19 | # *.sln 20 | *.vspscc 21 | *_i.c 22 | *.i 23 | *.icf 24 | *_p.c 25 | *.ncb 26 | *.suo 27 | *.tlb 28 | *.tlh 29 | *.bak 30 | *.cache 31 | *.ilk 32 | *.log 33 | .vs 34 | 35 | [Bb]in 36 | [Dd]ebug/ 37 | [Dd]ebug.win32/ 38 | [Dd]ebug.DLL/ 39 | *.sbr 40 | *.sdf 41 | obj/ 42 | [R]elease/ 43 | [Rr]elease.win32/ 44 | _ReSharper*/ 45 | [Tt]est[Rr]esult* 46 | ipch/ 47 | *.opensdf 48 | *.db 49 | *.opendb 50 | packages/ 51 | 52 | # Ignore compiled binaries 53 | *.o 54 | *.exe 55 | *.a 56 | *.bc 57 | *.so 58 | 59 | # Ignore all examples files 60 | examples/* 61 | # Unignore all examples dirs 62 | !examples/*/ 63 | # Unignore all examples files with extension 64 | !examples/*.c 65 | !examples/*.lua 66 | !examples/*.png 67 | # Unignore examples Makefile 68 | !examples/Makefile 69 | !examples/Makefile.Android 70 | !examples/raylib_compile_execute.bat 71 | !examples/raylib_makefile_example.bat 72 | 73 | # Ignore all games files 74 | games/* 75 | # Unignore all games dirs 76 | !games/*/ 77 | # Unignore all games files with extension 78 | !games/*.c 79 | !games/*.png 80 | # Unignore games makefile 81 | !games/Makefile 82 | !games/Makefile.Android 83 | 84 | # Ignore files build by xcode 85 | *.mode*v* 86 | *.pbxuser 87 | *.xcbkptlist 88 | *.xcscheme 89 | *.xcworkspacedata 90 | *.xcuserstate 91 | *.xccheckout 92 | xcschememanagement.plist 93 | .DS_Store 94 | ._.* 95 | xcuserdata/ 96 | DerivedData/ 97 | 98 | # Jetbrains project 99 | .idea/ 100 | cmake-build-debug/ 101 | 102 | # CMake stuff 103 | CMakeCache.txt 104 | CMakeFiles 105 | CMakeScripts 106 | Testing 107 | TestingIfSymlinkWorks 108 | cmake_install.cmake 109 | install_manifest.txt 110 | compile_commands.json 111 | CTestTestfile.cmake 112 | build 113 | 114 | # Unignore These makefiles... 115 | !examples/CMakeLists.txt 116 | !games/CMakeLists.txt 117 | 118 | # Ignore GNU global tags 119 | GPATH 120 | GRTAGS 121 | GTAGS 122 | -------------------------------------------------------------------------------- /libs/raylib/.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | dist: trusty 3 | 4 | git: 5 | depth: 3 6 | 7 | # TODO we could use a 32 bit Docker container for running true 32-bit tests 8 | services: 9 | - docker 10 | 11 | matrix: 12 | include: 13 | - os: linux 14 | env: ARCH=i386 15 | sudo: required 16 | - os: linux 17 | env: ARCH=amd64 INSTALL_GLFW=YES USE_EXTERNAL_GLFW=OFF 18 | sudo: required 19 | - os: linux 20 | env: ARCH=amd64 INSTALL_GLFW=YES STATIC=OFF RELEASE=NO 21 | sudo: required 22 | - os: linux 23 | env: WAYLAND=ON ARCH=amd64 RELEASE=NO 24 | sudo: required 25 | addons: 26 | apt: 27 | packages: 28 | - libwayland-dev 29 | - libxkbcommon-dev 30 | - libegl1-mesa-dev 31 | - os: osx 32 | env: ARCH=universal 33 | - os: osx 34 | osx_image: xcode9.4 35 | env: ARCH=universal SHARED=OFF RELEASE=NO 36 | - os: linux 37 | env: ARCH=arm64-android RELEASE=NO 38 | sudo: required 39 | - os: linux 40 | env: ARCH=arm32-android RELEASE=NO 41 | sudo: required 42 | - os: linux 43 | env: ARCH=html5 RELEASE=NO 44 | sudo: required 45 | - os: windows 46 | compiler: gcc 47 | env: ARCH=i386 SHARED=OFF RELEASE=NO 48 | 49 | before_script: 50 | 51 | before_install: 52 | - if [ -z "$USE_EXTERNAL_GLFW" ]; then export USE_EXTERNAL_GLFW=IF_POSSIBLE; fi 53 | - if [ -z "$SHARED" ]; then export SHARED=ON ; fi 54 | - if [ -z "$STATIC" ]; then export STATIC=ON ; fi 55 | - if [[ "$INSTALL_GLFW" == "YES" && "$USE_EXTERNAL_GLFW" != "OFF" ]]; then 56 | export DONT_TEST=1; 57 | fi 58 | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then 59 | if [[ "$ARCH" == *-android ]]; then 60 | export DONT_TEST=1; 61 | export RAYLIB_PACKAGE_SUFFIX="-Android-arm64"; 62 | wget https://dl.google.com/android/repository/android-ndk-r17-linux-x86_64.zip; 63 | unzip -qq android-ndk*.zip; 64 | if [[ "$ARCH" == arm64-* ]]; then 65 | export RAYLIB_PACKAGE_SUFFIX="-Android-arm64"; 66 | TOOLCHAIN_ARCH=arm64; 67 | PREFIX=aarch64-linux-android-; 68 | else 69 | export RAYLIB_PACKAGE_SUFFIX="-Android-arm32"; 70 | TOOLCHAIN_ARCH=arm; 71 | PREFIX=arm-linux-androideabi-; 72 | fi; 73 | android-ndk*/build/tools/make_standalone_toolchain.py --arch $TOOLCHAIN_ARCH --api 21 --install-dir /tmp/android-toolchain; 74 | export PATH=/tmp/android-toolchain/bin:$PATH; 75 | export CC=${PREFIX}clang; 76 | export CXX=${PREFIX}clang++; 77 | export CMAKE_ARCH_ARGS='-DPLATFORM=Android'; 78 | elif [ "$ARCH" == "html5" ]; then 79 | export DONT_TEST=1; 80 | export RAYLIB_PACKAGE_SUFFIX="-html5"; 81 | docker run --privileged=true -dit --name emscripten -v $(pwd):/src trzeci/emscripten:sdk-incoming-64bit bash; 82 | export CMAKE_ARCH_ARGS='-DPLATFORM=Web -DCMAKE_TOOLCHAIN_FILE=../cmake/emscripten.cmake'; 83 | RUNNER='docker exec -it emscripten cmake -E chdir build'; 84 | else 85 | sudo apt-get install -y gcc-multilib 86 | libasound2-dev:$ARCH 87 | libxcursor-dev:$ARCH libxinerama-dev:$ARCH mesa-common-dev:$ARCH 88 | libx11-dev:$ARCH libxrandr-dev:$ARCH libxrandr2:$ARCH libxi-dev:$ARCH 89 | libgl1-mesa-dev:$ARCH libglu1-mesa-dev:$ARCH; 90 | 91 | if [ "$OPENAL" == "ON" ]; then sudo apt-get install -y libopenal-dev; fi; 92 | if [ "$ARCH" == "i386" ]; then export CMAKE_ARCH_ARGS='-DCMAKE_C_FLAGS=-m32 -DCMAKE_SYSTEM_LIBRARY_PATH=/usr/lib/i386-linux-gnu -DSUPPORT_FILEFORMAT_FLAC=OFF'; fi; 93 | 94 | export RAYLIB_PACKAGE_SUFFIX="-Linux-$ARCH"; 95 | if [ "$INSTALL_GLFW" == "YES" ]; then 96 | pushd src/external/glfw; 97 | cmake . -DGLFW_BUILD_DOCS=OFF 98 | -DGLFW_BUILD_TESTS=OFF 99 | -DGLFW_BUILD_EXAMPLES=OFF 100 | -DGLFW_INSTALL=ON 101 | -DBUILD_SHARED_LIBS=ON 102 | -DGLFW_USE_WAYLAND=$WAYLAND; 103 | make; 104 | sudo make install; 105 | popd; 106 | fi; 107 | fi; 108 | fi 109 | - if [ "$TRAVIS_OS_NAME" == "osx" ]; then 110 | export RAYLIB_PACKAGE_SUFFIX="-macOS"; 111 | if [ "$INSTALL_GLFW" == "YES" ]; then brew update; brew install glfw; fi; 112 | fi 113 | - if [ "$TRAVIS_OS_NAME" == "windows" ]; then 114 | export DONT_TEST=1; 115 | export RAYLIB_PACKAGE_SUFFIX="-windows"; 116 | export CMAKE_ARCH_ARGS='-DPLATFORM=Desktop'; 117 | fi 118 | - mkdir build 119 | - $RUNNER $CC --version 120 | 121 | script: 122 | - cd build 123 | - if test -n "$WAYLAND"; then 124 | wget https://mirrors.edge.kernel.org/ubuntu/pool/universe/e/extra-cmake-modules/extra-cmake-modules_5.44.0-0ubuntu1_amd64.deb; 125 | sudo apt-get clean; 126 | sudo apt-get update; 127 | sudo apt-get install dpkg; 128 | sudo dpkg -i extra-cmake-modules_5.44.0-0ubuntu1_amd64.deb; 129 | git clone git://anongit.freedesktop.org/wayland/wayland-protocols; 130 | pushd wayland-protocols; 131 | git checkout 1.15 && ./autogen.sh --prefix=/usr && make && sudo make install; 132 | popd; 133 | fi 134 | - $RUNNER cmake $CMAKE_ARCH_ARGS 135 | -DMACOS_FATLIB=ON 136 | -DSTATIC=$STATIC -DSHARED=$SHARED 137 | -DBUILD_EXAMPLES=ON -DBUILD_GAMES=ON 138 | -DUSE_EXTERNAL_GLFW=$USE_EXTERNAL_GLFW 139 | -DUSE_WAYLAND=$WAYLAND 140 | -DINCLUDE_EVERYTHING=ON 141 | -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON 142 | .. 143 | - $RUNNER cmake --build . --target 144 | - if [ "$RELEASE" != "NO" ]; then $RUNNER cmake --build . --target package; fi 145 | - if [ -n "$RUNNER" ]; then 146 | sudo $RUNNER cmake --build . --target install; 147 | else 148 | $(which sudo) $RUNNER "$(which cmake)" --build . --target install; 149 | fi 150 | - if [ ! "$DONT_TEST" ]; then 151 | pkg-config --static --libs raylib; 152 | nm -g release/libraylib.a | grep glfwGetProcAddress || (echo "libraylib.a doesn't contain GLFW symbols! Aborting..." && false); 153 | ctest --output-on-failure; 154 | fi 155 | 156 | deploy: 157 | provider: releases 158 | api_key: 159 | secure: LvqUIAN/3dJul+Ra2iK3tSaNG5IwsNMmGIwVMy0DK5IBCxiQPBc9pWGiE30RTBPt6Z+N4BhMEE8DtUl+vnISlMoHWNIIhF2zwC66hs/F7zY7qEITMRSmfiLcqxQysknFOnJB06CATgXcFqlEo9j+t4abrG/f3qcb92J4O2uNz336Au2myTx93Q5MxbyA7KiUuEutFnb2dWiPCY4d+sGeXEfsiD2R7aj/8MaWOkoGdZVrTkI9juMgvpImkjQBArvqdjUMeT3MsRrwgOIq5v2GFV9dOl8k1WzPeT8B2JHh00ed/o1/wuFq/cLLOxtYo2+Pv3+xatOrlexoX0WkDm7C9/L1W5U4rLexU3CQ9mMBmHPnp6k/WXZ5QXEE4uUF0+LpN3XlIXzFpdZmZiVV8VLxg2WvyncMmivYiu7/MTkyfZxyKkzwl7sZZslzHA9kOGedGaN7b7/2B77OFHoQK8lKfdFml7jJnarh+89nenNZYMab0E8qkOJOyb2bYlDTa0/2nyxGiyymYgq6YHLNrDbhqB/1LzdgzjMliQ8ri5q9Ux2vjfcqOzhfAmcwFwnY/D6yXJWYi0DWpHZdpKl3du6dYDrypW91/yDWbwiJ/YhrE7ZunzrcB6GH/QkbuzWxdCth39rQAHih8DG01co/K3Gvi4yGjvIH5tFUpyEolMnpMiA= 160 | file_glob: true 161 | file: raylib-*.tar.gz 162 | skip_cleanup: true 163 | on: 164 | repo: raysan5/raylib 165 | branch: master 166 | tags: true 167 | -------------------------------------------------------------------------------- /libs/raylib/BINDINGS.md: -------------------------------------------------------------------------------- 1 | ## raylib bindings 2 | 3 | Some people ported raylib to other languages in form of bindings or wrappers to the library, here is a list with the ones I'm aware of: 4 | 5 | | name | language | repo | 6 | |:------------------:|:--------------:|----------------------------------------------------------------------| 7 | | raylib | C | https://github.com/raysan5/raylib | 8 | | raylib-cpp | C++ | https://github.com/robloach/raylib-cpp | 9 | | Raylib-cs | C# | https://github.com/ChrisDill/Raylib-cs | 10 | | RaylibSharp | C# | https://github.com/TheLumaio/RaylibSharp | 11 | | RaylibFS | F# | https://github.com/dallinbeutler/RaylibFS | 12 | | raylib_d | D | https://github.com/0xFireball/raylib_d | 13 | | raylib-d | D | https://github.com/onroundit/raylib-d | 14 | | raylib-go | Go | https://github.com/gen2brain/raylib-go | 15 | | raylib-goplus | Go | https://github.com/Lachee/raylib-goplus | 16 | | raylib-rs | Rust | https://github.com/deltaphc/raylib-rs | 17 | | raylib-lua | Lua | https://github.com/raysan5/raylib-lua | 18 | | raylib-lua-ffi | Lua | https://github.com/raysan5/raylib/issues/693 | 19 | | raylib-lua-sol | Lua | https://github.com/RobLoach/raylib-lua-sol | 20 | | raylib-lua (raylua)| Lua | https://github.com/TSnake41/raylib-lua | 21 | | raylib-luamore | Lua | https://github.com/HDPLocust/raylib-luamore | 22 | | raylib-nelua | Nelua | https://github.com/Andre-LA/raylib-nelua-mirror | 23 | | raylib-Nim | Nim | https://gitlab.com/define-private-public/raylib-Nim | 24 | | raylib-nim | Nim | https://github.com/Skrylar/raylib-nim | 25 | | raylib-haskell | Haskell | https://github.com/DevJac/raylib-haskell | 26 | | raylib-cr | Crystal | https://github.com/AregevDev/raylib-cr | 27 | | cray | Crystal | https://gitlab.com/Zatherz/cray | 28 | | cray | Crystal | https://github.com/tapgg/cray | 29 | | raylib-pascal | Pascal | https://github.com/drezgames/raylib-pascal | 30 | | raylib-pas | Pascal | https://github.com/tazdij/raylib-pas | 31 | | Graphics-Raylib | Perl | https://github.com/athreef/Graphics-Raylib | 32 | | raylib-ruby-ffi | Ruby | https://github.com/D3nX/raylib-ruby-ffi | 33 | | raylib-ruby | Ruby | https://github.com/a0/raylib-ruby | 34 | | raylib-mruby | mruby | https://github.com/lihaochen910/raylib-mruby | 35 | | raylib-py | Python | https://github.com/overdev/raylib-py | 36 | | raylib-python-cffi | Python | https://github.com/electronstudio/raylib-python-cffi | 37 | | raylib-java | Java | https://github.com/XoanaIO/raylib-java | 38 | | node-raylib | Node.js | https://github.com/RobLoach/node-raylib | 39 | | QuickJS-raylib | QuickJS | https://github.com/sntg-p/QuickJS-raylib | 40 | | raylib-js | JavaScript | https://github.com/RobLoach/raylib-js | 41 | | raylib-chaiscript | ChaiScript | https://github.com/RobLoach/raylib-chaiscript | 42 | | raylib-squirrel | Squirrel | https://github.com/RobLoach/raylib-squirrel | 43 | | racket-raylib-2d | Racket | https://github.com/arvyy/racket-raylib-2d | 44 | | raylib-php | PHP | https://github.com/joseph-montanez/raylib-php | 45 | | raylib-php-ffi | PHP | https://github.com/oraoto/raylib-php-ffi | 46 | | raylib-phpcpp | PHP | https://github.com/oraoto/raylib-phpcpp | 47 | | raylib-factor | Factor | https://github.com/Silverbeard00/raylib-factor | 48 | | raylib-haxe | Haxe | https://github.com/ibilon/raylib-haxe | 49 | | ringraylib | Ring | https://github.com/ringpackages/ringraylib | 50 | | cl-raylib | Common Lisp | https://github.com/longlene/cl-raylib | 51 | | raylib-scm | Chicken Scheme | https://github.com/yashrk/raylib-scm | 52 | | raylib-chibi | Chibi-Scheme | https://github.com/VincentToups/raylib-chibi | 53 | | Euraylib | Euphoria | https://github.com/gAndy50/Euraylib | 54 | | raylib-wren | Wren | https://github.com/TSnake41/raylib-wren | 55 | | raylib-odin | Odin | https://github.com/kevinw/raylib-odin | 56 | | raylib-zig | Zig | https://github.com/G3bE/raylib-zig | 57 | | ray.zig | Zig | https://github.com/BitPuffin/zig-raylib-experiments | 58 | | raylib-Ada | Ada | https://github.com/mimo/raylib-Ada | 59 | | jaylib | Janet | https://github.com/janet-lang/jaylib | 60 | | raykit | Kit | https://github.com/Gamerfiend/raykit | 61 | | vraylib | V | https://github.com/MajorHard/vraylib | 62 | | ray.mod | BlitzMax | https://github.com/bmx-ng/ray.mod | 63 | | raylib-mosaic | Mosaic | https://github.com/pluckyporcupine/raylib-mosaic | 64 | | raylib-xdpw | XD Pascal | https://github.com/vtereshkov/raylib-xdpw | 65 | | raylib-carp | Carp | https://github.com/pluckyporcupine/raylib-carp | 66 | | raylib-fb | FreeBasic | https://github.com/IchMagBier/raylib-fb | 67 | | raylib-ats2 | ATS2 | https://github.com/mephistopheles-8/raylib-ats2 | 68 | | raylib.cbl | COBOL | *[code examples](https://github.com/Martinfx/Cobol/tree/master/OpenCobol/Games/raylib)* | 69 | 70 | Missing some language? Check the [bindings not yet in this list](https://gist.github.com/raysan5/5764cc5b885183f523fce47f098f3d9b#bindings-not-yet-in-the-official-list) or create a new binding! :) 71 | 72 | Usually, raylib bindings follow the convention: `raylib-{language}` 73 | 74 | Let me know if you're writing a new binding for raylib, I will list it here and I usually 75 | provide the icon/logo for that new language binding. 76 | -------------------------------------------------------------------------------- /libs/raylib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) 3 | 4 | # Config options 5 | option(BUILD_EXAMPLES "Build the examples." ON) 6 | option(BUILD_GAMES "Build the example games." ON) 7 | option(ENABLE_ASAN "Enable AddressSanitizer (ASAN) for debugging (degrades performance)" OFF) 8 | option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan) for debugging" OFF) 9 | option(ENABLE_MSAN "Enable MemorySanitizer (MSan) for debugging (not recommended to run with ASAN)" OFF) 10 | 11 | if(CMAKE_VERSION VERSION_LESS "3.1") 12 | if(CMAKE_C_COMPILER_ID STREQUAL "GNU") 13 | set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}") 14 | endif() 15 | else() 16 | set (CMAKE_C_STANDARD 99) 17 | endif() 18 | 19 | include(AddIfFlagCompiles) 20 | add_if_flag_compiles(-Werror=pointer-arith CMAKE_C_FLAGS) 21 | add_if_flag_compiles(-Werror=implicit-function-declaration CMAKE_C_FLAGS) 22 | # src/external/jar_xm.h does shady stuff 23 | add_if_flag_compiles(-fno-strict-aliasing CMAKE_C_FLAGS) 24 | 25 | include(CheckFileSystemSymlinkSupport) 26 | 27 | if (ENABLE_ASAN) 28 | add_if_flag_compiles(-fno-omit-frame-pointer CMAKE_C_FLAGS CMAKE_LINKER_FLAGS) 29 | add_if_flag_compiles(-fsanitize=address CMAKE_C_FLAGS CMAKE_LINKER_FLAGS) 30 | endif() 31 | if (ENABLE_UBSAN) 32 | add_if_flag_compiles(-fno-omit-frame-pointer CMAKE_C_FLAGS CMAKE_LINKER_FLAGS) 33 | add_if_flag_compiles(-fsanitize=undefined CMAKE_C_FLAGS CMAKE_LINKER_FLAGS) 34 | endif() 35 | if (ENABLE_MSAN) 36 | add_if_flag_compiles(-fno-omit-frame-pointer CMAKE_C_FLAGS CMAKE_LINKER_FLAGS) 37 | add_if_flag_compiles(-fsanitize=memory CMAKE_C_FLAGS CMAKE_LINKER_FLAGS) 38 | endif() 39 | 40 | if (ENABLE_MSAN AND ENABLE_ASAN) 41 | MESSAGE(WARNING "Compiling with both AddressSanitizer and MemorySanitizer is not recommended") 42 | endif() 43 | 44 | add_subdirectory(src) 45 | 46 | if (${BUILD_EXAMPLES}) 47 | add_subdirectory(examples) 48 | endif() 49 | 50 | if (${BUILD_GAMES}) 51 | add_subdirectory(games) 52 | endif() 53 | 54 | enable_testing() 55 | -------------------------------------------------------------------------------- /libs/raylib/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2020 Ramon Santamaria (@raysan5) 2 | 3 | This software is provided "as-is", without any express or implied warranty. In no event 4 | will the authors be held liable for any damages arising from the use of this software. 5 | 6 | Permission is granted to anyone to use this software for any purpose, including commercial 7 | applications, and to alter it and redistribute it freely, subject to the following restrictions: 8 | 9 | 1. The origin of this software must not be misrepresented; you must not claim that you 10 | wrote the original software. If you use this software in a product, an acknowledgment 11 | in the product documentation would be appreciated but is not required. 12 | 13 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented 14 | as being the original software. 15 | 16 | 3. This notice may not be removed or altered from any source distribution. 17 | -------------------------------------------------------------------------------- /libs/raylib/ROADMAP.md: -------------------------------------------------------------------------------- 1 | roadmap 2 | ------- 3 | 4 | Here it is a wish-list with features and ideas to improve the library. Note that features listed here are quite high-level and could be long term additions for the library. Current version of raylib is complete and functional but there is a lot of room for improvement. 5 | 6 | [raylib source code](https://github.com/raysan5/raylib/tree/master/src) has some *TODO* marks around code with pending things to review and improve. Check also [GitHub Issues](https://github.com/raysan5/raylib/issues) for further details! 7 | 8 | **raylib 3.x** 9 | - [ ] Network module (UDP): `rnet` ([info](https://github.com/raysan5/raylib/issues/753)) 10 | - [ ] Custom raylib resource packer: `rres` ([info](https://github.com/raysan5/rres)) 11 | - [ ] Basic CPU/GPU stats system (memory, draws, time...) 12 | - [ ] Continuous Deployment using GitHub Actions 13 | 14 | **raylib 3.0** 15 | - [x] Custom memory allocators support 16 | - [x] Global variables moved to global context 17 | - [x] Optimize data structures for pass-by-value 18 | - [x] Trace log messages redesign ([info](https://github.com/raysan5/raylib/issues/1065)) 19 | - [x] Continuous Integration using GitHub Actions 20 | 21 | **raylib 2.5** 22 | - [x] Support Animated models 23 | - [x] Support glTF models file format 24 | - [x] Unicode support on text drawing 25 | 26 | **raylib 2.0** 27 | - [x] Removed external dependencies (GLFW3 and OpenAL) 28 | - [x] Support TCC compiler (32bit and 64bit) 29 | 30 | **raylib 1.8** 31 | - [x] Improved Materials system with PBR support 32 | - [x] Procedural image generation functions (spot, gradient, noise...) 33 | - [x] Procedural mesh generation functions (cube, sphere...) 34 | - [x] Custom Android APK build pipeline (default Makefile) 35 | 36 | **raylib 1.7** 37 | - [x] Support configuration flags 38 | - [x] Improved build system for Android 39 | - [x] Gamepad support on HTML5 40 | 41 | **raylib 1.6** 42 | - [x] Lua scripting support (raylib Lua wrapper) 43 | - [x] Redesigned audio module 44 | - [x] Support FLAC file format 45 | 46 | **raylib 1.5** 47 | - [x] Support Oculus Rift CV1 and VR stereo rendering (simulator) 48 | - [x] Redesign Shaders/Textures system -> New Materials system 49 | - [x] Support lighting: Omni, Directional and Spot lights 50 | - [x] Redesign physics module (physac) 51 | - [x] Chiptunes audio modules support 52 | 53 | **raylib 1.4** 54 | - [x] TTF fonts support (using stb_truetype) 55 | - [x] Raycast system for 3D picking (including collisions detection) 56 | - [x] Floyd-Steinberg dithering on 16bit image format conversion 57 | - [x] Basic image manipulation functions (crop, resize, draw...) 58 | - [x] Storage load/save data functionality 59 | - [x] Add Physics module (physac) 60 | - [x] Remove GLEW dependency -> Replaced by GLAD 61 | - [x] Redesign Raspberry PI inputs system 62 | - [x] Redesign gestures module to be multiplatform 63 | - [x] Module raymath as header-only and functions inline 64 | - [x] Add Easings module (easings.h) 65 | -------------------------------------------------------------------------------- /libs/raylib/SPONSORS.md: -------------------------------------------------------------------------------- 1 | The following people has contributed with a generous donation to the raylib project. 2 | 3 | ## 🥇 Gold Contributors 4 | 5 | ... 6 | 7 | ## 🥈 Silver Contributors 8 | 9 | ... 10 | 11 | ## 🥉 Bronze Contributors 12 | 13 | ... 14 | -------------------------------------------------------------------------------- /libs/raylib/appveyor.yml: -------------------------------------------------------------------------------- 1 | #os: Visual Studio 2015 2 | 3 | clone_depth: 5 4 | 5 | cache: 6 | - C:\ProgramData\chocolatey\bin -> appveyor.yml 7 | - C:\ProgramData\chocolatey\lib -> appveyor.yml 8 | 9 | init: 10 | - cmake -E remove c:\programdata\chocolatey\bin\cpack.exe 11 | - set PATH=%PATH:C:\Program Files (x86)\Git\usr\bin;=% 12 | - set PATH=%PATH:C:\Program Files\Git\usr\bin;=% 13 | - if [%BITS%]==[32] set MINGW=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32 14 | - if [%BITS%]==[64] set MINGW=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64 15 | - if [%COMPILER%]==[mingw] set PATH=%MINGW%\bin;%PATH% 16 | - set RAYLIB_PACKAGE_SUFFIX=-Win%BITS%-%COMPILER% 17 | - set VERBOSE=1 18 | 19 | environment: 20 | matrix: 21 | - compiler: mingw 22 | bits: 32 23 | examples: ON 24 | - compiler: mingw 25 | bits: 64 26 | examples: ON 27 | - compiler: msvc15 28 | bits: 32 29 | examples: OFF 30 | - compiler: msvc15 31 | bits: 64 32 | examples: OFF 33 | 34 | before_build: 35 | - if [%compiler%]==[mingw] set CFLAGS=-m%BITS% & set LDFLAGS=-m%BITS% & set GENERATOR="MinGW Makefiles" 36 | - if [%COMPILER%]==[msvc15] if [%BITS%]==[32] set GENERATOR="Visual Studio 14 2015" 37 | - if [%COMPILER%]==[msvc15] if [%BITS%]==[64] set GENERATOR="Visual Studio 14 2015 Win64" 38 | - mkdir build 39 | - cd build 40 | 41 | build_script: 42 | - cmake -G %GENERATOR% -DCMAKE_BUILD_TYPE=Release -DSTATIC=ON -DSHARED=ON -DBUILD_EXAMPLES=%examples% -DBUILD_GAMES=%examples% -DINCLUDE_EVERYTHING=ON .. 43 | - cmake --build . --target install 44 | 45 | after_build: 46 | - cmake --build . --target package 47 | 48 | before_test: 49 | 50 | test_script: 51 | 52 | artifacts: 53 | - path: 'build\*.zip' 54 | 55 | deploy: 56 | - provider: GitHub 57 | auth_token: 58 | secure: OxKnnT3tlkPl9365cOO84rDWU4UkHIYJc0D3r3Tv7rB3HaR2BBhlhCnl7g3nuOJy 59 | artifact: /.*\.zip/ 60 | draft: false 61 | prerelease: false 62 | force_update: true 63 | on: 64 | branch: master 65 | appveyor_repo_tag: true # deploy on tag push only 66 | -------------------------------------------------------------------------------- /libs/raylib/cmake/AddIfFlagCompiles.cmake: -------------------------------------------------------------------------------- 1 | include(CheckCCompilerFlag) 2 | function(add_if_flag_compiles flag) 3 | CHECK_C_COMPILER_FLAG("${flag}" COMPILER_HAS_THOSE_TOGGLES) 4 | set(outcome "Failed") 5 | if(COMPILER_HAS_THOSE_TOGGLES) 6 | foreach(var ${ARGN}) 7 | set(${var} "${flag} ${${var}}" PARENT_SCOPE) 8 | endforeach() 9 | set(outcome "compiles") 10 | endif() 11 | message(STATUS "Testing if ${flag} can be used -- ${outcome}") 12 | endfunction() 13 | -------------------------------------------------------------------------------- /libs/raylib/cmake/BuildType.cmake: -------------------------------------------------------------------------------- 1 | # Set a default build type if none was specified 2 | set(default_build_type "Release") 3 | if(EXISTS "${CMAKE_SOURCE_DIR}/.git") 4 | set(default_build_type "Debug") 5 | endif() 6 | 7 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 8 | message(STATUS "Setting build type to '${default_build_type}' as none was specified.") 9 | set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE 10 | STRING "Choose the type of build." FORCE) 11 | # Set the possible values of build type for cmake-gui 12 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" 13 | "MinSizeRel" "RelWithDebInfo") 14 | endif() 15 | 16 | # Taken from the https://github.com/OpenChemistry/tomviz project 17 | # Copyright (c) 2014-2017, Kitware, Inc. 18 | # All rights reserved. 19 | # 20 | # Redistribution and use in source and binary forms, with or without 21 | # modification, are permitted provided that the following conditions are met: 22 | # 23 | # 1. Redistributions of source code must retain the above copyright notice, this 24 | # list of conditions and the following disclaimer. 25 | # 26 | # 2. Redistributions in binary form must reproduce the above copyright notice, 27 | # this list of conditions and the following disclaimer in the documentation 28 | # and/or other materials provided with the distribution. 29 | # 30 | # 3. Neither the name of the copyright holder nor the names of its contributors 31 | # may be used to endorse or promote products derived from this software 32 | # without specific prior written permission. 33 | # 34 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 35 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 36 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 37 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 38 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 39 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 40 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 41 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 42 | # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 43 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 44 | -------------------------------------------------------------------------------- /libs/raylib/cmake/CheckFileSystemSymlinkSupport.cmake: -------------------------------------------------------------------------------- 1 | # Populates a ${FILESYSTEM_LACKS_SYMLINKS} variable 2 | message(STATUS "Testing if file system supports symlinks") 3 | execute_process( 4 | COMMAND ${CMAKE_COMMAND} -E create_symlink CMakeLists.txt "${CMAKE_CURRENT_BINARY_DIR}/TestingIfSymlinkWorks" 5 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 6 | RESULT_VARIABLE FILESYSTEM_LACKS_SYMLINKS 7 | ) 8 | If (FILESYSTEM_LACKS_SYMLINKS) 9 | message(STATUS "Testing if file system supports symlinks -- unsupported") 10 | else() 11 | message(STATUS "Testing if file system supports symlinks -- supported") 12 | endif() 13 | 14 | -------------------------------------------------------------------------------- /libs/raylib/cmake/EnumOption.cmake: -------------------------------------------------------------------------------- 1 | macro(enum_option var values description) 2 | set(${var}_VALUES ${values}) 3 | list(GET ${var}_VALUES 0 default) 4 | set(${var} "${default}" CACHE STRING "${description}") 5 | set_property(CACHE ${var} PROPERTY STRINGS ${${var}_VALUES}) 6 | if (NOT ";${${var}_VALUES};" MATCHES ";${${var}};") 7 | message(FATAL_ERROR "Unknown value ${${var}}. Only -D${var}=${${var}_VALUES} allowed.") 8 | endif() 9 | endmacro() 10 | -------------------------------------------------------------------------------- /libs/raylib/cmake/LibraryPathToLinkerFlags.cmake: -------------------------------------------------------------------------------- 1 | function(library_path_to_linker_flags LD_FLAGS LIB_PATHS) 2 | foreach(L ${LIB_PATHS}) 3 | get_filename_component(DIR ${L} PATH) 4 | get_filename_component(LIBFILE ${L} NAME_WE) 5 | STRING(REGEX REPLACE "^lib" "" FILE ${LIBFILE}) 6 | 7 | if (${L} MATCHES "[.]framework$") 8 | set(FILE_OPT "-framework ${FILE}") 9 | set(DIR_OPT "-F${DIR}") 10 | else() 11 | set(FILE_OPT "-l${FILE}") 12 | set(DIR_OPT "-L${DIR}") 13 | endif() 14 | 15 | if ("${DIR}" STREQUAL "" OR "${DIR}" STREQUAL "${LASTDIR}") 16 | set (DIR_OPT "") 17 | endif() 18 | 19 | set(LASTDIR ${DIR}) 20 | 21 | set(${LD_FLAGS} ${${LD_FLAGS}} ${DIR_OPT} ${FILE_OPT} PARENT_SCOPE) 22 | string (REPLACE ";" " " ${LD_FLAGS} "${${LD_FLAGS}}") 23 | endforeach() 24 | endfunction() 25 | -------------------------------------------------------------------------------- /libs/raylib/cmake/PopulateConfigVariablesLocally.cmake: -------------------------------------------------------------------------------- 1 | macro(populate_config_variables_locally target) 2 | get_property(raylib_INCLUDE_DIRS TARGET ${target} PROPERTY INTERFACE_INCLUDE_DIRECTORIES) 3 | #get_property(raylib_LIBRARIES TARGET ${target} PROPERTY LOCATION) # only works for SHARED 4 | get_property(raylib_LDFLAGS TARGET ${target} PROPERTY INTERFACE_LINK_LIBRARIES) 5 | get_property(raylib_DEFINITIONS TARGET ${target} PROPERTY DEFINITIONS) 6 | 7 | set(raylib_INCLUDE_DIRS "${raylib_INCLUDE_DIRS}" PARENT_SCOPE) 8 | #set(raylib_LIBRARIES "${raylib_INCLUDE_DIRS}" PARENT_SCOPE) 9 | set(raylib_LDFLAGS "${raylib_LDFLAGS}" PARENT_SCOPE) 10 | set(raylib_DEFINITIONS "${raylib_DEFINITIONS}" PARENT_SCOPE) 11 | endmacro() 12 | -------------------------------------------------------------------------------- /libs/raylib/cmake/emscripten.cmake: -------------------------------------------------------------------------------- 1 | SET(CMAKE_SYSTEM_NAME Linux) 2 | 3 | SET(CMAKE_C_COMPILER emcc) 4 | SET(CMAKE_CXX_COMPILER em++) 5 | if(NOT DEFINED CMAKE_AR) 6 | find_program(CMAKE_AR NAMES emar) 7 | endif() 8 | if(NOT DEFINED CMAKE_RANLIB) 9 | find_program(CMAKE_RANLIB NAMES emranlib) 10 | endif() 11 | 12 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 13 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 14 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) 15 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 16 | -------------------------------------------------------------------------------- /libs/raylib/cmake/raylib-config-version.cmake: -------------------------------------------------------------------------------- 1 | set(PACKAGE_VERSION "@PROJECT_VERSION@") 2 | 3 | if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) 4 | set(PACKAGE_VERSION_EXACT TRUE) 5 | endif() 6 | if(NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION) 7 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 8 | else(NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION) 9 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 10 | endif(NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION) 11 | 12 | # if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: 13 | if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "") 14 | return() 15 | endif() 16 | 17 | if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "@CMAKE_SIZEOF_VOID_P@") 18 | math(EXPR installedBits "8 * 8") 19 | set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") 20 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 21 | endif() 22 | -------------------------------------------------------------------------------- /libs/raylib/cmake/raylib-config.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find raylib 2 | # Options: 3 | # raylib_USE_STATIC_LIBS - OFF by default 4 | # raylib_VERBOSE - OFF by default 5 | # Once done, this defines a raylib target that can be passed to 6 | # target_link_libraries as well as following variables: 7 | # 8 | # raylib_FOUND - System has raylib installed 9 | # raylib_INCLUDE_DIRS - The include directories for the raylib header(s) 10 | # raylib_LIBRARIES - The libraries needed to use raylib 11 | # raylib_LDFLAGS - The linker flags needed with raylib 12 | # raylib_DEFINITIONS - Compiler switches required for using raylib 13 | 14 | set(XPREFIX PC_RAYLIB) 15 | 16 | find_package(PkgConfig QUIET) 17 | pkg_check_modules(${XPREFIX} QUIET raylib) 18 | 19 | if (raylib_USE_STATIC_LIBS) 20 | set(XPREFIX ${XPREFIX}_STATIC) 21 | endif() 22 | 23 | set(raylib_DEFINITIONS ${${XPREFIX}_CFLAGS}) 24 | 25 | find_path(raylib_INCLUDE_DIR 26 | NAMES raylib.h 27 | HINTS ${${XPREFIX}_INCLUDE_DIRS} 28 | ) 29 | 30 | set(RAYLIB_NAMES raylib) 31 | 32 | if (raylib_USE_STATIC_LIBS) 33 | set(RAYLIB_NAMES libraylib.a raylib.lib ${RAYLIB_NAMES}) 34 | endif() 35 | 36 | find_library(raylib_LIBRARY 37 | NAMES ${RAYLIB_NAMES} 38 | HINTS ${${XPREFIX}_LIBRARY_DIRS} 39 | ) 40 | 41 | set(raylib_LIBRARIES ${raylib_LIBRARY}) 42 | set(raylib_LIBRARY_DIRS ${${XPREFIX}_LIBRARY_DIRS}) 43 | set(raylib_LIBRARY_DIR ${raylib_LIBRARY_DIRS}) 44 | set(raylib_INCLUDE_DIRS ${raylib_INCLUDE_DIR}) 45 | set(raylib_LDFLAGS ${${XPREFIX}_LDFLAGS}) 46 | 47 | include(FindPackageHandleStandardArgs) 48 | find_package_handle_standard_args(raylib DEFAULT_MSG 49 | raylib_LIBRARY 50 | raylib_INCLUDE_DIR 51 | ) 52 | 53 | mark_as_advanced(raylib_LIBRARY raylib_INCLUDE_DIR) 54 | 55 | if (raylib_USE_STATIC_LIBS) 56 | add_library(raylib STATIC IMPORTED GLOBAL) 57 | else() 58 | add_library(raylib SHARED IMPORTED GLOBAL) 59 | endif() 60 | string (REPLACE ";" " " raylib_LDFLAGS "${raylib_LDFLAGS}") 61 | 62 | set_target_properties(raylib 63 | PROPERTIES 64 | IMPORTED_LOCATION "${raylib_LIBRARIES}" 65 | INTERFACE_INCLUDE_DIRECTORIES "${raylib_INCLUDE_DIRS}" 66 | INTERFACE_LINK_LIBRARIES "${raylib_LDFLAGS}" 67 | INTERFACE_COMPILE_OPTIONS "${raylib_DEFINITIONS}" 68 | ) 69 | 70 | if (raylib_VERBOSE) 71 | message(STATUS "raylib_FOUND: ${raylib_FOUND}") 72 | message(STATUS "raylib_INCLUDE_DIRS: ${raylib_INCLUDE_DIRS}") 73 | message(STATUS "raylib_LIBRARIES: ${raylib_LIBRARIES}") 74 | message(STATUS "raylib_LDFLAGS: ${raylib_LDFLAGS}") 75 | message(STATUS "raylib_DEFINITIONS: ${raylib_DEFINITIONS}") 76 | endif() 77 | -------------------------------------------------------------------------------- /libs/raylib/cmake/test-pkgconfig.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Test if including/linking/running an installed raylib works 3 | 4 | set -x 5 | export LD_RUN_PATH=/usr/local/lib 6 | 7 | CFLAGS="-Wall -Wextra -Werror $CFLAGS" 8 | if [ "$ARCH" = "i386" ]; then 9 | CFLAGS="-m32 $CLFAGS" 10 | fi 11 | 12 | cat << EOF | ${CC:-cc} -otest -xc - $(pkg-config --libs --cflags $@ raylib.pc) $CFLAGS && exec ./test 13 | #include 14 | #include 15 | 16 | int main(void) 17 | { 18 | int num = GetRandomValue(42, 1337); 19 | return 42 <= num && num <= 1337 ? EXIT_SUCCESS : EXIT_FAILURE; 20 | } 21 | EOF 22 | -------------------------------------------------------------------------------- /libs/raylib/raylib.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ 4 | includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ 5 | 6 | Name: raylib 7 | Description: Simple and easy-to-use library to enjoy videogames programming 8 | URL: http://github.com/raysan5/raylib 9 | Version: @PROJECT_VERSION@ 10 | Libs: -L${libdir} -lraylib @PKG_CONFIG_LIBS_EXTRA@ 11 | Libs.private: @PKG_CONFIG_LIBS_PRIVATE@ 12 | Requires.private: @GLFW_PKG_DEPS@ 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /libs/raylib/src/CMakeOptions.txt: -------------------------------------------------------------------------------- 1 | ### Config options ### 2 | include(CMakeDependentOption) 3 | include(EnumOption) 4 | 5 | enum_option(PLATFORM "Desktop;Web;Android;Raspberry Pi" "Platform to build for.") 6 | 7 | enum_option(OPENGL_VERSION "OFF;3.3;2.1;1.1;ES 2.0" "Force a specific OpenGL Version?") 8 | 9 | # Shared library is always PIC. Static library should be PIC too if linked into a shared library 10 | option(WITH_PIC "Compile static library as position-independent code" OFF) 11 | option(SHARED "Build raylib as a dynamic library" OFF) 12 | option(STATIC "Build raylib as a static library" ON) 13 | option(MACOS_FATLIB "Build fat library for both i386 and x86_64 on macOS" OFF) 14 | option(USE_AUDIO "Build raylib with audio module" ON) 15 | 16 | enum_option(USE_EXTERNAL_GLFW "OFF;IF_POSSIBLE;ON" "Link raylib against system GLFW instead of embedded one") 17 | if(UNIX AND NOT APPLE) 18 | option(USE_WAYLAND "Use Wayland for window creation" OFF) 19 | endif() 20 | 21 | option(INCLUDE_EVERYTHING "Include everything disabled by default (for CI usage" OFF) 22 | set(OFF ${INCLUDE_EVERYTHING} CACHE INTERNAL "Replace any OFF by default with \${OFF} to have it covered by this option") 23 | 24 | # core.c 25 | option(SUPPORT_CAMERA_SYSTEM "Provide camera module (camera.h) with multiple predefined cameras: free, 1st/3rd person, orbital" ON) 26 | option(SUPPORT_GESTURES_SYSTEM "Gestures module is included (gestures.h) to support gestures detection: tap, hold, swipe, drag" ON) 27 | option(SUPPORT_MOUSE_GESTURES "Mouse gestures are directly mapped like touches and processed by gestures system" ON) 28 | option(SUPPORT_SSH_KEYBOARD_RPI "Reconfigure standard input to receive key inputs, works with SSH connection" OFF) 29 | option(SUPPORT_DEFAULT_FONT "Default font is loaded on window initialization to be available for the user to render simple text. If enabled, uses external module functions to load default raylib font (module: text)" ON) 30 | option(SUPPORT_SCREEN_CAPTURE "Allow automatic screen capture of current screen pressing F12, defined in KeyCallback()" ON) 31 | option(SUPPORT_GIF_RECORDING "Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback()" ON) 32 | option(SUPPORT_BUSY_WAIT_LOOP "Use busy wait loop for timing sync instead of a high-resolution timer" OFF) 33 | option(SUPPORT_EVENTS_WAITING "Wait for events passively (sleeping while no events) instead of polling them actively every frame" OFF) 34 | option(SUPPORT_HIGH_DPI "Support high DPI displays" OFF) 35 | 36 | # rlgl.h 37 | option(SUPPORT_VR_SIMULATOR "Support VR simulation functionality (stereo rendering)" ON) 38 | 39 | # shapes.c 40 | option(SUPPORT_FONT_TEXTURE "Draw rectangle shapes using font texture white character instead of default white texture. Allows drawing rectangles and text with a single draw call, very useful for GUI systems!" ON) 41 | option(SUPPORT_QUADS_DRAW_MODE "Use QUADS instead of TRIANGLES for drawing when possible. Some lines-based shapes could still use lines" ON) 42 | 43 | # textures.c 44 | option(SUPPORT_IMAGE_EXPORT "Support image exporting to file" ON) 45 | option(SUPPORT_IMAGE_GENERATION "Support procedural image generation functionality (gradient, spot, perlin-noise, cellular)" ON) 46 | option(SUPPORT_IMAGE_MANIPULATION "Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop... If not defined only three image editing functions supported: ImageFormat(), ImageAlphaMask(), ImageToPOT()" ON) 47 | option(SUPPORT_FILEFORMAT_PNG "Support loading PNG as textures" ON) 48 | option(SUPPORT_FILEFORMAT_DDS "Support loading DDS as textures" ON) 49 | option(SUPPORT_FILEFORMAT_HDR "Support loading HDR as textures" ON) 50 | option(SUPPORT_FILEFORMAT_KTX "Support loading KTX as textures" ON) 51 | option(SUPPORT_FILEFORMAT_ASTC "Support loading ASTC as textures" ON) 52 | option(SUPPORT_FILEFORMAT_BMP "Support loading BMP as textures" ${OFF}) 53 | option(SUPPORT_FILEFORMAT_TGA "Support loading TGA as textures" ${OFF}) 54 | option(SUPPORT_FILEFORMAT_JPG "Support loading JPG as textures" ${OFF}) 55 | option(SUPPORT_FILEFORMAT_GIF "Support loading GIF as textures" ${OFF}) 56 | option(SUPPORT_FILEFORMAT_PSD "Support loading PSD as textures" ${OFF}) 57 | option(SUPPORT_FILEFORMAT_PKM "Support loading PKM as textures" ${OFF}) 58 | option(SUPPORT_FILEFORMAT_PVR "Support loading PVR as textures" ${OFF}) 59 | 60 | # text.c 61 | option(SUPPORT_FILEFORMAT_FNT "Support loading fonts in FNT format" ON) 62 | option(SUPPORT_FILEFORMAT_TTF "Support loading font in TTF/OTF format" ON) 63 | 64 | # models.c 65 | option(SUPPORT_MESH_GENERATION "Support procedural mesh generation functions, uses external par_shapes.h library. NOTE: Some generated meshes DO NOT include generated texture coordinates" ON) 66 | option(SUPPORT_FILEFORMAT_OBJ "Support loading OBJ file format" ON) 67 | option(SUPPORT_FILEFORMAT_MTL "Support loading MTL file format" ON) 68 | option(SUPPORT_FILEFORMAT_IQM "Support loading IQM file format" ON) 69 | option(SUPPORT_FILEFORMAT_GLTF "Support loading GLTF file format" ON) 70 | 71 | # raudio.c 72 | option(SUPPORT_FILEFORMAT_WAV "Support loading WAV for sound" ON) 73 | option(SUPPORT_FILEFORMAT_OGG "Support loading OGG for sound" ON) 74 | option(SUPPORT_FILEFORMAT_XM "Support loading XM for sound" ON) 75 | option(SUPPORT_FILEFORMAT_MOD "Support loading MOD for sound" ON) 76 | option(SUPPORT_FILEFORMAT_MP3 "Support loading MP3 for sound" ON) 77 | option(SUPPORT_FILEFORMAT_FLAC "Support loading FLAC for sound" ${OFF}) 78 | 79 | # utils.c 80 | option(SUPPORT_TRACELOG "Show TraceLog() output messages. NOTE: By default LOG_DEBUG traces not shown" ON) 81 | 82 | if(NOT (STATIC OR SHARED)) 83 | message(FATAL_ERROR "Nothing to do if both -DSHARED=OFF and -DSTATIC=OFF...") 84 | endif() 85 | 86 | if (DEFINED BUILD_SHARED_LIBS) 87 | set(SHARED ${BUILD_SHARED_LIBS}) 88 | if (${BUILD_SHARED_LIBS}) 89 | set(STATIC OFF) 90 | else() 91 | set(STATIC ON) 92 | endif() 93 | endif() 94 | if(DEFINED SHARED_RAYLIB) 95 | set(SHARED ${SHARED_RAYLIB}) 96 | message(DEPRECATION "-DSHARED_RAYLIB is deprecated. Please use -DSHARED instead.") 97 | endif() 98 | if(DEFINED STATIC_RAYLIB) 99 | set(STATIC ${STATIC_RAYLIB}) 100 | message(DEPRECATION "-DSTATIC_RAYLIB is deprecated. Please use -DSTATIC instead.") 101 | endif() 102 | 103 | if(${PLATFORM} MATCHES "Desktop" AND APPLE) 104 | if(MACOS_FATLIB) 105 | if (CMAKE_OSX_ARCHITECTURES) 106 | message(FATAL_ERROR "User supplied -DCMAKE_OSX_ARCHITECTURES overrides -DMACOS_FATLIB=ON") 107 | else() 108 | set(CMAKE_OSX_ARCHITECTURES "x86_64;i386") 109 | endif() 110 | endif() 111 | endif() 112 | 113 | # vim: ft=cmake 114 | -------------------------------------------------------------------------------- /libs/raylib/src/config.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************************** 2 | * 3 | * raylib configuration flags 4 | * 5 | * This file defines all the configuration flags for the different raylib modules 6 | * 7 | * LICENSE: zlib/libpng 8 | * 9 | * Copyright (c) 2018-2020 Ahmad Fatoum & Ramon Santamaria (@raysan5) 10 | * 11 | * This software is provided "as-is", without any express or implied warranty. In no event 12 | * will the authors be held liable for any damages arising from the use of this software. 13 | * 14 | * Permission is granted to anyone to use this software for any purpose, including commercial 15 | * applications, and to alter it and redistribute it freely, subject to the following restrictions: 16 | * 17 | * 1. The origin of this software must not be misrepresented; you must not claim that you 18 | * wrote the original software. If you use this software in a product, an acknowledgment 19 | * in the product documentation would be appreciated but is not required. 20 | * 21 | * 2. Altered source versions must be plainly marked as such, and must not be misrepresented 22 | * as being the original software. 23 | * 24 | * 3. This notice may not be removed or altered from any source distribution. 25 | * 26 | **********************************************************************************************/ 27 | 28 | #define RAYLIB_VERSION "3.0" 29 | 30 | // Edit to control what features Makefile'd raylib is compiled with 31 | #if defined(RAYLIB_CMAKE) 32 | // Edit CMakeOptions.txt for CMake instead 33 | #include "cmake/config.h" 34 | #else 35 | 36 | //------------------------------------------------------------------------------------ 37 | // Module: core - Configuration Flags 38 | //------------------------------------------------------------------------------------ 39 | // Camera module is included (camera.h) and multiple predefined cameras are available: free, 1st/3rd person, orbital 40 | #define SUPPORT_CAMERA_SYSTEM 1 41 | // Gestures module is included (gestures.h) to support gestures detection: tap, hold, swipe, drag 42 | #define SUPPORT_GESTURES_SYSTEM 1 43 | // Mouse gestures are directly mapped like touches and processed by gestures system 44 | #define SUPPORT_MOUSE_GESTURES 1 45 | // Reconfigure standard input to receive key inputs, works with SSH connection. 46 | #define SUPPORT_SSH_KEYBOARD_RPI 1 47 | // Draw a mouse reference on screen (square cursor box) 48 | #define SUPPORT_MOUSE_CURSOR_RPI 1 49 | // Use busy wait loop for timing sync, if not defined, a high-resolution timer is setup and used 50 | //#define SUPPORT_BUSY_WAIT_LOOP 1 51 | // Use a half-busy wait loop, in this case frame sleeps for some time and runs a busy-wait-loop at the end 52 | #define SUPPORT_HALFBUSY_WAIT_LOOP 53 | // Wait for events passively (sleeping while no events) instead of polling them actively every frame 54 | //#define SUPPORT_EVENTS_WAITING 1 55 | // Allow automatic screen capture of current screen pressing F12, defined in KeyCallback() 56 | #define SUPPORT_SCREEN_CAPTURE 1 57 | // Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback() 58 | //#define SUPPORT_GIF_RECORDING 1 59 | // Allow scale all the drawn content to match the high-DPI equivalent size (only PLATFORM_DESKTOP) 60 | //#define SUPPORT_HIGH_DPI 1 61 | // Support CompressData() and DecompressData() functions 62 | #define SUPPORT_COMPRESSION_API 1 63 | // Support saving binary data automatically to a generated storage.data file. This file is managed internally. 64 | #define SUPPORT_DATA_STORAGE 1 65 | 66 | //------------------------------------------------------------------------------------ 67 | // Module: rlgl - Configuration Flags 68 | //------------------------------------------------------------------------------------ 69 | // Support VR simulation functionality (stereo rendering) 70 | #define SUPPORT_VR_SIMULATOR 1 71 | 72 | //------------------------------------------------------------------------------------ 73 | // Module: shapes - Configuration Flags 74 | //------------------------------------------------------------------------------------ 75 | // Draw rectangle shapes using font texture white character instead of default white texture 76 | // Allows drawing rectangles and text with a single draw call, very useful for GUI systems! 77 | #define SUPPORT_FONT_TEXTURE 1 78 | // Use QUADS instead of TRIANGLES for drawing when possible 79 | // Some lines-based shapes could still use lines 80 | #define SUPPORT_QUADS_DRAW_MODE 1 81 | 82 | //------------------------------------------------------------------------------------ 83 | // Module: textures - Configuration Flags 84 | //------------------------------------------------------------------------------------ 85 | // Selecte desired fileformats to be supported for image data loading 86 | #define SUPPORT_FILEFORMAT_PNG 1 87 | #define SUPPORT_FILEFORMAT_BMP 1 88 | #define SUPPORT_FILEFORMAT_TGA 1 89 | //#define SUPPORT_FILEFORMAT_JPG 1 90 | #define SUPPORT_FILEFORMAT_GIF 1 91 | //#define SUPPORT_FILEFORMAT_PSD 1 92 | #define SUPPORT_FILEFORMAT_DDS 1 93 | #define SUPPORT_FILEFORMAT_HDR 1 94 | #define SUPPORT_FILEFORMAT_KTX 1 95 | #define SUPPORT_FILEFORMAT_ASTC 1 96 | //#define SUPPORT_FILEFORMAT_PKM 1 97 | //#define SUPPORT_FILEFORMAT_PVR 1 98 | 99 | // Support image export functionality (.png, .bmp, .tga, .jpg) 100 | #define SUPPORT_IMAGE_EXPORT 1 101 | // Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop... 102 | // If not defined only three image editing functions supported: ImageFormat(), ImageAlphaMask(), ImageToPOT() 103 | #define SUPPORT_IMAGE_MANIPULATION 1 104 | // Support procedural image generation functionality (gradient, spot, perlin-noise, cellular) 105 | #define SUPPORT_IMAGE_GENERATION 1 106 | 107 | //------------------------------------------------------------------------------------ 108 | // Module: text - Configuration Flags 109 | //------------------------------------------------------------------------------------ 110 | // Default font is loaded on window initialization to be available for the user to render simple text 111 | // NOTE: If enabled, uses external module functions to load default raylib font 112 | #define SUPPORT_DEFAULT_FONT 1 113 | // Selected desired font fileformats to be supported for loading 114 | #define SUPPORT_FILEFORMAT_FNT 1 115 | #define SUPPORT_FILEFORMAT_TTF 1 116 | 117 | //------------------------------------------------------------------------------------ 118 | // Module: models - Configuration Flags 119 | //------------------------------------------------------------------------------------ 120 | // Selected desired model fileformats to be supported for loading 121 | #define SUPPORT_FILEFORMAT_OBJ 1 122 | #define SUPPORT_FILEFORMAT_MTL 1 123 | #define SUPPORT_FILEFORMAT_IQM 1 124 | #define SUPPORT_FILEFORMAT_GLTF 1 125 | // Support procedural mesh generation functions, uses external par_shapes.h library 126 | // NOTE: Some generated meshes DO NOT include generated texture coordinates 127 | #define SUPPORT_MESH_GENERATION 1 128 | 129 | //------------------------------------------------------------------------------------ 130 | // Module: audio - Configuration Flags 131 | //------------------------------------------------------------------------------------ 132 | // Desired audio fileformats to be supported for loading 133 | #define SUPPORT_FILEFORMAT_WAV 1 134 | #define SUPPORT_FILEFORMAT_OGG 1 135 | #define SUPPORT_FILEFORMAT_XM 1 136 | #define SUPPORT_FILEFORMAT_MOD 1 137 | //#define SUPPORT_FILEFORMAT_FLAC 1 138 | #define SUPPORT_FILEFORMAT_MP3 1 139 | 140 | //------------------------------------------------------------------------------------ 141 | // Module: utils - Configuration Flags 142 | //------------------------------------------------------------------------------------ 143 | // Show TRACELOG() output messages 144 | // NOTE: By default LOG_DEBUG traces not shown 145 | #define SUPPORT_TRACELOG 1 146 | //#define SUPPORT_TRACELOG_DEBUG 1 147 | 148 | #endif //defined(RAYLIB_CMAKE) 149 | -------------------------------------------------------------------------------- /libs/raylib/src/config.h.in: -------------------------------------------------------------------------------- 1 | // config.h.in 2 | 3 | // core.c 4 | // Camera module is included (camera.h) and multiple predefined cameras are available: free, 1st/3rd person, orbital 5 | #cmakedefine SUPPORT_CAMERA_SYSTEM 1 6 | // Gestures module is included (gestures.h) to support gestures detection: tap, hold, swipe, drag 7 | #cmakedefine SUPPORT_GESTURES_SYSTEM 1 8 | // Mouse gestures are directly mapped like touches and processed by gestures system. 9 | #cmakedefine SUPPORT_MOUSE_GESTURES 1 10 | // Reconfigure standard input to receive key inputs, works with SSH connection. 11 | #cmakedefine SUPPORT_SSH_KEYBOARD_RPI 1 12 | // Use busy wait loop for timing sync, if not defined, a high-resolution timer is setup and used 13 | #cmakedefine SUPPORT_BUSY_WAIT_LOOP 1 14 | // Wait for events passively (sleeping while no events) instead of polling them actively every frame 15 | #cmakedefine SUPPORT_EVENTS_WAITING 1 16 | // Allow automatic screen capture of current screen pressing F12, defined in KeyCallback() 17 | #cmakedefine SUPPORT_SCREEN_CAPTURE 1 18 | // Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback() 19 | #cmakedefine SUPPORT_GIF_RECORDING 1 20 | // Support high DPI displays 21 | #cmakedefine SUPPORT_HIGH_DPI 1 22 | // Support CompressData() and DecompressData() functions 23 | #cmakedefine SUPPORT_COMPRESSION_API 1 24 | 25 | // rlgl.h 26 | // Support VR simulation functionality (stereo rendering) 27 | #cmakedefine SUPPORT_VR_SIMULATOR 1 28 | 29 | // shapes.c 30 | // Draw rectangle shapes using font texture white character instead of default white texture 31 | #cmakedefine SUPPORT_FONT_TEXTURE 1 32 | // Use QUADS instead of TRIANGLES for drawing when possible 33 | // Some lines-based shapes could still use lines 34 | #cmakedefine SUPPORT_QUADS_DRAW_MODE 1 35 | 36 | // textures.c 37 | // Selecte desired fileformats to be supported for image data loading. 38 | #cmakedefine SUPPORT_FILEFORMAT_PNG 1 39 | #cmakedefine SUPPORT_FILEFORMAT_DDS 1 40 | #cmakedefine SUPPORT_FILEFORMAT_HDR 1 41 | #cmakedefine SUPPORT_FILEFORMAT_KTX 1 42 | #cmakedefine SUPPORT_FILEFORMAT_ASTC 1 43 | #cmakedefine SUPPORT_FILEFORMAT_BMP 1 44 | #cmakedefine SUPPORT_FILEFORMAT_TGA 1 45 | #cmakedefine SUPPORT_FILEFORMAT_JPG 1 46 | #cmakedefine SUPPORT_FILEFORMAT_GIF 1 47 | #cmakedefine SUPPORT_FILEFORMAT_PSD 1 48 | #cmakedefine SUPPORT_FILEFORMAT_PKM 1 49 | #cmakedefine SUPPORT_FILEFORMAT_PVR 1 50 | // Support image export functionality (.png, .bmp, .tga, .jpg) 51 | #define SUPPORT_IMAGE_EXPORT 1 52 | // Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop... If not defined only three image editing functions supported: ImageFormat(), ImageAlphaMask(), ImageToPOT() 53 | #cmakedefine SUPPORT_IMAGE_MANIPULATION 1 54 | // Support procedural image generation functionality (gradient, spot, perlin-noise, cellular) 55 | #cmakedefine SUPPORT_IMAGE_GENERATION 1 56 | 57 | // text.c 58 | // Default font is loaded on window initialization to be available for the user to render simple text. NOTE: If enabled, uses external module functions to load default raylib font (module: text) 59 | #cmakedefine SUPPORT_DEFAULT_FONT 1 60 | // Selected desired fileformats to be supported for loading. 61 | #cmakedefine SUPPORT_FILEFORMAT_FNT 1 62 | #cmakedefine SUPPORT_FILEFORMAT_TTF 1 63 | 64 | // models.c 65 | // Selected desired fileformats to be supported for loading. 66 | #cmakedefine SUPPORT_FILEFORMAT_OBJ 1 67 | #cmakedefine SUPPORT_FILEFORMAT_MTL 1 68 | #cmakedefine SUPPORT_FILEFORMAT_IQM 1 69 | #cmakedefine SUPPORT_FILEFORMAT_GLTF 1 70 | // Support procedural mesh generation functions, uses external par_shapes.h library 71 | // NOTE: Some generated meshes DO NOT include generated texture coordinates 72 | #cmakedefine SUPPORT_MESH_GENERATION 1 73 | 74 | // raudio.c 75 | // Desired fileformats to be supported for loading. 76 | #cmakedefine SUPPORT_FILEFORMAT_WAV 1 77 | #cmakedefine SUPPORT_FILEFORMAT_OGG 1 78 | #cmakedefine SUPPORT_FILEFORMAT_XM 1 79 | #cmakedefine SUPPORT_FILEFORMAT_MOD 1 80 | #cmakedefine SUPPORT_FILEFORMAT_FLAC 1 81 | #cmakedefine SUPPORT_FILEFORMAT_MP3 1 82 | 83 | // utils.c 84 | // Show TraceLog() output messages. NOTE: By default LOG_DEBUG traces not shown 85 | #cmakedefine SUPPORT_TRACELOG 1 86 | 87 | -------------------------------------------------------------------------------- /libs/raylib/src/external/.gitignore: -------------------------------------------------------------------------------- 1 | glfw/docs/ 2 | glfw/examples/ 3 | glfw/tests/ 4 | -------------------------------------------------------------------------------- /libs/raylib/src/external/ANGLE/EGL/eglplatform.h: -------------------------------------------------------------------------------- 1 | #ifndef __eglplatform_h_ 2 | #define __eglplatform_h_ 3 | 4 | /* 5 | ** Copyright (c) 2007-2013 The Khronos Group Inc. 6 | ** 7 | ** Permission is hereby granted, free of charge, to any person obtaining a 8 | ** copy of this software and/or associated documentation files (the 9 | ** "Materials"), to deal in the Materials without restriction, including 10 | ** without limitation the rights to use, copy, modify, merge, publish, 11 | ** distribute, sublicense, and/or sell copies of the Materials, and to 12 | ** permit persons to whom the Materials are furnished to do so, subject to 13 | ** the following conditions: 14 | ** 15 | ** The above copyright notice and this permission notice shall be included 16 | ** in all copies or substantial portions of the Materials. 17 | ** 18 | ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 25 | */ 26 | 27 | /* Platform-specific types and definitions for egl.h 28 | * $Revision: 23432 $ on $Date: 2013-10-09 00:57:24 -0700 (Wed, 09 Oct 2013) $ 29 | * 30 | * Adopters may modify khrplatform.h and this file to suit their platform. 31 | * You are encouraged to submit all modifications to the Khronos group so that 32 | * they can be included in future versions of this file. Please submit changes 33 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) 34 | * by filing a bug against product "EGL" component "Registry". 35 | */ 36 | 37 | #include 38 | 39 | /* Macros used in EGL function prototype declarations. 40 | * 41 | * EGL functions should be prototyped as: 42 | * 43 | * EGLAPI return-type EGLAPIENTRY eglFunction(arguments); 44 | * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); 45 | * 46 | * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h 47 | */ 48 | 49 | #ifndef EGLAPI 50 | #define EGLAPI KHRONOS_APICALL 51 | #endif 52 | 53 | #ifndef EGLAPIENTRY 54 | #define EGLAPIENTRY KHRONOS_APIENTRY 55 | #endif 56 | #define EGLAPIENTRYP EGLAPIENTRY* 57 | 58 | /* The types NativeDisplayType, NativeWindowType, and NativePixmapType 59 | * are aliases of window-system-dependent types, such as X Display * or 60 | * Windows Device Context. They must be defined in platform-specific 61 | * code below. The EGL-prefixed versions of Native*Type are the same 62 | * types, renamed in EGL 1.3 so all types in the API start with "EGL". 63 | * 64 | * Khronos STRONGLY RECOMMENDS that you use the default definitions 65 | * provided below, since these changes affect both binary and source 66 | * portability of applications using EGL running on different EGL 67 | * implementations. 68 | */ 69 | 70 | #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ 71 | #ifndef WIN32_LEAN_AND_MEAN 72 | #define WIN32_LEAN_AND_MEAN 1 73 | #endif 74 | //#include 75 | 76 | // raylib edit!!! 77 | #ifndef PLATFORM_UWP 78 | typedef void *PVOID; // PVOID is a pointer to any type. This type is declared in WinNT.h 79 | typedef PVOID HANDLE; // HANDLE is handle to an object. This type is declared in WinNT.h 80 | typedef HANDLE HWND; // HWND is a handle to a window. This type is declared in WinDef.h 81 | typedef HANDLE HDC; // HDC is a handle to a device context (DC). This type is declared in WinDef.h 82 | typedef HANDLE HBITMAP; // HBITMAP is a handle to a bitmap. This type is declared in WinDef.h 83 | #else 84 | //UWP Fix 85 | #include "Windows.h" 86 | #endif 87 | 88 | // HDC, HBITMAP and HWND are actually pointers to void. You can cast a long to a HWND like this: HWND h = (HWND)my_long_var; 89 | // but very careful of what information is stored in my_long_var. You have to make sure that you have a pointer in there. 90 | 91 | 92 | 93 | typedef HDC EGLNativeDisplayType; 94 | typedef HBITMAP EGLNativePixmapType; 95 | 96 | #if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) /* Windows Desktop */ 97 | typedef HWND EGLNativeWindowType; 98 | #else /* Windows Store */ 99 | #include 100 | typedef IInspectable* EGLNativeWindowType; 101 | #endif 102 | 103 | #elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ 104 | 105 | typedef int EGLNativeDisplayType; 106 | typedef void *EGLNativeWindowType; 107 | typedef void *EGLNativePixmapType; 108 | 109 | #elif defined(__ANDROID__) || defined(ANDROID) 110 | 111 | #include 112 | 113 | struct egl_native_pixmap_t; 114 | 115 | typedef struct ANativeWindow* EGLNativeWindowType; 116 | typedef struct egl_native_pixmap_t* EGLNativePixmapType; 117 | typedef void* EGLNativeDisplayType; 118 | 119 | #elif defined(__unix__) 120 | 121 | /* X11 (tentative) */ 122 | #include 123 | #include 124 | 125 | typedef Display *EGLNativeDisplayType; 126 | typedef Pixmap EGLNativePixmapType; 127 | typedef Window EGLNativeWindowType; 128 | 129 | #elif defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__) ) 130 | 131 | // TODO(jmadill): native implementation for OSX 132 | 133 | typedef void *EGLNativeDisplayType; 134 | typedef void *EGLNativePixmapType; 135 | typedef void *EGLNativeWindowType; 136 | 137 | #else 138 | #error "Platform not recognized" 139 | #endif 140 | 141 | /* EGL 1.2 types, renamed for consistency in EGL 1.3 */ 142 | typedef EGLNativeDisplayType NativeDisplayType; 143 | typedef EGLNativePixmapType NativePixmapType; 144 | typedef EGLNativeWindowType NativeWindowType; 145 | 146 | 147 | /* Define EGLint. This must be a signed integral type large enough to contain 148 | * all legal attribute names and values passed into and out of EGL, whether 149 | * their type is boolean, bitmask, enumerant (symbolic constant), integer, 150 | * handle, or other. While in general a 32-bit integer will suffice, if 151 | * handles are 64 bit types, then EGLint should be defined as a signed 64-bit 152 | * integer type. 153 | */ 154 | typedef khronos_int32_t EGLint; 155 | 156 | #endif /* __eglplatform_h */ 157 | -------------------------------------------------------------------------------- /libs/raylib/src/external/ANGLE/GLES2/gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ 5 | 6 | /* 7 | * This document is licensed under the SGI Free Software B License Version 8 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 9 | */ 10 | 11 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 12 | * 13 | * Adopters may modify khrplatform.h and this file to suit their platform. 14 | * You are encouraged to submit all modifications to the Khronos group so that 15 | * they can be included in future versions of this file. Please submit changes 16 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) 17 | * by filing a bug against product "OpenGL-ES" component "Registry". 18 | */ 19 | 20 | #include 21 | 22 | #ifndef GL_APICALL 23 | #define GL_APICALL KHRONOS_APICALL 24 | #endif 25 | 26 | #ifndef GL_APIENTRY 27 | #define GL_APIENTRY KHRONOS_APIENTRY 28 | #endif 29 | 30 | #endif /* __gl2platform_h_ */ 31 | -------------------------------------------------------------------------------- /libs/raylib/src/external/ANGLE/GLES3/gl3ext.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl3ext_h_ 2 | #define __gl3ext_h_ 3 | 4 | /* $Revision: 17809 $ on $Date:: 2012-05-14 08:03:36 -0700 #$ */ 5 | 6 | /* 7 | * This document is licensed under the SGI Free Software B License Version 8 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 9 | */ 10 | 11 | /* OpenGL ES 3 Extensions 12 | * 13 | * After an OES extension's interactions with OpenGl ES 3.0 have been documented, 14 | * its tokens and function definitions should be added to this file in a manner 15 | * that does not conflict with gl2ext.h or gl3.h. 16 | * 17 | * Tokens and function definitions for extensions that have become standard 18 | * features in OpenGL ES 3.0 will not be added to this file. 19 | * 20 | * Applications using OpenGL-ES-2-only extensions should include gl2ext.h 21 | */ 22 | 23 | #endif /* __gl3ext_h_ */ 24 | 25 | -------------------------------------------------------------------------------- /libs/raylib/src/external/ANGLE/GLES3/gl3platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl3platform_h_ 2 | #define __gl3platform_h_ 3 | 4 | /* $Revision: 18437 $ on $Date:: 2012-07-08 23:31:39 -0700 #$ */ 5 | 6 | /* 7 | * This document is licensed under the SGI Free Software B License Version 8 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 9 | */ 10 | 11 | /* Platform-specific types and definitions for OpenGL ES 3.X gl3.h 12 | * 13 | * Adopters may modify khrplatform.h and this file to suit their platform. 14 | * You are encouraged to submit all modifications to the Khronos group so that 15 | * they can be included in future versions of this file. Please submit changes 16 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) 17 | * by filing a bug against product "OpenGL-ES" component "Registry". 18 | */ 19 | 20 | #include 21 | 22 | #ifndef GL_APICALL 23 | #define GL_APICALL KHRONOS_APICALL 24 | #endif 25 | 26 | #ifndef GL_APIENTRY 27 | #define GL_APIENTRY KHRONOS_APIENTRY 28 | #endif 29 | 30 | #endif /* __gl3platform_h_ */ 31 | -------------------------------------------------------------------------------- /libs/raylib/src/external/ANGLE/angle_windowsstore.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2014 The ANGLE Project Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style license that can be 4 | // found in the LICENSE file. 5 | // 6 | // angle_windowsstore.h: 7 | 8 | #ifndef ANGLE_WINDOWSSTORE_H_ 9 | #define ANGLE_WINDOWSSTORE_H_ 10 | 11 | // The following properties can be set on the CoreApplication to support additional 12 | // ANGLE configuration options. 13 | // 14 | // The Visual Studio sample templates provided with this version of ANGLE have examples 15 | // of how to set these property values. 16 | 17 | // 18 | // Property: EGLNativeWindowTypeProperty 19 | // Type: IInspectable 20 | // Description: Set this property to specify the window type to use for creating a surface. 21 | // If this property is missing, surface creation will fail. 22 | // 23 | const wchar_t EGLNativeWindowTypeProperty[] = L"EGLNativeWindowTypeProperty"; 24 | 25 | // 26 | // Property: EGLRenderSurfaceSizeProperty 27 | // Type: Size 28 | // Description: Set this property to specify a preferred size in pixels of the render surface. 29 | // The render surface size width and height must be greater than 0. 30 | // If this property is set, then the render surface size is fixed. 31 | // The render surface will then be scaled to the window dimensions. 32 | // If this property is missing, a default behavior will be provided. 33 | // The default behavior uses the window size if a CoreWindow is specified or 34 | // the size of the SwapChainPanel control if one is specified. 35 | // 36 | const wchar_t EGLRenderSurfaceSizeProperty[] = L"EGLRenderSurfaceSizeProperty"; 37 | 38 | // 39 | // Property: EGLRenderResolutionScaleProperty 40 | // Type: Single 41 | // Description: Use this to specify a preferred scale for the render surface compared to the window. 42 | // For example, if the window is 800x480, and: 43 | // - scale is set to 0.5f then the surface will be 400x240 44 | // - scale is set to 1.2f then the surface will be 960x576 45 | // If the window resizes or rotates then the surface will resize accordingly. 46 | // EGLRenderResolutionScaleProperty and EGLRenderSurfaceSizeProperty cannot both be set. 47 | // The scale factor should be > 0.0f and < 1.5f. 48 | // 49 | const wchar_t EGLRenderResolutionScaleProperty[] = L"EGLRenderResolutionScaleProperty"; 50 | 51 | #endif // ANGLE_WINDOWSSTORE_H_ 52 | -------------------------------------------------------------------------------- /libs/raylib/src/external/android/native_app_glue/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2016 The Android Open Source Project 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /libs/raylib/src/external/dirent.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | 3 | Declaration of POSIX directory browsing functions and types for Win32. 4 | 5 | Author: Kevlin Henney (kevlin@acm.org, kevlin@curbralan.com) 6 | History: Created March 1997. Updated June 2003. 7 | Reviewed by Ramon Santamaria for raylib on January 2020. 8 | 9 | Copyright Kevlin Henney, 1997, 2003. All rights reserved. 10 | 11 | Permission to use, copy, modify, and distribute this software and its 12 | documentation for any purpose is hereby granted without fee, provided 13 | that this copyright and permissions notice appear in all copies and 14 | derivatives. 15 | 16 | This software is supplied "as is" without express or implied warranty. 17 | 18 | But that said, if there are any problems please get in touch. 19 | 20 | ****************************************************************************/ 21 | 22 | #ifndef DIRENT_H 23 | #define DIRENT_H 24 | 25 | // Allow custom memory allocators 26 | #ifndef DIRENT_MALLOC 27 | #define DIRENT_MALLOC(sz) malloc(sz) 28 | #endif 29 | #ifndef DIRENT_FREE 30 | #define DIRENT_FREE(p) free(p) 31 | #endif 32 | 33 | //---------------------------------------------------------------------------------- 34 | // Types and Structures Definition 35 | //---------------------------------------------------------------------------------- 36 | 37 | // Fordward declaration of DIR, implementation below 38 | typedef struct DIR DIR; 39 | 40 | struct dirent { 41 | char *d_name; 42 | }; 43 | 44 | #ifdef __cplusplus 45 | extern "C" { 46 | #endif 47 | 48 | //------------------------------------------------------------------------------------ 49 | // Functions Declaration 50 | //------------------------------------------------------------------------------------ 51 | DIR *opendir(const char *name); 52 | int closedir(DIR *dir); 53 | struct dirent *readdir(DIR *dir); 54 | void rewinddir(DIR *dir); 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif // DIRENT_H 61 | 62 | /**************************************************************************** 63 | 64 | Implementation of POSIX directory browsing functions and types for Win32. 65 | 66 | Author: Kevlin Henney (kevlin@acm.org, kevlin@curbralan.com) 67 | History: Created March 1997. Updated June 2003. 68 | Reviewed by Ramon Santamaria for raylib on January 2020. 69 | 70 | Copyright Kevlin Henney, 1997, 2003. All rights reserved. 71 | 72 | Permission to use, copy, modify, and distribute this software and its 73 | documentation for any purpose is hereby granted without fee, provided 74 | that this copyright and permissions notice appear in all copies and 75 | derivatives. 76 | 77 | This software is supplied "as is" without express or implied warranty. 78 | 79 | But that said, if there are any problems please get in touch. 80 | 81 | ****************************************************************************/ 82 | 83 | #include // _findfirst and _findnext set errno iff they return -1 84 | #include 85 | #include 86 | #include 87 | 88 | //---------------------------------------------------------------------------------- 89 | // Types and Structures Definition 90 | //---------------------------------------------------------------------------------- 91 | typedef ptrdiff_t handle_type; // C99's intptr_t not sufficiently portable 92 | 93 | struct DIR { 94 | handle_type handle; // -1 for failed rewind 95 | struct _finddata_t info; 96 | struct dirent result; // d_name null iff first time 97 | char *name; // null-terminated char string 98 | }; 99 | 100 | DIR *opendir(const char *name) 101 | { 102 | DIR *dir = 0; 103 | 104 | if (name && name[0]) 105 | { 106 | size_t base_length = strlen(name); 107 | 108 | // Search pattern must end with suitable wildcard 109 | const char *all = strchr("/\\", name[base_length - 1]) ? "*" : "/*"; 110 | 111 | if ((dir = (DIR *)DIRENT_MALLOC(sizeof *dir)) != 0 && 112 | (dir->name = (char *)DIRENT_MALLOC(base_length + strlen(all) + 1)) != 0) 113 | { 114 | strcat(strcpy(dir->name, name), all); 115 | 116 | if ((dir->handle = (handle_type) _findfirst(dir->name, &dir->info)) != -1) 117 | { 118 | dir->result.d_name = 0; 119 | } 120 | else // rollback 121 | { 122 | DIRENT_FREE(dir->name); 123 | DIRENT_FREE(dir); 124 | dir = 0; 125 | } 126 | } 127 | else // rollback 128 | { 129 | DIRENT_FREE(dir); 130 | dir = 0; 131 | errno = ENOMEM; 132 | } 133 | } 134 | else errno = EINVAL; 135 | 136 | return dir; 137 | } 138 | 139 | int closedir(DIR *dir) 140 | { 141 | int result = -1; 142 | 143 | if (dir) 144 | { 145 | if (dir->handle != -1) result = _findclose(dir->handle); 146 | 147 | DIRENT_FREE(dir->name); 148 | DIRENT_FREE(dir); 149 | } 150 | 151 | // NOTE: All errors ampped to EBADF 152 | if (result == -1) errno = EBADF; 153 | 154 | return result; 155 | } 156 | 157 | struct dirent *readdir(DIR *dir) 158 | { 159 | struct dirent *result = 0; 160 | 161 | if (dir && dir->handle != -1) 162 | { 163 | if (!dir->result.d_name || _findnext(dir->handle, &dir->info) != -1) 164 | { 165 | result = &dir->result; 166 | result->d_name = dir->info.name; 167 | } 168 | } 169 | else errno = EBADF; 170 | 171 | return result; 172 | } 173 | 174 | void rewinddir(DIR *dir) 175 | { 176 | if (dir && dir->handle != -1) 177 | { 178 | _findclose(dir->handle); 179 | dir->handle = (handle_type) _findfirst(dir->name, &dir->info); 180 | dir->result.d_name = 0; 181 | } 182 | else errno = EBADF; 183 | } 184 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/.appveyor.yml: -------------------------------------------------------------------------------- 1 | branches: 2 | only: 3 | - ci 4 | - master 5 | skip_tags: true 6 | environment: 7 | CFLAGS: /WX 8 | matrix: 9 | - BUILD_SHARED_LIBS: ON 10 | - BUILD_SHARED_LIBS: OFF 11 | matrix: 12 | fast_finish: true 13 | build_script: 14 | - mkdir build 15 | - cd build 16 | - cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_SHARED_LIBS=%BUILD_SHARED_LIBS% .. 17 | - cmake --build . 18 | notifications: 19 | - provider: Email 20 | to: 21 | - ci@glfw.org 22 | on_build_failure: true 23 | on_build_success: false 24 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/.mailmap: -------------------------------------------------------------------------------- 1 | Camilla Löwy 2 | Camilla Löwy 3 | Camilla Löwy 4 | 5 | Emmanuel Gil Peyrot 6 | 7 | Marcus Geelnard 8 | Marcus Geelnard 9 | Marcus Geelnard 10 | 11 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | compiler: clang 3 | branches: 4 | only: 5 | - ci 6 | - master 7 | sudo: false 8 | dist: trusty 9 | addons: 10 | apt: 11 | packages: 12 | - cmake 13 | - libxrandr-dev 14 | - libxinerama-dev 15 | - libxcursor-dev 16 | - libxi-dev 17 | matrix: 18 | include: 19 | - os: linux 20 | env: 21 | - BUILD_SHARED_LIBS=ON 22 | - CFLAGS=-Werror 23 | - os: linux 24 | env: 25 | - BUILD_SHARED_LIBS=OFF 26 | - CFLAGS=-Werror 27 | - os: linux 28 | sudo: required 29 | addons: 30 | apt: 31 | packages: 32 | - libwayland-dev 33 | - libxkbcommon-dev 34 | - libegl1-mesa-dev 35 | env: 36 | - USE_WAYLAND=ON 37 | - BUILD_SHARED_LIBS=ON 38 | - CFLAGS=-Werror 39 | - os: linux 40 | sudo: required 41 | addons: 42 | apt: 43 | packages: 44 | - libwayland-dev 45 | - libxkbcommon-dev 46 | - libegl1-mesa-dev 47 | env: 48 | - USE_WAYLAND=ON 49 | - BUILD_SHARED_LIBS=OFF 50 | - CFLAGS=-Werror 51 | - os: osx 52 | env: 53 | - BUILD_SHARED_LIBS=ON 54 | - CFLAGS=-Werror 55 | - os: osx 56 | env: 57 | - BUILD_SHARED_LIBS=OFF 58 | - CFLAGS=-Werror 59 | script: 60 | - if grep -Inr '\s$' src include docs tests examples CMake *.md .gitattributes .gitignore; then echo Trailing whitespace found, aborting.; exit 1; fi 61 | - mkdir build 62 | - cd build 63 | - if test -n "${USE_WAYLAND}"; 64 | then wget https://mirrors.kernel.org/ubuntu/pool/universe/e/extra-cmake-modules/extra-cmake-modules_5.38.0a-0ubuntu1_amd64.deb; 65 | sudo dpkg -i extra-cmake-modules_5.38.0a-0ubuntu1_amd64.deb; 66 | git clone git://anongit.freedesktop.org/wayland/wayland-protocols; 67 | pushd wayland-protocols; 68 | git checkout 1.15 && ./autogen.sh --prefix=/usr && make && sudo make install; 69 | popd; 70 | fi 71 | - cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} -DGLFW_USE_WAYLAND=${USE_WAYLAND} .. 72 | - cmake --build . 73 | notifications: 74 | email: 75 | recipients: 76 | - ci@glfw.org 77 | on_success: never 78 | on_failure: always 79 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/CMake/GenerateMappings.cmake: -------------------------------------------------------------------------------- 1 | # Usage: 2 | # cmake -P GenerateMappings.cmake 3 | 4 | set(source_url "https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt") 5 | set(source_path "${CMAKE_CURRENT_BINARY_DIR}/gamecontrollerdb.txt") 6 | set(template_path "${CMAKE_ARGV3}") 7 | set(target_path "${CMAKE_ARGV4}") 8 | 9 | if (NOT EXISTS "${template_path}") 10 | message(FATAL_ERROR "Failed to find template file ${template_path}") 11 | endif() 12 | 13 | file(DOWNLOAD "${source_url}" "${source_path}" 14 | STATUS download_status 15 | TLS_VERIFY on) 16 | 17 | list(GET download_status 0 status_code) 18 | list(GET download_status 1 status_message) 19 | 20 | if (status_code) 21 | message(FATAL_ERROR "Failed to download ${source_url}: ${status_message}") 22 | endif() 23 | 24 | file(STRINGS "${source_path}" lines) 25 | foreach(line ${lines}) 26 | if ("${line}" MATCHES "^[0-9a-fA-F].*$") 27 | set(GLFW_GAMEPAD_MAPPINGS "${GLFW_GAMEPAD_MAPPINGS}\"${line}\",\n") 28 | endif() 29 | endforeach() 30 | 31 | configure_file("${template_path}" "${target_path}" @ONLY NEWLINE_STYLE UNIX) 32 | file(REMOVE "${source_path}") 33 | 34 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/CMake/Info.plist.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${MACOSX_BUNDLE_EXECUTABLE_NAME} 9 | CFBundleGetInfoString 10 | ${MACOSX_BUNDLE_INFO_STRING} 11 | CFBundleIconFile 12 | ${MACOSX_BUNDLE_ICON_FILE} 13 | CFBundleIdentifier 14 | ${MACOSX_BUNDLE_GUI_IDENTIFIER} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleLongVersionString 18 | ${MACOSX_BUNDLE_LONG_VERSION_STRING} 19 | CFBundleName 20 | ${MACOSX_BUNDLE_BUNDLE_NAME} 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | ${MACOSX_BUNDLE_SHORT_VERSION_STRING} 25 | CFBundleSignature 26 | ???? 27 | CFBundleVersion 28 | ${MACOSX_BUNDLE_BUNDLE_VERSION} 29 | CSResourcesFileMapped 30 | 31 | LSRequiresCarbon 32 | 33 | NSHumanReadableCopyright 34 | ${MACOSX_BUNDLE_COPYRIGHT} 35 | NSHighResolutionCapable 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/CMake/MacOSXBundleInfo.plist.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${MACOSX_BUNDLE_EXECUTABLE_NAME} 9 | CFBundleGetInfoString 10 | ${MACOSX_BUNDLE_INFO_STRING} 11 | CFBundleIconFile 12 | ${MACOSX_BUNDLE_ICON_FILE} 13 | CFBundleIdentifier 14 | ${MACOSX_BUNDLE_GUI_IDENTIFIER} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleLongVersionString 18 | ${MACOSX_BUNDLE_LONG_VERSION_STRING} 19 | CFBundleName 20 | ${MACOSX_BUNDLE_BUNDLE_NAME} 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | ${MACOSX_BUNDLE_SHORT_VERSION_STRING} 25 | CFBundleSignature 26 | ???? 27 | CFBundleVersion 28 | ${MACOSX_BUNDLE_BUNDLE_VERSION} 29 | CSResourcesFileMapped 30 | 31 | LSRequiresCarbon 32 | 33 | NSHumanReadableCopyright 34 | ${MACOSX_BUNDLE_COPYRIGHT} 35 | NSHighResolutionCapable 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/CMake/cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | 2 | if (NOT EXISTS "@GLFW_BINARY_DIR@/install_manifest.txt") 3 | message(FATAL_ERROR "Cannot find install manifest: \"@GLFW_BINARY_DIR@/install_manifest.txt\"") 4 | endif() 5 | 6 | file(READ "@GLFW_BINARY_DIR@/install_manifest.txt" files) 7 | string(REGEX REPLACE "\n" ";" files "${files}") 8 | 9 | foreach (file ${files}) 10 | message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 11 | if (EXISTS "$ENV{DESTDIR}${file}") 12 | exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 13 | OUTPUT_VARIABLE rm_out 14 | RETURN_VALUE rm_retval) 15 | if (NOT "${rm_retval}" STREQUAL 0) 16 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 17 | endif() 18 | elseif (IS_SYMLINK "$ENV{DESTDIR}${file}") 19 | EXEC_PROGRAM("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 20 | OUTPUT_VARIABLE rm_out 21 | RETURN_VALUE rm_retval) 22 | if (NOT "${rm_retval}" STREQUAL 0) 23 | message(FATAL_ERROR "Problem when removing symlink \"$ENV{DESTDIR}${file}\"") 24 | endif() 25 | else() 26 | message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") 27 | endif() 28 | endforeach() 29 | 30 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/CMake/i686-w64-mingw32-clang.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross-compiling with 32-bit MinGW-w64 Clang 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "i686-w64-mingw32-clang") 5 | SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-clang++") 6 | SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/CMake/i686-w64-mingw32.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross-compiling with 32-bit MinGW-w64 GCC 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "i686-w64-mingw32-gcc") 5 | SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-g++") 6 | SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/CMake/modules/FindEpollShim.cmake: -------------------------------------------------------------------------------- 1 | # Find EpollShim 2 | # Once done, this will define 3 | # 4 | # EPOLLSHIM_FOUND - System has EpollShim 5 | # EPOLLSHIM_INCLUDE_DIRS - The EpollShim include directories 6 | # EPOLLSHIM_LIBRARIES - The libraries needed to use EpollShim 7 | 8 | find_path(EPOLLSHIM_INCLUDE_DIRS NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim) 9 | find_library(EPOLLSHIM_LIBRARIES NAMES epoll-shim libepoll-shim HINTS /usr/local/lib) 10 | 11 | if (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES) 12 | set(EPOLLSHIM_FOUND TRUE) 13 | endif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES) 14 | 15 | include(FindPackageHandleStandardArgs) 16 | find_package_handle_standard_args(EPOLLSHIM DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS) 17 | mark_as_advanced(EPOLLSHIM_INCLUDE_DIRS EPOLLSHIM_LIBRARIES) 18 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/CMake/modules/FindOSMesa.cmake: -------------------------------------------------------------------------------- 1 | # Try to find OSMesa on a Unix system 2 | # 3 | # This will define: 4 | # 5 | # OSMESA_LIBRARIES - Link these to use OSMesa 6 | # OSMESA_INCLUDE_DIR - Include directory for OSMesa 7 | # 8 | # Copyright (c) 2014 Brandon Schaefer 9 | 10 | if (NOT WIN32) 11 | 12 | find_package (PkgConfig) 13 | pkg_check_modules (PKG_OSMESA QUIET osmesa) 14 | 15 | set (OSMESA_INCLUDE_DIR ${PKG_OSMESA_INCLUDE_DIRS}) 16 | set (OSMESA_LIBRARIES ${PKG_OSMESA_LIBRARIES}) 17 | 18 | endif () 19 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/CMake/modules/FindWaylandProtocols.cmake: -------------------------------------------------------------------------------- 1 | find_package(PkgConfig) 2 | 3 | pkg_check_modules(WaylandProtocols QUIET wayland-protocols>=${WaylandProtocols_FIND_VERSION}) 4 | 5 | execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-protocols 6 | OUTPUT_VARIABLE WaylandProtocols_PKGDATADIR 7 | RESULT_VARIABLE _pkgconfig_failed) 8 | if (_pkgconfig_failed) 9 | message(FATAL_ERROR "Missing wayland-protocols pkgdatadir") 10 | endif() 11 | 12 | string(REGEX REPLACE "[\r\n]" "" WaylandProtocols_PKGDATADIR "${WaylandProtocols_PKGDATADIR}") 13 | 14 | find_package_handle_standard_args(WaylandProtocols 15 | FOUND_VAR 16 | WaylandProtocols_FOUND 17 | REQUIRED_VARS 18 | WaylandProtocols_PKGDATADIR 19 | VERSION_VAR 20 | WaylandProtocols_VERSION 21 | HANDLE_COMPONENTS 22 | ) 23 | 24 | set(WAYLAND_PROTOCOLS_FOUND ${WaylandProtocols_FOUND}) 25 | set(WAYLAND_PROTOCOLS_PKGDATADIR ${WaylandProtocols_PKGDATADIR}) 26 | set(WAYLAND_PROTOCOLS_VERSION ${WaylandProtocols_VERSION}) 27 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/CMake/modules/FindXKBCommon.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find XKBCommon 2 | # Once done, this will define 3 | # 4 | # XKBCOMMON_FOUND - System has XKBCommon 5 | # XKBCOMMON_INCLUDE_DIRS - The XKBCommon include directories 6 | # XKBCOMMON_LIBRARIES - The libraries needed to use XKBCommon 7 | # XKBCOMMON_DEFINITIONS - Compiler switches required for using XKBCommon 8 | 9 | find_package(PkgConfig) 10 | pkg_check_modules(PC_XKBCOMMON QUIET xkbcommon) 11 | set(XKBCOMMON_DEFINITIONS ${PC_XKBCOMMON_CFLAGS_OTHER}) 12 | 13 | find_path(XKBCOMMON_INCLUDE_DIR 14 | NAMES xkbcommon/xkbcommon.h 15 | HINTS ${PC_XKBCOMMON_INCLUDE_DIR} ${PC_XKBCOMMON_INCLUDE_DIRS} 16 | ) 17 | 18 | find_library(XKBCOMMON_LIBRARY 19 | NAMES xkbcommon 20 | HINTS ${PC_XKBCOMMON_LIBRARY} ${PC_XKBCOMMON_LIBRARY_DIRS} 21 | ) 22 | 23 | set(XKBCOMMON_LIBRARIES ${XKBCOMMON_LIBRARY}) 24 | set(XKBCOMMON_LIBRARY_DIRS ${XKBCOMMON_LIBRARY_DIRS}) 25 | set(XKBCOMMON_INCLUDE_DIRS ${XKBCOMMON_INCLUDE_DIR}) 26 | 27 | include(FindPackageHandleStandardArgs) 28 | find_package_handle_standard_args(XKBCommon DEFAULT_MSG 29 | XKBCOMMON_LIBRARY 30 | XKBCOMMON_INCLUDE_DIR 31 | ) 32 | 33 | mark_as_advanced(XKBCOMMON_LIBRARY XKBCOMMON_INCLUDE_DIR) 34 | 35 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/CMake/x86_64-w64-mingw32-clang.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross-compiling with 64-bit MinGW-w64 Clang 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-clang") 5 | SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-clang++") 6 | SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/CMake/x86_64-w64-mingw32.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross-compiling with 64-bit MinGW-w64 GCC 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-gcc") 5 | SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-g++") 6 | SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002-2006 Marcus Geelnard 2 | 3 | Copyright (c) 2006-2019 Camilla Löwy 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would 16 | be appreciated but is not required. 17 | 18 | 2. Altered source versions must be plainly marked as such, and must not 19 | be misrepresented as being the original software. 20 | 21 | 3. This notice may not be removed or altered from any source 22 | distribution. 23 | 24 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/deps/getopt.h: -------------------------------------------------------------------------------- 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 | #ifndef INCLUDED_GETOPT_PORT_H 28 | #define INCLUDED_GETOPT_PORT_H 29 | 30 | #if defined(__cplusplus) 31 | extern "C" { 32 | #endif 33 | 34 | extern const int no_argument; 35 | extern const int required_argument; 36 | extern const int optional_argument; 37 | 38 | extern char* optarg; 39 | extern int optind, opterr, optopt; 40 | 41 | struct option { 42 | const char* name; 43 | int has_arg; 44 | int* flag; 45 | int val; 46 | }; 47 | 48 | int getopt(int argc, char* const argv[], const char* optstring); 49 | 50 | int getopt_long(int argc, char* const argv[], 51 | const char* optstring, const struct option* longopts, int* longindex); 52 | 53 | #if defined(__cplusplus) 54 | } 55 | #endif 56 | 57 | #endif // INCLUDED_GETOPT_PORT_H 58 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/deps/glad/vk_platform.h: -------------------------------------------------------------------------------- 1 | /* */ 2 | /* File: vk_platform.h */ 3 | /* */ 4 | /* 5 | ** Copyright (c) 2014-2017 The Khronos Group Inc. 6 | ** 7 | ** Licensed under the Apache License, Version 2.0 (the "License"); 8 | ** you may not use this file except in compliance with the License. 9 | ** You may obtain a copy of the License at 10 | ** 11 | ** http://www.apache.org/licenses/LICENSE-2.0 12 | ** 13 | ** Unless required by applicable law or agreed to in writing, software 14 | ** distributed under the License is distributed on an "AS IS" BASIS, 15 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | ** See the License for the specific language governing permissions and 17 | ** limitations under the License. 18 | */ 19 | 20 | 21 | #ifndef VK_PLATFORM_H_ 22 | #define VK_PLATFORM_H_ 23 | 24 | #ifdef __cplusplus 25 | extern "C" 26 | { 27 | #endif /* __cplusplus */ 28 | 29 | /* 30 | *************************************************************************************************** 31 | * Platform-specific directives and type declarations 32 | *************************************************************************************************** 33 | */ 34 | 35 | /* Platform-specific calling convention macros. 36 | * 37 | * Platforms should define these so that Vulkan clients call Vulkan commands 38 | * with the same calling conventions that the Vulkan implementation expects. 39 | * 40 | * VKAPI_ATTR - Placed before the return type in function declarations. 41 | * Useful for C++11 and GCC/Clang-style function attribute syntax. 42 | * VKAPI_CALL - Placed after the return type in function declarations. 43 | * Useful for MSVC-style calling convention syntax. 44 | * VKAPI_PTR - Placed between the '(' and '*' in function pointer types. 45 | * 46 | * Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void); 47 | * Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void); 48 | */ 49 | #if defined(_WIN32) 50 | /* On Windows, Vulkan commands use the stdcall convention */ 51 | #define VKAPI_ATTR 52 | #define VKAPI_CALL __stdcall 53 | #define VKAPI_PTR VKAPI_CALL 54 | #elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7 55 | #error "Vulkan isn't supported for the 'armeabi' NDK ABI" 56 | #elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE) 57 | /* On Android 32-bit ARM targets, Vulkan functions use the "hardfloat" */ 58 | /* calling convention, i.e. float parameters are passed in registers. This */ 59 | /* is true even if the rest of the application passes floats on the stack, */ 60 | /* as it does by default when compiling for the armeabi-v7a NDK ABI. */ 61 | #define VKAPI_ATTR __attribute__((pcs("aapcs-vfp"))) 62 | #define VKAPI_CALL 63 | #define VKAPI_PTR VKAPI_ATTR 64 | #else 65 | /* On other platforms, use the default calling convention */ 66 | #define VKAPI_ATTR 67 | #define VKAPI_CALL 68 | #define VKAPI_PTR 69 | #endif 70 | 71 | #include 72 | 73 | #if !defined(VK_NO_STDINT_H) 74 | #if defined(_MSC_VER) && (_MSC_VER < 1600) 75 | typedef signed __int8 int8_t; 76 | typedef unsigned __int8 uint8_t; 77 | typedef signed __int16 int16_t; 78 | typedef unsigned __int16 uint16_t; 79 | typedef signed __int32 int32_t; 80 | typedef unsigned __int32 uint32_t; 81 | typedef signed __int64 int64_t; 82 | typedef unsigned __int64 uint64_t; 83 | #else 84 | #include 85 | #endif 86 | #endif /* !defined(VK_NO_STDINT_H) */ 87 | 88 | #ifdef __cplusplus 89 | } /* extern "C" */ 90 | #endif /* __cplusplus */ 91 | 92 | #endif 93 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/deps/mingw/_mingw_dxhelper.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file has no copyright assigned and is placed in the Public Domain. 3 | * This file is part of the mingw-w64 runtime package. 4 | * No warranty is given; refer to the file DISCLAIMER within this package. 5 | */ 6 | 7 | #if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS) 8 | #define NONAMELESSUNION 1 9 | #endif 10 | #if defined(NONAMELESSSTRUCT) && \ 11 | !defined(NONAMELESSUNION) 12 | #define NONAMELESSUNION 1 13 | #endif 14 | #if defined(NONAMELESSUNION) && \ 15 | !defined(NONAMELESSSTRUCT) 16 | #define NONAMELESSSTRUCT 1 17 | #endif 18 | #if !defined(__GNU_EXTENSION) 19 | #if defined(__GNUC__) || defined(__GNUG__) 20 | #define __GNU_EXTENSION __extension__ 21 | #else 22 | #define __GNU_EXTENSION 23 | #endif 24 | #endif /* __extension__ */ 25 | 26 | #ifndef __ANONYMOUS_DEFINED 27 | #define __ANONYMOUS_DEFINED 28 | #if defined(__GNUC__) || defined(__GNUG__) 29 | #define _ANONYMOUS_UNION __extension__ 30 | #define _ANONYMOUS_STRUCT __extension__ 31 | #else 32 | #define _ANONYMOUS_UNION 33 | #define _ANONYMOUS_STRUCT 34 | #endif 35 | #ifndef NONAMELESSUNION 36 | #define _UNION_NAME(x) 37 | #define _STRUCT_NAME(x) 38 | #else /* NONAMELESSUNION */ 39 | #define _UNION_NAME(x) x 40 | #define _STRUCT_NAME(x) x 41 | #endif 42 | #endif /* __ANONYMOUS_DEFINED */ 43 | 44 | #ifndef DUMMYUNIONNAME 45 | # ifdef NONAMELESSUNION 46 | # define DUMMYUNIONNAME u 47 | # define DUMMYUNIONNAME1 u1 /* Wine uses this variant */ 48 | # define DUMMYUNIONNAME2 u2 49 | # define DUMMYUNIONNAME3 u3 50 | # define DUMMYUNIONNAME4 u4 51 | # define DUMMYUNIONNAME5 u5 52 | # define DUMMYUNIONNAME6 u6 53 | # define DUMMYUNIONNAME7 u7 54 | # define DUMMYUNIONNAME8 u8 55 | # define DUMMYUNIONNAME9 u9 56 | # else /* NONAMELESSUNION */ 57 | # define DUMMYUNIONNAME 58 | # define DUMMYUNIONNAME1 /* Wine uses this variant */ 59 | # define DUMMYUNIONNAME2 60 | # define DUMMYUNIONNAME3 61 | # define DUMMYUNIONNAME4 62 | # define DUMMYUNIONNAME5 63 | # define DUMMYUNIONNAME6 64 | # define DUMMYUNIONNAME7 65 | # define DUMMYUNIONNAME8 66 | # define DUMMYUNIONNAME9 67 | # endif 68 | #endif /* DUMMYUNIONNAME */ 69 | 70 | #if !defined(DUMMYUNIONNAME1) /* MinGW does not define this one */ 71 | # ifdef NONAMELESSUNION 72 | # define DUMMYUNIONNAME1 u1 /* Wine uses this variant */ 73 | # else 74 | # define DUMMYUNIONNAME1 /* Wine uses this variant */ 75 | # endif 76 | #endif /* DUMMYUNIONNAME1 */ 77 | 78 | #ifndef DUMMYSTRUCTNAME 79 | # ifdef NONAMELESSUNION 80 | # define DUMMYSTRUCTNAME s 81 | # define DUMMYSTRUCTNAME1 s1 /* Wine uses this variant */ 82 | # define DUMMYSTRUCTNAME2 s2 83 | # define DUMMYSTRUCTNAME3 s3 84 | # define DUMMYSTRUCTNAME4 s4 85 | # define DUMMYSTRUCTNAME5 s5 86 | # else 87 | # define DUMMYSTRUCTNAME 88 | # define DUMMYSTRUCTNAME1 /* Wine uses this variant */ 89 | # define DUMMYSTRUCTNAME2 90 | # define DUMMYSTRUCTNAME3 91 | # define DUMMYSTRUCTNAME4 92 | # define DUMMYSTRUCTNAME5 93 | # endif 94 | #endif /* DUMMYSTRUCTNAME */ 95 | 96 | /* These are for compatibility with the Wine source tree */ 97 | 98 | #ifndef WINELIB_NAME_AW 99 | # ifdef __MINGW_NAME_AW 100 | # define WINELIB_NAME_AW __MINGW_NAME_AW 101 | # else 102 | # ifdef UNICODE 103 | # define WINELIB_NAME_AW(func) func##W 104 | # else 105 | # define WINELIB_NAME_AW(func) func##A 106 | # endif 107 | # endif 108 | #endif /* WINELIB_NAME_AW */ 109 | 110 | #ifndef DECL_WINELIB_TYPE_AW 111 | # ifdef __MINGW_TYPEDEF_AW 112 | # define DECL_WINELIB_TYPE_AW __MINGW_TYPEDEF_AW 113 | # else 114 | # define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type; 115 | # endif 116 | #endif /* DECL_WINELIB_TYPE_AW */ 117 | 118 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/deps/mingw/xinput.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The Wine project - Xinput Joystick Library 3 | * Copyright 2008 Andrew Fenn 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 18 | */ 19 | 20 | #ifndef __WINE_XINPUT_H 21 | #define __WINE_XINPUT_H 22 | 23 | #include 24 | 25 | /* 26 | * Bitmasks for the joysticks buttons, determines what has 27 | * been pressed on the joystick, these need to be mapped 28 | * to whatever device you're using instead of an xbox 360 29 | * joystick 30 | */ 31 | 32 | #define XINPUT_GAMEPAD_DPAD_UP 0x0001 33 | #define XINPUT_GAMEPAD_DPAD_DOWN 0x0002 34 | #define XINPUT_GAMEPAD_DPAD_LEFT 0x0004 35 | #define XINPUT_GAMEPAD_DPAD_RIGHT 0x0008 36 | #define XINPUT_GAMEPAD_START 0x0010 37 | #define XINPUT_GAMEPAD_BACK 0x0020 38 | #define XINPUT_GAMEPAD_LEFT_THUMB 0x0040 39 | #define XINPUT_GAMEPAD_RIGHT_THUMB 0x0080 40 | #define XINPUT_GAMEPAD_LEFT_SHOULDER 0x0100 41 | #define XINPUT_GAMEPAD_RIGHT_SHOULDER 0x0200 42 | #define XINPUT_GAMEPAD_A 0x1000 43 | #define XINPUT_GAMEPAD_B 0x2000 44 | #define XINPUT_GAMEPAD_X 0x4000 45 | #define XINPUT_GAMEPAD_Y 0x8000 46 | 47 | /* 48 | * Defines the flags used to determine if the user is pushing 49 | * down on a button, not holding a button, etc 50 | */ 51 | 52 | #define XINPUT_KEYSTROKE_KEYDOWN 0x0001 53 | #define XINPUT_KEYSTROKE_KEYUP 0x0002 54 | #define XINPUT_KEYSTROKE_REPEAT 0x0004 55 | 56 | /* 57 | * Defines the codes which are returned by XInputGetKeystroke 58 | */ 59 | 60 | #define VK_PAD_A 0x5800 61 | #define VK_PAD_B 0x5801 62 | #define VK_PAD_X 0x5802 63 | #define VK_PAD_Y 0x5803 64 | #define VK_PAD_RSHOULDER 0x5804 65 | #define VK_PAD_LSHOULDER 0x5805 66 | #define VK_PAD_LTRIGGER 0x5806 67 | #define VK_PAD_RTRIGGER 0x5807 68 | #define VK_PAD_DPAD_UP 0x5810 69 | #define VK_PAD_DPAD_DOWN 0x5811 70 | #define VK_PAD_DPAD_LEFT 0x5812 71 | #define VK_PAD_DPAD_RIGHT 0x5813 72 | #define VK_PAD_START 0x5814 73 | #define VK_PAD_BACK 0x5815 74 | #define VK_PAD_LTHUMB_PRESS 0x5816 75 | #define VK_PAD_RTHUMB_PRESS 0x5817 76 | #define VK_PAD_LTHUMB_UP 0x5820 77 | #define VK_PAD_LTHUMB_DOWN 0x5821 78 | #define VK_PAD_LTHUMB_RIGHT 0x5822 79 | #define VK_PAD_LTHUMB_LEFT 0x5823 80 | #define VK_PAD_LTHUMB_UPLEFT 0x5824 81 | #define VK_PAD_LTHUMB_UPRIGHT 0x5825 82 | #define VK_PAD_LTHUMB_DOWNRIGHT 0x5826 83 | #define VK_PAD_LTHUMB_DOWNLEFT 0x5827 84 | #define VK_PAD_RTHUMB_UP 0x5830 85 | #define VK_PAD_RTHUMB_DOWN 0x5831 86 | #define VK_PAD_RTHUMB_RIGHT 0x5832 87 | #define VK_PAD_RTHUMB_LEFT 0x5833 88 | #define VK_PAD_RTHUMB_UPLEFT 0x5834 89 | #define VK_PAD_RTHUMB_UPRIGHT 0x5835 90 | #define VK_PAD_RTHUMB_DOWNRIGHT 0x5836 91 | #define VK_PAD_RTHUMB_DOWNLEFT 0x5837 92 | 93 | /* 94 | * Deadzones are for analogue joystick controls on the joypad 95 | * which determine when input should be assumed to be in the 96 | * middle of the pad. This is a threshold to stop a joypad 97 | * controlling the game when the player isn't touching the 98 | * controls. 99 | */ 100 | 101 | #define XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE 7849 102 | #define XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE 8689 103 | #define XINPUT_GAMEPAD_TRIGGER_THRESHOLD 30 104 | 105 | 106 | /* 107 | * Defines what type of abilities the type of joystick has 108 | * DEVTYPE_GAMEPAD is available for all joysticks, however 109 | * there may be more specific identifiers for other joysticks 110 | * which are being used. 111 | */ 112 | 113 | #define XINPUT_DEVTYPE_GAMEPAD 0x01 114 | #define XINPUT_DEVSUBTYPE_GAMEPAD 0x01 115 | #define XINPUT_DEVSUBTYPE_WHEEL 0x02 116 | #define XINPUT_DEVSUBTYPE_ARCADE_STICK 0x03 117 | #define XINPUT_DEVSUBTYPE_FLIGHT_SICK 0x04 118 | #define XINPUT_DEVSUBTYPE_DANCE_PAD 0x05 119 | #define XINPUT_DEVSUBTYPE_GUITAR 0x06 120 | #define XINPUT_DEVSUBTYPE_DRUM_KIT 0x08 121 | 122 | /* 123 | * These are used with the XInputGetCapabilities function to 124 | * determine the abilities to the joystick which has been 125 | * plugged in. 126 | */ 127 | 128 | #define XINPUT_CAPS_VOICE_SUPPORTED 0x0004 129 | #define XINPUT_FLAG_GAMEPAD 0x00000001 130 | 131 | /* 132 | * Defines the status of the battery if one is used in the 133 | * attached joystick. The first two define if the joystick 134 | * supports a battery. Disconnected means that the joystick 135 | * isn't connected. Wired shows that the joystick is a wired 136 | * joystick. 137 | */ 138 | 139 | #define BATTERY_DEVTYPE_GAMEPAD 0x00 140 | #define BATTERY_DEVTYPE_HEADSET 0x01 141 | #define BATTERY_TYPE_DISCONNECTED 0x00 142 | #define BATTERY_TYPE_WIRED 0x01 143 | #define BATTERY_TYPE_ALKALINE 0x02 144 | #define BATTERY_TYPE_NIMH 0x03 145 | #define BATTERY_TYPE_UNKNOWN 0xFF 146 | #define BATTERY_LEVEL_EMPTY 0x00 147 | #define BATTERY_LEVEL_LOW 0x01 148 | #define BATTERY_LEVEL_MEDIUM 0x02 149 | #define BATTERY_LEVEL_FULL 0x03 150 | 151 | /* 152 | * How many joysticks can be used with this library. Games that 153 | * use the xinput library will not go over this number. 154 | */ 155 | 156 | #define XUSER_MAX_COUNT 4 157 | #define XUSER_INDEX_ANY 0x000000FF 158 | 159 | /* 160 | * Defines the structure of an xbox 360 joystick. 161 | */ 162 | 163 | typedef struct _XINPUT_GAMEPAD { 164 | WORD wButtons; 165 | BYTE bLeftTrigger; 166 | BYTE bRightTrigger; 167 | SHORT sThumbLX; 168 | SHORT sThumbLY; 169 | SHORT sThumbRX; 170 | SHORT sThumbRY; 171 | } XINPUT_GAMEPAD, *PXINPUT_GAMEPAD; 172 | 173 | typedef struct _XINPUT_STATE { 174 | DWORD dwPacketNumber; 175 | XINPUT_GAMEPAD Gamepad; 176 | } XINPUT_STATE, *PXINPUT_STATE; 177 | 178 | /* 179 | * Defines the structure of how much vibration is set on both the 180 | * right and left motors in a joystick. If you're not using a 360 181 | * joystick you will have to map these to your device. 182 | */ 183 | 184 | typedef struct _XINPUT_VIBRATION { 185 | WORD wLeftMotorSpeed; 186 | WORD wRightMotorSpeed; 187 | } XINPUT_VIBRATION, *PXINPUT_VIBRATION; 188 | 189 | /* 190 | * Defines the structure for what kind of abilities the joystick has 191 | * such abilities are things such as if the joystick has the ability 192 | * to send and receive audio, if the joystick is in fact a driving 193 | * wheel or perhaps if the joystick is some kind of dance pad or 194 | * guitar. 195 | */ 196 | 197 | typedef struct _XINPUT_CAPABILITIES { 198 | BYTE Type; 199 | BYTE SubType; 200 | WORD Flags; 201 | XINPUT_GAMEPAD Gamepad; 202 | XINPUT_VIBRATION Vibration; 203 | } XINPUT_CAPABILITIES, *PXINPUT_CAPABILITIES; 204 | 205 | /* 206 | * Defines the structure for a joystick input event which is 207 | * retrieved using the function XInputGetKeystroke 208 | */ 209 | typedef struct _XINPUT_KEYSTROKE { 210 | WORD VirtualKey; 211 | WCHAR Unicode; 212 | WORD Flags; 213 | BYTE UserIndex; 214 | BYTE HidCode; 215 | } XINPUT_KEYSTROKE, *PXINPUT_KEYSTROKE; 216 | 217 | typedef struct _XINPUT_BATTERY_INFORMATION 218 | { 219 | BYTE BatteryType; 220 | BYTE BatteryLevel; 221 | } XINPUT_BATTERY_INFORMATION, *PXINPUT_BATTERY_INFORMATION; 222 | 223 | #ifdef __cplusplus 224 | extern "C" { 225 | #endif 226 | 227 | void WINAPI XInputEnable(WINBOOL); 228 | DWORD WINAPI XInputSetState(DWORD, XINPUT_VIBRATION*); 229 | DWORD WINAPI XInputGetState(DWORD, XINPUT_STATE*); 230 | DWORD WINAPI XInputGetKeystroke(DWORD, DWORD, PXINPUT_KEYSTROKE); 231 | DWORD WINAPI XInputGetCapabilities(DWORD, DWORD, XINPUT_CAPABILITIES*); 232 | DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD, GUID*, GUID*); 233 | DWORD WINAPI XInputGetBatteryInformation(DWORD, BYTE, XINPUT_BATTERY_INFORMATION*); 234 | 235 | #ifdef __cplusplus 236 | } 237 | #endif 238 | 239 | #endif /* __WINE_XINPUT_H */ 240 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/deps/vs2008/stdint.h: -------------------------------------------------------------------------------- 1 | // ISO C9x compliant stdint.h for Microsoft Visual Studio 2 | // Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 3 | // 4 | // Copyright (c) 2006-2008 Alexander Chemeris 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // 9 | // 1. Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // 2. Redistributions in binary form must reproduce the above copyright 13 | // notice, this list of conditions and the following disclaimer in the 14 | // documentation and/or other materials provided with the distribution. 15 | // 16 | // 3. The name of the author may be used to endorse or promote products 17 | // derived from this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 20 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 22 | // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 25 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 27 | // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 28 | // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | /////////////////////////////////////////////////////////////////////////////// 31 | 32 | #ifndef _MSC_VER // [ 33 | #error "Use this header only with Microsoft Visual C++ compilers!" 34 | #endif // _MSC_VER ] 35 | 36 | #ifndef _MSC_STDINT_H_ // [ 37 | #define _MSC_STDINT_H_ 38 | 39 | #if _MSC_VER > 1000 40 | #pragma once 41 | #endif 42 | 43 | #include 44 | 45 | // For Visual Studio 6 in C++ mode and for many Visual Studio versions when 46 | // compiling for ARM we should wrap include with 'extern "C++" {}' 47 | // or compiler give many errors like this: 48 | // error C2733: second C linkage of overloaded function 'wmemchr' not allowed 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | # include 53 | #ifdef __cplusplus 54 | } 55 | #endif 56 | 57 | // Define _W64 macros to mark types changing their size, like intptr_t. 58 | #ifndef _W64 59 | # if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 60 | # define _W64 __w64 61 | # else 62 | # define _W64 63 | # endif 64 | #endif 65 | 66 | 67 | // 7.18.1 Integer types 68 | 69 | // 7.18.1.1 Exact-width integer types 70 | 71 | // Visual Studio 6 and Embedded Visual C++ 4 doesn't 72 | // realize that, e.g. char has the same size as __int8 73 | // so we give up on __intX for them. 74 | #if (_MSC_VER < 1300) 75 | typedef signed char int8_t; 76 | typedef signed short int16_t; 77 | typedef signed int int32_t; 78 | typedef unsigned char uint8_t; 79 | typedef unsigned short uint16_t; 80 | typedef unsigned int uint32_t; 81 | #else 82 | typedef signed __int8 int8_t; 83 | typedef signed __int16 int16_t; 84 | typedef signed __int32 int32_t; 85 | typedef unsigned __int8 uint8_t; 86 | typedef unsigned __int16 uint16_t; 87 | typedef unsigned __int32 uint32_t; 88 | #endif 89 | typedef signed __int64 int64_t; 90 | typedef unsigned __int64 uint64_t; 91 | 92 | 93 | // 7.18.1.2 Minimum-width integer types 94 | typedef int8_t int_least8_t; 95 | typedef int16_t int_least16_t; 96 | typedef int32_t int_least32_t; 97 | typedef int64_t int_least64_t; 98 | typedef uint8_t uint_least8_t; 99 | typedef uint16_t uint_least16_t; 100 | typedef uint32_t uint_least32_t; 101 | typedef uint64_t uint_least64_t; 102 | 103 | // 7.18.1.3 Fastest minimum-width integer types 104 | typedef int8_t int_fast8_t; 105 | typedef int16_t int_fast16_t; 106 | typedef int32_t int_fast32_t; 107 | typedef int64_t int_fast64_t; 108 | typedef uint8_t uint_fast8_t; 109 | typedef uint16_t uint_fast16_t; 110 | typedef uint32_t uint_fast32_t; 111 | typedef uint64_t uint_fast64_t; 112 | 113 | // 7.18.1.4 Integer types capable of holding object pointers 114 | #ifdef _WIN64 // [ 115 | typedef signed __int64 intptr_t; 116 | typedef unsigned __int64 uintptr_t; 117 | #else // _WIN64 ][ 118 | typedef _W64 signed int intptr_t; 119 | typedef _W64 unsigned int uintptr_t; 120 | #endif // _WIN64 ] 121 | 122 | // 7.18.1.5 Greatest-width integer types 123 | typedef int64_t intmax_t; 124 | typedef uint64_t uintmax_t; 125 | 126 | 127 | // 7.18.2 Limits of specified-width integer types 128 | 129 | #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 130 | 131 | // 7.18.2.1 Limits of exact-width integer types 132 | #define INT8_MIN ((int8_t)_I8_MIN) 133 | #define INT8_MAX _I8_MAX 134 | #define INT16_MIN ((int16_t)_I16_MIN) 135 | #define INT16_MAX _I16_MAX 136 | #define INT32_MIN ((int32_t)_I32_MIN) 137 | #define INT32_MAX _I32_MAX 138 | #define INT64_MIN ((int64_t)_I64_MIN) 139 | #define INT64_MAX _I64_MAX 140 | #define UINT8_MAX _UI8_MAX 141 | #define UINT16_MAX _UI16_MAX 142 | #define UINT32_MAX _UI32_MAX 143 | #define UINT64_MAX _UI64_MAX 144 | 145 | // 7.18.2.2 Limits of minimum-width integer types 146 | #define INT_LEAST8_MIN INT8_MIN 147 | #define INT_LEAST8_MAX INT8_MAX 148 | #define INT_LEAST16_MIN INT16_MIN 149 | #define INT_LEAST16_MAX INT16_MAX 150 | #define INT_LEAST32_MIN INT32_MIN 151 | #define INT_LEAST32_MAX INT32_MAX 152 | #define INT_LEAST64_MIN INT64_MIN 153 | #define INT_LEAST64_MAX INT64_MAX 154 | #define UINT_LEAST8_MAX UINT8_MAX 155 | #define UINT_LEAST16_MAX UINT16_MAX 156 | #define UINT_LEAST32_MAX UINT32_MAX 157 | #define UINT_LEAST64_MAX UINT64_MAX 158 | 159 | // 7.18.2.3 Limits of fastest minimum-width integer types 160 | #define INT_FAST8_MIN INT8_MIN 161 | #define INT_FAST8_MAX INT8_MAX 162 | #define INT_FAST16_MIN INT16_MIN 163 | #define INT_FAST16_MAX INT16_MAX 164 | #define INT_FAST32_MIN INT32_MIN 165 | #define INT_FAST32_MAX INT32_MAX 166 | #define INT_FAST64_MIN INT64_MIN 167 | #define INT_FAST64_MAX INT64_MAX 168 | #define UINT_FAST8_MAX UINT8_MAX 169 | #define UINT_FAST16_MAX UINT16_MAX 170 | #define UINT_FAST32_MAX UINT32_MAX 171 | #define UINT_FAST64_MAX UINT64_MAX 172 | 173 | // 7.18.2.4 Limits of integer types capable of holding object pointers 174 | #ifdef _WIN64 // [ 175 | # define INTPTR_MIN INT64_MIN 176 | # define INTPTR_MAX INT64_MAX 177 | # define UINTPTR_MAX UINT64_MAX 178 | #else // _WIN64 ][ 179 | # define INTPTR_MIN INT32_MIN 180 | # define INTPTR_MAX INT32_MAX 181 | # define UINTPTR_MAX UINT32_MAX 182 | #endif // _WIN64 ] 183 | 184 | // 7.18.2.5 Limits of greatest-width integer types 185 | #define INTMAX_MIN INT64_MIN 186 | #define INTMAX_MAX INT64_MAX 187 | #define UINTMAX_MAX UINT64_MAX 188 | 189 | // 7.18.3 Limits of other integer types 190 | 191 | #ifdef _WIN64 // [ 192 | # define PTRDIFF_MIN _I64_MIN 193 | # define PTRDIFF_MAX _I64_MAX 194 | #else // _WIN64 ][ 195 | # define PTRDIFF_MIN _I32_MIN 196 | # define PTRDIFF_MAX _I32_MAX 197 | #endif // _WIN64 ] 198 | 199 | #define SIG_ATOMIC_MIN INT_MIN 200 | #define SIG_ATOMIC_MAX INT_MAX 201 | 202 | #ifndef SIZE_MAX // [ 203 | # ifdef _WIN64 // [ 204 | # define SIZE_MAX _UI64_MAX 205 | # else // _WIN64 ][ 206 | # define SIZE_MAX _UI32_MAX 207 | # endif // _WIN64 ] 208 | #endif // SIZE_MAX ] 209 | 210 | // WCHAR_MIN and WCHAR_MAX are also defined in 211 | #ifndef WCHAR_MIN // [ 212 | # define WCHAR_MIN 0 213 | #endif // WCHAR_MIN ] 214 | #ifndef WCHAR_MAX // [ 215 | # define WCHAR_MAX _UI16_MAX 216 | #endif // WCHAR_MAX ] 217 | 218 | #define WINT_MIN 0 219 | #define WINT_MAX _UI16_MAX 220 | 221 | #endif // __STDC_LIMIT_MACROS ] 222 | 223 | 224 | // 7.18.4 Limits of other integer types 225 | 226 | #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260 227 | 228 | // 7.18.4.1 Macros for minimum-width integer constants 229 | 230 | #define INT8_C(val) val##i8 231 | #define INT16_C(val) val##i16 232 | #define INT32_C(val) val##i32 233 | #define INT64_C(val) val##i64 234 | 235 | #define UINT8_C(val) val##ui8 236 | #define UINT16_C(val) val##ui16 237 | #define UINT32_C(val) val##ui32 238 | #define UINT64_C(val) val##ui64 239 | 240 | // 7.18.4.2 Macros for greatest-width integer constants 241 | #define INTMAX_C INT64_C 242 | #define UINTMAX_C UINT64_C 243 | 244 | #endif // __STDC_CONSTANT_MACROS ] 245 | 246 | 247 | #endif // _MSC_STDINT_H_ ] 248 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/cocoa_joystick.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Cocoa - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2006-2017 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | #define _GLFW_PLATFORM_JOYSTICK_STATE _GLFWjoystickNS ns 33 | #define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE struct { int dummyJoystick; } 34 | 35 | #define _GLFW_PLATFORM_MAPPING_NAME "Mac OS X" 36 | 37 | // Cocoa-specific per-joystick data 38 | // 39 | typedef struct _GLFWjoystickNS 40 | { 41 | IOHIDDeviceRef device; 42 | CFMutableArrayRef axes; 43 | CFMutableArrayRef buttons; 44 | CFMutableArrayRef hats; 45 | } _GLFWjoystickNS; 46 | 47 | 48 | void _glfwInitJoysticksNS(void); 49 | void _glfwTerminateJoysticksNS(void); 50 | 51 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/cocoa_platform.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 macOS - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2009-2019 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #include 28 | #include 29 | 30 | #include 31 | 32 | // NOTE: All of NSGL was deprecated in the 10.14 SDK 33 | // This disables the pointless warnings for every symbol we use 34 | #define GL_SILENCE_DEPRECATION 35 | 36 | #if defined(__OBJC__) 37 | #import 38 | #else 39 | typedef void* id; 40 | #endif 41 | 42 | // NOTE: Many Cocoa enum values have been renamed and we need to build across 43 | // SDK versions where one is unavailable or the other deprecated 44 | // We use the newer names in code and these macros to handle compatibility 45 | #if MAC_OS_X_VERSION_MAX_ALLOWED < 101200 46 | #define NSBitmapFormatAlphaNonpremultiplied NSAlphaNonpremultipliedBitmapFormat 47 | #define NSEventMaskAny NSAnyEventMask 48 | #define NSEventMaskKeyUp NSKeyUpMask 49 | #define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask 50 | #define NSEventModifierFlagCommand NSCommandKeyMask 51 | #define NSEventModifierFlagControl NSControlKeyMask 52 | #define NSEventModifierFlagDeviceIndependentFlagsMask NSDeviceIndependentModifierFlagsMask 53 | #define NSEventModifierFlagOption NSAlternateKeyMask 54 | #define NSEventModifierFlagShift NSShiftKeyMask 55 | #define NSEventTypeApplicationDefined NSApplicationDefined 56 | #define NSWindowStyleMaskBorderless NSBorderlessWindowMask 57 | #define NSWindowStyleMaskClosable NSClosableWindowMask 58 | #define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask 59 | #define NSWindowStyleMaskResizable NSResizableWindowMask 60 | #define NSWindowStyleMaskTitled NSTitledWindowMask 61 | #endif 62 | 63 | typedef VkFlags VkMacOSSurfaceCreateFlagsMVK; 64 | typedef VkFlags VkMetalSurfaceCreateFlagsEXT; 65 | 66 | typedef struct VkMacOSSurfaceCreateInfoMVK 67 | { 68 | VkStructureType sType; 69 | const void* pNext; 70 | VkMacOSSurfaceCreateFlagsMVK flags; 71 | const void* pView; 72 | } VkMacOSSurfaceCreateInfoMVK; 73 | 74 | typedef struct VkMetalSurfaceCreateInfoEXT 75 | { 76 | VkStructureType sType; 77 | const void* pNext; 78 | VkMetalSurfaceCreateFlagsEXT flags; 79 | const void* pLayer; 80 | } VkMetalSurfaceCreateInfoEXT; 81 | 82 | typedef VkResult (APIENTRY *PFN_vkCreateMacOSSurfaceMVK)(VkInstance,const VkMacOSSurfaceCreateInfoMVK*,const VkAllocationCallbacks*,VkSurfaceKHR*); 83 | typedef VkResult (APIENTRY *PFN_vkCreateMetalSurfaceEXT)(VkInstance,const VkMetalSurfaceCreateInfoEXT*,const VkAllocationCallbacks*,VkSurfaceKHR*); 84 | 85 | #include "posix_thread.h" 86 | #include "cocoa_joystick.h" 87 | #include "nsgl_context.h" 88 | #include "egl_context.h" 89 | #include "osmesa_context.h" 90 | 91 | #define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL) 92 | #define _glfw_dlclose(handle) dlclose(handle) 93 | #define _glfw_dlsym(handle, name) dlsym(handle, name) 94 | 95 | #define _GLFW_EGL_NATIVE_WINDOW ((EGLNativeWindowType) window->ns.view) 96 | #define _GLFW_EGL_NATIVE_DISPLAY EGL_DEFAULT_DISPLAY 97 | 98 | #define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNS ns 99 | #define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryNS ns 100 | #define _GLFW_PLATFORM_LIBRARY_TIMER_STATE _GLFWtimerNS ns 101 | #define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorNS ns 102 | #define _GLFW_PLATFORM_CURSOR_STATE _GLFWcursorNS ns 103 | 104 | // HIToolbox.framework pointer typedefs 105 | #define kTISPropertyUnicodeKeyLayoutData _glfw.ns.tis.kPropertyUnicodeKeyLayoutData 106 | typedef TISInputSourceRef (*PFN_TISCopyCurrentKeyboardLayoutInputSource)(void); 107 | #define TISCopyCurrentKeyboardLayoutInputSource _glfw.ns.tis.CopyCurrentKeyboardLayoutInputSource 108 | typedef void* (*PFN_TISGetInputSourceProperty)(TISInputSourceRef,CFStringRef); 109 | #define TISGetInputSourceProperty _glfw.ns.tis.GetInputSourceProperty 110 | typedef UInt8 (*PFN_LMGetKbdType)(void); 111 | #define LMGetKbdType _glfw.ns.tis.GetKbdType 112 | 113 | 114 | // Cocoa-specific per-window data 115 | // 116 | typedef struct _GLFWwindowNS 117 | { 118 | id object; 119 | id delegate; 120 | id view; 121 | id layer; 122 | 123 | GLFWbool maximized; 124 | GLFWbool retina; 125 | 126 | // Cached window properties to filter out duplicate events 127 | int width, height; 128 | int fbWidth, fbHeight; 129 | float xscale, yscale; 130 | 131 | // The total sum of the distances the cursor has been warped 132 | // since the last cursor motion event was processed 133 | // This is kept to counteract Cocoa doing the same internally 134 | double cursorWarpDeltaX, cursorWarpDeltaY; 135 | 136 | } _GLFWwindowNS; 137 | 138 | // Cocoa-specific global data 139 | // 140 | typedef struct _GLFWlibraryNS 141 | { 142 | CGEventSourceRef eventSource; 143 | id delegate; 144 | GLFWbool finishedLaunching; 145 | GLFWbool cursorHidden; 146 | TISInputSourceRef inputSource; 147 | IOHIDManagerRef hidManager; 148 | id unicodeData; 149 | id helper; 150 | id keyUpMonitor; 151 | id nibObjects; 152 | 153 | char keynames[GLFW_KEY_LAST + 1][17]; 154 | short int keycodes[256]; 155 | short int scancodes[GLFW_KEY_LAST + 1]; 156 | char* clipboardString; 157 | CGPoint cascadePoint; 158 | // Where to place the cursor when re-enabled 159 | double restoreCursorPosX, restoreCursorPosY; 160 | // The window whose disabled cursor mode is active 161 | _GLFWwindow* disabledCursorWindow; 162 | 163 | struct { 164 | CFBundleRef bundle; 165 | PFN_TISCopyCurrentKeyboardLayoutInputSource CopyCurrentKeyboardLayoutInputSource; 166 | PFN_TISGetInputSourceProperty GetInputSourceProperty; 167 | PFN_LMGetKbdType GetKbdType; 168 | CFStringRef kPropertyUnicodeKeyLayoutData; 169 | } tis; 170 | 171 | } _GLFWlibraryNS; 172 | 173 | // Cocoa-specific per-monitor data 174 | // 175 | typedef struct _GLFWmonitorNS 176 | { 177 | CGDirectDisplayID displayID; 178 | CGDisplayModeRef previousMode; 179 | uint32_t unitNumber; 180 | id screen; 181 | double fallbackRefreshRate; 182 | 183 | } _GLFWmonitorNS; 184 | 185 | // Cocoa-specific per-cursor data 186 | // 187 | typedef struct _GLFWcursorNS 188 | { 189 | id object; 190 | 191 | } _GLFWcursorNS; 192 | 193 | // Cocoa-specific global timer data 194 | // 195 | typedef struct _GLFWtimerNS 196 | { 197 | uint64_t frequency; 198 | 199 | } _GLFWtimerNS; 200 | 201 | 202 | void _glfwInitTimerNS(void); 203 | 204 | void _glfwPollMonitorsNS(void); 205 | void _glfwSetVideoModeNS(_GLFWmonitor* monitor, const GLFWvidmode* desired); 206 | void _glfwRestoreVideoModeNS(_GLFWmonitor* monitor); 207 | 208 | float _glfwTransformYNS(float y); 209 | 210 | void* _glfwLoadLocalVulkanLoaderNS(void); 211 | 212 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/cocoa_time.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 macOS - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2009-2016 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | // It is fine to use C99 in this file because it will not be built with VS 27 | //======================================================================== 28 | 29 | #include "internal.h" 30 | 31 | #include 32 | 33 | 34 | ////////////////////////////////////////////////////////////////////////// 35 | ////// GLFW internal API ////// 36 | ////////////////////////////////////////////////////////////////////////// 37 | 38 | // Initialise timer 39 | // 40 | void _glfwInitTimerNS(void) 41 | { 42 | mach_timebase_info_data_t info; 43 | mach_timebase_info(&info); 44 | 45 | _glfw.timer.ns.frequency = (info.denom * 1e9) / info.numer; 46 | } 47 | 48 | 49 | ////////////////////////////////////////////////////////////////////////// 50 | ////// GLFW platform API ////// 51 | ////////////////////////////////////////////////////////////////////////// 52 | 53 | uint64_t _glfwPlatformGetTimerValue(void) 54 | { 55 | return mach_absolute_time(); 56 | } 57 | 58 | uint64_t _glfwPlatformGetTimerFrequency(void) 59 | { 60 | return _glfw.timer.ns.frequency; 61 | } 62 | 63 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/glfw.rc.in: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | VS_VERSION_INFO VERSIONINFO 5 | FILEVERSION @GLFW_VERSION_MAJOR@,@GLFW_VERSION_MINOR@,@GLFW_VERSION_PATCH@,0 6 | PRODUCTVERSION @GLFW_VERSION_MAJOR@,@GLFW_VERSION_MINOR@,@GLFW_VERSION_PATCH@,0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_NT_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 12 | { 13 | BLOCK "StringFileInfo" 14 | { 15 | BLOCK "040904B0" 16 | { 17 | VALUE "CompanyName", "GLFW" 18 | VALUE "FileDescription", "GLFW @GLFW_VERSION@ DLL" 19 | VALUE "FileVersion", "@GLFW_VERSION@" 20 | VALUE "OriginalFilename", "glfw3.dll" 21 | VALUE "ProductName", "GLFW" 22 | VALUE "ProductVersion", "@GLFW_VERSION@" 23 | } 24 | } 25 | BLOCK "VarFileInfo" 26 | { 27 | VALUE "Translation", 0x409, 1200 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/glfw3.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 4 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 5 | 6 | Name: GLFW 7 | Description: A multi-platform library for OpenGL, window and input 8 | Version: @GLFW_VERSION@ 9 | URL: https://www.glfw.org/ 10 | Requires.private: @GLFW_PKG_DEPS@ 11 | Libs: -L${libdir} -l@GLFW_LIB_NAME@ 12 | Libs.private: @GLFW_PKG_LIBS@ 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/glfw3Config.cmake.in: -------------------------------------------------------------------------------- 1 | include(CMakeFindDependencyMacro) 2 | find_dependency(Threads) 3 | include("${CMAKE_CURRENT_LIST_DIR}/glfw3Targets.cmake") 4 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/glfw_config.h.in: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2010-2016 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | // As glfw_config.h.in, this file is used by CMake to produce the 27 | // glfw_config.h configuration header file. If you are adding a feature 28 | // requiring conditional compilation, this is where to add the macro. 29 | //======================================================================== 30 | // As glfw_config.h, this file defines compile-time option macros for a 31 | // specific platform and development environment. If you are using the 32 | // GLFW CMake files, modify glfw_config.h.in instead of this file. If you 33 | // are using your own build system, make this file define the appropriate 34 | // macros in whatever way is suitable. 35 | //======================================================================== 36 | 37 | // Define this to 1 if building GLFW for X11 38 | #cmakedefine _GLFW_X11 39 | // Define this to 1 if building GLFW for Win32 40 | #cmakedefine _GLFW_WIN32 41 | // Define this to 1 if building GLFW for Cocoa 42 | #cmakedefine _GLFW_COCOA 43 | // Define this to 1 if building GLFW for Wayland 44 | #cmakedefine _GLFW_WAYLAND 45 | // Define this to 1 if building GLFW for OSMesa 46 | #cmakedefine _GLFW_OSMESA 47 | 48 | // Define this to 1 if building as a shared library / dynamic library / DLL 49 | #cmakedefine _GLFW_BUILD_DLL 50 | // Define this to 1 to use Vulkan loader linked statically into application 51 | #cmakedefine _GLFW_VULKAN_STATIC 52 | 53 | // Define this to 1 to force use of high-performance GPU on hybrid systems 54 | #cmakedefine _GLFW_USE_HYBRID_HPG 55 | 56 | // Define this to 1 if xkbcommon supports the compose key 57 | #cmakedefine HAVE_XKBCOMMON_COMPOSE_H 58 | // Define this to 1 if the libc supports memfd_create() 59 | #cmakedefine HAVE_MEMFD_CREATE 60 | 61 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/glx_context.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 GLX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #define GLX_VENDOR 1 29 | #define GLX_RGBA_BIT 0x00000001 30 | #define GLX_WINDOW_BIT 0x00000001 31 | #define GLX_DRAWABLE_TYPE 0x8010 32 | #define GLX_RENDER_TYPE 0x8011 33 | #define GLX_RGBA_TYPE 0x8014 34 | #define GLX_DOUBLEBUFFER 5 35 | #define GLX_STEREO 6 36 | #define GLX_AUX_BUFFERS 7 37 | #define GLX_RED_SIZE 8 38 | #define GLX_GREEN_SIZE 9 39 | #define GLX_BLUE_SIZE 10 40 | #define GLX_ALPHA_SIZE 11 41 | #define GLX_DEPTH_SIZE 12 42 | #define GLX_STENCIL_SIZE 13 43 | #define GLX_ACCUM_RED_SIZE 14 44 | #define GLX_ACCUM_GREEN_SIZE 15 45 | #define GLX_ACCUM_BLUE_SIZE 16 46 | #define GLX_ACCUM_ALPHA_SIZE 17 47 | #define GLX_SAMPLES 0x186a1 48 | #define GLX_VISUAL_ID 0x800b 49 | 50 | #define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20b2 51 | #define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001 52 | #define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 53 | #define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 54 | #define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126 55 | #define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 56 | #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 57 | #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 58 | #define GLX_CONTEXT_FLAGS_ARB 0x2094 59 | #define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 60 | #define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 61 | #define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252 62 | #define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 63 | #define GLX_NO_RESET_NOTIFICATION_ARB 0x8261 64 | #define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097 65 | #define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0 66 | #define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098 67 | #define GLX_CONTEXT_OPENGL_NO_ERROR_ARB 0x31b3 68 | 69 | typedef XID GLXWindow; 70 | typedef XID GLXDrawable; 71 | typedef struct __GLXFBConfig* GLXFBConfig; 72 | typedef struct __GLXcontext* GLXContext; 73 | typedef void (*__GLXextproc)(void); 74 | 75 | typedef int (*PFNGLXGETFBCONFIGATTRIBPROC)(Display*,GLXFBConfig,int,int*); 76 | typedef const char* (*PFNGLXGETCLIENTSTRINGPROC)(Display*,int); 77 | typedef Bool (*PFNGLXQUERYEXTENSIONPROC)(Display*,int*,int*); 78 | typedef Bool (*PFNGLXQUERYVERSIONPROC)(Display*,int*,int*); 79 | typedef void (*PFNGLXDESTROYCONTEXTPROC)(Display*,GLXContext); 80 | typedef Bool (*PFNGLXMAKECURRENTPROC)(Display*,GLXDrawable,GLXContext); 81 | typedef void (*PFNGLXSWAPBUFFERSPROC)(Display*,GLXDrawable); 82 | typedef const char* (*PFNGLXQUERYEXTENSIONSSTRINGPROC)(Display*,int); 83 | typedef GLXFBConfig* (*PFNGLXGETFBCONFIGSPROC)(Display*,int,int*); 84 | typedef GLXContext (*PFNGLXCREATENEWCONTEXTPROC)(Display*,GLXFBConfig,int,GLXContext,Bool); 85 | typedef __GLXextproc (* PFNGLXGETPROCADDRESSPROC)(const GLubyte *procName); 86 | typedef void (*PFNGLXSWAPINTERVALEXTPROC)(Display*,GLXDrawable,int); 87 | typedef XVisualInfo* (*PFNGLXGETVISUALFROMFBCONFIGPROC)(Display*,GLXFBConfig); 88 | typedef GLXWindow (*PFNGLXCREATEWINDOWPROC)(Display*,GLXFBConfig,Window,const int*); 89 | typedef void (*PFNGLXDESTROYWINDOWPROC)(Display*,GLXWindow); 90 | 91 | typedef int (*PFNGLXSWAPINTERVALMESAPROC)(int); 92 | typedef int (*PFNGLXSWAPINTERVALSGIPROC)(int); 93 | typedef GLXContext (*PFNGLXCREATECONTEXTATTRIBSARBPROC)(Display*,GLXFBConfig,GLXContext,Bool,const int*); 94 | 95 | // libGL.so function pointer typedefs 96 | #define glXGetFBConfigs _glfw.glx.GetFBConfigs 97 | #define glXGetFBConfigAttrib _glfw.glx.GetFBConfigAttrib 98 | #define glXGetClientString _glfw.glx.GetClientString 99 | #define glXQueryExtension _glfw.glx.QueryExtension 100 | #define glXQueryVersion _glfw.glx.QueryVersion 101 | #define glXDestroyContext _glfw.glx.DestroyContext 102 | #define glXMakeCurrent _glfw.glx.MakeCurrent 103 | #define glXSwapBuffers _glfw.glx.SwapBuffers 104 | #define glXQueryExtensionsString _glfw.glx.QueryExtensionsString 105 | #define glXCreateNewContext _glfw.glx.CreateNewContext 106 | #define glXGetVisualFromFBConfig _glfw.glx.GetVisualFromFBConfig 107 | #define glXCreateWindow _glfw.glx.CreateWindow 108 | #define glXDestroyWindow _glfw.glx.DestroyWindow 109 | 110 | #define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextGLX glx 111 | #define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryGLX glx 112 | 113 | 114 | // GLX-specific per-context data 115 | // 116 | typedef struct _GLFWcontextGLX 117 | { 118 | GLXContext handle; 119 | GLXWindow window; 120 | 121 | } _GLFWcontextGLX; 122 | 123 | // GLX-specific global data 124 | // 125 | typedef struct _GLFWlibraryGLX 126 | { 127 | int major, minor; 128 | int eventBase; 129 | int errorBase; 130 | 131 | // dlopen handle for libGL.so.1 132 | void* handle; 133 | 134 | // GLX 1.3 functions 135 | PFNGLXGETFBCONFIGSPROC GetFBConfigs; 136 | PFNGLXGETFBCONFIGATTRIBPROC GetFBConfigAttrib; 137 | PFNGLXGETCLIENTSTRINGPROC GetClientString; 138 | PFNGLXQUERYEXTENSIONPROC QueryExtension; 139 | PFNGLXQUERYVERSIONPROC QueryVersion; 140 | PFNGLXDESTROYCONTEXTPROC DestroyContext; 141 | PFNGLXMAKECURRENTPROC MakeCurrent; 142 | PFNGLXSWAPBUFFERSPROC SwapBuffers; 143 | PFNGLXQUERYEXTENSIONSSTRINGPROC QueryExtensionsString; 144 | PFNGLXCREATENEWCONTEXTPROC CreateNewContext; 145 | PFNGLXGETVISUALFROMFBCONFIGPROC GetVisualFromFBConfig; 146 | PFNGLXCREATEWINDOWPROC CreateWindow; 147 | PFNGLXDESTROYWINDOWPROC DestroyWindow; 148 | 149 | // GLX 1.4 and extension functions 150 | PFNGLXGETPROCADDRESSPROC GetProcAddress; 151 | PFNGLXGETPROCADDRESSPROC GetProcAddressARB; 152 | PFNGLXSWAPINTERVALSGIPROC SwapIntervalSGI; 153 | PFNGLXSWAPINTERVALEXTPROC SwapIntervalEXT; 154 | PFNGLXSWAPINTERVALMESAPROC SwapIntervalMESA; 155 | PFNGLXCREATECONTEXTATTRIBSARBPROC CreateContextAttribsARB; 156 | GLFWbool SGI_swap_control; 157 | GLFWbool EXT_swap_control; 158 | GLFWbool MESA_swap_control; 159 | GLFWbool ARB_multisample; 160 | GLFWbool ARB_framebuffer_sRGB; 161 | GLFWbool EXT_framebuffer_sRGB; 162 | GLFWbool ARB_create_context; 163 | GLFWbool ARB_create_context_profile; 164 | GLFWbool ARB_create_context_robustness; 165 | GLFWbool EXT_create_context_es2_profile; 166 | GLFWbool ARB_create_context_no_error; 167 | GLFWbool ARB_context_flush_control; 168 | 169 | } _GLFWlibraryGLX; 170 | 171 | GLFWbool _glfwInitGLX(void); 172 | void _glfwTerminateGLX(void); 173 | GLFWbool _glfwCreateContextGLX(_GLFWwindow* window, 174 | const _GLFWctxconfig* ctxconfig, 175 | const _GLFWfbconfig* fbconfig); 176 | void _glfwDestroyContextGLX(_GLFWwindow* window); 177 | GLFWbool _glfwChooseVisualGLX(const _GLFWwndconfig* wndconfig, 178 | const _GLFWctxconfig* ctxconfig, 179 | const _GLFWfbconfig* fbconfig, 180 | Visual** visual, int* depth); 181 | 182 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/linux_joystick.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Linux - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2014 Jonas Ådahl 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | #define _GLFW_PLATFORM_JOYSTICK_STATE _GLFWjoystickLinux linjs 32 | #define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE _GLFWlibraryLinux linjs 33 | 34 | #define _GLFW_PLATFORM_MAPPING_NAME "Linux" 35 | 36 | // Linux-specific joystick data 37 | // 38 | typedef struct _GLFWjoystickLinux 39 | { 40 | int fd; 41 | char path[PATH_MAX]; 42 | int keyMap[KEY_CNT - BTN_MISC]; 43 | int absMap[ABS_CNT]; 44 | struct input_absinfo absInfo[ABS_CNT]; 45 | int hats[4][2]; 46 | } _GLFWjoystickLinux; 47 | 48 | // Linux-specific joystick API data 49 | // 50 | typedef struct _GLFWlibraryLinux 51 | { 52 | int inotify; 53 | int watch; 54 | regex_t regex; 55 | GLFWbool dropped; 56 | } _GLFWlibraryLinux; 57 | 58 | 59 | GLFWbool _glfwInitJoysticksLinux(void); 60 | void _glfwTerminateJoysticksLinux(void); 61 | void _glfwDetectJoystickConnectionLinux(void); 62 | 63 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/mappings.h.in: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2006-2018 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | // As mappings.h.in, this file is used by CMake to produce the mappings.h 27 | // header file. If you are adding a GLFW specific gamepad mapping, this is 28 | // where to put it. 29 | //======================================================================== 30 | // As mappings.h, this provides all pre-defined gamepad mappings, including 31 | // all available in SDL_GameControllerDB. Do not edit this file. Any gamepad 32 | // mappings not specific to GLFW should be submitted to SDL_GameControllerDB. 33 | // This file can be re-generated from mappings.h.in and the upstream 34 | // gamecontrollerdb.txt with the GenerateMappings.cmake script. 35 | //======================================================================== 36 | 37 | // All gamepad mappings not labeled GLFW are copied from the 38 | // SDL_GameControllerDB project under the following license: 39 | // 40 | // Simple DirectMedia Layer 41 | // Copyright (C) 1997-2013 Sam Lantinga 42 | // 43 | // This software is provided 'as-is', without any express or implied warranty. 44 | // In no event will the authors be held liable for any damages arising from the 45 | // use of this software. 46 | // 47 | // Permission is granted to anyone to use this software for any purpose, 48 | // including commercial applications, and to alter it and redistribute it 49 | // freely, subject to the following restrictions: 50 | // 51 | // 1. The origin of this software must not be misrepresented; you must not 52 | // claim that you wrote the original software. If you use this software 53 | // in a product, an acknowledgment in the product documentation would 54 | // be appreciated but is not required. 55 | // 56 | // 2. Altered source versions must be plainly marked as such, and must not be 57 | // misrepresented as being the original software. 58 | // 59 | // 3. This notice may not be removed or altered from any source distribution. 60 | 61 | const char* _glfwDefaultMappings[] = 62 | { 63 | @GLFW_GAMEPAD_MAPPINGS@ 64 | "78696e70757401000000000000000000,XInput Gamepad (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,", 65 | "78696e70757402000000000000000000,XInput Wheel (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,", 66 | "78696e70757403000000000000000000,XInput Arcade Stick (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,", 67 | "78696e70757404000000000000000000,XInput Flight Stick (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,", 68 | "78696e70757405000000000000000000,XInput Dance Pad (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,", 69 | "78696e70757406000000000000000000,XInput Guitar (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,", 70 | "78696e70757408000000000000000000,XInput Drum Kit (GLFW),platform:Windows,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,", 71 | NULL 72 | }; 73 | 74 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/nsgl_context.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 macOS - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2009-2019 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | // NOTE: Many Cocoa enum values have been renamed and we need to build across 28 | // SDK versions where one is unavailable or the other deprecated 29 | // We use the newer names in code and these macros to handle compatibility 30 | #if MAC_OS_X_VERSION_MAX_ALLOWED < 101400 31 | #define NSOpenGLContextParameterSwapInterval NSOpenGLCPSwapInterval 32 | #define NSOpenGLContextParameterSurfaceOpacity NSOpenGLCPSurfaceOpacity 33 | #endif 34 | 35 | #define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextNSGL nsgl 36 | #define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryNSGL nsgl 37 | 38 | #include 39 | 40 | 41 | // NSGL-specific per-context data 42 | // 43 | typedef struct _GLFWcontextNSGL 44 | { 45 | id pixelFormat; 46 | id object; 47 | 48 | } _GLFWcontextNSGL; 49 | 50 | // NSGL-specific global data 51 | // 52 | typedef struct _GLFWlibraryNSGL 53 | { 54 | // dlopen handle for OpenGL.framework (for glfwGetProcAddress) 55 | CFBundleRef framework; 56 | 57 | } _GLFWlibraryNSGL; 58 | 59 | 60 | GLFWbool _glfwInitNSGL(void); 61 | void _glfwTerminateNSGL(void); 62 | GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window, 63 | const _GLFWctxconfig* ctxconfig, 64 | const _GLFWfbconfig* fbconfig); 65 | void _glfwDestroyContextNSGL(_GLFWwindow* window); 66 | 67 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/null_init.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2016 Google Inc. 5 | // Copyright (c) 2016-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | // It is fine to use C99 in this file because it will not be built with VS 28 | //======================================================================== 29 | 30 | #include "internal.h" 31 | 32 | 33 | ////////////////////////////////////////////////////////////////////////// 34 | ////// GLFW platform API ////// 35 | ////////////////////////////////////////////////////////////////////////// 36 | 37 | int _glfwPlatformInit(void) 38 | { 39 | _glfwInitTimerPOSIX(); 40 | return GLFW_TRUE; 41 | } 42 | 43 | void _glfwPlatformTerminate(void) 44 | { 45 | _glfwTerminateOSMesa(); 46 | } 47 | 48 | const char* _glfwPlatformGetVersionString(void) 49 | { 50 | return _GLFW_VERSION_NUMBER " null OSMesa"; 51 | } 52 | 53 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/null_joystick.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2016-2017 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | // It is fine to use C99 in this file because it will not be built with VS 27 | //======================================================================== 28 | 29 | #include "internal.h" 30 | 31 | 32 | ////////////////////////////////////////////////////////////////////////// 33 | ////// GLFW platform API ////// 34 | ////////////////////////////////////////////////////////////////////////// 35 | 36 | int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode) 37 | { 38 | return GLFW_FALSE; 39 | } 40 | 41 | void _glfwPlatformUpdateGamepadGUID(char* guid) 42 | { 43 | } 44 | 45 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/null_joystick.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2006-2017 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #define _GLFW_PLATFORM_JOYSTICK_STATE struct { int dummyJoystick; } 28 | #define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE struct { int dummyLibraryJoystick; } 29 | 30 | #define _GLFW_PLATFORM_MAPPING_NAME "" 31 | 32 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/null_monitor.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2016 Google Inc. 5 | // Copyright (c) 2016-2019 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | // It is fine to use C99 in this file because it will not be built with VS 28 | //======================================================================== 29 | 30 | #include "internal.h" 31 | 32 | 33 | ////////////////////////////////////////////////////////////////////////// 34 | ////// GLFW platform API ////// 35 | ////////////////////////////////////////////////////////////////////////// 36 | 37 | void _glfwPlatformFreeMonitor(_GLFWmonitor* monitor) 38 | { 39 | } 40 | 41 | void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos) 42 | { 43 | } 44 | 45 | void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor, 46 | float* xscale, float* yscale) 47 | { 48 | if (xscale) 49 | *xscale = 1.f; 50 | if (yscale) 51 | *yscale = 1.f; 52 | } 53 | 54 | void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, 55 | int* xpos, int* ypos, 56 | int* width, int* height) 57 | { 58 | } 59 | 60 | GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found) 61 | { 62 | return NULL; 63 | } 64 | 65 | void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode) 66 | { 67 | } 68 | 69 | GLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp) 70 | { 71 | return GLFW_FALSE; 72 | } 73 | 74 | void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp) 75 | { 76 | } 77 | 78 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/null_platform.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2016 Google Inc. 5 | // Copyright (c) 2016-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include 29 | 30 | #define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNull null 31 | 32 | #define _GLFW_PLATFORM_CONTEXT_STATE struct { int dummyContext; } 33 | #define _GLFW_PLATFORM_MONITOR_STATE struct { int dummyMonitor; } 34 | #define _GLFW_PLATFORM_CURSOR_STATE struct { int dummyCursor; } 35 | #define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE struct { int dummyLibraryWindow; } 36 | #define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE struct { int dummyLibraryContext; } 37 | #define _GLFW_EGL_CONTEXT_STATE struct { int dummyEGLContext; } 38 | #define _GLFW_EGL_LIBRARY_CONTEXT_STATE struct { int dummyEGLLibraryContext; } 39 | 40 | #include "osmesa_context.h" 41 | #include "posix_time.h" 42 | #include "posix_thread.h" 43 | #include "null_joystick.h" 44 | 45 | #if defined(_GLFW_WIN32) 46 | #define _glfw_dlopen(name) LoadLibraryA(name) 47 | #define _glfw_dlclose(handle) FreeLibrary((HMODULE) handle) 48 | #define _glfw_dlsym(handle, name) GetProcAddress((HMODULE) handle, name) 49 | #else 50 | #define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL) 51 | #define _glfw_dlclose(handle) dlclose(handle) 52 | #define _glfw_dlsym(handle, name) dlsym(handle, name) 53 | #endif 54 | 55 | // Null-specific per-window data 56 | // 57 | typedef struct _GLFWwindowNull 58 | { 59 | int width; 60 | int height; 61 | } _GLFWwindowNull; 62 | 63 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/osmesa_context.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 OSMesa - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2016 Google Inc. 5 | // Copyright (c) 2016-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #define OSMESA_RGBA 0x1908 29 | #define OSMESA_FORMAT 0x22 30 | #define OSMESA_DEPTH_BITS 0x30 31 | #define OSMESA_STENCIL_BITS 0x31 32 | #define OSMESA_ACCUM_BITS 0x32 33 | #define OSMESA_PROFILE 0x33 34 | #define OSMESA_CORE_PROFILE 0x34 35 | #define OSMESA_COMPAT_PROFILE 0x35 36 | #define OSMESA_CONTEXT_MAJOR_VERSION 0x36 37 | #define OSMESA_CONTEXT_MINOR_VERSION 0x37 38 | 39 | typedef void* OSMesaContext; 40 | typedef void (*OSMESAproc)(void); 41 | 42 | typedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContextExt)(GLenum,GLint,GLint,GLint,OSMesaContext); 43 | typedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContextAttribs)(const int*,OSMesaContext); 44 | typedef void (GLAPIENTRY * PFN_OSMesaDestroyContext)(OSMesaContext); 45 | typedef int (GLAPIENTRY * PFN_OSMesaMakeCurrent)(OSMesaContext,void*,int,int,int); 46 | typedef int (GLAPIENTRY * PFN_OSMesaGetColorBuffer)(OSMesaContext,int*,int*,int*,void**); 47 | typedef int (GLAPIENTRY * PFN_OSMesaGetDepthBuffer)(OSMesaContext,int*,int*,int*,void**); 48 | typedef GLFWglproc (GLAPIENTRY * PFN_OSMesaGetProcAddress)(const char*); 49 | #define OSMesaCreateContextExt _glfw.osmesa.CreateContextExt 50 | #define OSMesaCreateContextAttribs _glfw.osmesa.CreateContextAttribs 51 | #define OSMesaDestroyContext _glfw.osmesa.DestroyContext 52 | #define OSMesaMakeCurrent _glfw.osmesa.MakeCurrent 53 | #define OSMesaGetColorBuffer _glfw.osmesa.GetColorBuffer 54 | #define OSMesaGetDepthBuffer _glfw.osmesa.GetDepthBuffer 55 | #define OSMesaGetProcAddress _glfw.osmesa.GetProcAddress 56 | 57 | #define _GLFW_OSMESA_CONTEXT_STATE _GLFWcontextOSMesa osmesa 58 | #define _GLFW_OSMESA_LIBRARY_CONTEXT_STATE _GLFWlibraryOSMesa osmesa 59 | 60 | 61 | // OSMesa-specific per-context data 62 | // 63 | typedef struct _GLFWcontextOSMesa 64 | { 65 | OSMesaContext handle; 66 | int width; 67 | int height; 68 | void* buffer; 69 | 70 | } _GLFWcontextOSMesa; 71 | 72 | // OSMesa-specific global data 73 | // 74 | typedef struct _GLFWlibraryOSMesa 75 | { 76 | void* handle; 77 | 78 | PFN_OSMesaCreateContextExt CreateContextExt; 79 | PFN_OSMesaCreateContextAttribs CreateContextAttribs; 80 | PFN_OSMesaDestroyContext DestroyContext; 81 | PFN_OSMesaMakeCurrent MakeCurrent; 82 | PFN_OSMesaGetColorBuffer GetColorBuffer; 83 | PFN_OSMesaGetDepthBuffer GetDepthBuffer; 84 | PFN_OSMesaGetProcAddress GetProcAddress; 85 | 86 | } _GLFWlibraryOSMesa; 87 | 88 | 89 | GLFWbool _glfwInitOSMesa(void); 90 | void _glfwTerminateOSMesa(void); 91 | GLFWbool _glfwCreateContextOSMesa(_GLFWwindow* window, 92 | const _GLFWctxconfig* ctxconfig, 93 | const _GLFWfbconfig* fbconfig); 94 | 95 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/posix_thread.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | // It is fine to use C99 in this file because it will not be built with VS 28 | //======================================================================== 29 | 30 | #include "internal.h" 31 | 32 | #include 33 | #include 34 | 35 | 36 | ////////////////////////////////////////////////////////////////////////// 37 | ////// GLFW platform API ////// 38 | ////////////////////////////////////////////////////////////////////////// 39 | 40 | GLFWbool _glfwPlatformCreateTls(_GLFWtls* tls) 41 | { 42 | assert(tls->posix.allocated == GLFW_FALSE); 43 | 44 | if (pthread_key_create(&tls->posix.key, NULL) != 0) 45 | { 46 | _glfwInputError(GLFW_PLATFORM_ERROR, 47 | "POSIX: Failed to create context TLS"); 48 | return GLFW_FALSE; 49 | } 50 | 51 | tls->posix.allocated = GLFW_TRUE; 52 | return GLFW_TRUE; 53 | } 54 | 55 | void _glfwPlatformDestroyTls(_GLFWtls* tls) 56 | { 57 | if (tls->posix.allocated) 58 | pthread_key_delete(tls->posix.key); 59 | memset(tls, 0, sizeof(_GLFWtls)); 60 | } 61 | 62 | void* _glfwPlatformGetTls(_GLFWtls* tls) 63 | { 64 | assert(tls->posix.allocated == GLFW_TRUE); 65 | return pthread_getspecific(tls->posix.key); 66 | } 67 | 68 | void _glfwPlatformSetTls(_GLFWtls* tls, void* value) 69 | { 70 | assert(tls->posix.allocated == GLFW_TRUE); 71 | pthread_setspecific(tls->posix.key, value); 72 | } 73 | 74 | GLFWbool _glfwPlatformCreateMutex(_GLFWmutex* mutex) 75 | { 76 | assert(mutex->posix.allocated == GLFW_FALSE); 77 | 78 | if (pthread_mutex_init(&mutex->posix.handle, NULL) != 0) 79 | { 80 | _glfwInputError(GLFW_PLATFORM_ERROR, "POSIX: Failed to create mutex"); 81 | return GLFW_FALSE; 82 | } 83 | 84 | return mutex->posix.allocated = GLFW_TRUE; 85 | } 86 | 87 | void _glfwPlatformDestroyMutex(_GLFWmutex* mutex) 88 | { 89 | if (mutex->posix.allocated) 90 | pthread_mutex_destroy(&mutex->posix.handle); 91 | memset(mutex, 0, sizeof(_GLFWmutex)); 92 | } 93 | 94 | void _glfwPlatformLockMutex(_GLFWmutex* mutex) 95 | { 96 | assert(mutex->posix.allocated == GLFW_TRUE); 97 | pthread_mutex_lock(&mutex->posix.handle); 98 | } 99 | 100 | void _glfwPlatformUnlockMutex(_GLFWmutex* mutex) 101 | { 102 | assert(mutex->posix.allocated == GLFW_TRUE); 103 | pthread_mutex_unlock(&mutex->posix.handle); 104 | } 105 | 106 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/posix_thread.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include 29 | 30 | #define _GLFW_PLATFORM_TLS_STATE _GLFWtlsPOSIX posix 31 | #define _GLFW_PLATFORM_MUTEX_STATE _GLFWmutexPOSIX posix 32 | 33 | 34 | // POSIX-specific thread local storage data 35 | // 36 | typedef struct _GLFWtlsPOSIX 37 | { 38 | GLFWbool allocated; 39 | pthread_key_t key; 40 | 41 | } _GLFWtlsPOSIX; 42 | 43 | // POSIX-specific mutex data 44 | // 45 | typedef struct _GLFWmutexPOSIX 46 | { 47 | GLFWbool allocated; 48 | pthread_mutex_t handle; 49 | 50 | } _GLFWmutexPOSIX; 51 | 52 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/posix_time.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | // It is fine to use C99 in this file because it will not be built with VS 28 | //======================================================================== 29 | 30 | #define _POSIX_C_SOURCE 199309L 31 | 32 | #include "internal.h" 33 | 34 | #include 35 | #include 36 | #include 37 | 38 | 39 | ////////////////////////////////////////////////////////////////////////// 40 | ////// GLFW internal API ////// 41 | ////////////////////////////////////////////////////////////////////////// 42 | 43 | // Initialise timer 44 | // 45 | void _glfwInitTimerPOSIX(void) 46 | { 47 | #if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) 48 | struct timespec ts; 49 | 50 | if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) 51 | { 52 | _glfw.timer.posix.monotonic = GLFW_TRUE; 53 | _glfw.timer.posix.frequency = 1000000000; 54 | } 55 | else 56 | #endif 57 | { 58 | _glfw.timer.posix.monotonic = GLFW_FALSE; 59 | _glfw.timer.posix.frequency = 1000000; 60 | } 61 | } 62 | 63 | 64 | ////////////////////////////////////////////////////////////////////////// 65 | ////// GLFW platform API ////// 66 | ////////////////////////////////////////////////////////////////////////// 67 | 68 | uint64_t _glfwPlatformGetTimerValue(void) 69 | { 70 | #if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) 71 | if (_glfw.timer.posix.monotonic) 72 | { 73 | struct timespec ts; 74 | clock_gettime(CLOCK_MONOTONIC, &ts); 75 | return (uint64_t) ts.tv_sec * (uint64_t) 1000000000 + (uint64_t) ts.tv_nsec; 76 | } 77 | else 78 | #endif 79 | { 80 | struct timeval tv; 81 | gettimeofday(&tv, NULL); 82 | return (uint64_t) tv.tv_sec * (uint64_t) 1000000 + (uint64_t) tv.tv_usec; 83 | } 84 | } 85 | 86 | uint64_t _glfwPlatformGetTimerFrequency(void) 87 | { 88 | return _glfw.timer.posix.frequency; 89 | } 90 | 91 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/posix_time.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #define _GLFW_PLATFORM_LIBRARY_TIMER_STATE _GLFWtimerPOSIX posix 29 | 30 | #include 31 | 32 | 33 | // POSIX-specific global timer data 34 | // 35 | typedef struct _GLFWtimerPOSIX 36 | { 37 | GLFWbool monotonic; 38 | uint64_t frequency; 39 | 40 | } _GLFWtimerPOSIX; 41 | 42 | 43 | void _glfwInitTimerPOSIX(void); 44 | 45 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/wgl_context.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 WGL - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2018 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 29 | #define WGL_SUPPORT_OPENGL_ARB 0x2010 30 | #define WGL_DRAW_TO_WINDOW_ARB 0x2001 31 | #define WGL_PIXEL_TYPE_ARB 0x2013 32 | #define WGL_TYPE_RGBA_ARB 0x202b 33 | #define WGL_ACCELERATION_ARB 0x2003 34 | #define WGL_NO_ACCELERATION_ARB 0x2025 35 | #define WGL_RED_BITS_ARB 0x2015 36 | #define WGL_RED_SHIFT_ARB 0x2016 37 | #define WGL_GREEN_BITS_ARB 0x2017 38 | #define WGL_GREEN_SHIFT_ARB 0x2018 39 | #define WGL_BLUE_BITS_ARB 0x2019 40 | #define WGL_BLUE_SHIFT_ARB 0x201a 41 | #define WGL_ALPHA_BITS_ARB 0x201b 42 | #define WGL_ALPHA_SHIFT_ARB 0x201c 43 | #define WGL_ACCUM_BITS_ARB 0x201d 44 | #define WGL_ACCUM_RED_BITS_ARB 0x201e 45 | #define WGL_ACCUM_GREEN_BITS_ARB 0x201f 46 | #define WGL_ACCUM_BLUE_BITS_ARB 0x2020 47 | #define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 48 | #define WGL_DEPTH_BITS_ARB 0x2022 49 | #define WGL_STENCIL_BITS_ARB 0x2023 50 | #define WGL_AUX_BUFFERS_ARB 0x2024 51 | #define WGL_STEREO_ARB 0x2012 52 | #define WGL_DOUBLE_BUFFER_ARB 0x2011 53 | #define WGL_SAMPLES_ARB 0x2042 54 | #define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20a9 55 | #define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001 56 | #define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 57 | #define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 58 | #define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 59 | #define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 60 | #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 61 | #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 62 | #define WGL_CONTEXT_FLAGS_ARB 0x2094 63 | #define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 64 | #define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 65 | #define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 66 | #define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 67 | #define WGL_NO_RESET_NOTIFICATION_ARB 0x8261 68 | #define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097 69 | #define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0 70 | #define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098 71 | #define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31b3 72 | #define WGL_COLORSPACE_EXT 0x309d 73 | #define WGL_COLORSPACE_SRGB_EXT 0x3089 74 | 75 | #define ERROR_INVALID_VERSION_ARB 0x2095 76 | #define ERROR_INVALID_PROFILE_ARB 0x2096 77 | #define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 78 | 79 | // WGL extension pointer typedefs 80 | typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC)(int); 81 | typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC)(HDC,int,int,UINT,const int*,int*); 82 | typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC)(void); 83 | typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC); 84 | typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC,HGLRC,const int*); 85 | #define wglSwapIntervalEXT _glfw.wgl.SwapIntervalEXT 86 | #define wglGetPixelFormatAttribivARB _glfw.wgl.GetPixelFormatAttribivARB 87 | #define wglGetExtensionsStringEXT _glfw.wgl.GetExtensionsStringEXT 88 | #define wglGetExtensionsStringARB _glfw.wgl.GetExtensionsStringARB 89 | #define wglCreateContextAttribsARB _glfw.wgl.CreateContextAttribsARB 90 | 91 | // opengl32.dll function pointer typedefs 92 | typedef HGLRC (WINAPI * PFN_wglCreateContext)(HDC); 93 | typedef BOOL (WINAPI * PFN_wglDeleteContext)(HGLRC); 94 | typedef PROC (WINAPI * PFN_wglGetProcAddress)(LPCSTR); 95 | typedef HDC (WINAPI * PFN_wglGetCurrentDC)(void); 96 | typedef HGLRC (WINAPI * PFN_wglGetCurrentContext)(void); 97 | typedef BOOL (WINAPI * PFN_wglMakeCurrent)(HDC,HGLRC); 98 | typedef BOOL (WINAPI * PFN_wglShareLists)(HGLRC,HGLRC); 99 | #define wglCreateContext _glfw.wgl.CreateContext 100 | #define wglDeleteContext _glfw.wgl.DeleteContext 101 | #define wglGetProcAddress _glfw.wgl.GetProcAddress 102 | #define wglGetCurrentDC _glfw.wgl.GetCurrentDC 103 | #define wglGetCurrentContext _glfw.wgl.GetCurrentContext 104 | #define wglMakeCurrent _glfw.wgl.MakeCurrent 105 | #define wglShareLists _glfw.wgl.ShareLists 106 | 107 | #define _GLFW_RECREATION_NOT_NEEDED 0 108 | #define _GLFW_RECREATION_REQUIRED 1 109 | #define _GLFW_RECREATION_IMPOSSIBLE 2 110 | 111 | #define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextWGL wgl 112 | #define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryWGL wgl 113 | 114 | 115 | // WGL-specific per-context data 116 | // 117 | typedef struct _GLFWcontextWGL 118 | { 119 | HDC dc; 120 | HGLRC handle; 121 | int interval; 122 | 123 | } _GLFWcontextWGL; 124 | 125 | // WGL-specific global data 126 | // 127 | typedef struct _GLFWlibraryWGL 128 | { 129 | HINSTANCE instance; 130 | PFN_wglCreateContext CreateContext; 131 | PFN_wglDeleteContext DeleteContext; 132 | PFN_wglGetProcAddress GetProcAddress; 133 | PFN_wglGetCurrentDC GetCurrentDC; 134 | PFN_wglGetCurrentContext GetCurrentContext; 135 | PFN_wglMakeCurrent MakeCurrent; 136 | PFN_wglShareLists ShareLists; 137 | 138 | PFNWGLSWAPINTERVALEXTPROC SwapIntervalEXT; 139 | PFNWGLGETPIXELFORMATATTRIBIVARBPROC GetPixelFormatAttribivARB; 140 | PFNWGLGETEXTENSIONSSTRINGEXTPROC GetExtensionsStringEXT; 141 | PFNWGLGETEXTENSIONSSTRINGARBPROC GetExtensionsStringARB; 142 | PFNWGLCREATECONTEXTATTRIBSARBPROC CreateContextAttribsARB; 143 | GLFWbool EXT_swap_control; 144 | GLFWbool EXT_colorspace; 145 | GLFWbool ARB_multisample; 146 | GLFWbool ARB_framebuffer_sRGB; 147 | GLFWbool EXT_framebuffer_sRGB; 148 | GLFWbool ARB_pixel_format; 149 | GLFWbool ARB_create_context; 150 | GLFWbool ARB_create_context_profile; 151 | GLFWbool EXT_create_context_es2_profile; 152 | GLFWbool ARB_create_context_robustness; 153 | GLFWbool ARB_create_context_no_error; 154 | GLFWbool ARB_context_flush_control; 155 | 156 | } _GLFWlibraryWGL; 157 | 158 | 159 | GLFWbool _glfwInitWGL(void); 160 | void _glfwTerminateWGL(void); 161 | GLFWbool _glfwCreateContextWGL(_GLFWwindow* window, 162 | const _GLFWctxconfig* ctxconfig, 163 | const _GLFWfbconfig* fbconfig); 164 | 165 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/win32_joystick.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Win32 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2006-2017 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #define _GLFW_PLATFORM_JOYSTICK_STATE _GLFWjoystickWin32 win32 28 | #define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE struct { int dummyLibraryJoystick; } 29 | 30 | #define _GLFW_PLATFORM_MAPPING_NAME "Windows" 31 | 32 | // Joystick element (axis, button or slider) 33 | // 34 | typedef struct _GLFWjoyobjectWin32 35 | { 36 | int offset; 37 | int type; 38 | } _GLFWjoyobjectWin32; 39 | 40 | // Win32-specific per-joystick data 41 | // 42 | typedef struct _GLFWjoystickWin32 43 | { 44 | _GLFWjoyobjectWin32* objects; 45 | int objectCount; 46 | IDirectInputDevice8W* device; 47 | DWORD index; 48 | GUID guid; 49 | } _GLFWjoystickWin32; 50 | 51 | 52 | void _glfwInitJoysticksWin32(void); 53 | void _glfwTerminateJoysticksWin32(void); 54 | void _glfwDetectJoystickConnectionWin32(void); 55 | void _glfwDetectJoystickDisconnectionWin32(void); 56 | 57 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/win32_thread.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Win32 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | // Please use C89 style variable declarations in this file because VS 2010 28 | //======================================================================== 29 | 30 | #include "internal.h" 31 | 32 | #include 33 | 34 | 35 | ////////////////////////////////////////////////////////////////////////// 36 | ////// GLFW platform API ////// 37 | ////////////////////////////////////////////////////////////////////////// 38 | 39 | GLFWbool _glfwPlatformCreateTls(_GLFWtls* tls) 40 | { 41 | assert(tls->win32.allocated == GLFW_FALSE); 42 | 43 | tls->win32.index = TlsAlloc(); 44 | if (tls->win32.index == TLS_OUT_OF_INDEXES) 45 | { 46 | _glfwInputErrorWin32(GLFW_PLATFORM_ERROR, 47 | "Win32: Failed to allocate TLS index"); 48 | return GLFW_FALSE; 49 | } 50 | 51 | tls->win32.allocated = GLFW_TRUE; 52 | return GLFW_TRUE; 53 | } 54 | 55 | void _glfwPlatformDestroyTls(_GLFWtls* tls) 56 | { 57 | if (tls->win32.allocated) 58 | TlsFree(tls->win32.index); 59 | memset(tls, 0, sizeof(_GLFWtls)); 60 | } 61 | 62 | void* _glfwPlatformGetTls(_GLFWtls* tls) 63 | { 64 | assert(tls->win32.allocated == GLFW_TRUE); 65 | return TlsGetValue(tls->win32.index); 66 | } 67 | 68 | void _glfwPlatformSetTls(_GLFWtls* tls, void* value) 69 | { 70 | assert(tls->win32.allocated == GLFW_TRUE); 71 | TlsSetValue(tls->win32.index, value); 72 | } 73 | 74 | GLFWbool _glfwPlatformCreateMutex(_GLFWmutex* mutex) 75 | { 76 | assert(mutex->win32.allocated == GLFW_FALSE); 77 | InitializeCriticalSection(&mutex->win32.section); 78 | return mutex->win32.allocated = GLFW_TRUE; 79 | } 80 | 81 | void _glfwPlatformDestroyMutex(_GLFWmutex* mutex) 82 | { 83 | if (mutex->win32.allocated) 84 | DeleteCriticalSection(&mutex->win32.section); 85 | memset(mutex, 0, sizeof(_GLFWmutex)); 86 | } 87 | 88 | void _glfwPlatformLockMutex(_GLFWmutex* mutex) 89 | { 90 | assert(mutex->win32.allocated == GLFW_TRUE); 91 | EnterCriticalSection(&mutex->win32.section); 92 | } 93 | 94 | void _glfwPlatformUnlockMutex(_GLFWmutex* mutex) 95 | { 96 | assert(mutex->win32.allocated == GLFW_TRUE); 97 | LeaveCriticalSection(&mutex->win32.section); 98 | } 99 | 100 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/win32_time.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Win32 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | // Please use C89 style variable declarations in this file because VS 2010 28 | //======================================================================== 29 | 30 | #include "internal.h" 31 | 32 | 33 | ////////////////////////////////////////////////////////////////////////// 34 | ////// GLFW internal API ////// 35 | ////////////////////////////////////////////////////////////////////////// 36 | 37 | // Initialise timer 38 | // 39 | void _glfwInitTimerWin32(void) 40 | { 41 | uint64_t frequency; 42 | 43 | if (QueryPerformanceFrequency((LARGE_INTEGER*) &frequency)) 44 | { 45 | _glfw.timer.win32.hasPC = GLFW_TRUE; 46 | _glfw.timer.win32.frequency = frequency; 47 | } 48 | else 49 | { 50 | _glfw.timer.win32.hasPC = GLFW_FALSE; 51 | _glfw.timer.win32.frequency = 1000; 52 | } 53 | } 54 | 55 | 56 | ////////////////////////////////////////////////////////////////////////// 57 | ////// GLFW platform API ////// 58 | ////////////////////////////////////////////////////////////////////////// 59 | 60 | uint64_t _glfwPlatformGetTimerValue(void) 61 | { 62 | if (_glfw.timer.win32.hasPC) 63 | { 64 | uint64_t value; 65 | QueryPerformanceCounter((LARGE_INTEGER*) &value); 66 | return value; 67 | } 68 | else 69 | return (uint64_t) timeGetTime(); 70 | } 71 | 72 | uint64_t _glfwPlatformGetTimerFrequency(void) 73 | { 74 | return _glfw.timer.win32.frequency; 75 | } 76 | 77 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/wl_monitor.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Wayland - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2014 Jonas Ådahl 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | // It is fine to use C99 in this file because it will not be built with VS 27 | //======================================================================== 28 | 29 | #include "internal.h" 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | 38 | static void outputHandleGeometry(void* data, 39 | struct wl_output* output, 40 | int32_t x, 41 | int32_t y, 42 | int32_t physicalWidth, 43 | int32_t physicalHeight, 44 | int32_t subpixel, 45 | const char* make, 46 | const char* model, 47 | int32_t transform) 48 | { 49 | struct _GLFWmonitor *monitor = data; 50 | char name[1024]; 51 | 52 | monitor->wl.x = x; 53 | monitor->wl.y = y; 54 | monitor->widthMM = physicalWidth; 55 | monitor->heightMM = physicalHeight; 56 | 57 | snprintf(name, sizeof(name), "%s %s", make, model); 58 | monitor->name = _glfw_strdup(name); 59 | } 60 | 61 | static void outputHandleMode(void* data, 62 | struct wl_output* output, 63 | uint32_t flags, 64 | int32_t width, 65 | int32_t height, 66 | int32_t refresh) 67 | { 68 | struct _GLFWmonitor *monitor = data; 69 | GLFWvidmode mode; 70 | 71 | mode.width = width; 72 | mode.height = height; 73 | mode.redBits = 8; 74 | mode.greenBits = 8; 75 | mode.blueBits = 8; 76 | mode.refreshRate = (int) round(refresh / 1000.0); 77 | 78 | monitor->modeCount++; 79 | monitor->modes = 80 | realloc(monitor->modes, monitor->modeCount * sizeof(GLFWvidmode)); 81 | monitor->modes[monitor->modeCount - 1] = mode; 82 | 83 | if (flags & WL_OUTPUT_MODE_CURRENT) 84 | monitor->wl.currentMode = monitor->modeCount - 1; 85 | } 86 | 87 | static void outputHandleDone(void* data, struct wl_output* output) 88 | { 89 | struct _GLFWmonitor *monitor = data; 90 | 91 | _glfwInputMonitor(monitor, GLFW_CONNECTED, _GLFW_INSERT_LAST); 92 | } 93 | 94 | static void outputHandleScale(void* data, 95 | struct wl_output* output, 96 | int32_t factor) 97 | { 98 | struct _GLFWmonitor *monitor = data; 99 | 100 | monitor->wl.scale = factor; 101 | } 102 | 103 | static const struct wl_output_listener outputListener = { 104 | outputHandleGeometry, 105 | outputHandleMode, 106 | outputHandleDone, 107 | outputHandleScale, 108 | }; 109 | 110 | 111 | ////////////////////////////////////////////////////////////////////////// 112 | ////// GLFW internal API ////// 113 | ////////////////////////////////////////////////////////////////////////// 114 | 115 | void _glfwAddOutputWayland(uint32_t name, uint32_t version) 116 | { 117 | _GLFWmonitor *monitor; 118 | struct wl_output *output; 119 | 120 | if (version < 2) 121 | { 122 | _glfwInputError(GLFW_PLATFORM_ERROR, 123 | "Wayland: Unsupported output interface version"); 124 | return; 125 | } 126 | 127 | // The actual name of this output will be set in the geometry handler. 128 | monitor = _glfwAllocMonitor(NULL, 0, 0); 129 | 130 | output = wl_registry_bind(_glfw.wl.registry, 131 | name, 132 | &wl_output_interface, 133 | 2); 134 | if (!output) 135 | { 136 | _glfwFreeMonitor(monitor); 137 | return; 138 | } 139 | 140 | monitor->wl.scale = 1; 141 | monitor->wl.output = output; 142 | monitor->wl.name = name; 143 | 144 | wl_output_add_listener(output, &outputListener, monitor); 145 | } 146 | 147 | 148 | ////////////////////////////////////////////////////////////////////////// 149 | ////// GLFW platform API ////// 150 | ////////////////////////////////////////////////////////////////////////// 151 | 152 | void _glfwPlatformFreeMonitor(_GLFWmonitor* monitor) 153 | { 154 | if (monitor->wl.output) 155 | wl_output_destroy(monitor->wl.output); 156 | } 157 | 158 | void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos) 159 | { 160 | if (xpos) 161 | *xpos = monitor->wl.x; 162 | if (ypos) 163 | *ypos = monitor->wl.y; 164 | } 165 | 166 | void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor, 167 | float* xscale, float* yscale) 168 | { 169 | if (xscale) 170 | *xscale = (float) monitor->wl.scale; 171 | if (yscale) 172 | *yscale = (float) monitor->wl.scale; 173 | } 174 | 175 | void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, 176 | int* xpos, int* ypos, 177 | int* width, int* height) 178 | { 179 | if (xpos) 180 | *xpos = monitor->wl.x; 181 | if (ypos) 182 | *ypos = monitor->wl.y; 183 | if (width) 184 | *width = monitor->modes[monitor->wl.currentMode].width; 185 | if (height) 186 | *height = monitor->modes[monitor->wl.currentMode].height; 187 | } 188 | 189 | GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found) 190 | { 191 | *found = monitor->modeCount; 192 | return monitor->modes; 193 | } 194 | 195 | void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode) 196 | { 197 | *mode = monitor->modes[monitor->wl.currentMode]; 198 | } 199 | 200 | GLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp) 201 | { 202 | _glfwInputError(GLFW_PLATFORM_ERROR, 203 | "Wayland: Gamma ramp access is not available"); 204 | return GLFW_FALSE; 205 | } 206 | 207 | void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, 208 | const GLFWgammaramp* ramp) 209 | { 210 | _glfwInputError(GLFW_PLATFORM_ERROR, 211 | "Wayland: Gamma ramp access is not available"); 212 | } 213 | 214 | 215 | ////////////////////////////////////////////////////////////////////////// 216 | ////// GLFW native API ////// 217 | ////////////////////////////////////////////////////////////////////////// 218 | 219 | GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* handle) 220 | { 221 | _GLFWmonitor* monitor = (_GLFWmonitor*) handle; 222 | _GLFW_REQUIRE_INIT_OR_RETURN(NULL); 223 | return monitor->wl.output; 224 | } 225 | 226 | -------------------------------------------------------------------------------- /libs/raylib/src/external/glfw/src/xkb_unicode.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Linux - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2014 Jonas Ådahl 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | long _glfwKeySym2Unicode(unsigned int keysym); 28 | 29 | -------------------------------------------------------------------------------- /libs/raylib/src/raylib.dll.rc: -------------------------------------------------------------------------------- 1 | GLFW_ICON ICON "raylib.ico" 2 | 3 | 1 VERSIONINFO 4 | FILEVERSION 3,0,0,0 5 | PRODUCTVERSION 3,0,0,0 6 | BEGIN 7 | BLOCK "StringFileInfo" 8 | BEGIN 9 | //BLOCK "080904E4" // English UK 10 | BLOCK "040904E4" // English US 11 | BEGIN 12 | //VALUE "CompanyName", "raylib technologies" 13 | VALUE "FileDescription", "raylib dynamic library (www.raylib.com)" 14 | VALUE "FileVersion", "3.0.0" 15 | VALUE "InternalName", "raylib_dll" 16 | VALUE "LegalCopyright", "(c) 2020 Ramon Santamaria (@raysan5)" 17 | //VALUE "OriginalFilename", "raylib.dll" 18 | VALUE "ProductName", "raylib" 19 | VALUE "ProductVersion", "3.0.0" 20 | END 21 | END 22 | BLOCK "VarFileInfo" 23 | BEGIN 24 | //VALUE "Translation", 0x809, 1252 // English UK 25 | VALUE "Translation", 0x409, 1252 // English US 26 | END 27 | END 28 | -------------------------------------------------------------------------------- /libs/raylib/src/raylib.dll.rc.data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SasLuca/raylib-cpp-cmake-template/6deeb29b675ca0acdda1354df5345fc1102a7d41/libs/raylib/src/raylib.dll.rc.data -------------------------------------------------------------------------------- /libs/raylib/src/raylib.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SasLuca/raylib-cpp-cmake-template/6deeb29b675ca0acdda1354df5345fc1102a7d41/libs/raylib/src/raylib.ico -------------------------------------------------------------------------------- /libs/raylib/src/raylib.rc: -------------------------------------------------------------------------------- 1 | GLFW_ICON ICON "raylib.ico" 2 | 3 | 1 VERSIONINFO 4 | FILEVERSION 3,0,0,0 5 | PRODUCTVERSION 3,0,0,0 6 | BEGIN 7 | BLOCK "StringFileInfo" 8 | BEGIN 9 | //BLOCK "080904E4" // English UK 10 | BLOCK "040904E4" // English US 11 | BEGIN 12 | //VALUE "CompanyName", "raylib technologies" 13 | VALUE "FileDescription", "raylib application (www.raylib.com)" 14 | VALUE "FileVersion", "3.0.0" 15 | VALUE "InternalName", "raylib app" 16 | VALUE "LegalCopyright", "(c) 2020 Ramon Santamaria (@raysan5)" 17 | //VALUE "OriginalFilename", "raylib_app.exe" 18 | VALUE "ProductName", "raylib app" 19 | VALUE "ProductVersion", "3.0.0" 20 | END 21 | END 22 | BLOCK "VarFileInfo" 23 | BEGIN 24 | //VALUE "Translation", 0x809, 1252 // English UK 25 | VALUE "Translation", 0x409, 1252 // English US 26 | END 27 | END 28 | -------------------------------------------------------------------------------- /libs/raylib/src/raylib.rc.data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SasLuca/raylib-cpp-cmake-template/6deeb29b675ca0acdda1354df5345fc1102a7d41/libs/raylib/src/raylib.rc.data -------------------------------------------------------------------------------- /libs/raylib/src/rglfw.c: -------------------------------------------------------------------------------- 1 | /********************************************************************************************** 2 | * 3 | * rglfw - raylib GLFW single file compilation 4 | * 5 | * This file includes latest GLFW sources (https://github.com/glfw/glfw) to be compiled together 6 | * with raylib for all supported platforms, this way, no external dependencies are required. 7 | * 8 | * LICENSE: zlib/libpng 9 | * 10 | * Copyright (c) 2017-2020 Ramon Santamaria (@raysan5) 11 | * 12 | * This software is provided "as-is", without any express or implied warranty. In no event 13 | * will the authors be held liable for any damages arising from the use of this software. 14 | * 15 | * Permission is granted to anyone to use this software for any purpose, including commercial 16 | * applications, and to alter it and redistribute it freely, subject to the following restrictions: 17 | * 18 | * 1. The origin of this software must not be misrepresented; you must not claim that you 19 | * wrote the original software. If you use this software in a product, an acknowledgment 20 | * in the product documentation would be appreciated but is not required. 21 | * 22 | * 2. Altered source versions must be plainly marked as such, and must not be misrepresented 23 | * as being the original software. 24 | * 25 | * 3. This notice may not be removed or altered from any source distribution. 26 | * 27 | **********************************************************************************************/ 28 | 29 | //#define _GLFW_BUILD_DLL // To build shared version 30 | //http://www.glfw.org/docs/latest/compile.html#compile_manual 31 | 32 | #if defined(_WIN32) 33 | #define _GLFW_WIN32 34 | #endif 35 | #if defined(__linux__) 36 | #if !defined(_GLFW_WAYLAND) // Required for Wayland windowing 37 | #define _GLFW_X11 38 | #endif 39 | #endif 40 | #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) 41 | #define _GLFW_X11 42 | #endif 43 | #if defined(__APPLE__) 44 | #define _GLFW_COCOA 45 | #define _GLFW_USE_MENUBAR // To create and populate the menu bar when the first window is created 46 | #define _GLFW_USE_RETINA // To have windows use the full resolution of Retina displays 47 | #endif 48 | #if defined(__TINYC__) 49 | #define _WIN32_WINNT_WINXP 0x0501 50 | #endif 51 | 52 | // NOTE: _GLFW_MIR experimental platform not supported at this moment 53 | 54 | #include "external/glfw/src/context.c" 55 | #include "external/glfw/src/init.c" 56 | #include "external/glfw/src/input.c" 57 | #include "external/glfw/src/monitor.c" 58 | #include "external/glfw/src/vulkan.c" 59 | #include "external/glfw/src/window.c" 60 | 61 | #if defined(_WIN32) 62 | #include "external/glfw/src/win32_init.c" 63 | #include "external/glfw/src/win32_joystick.c" 64 | #include "external/glfw/src/win32_monitor.c" 65 | #include "external/glfw/src/win32_time.c" 66 | #include "external/glfw/src/win32_thread.c" 67 | #include "external/glfw/src/win32_window.c" 68 | #include "external/glfw/src/wgl_context.c" 69 | #include "external/glfw/src/egl_context.c" 70 | #include "external/glfw/src/osmesa_context.c" 71 | #endif 72 | 73 | #if defined(__linux__) 74 | #if defined(_GLFW_WAYLAND) 75 | #include "external/glfw/src/wl_init.c" 76 | #include "external/glfw/src/wl_monitor.c" 77 | #include "external/glfw/src/wl_window.c" 78 | #include "external/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.c" 79 | #include "external/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c" 80 | #endif 81 | #if defined(_GLFW_X11) 82 | #include "external/glfw/src/x11_init.c" 83 | #include "external/glfw/src/x11_monitor.c" 84 | #include "external/glfw/src/x11_window.c" 85 | #include "external/glfw/src/glx_context.c" 86 | #endif 87 | 88 | #include "external/glfw/src/linux_joystick.c" 89 | #include "external/glfw/src/posix_thread.c" 90 | #include "external/glfw/src/posix_time.c" 91 | #include "external/glfw/src/xkb_unicode.c" 92 | #include "external/glfw/src/egl_context.c" 93 | #include "external/glfw/src/osmesa_context.c" 94 | #endif 95 | 96 | #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__) || defined(__DragonFly__) 97 | #include "external/glfw/src/x11_init.c" 98 | #include "external/glfw/src/x11_monitor.c" 99 | #include "external/glfw/src/x11_window.c" 100 | #include "external/glfw/src/xkb_unicode.c" 101 | // TODO: Joystick implementation 102 | #include "external/glfw/src/null_joystick.c" 103 | #include "external/glfw/src/posix_time.c" 104 | #include "external/glfw/src/posix_thread.c" 105 | #include "external/glfw/src/glx_context.c" 106 | #include "external/glfw/src/egl_context.c" 107 | #include "external/glfw/src/osmesa_context.c" 108 | #endif 109 | 110 | #if defined(__APPLE__) 111 | #include "external/glfw/src/cocoa_init.m" 112 | #include "external/glfw/src/cocoa_joystick.m" 113 | #include "external/glfw/src/cocoa_monitor.m" 114 | #include "external/glfw/src/cocoa_window.m" 115 | #include "external/glfw/src/cocoa_time.c" 116 | #include "external/glfw/src/posix_thread.c" 117 | #include "external/glfw/src/nsgl_context.m" 118 | #include "external/glfw/src/egl_context.c" 119 | #include "external/glfw/src/osmesa_context.c" 120 | #endif 121 | -------------------------------------------------------------------------------- /libs/raylib/src/utils.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************************** 2 | * 3 | * raylib.utils - Some common utility functions 4 | * 5 | * 6 | * LICENSE: zlib/libpng 7 | * 8 | * Copyright (c) 2014-2020 Ramon Santamaria (@raysan5) 9 | * 10 | * This software is provided "as-is", without any express or implied warranty. In no event 11 | * will the authors be held liable for any damages arising from the use of this software. 12 | * 13 | * Permission is granted to anyone to use this software for any purpose, including commercial 14 | * applications, and to alter it and redistribute it freely, subject to the following restrictions: 15 | * 16 | * 1. The origin of this software must not be misrepresented; you must not claim that you 17 | * wrote the original software. If you use this software in a product, an acknowledgment 18 | * in the product documentation would be appreciated but is not required. 19 | * 20 | * 2. Altered source versions must be plainly marked as such, and must not be misrepresented 21 | * as being the original software. 22 | * 23 | * 3. This notice may not be removed or altered from any source distribution. 24 | * 25 | **********************************************************************************************/ 26 | 27 | #ifndef UTILS_H 28 | #define UTILS_H 29 | 30 | #if defined(PLATFORM_ANDROID) 31 | #include // Required for: FILE 32 | #include // Required for: AAssetManager 33 | #endif 34 | 35 | #if defined(SUPPORT_TRACELOG) 36 | #define TRACELOG(level, ...) TraceLog(level, __VA_ARGS__) 37 | 38 | #if defined(SUPPORT_TRACELOG_DEBUG) 39 | #define TRACELOGD(...) TraceLog(LOG_DEBUG, __VA_ARGS__) 40 | #else 41 | #define TRACELOGD(...) (void)0 42 | #endif 43 | #else 44 | #define TRACELOG(level, ...) (void)0 45 | #define TRACELOGD(...) (void)0 46 | #endif 47 | 48 | //---------------------------------------------------------------------------------- 49 | // Some basic Defines 50 | //---------------------------------------------------------------------------------- 51 | #if defined(PLATFORM_ANDROID) 52 | #define fopen(name, mode) android_fopen(name, mode) 53 | #endif 54 | 55 | //---------------------------------------------------------------------------------- 56 | // Types and Structures Definition 57 | //---------------------------------------------------------------------------------- 58 | #ifdef __cplusplus 59 | extern "C" { // Prevents name mangling of functions 60 | #endif 61 | 62 | //---------------------------------------------------------------------------------- 63 | // Global Variables Definition 64 | //---------------------------------------------------------------------------------- 65 | // Nop... 66 | 67 | //---------------------------------------------------------------------------------- 68 | // Module Functions Declaration 69 | //---------------------------------------------------------------------------------- 70 | #if defined(PLATFORM_ANDROID) 71 | void InitAssetManager(AAssetManager *manager, const char *dataPath); // Initialize asset manager from android app 72 | FILE *android_fopen(const char *fileName, const char *mode); // Replacement for fopen() -> Read-only! 73 | #endif 74 | 75 | #if defined(PLATFORM_UWP) 76 | // UWP Messages System 77 | typedef enum { 78 | UWP_MSG_NONE = 0, 79 | 80 | // Send 81 | UWP_MSG_SHOW_MOUSE, 82 | UWP_MSG_HIDE_MOUSE, 83 | UWP_MSG_LOCK_MOUSE, 84 | UWP_MSG_UNLOCK_MOUSE, 85 | UWP_MSG_SET_MOUSE_LOCATION, // paramVector0 (pos) 86 | 87 | // Receive (Into C) 88 | UWP_MSG_REGISTER_KEY, // paramInt0 (key), paramChar0 (status) 89 | UWP_MSG_REGISTER_CLICK, // paramInt0 (button), paramChar0 (status) 90 | UWP_MSG_SCROLL_WHEEL_UPDATE, // paramInt0 (delta) 91 | UWP_MSG_UPDATE_MOUSE_LOCATION, // paramVector0 (pos) 92 | UWP_MSG_SET_GAMEPAD_ACTIVE, // paramInt0 (gamepad), paramBool0 (active or not) 93 | UWP_MSG_SET_GAMEPAD_BUTTON, // paramInt0 (gamepad), paramInt1 (button), paramChar0 (status) 94 | UWP_MSG_SET_GAMEPAD_AXIS, // paramInt0 (gamepad), int1 (axis), paramFloat0 (value) 95 | UWP_MSG_SET_DISPLAY_DIMS, // paramVector0 (display dimensions) 96 | UWP_MSG_HANDLE_RESIZE, // paramVector0 (new dimensions) - Onresized event 97 | UWP_MSG_SET_GAME_TIME, // paramInt0 98 | } UWPMessageType; 99 | 100 | typedef struct UWPMessage { 101 | UWPMessageType type; // Message type 102 | 103 | Vector2 paramVector0; // Vector parameters 104 | int paramInt0; // Int parameter 105 | int paramInt1; // Int parameter 106 | char paramChar0; // Char parameters 107 | float paramFloat0; // Float parameters 108 | double paramDouble0; // Double parameters 109 | bool paramBool0; // Bool parameters 110 | 111 | // More parameters can be added and fed to functions 112 | } UWPMessage; 113 | 114 | // Allocate UWP Message 115 | RLAPI UWPMessage* CreateUWPMessage(void); 116 | 117 | // Free UWP Message 118 | RLAPI void DeleteUWPMessage(UWPMessage* msg); 119 | 120 | // Get messages into C++ 121 | RLAPI bool UWPHasMessages(void); 122 | RLAPI UWPMessage* UWPGetMessage(void); 123 | RLAPI void UWPSendMessage(UWPMessage* msg); 124 | 125 | // For C to call 126 | #ifndef __cplusplus // Hide from C++ code 127 | void SendMessageToUWP(UWPMessage* msg); 128 | bool HasMessageFromUWP(void); 129 | UWPMessage* GetMessageFromUWP(void); 130 | #endif 131 | 132 | #endif //defined(PLATFORM_UWP) 133 | 134 | #ifdef __cplusplus 135 | } 136 | #endif 137 | 138 | #endif // UTILS_H 139 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "raylib.h" 2 | 3 | constexpr auto SCREEN_WIDTH = 800; 4 | constexpr auto SCREEN_HEIGHT = 450; 5 | 6 | int main() 7 | { 8 | InitWindow(SCREEN_WIDTH, SCREEN_HEIGHT, "Window title"); 9 | SetTargetFPS(60); 10 | 11 | Texture2D texture = LoadTexture(ASSETS_PATH"test.png"); 12 | 13 | while (!WindowShouldClose()) 14 | { 15 | BeginDrawing(); 16 | 17 | ClearBackground(RAYWHITE); 18 | 19 | const int texture_x = SCREEN_WIDTH / 2 - texture.width / 2; 20 | const int texture_y = SCREEN_HEIGHT / 2 - texture.height / 2; 21 | DrawTexture(texture, texture_x, texture_y, WHITE); 22 | 23 | const char* text = "OMG! IT WORKS!"; 24 | const Vector2 text_size = MeasureTextEx(GetFontDefault(), text, 20, 1); 25 | DrawText(text, SCREEN_WIDTH / 2 - text_size.x / 2, texture_y + texture.height + text_size.y + 10, 20, BLACK); 26 | 27 | EndDrawing(); 28 | } 29 | 30 | UnloadTexture(texture); 31 | 32 | CloseWindow(); 33 | return 0; 34 | } 35 | --------------------------------------------------------------------------------