Fixed name of opengl package. I thought this was committed already!
[cl-glfw/jecs.git] / README
blobaee7e8da1952a463b5ffb82d02781ce9f8761280
1 cl-glfw: The glfw wrapper for Common Lisp.
3 A public domain set of CFFI bindings and convenience macros for the GLFW, GLU and OpenGL
4 libraries.
6 The OpenGL bindings are automatically generated from the (supposedly) canonical spec-files from 
7 http://www.opengl.org/registry/
9 The GLU binding was hand-coerced from a tidied up header file, through swig, so it's pretty
10 much a direct mapping onto the API.
12 GLFW threading WILL PROBABLY BREAK YOUR LISP. I would advise seeking other avenues if you
13 require threading in your applications. The bindings remain in cl-glfw, but, I should emphasise
14 once again, that they probably are going to mess up things like garbage collection in your lisp,
15 and apparently some things to do with stacks and allocations aswell.
17 Check out the examples/ directory for more of a guide through.
20 NAME MANGLING STYLE
22 All function/constant names are 'lispified', that is dash-separated, instead of camel-case. 
23 Suffixes and acronyms are kept together as one word. Library prefixes are expressed as their
24 package. Constants are surrounded by the '+' characters as lisp convention dictates.
25 Some examples:
27 glfwOpenWindow -> glfw:open-window
28 glVertex3fv -> gl:vertex-3fv
29 gluBuild2DMipmaps -> glu:build-2d-mipmaps
30 GL_FOG_INDEX -> gl:+fog-index+
31 GL_LIGHT0 -> gl:+light-0+
33 Functions that take a predictable c-array input or return an output have automatic-translators
34 for lisp-sequences. However, this will require an extra allocation. cffi:pointer types will
35 be passed straight through. Eg. (gl:vertex-3fv #(1.0 0.0 1.0)) will work as expected.
38 Platforms tested on:
39     SBCL Linux x86
40     SBCL Linux amd64
41     SBCL Linux x86_64
42     Others: Let me know.
45 Links:
46     http://repo.or.cz/w/cl-glfw.git
47     http://glfw.sf.net/
48     http://common-lisp.net/project/cffi/
49     http://www.sbcl.org/
50     http://www.opengl.org/
53 Enjoy.
54 Bill
55 airbaggins@users.sourceforge.net