sdl2kit

https://github.com/lispgames/sdl2kit.git

git clone 'https://github.com/lispgames/sdl2kit.git'

(ql:quickload :sdl2kit)
12

sdl2.kit

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 examples/sdl2kit.lisp.

Windows

To make a new window, you simply create a subclass of WINDOW or GL-WINDOW, and implement the WINDOW protocol. You should primarily specialize on WINDOW:

NOTE: INITIALIZE-INSTANCE requires you CALL-NEXT-METHOD first, or simply define your method as :AFTER. (This is due to method ordering being most-specific-first.)

Of these, you should only call RENDER or CLOSE-WINDOW from user code. However, these can be called from any thread safely.

By default, windows do not render continuously, but only when RENDER 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 rendering.

Shaders

Shader dictionary support in sdl2kit is deprecated. This has been moved to glkit.