-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Working on Raspberry Pi
To build your raylib game for Raspberry Pi you need to download raylib git repository (develop branch recommended) and install some dependencies. raylib already comes with ready-to-use makefiles to compile source code and examples.
Currently ALL Raspberry Pi devices are supported by raylib (1, 2, 3, Zero and variants). OS supported is Raspbian Stretch.
- OpenGL ES 2.0 in native mode, not X11 (any RPI version with the legacy driver)
- OpenGL 1.1 on X11 desktop mode, (only RPI 2 and 3)
- OpenGL 2.1 on X11 desktop mode, (only RPI 2 and 3)
More detailed information is available on the raylib platforms and graphics wiki page.
All required libraries come with the system, no additional dependencies are required.
Before compiling your game, raylib library must be recompiled for Raspbian. To do that, just navigate to raylib\src\
directory and run one of the following options depending on your needs:
- To use OpenGL ES 2.0 in native mode (no X11):
make PLATFORM=PLATFORM_RPI
- To use desktop OpenGL 1.1 or 2.1 (X11 window)
make PLATFORM=PLATFORM_DESKTOP GRAPHICS=GRAPHICS_API_OPENGL_21
Just move to folder raylib/examples/
and run ONE of THOSE TWO OPTIONS (depending on target OpenGL version):
- To use OpenGL ES 2.0 in native mode (no X11):
make PLATFORM=PLATFORM_RPI
- To use desktop OpenGL 1.1 or 2.1 (X11 window)
make PLATFORM=PLATFORM_DESKTOP GRAPHICS=GRAPHICS_API_OPENGL_21
To compile just one specific example:
- To use OpenGL ES 2.0 in native mode (no X11):
make core/core_basic_window PLATFORM=PLATFORM_RPI
- To use desktop OpenGL 1.1 or 2.1 (X11 window)
make core/core_basic_window PLATFORM=PLATFORM_DESKTOP GRAPHICS=GRAPHICS_API_OPENGL_21
www.raylib.com | itch.io | GitHub | Discord | YouTube
- Architecture
- Syntax analysis
- Data structures
- Enumerated types
- External dependencies
- GLFW dependency
- libc dependency
- Platforms and graphics
- Input system
- Default shader
- Custom shaders
- Coding conventions
- Integration with other libs
- Working on Windows
- Working on macOS
- Working on GNU Linux
- Working on Chrome OS
- Working on FreeBSD
- Working on Raspberry Pi
- Working for Android
- Working for Web (HTML5)
- Working on exaequOS Web Computer
- Creating Discord Activities
- Working anywhere with CMake
- CMake Build Options
- raylib templates: Get started easily
- How To: Quick C/C++ Setup in Visual Studio 2022, GCC or MinGW
- How To: C# Visual Studio Setup
- How To: VSCode
- How To: Eclipse
- How To: Sublime Text
- How To: Code::Blocks