git clone 'https://github.com/lispgames/sdl2kit.git'
This is a utility kit for
cl-sdl2 that provides something similar to
GLUT. However, it's also geared at being useful for “real”
applications or games.
At the moment, this includes the following functionality:
For an example, see
To make a new window, you simply create a subclass of
GL-WINDOW, and implement the
WINDOW protocol. You should
primarily specialize on
window-event WINDOW TYPE TIMESTAMP DATA1 DATA2: Handle a WM event (see the SDL2 documentation for parameters)
mousebutton-event WINDOW STATE TIMESTAMP BUTTON X Y
mousemotion-event WINDOW TIMESTAMP X Y
textinput-event WINDOW TIMESTAMP TEXT
keyboard-event WINDOW STATE TIMESTAMP REPEAT-P KEYSYM
other-event WINDOW EVENT: Other events not implemented yet
close-window WINDOW: Close the window. If you add a method to this, the window will not be closed unless you
CALL-NEXT-METHOD. This may be useful!
INITIALIZE-INSTANCE requires you
or simply define your method as
:AFTER. (This is due to method ordering being most-specific-first.)
Of these, you should only call
CLOSE-WINDOW from user
code. However, these can be called from any thread safely.
By default, windows do not render continuously, but only when
is called, or when an expose event is received. You may do the
following to enable idle rendering:
(setf (idle-render WINDOW) t)
You may do this at any time, and also set it to
NIL to disable idle
Shader dictionary support in
sdl2kit is deprecated. This has
been moved to glkit.