Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/colinbellino/sokol-jai
Jai bindings for the sokol headers (https://github.com/floooh/sokol)
https://github.com/colinbellino/sokol-jai
Last synced: 1 day ago
JSON representation
Jai bindings for the sokol headers (https://github.com/floooh/sokol)
- Host: GitHub
- URL: https://github.com/colinbellino/sokol-jai
- Owner: colinbellino
- Created: 2024-05-28T22:06:39.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-10-23T17:47:31.000Z (23 days ago)
- Last Synced: 2024-10-24T01:56:29.079Z (22 days ago)
- Language: C
- Homepage:
- Size: 1.75 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
Auto-generated Jai bindings for the [sokol headers](https://github.com/floooh/sokol).
To include sokol in your project you can copy the [sokol](sokol/) directory.
## BUILD
Supported platforms are: Windows, macOS, Linux (with X11)
On Linux install the following packages: libglu1-mesa-dev, mesa-common-dev, xorg-dev, libasound-dev
(or generally: the dev packages required for X11, GL and ALSA development)1. First build the required static link libraries:
```bash
cd sokol
# on macOS:
./build_clibs_macos.sh
# on Linux:
./build_clibs_linux.sh
# on Windows with MSVC (from a 'Visual Studio Developer Command Prompt')
build_clibs_windows.cmd
cd ..
```2. Create a build directory and cd into it:
```bash
mkdir build
cd build
```3. Build and run the samples:
```bash
jai ../examples/first.jai - clear
jai ../examples/first.jai - triangle
jai ../examples/first.jai - offscreen
jai ../examples/first.jai - blend
jai ../examples/first.jai - debugtext-print
jai ../examples/first.jai - saudio
jai ../examples/first.jai - fontstash-sapp
jai ../examples/first.jai - sgl-context-sapp
```By default, the backend 3D API will be selected based on the target platform:
- macOS: Metal
- Windows: D3D11
- Linux: GLTo force the GL backend on macOS or Windows, build with ```-GL```:
```
jai ../examples/first.jai - clear -GL
```The ```clear``` sample prints the selected backend to the terminal:
```
jai ../examples/first.jai - clear -GL
>> using GL backend
```