Skip to content

Common Lisp bindings for SDL2 using C2FFI.

Notifications You must be signed in to change notification settings

noname007/cl-sdl2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cl-sdl2

cl-sdl2 is a Common Lisp wrapper for the SDL 2.0 C Library, with many contributors, maintained primarily by the following:

It is licensed under the MIT license.

Installation

sdl2 is in Quicklisp, see below for instructions.

SDL 2.0 C Library Install

On Linux, you can probably find SDL2 in your distribution's package set. For other platforms, or for building manually, download the source.

If you need to compile from source for your Linux platform:

  1. Download the source tar-ball.
  2. tar zxf SDL2-0.0.0.tar.gz
  3. ./configure
  4. make
  5. sudo make install

This will install the SDL-2.0.3 C Library into your /usr/local location.

It's generally a good idea to install at a minimum the version of SDL2 that was wrapped; however, sub revisions should not introduce binary incompatibility and should be fine. If you install a different version, certain features may not be available or may not work correctly.

Quicklisp Install

sdl2 is best installed via QuickLisp, though for cutting-edge changes, you may want to install from github as below.

If you don't have Quicklisp, then follow the directions to install it. We assume you placed the Quicklisp repository in the default place as indicated by the directions and have added it to your lisp init file.

github install

  1. cd $HOME/quicklisp/local-projects
  2. git clone https://github.com/rpav/cl-autowrap.git
  3. git clone https://github.com/lispgames/cl-sdl2.git

Then, use quicklisp to install the libraries required by cl-sdl2:

Start your lisp. Then, just:

(ql:quickload "sdl2")

Running the sdl2 examples

Start your lisp:

(asdf:load-system :sdl2-examples)
(sdl2-examples:basic-test)

This example will open a window with an opengl primitive in it. Any mouse movements or keystrokes are recorded in the terminal (or emacs SLIME output buffer). Hitting the ESCAPE key will terminate the example.

Thank you for using sdl2!

About

Common Lisp bindings for SDL2 using C2FFI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Common Lisp 99.5%
  • Other 0.5%