[cl-opengl-devel] Minor style questions
Oliver Markovic
entrox at entrox.org
Mon Feb 20 20:25:27 UTC 2006
On 20.02.2006, at 23:04, Roger Sen Montero wrote:
> It's always the same trade off: try to create a closer to lisp API
> vs. not
> getting to far away from the original one so the new API is easy to
> understand.
The goal is having an OpenGL binding in Lisp, which doesn't require
people to think about C-ish things like having to pass pointers to
arrays
in order to get the current color.
> The guys at pyopengl did a mirror of OpenGL. I don't know what
> should you do in lisp-gl, but for my graphical library I decided to
> diverge from the SDL lib.
We don't really diverge and try to keep the mapping between the C
and Lisp names obvious. The macro in question is pure sugar and
doesn't have a C equivalent.
(defun draw-foo ()
(gl:with-primitives :quads
(gl:color 1 0 0)
(gl:vertex -1 -1 )
...
(gl:vertex 1 1)))
instead of
(defun draw-foo ()
(gl:begin :quads)
(gl:color 1 0 0)
(gl:vertex -1 -1)
...
(gl:vertex 1 1)
(gl:end))
--
Oliver Markovic
More information about the cl-opengl-devel
mailing list