The window close is absolutely crucial for development, otherwise
GLUT
will call exit() and kill your Lisp session.
Apple GLUT has similar functions to freeglut (as i discovered online with a bit of searching).
There is glutWMCloseFunc to avoid killing the lisp when a window is closed and glutCheckLoop to avoid the non-returning glut main loop. With these two functions available there should be no reason for one to use freeglut on OSX and require X11.
I think it'd be more worthwhile to port FreeGLUT (or one of the other GLUT clones) to Cocoa but I have no idea how feasible that would be. ISTR it'd be hard.
I think patching cl-opengl to account for the aforementioned functions in Apple GLUT would be easier and would certainly go a long way towards making the whole process of using lisp+glut on osx very easy (no extra dependencies). I would do it myself if had the time, but i already use a custom glut binding with these issues resolved and it works great.
On Mon, Jan 26, 2009 at 10:23 PM, xristos xristos@suspicious.org wrote:
I think patching cl-opengl to account for the aforementioned functions in Apple GLUT would be easier and would certainly go a long way towards making the whole process of using lisp+glut on osx very easy (no extra dependencies). I would do it myself if had the time, but i already use a custom glut binding with these issues resolved and it works great.
I wasn't aware of these functions. Porting to Apple's GLUT sounds like a great idea then.
cl-opengl-devel@common-lisp.net