On Fri, Jun 26, 2009 at 5:25 PM, xristos <xristos@suspicious.org> wrote:
I fixed the main loop issue with destroy-current-window.
If something else does not work as it should, someone should
post about how freeglut works for these bits. I don't have
linux or x11 here and can't test what freeglut does when
windows are destroyed.

I can't do anything about CCL as the issue is not that simple.
The code that is commented out in interface.lisp simply interrupts
the initial thread and starts the glut event loop there.

This does not work (window comes up but event loop is blocked
and i can't do anything) because, in CCL, the initial thread
does certain housekeeping tasks and one can not simply hijack it.
Someone familiar with how CCL does things might want to look into
this, specifically into what CCL does with their cocoa event loop
and duplicate the functionality.

I did solve that issue by "cloning" code taken from examples/opengl-ffi.lisp
in CCL source distribution. I still didn't had the time to get on my laptop
(where the code is), but I'll be able to send it soon.
 


The same strategy of interrupting the initial thread and starting
the glut event loop there works fine in SBCL but i haven't included
the code as for most scenarios the default behavior of SBCL where
the REPL is on the initial thread (this is not true when slime is
involved of course, one has to do the interrupt trick then)
should suffice.

New patch:




On 26 Jun 2009, at 15:55, Luís Oliveira wrote:

On Wed, Jun 24, 2009 at 7:43 PM, xristos<xristos@suspicious.org> wrote:
Here is a cleaner version against current cl-opengl
without the extra wm-close methods.

Looking good, though it still doesn't seem to exit the main loop.
Here's how I reproduce that bug:

   * (require :cl-glut-examples)
   ...
   * (cl-glut-examples:rb-cube) ; for instance
  <press Esc to close the window and the function won't return>

Also, this patch doesn't work on at least CCL because of that
threading issue I mentioned earlier.

--
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