This is the sdl2 Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 04:01:19 2022 GMT+0.
It is licensed under the MIT license.
sdl2 is in Quicklisp, see below for instructions.
On Linux, you can probably find SDL2 in your distribution's package set. For other platforms, or for building manually, download the source.
sudo apt-get install libsdl2-2.0
sudo pacman -S sdl2
If you need to compile from source for your Linux platform:
cd /tmp wget https://www.libsdl.org/release/SDL2-2.0.4.tar.gz tar -xzvf SDL2-2.?.?.tar.gz cd SDL2-2.?.? ./configure make sudo make install
This will install the SDL-2.0.x 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.
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.
cd $HOME/quicklisp/local-projects git clone https://github.com/rpav/cl-autowrap.git 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:
sdl2 enables certain restarts for friendly interaction with SLIME or
Sly if you have either properly installed. "Proper installation" in
this case means
slynk.asd is linked such that ASDF
can find and load it.
Note this is easily achieved even if you have installed them from github or some other non-Quicklisp repository:
Similarly you could just clone into
well; this should work on Windows as well. There are numerous other
options for configuring and managing ASDs, as well.
Start your lisp:
(ql:quickload :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
*inferior-lisp*). Hitting the ESCAPE key will terminate the example.
Newer versions of OSX have had some difficulties as calls which require
nextEventMatchingMask must be called from the main thread of your program.
This is especially relevant to SBCL, although issues have also been noticed in CCL.
Currently, initialisation must take place on your main thread:
(ql:quickload :sdl2/examples) ;; We should be able to run examples as normal on CCL #-sbcl (sdl2-examples:basic-test) ;; SBCL requires that we initialise in the main thread #+sbcl (sdl2:make-this-thread-main #'sdl2-examples:basic-test)
Thank you for using sdl2!
The main system appears first, followed by any subsystem dependency.
Bindings for SDL2 using c2ffi.
Michael Fiano <email@example.com>
Modules are listed depth-first from the system components tree.
Files are sorted by type and then listed depth-first from the systems components trees.
*hints* (special variable).
Next: sdl2/autowrap-spec/SDL2.aarch64-unknown-linux-android.spec, Previous: sdl2/autowrap-spec/SDL2.h, Up: Static [Contents][Index]
Packages are listed by definition order.
Definitions are sorted by export status, category, package, and then by lexicographic order.