update docs

This commit is contained in:
Richard Smith 2024-07-02 15:43:33 +01:00
parent 57da96d576
commit 7af2922eb3
7 changed files with 48 additions and 45 deletions

View file

@ -37,7 +37,7 @@ Then install
python3 -m pip install setuptools
python3 -m pip install raylib
On most platforms it should install a binary wheel (Windows 10 x64, MacOS 10.15 x64, Linux Ubuntu1804 x64).
On most platforms it should install a binary wheel (Windows 10 x64, MacOS 12 x64/arm64, Linux Ubuntu2004 x64/arm64).
If yours isn't available then pip will attempt to build from source, in which case you will need to have Raylib development libs installed, e.g.
using homebrew, apt, etc.
@ -158,7 +158,7 @@ If you need more performance, do in this order:
in your update loop
and then only convert them to C data structures when you have to call the C functions for drawing.
3. The raylib.* functions are potentially 1.5x faster than the pyray.* equivalents, so if you need a tiny bit more performance
3. The raylib.* functions are potentially *slightly* faster than the pyray.* equivalents, so if you need a tiny bit more performance
you can switch your inner loop functions to these.
4. There is a version of Python that is faster than Pypy: GraalPy. However it's not fully compatible with all Python

View file

@ -1,7 +1,7 @@
Raspberry Pi
====================
Please use Raspberry Pi OS Bullseye. Older OSes are not tested.
Please use Raspberry Pi OS Bookworm. Bullseye should also work. Older OSes are not tested.
Option 1: Binary wheel
----------------------
@ -10,7 +10,7 @@ We have published binary wheels compiled for 64-bit Raspberry OS Bullseye in X11
::
python -m pip install raylib
python -m pip install --break-system-packages raylib
If it doesn't work, or you're not on Bullseye, or you're 32 bit, or if you want to use Raylib in ``PLATFORM_DRM`` mode, you will need to compile your own raylib. See below.
For full instructions on this, see https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi . If you need help with this ask Raylib.
@ -22,6 +22,8 @@ This should work for everyone.
::
sudo apt update
sudo python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev libglfw3-dev
git clone https://github.com/raysan5/raylib.git --branch 5.0 --single-branch
cd raylib
mkdir build
@ -30,24 +32,24 @@ This should work for everyone.
cmake -DPLATFORM="Desktop" -DOPENGL_VERSION=2.1 -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install
sudo cp -r ../src/external/glfw/include/GLFW /usr/local/include/
Then have pip compile and install the wheel:
::
sudo apt update
sudo apt install python3-pip
pip3 install setuptools
pip3 install --no-cache-dir --no-binary raylib --upgrade --force-reinstall raylib==5.0.0.2
python -m pip install --break-system-packages setuptools
python -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3
Option 3: Compile Raylib from source DRM mode
---------------------------------------------
As far as I can tell, Raylib DRM is broken. It doesn't work on my Pi. However, if you want to compile it and
give it a go, these are the commands:
This seems to work on Raspberry Pi 4. Note you must not be running X11 when you run your programs.
::
sudo apt update
sudo python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev libglfw3-dev
git clone https://github.com/raysan5/raylib.git --branch 5.0 --single-branch
cd raylib
mkdir build
@ -56,15 +58,14 @@ give it a go, these are the commands:
cmake -DPLATFORM="DRM" -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install
sudo cp -r ../src/external/glfw/include/GLFW /usr/local/include/
Then have pip compile and install the wheel with some extra linker flags:
::
sudo apt update
sudo apt install python3-pip
pip3 install setuptools
LDFLAGS="-lgbm -ldrm -lEGL" pip3 install --no-cache-dir --no-binary raylib --upgrade --force-reinstall raylib==5.0.0.2
python -m pip install --break-system-packages setuptools
LDFLAGS="-lgbm -ldrm -lEGL" pip3 install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3