Re: Low level C interaction (Specifically OpenGL)



I would say to understand the ffi before using UFFI/CFFI is probably a
good thing.
I did find that using foreign structures in CMUCL to be very slow and
went to using malloc and arranging things directly in memory for one
performance bottleneck that I had.

I'm not familiar with uffi/clrfi/whichever derivitive is most recent
except that they are a portable layer. I don't know if they handle
issues like LispWorks requiring any memory passed to a foreign function
has to be allocated in the static area.

Another thing to think about with CMUCL, that you ought to halt garbage
collection before changing your arrays to pointers and passing them to
the foreign function so that they don't get moved by the gc between the
time you converted them to pointers and the time you pass them to the
foreign function.

.