Browse files


  • Loading branch information...
1 parent f7770aa commit 73dedb256b0a0156de48dc2903e49a002ee76856 @fred-o committed Nov 23, 2010
Showing with 39 additions and 0 deletions.
  1. +39 −0
@@ -0,0 +1,39 @@
+CLIPMUNK provides Common Lisp [CFFI][cffi] bindings for the
+[Chipmunk Physics][chipmunk] library. It began as a fork of
+[Ralith's cl-chipmunk][cl-chipmunk] library, but after a while I got
+tired of writing the `defcfun`s by hand and switched to using
+[SWIG][swig] to generate the bindings automatically.
+Some of the functions in the [Chipmunk API][api] depend on getting
+struct arguments passed by value, but this is not possible with
+[CFFI][cffi]. There is a workaround for this, however: we can pass
+each element in the struct as a separate argument to the function, as
+long as they are passed in the correct order. Since the most
+frequently used struct (`cpVect`) is a fairly simple one, consisting
+of just two double floats, it is quite easy to adjust the generated
+bindings to accomodate this.
+This approach seems to work nicely, at least on x86-based platforms.
+CLIPMUNK is being developed and tested on SBCL running on Linux and

0 comments on commit 73dedb2

Please sign in to comment.