Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/msteele/mojo-sdl
Minimal SDL2 binding for Mojo🔥
https://github.com/msteele/mojo-sdl
Last synced: about 2 months ago
JSON representation
Minimal SDL2 binding for Mojo🔥
- Host: GitHub
- URL: https://github.com/msteele/mojo-sdl
- Owner: msteele
- License: apache-2.0
- Created: 2023-12-01T22:53:43.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-14T22:42:00.000Z (10 months ago)
- Last Synced: 2024-03-14T23:44:02.571Z (10 months ago)
- Language: Mojo
- Size: 11.7 KB
- Stars: 14
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mojo - mojo-sdl - Minimal SDL2 binding for Mojo🔥. (🗂️ Libraries / 2D/3D Graphics)
README
# Minimal SDL binding for Mojo 🔥
Very basic native Mojo bindings to SDL2. No Python is used at runtime.
A Python script to generate different colormaps for the demo is included.## Usage
Requires SDL installed:
#### Ubuntu
```bash
apt install libsdl2-dev
```
#### Fedora
```bash
dnf install sdl2-devel
```
#### Mac OS
```bash
brew install sdl2
```Copy `SDL.mojo` to your project or try the Mandelbrot demo ported from [Mojo examples](https://github.com/modularml/mojo/tree/main/examples/mandelbrot.mojo)
## Demo
Run
```bash
mojo mandelbrot.mojo
```
and zoom in/out with the mouse wheel.