I am sure the thing that stopped me was not being able to call NSApplicationInit()... I did manage to get something going but it kept dropping out with an error, which, on looking it up said I had to call NSApplicationInit() but my CFFI experience is limited and I couldn't work out how to do it.

I looked at Verrazano as well but in the end time pressures made me go for X11. It just worked, I had to make a small change to get it to work on an intel mac though if I remember I just modded the library.lisp file a bit. My finally chaotic glut def looks like:

(define-foreign-library glut
  ;;-- (sjc-03-jul-06) -- added this line to ensure my locally built
  ;;-- OpenGLUT library is loaded as the "glut" library!
  ;;
  ;; (1) /usr/local/lib/libopenglut.dylib  => my build from OpenGLUT source package.
  ;; (2) /sw/lib/libglut.dylib => FINK installation of 3.7-1025
  ;;
  ;; Q. Which one is 'better' to use, if any ?!
  ;;    (1) because (2) doesn't have glutLeaveMainLoop etc !!!
  ;;
  ;((:and :darwin :x86) "/sw/lib/libglut.dylib")
  ((:and :darwin :x86) "/usr/local/lib/libopenglut.dylib")
  ;((:and :darwin :x86) (:framework "GLUT"))
  ;(:darwin (:or "libglut.dylib" "libglut.3.dylib" #-(and)(:framework "GLUT")))
  (:windows "freeglut.dll") ; XXX: is this right?
  (:unix (:or "libglut.so" "libglut.so.3")))

which, removing the chaff leaves this, I added the :x86 to make it intel friendly!

(define-foreign-library glut
  ((:and :darwin :x86) "/usr/local/lib/libopenglut.dylib")
  (:windows "freeglut.dll") ; XXX: is this right?
  (:unix (:or "libglut.so" "libglut.so.3")))



On 17 Mar 2007, at 00:11, sathya gnanasekaran wrote:

Yeah, it annoys me a lot. I'll check if anyone has any prior work done in that direction first, but if not, I'll look into it. The problem is I have little cocoa/carbon experience. Time to learn I guess.

On 3/16/07, Luís Oliveira <luismbo@gmail.com> wrote:
On 16/03/07, sathya gnanasekaran <thekingoftruth@gmail.com> wrote:
> I use cl-opengl on OSX to play with opengl in lisp. I use it by
> changing the library from freeglut to apple's cocoa-based glut
> framework. (Although I'm sure I could use apple's X11 + freeglut, X
> has given be trouble.)

That GLUT will call exit() (and kill your Lisp) very often, doesn't
that annoy you? Hey, you could port freeglut to Cocoa (or is it
Carbon?), that'd be nice. :-)

--
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/

_______________________________________________
cl-opengl-devel mailing list
cl-opengl-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cl-opengl-devel