Guile-SDL2 provides modules in the
(sdl2 ...) namespace, roughly organized how the SDL2 C header files are
organized. Low-level bindings are available in the
(sdl2 bindings ...) namespace, but these are not recommended for normal usage.
Additionally, SDL2 extension library bindings are available in the following modules:
Here is a short “hello, world” example program:
(use-modules (sdl2) (sdl2 render) (sdl2 surface) (sdl2 video)) (define (draw ren) (let* ((surface (load-bmp "hello.bmp")) (texture (surface->texture ren surface))) (clear-renderer ren) (render-copy ren texture) (present-renderer ren) (sleep 2))) (sdl-init) (call-with-window (make-window) (lambda (window) (call-with-renderer (make-renderer window) draw))) (sdl-quit)
Guile-SDL2 uses the standard GNU build system. To build and install Guile-SDL2 from source, run:
./configure make make install
Guile-SDL2 is developed using the Git version control system. The official repository is hosted at https://git.dthompson.us/guile-sdl2.git
git clone https://git.dthompson.us/guile-sdl2.git
Real-time discussion for Guile-SDL2 can be found on the
#guile channel on the Freenode IRC network.
Send patches and bug reports to email@example.com.