https://github.com/schell/reflex-sdl2
A minimal host for sdl2 based reflex apps.
https://github.com/schell/reflex-sdl2
Last synced: 10 months ago
JSON representation
A minimal host for sdl2 based reflex apps.
- Host: GitHub
- URL: https://github.com/schell/reflex-sdl2
- Owner: schell
- License: mit
- Created: 2017-08-21T01:16:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-01-29T18:19:49.000Z (almost 5 years ago)
- Last Synced: 2024-05-01T23:30:59.511Z (over 1 year ago)
- Language: Haskell
- Homepage:
- Size: 78.1 KB
- Stars: 26
- Watchers: 7
- Forks: 11
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# reflex-sdl2

This is a [reflex][2] host for [sdl2][0].
Writing and running [sdl2][0] apps requires version 2 of the awesome [SDL][1]
library.
## building
The first step is to install SDL.
### macOS
Using [homebrew](https://brew.sh/)...
brew install sdl2
### Ubuntu / Debian
The [sdl2 bindings][0] require SDL >= 2.0.4, or for special instructions
to be followed. Assuming you're on `Ubuntu >= 16.04`, you can run
apt-get install libsdl2-dev
otherwise please visit the org page above and install via their README.
### building with stack
After installing SDL, we can build with stack.
Using [stack][3] is the path of least resistance.
stack build
## examples
After building you can view an example using the built-in 2d renderer in
[app/Main.hs](https://github.com/schell/reflex-sdl2/blob/master/app/Main.hs).
To run the example do:
stack exec reflex-sdl2-exe
[0]: http://hackage.haskell.org/package/sdl2 "sdl2 haskell bindings"
[1]: http://libsdl.org "Simple Direct Media Layer"
[2]: https://github.com/reflex-frp/reflex "reflex frp"
[3]: https://docs.haskellstack.org/en/stable/README/ "the haskell tool stack"