Skip to content

raylib dependencies

Ray edited this page Aug 11, 2021 · 37 revisions

The following table lists the raylib dependencies. Most of them are single-file header-only public-domain libraries. All those libraries are included with raylib in src/external directory and they are compiled with raylib.

NOTE: Last updated on 14th April 2021 for the raylib 3.7 release.

Library Version License raylib module Notes/Comments
GLFW3 3.4-master zlib/libpng rglfw Window and input management, only on PLATFORM_DESKTOP
GLAD 0.1.10a0 WTFPL/CC0/public domain rlgl OpenGL extensions loading, only on PLATFORM_DESKTOP and OpenGL 3.3
sdefl.h 1.00 MIT/public domain core DEFLATE compression algorithm
sinfl.h 1.00 MIT/public domain core DEFLATE decompression algorithm
stb_image 2.26 MIT/public domain textures Multiple image formats loading
stb_image_resize 0.96 MIT/public domain textures Image resizing functions
stb_image_write 1.15 MIT/public domain textures Image writing to multiple formats
stb_perlin 0.5 MIT/public domain textures Perlin noise generator
stb_truetype 1.24 MIT/public domain text TTF/OTF fonts data loading
stb_rect_pack 1.00 MIT/public domain text Rectangles packer, used on font packing
msf_gif 2.1 MIT/public domain core GIF recording basic functionality
miniaudio 0.10.33 MIT/public domain raudio Audio device management
stb_vorbis 1.14 (fork) MIT/public domain raudio OGG audio data loading, using stb_vorbis fork
dr_wav 0.12.29 MIT/public domain raudio WAV audio data loading
dr_mp3 0.6.27 MIT/public domain raudio MP3 audio data loading
dr_flac 0.12.29 MIT/public domain raudio FLAC audio data loading
jar_mod 0.01 public domain raudio MOD audio module loading, based on HxCModPlayer
jar_xm 0.3.1 public domain raudio XM audio module loading, based on libxm
par_shapes - MIT models Geometric shapes generation
tinyobj_loader_c ? (Ray) MIT models OBJ/MTL data loading
cgltf 1.10 MIT models glTF models data loading
  • NOTE 1: Most of these libraries are only used to load some specific file format (image, font, audio, model).
  • NOTE 2: Some of the dependencies are specific to only one of the platforms that raylib supports or even to some specific compiler (i.e. dirent).
  • NOTE 3: All the libraries licenses should allow raylib to be used on commercial projects without problem.

Platform specific dependency notes

  • PLATFORM_DESKTOP: raylib uses on core module the outstanding GLFW3 library, embedded in the form of rglfw. For more details on GLFW usage, check GLFW dependency Wiki page.

  • PLATFORM_ANDROID: raylib uses on core module the native_app_glue library (provided by Android NDK). Also, native Android libraries are used to manage window/context, inputs and activity life cycle.

  • PLATFORM_RPI (RPI 0,1,2,3 - native): raylib uses on core module the native VideoCore library and EGL for window/context management. Inputs are processed using directly evdev Linux libraries.

  • PLATFORM_DRM (RPI 4 - native): raylib uses on core module the native DRM subsystem and GBM API libraries for window/context management. Inputs are processed using evdev Linux libraries.

  • PLATFORM_WEB (HTML5): raylib uses on core module the emscripten SDK provided libraries for several input events management, specially noticeable the touch events support.

There are also some platform-specific system libraries that do need to be linked when compiling raylib examples. The following table lists the required system libraries.

PLATFORM platform dependencies Notes
PLATFORM_DESKTOP:Windows OpenGL, GDI32, WinMM, user32, kernel32 Required for window creation. Note that WinMM is only used to get a hi-res timer and it can be avoided commenting SUPPORT_WINMM_HIGHRES_TIMER config flag.
PLATFORM_DESKTOP:Linux OpenGL, X11 Also requires linkage with libm(math), pthreads(POSIX threads), dl(dynamic loading), rt (realtime extensions: nanosleep()) and X11 specific libs: X11, Xrandr, Xinerama, Xi, Xxf86vm and Xcursor
PLATFORM_DESKTOP:FreeBSD OpenGL, X11 Also requires linkage with libm(math), pthreads(POSIX threads), dl(dynamic loading), rt (realtime extensions: nanosleep()) and X11 window system specific libs: X11, Xrandr, Xinerama, Xi, Xxf86vm and Xcursor
PLATFORM_DESKTOP:macOS OpenGL, Cocoa, IOKit, CoreAudio, CoreVideo Required for window creation
PLATFORM_ANDROID EGL, OpenGLES2.0, OpenSLES Code must be compiled using Android NDK libraries. Requires linkage with native_app_glue, log, android, atomic, libc, libm(math) and dl(dynamic loading)
PLATFORM_RPI 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), rt (realtime extensions: nanosleep()) and dl(dynamic loading).
PLATFORM_DRM EGL, OpenGLES2.0, DRM, GBM Graphics run in native mode using DRM (no XWindows required) and inputs are also natively read (no XWindows input events), also requires linkage with libm(math), pthreads(POSIX threads), rt (realtime extensions: nanosleep()) and dl(dynamic loading).
PLATFORM_WEB (HTML5) WebGL Code must be compiled using emscripten SDK, dependencies linkage is automatically detected.

raylib is highly modular by design. Many modules can be omitted when they are not being used, and consequently, the libraries used by those modules will also be redundant.

Clone this wiki locally