Cheers, good to know. OK going back and reading the code again, this all seems to boil down to the fact that some implementations of opengl are missing functions, which of course makes sense as there is plenty of difference between v2 and v4 (or gles etc)
Does the resulting lisp program take a performance hit from having such a late compile?
It's a heck of an interesting problem, I hadn't really thought about how cl-opengl handled versions before. It's a pretty cool solution! Are there any features around this area that that need implementing or improvements to code that are needed? My main part time project totally relies on cl-opengl so it would be nice to give a little back!
Thanks again for the help


On 16 October 2013 14:56, Bart Botta <00003b@gmail.com> wrote:
On Wed, Oct 16, 2013 at 6:45 AM, Chris Bagley <chris.bagley@gmail.com> wrote:
> Or is it that once the lambda is compiled, it replaces the version with
> generate-gl-function in it? Does that mean that the wrapper functions are
> compiled on first call?

Right, the call to COMPILE replaces the function with the result of
compiling the LAMBDA, so a specialized wrapper is compiled when it is
called. If I remember correctly, there is also a commented out version
that uses a closure instead, if runtime compilation is a problem.