[cl-opengl-devel] cl-glfw 0.3 with cl-opengl interoperability
William Robinson
airbaggins at gmail.com
Fri Jan 11 17:30:02 UTC 2008
Luís Oliveira wrote:
> In what ways does cl-glfw-opengl differ from cl-opengl?
Well, it's more in-line with the cl-sdl style of opengl binding. As,
initially I wrote my own OpenGL bindings because I was having
difficulties with cl-sdl and lispbuilder on Mac OS X (and was generally
averse to GLUT).
So the main differences are:
* You specify the function's “command suffix”, eg. (gl:color-3f 0 0.5 1)
instead of just (gl:color 0 0.5 1),
* The GL“enum” constants aren't defined in one large cffi defcenum, but
they are just defined as constants, eg. use (gl:clear
gl:+color-buffer-bit+) instead of (gl:clear :color-buffer-bit).
* All of the OpenGL API and extensions are automatically generated from
opengl.org's spec files. Though I have learned (after I wrote the
generators) that there is a branch of cl-opengl with more dynamically
generated stuff from spec files.
* Each registered extension is a separate asd file (this includes the
OpenGL and GLU versions, as well)
* Instead of focusing on too many individual cases of lispification, I
have striven to make (where possible according to the spec files) Lisp
sequences transparent as OpenGL functions' array-pointer parameters
(though this does require some extra allocation. of course).
On the whole, I'd say the main difference is that cl-glfw-opengl is more
OpenGLy and cl-opengl is more Lispy in style.
Ciao
bill, who forgot to CC the list first time.
More information about the cl-opengl-devel
mailing list