Fixed package name
[cl-glfw.git] / README
blobcb49e60a20c73c9f2b708ec8106ebb4c4241a935
1 Top-level ASDF packages:
3  * cl-glfw - GLFW bindings for Common Lisp.
4  * cl-glfw-opengl - OpenGL bindings for Common Lisp.
5  * cl-glfw-glu - OpenGL Utilities bindings for Common Lisp.
7 ABOUT
9 A public domain set of CFFI bindings and convenience macros for the GLFW, GLU
10 and OpenGL libraries.
12 The OpenGL bindings are automatically generated from the (supposedly) canonical
13 spec-files from http://www.opengl.org/registry/
15 The GLU binding was hand-coerced from a tidied up header file, through swig, so
16 it's pretty much a direct mapping onto the API.
18 Check out the examples/ directory for more of a guide through.
20 You should be able to use cl-glfw, cl-glfw-opengl and cl-glfw-glu independently
21 of each other. That is, using cl-glfw with cl-opengl, or cl-opengl's glut with
22 cl-glfw-opengl, should work fine.
25 THREADING
27 GLFW threading WILL PROBABLY BREAK YOUR LISP. I would advise seeking other
28 avenues if you require threading in your applications. The bindings remain in
29 cl-glfw, but, I should emphasise once again, that they probably are going to
30 mess up things like garbage collection in your lisp, and apparently some things
31 to do with stacks and allocations aswell.
34 NAME MANGLING STYLE
36 All function/constant names are 'lispified', that is dash-separated, instead of
37 camel-case.  Suffixes and acronyms are kept together as one word. Library
38 prefixes are expressed as their package. Constants are surrounded by the '+'
39 characters as lisp convention dictates.  Some examples:
41 glfwOpenWindow -> glfw:open-window
42 glVertex3fv -> gl:vertex-3fv
43 gluBuild2DMipmaps -> glu:build-2d-mipmaps
44 GL_FOG_INDEX -> gl:+fog-index+
45 GL_LIGHT0 -> gl:+light-0+
48 TYPE CONVERSION
50 Functions that take a predictable c-array input or return an output have
51 automatic-translators for lisp-sequences (array and vectors). However, this
52 will require an extra allocation. cffi:pointer types will be passed straight
53 through. Eg. (gl:vertex-3fv #(1.0 0.0 1.0)) will work as expected.
55 All function parameters of types (warning: not in GLU yet) GLfloat or GLdouble
56 are automatically wrapped in an appropriate coerce. All integer types are
57 expected to be acceptable to CFFI. 
60 PLATFORMS
61     SBCL Linux x86
62     SBCL Linux amd64
63     SBCL Linux x86_64
64     Others: Let me know.
67 LINKS
69     http://repo.or.cz/w/cl-glfw.git - The working online git repository
70     http://glfw.sf.net/ - The homepage for GLFW
71     http://common-lisp.net/project/cffi/ - Dependency library CFFI's homepage
72     http://www.sbcl.org/ - Our favoured implementation of Common Lisp
73     http://www.opengl.org/ - OpenGL 3D graphics library API
76 ALTERNATIVES
78     http://common-lisp.net/project/cl-opengl/ - Alternative set of OpenGL (with GLUT) bindings
79     http://cl-sdl.sf.net/ - Seemingly abandoned SDL and OpenGL bindings
82 Enjoy.
83 Bill
84 airbaggins@users.sourceforge.net