Lightly edited the document (as disucsed in #1404). Removed the last paragraph, and linked to the Archtecture page, which says the same thing (in more detail).

master
Carl Smith 4 年之前
父節點
當前提交
137eaf79c0
共有 1 個檔案被更改,包括 7 行新增10 行删除
  1. +7
    -10
      raylib-dependencies.md

+ 7
- 10
raylib-dependencies.md

@ -1,10 +1,8 @@
raylib has no **external** dependencies, all required libraries are included with raylib sources.
While raylib uses libraries that were developed by other people (for specific tasks, like supporting a particular file format), this is all internal. raylib has no *external* dependencies. All of the required libraries are [bundled with the raylib sources](https://github.com/raysan5/raylib/tree/master/src/external).
Internally, raylib uses some libraries developed by other people, most of them used for some very specific task, like loading a specific file format or managing the audio device.
The following table lists the raylib dependencies. Most are [single-header, public-domain libraries](https://github.com/nothings/stb).
Here is the list of dependencies used by raylib. Note that most of these dependencies are [single-header public-domain libraries](https://github.com/nothings/stb) that are [included in raylib repository](https://github.com/raysan5/raylib/tree/master/src/external).
_**NOTE: Last update on February 6th 2020 for raylib 3.0 release**_
**NOTE**: *Last updated on 6th February 2020 for the raylib 3.0 release.*
Library | Version | raylib module | Notes
--- | :---: | :---: | ---
@ -27,10 +25,11 @@ Library | Version | raylib module | Notes
[tinyobj_loader_c](https://github.com/raysan5/raylib/blob/master/src/external/tinyobj_loader_c.h) | ? (Ray) | [models](https://github.com/raysan5/raylib/blob/master/src/models.c) | OBJ/MTL data loading (*)
[cgltf](https://github.com/raysan5/raylib/blob/master/src/external/cgltf.h) | 1.5 | [models](https://github.com/raysan5/raylib/blob/master/src/models.c) | glTF models data loading
Note that some of the dependencies listed above are specific to one or more of the platforms that raylib supports.
Note that raylib supports multiple platforms and, consequently, not all library dependencies from above are the same for all supported platforms. As commented, some of the above libraries included in raylib are single-file header-only libraries (`stb_image`, `stb_image_write`, `stb_image_resize`, `stb_vorbis`, `jar_mod`, `jar_xm`, `glad`, `mini_al`), most of those libraries only depend on the C standard library for the target platform (msvcrt, libc, bionic) and are compiled together with raylib—no need for additional library linkage.
As mentioned, some of the listed libraries (`stb_image`, `stb_image_write`, `stb_image_resize`, `stb_vorbis`, `jar_mod`, `jar_xm`, `glad`, `mini_al`) are included with raylib as single-file, header-only libraries, and generally only depend on the C standard library for the target platform (msvcrt, libc, bionic). They are compiled together with raylib (no need to manually link libraries).
Despite raylib requires no external dependencies, there are some platform-specific system libraries that are required to be linked on examples/games compilation. Here it is a table with required libraries:
Though raylib has no external dependencies, there are some platform-specific system libraries that do need to be linked when compiling [the collection of examples](https://github.com/raysan5/raylib/tree/master/examples). The following table lists the required libraries.
PLATFORM | external dependencies | Notes
--- | :---: | ---
@ -42,6 +41,4 @@ ANDROID | `EGL`, `OpenGLES2.0`, `OpenSLES` | Code must be compiled using `Androi
RASPBERRY PI | `EGL`, `OpenGLES2.0`, `bcm_host` | Graphics run in native mode using `bcm_host` (no `XWindows` required) and inputs are also natively read (no `XWindows` input events), also requires linkage with `libm`(math), `pthreads`(POSIX threads) and `dl`(dynamic loading).
HTML5 (Web) | `WebGL` | Code must be compiled using `emscripten SDK`, dependencies linkage is automatically detected.
raylib design is [very modular](http://www.raylib.com/images/raylib_architecture.png). Some modules can be removed on compilation if they're not required and consequently the libraries used by those modules.
Some modules can also be used as standalone, *independently* of raylib: [rlgl](https://github.com/raysan5/raylib/blob/develop/examples/others/rlgl_standalone.c), [raudio](https://github.com/raysan5/raylib/blob/develop/examples/others/raudio_standalone.c).
raylib is [highly modular by design](https://github.com/raysan5/raylib/wiki/raylib-architecture). Many modules can be omitted when they are not being used, and consequently, the libraries used by those modules will also be redundant.

Loading…
取消
儲存