This is an interface to SDL 2 for the Chez Scheme system. (in development)
(import (sdl))
(sdl-init SDL-INIT-VIDEO)
(define win
(sdl-create-window "chezscheme"
SDL-WINDOWPOS-UNDEFINED
SDL-WINDOWPOS-UNDEFINED
640
480))
(define (event-loop)
(sdl-poll-event)
(cond
((sdl-event-none?) (event-loop))
((sdl-event-quit?) '())
(else
(event-loop))))
(event-loop)
(sdl-destroy-window win)
(sdl-quit)
- Scheme style interface to SDL 2
- Minimal overhead wrapping
- Full marshalling of Scheme data to C data
- Lower level ftype interface provided
- Developer friendly documentation
-
Install the Chez Scheme system and the SDL2 development library.
-
Install Chez-SDL where the Chez Scheme system can find it.
export CHEZSCHEMELIBDIRS="/path/to/chez-sdl/lib:$CHEZSCHEMELIBDIRS"
- Start running the demos.
scheme --script ./events.ss
- Read the documentation.