~ashn/raylib-sunder

Sunder bindings for raylib
Add instructions for checking out a target release
Add missing comma in README
Add notes for Pinebook Pro development

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~ashn/raylib-sunder
read/write
git@git.sr.ht:~ashn/raylib-sunder

You can also use your local clone with git send-email.

#raylib-sunder

Sunder bindings for raylib v4.5.0.

#Dependencies

#Debian/Ubuntu

Wiki entry.

$ sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev

#Arch/Manjaro

Wiki entry.

$ sudo pacman -S alsa-lib mesa libx11 libxrandr libxi libxcursor libxinerama

#Generating Bindings

Clone the raylib sources (wiki entry):

$ git clone https://github.com/raysan5/raylib.git raylib

Checkout the target release (in this case 4.5.0):

$ (cd raylib && git pull && git checkout 4.5.0)

Run the Sunder code generation script over the raylib API JSON:

$ (cd raylib/parser && make clean raylib_api.json FORMAT=JSON EXTENSION=json)
$ python3 generate.py raylib/parser/raylib_api.json > raylib.sunder

#Building the Example Program

For some C program (in this case examples/example.c) built with the commands:

$ (cd raylib/src && make PLATFORM=PLATFORM_DESKTOP)
$ clang -Iraylib/src -Lraylib/src -o example examples/example.c -lraylib -lGL -lm -lpthread -ldl -lrt -lX11

the equivalent Sunder program (in this case examples/example.sunder) would be built with:

$ (cd raylib/src/ && make PLATFORM=PLATFORM_DESKTOP)
$ SUNDER_BACKEND=C sunder-compile -o example -Lraylib/src -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 examples/example.sunder

#Additional Notes

When developing on the Pinebook Pro (or similar platforms), raylib may fail initialize the OpenGL context due to a GLXBadFBConfig error. If this occurs, set LIBGL_ALWAYS_SOFTWARE=true to force software rendering.

LIBGL_ALWAYS_SOFTWARE=true ./raylib-application

#License

All content in this repository is licensed under the Zero-Clause BSD license.

See LICENSE for more information.