You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

144 lines
9.9 KiB

6 years ago
5 years ago
7 years ago
3 years ago
10 years ago
3 years ago
2 years ago
2 years ago
2 years ago
4 years ago
2 years ago
2 years ago
2 years ago
4 years ago
3 years ago
3 years ago
5 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
  1. <img align="left" style="width:260px" src="https://github.com/raysan5/raylib/blob/master/logo/raylib_logo_animation.gif" width="288px">
  2. **raylib is a simple and easy-to-use library to enjoy videogames programming.**
  3. raylib is highly inspired by Borland BGI graphics lib and by XNA framework and it's specially well suited for prototyping, tooling, graphical applications, embedded systems and education.
  4. *NOTE for ADVENTURERS: raylib is a programming library to enjoy videogames programming; no fancy interface, no visual helpers, no debug button... just coding in the most pure spartan-programmers way.*
  5. Ready to learn? Jump to [code examples!](https://www.raylib.com/examples.html)
  6. ---
  7. <br>
  8. [![GitHub Releases Downloads](https://img.shields.io/github/downloads/raysan5/raylib/total)](https://github.com/raysan5/raylib/releases)
  9. [![GitHub Stars](https://img.shields.io/github/stars/raysan5/raylib?style=flat&label=stars)](https://github.com/raysan5/raylib/stargazers)
  10. [![GitHub commits since tagged version](https://img.shields.io/github/commits-since/raysan5/raylib/4.5.0)](https://github.com/raysan5/raylib/commits/master)
  11. [![GitHub Sponsors](https://img.shields.io/github/sponsors/raysan5?label=sponsors)](https://github.com/sponsors/raysan5)
  12. [![Packaging Status](https://repology.org/badge/tiny-repos/raylib.svg)](https://repology.org/project/raylib/versions)
  13. [![License](https://img.shields.io/badge/license-zlib%2Flibpng-blue.svg)](LICENSE)
  14. [![Discord Members](https://img.shields.io/discord/426912293134270465.svg?label=Discord&logo=discord)](https://discord.gg/raylib)
  15. [![Subreddit Subscribers](https://img.shields.io/reddit/subreddit-subscribers/raylib?label=reddit%20r%2Fraylib&logo=reddit)](https://www.reddit.com/r/raylib/)
  16. [![Youtube Subscribers](https://img.shields.io/youtube/channel/subscribers/UC8WIBkhYb5sBNqXO1mZ7WSQ?style=flat&label=Youtube&logo=youtube)](https://www.youtube.com/c/raylib)
  17. [![Twitch Status](https://img.shields.io/twitch/status/raysan5?style=flat&label=Twitch&logo=twitch)](https://www.twitch.tv/raysan5)
  18. [![Windows](https://github.com/raysan5/raylib/workflows/Windows/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3AWindows)
  19. [![Linux](https://github.com/raysan5/raylib/workflows/Linux/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3ALinux)
  20. [![macOS](https://github.com/raysan5/raylib/workflows/macOS/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3AmacOS)
  21. [![Android](https://github.com/raysan5/raylib/workflows/Android/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3AAndroid)
  22. [![WebAssembly](https://github.com/raysan5/raylib/workflows/WebAssembly/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3AWebAssembly)
  23. [![CMakeBuilds](https://github.com/raysan5/raylib/workflows/CMakeBuilds/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3ACMakeBuilds)
  24. [![Windows Examples](https://github.com/raysan5/raylib/actions/workflows/windows_examples.yml/badge.svg)](https://github.com/raysan5/raylib/actions/workflows/windows_examples.yml)
  25. [![Linux Examples](https://github.com/raysan5/raylib/actions/workflows/linux_examples.yml/badge.svg)](https://github.com/raysan5/raylib/actions/workflows/linux_examples.yml)
  26. features
  27. --------
  28. - **NO external dependencies**, all required libraries are [bundled into raylib](https://github.com/raysan5/raylib/tree/master/src/external)
  29. - Multiple platforms supported: **Windows, Linux, MacOS, RPI, Android, HTML5... and more!**
  30. - Written in plain C code (C99) using PascalCase/camelCase notation
  31. - Hardware accelerated with OpenGL (**1.1, 2.1, 3.3, 4.3 or ES 2.0**)
  32. - **Unique OpenGL abstraction layer** (usable as standalone module): [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h)
  33. - Multiple **Fonts** formats supported (TTF, Image fonts, AngelCode fonts)
  34. - Multiple texture formats supported, including **compressed formats** (DXT, ETC, ASTC)
  35. - **Full 3D support**, including 3D Shapes, Models, Billboards, Heightmaps and more!
  36. - Flexible Materials system, supporting classic maps and **PBR maps**
  37. - **Animated 3D models** supported (skeletal bones animation) (IQM)
  38. - Shaders support, including model and **postprocessing** shaders.
  39. - **Powerful math module** for Vector, Matrix and Quaternion operations: [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h)
  40. - Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
  41. - **VR stereo rendering** support with configurable HMD device parameters
  42. - Huge examples collection with [+120 code examples](https://github.com/raysan5/raylib/tree/master/examples)!
  43. - Bindings to [+60 programming languages](https://github.com/raysan5/raylib/blob/master/BINDINGS.md)!
  44. - **Free and open source**.
  45. basic example
  46. --------------
  47. This is a basic raylib example, it creates a window and it draws the text `"Congrats! You created your first window!"` in the middle of the screen. Check this example [running live on web here](https://www.raylib.com/examples/core/loader.html?name=core_basic_window).
  48. ```c
  49. #include "raylib.h"
  50. int main(void)
  51. {
  52. InitWindow(800, 450, "raylib [core] example - basic window");
  53. while (!WindowShouldClose())
  54. {
  55. BeginDrawing();
  56. ClearBackground(RAYWHITE);
  57. DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
  58. EndDrawing();
  59. }
  60. CloseWindow();
  61. return 0;
  62. }
  63. ```
  64. build and installation
  65. ----------------------
  66. raylib binary releases for Windows, Linux, macOS, Android and HTML5 are available at the [Github Releases page](https://github.com/raysan5/raylib/releases).
  67. raylib is also available via multiple [package managers](https://github.com/raysan5/raylib/issues/613) on multiple OS distributions.
  68. #### Installing and building raylib on multiple platforms
  69. [raylib Wiki](https://github.com/raysan5/raylib/wiki#development-platforms) contains detailed instructions on building and usage on multiple platforms.
  70. - [Working on Windows](https://github.com/raysan5/raylib/wiki/Working-on-Windows)
  71. - [Working on macOS](https://github.com/raysan5/raylib/wiki/Working-on-macOS)
  72. - [Working on GNU Linux](https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux)
  73. - [Working on Chrome OS](https://github.com/raysan5/raylib/wiki/Working-on-Chrome-OS)
  74. - [Working on FreeBSD](https://github.com/raysan5/raylib/wiki/Working-on-FreeBSD)
  75. - [Working on Raspberry Pi](https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi)
  76. - [Working for Android](https://github.com/raysan5/raylib/wiki/Working-for-Android)
  77. - [Working for Web (HTML5)](https://github.com/raysan5/raylib/wiki/Working-for-Web-(HTML5))
  78. - [Working anywhere with CMake](https://github.com/raysan5/raylib/wiki/Working-with-CMake)
  79. *Note that the Wiki is open for edit, if you find some issues while building raylib for your target platform, feel free to edit the Wiki or open an issue related to it.*
  80. #### Setup raylib with multiple IDEs
  81. raylib has been developed on Windows platform using [Notepad++](https://notepad-plus-plus.org/) and [MinGW GCC](https://www.mingw-w64.org/) compiler but it can be used with other IDEs on multiple platforms.
  82. [Projects directory](https://github.com/raysan5/raylib/tree/master/projects) contains several ready-to-use **project templates** to build raylib and code examples with multiple IDEs.
  83. *Note that there are lots of IDEs supported, some of the provided templates could require some review, so please, if you find some issue with a template or you think they could be improved, feel free to send a PR or open a related issue.*
  84. learning and docs
  85. ------------------
  86. raylib is designed to be learned using [the examples](https://github.com/raysan5/raylib/tree/master/examples) as the main reference. There is no standard API documentation but there is a [**cheatsheet**](https://www.raylib.com/cheatsheet/cheatsheet.html) containing all the functions available on the library a short description of each one of them, input parameters and result value names should be intuitive enough to understand how each function works.
  87. Some additional documentation about raylib design can be found in raylib GitHub Wiki. Here are the relevant links:
  88. - [raylib cheatsheet](https://www.raylib.com/cheatsheet/cheatsheet.html)
  89. - [raylib architecture](https://github.com/raysan5/raylib/wiki/raylib-architecture)
  90. - [raylib library design](https://github.com/raysan5/raylib/wiki)
  91. - [raylib examples collection](https://github.com/raysan5/raylib/tree/master/examples)
  92. - [raylib games collection](https://github.com/raysan5/raylib-games)
  93. contact and networks
  94. ---------------------
  95. raylib is present in several networks and raylib community is growing everyday. If you are using raylib and enjoying it, feel free to join us in any of these networks. The most active network is our [Discord server](https://discord.gg/raylib)! :)
  96. - Webpage: [https://www.raylib.com](https://www.raylib.com)
  97. - Discord: [https://discord.gg/raylib](https://discord.gg/raylib)
  98. - Twitter: [https://www.twitter.com/raysan5](https://www.twitter.com/raysan5)
  99. - Twitch: [https://www.twitch.tv/raysan5](https://www.twitch.tv/raysan5)
  100. - Reddit: [https://www.reddit.com/r/raylib](https://www.reddit.com/r/raylib)
  101. - Patreon: [https://www.patreon.com/raylib](https://www.patreon.com/raylib)
  102. - YouTube: [https://www.youtube.com/channel/raylib](https://www.youtube.com/c/raylib)
  103. license
  104. -------
  105. raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check [LICENSE](LICENSE) for further details.
  106. raylib uses internally some libraries for window/graphics/inputs management and also to support different file formats loading, all those libraries are embedded with and are available in [src/external](https://github.com/raysan5/raylib/tree/master/src/external) directory. Check [raylib dependencies LICENSES](https://github.com/raysan5/raylib/wiki/raylib-dependencies) on raylib Wiki for details.