added details and updates to Raspberry Pi doc section

This commit is contained in:
ohsqueezy 2024-02-16 19:41:15 -05:00
parent 923c805fe5
commit 71ff65d588
1 changed files with 9 additions and 3 deletions

View File

@ -75,6 +75,8 @@ Exporting a browser build with [Emscripten][] and its built-in version of SDL ha
Raspberry Pi builds, like Android and Emscripten, require using OpenGL ES. The build process is similar to standard desktop Linux with the `-D __PI__` compiler flag used to activate some Pi-specific code in the framework. GLEW is not available for OpenGL ES, so GLES headers are included directly from the expected system directories.
The flag `-DGLEW_NO_GLU` may also be necessary since there may not be a `glu.h` file on Raspberry Pi installations. This flag can be used by default since GLU is deprecated.
#### SDL
SDL should be built with `--enable-video-kmsdrm`. This will require the installation of external packages. OpenGL ES will also need to be installed.
@ -85,9 +87,9 @@ Otherwise, SDL can be installed in the same way [described above](#libSDL2).
#### KMS
If using the Raspberry Pi without X-windows, SDL will run in KMS mode. The config for the latest versions of the Raspberry Pi OS Lite should be setup correctly by default, and the installation of SDL from source should enable KMS by default if the necessary packages above have been installed. However, it is good to verify that `/boot/config.txt` is setup correctly and that SDL is built with KMS video output enabled.
If using the Raspberry Pi without X-windows, SDL will run in KMS mode. The config for the latest versions of the Raspberry Pi OS Lite should be setup correctly by default, and the installation of SDL from source should enable KMS by default if the necessary packages above have been installed. However, it is good to verify that `/boot/firmware/config.txt` is setup correctly and that SDL is built with KMS video output enabled.
To verify `/boot/config.txt`, make sure the line `dtoverlay=vc4-kms-v3d` is included in the file. This activates KMS mode for the console instead of either Fake KMS or the older framebuffer modes.
To verify `/boot/firmware/config.txt`, make sure the line `dtoverlay=vc4-kms-v3d` is included in the file. This activates KMS mode for the console instead of either Fake KMS or the older framebuffer modes.
#### Build the `testgles2.c` SDL test
@ -290,7 +292,11 @@ Install MinGW. The simplest way to install is through the package manager. On De
apt install mingw-w64
See the Windows section of `demo/box/Makefile` for the necessary flags and build process.
Add `-DGLEW_STATIC` to compile the GLEW library into a [SPACE BOX] project using MinGW.
Add `-static-libgcc` and `-static-libstdc++` to the linker flags to compile GCC and C++ STD runtime DLLs into the executable instead of distributing the DLL file with the executable.
See the Windows section of `demo/box/Makefile` for a complete list of necessary flags and build process.
#### Cross compilation considerations