~ashn/raylib-sunder

Sunder bindings for raylib
Separate web install into an install-web target
Update for the Sunder alias->type keyword change
Install raylib.h to the raylib install directory

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.

#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

#Build and Install

Build the raylib.sunder bindings as well as the PLATFORM=PLATFORM_DESKTOP library (libraylib.a) and the PLATFORM=PLATFORM_WEB library (libraylib-web.a):

$ make

Install the raylib.sunder bindings, libraylib*.a libraries, and the raylib-config utility to $(SUNDER_HOME)/lib/raylib:

$ make install

#Building the Example Program (Linux)

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

$ cc -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:

$ sunder-compile -o example $(${SUNDER_HOME}/lib/raylib/raylib-config desktop --libs) examples/example.sunder

#Building the Example Program (HTML 5)

Compiling for the web (HTML 5) requires the Emscripten toolchain (wiki entry). The example shown here is built with Emscripten's ASYNCIFY enabled.

$ SUNDER_ARCH=wasm32 SUNDER_HOST=emscripten SUNDER_CC=emcc SUNDER_CFLAGS="$(${SUNDER_HOME}/lib/raylib/raylib-config web --cflags) -sSINGLE_FILE=1 --shell-file emscripten-shell.html" sunder-compile -o example.html $(${SUNDER_HOME}/lib/raylib/raylib-config web --libs) examples/example.sunder

#Additional Notes

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

$ LIBGL_ALWAYS_SOFTWARE=true ./raylib-application

Alternatively, build with RAYLIB_MAKEFLAGS='GRAPHICS=GRAPHICS_API_OPENGL_ES2' to use OpenGL ES2 for both desktop and web builds.

$ make all RAYLIB_MAKEFLAGS='GRAPHICS=GRAPHICS_API_OPENGL_ES2'

#License

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

See LICENSE for more information.