The goal is to provide simple OpenGL window and context manipulation code as well as system input handling (i.e. mouse & keyboard).

Direct FFI bindings to system functions are used so no third party C lib is required except system libraries.


Tested CL implementations/platforms

Running the tests

Make sure glop.asd and glop-test.asd are in a location known to asdf and run:

(asdf:operate 'asdf:load-op :glop-test)

Then you can run an hello world test with:


Available tests are:

In all tests except test-manual-events you can press the following keys:

Quick start

To use glop, make sure glop.asd is in a location known to asdf and run:

(asdf:operate 'asdf:load-op :glop)

Now you can just do:

(glop:with-window (win "My title" 800 600)
    ;; gl init code here
    (loop while (glop:dispatch-events win :blocking nil) do
       ;; gl code here
       (glop:swap-buffers win)))

The glop:dispatch-events macro will take care of processing glop events and call corresponding methods. Generic functions for these methods are:

None of them have a default definition, so you should implement all these methods in you application.

There's another method based dispatch mechanism with the on-event generic function. To use it just pass :on-foo nil to glop:dispatch-events. In that case the (on-event window event) method will be called instead of on-foo methods.

The glop:dispatch-events macro isn't mandatory and you can use your own event dispatch code, see glop-test:test-manual-events for an example of how to do this.

See test.lisp for more details.


The win32 implementation is not as complete as the X11 one, major missing features are: - no OpenGL 3.x

See also issues on github.