Updated raylib arquitecture (markdown)

Ray
2016-07-17 17:44:35 +02:00
parent e9ba63bd6b
commit 0d7195f9f5

@ -13,7 +13,7 @@ raylib main modules are 7:
Those 7 modules share a common header: `raylib.h`, all user functions are defined in that header, despite the fact they are divided internally in 7 modules. That way, user just needs to include `raylib.h` to get all raylib functionality. Other libraries use multiple headers for every module or also headers that refer to other headers; I don't like that approach, I prefer to keep it simpler.
But there is more. In my design I also tried to keep modularity and independence between modules, so, there are some modules that can be used independently of raylib, as standalone libraries. Those modules are `rlgl` ([example](https://github.com/raysan5/raylib/blob/develop/examples/rlgl_standalone.c)) and `audio` ([example](https://github.com/raysan5/raylib/wiki/blob/develop/examples/audio_standalone.c)); since raylib 1.3, new standalone modules were also added to the library with some additional features: `camera`, `gestures` and `raygui`. Those modules can also be used as standalone (like `rlgl` and `audio`), so the available equivalent headers for the user... despite the fact that `camera`and `gestures` are currently included in `raylib.h`.
But there is more. In my design I also tried to keep modularity and independence between modules, so, there are some modules that can be used independently of raylib, as standalone libraries. Those modules are `rlgl` ([example](https://github.com/raysan5/raylib/blob/develop/examples/rlgl_standalone.c)) and `audio` ([example](https://github.com/raysan5/raylib/blob/develop/examples/audio_standalone.c)); since raylib 1.3, new standalone modules were also added to the library with some additional features: `camera`, `gestures` and `raygui`. Those modules can also be used as standalone (like `rlgl` and `audio`), so the available equivalent headers for the user... despite the fact that `camera`and `gestures` are currently included in `raylib.h`.
But there is more. Some modules are defined as header-only files, like the well-known [stb libraries](https://github.com/nothings/stb). Being header-only means that header also contains the functions implementation; that's extremely useful in case you have a library (a bunch of functions) that you only want to drop on your code-base to cover a very specific functionality. Actually, raylib uses internally some [of those libraries](https://github.com/raysan5/raylib/tree/develop/src/external). Similar to stb libraries, raylib defines some modules in the same way: `raymath`, `physac`, `raygui` and `easings`. Right now only `raymath` is used internally by raylib, the other three are provided to the user.