On Wed, Sep 10, 2008 at 6:55 AM, Sebastian Berchtold <[EMAIL PROTECTED]> wrote: > This leads me to the following questions: > Whats the difference between the "%gl:" und the "gl" package? it spent some > time on it but didnt get it
%gl: is for the C level bindings, which take exactly the arguments the C functions take, so you need to pass C pointers where expected instead of lisp data structures, and uses specific data types, etc. %gl is mostly autogenerated, so has everything C has. gl: is the lisp side of the API, which uses lisp data structures, and handles (some) data type translations for you, etc. but is hand written, so less complete. %gl is mainly for implementing the gl package, but is also available for implementing higher level abstractions when going through gl would be inefficient. > Does anybody know how to fix that?^^ implement gl:vertex-pointer, or allocate a C array using cffi, store the vertices in it, and pass that to %gl:vertex-pointer (make sure to deal with memory management, etc. properly by hand in that case, since GC can't deal with it for you) > Does this example run on somebody elses machine? Probably not, which is probably why it isn't loaded by default :) Those APIs are sort of hard to wrap nicely, since they may need to keep pointers around, and that sort of thing, so they aren't quite done yet. I think there is an example of the current code for that in examples/misc/opengl-array.lisp. -- b _______________________________________________ cl-opengl-devel mailing list cl-opengl-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/cl-opengl-devel